/* Anayom Admin — design tokens. Font sizes are the original scale +2px. */
:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-2: #f8f9fc;
  --line: #e6e9f0;
  --line-2: #eef0f5;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --brand: #4f5fd6;           /* validated mark colour (light) */
  --brand-2: #4150c2;
  --brand-soft: #eef0fd;
  --brand-ink: #3a47a8;
  --mark: #4f5fd6;
  --side-bg: #0f1424;
  --side-bg-2: #171e33;
  --side-text: #c3cadb;
  --side-muted: #7c86a0;
  --side-active: #ffffff;
  --ok: #15803d; --ok-soft: #e7f7ec;
  --warn: #b45309; --warn-soft: #fef5e1;
  --bad: #c0262d; --bad-soft: #fdecec;
  --info: #1d5fd1; --info-soft: #e8f0fe;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --side-w: 256px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1019; --panel: #161b26; --panel-2: #1b2130; --line: #262d3d; --line-2: #202737;
    --text: #e8ecf4; --text-2: #c6cddb; --muted: #97a1b6; --faint: #6c768c;
    --brand: #7385ea; --brand-2: #8a9aef; --brand-soft: #1f2644; --brand-ink: #a9b5f5; --mark: #7385ea;
    --side-bg: #0a0d16; --side-bg-2: #141a2a;
    --ok: #4ade80; --ok-soft: #12291c; --warn: #fbbf24; --warn-soft: #2e2410;
    --bad: #f87171; --bad-soft: #321618; --info: #93c5fd; --info-soft: #14233d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
code, .mono { font-family: var(--mono); font-size: 14.5px; }
h1 { font-size: 22px; line-height: 1.3; margin: 0; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 14px; font-weight: 650; letter-spacing: -.005em; }
h3 { font-size: 13px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
p { margin: 0 0 8px; }
.boot { padding: 48px; color: var(--muted); }
.sub { color: var(--muted); }
svg.ico { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Shell ─────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(to right, var(--side-bg) var(--side-w), var(--bg) var(--side-w)); }
.side { background: var(--side-bg); color: var(--side-text); padding: 20px 14px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; align-self: start; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; font-weight: 700; font-size: 17px; color: #fff; }
.brand small { display: block; font-weight: 500; font-size: 13px; color: var(--side-muted); letter-spacing: .02em; }
.logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff;
  background: linear-gradient(135deg, #6a78ea 0%, #4f5fd6 55%, #3a47a8 100%); box-shadow: 0 4px 14px rgba(79, 95, 214, .45); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--side-muted); padding: 16px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-text); text-decoration: none; font-size: 15.5px; font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { background: var(--side-bg-2); color: #fff; }
.nav a.active { background: rgba(115, 133, 234, .16); color: var(--side-active); box-shadow: inset 3px 0 0 #7385ea; }
.nav a.active svg.ico { color: #9aa8f3; }
.side .spacer { flex: 1; min-height: 16px; }
.who { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--side-bg-2); text-decoration: none; color: var(--side-text); }
.who:hover { background: #1c2438; }
.who strong { display: block; color: #fff; font-size: 15px; line-height: 1.3; }
.who span { font-size: 13px; color: var(--side-muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, #7385ea, #4f5fd6); }

.content { min-width: 0; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 36px;
  background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
.crumbs strong { color: var(--text); font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 12px; }
.env-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); }
.env-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.main { padding: 32px 36px 72px; max-width: 1320px; width: 100%; }
/* Task G4.1: quota warnings banner, above every page */
.quota-banner { padding: 20px 36px 0; max-width: 1320px; }
.quota-banner .note { margin-bottom: 8px; align-items: center; }
.quota-banner-slot:not(:empty) + .main { padding-top: 16px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.head .sub { margin-top: 4px; font-size: 16px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; background: var(--bg); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; gap: 8px; }
  .brand { padding: 0 8px 0 0; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-label, .side .spacer, .who { display: none; }
  .topbar { padding: 0 16px; }
  .env-chip { display: none; }
  .main { padding: 20px 16px 48px; }
}

/* ─── Cards & grids ─────────────────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h2 { margin: 0; }
.card-head .sub { font-size: 14px; margin-top: 2px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-7-5 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .g2, .g3, .tiles { grid-template-columns: 1fr; } }

.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.tile-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tile .label { color: var(--muted); font-size: 14px; font-weight: 500; }
.tile .ico-badge { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.tile .ico-badge svg.ico { width: 18px; height: 18px; }
.tile .value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tile .hint { color: var(--muted); font-size: 14px; }

/* ─── Charts ────────────────────────────────────────────── */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 700px) { .charts { grid-template-columns: 1fr; } }
.chart-title { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.chart-total { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.chart-total strong { color: var(--text); font-size: 20px; font-weight: 700; margin-right: 6px; font-variant-numeric: tabular-nums; }
.chart { position: relative; height: 180px; margin-left: 28px; }
.chart .gridline { position: absolute; left: 0; right: 0; height: 1px; background: var(--line-2); }
.chart .gridline.base { background: var(--line); }
.chart .tick { position: absolute; left: -28px; width: 22px; text-align: right; font-size: 12px; color: var(--faint); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.chart .cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.chart .col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; background: none; border: 0; padding: 0; cursor: default; border-radius: 6px; }
.chart .col:hover, .chart .col:focus-visible { background: var(--panel-2); outline: none; }
.chart .bar { width: 100%; max-width: 22px; background: var(--mark); border-radius: 4px 4px 0 0; min-height: 0; transition: filter .15s; }
.chart .col:hover .bar, .chart .col:focus-visible .bar { filter: brightness(1.12); }
.chart .empty-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 14px; pointer-events: none; }
.xlabels { display: flex; gap: 2px; margin: 8px 0 0 28px; }
.xlabels span { flex: 1; text-align: center; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: visible; }
.tooltip { position: fixed; z-index: 60; pointer-events: none; background: var(--text); color: var(--panel); border-radius: 8px; padding: 8px 12px; font-size: 14px; box-shadow: var(--shadow-lg); white-space: nowrap; }
.tooltip strong { display: block; font-size: 16px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.link-btn:hover { background: none; text-decoration: underline; }

.funnel { display: flex; flex-direction: column; gap: 14px; }
.funnel-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px; align-items: center; gap: 14px; font-size: 15px; }
.funnel-row .name { color: var(--text-2); }
.funnel-track { height: 12px; background: var(--line-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.funnel-bar { height: 100%; background: var(--mark); border-radius: 0 4px 4px 0; min-width: 0; }
.funnel-row .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.funnel-row .num small { color: var(--muted); font-weight: 500; font-size: 13px; margin-left: 4px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-stat { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-weight: 600; background: var(--panel-2); }
.meta-list { display: grid; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 14px; }
.meta-list div { display: flex; justify-content: space-between; gap: 12px; }
.meta-list span:first-child { color: var(--muted); }

/* ─── Tables ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: uppercase; letter-spacing: .05em; background: var(--panel); }
td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--panel-2); }
tr.clickable { cursor: pointer; }
tr.selected td { background: var(--brand-soft) !important; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); padding: 32px 12px; text-align: center; }

/* ─── Forms ─────────────────────────────────────────────── */
label.f { display: block; margin-bottom: 16px; }
label.f > span { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: var(--faint); }
input:hover, select:hover { border-color: #cfd5e2; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input:disabled, select:disabled { background: var(--panel-2); color: var(--muted); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 15px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 200px; }
.row > select { width: auto; flex: 0 0 auto; }
td select { width: auto; min-width: 120px; padding: 6px 10px; font-size: 15px; }
.help { color: var(--muted); font-size: 14px; }

button, .btn { font: inherit; font-size: 15px; font-weight: 600; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: var(--radius-sm); padding: 10px 16px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; display: inline-flex; align-items: center; gap: 8px; }
button:hover { background: var(--panel-2); border-color: #cfd5e2; }
button:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--brand-soft); }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(79, 95, 214, .3); }
button.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
button.danger { color: var(--bad); border-color: var(--bad-soft); background: var(--panel); }
button.danger:hover { background: var(--bad-soft); }
button.danger.armed { background: var(--bad); color: #fff; border-color: var(--bad); }
/* Task G1.2: Settings → Danger zone */
.card.danger-zone { border-color: var(--bad); }
.card.danger-zone h2 { color: var(--bad); }
button.small { padding: 6px 12px; font-size: 14px; border-radius: 8px; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Badges, notes, misc ───────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.b-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.b-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.b-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.b-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.b-brand { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
/* Lead email-status badges (Leads area) */
.badge-verified { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-likely { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-unverified { background: var(--panel-2); color: var(--muted); }
.badge-invalid { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge-none { background: var(--panel-2); color: var(--muted); }
/* A suppressed lead row: never contact — struck through */
tr.lead-suppressed td { text-decoration: line-through; color: var(--muted); }
/* Enrichment progress (lead list page) */
.enrich-progress .bar-track { height: 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; margin: 8px 0 0; }
.enrich-progress .bar-fill { height: 100%; background: var(--brand); transition: width .3s; }
tr.lead-detail td { background: var(--panel-2); }
.lead-detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.lead-detail dt { color: var(--muted); }
.lead-detail dd { margin: 0; overflow-wrap: anywhere; }
.note { display: block; border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; font-size: 15px; border: 1px solid transparent; }
.note.with-ico { display: flex; gap: 10px; align-items: flex-start; }
.note svg.ico { margin-top: 1px; }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.note.warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(180, 83, 9, .15); }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.note.info { background: var(--info-soft); color: var(--info); }
.note a { color: inherit; font-weight: 600; }
.secret-box { background: var(--panel-2); border: 1px dashed var(--brand); border-radius: 12px; padding: 16px; margin: 16px 0; }
.secret-box code { word-break: break-all; display: block; margin: 8px 0 12px; font-size: 15px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.checks li:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 8px; flex-shrink: 0; background: var(--faint); }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.fail { background: var(--bad); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { padding: 6px 0; position: relative; font-size: 15px; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--panel); }
.timeline .when { color: var(--muted); font-size: 14px; margin-right: 10px; }

.steps { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.steps span { flex: 1; min-width: 140px; text-align: center; font-size: 14px; font-weight: 600; padding: 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.steps span.done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.steps span.now { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand); }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; color: var(--muted); font-size: 14px; }
details summary { cursor: pointer; font-weight: 600; font-size: 16px; }
ol.check-list { padding-left: 22px; margin: 14px 0 0; }
ol.check-list li { margin-bottom: 8px; }

/* ─── Auth screens ──────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(79, 95, 214, .18), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(115, 133, 234, .14), transparent 60%), var(--bg); }
.auth .card { width: 100%; max-width: 440px; padding: 36px; box-shadow: var(--shadow-lg); }
.auth .brand { padding: 0 0 24px; color: var(--text); }
.auth h1 { margin-bottom: 6px; }
.auth .sub { margin-bottom: 20px; }
.auth button.primary { width: 100%; justify-content: center; padding: 12px 16px; margin-top: 4px; }

#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 70; }
.toast { background: var(--text); color: var(--panel); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); max-width: 420px; font-size: 15px; }
.toast.bad { background: var(--bad); color: #fff; }
a.btn { text-decoration: none; }
.btn.small { padding: 6px 12px; font-size: 14px; border-radius: 8px; }

/* Workspaces (multi-tenant) */
.ws-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.ws-select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font: inherit; color: var(--ink, inherit); max-width: 260px; }
.ws-chip { display: inline-flex; align-items: baseline; gap: 6px; font-size: 14px; font-weight: 600; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.ws-chip small { color: var(--muted); font-weight: 400; text-transform: capitalize; }
.check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tool { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel); text-align: left; cursor: pointer; font: inherit; }
.tool:hover, .tool.selected { border-color: var(--brand); background: var(--brand-soft); }
.tool strong { display: block; }
.tool span { color: var(--muted); font-size: 13px; }
.caps { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.steps { margin: 8px 0 0 18px; padding: 0; }
.steps li { margin: 4px 0; }
.feat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; }

/* SEO & PPC insights */
.btn.small { padding: 6px 12px; font-size: 14px; border-radius: 8px; text-decoration: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.tabs a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--muted); text-decoration: none; background: var(--panel); }
.tabs a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 0 0 14px; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); }
.kpi span { display: block; font-size: 13px; color: var(--muted); }
.kpi strong { font-size: 20px; }
table.insight td { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.email-preview { width: 100%; min-height: 520px; border: 1px solid var(--line); border-radius: 10px; margin-top: 14px; background: #fff; }

/* Research + Content studio */
textarea { width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; resize: vertical; }
.md-out { white-space: pre-wrap; word-wrap: break-word; font: 15px/1.6 inherit; margin: 0; max-height: 75vh; overflow: auto; }

/* Usage page (Task 9.5, Ruling V6): the current plan column in the comparison */
.plan-compare .plan-current { background: var(--brand-soft); font-weight: 600; }

/* Plan & billing (Task G4.2): the plan picker */
.billing-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 10px 0; }
.billing-plan-option { cursor: pointer; margin: 0; }
.billing-plan-option.plan-current { border-color: var(--brand); background: var(--brand-soft); }
.billing-plan-option ul { margin: 8px 0 0; padding-left: 18px; }
