/* dashboard.css — mailai.in dashboard styles */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800;900&family=DM+Mono:wght@400;500&display=swap');

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800;900&family=DM+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; }

:root {
    --brand:      #4f46e5;
    --brand-dark: #3730a3;
    --brand-lt:   #eef2ff;
    --teal:       #0d9488;
    --green:      #16a34a;
    --amber:      #d97706;
    --red:        #dc2626;
    --slate-9:    #0f172a;
    --slate-7:    #334155;
    --slate-5:    #64748b;
    --slate-3:    #cbd5e1;
    --slate-1:    #f8fafc;
    --border:     #e2e8f0;
    --card-shadow:0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
    --radius:     14px;
    --font:       'DM Sans', system-ui, sans-serif;
    --mono:       'DM Mono', monospace;
}

body { font-family: var(--font); background: #f1f5f9; }

/* ── Layout ─────────────────────────────────────── */
.dash-wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px 80px; }

/* ── Navigation pill ───────────────────────────── */
.site-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 200;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    margin-bottom: 28px;
}
.site-nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 20px;
    display: flex; align-items: center;
    justify-content: space-between;
    height: 56px;
}
.nav-brand { font-weight: 900; font-size: 1.05rem; color: var(--brand); letter-spacing: -0.5px; text-decoration: none; }
.site-nav-pill {
    display: flex; align-items: center;
    background: #f4f5f7; border-radius: 12px;
    padding: 4px; gap: 2px;
}
.snav-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: 9px;
    border: none; background: transparent;
    font-size: 13px; font-weight: 700; color: var(--slate-5);
    text-decoration: none; font-family: var(--font);
    transition: all .18s; white-space: nowrap;
    letter-spacing: -.1px; cursor: pointer;
}
.snav-btn:hover { background: #fff; color: var(--slate-9); box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.snav-btn.active {
    background: linear-gradient(135deg, var(--brand), #6366f1);
    color: #fff; box-shadow: 0 2px 10px rgba(79,70,229,.35);
}
@media(max-width:540px){ .snav-btn { padding: 8px 11px; font-size: 12px; gap: 4px; } }
@media(max-width:400px){ .snav-btn span.nav-lbl { display: none; } }

/* ── Hero header ────────────────────────────────── */
.dash-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    border-radius: 20px; padding: 18px 24px; margin-bottom: 20px;
    color: #fff; position: relative; overflow: hidden;
}
.dash-hero::before {
    content: '';
    position: absolute; top: -40px; right: -40px;
    width: 220px; height: 220px;
    background: rgba(255,255,255,.05);
    border-radius: 50%;
}
.dash-hero::after {
    content: '';
    position: absolute; bottom: -60px; right: 80px;
    width: 160px; height: 160px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-greeting { font-size: 1.35rem; font-weight: 900; letter-spacing: -0.5px; margin: 0 0 4px; }
.hero-sub { font-size: 0.82rem; color: rgba(255,255,255,.7); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; line-height: 1.8; }
.hero-sub-sep { color: rgba(255,255,255,.3); }
.hero-badge {
    display: inline-flex; align-items: center;
    padding: 3px 11px; border-radius: 20px;
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
}
.hero-badge.pro   { background: rgba(34,197,94,.25); border-color: rgba(34,197,94,.4); color: #bbf7d0; }
.hero-badge.trial { background: rgba(251,191,36,.2);  border-color: rgba(251,191,36,.4); color: #fde68a; }
.hero-badge.basic { background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); }
.hero-channel-tag {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px; padding: 4px 12px; font-size: 0.8rem; font-weight: 600;
}
.hero-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.hstat {
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px; padding: 10px 14px;
    backdrop-filter: blur(4px);
}
.hstat-action {
    border: 1.5px dashed rgba(255,255,255,.35) !important;
    background: rgba(255,255,255,.08) !important;
    transition: background .2s, border-color .2s !important;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto !important;
}
.hstat-action:hover {
    background: rgba(255,255,255,.2) !important;
    border-color: rgba(255,255,255,.7) !important;
    transform: translateY(-1px);
}
.hstat-val { font-size: 1.25rem; font-weight: 900; letter-spacing: -0.5px; }
.hstat-lbl { font-size: 0.7rem; color: rgba(255,255,255,.65); font-weight: 500; margin-top: 2px; }
@media(max-width:580px){ .hero-stats { grid-template-columns: repeat(2,1fr); } }
@media(max-width:400px){ .hero-stats { grid-template-columns: 1fr 1fr; } }

/* ── Section label ──────────────────────────────── */
.section-label {
    font-size: 0.95rem; font-weight: 900; text-transform: none; letter-spacing: -0.1px;
    color: var(--slate-9); margin: 24px 0 10px; padding-left: 2px;
    display: flex; align-items: center; gap: 4px;
}

/* ── Card base ──────────────────────────────────── */
.card {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 16px;
}
.card-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px 0; margin-bottom: 14px;
}
.card-title {
    font-size: 0.9rem; font-weight: 800; color: var(--slate-9);
    display: flex; align-items: center; gap: 8px;
}
.card-title-count {
    font-size: 0.7rem; background: #f1f5f9; color: var(--slate-5);
    padding: 2px 8px; border-radius: 12px; font-weight: 600;
}
.card-body { padding: 0 22px 20px; }

/* ── Inbox counts card ──────────────────────────── */
.inbox-card { cursor: default; }
.ic-grid {
    display: grid; grid-template-columns: repeat(6,1fr); gap: 8px;
}
@media(max-width:580px) { .ic-grid { grid-template-columns: repeat(3,1fr); } }
@media(max-width:380px) { .ic-grid { grid-template-columns: repeat(2,1fr); } }
.ic-tab {
    border-radius: 10px; border: 1.5px solid var(--border);
    padding: 12px 8px; text-align: center; cursor: pointer;
    transition: all .18s; background: #fff;
    position: relative;
}
.ic-tab:hover { border-color: var(--brand); background: var(--brand-lt); transform: translateY(-1px); }
.ic-tab.ic-has-items .ic-count { font-weight: 900; }
.ic-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--slate-5); margin-bottom: 5px; }
.ic-count { font-size: 1.45rem; font-weight: 900; color: var(--slate-9); line-height: 1; }
.ic-tab[data-status="new"]      .ic-count { color: #dc2626; }
.ic-tab[data-status="open"]     .ic-count { color: #d97706; }
.ic-tab[data-status="awaiting"] .ic-count { color: #0369a1; }
.ic-tab[data-status="closed"]   .ic-count { color: #15803d; }
.ic-tab[data-status="sent"]     .ic-count { color: #7c3aed; }
.ic-badge-new {
    position: absolute; top: 5px; right: 5px;
    background: #dc2626; color: #fff;
    font-size: 0.6rem; font-weight: 800;
    padding: 1px 5px; border-radius: 10px; line-height: 1.4;
}
.inbox-nopro {
    text-align: center; padding: 20px; background: #f8fafc;
    border: 1.5px dashed var(--border); border-radius: 10px;
    font-size: 0.85rem; color: var(--slate-5);
}
.inbox-nopro a { color: var(--brand); font-weight: 700; }

/* ── Linked emails ──────────────────────────────── */
.linked-email-card {
    border: 1.5px solid var(--border); border-radius: 12px;
    padding: 14px 16px; margin-bottom: 10px; background: #fff;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    transition: border-color .15s;
}
.linked-email-card:hover { border-color: #c7d2fe; }
.le-info { flex: 1; min-width: 0; }
.le-addr { font-size: 0.875rem; font-weight: 700; color: var(--slate-7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.le-status { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.le-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Badges */
.badge-v   { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #dcfce7; color: #15803d; white-space: nowrap; }
.badge-unv { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #fff7ed; color: #b45309; border: 1px solid #fed7aa; white-space: nowrap; cursor: pointer; }
.badge-smtp-gmail    { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; white-space: nowrap; }
.badge-smtp-outlook365 { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; white-space: nowrap; }
.badge-smtp-brevo    { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; white-space: nowrap; }
.badge-smtp-sendgrid { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #e0f2fe; color: #0c4a6e; border: 1px solid #7dd3fc; white-space: nowrap; }
.badge-smtp-zoho     { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #fff7ed; color: #7c2d12; border: 1px solid #fed7aa; white-space: nowrap; }
.badge-smtp-zeptomail{ font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #f0fdf4; color: #14532d; border: 1px solid #86efac; white-space: nowrap; }
.badge-smtp-ses      { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #f0f9ff; color: #0c4a6e; border: 1px solid #7dd3fc; white-space: nowrap; }
.badge-smtp-custom   { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; white-space: nowrap; }
.badge-no-smtp { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; white-space: nowrap; }

/* LE action buttons */
.btn-le {
    font-size: 0.72rem; font-weight: 700; padding: 5px 10px; border-radius: 7px;
    border: 1.5px solid var(--border); background: #fff; color: var(--slate-7);
    cursor: pointer; font-family: var(--font); transition: .15s; white-space: nowrap;
}
.btn-le:hover { border-color: var(--brand); color: var(--brand); }
.btn-le.smtp  { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-le.smtp:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-le.danger { border-color: #fecaca; color: var(--red); }
.btn-le.danger:hover { background: #fef2f2; }
.btn-smtp-setup {
    font-size: 0.72rem; font-weight: 700; padding: 5px 10px; border-radius: 7px;
    background: linear-gradient(135deg, var(--brand), #6366f1); color: #fff; border: none;
    cursor: pointer; font-family: var(--font); white-space: nowrap; transition: .15s;
}
.btn-smtp-setup:hover { opacity: .9; }
.btn-verify {
    font-size: 0.72rem; font-weight: 700; padding: 5px 10px; border-radius: 7px;
    background: #fff7ed; color: #b45309; border: 1.5px solid #fed7aa;
    cursor: pointer; font-family: var(--font); white-space: nowrap; transition: .15s;
}
.btn-remove {
    background: none; border: none; color: var(--red); cursor: pointer;
    font-size: 0.8rem; font-weight: 700; padding: 5px 8px; border-radius: 6px;
    font-family: var(--font); transition: 0.15s;
}
.btn-remove:hover { background: #fee2e2; }

/* ── Add email form ─────────────────────────────── */
.add-form { display: none; margin-top: 14px; }
.add-form input {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
    border-radius: 9px; font-size: 0.9rem; margin-bottom: 10px;
    outline: none; font-family: var(--font); transition: border-color .15s;
}
.add-form input:focus { border-color: var(--brand); }
.add-form-btns { display: flex; gap: 8px; }

/* ── Buttons ────────────────────────────────────── */
.btn-primary {
    padding: 10px 20px; background: var(--brand); color: #fff; border: none;
    border-radius: 9px; font-size: 0.875rem; font-weight: 700;
    cursor: pointer; font-family: var(--font); transition: 0.15s;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline {
    padding: 10px 16px; background: none; border: 1.5px solid var(--border);
    border-radius: 9px; font-size: 0.875rem; font-weight: 600; color: var(--slate-5);
    cursor: pointer; font-family: var(--font); transition: 0.15s;
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

/* ── 2-col grid ─────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 0; }
@media(max-width:620px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── Secret email ───────────────────────────────── */
.secret-box {
    background: #f0f9ff; border: 1.5px solid #bae6fd; border-radius: 10px;
    padding: 10px 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.secret-email { font-family: var(--mono); font-size: 0.82rem; font-weight: 500; color: #0369a1; flex: 1; word-break: break-all; }
.btn-copy {
    background: #0ea5e9; color: #fff; border: none; border-radius: 7px;
    padding: 6px 13px; font-size: 0.78rem; font-weight: 700; cursor: pointer;
    transition: 0.15s; flex-shrink: 0; font-family: var(--font);
}
.btn-copy:hover { background: #0284c7; }


/* ── AI Agent KB setup card ─────────────────────── */
.setup-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0; border-bottom: 1px solid var(--border);
}
.setup-item:last-child { border-bottom: none; }
.setup-item-l { display: flex; align-items: flex-start; gap: 12px; }
.setup-icon { font-size: 1.3rem; margin-top: 1px; flex-shrink: 0; }
.setup-title { font-size: 0.875rem; font-weight: 700; color: var(--slate-7); }
.setup-desc  { font-size: 0.78rem; color: var(--slate-5); margin-top: 2px; line-height: 1.4; }
.setup-link  { 
    font-size: 0.78rem; font-weight: 700; color: var(--brand);
    text-decoration: none; padding: 6px 12px; border-radius: 7px;
    border: 1.5px solid #c7d2fe; background: var(--brand-lt);
    white-space: nowrap; transition: .15s;
}
.setup-link:hover { background: #e0e7ff; }

/* ── Plan & alerts ──────────────────────────────── */
.plan-banner {
    border-radius: 12px; padding: 14px 18px; margin-bottom: 16px;
    display: none; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #93c5fd;
}
.plan-banner.pro { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #86efac; }
.plan-banner-l { display: flex; align-items: center; gap: 10px; }
.plan-pill {
    padding: 4px 12px; border-radius: 20px; font-weight: 800; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.5px; background: #0284c7; color: #fff;
}
.plan-pill.pro { background: #16a34a; }
.plan-title { font-size: 0.9rem; font-weight: 700; color: #0369a1; }
.plan-title.pro { color: #15803d; }
.plan-sub { font-size: 0.8rem; color: var(--slate-5); margin-top: 2px; }
.plan-sub.pro { color: #16a34a; font-weight: 600; }
.btn-plan {
    padding: 8px 16px; border-radius: 8px; background: var(--brand); color: #fff;
    font-weight: 700; font-size: 0.82rem; border: none; cursor: pointer;
    transition: 0.15s; font-family: var(--font); white-space: nowrap;
}
.btn-plan:hover { background: var(--brand-dark); }
.btn-plan.pro { background: #16a34a; }

/* ── Alerts ─────────────────────────────────────── */
.alert-box { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.875rem; font-weight: 600; display: none; line-height: 1.5; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; display: block; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; display: block; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; display: block; }
.missed-alert {
    display: none; background: #fff7ed; border: 1.5px solid #fed7aa;
    border-radius: 10px; padding: 12px 16px; margin-bottom: 16px;
    font-size: 0.875rem; color: #9a3412; font-weight: 500;
}
.missed-alert a { color: #c2410c; font-weight: 700; }

/* ── Trial banner ───────────────────────────────── */
#trialBanner { margin-bottom: 16px; }
.trial-cta {
    border-radius: 14px; padding: 18px 22px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
.trial-cta.warn-2  { background: linear-gradient(135deg,#fffbeb,#fef3c7); border: 2px solid #f59e0b; }
.trial-cta.warn-1  { background: linear-gradient(135deg,#fff7ed,#ffedd5); border: 2px solid #ea580c; }
.trial-cta.warn-0  { background: linear-gradient(135deg,#fef2f2,#fee2e2); border: 2px solid #dc2626; }
.trial-cta.expired-extend  { background: linear-gradient(135deg,#f0fdf4,#dcfce7); border: 2px solid #16a34a; }
.trial-cta.expired-upgrade { background: linear-gradient(135deg,#fef2f2,#fee2e2); border: 2px solid #dc2626; }
@keyframes pulse-border { 0%,100%{box-shadow:0 4px 20px rgba(220,38,38,.15)} 50%{box-shadow:0 4px 28px rgba(220,38,38,.38)} }
.trial-cta.warn-0 { animation: pulse-border 2s ease-in-out infinite; }
.tcta-left { flex: 1; min-width: 0; }
.tcta-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 12px; border-radius: 20px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.warn-2 .tcta-badge { background: #f59e0b; color: #fff; }
.warn-1 .tcta-badge { background: #ea580c; color: #fff; }
.warn-0 .tcta-badge { background: #dc2626; color: #fff; }
.expired-extend .tcta-badge  { background: #16a34a; color: #fff; }
.expired-upgrade .tcta-badge { background: #dc2626; color: #fff; }
.tcta-heading { font-size: 1.05rem; font-weight: 900; color: var(--slate-9); letter-spacing: -0.3px; margin: 0 0 4px; }
.warn-0 .tcta-heading, .expired-upgrade .tcta-heading { color: #991b1b; }
.tcta-sub { font-size: 0.82rem; color: var(--slate-5); margin: 0; line-height: 1.5; }
.warn-0 .tcta-sub, .warn-1 .tcta-sub { font-weight: 600; }
.tcta-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex-shrink: 0; }
.trial-progress-wrap { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.trial-progress-bar  { flex: 1; height: 5px; background: #e2e8f0; border-radius: 5px; overflow: hidden; }
.trial-progress-fill { height: 100%; border-radius: 5px; transition: width .5s; }
.trial-progress-lbl  { font-size: 0.7rem; font-weight: 700; color: #94a3b8; white-space: nowrap; }
.btn-upgrade-now {
    display: inline-block; padding: 10px 22px; border-radius: 9px;
    border: none; cursor: pointer; font-size: 0.88rem; font-weight: 800;
    font-family: var(--font); text-decoration: none; text-align: center;
    transition: all 0.2s; white-space: nowrap;
    background: linear-gradient(135deg, var(--brand), #6366f1); color: #fff;
    box-shadow: 0 4px 14px rgba(79,70,229,.35);
}
.btn-upgrade-now:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,70,229,.45); }
.warn-0 .btn-upgrade-now, .expired-upgrade .btn-upgrade-now { background: linear-gradient(135deg,#dc2626,#ef4444); box-shadow: 0 4px 14px rgba(220,38,38,.35); }
.expired-extend .btn-upgrade-now { background: linear-gradient(135deg,#15803d,#16a34a); box-shadow: 0 4px 14px rgba(22,163,74,.3); }
.btn-extend-trial { display: inline-block; padding: 8px 18px; border-radius: 8px; border: 2px solid #15803d; background: #fff; color: #15803d; font-size: 0.8rem; font-weight: 700; font-family: var(--font); cursor: pointer; transition: all 0.2s; }
.btn-extend-trial:hover { background: #f0fdf4; }
.btn-extend-trial:disabled { opacity: .5; cursor: not-allowed; }
.tcta-fine { font-size: 0.7rem; color: #94a3b8; text-align: center; }
.upgrade-note { display: none; margin-top: 12px; padding: 12px 14px; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px; font-size: 0.84rem; color: #0369a1; }
.btn-upgrade-inline { display: block; width: 100%; padding: 11px; margin-top: 10px; background: linear-gradient(135deg, var(--brand), #8b5cf6); color: #fff; border: none; border-radius: 8px; font-size: 0.875rem; font-weight: 700; cursor: pointer; font-family: var(--font); }

/* ── Fixed Top Toast ─────────────────────────────── */
.top-toast {
    position: fixed;
    top: 68px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    z-index: 9999;
    padding: 11px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    display: none;
    white-space: nowrap;
    max-width: 90vw;
    text-align: center;
    transition: opacity .25s, transform .25s;
    pointer-events: none;
}
.top-toast.visible {
    display: block;
    animation: toastSlideIn .22s cubic-bezier(.34,1.56,.64,1) forwards;
}
.top-toast.success { background: #d1fae5; color: #065f46; border: 1.5px solid #6ee7b7; }
.top-toast.error   { background: #fee2e2; color: #991b1b; border: 1.5px solid #fca5a5; }
.top-toast.info    { background: #dbeafe; color: #1e40af; border: 1.5px solid #93c5fd; }
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}


.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.modal-bg.open { display: flex; }
.modal-box { background: #fff; border-radius: 20px; padding: 28px; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-box h2 { font-size: 1.1rem; font-weight: 900; margin: 0 0 6px; }
.modal-box .modal-sub { color: var(--slate-5); font-size: 0.875rem; margin: 0 0 18px; }
.feat-list { background: #f8fafc; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.feat-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.875rem; color: var(--slate-5); }
.feat-row:last-child { border-bottom: none; }
.feat-row strong { color: var(--slate-9); }
.modal-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab-btn { flex: 1; padding: 9px; border: 1.5px solid var(--border); border-radius: 9px; font-size: 0.82rem; font-weight: 700; cursor: pointer; font-family: var(--font); background: #fff; color: var(--slate-5); transition: all .15s; text-align: center; }
.tab-btn.active { background: var(--slate-9); color: #fff; border-color: var(--slate-9); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.plan-price-big { text-align: center; margin-bottom: 16px; }
.plan-price-big .price { font-size: 2rem; font-weight: 900; color: #0ea5e9; }
.plan-price-big .period { font-size: 0.9rem; color: var(--slate-5); }
.btn-upgrade-modal { width: 100%; padding: 13px; background: linear-gradient(135deg,#229ED9,#1A7CB8); color: #fff; border: none; border-radius: 10px; font-size: 0.95rem; font-weight: 700; cursor: pointer; font-family: var(--font); }
.btn-upgrade-modal:hover { opacity: .92; }

/* ── KB/Profile forms (preserved for agentkb page) ── */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-grid .full { grid-column: 1 / -1; }
.form-group label { display: block; font-size: 0.78rem; font-weight: 700; color: #374151; margin-bottom: 4px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 9px 11px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.875rem; font-family: var(--font); outline: none; transition: border-color .15s; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--brand); }
.form-group textarea { resize: vertical; min-height: 70px; line-height: 1.5; }
.kb-item { border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.kb-item.inactive { opacity: 0.5; }
.kb-item-q { font-weight: 700; color: #334155; font-size: 0.875rem; margin-bottom: 4px; }
.kb-item-a { color: #475569; font-size: 0.82rem; line-height: 1.5; }
.kb-item-meta { font-size: 0.72rem; color: #94a3b8; margin-top: 6px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kb-cat { background: #f1f5f9; color: #475569; padding: 1px 7px; border-radius: 4px; font-size: 0.72rem; font-weight: 600; }
.kb-empty { text-align: center; padding: 24px; color: #94a3b8; font-size: 0.85rem; border: 1.5px dashed var(--border); border-radius: 10px; }

/* ── FAQ accordion ──────────────────────────────── */
.faq-item {
    border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
    width: 100%; display: flex; align-items: center; gap: 4px;
    padding: 16px 22px; background: none; border: none;
    cursor: pointer; font-family: var(--font); font-size: 0.95rem;
    font-weight: 700; color: var(--slate-7); text-align: left;
    transition: background .15s;
}
.faq-q:hover { background: #f8fafc; }
.faq-chevron {
    font-size: 1.2rem; color: var(--slate-3); font-weight: 400;
    transition: transform .2s; flex-shrink: 0; line-height: 1;
}
.faq-a {
    padding: 0 22px 18px 22px; font-size: 0.9rem; color: var(--slate-5);
    line-height: 1.8;
}
.faq-a code { background: #f1f5f9; padding: 2px 6px; border-radius: 5px; font-size: .85rem; }
.faq-a strong { color: var(--slate-7); }

@media(max-width:580px) {
    .tcta-actions { align-items: stretch; width: 100%; }
    .btn-upgrade-now { text-align: center; display: block; }
    .trial-cta { padding: 14px; }
    .dash-hero { padding: 14px 16px; }
    .hero-greeting { font-size: 1.1rem; }
}
