/* Uplify OS — Concept A (light) design system.
   Adopted from the owner's concept-a-light mock. Tokens are global; every
   COMPONENT rule is scoped under `.ui2` so it composes with the existing
   Tailwind pages without class collisions (.panel/.kpi/.content/.btn-primary
   all exist elsewhere). A page opts in by putting `ui2` on its content
   wrapper, then uses these semantic classes. Migrate page-by-page. */

:root {
  /* dark sidebar (client cabinet shell) */
  --c-side:       oklch(0.21 0.012 165);
  --c-side-2:     oklch(0.255 0.013 165);
  --c-side-line:  oklch(0.31 0.012 165);
  --c-side-fg:    oklch(0.92 0.01 160);
  --c-side-muted: oklch(0.62 0.015 160);
  --c-side-dim:   oklch(0.48 0.013 160);
  /* light surfaces — warm-cool off white */
  --c-bg:        oklch(0.975 0.003 240);
  --c-bg-soft:   oklch(0.955 0.004 240);
  --c-card:      oklch(1 0 0);
  --c-card-2:    oklch(0.985 0.003 240);
  --c-line:      oklch(0.915 0.006 240);
  --c-line-soft: oklch(0.945 0.005 240);
  /* ink */
  --c-fg:        oklch(0.26 0.012 250);
  --c-fg-soft:   oklch(0.44 0.012 250);
  --c-fg-muted:  oklch(0.60 0.010 250);
  --c-fg-dim:    oklch(0.72 0.008 250);
  /* accents */
  --c-acc:       oklch(0.56 0.115 162);
  --c-acc-deep:  oklch(0.48 0.10 162);
  --c-acc-soft:  oklch(0.94 0.05 162);
  --c-lime:      oklch(0.86 0.21 122);
  --c-up:        oklch(0.55 0.13 155);
  --c-up-bg:     oklch(0.95 0.06 155);
  --c-dn:        oklch(0.58 0.18 25);
  --c-dn-bg:     oklch(0.96 0.04 25);
  --c-warn:      oklch(0.70 0.15 65);
  --c-warn-bg:   oklch(0.96 0.05 75);
  --c-crit:      oklch(0.58 0.20 22);
  --c-crit-bg:   oklch(0.955 0.035 22);
  --c-r-sm: 5px;
  --c-r-md: 9px;
  --c-r-lg: 14px;
  --c-mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;
  --c-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
}

/* ── opt-in content scope ── */
:where(.ui2) {
  color: var(--c-fg);
  font-family: var(--c-sans);
  font-size: 14px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
/* Tailwind's `.hidden` (display:none) is the page's show/hide mechanism and
   MUST always win. A concept rule like `:where(.ui2) .supr{display:flex}` has
   class-level specificity (0,1,0) — equal to `.hidden` — and concept.css loads
   AFTER Tailwind, so it would otherwise override `.hidden`. Force it back. */
.ui2 .hidden, .ui2.hidden { display: none !important; }
/* Same guarantee for the client cabinet shell (`.cab`): concept rules like
   `:where(.cab) .mc-stats{display:grid}` are (0,1,0) and load after Tailwind, so
   `.hidden` on a concept-styled element would otherwise lose. Force it back. */
.cab .hidden, .cab.hidden { display: none !important; }

:where(.ui2) .mono { font-family: var(--c-mono); }
:where(.ui2) .tnum { font-variant-numeric: tabular-nums; }
:where(.ui2) .up { color: var(--c-up); }
:where(.ui2) .dn { color: var(--c-dn); }

/* ── buttons (namespaced to avoid the global .btn-primary lime pill) ── */
:where(.ui2) .c-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px; border-radius: var(--c-r-sm);
  font-family: var(--c-mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.02em; border: 1px solid var(--c-line);
  background: var(--c-card); color: var(--c-fg); cursor: pointer;
  transition: background-color .12s, border-color .12s;
}
:where(.ui2) .c-btn:hover { background: var(--c-bg-soft); border-color: var(--c-fg-dim); }
:where(.ui2) .c-btn.primary { background: var(--c-acc); border-color: var(--c-acc); color: #fff; font-weight: 600; }
:where(.ui2) .c-btn.primary:hover { background: var(--c-acc-deep); border-color: var(--c-acc-deep); }
:where(.ui2) .c-btn:disabled { opacity: .5; cursor: not-allowed; }
:where(.ui2) .c-btn.sm { padding: 5px 11px; font-size: 11px; }

/* ── KPI big ── */
:where(.ui2) .kpi-big { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
:where(.ui2) .kpi { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 18px 20px 16px; }
:where(.ui2) .kpi .top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
:where(.ui2) .kpi .lab { font-family: var(--c-mono); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--c-fg-muted); }
:where(.ui2) .kpi .ic { margin-left: auto; width: 28px; height: 28px; border-radius: var(--c-r-sm); background: var(--c-bg-soft); display: grid; place-items: center; color: var(--c-fg-muted); }
:where(.ui2) .kpi .ic svg { width: 15px; height: 15px; }
:where(.ui2) .kpi .val { font-weight: 500; font-size: 40px; letter-spacing: -.035em; line-height: 1; color: var(--c-fg); }
:where(.ui2) .kpi .val .sub { font-family: var(--c-mono); font-size: 15px; color: var(--c-fg-muted); margin-left: 4px; }
:where(.ui2) .kpi .val .sep { color: var(--c-fg-dim); margin: 0 4px; }
:where(.ui2) .kpi .val.wrap { font-size: 27px; line-height: 1.15; }
:where(.ui2) .kpi .foot { margin-top: 12px; font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-muted); display: flex; gap: 8px; align-items: center; }

/* ── KPI mini strip ── */
:where(.ui2) .kpi-mini { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); border-radius: var(--c-r-md); overflow: hidden; }
:where(.ui2) .kpi-mini .cell { background: var(--c-card); padding: 16px 18px 14px; }
:where(.ui2) .kpi-mini .cell .lab { font-family: var(--c-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-fg-muted); display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
:where(.ui2) .kpi-mini .cell .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
:where(.ui2) .kpi-mini .cell .dot.crit { background: var(--c-crit); box-shadow: 0 0 0 3px var(--c-crit-bg); }
:where(.ui2) .kpi-mini .cell .dot.warn { background: var(--c-warn); box-shadow: 0 0 0 3px var(--c-warn-bg); }
:where(.ui2) .kpi-mini .cell .dot.ok { background: var(--c-acc); box-shadow: 0 0 0 3px var(--c-acc-soft); }
:where(.ui2) .kpi-mini .cell .val { font-weight: 500; font-size: 30px; letter-spacing: -.03em; line-height: 1; }
:where(.ui2) .kpi-mini .cell .val.crit { color: var(--c-crit); }
:where(.ui2) .kpi-mini .cell .val.warn { color: var(--c-warn); }

/* ── panel ── */
:where(.ui2) .panel { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-lg); overflow: hidden; }
:where(.ui2) .panel-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--c-line); }
:where(.ui2) .panel-head h2 { font-weight: 600; font-size: 16px; letter-spacing: -.015em; margin: 0; }
:where(.ui2) .panel-head .tag { font-family: var(--c-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-acc); background: var(--c-acc-soft); padding: 3px 8px; border-radius: 4px; }
:where(.ui2) .panel-head .meta { margin-left: auto; font-family: var(--c-mono); font-size: 11px; letter-spacing: .04em; color: var(--c-fg-muted); }
:where(.ui2) .panel-body { padding: 18px 20px; }

/* ── filter bar ── */
:where(.ui2) .filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--c-line); background: var(--c-card-2); }
:where(.ui2) .seg { display: inline-flex; border: 1px solid var(--c-line); border-radius: var(--c-r-sm); overflow: hidden; background: var(--c-card); }
:where(.ui2) .seg button { padding: 6px 13px; font-family: var(--c-mono); font-size: 12px; font-weight: 500; background: transparent; border: none; border-right: 1px solid var(--c-line); color: var(--c-fg-muted); cursor: pointer; }
:where(.ui2) .seg button:last-child { border-right: none; }
:where(.ui2) .seg button.on { background: var(--c-acc); color: #fff; }
:where(.ui2) .chip, :where(.ui2) .c-select { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--c-line); border-radius: var(--c-r-sm); background: var(--c-card); font-size: 12.5px; color: var(--c-fg-soft); }

/* ── data grid ── */
:where(.ui2) .tbl-scroll { overflow-x: auto; }
:where(.ui2) table.data-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
:where(.ui2) table.data-grid thead th { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); font-weight: 500; text-align: right; padding: 11px 14px; border-bottom: 1px solid var(--c-line); white-space: nowrap; background: var(--c-card-2); position: sticky; top: 0; }
:where(.ui2) table.data-grid thead th:first-child { text-align: left; }
:where(.ui2) table.data-grid tbody td { padding: 11px 14px; border-bottom: 1px solid var(--c-line-soft); text-align: right; white-space: nowrap; vertical-align: middle; }
:where(.ui2) table.data-grid tbody tr:hover td { background: var(--c-card-2); }
:where(.ui2) table.data-grid tbody tr:last-child td { border-bottom: none; }
:where(.ui2) .num { font-family: var(--c-mono); font-variant-numeric: tabular-nums; color: var(--c-fg); font-weight: 500; }
:where(.ui2) .num .delta { display: block; font-size: 11px; font-weight: 500; margin-top: 2px; }
:where(.ui2) .num .delta.up { color: var(--c-up); }
:where(.ui2) .num .delta.dn { color: var(--c-dn); }
:where(.ui2) .muted-cell { color: var(--c-fg-dim); font-family: var(--c-mono); }
:where(.ui2) .pill { display: inline-block; font-family: var(--c-mono); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; font-variant-numeric: tabular-nums; }
:where(.ui2) .pill.alert { background: var(--c-crit); color: #fff; }
:where(.ui2) .pill.warn { background: var(--c-warn-bg); color: var(--c-warn); }
:where(.ui2) .pill.ok { background: var(--c-acc-soft); color: var(--c-acc-deep); }

/* ── attention list ── */
:where(.ui2) .attn { display: flex; flex-direction: column; }
:where(.ui2) .attn-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--c-line-soft); border-left: 3px solid transparent; }
:where(.ui2) .attn-row:last-child { border-bottom: none; }
:where(.ui2) .attn-row.crit { border-left-color: var(--c-crit); }
:where(.ui2) .attn-row.warn { border-left-color: var(--c-warn); }
:where(.ui2) .attn-row .pdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
:where(.ui2) .attn-row .pdot.crit { background: var(--c-crit); }
:where(.ui2) .attn-row .pdot.warn { background: var(--c-warn); }
:where(.ui2) .attn-row .name { font-weight: 600; letter-spacing: -.01em; }
:where(.ui2) .attn-row .desc { color: var(--c-fg-muted); font-size: 13px; }
:where(.ui2) .attn-row .actions { margin-left: auto; display: flex; gap: 8px; }

/* ── 2-up row ── */
:where(.ui2) .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { :where(.ui2) .row-2, :where(.ui2) .kpi-big { grid-template-columns: 1fr 1fr; } :where(.ui2) .kpi-mini { grid-template-columns: repeat(3,1fr); } }

/* ── prose (markdown reports / briefs rendered via renderMarkdown) ── */
:where(.ui2) .prose-c { overflow-wrap: anywhere; } /* long URLs/mono tokens must wrap, not widen the column */
:where(.ui2) .prose-c h1 { font-size: 20px; font-weight: 700; margin: 18px 0 8px; letter-spacing: -.02em; }
:where(.ui2) .prose-c h2 { font-size: 16px; font-weight: 600; margin: 18px 0 6px; }
:where(.ui2) .prose-c h3 { font-size: 14px; font-weight: 600; margin: 14px 0 4px; }
:where(.ui2) .prose-c pre { background: var(--c-bg-soft); border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 12px; overflow-x: auto; font-family: var(--c-mono); font-size: 12.5px; white-space: pre-wrap; }
:where(.ui2) .prose-c code { font-family: var(--c-mono); font-size: 12.5px; }
:where(.ui2) .prose-c table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
:where(.ui2) .prose-c th, :where(.ui2) .prose-c td { border: 1px solid var(--c-line); padding: 6px 10px; text-align: left; }
:where(.ui2) .prose-c a { color: var(--c-acc-deep); text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════════
   v2 — components ported from the owner's 3 new concepts
   (settings.html · profile.html · project-dashboard.html).
   Same rules: scoped under :where(.ui2), tokens prefixed --c-*, literal
   oklch kept only where the mock used a hue with no token (blue/purple/tg).
   ════════════════════════════════════════════════════════════════════ */

/* ── sub-nav (sticky page tabs under the topbar) — shared by all 3 ──
   top:60px assumes the OS topbar height; adjust per-page if it differs. */
:where(.ui2) .subnav {
  position: sticky; top: 60px; z-index: 18;
  display: flex; align-items: stretch; gap: 2px; padding: 0 32px;
  margin: -18px -32px 0;                 /* bleed to content edges */
  background: color-mix(in oklab, var(--c-bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
  overflow-x: auto; scrollbar-width: none;
}
:where(.ui2) .subnav::-webkit-scrollbar { display: none; }
:where(.ui2) .subnav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 14px 13px; font-size: 13.5px; font-weight: 500;
  color: var(--c-fg-muted); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; letter-spacing: -.005em;
}
:where(.ui2) .subnav a:hover { color: var(--c-fg); }
:where(.ui2) .subnav a .tic { width: 15px; height: 15px; opacity: .7; stroke: currentColor; flex-shrink: 0; }
:where(.ui2) .subnav a.active { color: var(--c-acc); border-bottom-color: var(--c-acc); font-weight: 600; }
:where(.ui2) .subnav a.active .tic { opacity: 1; }

/* ── project context bar ── */
:where(.ui2) .ctx-bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  background: var(--c-acc-soft);
  border: 1px solid color-mix(in oklab, var(--c-acc) 22%, var(--c-line));
  border-radius: var(--c-r-md); font-size: 13.5px;
}
:where(.ui2) .ctx-bar .fic { width: 16px; height: 16px; color: var(--c-acc-deep); stroke: currentColor; flex-shrink: 0; }
:where(.ui2) .ctx-bar .lab { color: var(--c-fg-soft); }
:where(.ui2) .ctx-bar .proj { font-weight: 600; color: var(--c-fg); letter-spacing: -.01em; }
:where(.ui2) .ctx-bar .proj .chan { color: var(--c-fg-muted); font-weight: 500; }
:where(.ui2) .ctx-bar .switch { margin-left: auto; font-family: var(--c-mono); font-size: 12px; font-weight: 500; color: var(--c-acc-deep); display: inline-flex; align-items: center; gap: 6px; }
:where(.ui2) .ctx-bar .switch:hover { color: var(--c-acc); }

/* ── narrow column (form/settings pages) ── */
:where(.ui2).narrow, :where(.ui2) .narrow { max-width: 920px; }

/* ── card (settings + profile) ── */
:where(.ui2) .card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-lg); padding: 22px 24px; }
:where(.ui2) .card.pad-lg { padding: 24px 26px; }
:where(.ui2) .card > .c-head, :where(.ui2) .card .card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
:where(.ui2) .card > .c-head { margin-bottom: 4px; }
:where(.ui2) .card .c-head h3, :where(.ui2) .card .card-head h3 { font-weight: 600; font-size: 16px; letter-spacing: -.015em; margin: 0; }
:where(.ui2) .card > .c-head h3 { font-size: 17px; }
:where(.ui2) .card .c-head .pill-tab { font-family: var(--c-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-acc); background: var(--c-acc-soft); padding: 3px 9px; border-radius: 999px; }
:where(.ui2) .card .card-head .link { margin-left: auto; font-family: var(--c-mono); font-size: 12px; font-weight: 500; color: var(--c-acc-deep); }
:where(.ui2) .card .card-head .link:hover { color: var(--c-acc); }
:where(.ui2) .card > .c-sub { font-size: 13px; color: var(--c-fg-muted); margin: 0 0 20px; line-height: 1.5; }

/* ── forms ── */
:where(.ui2) .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
:where(.ui2) .field { display: flex; flex-direction: column; gap: 7px; }
:where(.ui2) .field.full { grid-column: 1 / -1; }
:where(.ui2) .field label { font-family: var(--c-mono); font-size: 11px; letter-spacing: .04em; color: var(--c-fg-soft); display: inline-flex; align-items: center; gap: 6px; }
:where(.ui2) .field label .q { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--c-fg-dim); color: var(--c-fg-dim); display: inline-grid; place-items: center; font-size: 9px; font-style: normal; }
:where(.ui2) .input { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--c-line); border-radius: var(--c-r-sm); background: var(--c-card-2); font-size: 14px; color: var(--c-fg); }
:where(.ui2) .input:focus-within { border-color: var(--c-acc); box-shadow: 0 0 0 3px var(--c-acc-soft); }
:where(.ui2) .input.num { font-family: var(--c-mono); font-variant-numeric: tabular-nums; }
:where(.ui2) .input .ph { color: var(--c-fg-dim); }
:where(.ui2) .input.with-btn { padding-right: 6px; }
:where(.ui2) .input.with-btn .grow { flex: 1; color: var(--c-fg-dim); }
:where(.ui2) .input select, :where(.ui2) .input input, :where(.ui2) .input textarea { border: none; background: transparent; font: inherit; color: inherit; outline: none; width: 100%; }
:where(.ui2) .field .hint { font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-muted); letter-spacing: .01em; }
:where(.ui2) .inline-save { display: flex; gap: 10px; align-items: stretch; }
:where(.ui2) .inline-save .input { flex: 1; }
:where(.ui2) .c-btn.btn-sm { padding: 11px 18px; }
:where(.ui2) .section-label { font-family: var(--c-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-soft); margin: 22px 0 14px; padding-top: 20px; border-top: 1px solid var(--c-line-soft); display: flex; align-items: center; gap: 10px; }
:where(.ui2) .section-label:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
:where(.ui2) .save-bar { margin-top: 22px; display: flex; align-items: center; gap: 10px; }

/* ── integrations list ── */
:where(.ui2) .integ { display: flex; flex-direction: column; }
:where(.ui2) .integ-row { display: flex; align-items: center; gap: 14px; padding: 16px 2px; border-bottom: 1px solid var(--c-line-soft); }
:where(.ui2) .integ-row:last-child { border-bottom: none; }
:where(.ui2) .integ-row .ico { width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; font-family: var(--c-mono); font-weight: 700; font-size: 14px; background: var(--c-bg-soft); border: 1px solid var(--c-line); }
:where(.ui2) .integ-row .ico.g { color: #4285F4; }
:where(.ui2) .integ-row .ico.ads { color: #1A73E8; }
:where(.ui2) .integ-row .ico.mc { color: #C5221F; }
:where(.ui2) .integ-row .ico.meta { color: #0866FF; }
:where(.ui2) .integ-row .ico.ga { color: #E8710A; }
:where(.ui2) .integ-row .ico.sc { color: #1A73E8; }
:where(.ui2) .integ-row .ico.cl { color: #6E56CF; }
:where(.ui2) .integ-row .info { min-width: 0; }
:where(.ui2) .integ-row .info .name { font-weight: 600; font-size: 14px; letter-spacing: -.01em; }
:where(.ui2) .integ-row .info .sub { font-family: var(--c-mono); font-size: 11.5px; color: var(--c-fg-muted); margin-top: 2px; }
:where(.ui2) .integ-row .status { margin-left: auto; display: flex; align-items: center; gap: 8px; }
:where(.ui2) .stat-pill { font-family: var(--c-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; }
:where(.ui2) .stat-pill.on { background: var(--c-up-bg); color: var(--c-up); }
:where(.ui2) .stat-pill.connected { background: var(--c-acc-soft); color: var(--c-acc); }
:where(.ui2) .stat-pill.off { background: var(--c-bg-soft); color: var(--c-fg-muted); }
:where(.ui2) .stat-pill.depleted { background: var(--c-crit-bg); color: var(--c-crit); }
:where(.ui2) .ghost-btn { font-family: var(--c-mono); font-size: 11.5px; padding: 5px 12px; border: 1px solid var(--c-line); border-radius: var(--c-r-sm); background: var(--c-card); color: var(--c-fg-soft); cursor: pointer; }
:where(.ui2) .ghost-btn:hover { background: var(--c-bg-soft); }
:where(.ui2) .ghost-btn.acc { background: var(--c-acc); border-color: var(--c-acc); color: #fff; font-weight: 600; }
:where(.ui2) .ghost-btn.danger { color: var(--c-dn); border-color: color-mix(in oklab, var(--c-dn) 35%, var(--c-line)); }

/* ── meta account picker ── */
:where(.ui2) .meta-block { margin-top: 4px; padding: 14px 16px; background: var(--c-card-2); border: 1px solid var(--c-line-soft); border-radius: var(--c-r-md); }
:where(.ui2) .meta-block .sel-head { font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-soft); margin-bottom: 10px; }
:where(.ui2) .meta-acc { display: flex; align-items: center; gap: 11px; padding: 9px 4px; border-bottom: 1px solid var(--c-line-soft); font-size: 13px; }
:where(.ui2) .meta-acc:last-of-type { border-bottom: none; }
:where(.ui2) .meta-acc .radio { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--c-fg-dim); flex-shrink: 0; }
:where(.ui2) .meta-acc .nm { font-weight: 500; }
:where(.ui2) .meta-acc .id { font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-muted); }
:where(.ui2) .meta-acc .cur { margin-left: auto; font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-dim); }
:where(.ui2) .expander { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-family: var(--c-mono); font-size: 12px; color: var(--c-fg-muted); cursor: pointer; }
:where(.ui2) .expander svg { width: 12px; height: 12px; stroke: currentColor; }
:where(.ui2) .expander:hover { color: var(--c-fg-soft); }

/* ── balance + change history (settings) ── */
:where(.ui2) .bal-top { display: flex; gap: 28px; align-items: center; padding: 16px 18px; background: var(--c-card-2); border: 1px solid var(--c-line-soft); border-radius: var(--c-r-md); margin-bottom: 18px; }
:where(.ui2) .bal-top .cell .k { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); margin-bottom: 6px; }
:where(.ui2) .bal-top .cell .v { font-weight: 600; font-size: 24px; letter-spacing: -.02em; }
:where(.ui2) .bal-top .cell .v.dn { color: var(--c-crit); }
:where(.ui2) .bal-top .cell .upd { font-family: var(--c-mono); font-size: 12px; color: var(--c-fg-soft); }
:where(.ui2) .chk-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--c-fg-soft); margin: 16px 0; }
:where(.ui2) .chk { width: 17px; height: 17px; border-radius: 4px; background: var(--c-acc); display: grid; place-items: center; }
:where(.ui2) .chk svg { width: 11px; height: 11px; stroke: #fff; stroke-width: 3; }
:where(.ui2) .hist { display: flex; flex-direction: column; margin-top: 18px; }
:where(.ui2) .hist-row { display: grid; grid-template-columns: 150px 1fr 130px 150px; gap: 16px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--c-line-soft); font-family: var(--c-mono); font-size: 12px; }
:where(.ui2) .hist-row:last-child { border-bottom: none; }
:where(.ui2) .hist-row .when { color: var(--c-fg-muted); }
:where(.ui2) .hist-row .change, :where(.ui2) .hist-row .change b { color: var(--c-fg); }
:where(.ui2) .hist-row .change b { font-weight: 600; }
:where(.ui2) .hist-row .change .arr { color: var(--c-fg-dim); margin: 0 6px; }
:where(.ui2) .hist-row .src { color: var(--c-acc-deep); }
:where(.ui2) .hist-row .note { color: var(--c-fg-dim); text-align: right; }

/* ── telegram empty state ── */
:where(.ui2) .tg-empty { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--c-card-2); border: 1px solid var(--c-line-soft); border-radius: var(--c-r-md); }
:where(.ui2) .tg-empty .tg-ico { width: 34px; height: 34px; border-radius: 8px; background: oklch(0.55 0.13 245); display: grid; place-items: center; color: #fff; font-weight: 700; flex-shrink: 0; }
:where(.ui2) .tg-empty .tg-txt { font-size: 13.5px; color: var(--c-fg-soft); }
:where(.ui2) .tg-empty .btn-tg { margin-left: auto; padding: 9px 16px; border-radius: var(--c-r-sm); background: oklch(0.55 0.13 245); color: #fff; font-family: var(--c-mono); font-size: 12.5px; font-weight: 600; border: none; cursor: pointer; }

/* ── profile hero ── */
:where(.ui2) .pf-hero { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-lg); padding: 26px 28px; }
:where(.ui2) .pf-hero .top { display: flex; align-items: flex-start; gap: 16px; }
:where(.ui2) .pf-hero h2 { font-weight: 600; font-size: 27px; letter-spacing: -.025em; margin: 0; }
:where(.ui2) .pf-hero .badge-on { font-family: var(--c-mono); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-acc); background: var(--c-acc-soft); padding: 4px 9px; border-radius: 5px; }
:where(.ui2) .pf-hero .chan-tag { font-size: 13px; color: var(--c-fg-muted); }
:where(.ui2) .pf-hero .meta-line { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
:where(.ui2) .pf-hero .edit { margin-left: auto; }
:where(.ui2) .pf-hero .clients { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--c-line-soft); }
:where(.ui2) .pf-hero .clients .lab { font-family: var(--c-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-fg-muted); display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
:where(.ui2) .pf-hero .clients .lab svg { width: 13px; height: 13px; stroke: currentColor; }
:where(.ui2) .pf-hero .client-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
:where(.ui2) .client-chip { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: var(--c-r-md); background: var(--c-acc-soft); border: 1px solid color-mix(in oklab, var(--c-acc) 25%, var(--c-line)); font-weight: 500; font-size: 14px; color: var(--c-fg); }
:where(.ui2) .client-chip .av { width: 22px; height: 22px; border-radius: 999px; background: var(--c-acc); color: #fff; display: grid; place-items: center; font-family: var(--c-mono); font-size: 10px; font-weight: 600; }
:where(.ui2) .add-chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--c-r-md); border: 1px dashed var(--c-line); background: var(--c-card); font-family: var(--c-mono); font-size: 12.5px; color: var(--c-fg-muted); }
:where(.ui2) .add-chip:hover { border-color: var(--c-acc); color: var(--c-acc); }
:where(.ui2) .pf-facts { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--c-line-soft); display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 32px; }
:where(.ui2) .pf-facts .fact .k { font-family: var(--c-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-fg-muted); margin-bottom: 6px; }
:where(.ui2) .pf-facts .fact .v { font-size: 15px; font-weight: 500; color: var(--c-fg); }
:where(.ui2) .pf-facts .fact .v.acc { color: var(--c-acc); }
:where(.ui2) .pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
:where(.ui2) .pf-grid .col { display: flex; flex-direction: column; gap: 18px; }

/* ── key/value list (profile) ── */
:where(.ui2) .kv-list { display: flex; flex-direction: column; gap: 14px; }
:where(.ui2) .kv { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: baseline; }
:where(.ui2) .kv .k { font-family: var(--c-mono); font-size: 11px; letter-spacing: .05em; color: var(--c-fg-muted); text-transform: uppercase; }
:where(.ui2) .kv .v { font-size: 13.5px; color: var(--c-fg); word-break: break-word; }
:where(.ui2) .kv .v a { color: var(--c-acc-deep); }
:where(.ui2) .kv .v a:hover { color: var(--c-acc); }
:where(.ui2) .kv .v.mono { font-family: var(--c-mono); font-size: 12.5px; }
:where(.ui2) .empty-mini { font-size: 13.5px; color: var(--c-fg-muted); padding: 8px 0; }
:where(.ui2) .comment-body { font-size: 14px; color: var(--c-fg-soft); line-height: 1.6; }
:where(.ui2) .comment-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--c-line-soft); font-family: var(--c-mono); font-size: 12px; color: var(--c-fg-muted); }
:where(.ui2) .comment-note b { color: var(--c-fg-soft); font-weight: 500; }

/* ── payments (profile) ── */
:where(.ui2) .pay-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
:where(.ui2) .pay-summary .cell { background: var(--c-card-2); border: 1px solid var(--c-line-soft); border-radius: var(--c-r-md); padding: 14px 16px; }
:where(.ui2) .pay-summary .cell .k { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); margin-bottom: 8px; }
:where(.ui2) .pay-summary .cell .v { font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
:where(.ui2) .pay-summary .cell .v.acc { color: var(--c-acc); }
:where(.ui2) .pay-list { display: flex; flex-direction: column; }
:where(.ui2) .pay-row { display: grid; grid-template-columns: 92px 88px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--c-line-soft); }
:where(.ui2) .pay-row:last-child { border-bottom: none; }
:where(.ui2) .pay-row .date { font-family: var(--c-mono); font-size: 12.5px; color: var(--c-fg-soft); }
:where(.ui2) .pay-row .amt { font-family: var(--c-mono); font-size: 13.5px; font-weight: 600; color: var(--c-acc); }
:where(.ui2) .pay-row .who { font-size: 13px; color: var(--c-fg-soft); }

/* ── report toolbar (project-dashboard topbar) ── */
:where(.ui2) .rep-toolbar { display: flex; align-items: center; gap: 8px; }
:where(.ui2) .rep-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-card); font-family: var(--c-mono); font-size: 12px; color: var(--c-fg-soft); }
:where(.ui2) .rep-pill svg { width: 13px; height: 13px; stroke: currentColor; color: var(--c-fg-muted); }
:where(.ui2) .rep-pill.gen { background: var(--c-lime); border-color: var(--c-lime); color: oklch(0.28 0.07 122); font-weight: 600; }
:where(.ui2) .rep-pill.gen svg { color: oklch(0.28 0.07 122); }
:where(.ui2) .rep-pill.muted { color: var(--c-fg-muted); }

/* ── filter strip (project-dashboard) ── */
:where(.ui2) .filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* unify control height across the strip: dates/selects carry inline padding:0,
   while the search box kept the default .input 11px vertical padding and stuck
   out ~22px taller. Pin every control to one height + zero vertical padding. */
:where(.ui2) .filterbar .input { height: 38px; padding-top: 0; padding-bottom: 0; }
:where(.ui2) .chan-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-card); font-size: 12.5px; color: var(--c-fg-soft); }
:where(.ui2) .chan-chip .dot { width: 7px; height: 7px; border-radius: 50%; }
:where(.ui2) .supr { display: flex; align-items: center; gap: 10px; font-family: var(--c-mono); font-size: 12px; color: var(--c-fg-muted); }
:where(.ui2) .supr .badge-on { background: var(--c-acc-soft); color: var(--c-acc); padding: 3px 9px; border-radius: 999px; font-weight: 600; font-size: 11px; }

/* ── KPI cards with sub-metrics (project-dashboard) ── */
:where(.ui2) .kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
:where(.ui2) .kpi-c { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 18px 20px; }
:where(.ui2) .kpi-c .top { display: flex; align-items: center; margin-bottom: 10px; }
:where(.ui2) .kpi-c .lab { font-family: var(--c-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-fg-muted); }
:where(.ui2) .kpi-c .top svg { margin-left: auto; width: 15px; height: 15px; color: var(--c-fg-dim); }
:where(.ui2) .kpi-c .val { font-weight: 600; font-size: 33px; letter-spacing: -.035em; line-height: 1; }
:where(.ui2) .kpi-c .chg { font-family: var(--c-mono); font-size: 12px; font-weight: 500; margin-top: 8px; }
:where(.ui2) .kpi-c .chg.up { color: var(--c-up); }
:where(.ui2) .kpi-c .chg.dn { color: var(--c-dn); }
:where(.ui2) .kpi-c .subs { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--c-line-soft); display: flex; flex-direction: column; gap: 7px; }
:where(.ui2) .kpi-c .subs .s { display: flex; align-items: center; font-family: var(--c-mono); font-size: 11.5px; }
:where(.ui2) .kpi-c .subs .s .sk { color: var(--c-fg-muted); text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
:where(.ui2) .kpi-c .subs .s .sv { margin-left: auto; color: var(--c-fg); font-weight: 500; }
:where(.ui2) .kpi-c .subs .s .sd { margin-left: 8px; font-size: 10.5px; }
:where(.ui2) .kpi-c .subs .s .sd.up { color: var(--c-up); }
:where(.ui2) .kpi-c .subs .s .sd.dn { color: var(--c-dn); }

/* ── AI bar ── */
:where(.ui2) .ai-bar { display: flex; align-items: center; gap: 12px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 14px 20px; }
:where(.ui2) .ai-bar .ai-ic { width: 26px; height: 26px; border-radius: 7px; background: var(--c-acc-soft); color: var(--c-acc); display: grid; place-items: center; }
:where(.ui2) .ai-bar .ai-ic svg { width: 15px; height: 15px; stroke: currentColor; }
:where(.ui2) .ai-bar h3 { font-weight: 600; font-size: 15px; margin: 0; letter-spacing: -.01em; }
:where(.ui2) .ai-bar .badge-ai { font-family: var(--c-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-acc); background: var(--c-acc-soft); padding: 2px 7px; border-radius: 4px; }
:where(.ui2) .ai-bar .c-btn { margin-left: auto; }

/* ── panel head extras (icon, tag tints, inline select) ── */
:where(.ui2) .panel-head h2 .ph-ic { width: 16px; height: 16px; color: var(--c-fg-muted); stroke: currentColor; }
:where(.ui2) .panel-head .tag.warn { color: var(--c-warn); background: var(--c-warn-bg); }
:where(.ui2) .panel-head .tag.crit { color: var(--c-crit); background: var(--c-crit-bg); }
:where(.ui2) .panel-head .sel { font-family: var(--c-mono); font-size: 11.5px; padding: 5px 11px; border: 1px solid var(--c-line); border-radius: var(--c-r-sm); color: var(--c-fg-soft); display: inline-flex; align-items: center; gap: 7px; }
:where(.ui2) .panel-head .sel svg { width: 12px; height: 12px; }

/* ── trend chart ── */
:where(.ui2) .chart-toggle { margin-left: auto; display: inline-flex; border: 1px solid var(--c-line); border-radius: var(--c-r-sm); overflow: hidden; }
:where(.ui2) .chart-toggle button { padding: 5px 11px; font-family: var(--c-mono); font-size: 11px; background: var(--c-card); border: none; border-right: 1px solid var(--c-line); color: var(--c-fg-muted); cursor: pointer; }
:where(.ui2) .chart-toggle button:last-child { border-right: none; }
:where(.ui2) .chart-toggle button.on { background: var(--c-acc); color: #fff; }
:where(.ui2) .chart-wrap { padding: 20px; }
:where(.ui2) .chart-wrap svg { width: 100%; height: 280px; display: block; }
:where(.ui2) .chart-legend { display: flex; gap: 20px; padding: 0 20px 16px; font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-muted); }
:where(.ui2) .chart-legend .lg { display: inline-flex; align-items: center; gap: 7px; }
:where(.ui2) .chart-legend .lg .sw { width: 12px; height: 12px; border-radius: 3px; }
:where(.ui2) .chart-legend .lg .sw.line { height: 3px; border-radius: 2px; }

/* ── generic grid table (table.gt — denser variant of data-grid) ── */
:where(.ui2) table.gt { width: 100%; border-collapse: collapse; font-size: 13px; }
:where(.ui2) table.gt thead th { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); font-weight: 500; text-align: right; padding: 11px 18px; border-bottom: 1px solid var(--c-line); white-space: nowrap; background: var(--c-card-2); }
:where(.ui2) table.gt thead th:first-child { text-align: left; }
:where(.ui2) table.gt tbody td { padding: 13px 18px; border-bottom: 1px solid var(--c-line-soft); text-align: right; white-space: nowrap; }
:where(.ui2) table.gt tbody tr:last-child td { border-bottom: none; }
:where(.ui2) table.gt tbody tr:hover td { background: var(--c-card-2); }
:where(.ui2) table.gt .l { text-align: left; }
:where(.ui2) .gt .nm { font-weight: 500; color: var(--c-fg); }
:where(.ui2) .gt .nm small { display: block; font-family: var(--c-mono); font-size: 10.5px; color: var(--c-fg-muted); margin-top: 2px; font-weight: 400; }
:where(.ui2) .gt .num { font-family: var(--c-mono); font-variant-numeric: tabular-nums; color: var(--c-fg); }
:where(.ui2) .gt .badge-type { font-family: var(--c-mono); font-size: 10px; padding: 2px 8px; border-radius: 4px; background: var(--c-bg-soft); color: var(--c-fg-soft); }
:where(.ui2) .gt .st { font-family: var(--c-mono); font-size: 10.5px; padding: 2px 9px; border-radius: 999px; }
:where(.ui2) .gt .st.active { background: var(--c-up-bg); color: var(--c-up); }
:where(.ui2) .gt .tick { color: var(--c-acc); }
:where(.ui2) .gt .cross { color: var(--c-dn); }
:where(.ui2) .gt .ok-pill { font-family: var(--c-mono); font-size: 10.5px; color: var(--c-acc); background: var(--c-acc-soft); padding: 2px 8px; border-radius: 4px; }

/* ── inline score bar ── */
:where(.ui2) .sbar { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
:where(.ui2) .sbar .track { width: 80px; height: 5px; background: var(--c-bg-soft); border-radius: 999px; overflow: hidden; }
:where(.ui2) .sbar .fill { height: 100%; background: var(--c-acc); border-radius: 999px; }
:where(.ui2) .sbar .fill.warn { background: var(--c-warn); }
:where(.ui2) .sbar .fill.crit { background: var(--c-crit); }
:where(.ui2) .sbar .v { font-family: var(--c-mono); font-size: 12px; color: var(--c-fg-soft); min-width: 32px; }
:where(.ui2) .fillness { font-family: var(--c-mono); font-size: 10.5px; }
:where(.ui2) .fillness.good { color: var(--c-acc); }
:where(.ui2) .fillness.mid { color: var(--c-warn); }

/* ── mini stat header row ── */
:where(.ui2) .mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--c-line); border-bottom: 1px solid var(--c-line); }
:where(.ui2) .mini-stats.five { grid-template-columns: repeat(5, 1fr); }
:where(.ui2) .mini-stats .ms { background: var(--c-card); padding: 16px 20px; }
:where(.ui2) .mini-stats .ms .k { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); margin-bottom: 8px; }
:where(.ui2) .mini-stats .ms .v { font-weight: 600; font-size: 26px; letter-spacing: -.025em; line-height: 1; }
:where(.ui2) .mini-stats .ms .v.sm { font-size: 20px; }
:where(.ui2) .mini-stats .ms .v .neg { color: var(--c-fg-muted); font-size: 13px; font-family: var(--c-mono); margin-left: 6px; }
:where(.ui2) .mini-stats .ms .chg { font-family: var(--c-mono); font-size: 11px; margin-top: 4px; }
:where(.ui2) .mini-stats .ms .chg.dn { color: var(--c-dn); }
:where(.ui2) .mini-stats .ms .chg.up { color: var(--c-up); }

/* ── two-col bar lists (GA4 sources / devices) ── */
:where(.ui2) .barcols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
:where(.ui2) .barcols .bc { padding: 18px 20px; }
:where(.ui2) .barcols .bc:first-child { border-right: 1px solid var(--c-line); }
:where(.ui2) .barcols .bc h4 { font-family: var(--c-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-fg-muted); margin: 0 0 14px; }
:where(.ui2) .brow { display: grid; grid-template-columns: 120px 1fr 70px 40px; gap: 12px; align-items: center; padding: 7px 0; font-size: 12.5px; }
:where(.ui2) .brow .bn { color: var(--c-fg); font-weight: 500; }
:where(.ui2) .brow .bt { height: 6px; background: var(--c-bg-soft); border-radius: 999px; overflow: hidden; }
:where(.ui2) .brow .bt .f { height: 100%; border-radius: 999px; }
:where(.ui2) .brow .bt .f.green { background: var(--c-acc); }
:where(.ui2) .brow .bt .f.blue { background: oklch(0.6 0.13 245); }
:where(.ui2) .brow .bv { font-family: var(--c-mono); text-align: right; color: var(--c-fg); }
:where(.ui2) .brow .bc2 { font-family: var(--c-mono); text-align: right; color: var(--c-fg-muted); font-size: 11px; }

/* ── product health tiles ── */
:where(.ui2) .health-tiles { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--c-line); }
:where(.ui2) .health-tiles .ht { background: var(--c-card); padding: 16px 14px; text-align: left; }
:where(.ui2) .health-tiles .ht .ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; margin-bottom: 10px; }
:where(.ui2) .health-tiles .ht .ic svg { width: 13px; height: 13px; }
:where(.ui2) .health-tiles .ht .v { font-weight: 600; font-size: 26px; letter-spacing: -.03em; line-height: 1; }
:where(.ui2) .health-tiles .ht .k { font-family: var(--c-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-fg-muted); margin-top: 6px; line-height: 1.3; }
:where(.ui2) .ic.win { background: var(--c-acc-soft); color: var(--c-acc); }
:where(.ui2) .ic.watch { background: var(--c-bg-soft); color: var(--c-fg-muted); }
:where(.ui2) .ic.weak, :where(.ui2) .ic.soft { background: var(--c-warn-bg); color: var(--c-warn); }
:where(.ui2) .ic.hard { background: var(--c-crit-bg); color: var(--c-crit); }
:where(.ui2) .ic.nodata { background: var(--c-bg-soft); color: var(--c-fg-muted); }
:where(.ui2) .ic.topsel { background: var(--c-acc-soft); color: var(--c-acc); }

/* ── winners list ── */
:where(.ui2) .win-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--c-line-soft); }
:where(.ui2) .win-row:last-child { border-bottom: none; }
:where(.ui2) .win-row .id { font-family: var(--c-mono); font-size: 13px; color: var(--c-fg); }
:where(.ui2) .win-row .tags { display: flex; gap: 6px; }
:where(.ui2) .win-row .t { font-family: var(--c-mono); font-size: 10px; padding: 2px 8px; border-radius: 4px; }
:where(.ui2) .win-row .t.win { background: var(--c-acc-soft); color: var(--c-acc); }
:where(.ui2) .win-row .t.top { background: oklch(0.93 0.05 280); color: oklch(0.5 0.16 280); }
:where(.ui2) .win-row .roas { font-family: var(--c-mono); font-size: 12.5px; color: var(--c-fg-soft); text-align: right; }
:where(.ui2) .win-row .roas b { color: var(--c-fg); }
:where(.ui2) .empty-pad { padding: 48px 20px; text-align: center; font-size: 13.5px; color: var(--c-fg-muted); }

/* ── QA quality strip + findings (project-dashboard QA tab) ── */
:where(.ui2) .q-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--c-line); border-bottom: 1px solid var(--c-line); }
:where(.ui2) .q-strip .q { background: var(--c-card); padding: 18px 22px; }
:where(.ui2) .q-strip .q .v { font-weight: 600; font-size: 30px; letter-spacing: -.03em; line-height: 1; }
:where(.ui2) .q-strip .q .v.crit { color: var(--c-crit); }
:where(.ui2) .q-strip .q .v.warn { color: var(--c-warn); }
:where(.ui2) .q-strip .q .v.info { color: oklch(0.55 0.13 245); }
:where(.ui2) .q-strip .q .k { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); margin-top: 6px; }
:where(.ui2) .q-tabs { display: flex; gap: 8px; padding: 14px 20px 0; }
:where(.ui2) .q-tabs .qt { font-family: var(--c-mono); font-size: 12px; padding: 6px 12px; border-radius: var(--c-r-sm); color: var(--c-fg-muted); cursor: pointer; }
:where(.ui2) .q-tabs .qt.on { background: var(--c-fg); color: var(--c-card); }
:where(.ui2) .q-finding { padding: 14px 20px 18px; }
:where(.ui2) .q-finding .qf-head { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--c-fg); margin-bottom: 6px; }
:where(.ui2) .q-finding .qf-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-warn); }
:where(.ui2) .q-finding .qf-head .pill { font-family: var(--c-mono); font-size: 10px; padding: 2px 8px; border-radius: 4px; background: var(--c-warn-bg); color: var(--c-warn); }
:where(.ui2) .q-finding p { font-size: 12.5px; color: var(--c-fg-soft); line-height: 1.55; margin: 0 0 12px; }
:where(.ui2) .q-finding .qf-actions { display: flex; gap: 8px; }
:where(.ui2) .q-finding .qf-actions button { font-family: var(--c-mono); font-size: 11px; padding: 5px 11px; border: 1px solid var(--c-line); border-radius: var(--c-r-sm); background: var(--c-card); color: var(--c-fg-soft); cursor: pointer; }
:where(.ui2) .q-finding .qf-actions button.acc { border-color: var(--c-acc); color: var(--c-acc); }

/* ── bottom 3-up summary cards ── */
:where(.ui2) .bottom-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
:where(.ui2) .b-card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-lg); padding: 18px 20px; }
:where(.ui2) .b-card .bc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
:where(.ui2) .b-card .bc-head h3 { font-family: var(--c-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-soft); margin: 0; }
:where(.ui2) .b-card .bc-head .link { margin-left: auto; font-family: var(--c-mono); font-size: 11px; color: var(--c-acc-deep); }
:where(.ui2) .b-card .mc-row { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--c-line-soft); font-size: 13px; }
:where(.ui2) .b-card .mc-row:last-child { border-bottom: none; }
:where(.ui2) .b-card .mc-row .mk { color: var(--c-fg-soft); }
:where(.ui2) .b-card .mc-row .mv { margin-left: auto; font-family: var(--c-mono); font-weight: 500; }
:where(.ui2) .b-card .mc-row .mv.crit { color: var(--c-crit); }
:where(.ui2) .b-card .mc-row .mv.warn { color: var(--c-warn); }
:where(.ui2) .b-card .alert-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--c-line-soft); }
:where(.ui2) .b-card .alert-row:last-child { border-bottom: none; }
:where(.ui2) .b-card .alert-row .dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
:where(.ui2) .b-card .alert-row .dot.crit { background: var(--c-crit); }
:where(.ui2) .b-card .alert-row .at { font-size: 13px; color: var(--c-fg); }
:where(.ui2) .b-card .alert-row .am { font-family: var(--c-mono); font-size: 10.5px; color: var(--c-fg-muted); margin-top: 2px; }
:where(.ui2) .b-card .alert-row .pill-crit { margin-left: auto; font-family: var(--c-mono); font-size: 9.5px; padding: 2px 7px; border-radius: 4px; background: var(--c-crit-bg); color: var(--c-crit); }

/* ── responsive: collapse the new multi-col grids on small screens ── */
@media (max-width: 1100px) {
  :where(.ui2) .kpi-row { grid-template-columns: repeat(2, 1fr); }
  :where(.ui2) .bottom-3 { grid-template-columns: 1fr; }
  :where(.ui2) .health-tiles { grid-template-columns: repeat(4, 1fr); }
  :where(.ui2) .mini-stats.five { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  :where(.ui2) .form-grid,
  :where(.ui2) .pf-grid,
  :where(.ui2) .pf-facts,
  :where(.ui2) .pay-summary,
  :where(.ui2) .barcols { grid-template-columns: 1fr; }
  :where(.ui2) .barcols .bc:first-child { border-right: none; border-bottom: 1px solid var(--c-line); }
  :where(.ui2) .kpi-row { grid-template-columns: 1fr; }
  :where(.ui2) .health-tiles, :where(.ui2) .q-strip, :where(.ui2) .mini-stats, :where(.ui2) .mini-stats.five { grid-template-columns: repeat(2, 1fr); }
  :where(.ui2) .hist-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ════════════════════════════════════════════════════════════════════
   CLIENT CABINET — portal shell + components, ported from the owner's
   client-cabinet mock. Scoped `:where(.cab)` (the client portal opts in on
   its root wrapper). Reuses --c-* tokens; dark sidebar uses --c-side*.
   Separate from `.ui2` (agency OS) on purpose — the portal is its own shell.
   ════════════════════════════════════════════════════════════════════ */
:where(.cab) { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; color: var(--c-fg); font-family: var(--c-sans); font-size: 14px; line-height: 1.45; background: var(--c-bg); }
:where(.cab) a { color: inherit; text-decoration: none; }

/* ── sidebar ── */
:where(.cab) .side { background: var(--c-side); color: var(--c-side-fg); display: flex; flex-direction: column; padding: 18px 14px 14px; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--c-side-line); overflow-y: auto; scrollbar-width: none; }
:where(.cab) .side::-webkit-scrollbar { display: none; }
:where(.cab) .side .logo { display: flex; align-items: center; gap: 9px; padding: 4px 8px 18px; font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: #fff; }
:where(.cab) .side .logo .slash { color: var(--c-lime); }
:where(.cab) .cside-group { font-family: var(--c-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--c-side-dim); padding: 16px 10px 8px; }
:where(.cab) .proj-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--c-r-sm); color: var(--c-side-muted); font-size: 13px; font-weight: 500; position: relative; }
:where(.cab) .proj-link:hover { background: var(--c-side-2); color: var(--c-side-fg); }
:where(.cab) .proj-link.active { background: var(--c-side-2); color: #fff; }
:where(.cab) .proj-link.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; background: var(--c-lime); border-radius: 0 2px 2px 0; }
:where(.cab) .proj-link .pic { width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; display: grid; place-items: center; font-family: var(--c-mono); font-size: 10px; font-weight: 700; }
:where(.cab) .proj-link .pic.g { background: oklch(0.3 0.04 145); color: oklch(0.8 0.13 150); }
:where(.cab) .proj-link .pic.m { background: oklch(0.3 0.05 255); color: oklch(0.78 0.12 250); }
:where(.cab) .proj-link .pic.geo { background: oklch(0.32 0.06 300); color: oklch(0.8 0.12 300); }
:where(.cab) .proj-link .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cab) .proj-link.summary .pic { background: var(--c-side-2); color: var(--c-side-muted); }
:where(.cab) .svc-link { display: flex; gap: 11px; padding: 9px 10px; border-radius: var(--c-r-sm); color: var(--c-side-muted); position: relative; }
:where(.cab) .svc-link:hover { background: var(--c-side-2); }
:where(.cab) .svc-link .sic { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; opacity: .8; margin-top: 1px; }
:where(.cab) .svc-link .sbody { min-width: 0; }
:where(.cab) .svc-link .sname { font-size: 13px; font-weight: 500; color: var(--c-side-fg); display: flex; align-items: center; gap: 6px; }
:where(.cab) .svc-link .sname .ext { width: 11px; height: 11px; opacity: .5; }
:where(.cab) .svc-link .sdesc { font-size: 10.5px; color: var(--c-side-dim); line-height: 1.35; margin-top: 2px; }
:where(.cab) .svc-link .lic { width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0; display: grid; place-items: center; font-family: var(--c-mono); font-size: 10px; font-weight: 700; background: var(--c-side-2); margin-top: 1px; }
:where(.cab) .svc-link .lic.c { color: oklch(0.8 0.13 150); }
:where(.cab) .svc-link .lic.p { color: var(--c-lime); }
:where(.cab) .svc-link .lic.u { color: oklch(0.78 0.12 250); }
:where(.cab) .svc-link .pen { margin-left: auto; width: 13px; height: 13px; opacity: .4; stroke: currentColor; align-self: center; }

/* ── main + topbar + tabs ── */
:where(.cab) .main { min-width: 0; display: flex; flex-direction: column; }
:where(.cab) .ctopbar { position: sticky; top: 0; z-index: 20; background: color-mix(in oklab, var(--c-bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--c-line); height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 32px; }
:where(.cab) .ctopbar .crumb-l { font-size: 14px; color: var(--c-fg-muted); }
:where(.cab) .ctopbar .crumb-l b { color: var(--c-fg); font-weight: 600; }
:where(.cab) .ctopbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
:where(.cab) .pill-info { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border: 1px solid var(--c-line); border-radius: var(--c-r-sm); background: var(--c-card); font-size: 12.5px; color: var(--c-fg-soft); }
:where(.cab) .pill-info svg { width: 13px; height: 13px; color: var(--c-fg-muted); }
:where(.cab) .pill-info b { color: var(--c-fg); font-weight: 600; }
:where(.cab) .pill-info.link { color: var(--c-acc-deep); font-family: var(--c-mono); font-size: 12px; }
:where(.cab) .av-cli { width: 36px; height: 36px; border-radius: 999px; background: var(--c-lime); display: grid; place-items: center; font-family: var(--c-mono); font-size: 12px; font-weight: 700; color: oklch(0.3 0.08 122); }
:where(.cab) .ctabs-bar { display: flex; align-items: center; gap: 16px; padding: 18px 32px 0; flex-wrap: wrap; }
:where(.cab) .ctabs { display: inline-flex; gap: 4px; padding: 5px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 11px; flex-wrap: wrap; }
:where(.cab) .ctabs a { padding: 9px 16px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--c-fg-muted); white-space: nowrap; cursor: pointer; }
:where(.cab) .ctabs a:hover { color: var(--c-fg); background: var(--c-bg-soft); }
:where(.cab) .ctabs a.active { background: var(--c-lime); color: oklch(0.3 0.08 122); font-weight: 600; }
:where(.cab) .crange { margin-left: auto; display: inline-flex; gap: 4px; padding: 5px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 11px; }
:where(.cab) .crange button { padding: 8px 14px; border-radius: 7px; font-family: var(--c-mono); font-size: 12.5px; font-weight: 500; background: transparent; border: none; color: var(--c-fg-muted); cursor: pointer; }
:where(.cab) .crange button.on { background: var(--c-lime); color: oklch(0.3 0.08 122); font-weight: 600; }
:where(.cab) .content { padding: 24px 32px 56px; display: flex; flex-direction: column; gap: 18px; }
:where(.cab) .cnote { font-size: 12.5px; color: var(--c-fg-muted); padding: 4px 0 2px; }
:where(.cab) .conv-filter { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border: 1px solid var(--c-line); border-radius: var(--c-r-sm); background: var(--c-card); font-size: 13px; color: var(--c-fg-soft); width: max-content; cursor: pointer; }
:where(.cab) .conv-filter svg { width: 13px; height: 13px; color: var(--c-fg-muted); }
:where(.cab) .cfooter { text-align: center; font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-dim); padding: 24px 0 8px; letter-spacing: .04em; }

/* ── KPI section groups (cabinet dashboard) ── */
:where(.cab) .kpi-section { display: flex; flex-direction: column; gap: 12px; }
:where(.cab) .ksec-label { font-family: var(--c-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-fg-soft); display: flex; align-items: center; gap: 9px; }
:where(.cab) .ksec-label svg { width: 14px; height: 14px; color: var(--c-acc); stroke: currentColor; }
:where(.cab) .kgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
:where(.cab) .kc { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 18px 20px; }
:where(.cab) .kc.hl { background: linear-gradient(180deg, color-mix(in oklab, var(--c-acc) 5%, var(--c-card)), var(--c-card)); border-color: color-mix(in oklab, var(--c-acc) 22%, var(--c-line)); }
:where(.cab) .kc .k { font-family: var(--c-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); margin-bottom: 12px; }
:where(.cab) .kc .v { font-family: var(--c-sans); font-weight: 600; font-size: 30px; letter-spacing: -.035em; line-height: 1; }
:where(.cab) .kc .d { font-family: var(--c-mono); font-size: 12px; font-weight: 500; margin-top: 10px; }
:where(.cab) .kc .d.up { color: var(--c-up); }
:where(.cab) .kc .d.dn { color: var(--c-dn); }

/* ── cabinet panel / chart / mini-stats / barcols / table / day-toggle ── */
:where(.cab) .panel { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-lg); overflow: hidden; }
:where(.cab) .panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--c-line); flex-wrap: wrap; }
:where(.cab) .panel-head h2 { font-family: var(--c-mono); font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-soft); margin: 0; display: flex; align-items: center; gap: 9px; }
:where(.cab) .panel-head h2 .ph-ic { width: 15px; height: 15px; color: var(--c-acc); stroke: currentColor; }
:where(.cab) .panel-head .tag { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: oklch(0.5 0.13 245); background: oklch(0.93 0.04 245); padding: 3px 8px; border-radius: 4px; }
:where(.cab) .panel-head .meta { margin-left: auto; font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-muted); }
:where(.cab) .panel-head .meta b { color: var(--c-acc); }
/* padded content area for panels whose children aren't self-padded (e.g. summary PPC) */
:where(.cab) .panel-body { padding: 18px 20px; }
:where(.cab) .chart-toggle { margin-left: auto; display: inline-flex; border: 1px solid var(--c-line); border-radius: var(--c-r-sm); overflow: hidden; }
:where(.cab) .chart-toggle button { padding: 6px 12px; font-family: var(--c-mono); font-size: 11px; background: var(--c-card); border: none; border-right: 1px solid var(--c-line); color: var(--c-fg-muted); cursor: pointer; }
:where(.cab) .chart-toggle button:last-child { border-right: none; }
:where(.cab) .chart-toggle button.on { background: var(--c-acc); color: #fff; }
:where(.cab) .chart-wrap { padding: 18px 20px; }
:where(.cab) .chart-wrap svg, :where(.cab) .chart-wrap canvas { width: 100%; height: 300px; display: block; }
:where(.cab) .mini-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--c-line); border-bottom: 1px solid var(--c-line); }
:where(.cab) .mini-stats.three { grid-template-columns: repeat(3, 1fr); }
:where(.cab) .mini-stats .ms { background: var(--c-card); padding: 16px 20px; }
:where(.cab) .mini-stats .ms .k { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); margin-bottom: 8px; }
:where(.cab) .mini-stats .ms .v { font-family: var(--c-sans); font-weight: 600; font-size: 24px; letter-spacing: -.025em; line-height: 1; }
:where(.cab) .barcols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; }
:where(.cab) .barcols .bc { padding: 18px 20px; }
:where(.cab) .barcols .bc:first-child { border-right: 1px solid var(--c-line); }
:where(.cab) .barcols .bc h4 { font-family: var(--c-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-fg-muted); margin: 0 0 14px; }
:where(.cab) .brow { display: grid; grid-template-columns: 150px 1fr 60px 36px; gap: 12px; align-items: center; padding: 7px 0; font-size: 12.5px; }
:where(.cab) .brow.dev { grid-template-columns: 90px 1fr 60px 40px; }
:where(.cab) .brow .bn { color: var(--c-fg); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cab) .brow .bt { height: 7px; background: var(--c-bg-soft); border-radius: 999px; overflow: hidden; }
:where(.cab) .brow .bt .f { display: block; height: 100%; border-radius: 999px; }
:where(.cab) .brow .bt .f.green { background: var(--c-acc); }
:where(.cab) .brow .bt .f.blue { background: oklch(0.6 0.13 245); }
:where(.cab) .brow .bv { font-family: var(--c-mono); text-align: right; color: var(--c-fg); }
:where(.cab) .brow .bc2 { font-family: var(--c-mono); text-align: right; color: var(--c-fg-muted); font-size: 11px; }
:where(.cab) table.gt { width: 100%; border-collapse: collapse; font-size: 13px; }
:where(.cab) table.gt thead th { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); font-weight: 500; text-align: right; padding: 11px 18px; border-bottom: 1px solid var(--c-line); white-space: nowrap; background: var(--c-card-2); }
:where(.cab) table.gt thead th:first-child { text-align: left; }
:where(.cab) table.gt tbody td { padding: 13px 18px; border-bottom: 1px solid var(--c-line-soft); text-align: right; white-space: nowrap; }
:where(.cab) table.gt tbody tr:last-child td { border-bottom: none; }
:where(.cab) table.gt tbody tr:hover td { background: var(--c-card-2); }
:where(.cab) table.gt .l { text-align: left; }
:where(.cab) .gt .nm { font-weight: 500; color: var(--c-fg); }
:where(.cab) .gt .num { font-family: var(--c-mono); font-variant-numeric: tabular-nums; color: var(--c-fg); }
:where(.cab) .gt .badge-type { font-family: var(--c-mono); font-size: 10px; padding: 2px 8px; border-radius: 4px; background: var(--c-bg-soft); color: var(--c-fg-soft); }
:where(.cab) .gt .st.active { font-family: var(--c-mono); font-size: 10.5px; padding: 2px 9px; border-radius: 999px; background: var(--c-up-bg); color: var(--c-up); }
:where(.cab) .gt .prod-nm { max-width: 460px; white-space: normal; line-height: 1.4; }
:where(.cab) .gt .pid { font-family: var(--c-mono); font-size: 12px; color: var(--c-fg-muted); }
:where(.cab) .gt .drr { color: var(--c-up); }
:where(.cab) .sbar { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
:where(.cab) .sbar .track { width: 70px; height: 6px; background: var(--c-bg-soft); border-radius: 999px; overflow: hidden; }
:where(.cab) .sbar .fill { display: block; height: 100%; border-radius: 999px; }
:where(.cab) .sbar .v { font-family: var(--c-mono); font-size: 12px; color: var(--c-fg-soft); min-width: 36px; }
:where(.cab) .day-toggle { display: flex; align-items: center; gap: 12px; padding: 18px 22px; font-family: var(--c-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-soft); cursor: pointer; }
:where(.cab) .day-toggle .ph-ic { width: 15px; height: 15px; color: var(--c-acc); stroke: currentColor; }
:where(.cab) .day-toggle svg.chev { margin-left: auto; width: 16px; height: 16px; color: var(--c-fg-muted); stroke: currentColor; }
:where(.cab) .up { color: var(--c-up); }
:where(.cab) .dn { color: var(--c-dn); }

/* share-bar — store revenue-share progress strip (shop / analytics tab) */
:where(.cab) .mini-stats.k4 { grid-template-columns: repeat(4, 1fr); }
:where(.cab) .share-bar-wrap { padding: 16px 20px 20px; }
:where(.cab) .share-bar-head { display: flex; justify-content: space-between; font-family: var(--c-mono); font-size: 12px; color: var(--c-fg-soft); margin-bottom: 10px; }
:where(.cab) .share-bar-head b { color: var(--c-acc); font-weight: 600; }
:where(.cab) .share-bar { height: 12px; background: var(--c-bg-soft); border-radius: 999px; overflow: hidden; }
:where(.cab) .share-bar .f { display: block; height: 100%; background: var(--c-acc); border-radius: 999px; transition: width .5s ease; }
:where(.cab) .share-bar-foot { display: flex; justify-content: space-between; font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-muted); margin-top: 8px; }

/* merchant tab — Google Merchant Center (ported from cabinet-merchant mock) */
:where(.cab) .mc-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
:where(.cab) .mc-stat { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 18px 20px; }
:where(.cab) .mc-stat .v { font-family: var(--c-sans); font-weight: 600; font-size: 34px; letter-spacing: -.035em; line-height: 1; }
:where(.cab) .mc-stat .v.ok { color: var(--c-acc); }
:where(.cab) .mc-stat .v.crit { color: var(--c-crit); }
:where(.cab) .mc-stat .v.warn { color: var(--c-warn); }
:where(.cab) .mc-stat .k { font-family: var(--c-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-fg-muted); margin-top: 8px; }
:where(.cab) .mc-stat .sub { font-size: 11px; color: var(--c-fg-dim); margin-top: 4px; }

:where(.cab) .ai-block { background: linear-gradient(180deg, oklch(0.97 0.02 300), var(--c-card)); border: 1px solid oklch(0.88 0.04 300); border-radius: var(--c-r-lg); padding: 24px 26px; }
:where(.cab) .ai-block .ab-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
:where(.cab) .ai-block .ab-ic { width: 26px; height: 26px; border-radius: 7px; background: oklch(0.93 0.05 300); color: oklch(0.5 0.16 300); display: grid; place-items: center; flex-shrink: 0; }
:where(.cab) .ai-block .ab-ic svg { width: 15px; height: 15px; stroke: currentColor; }
:where(.cab) .ai-block .ab-title { font-family: var(--c-mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-soft); }
:where(.cab) .ai-block .ab-tag { font-family: var(--c-mono); font-size: 10px; padding: 3px 8px; border-radius: 4px; background: oklch(0.93 0.05 300); color: oklch(0.5 0.16 300); }
:where(.cab) .ai-block .ab-run { margin-left: auto; padding: 7px 14px; border-radius: var(--c-r-sm); background: oklch(0.55 0.16 300); color: #fff; font-family: var(--c-mono); font-size: 12px; font-weight: 600; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
:where(.cab) .ai-block .ab-run svg { width: 14px; height: 14px; stroke: currentColor; }
:where(.cab) .ai-block .ab-run:hover { background: oklch(0.48 0.16 300); }
:where(.cab) .ai-block .ab-cooldown { margin-left: auto; font-family: var(--c-mono); font-size: 10.5px; color: var(--c-fg-muted); }
:where(.cab) .ai-block h3 { font-family: var(--c-sans); font-weight: 600; font-size: 18px; letter-spacing: -.02em; margin: 0 0 12px; color: var(--c-fg); }
:where(.cab) .ai-block p { font-size: 14px; color: var(--c-fg-soft); line-height: 1.6; margin: 0 0 14px; }
:where(.cab) .ai-block .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
:where(.cab) .ai-block .chips .c { font-family: var(--c-mono); font-size: 11px; padding: 4px 10px; border-radius: 999px; background: var(--c-card); border: 1px solid var(--c-line); color: var(--c-fg-soft); }
:where(.cab) .ai-block .plan-title { font-family: var(--c-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-soft); margin: 18px 0 12px; }
:where(.cab) .ai-block .ab-empty { font-size: 13.5px; color: var(--c-fg-muted); text-align: center; padding: 10px 0; }
:where(.cab) .ai-block .ab-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 24px 0; font-size: 13px; color: var(--c-fg-soft); }
:where(.cab) .ai-block .ab-spin { width: 22px; height: 22px; border: 2px solid oklch(0.88 0.04 300); border-top-color: oklch(0.55 0.16 300); border-radius: 999px; animation: cab-spin .7s linear infinite; }

:where(.cab) .fix { border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 14px 18px; margin-bottom: 10px; background: var(--c-card); }
:where(.cab) .fix .fh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
:where(.cab) .fix .sev { font-family: var(--c-mono); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; }
:where(.cab) .fix .sev.crit { background: var(--c-crit-bg); color: var(--c-crit); }
:where(.cab) .fix .sev.warn { background: var(--c-warn-bg); color: var(--c-warn); }
:where(.cab) .fix .sev.info { background: oklch(0.95 0.04 245); color: oklch(0.5 0.13 245); }
:where(.cab) .fix .ft { font-weight: 600; font-size: 14px; color: var(--c-fg); }
:where(.cab) .fix .fc { font-size: 11px; color: var(--c-fg-muted); font-family: var(--c-mono); }
:where(.cab) .fix ol { margin: 6px 0 0; padding-left: 20px; font-size: 13px; color: var(--c-fg-soft); line-height: 1.55; }
:where(.cab) .fix ol li { margin: 4px 0; }
:where(.cab) .fix .fix-prods-toggle { margin-top: 8px; font-family: var(--c-mono); font-size: 11.5px; color: var(--c-acc-deep); background: none; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 0; }
:where(.cab) .fix .fix-prods { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--c-line-soft); display: flex; flex-direction: column; gap: 2px; }
:where(.cab) .fix .fix-prod { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 6px; border-radius: var(--c-r-sm); font-size: 12px; }
:where(.cab) .fix .fix-prod:hover { background: var(--c-bg-soft); }
:where(.cab) .fix .fix-prod .fp-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
:where(.cab) .fix .fix-prod .fp-id { font-family: var(--c-mono); color: var(--c-fg-muted); flex-shrink: 0; }
:where(.cab) .fix .fix-prod .fp-t { color: var(--c-fg-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

:where(.cab) .empty-mini { font-size: 13.5px; color: var(--c-fg-muted); padding: 6px 0; }
:where(.cab) .mc-filter { display: flex; gap: 8px; padding: 14px 20px 0; flex-wrap: wrap; }
:where(.cab) .mc-filter .mf { font-family: var(--c-mono); font-size: 12px; padding: 6px 12px; border-radius: var(--c-r-sm); color: var(--c-fg-muted); border: 1px solid var(--c-line); background: var(--c-card); cursor: pointer; }
:where(.cab) .mc-filter .mf.on { background: var(--c-fg); color: var(--c-card); border-color: var(--c-fg); }

:where(.cab) .st-rej { font-family: var(--c-mono); font-size: 10.5px; padding: 2px 9px; border-radius: 999px; background: var(--c-crit-bg); color: var(--c-crit); white-space: nowrap; }
:where(.cab) .st-lim { font-family: var(--c-mono); font-size: 10.5px; padding: 2px 9px; border-radius: 999px; background: var(--c-warn-bg); color: var(--c-warn); white-space: nowrap; }
:where(.cab) .st-pend { font-family: var(--c-mono); font-size: 10.5px; padding: 2px 9px; border-radius: 999px; background: oklch(0.95 0.04 245); color: oklch(0.5 0.13 245); white-space: nowrap; }
:where(.cab) .st-neu { font-family: var(--c-mono); font-size: 10.5px; padding: 2px 9px; border-radius: 999px; background: var(--c-bg-soft); color: var(--c-fg-soft); white-space: nowrap; }
:where(.cab) .impact-pill { font-family: var(--c-mono); font-size: 10.5px; padding: 2px 9px; border-radius: 4px; white-space: nowrap; }
:where(.cab) .impact-pill.crit { background: var(--c-crit-bg); color: var(--c-crit); }
:where(.cab) .impact-pill.warn { background: var(--c-warn-bg); color: var(--c-warn); }
:where(.cab) .impact-pill.info { background: oklch(0.95 0.04 245); color: oklch(0.5 0.13 245); }
:where(.cab) .impact-pill.neu { background: var(--c-bg-soft); color: var(--c-fg-muted); }
:where(.cab) .gmc-link { font-family: var(--c-mono); font-size: 11px; color: var(--c-acc-deep); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
:where(.cab) .gmc-link:hover { color: var(--c-acc); }
:where(.cab) .gmc-link svg { width: 11px; height: 11px; stroke: currentColor; }
:where(.cab) .pcell { font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-muted); }
:where(.cab) .prod-name { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* sortable header chevron + expandable row caret for merchant items */
:where(.cab) table.gt th.sortable { cursor: pointer; user-select: none; }
:where(.cab) table.gt th.sortable:hover { color: var(--c-fg-soft); }
:where(.cab) table.gt th .sort-ic { color: var(--c-fg-dim); margin-left: 4px; }
:where(.cab) table.gt th .sort-ic.on { color: var(--c-acc); }
:where(.cab) .gt .row-toggle { cursor: pointer; }
:where(.cab) .gt .caret { display: inline-block; width: 10px; color: var(--c-fg-dim); margin-right: 6px; }
:where(.cab) .gt .row-toggle:hover .caret { color: var(--c-acc); }
:where(.cab) .gt .detail-cell { background: var(--c-bg-soft); padding: 0; }
:where(.cab) .mc-detail { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
:where(.cab) .mc-detail .md-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
:where(.cab) .mc-detail .md-title { font-weight: 600; font-size: 14px; color: var(--c-fg); }
:where(.cab) .mc-detail .md-sub { font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-muted); margin-top: 2px; }
:where(.cab) .mc-detail .md-box { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 12px 14px; }
:where(.cab) .mc-detail .md-box-title { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); margin-bottom: 8px; }
:where(.cab) .mc-detail .md-issue { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--c-line-soft); }
:where(.cab) .mc-detail .md-issue:last-child { border-bottom: none; }
:where(.cab) .mc-detail .md-issue .it { font-weight: 500; font-size: 13px; color: var(--c-fg); }
:where(.cab) .mc-detail .md-issue .ic-code { font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-muted); margin-left: 6px; }
:where(.cab) .mc-detail .md-issue .id { font-size: 12.5px; color: var(--c-fg-soft); margin-top: 2px; line-height: 1.5; }
:where(.cab) .mc-detail .md-issue .id.muted { font-style: italic; color: var(--c-fg-dim); }
:where(.cab) .mc-acct-issue { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--c-line-soft); }
:where(.cab) .mc-acct-issue:last-child { border-bottom: none; }
:where(.cab) .mc-acct-issue .ai-t { font-weight: 500; font-size: 13px; color: var(--c-fg); }
:where(.cab) .mc-acct-issue .ai-d { font-size: 12px; color: var(--c-fg-muted); margin-top: 2px; }
:where(.cab) .mc-acct-issue .ai-date { margin-left: auto; font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-dim); white-space: nowrap; }

:where(.cab) .mc-loading { padding: 48px 0; text-align: center; }
:where(.cab) .mc-loading .ld-spin { width: 24px; height: 24px; border: 2px solid var(--c-line); border-top-color: var(--c-acc); border-radius: 999px; margin: 0 auto 10px; animation: cab-spin .7s linear infinite; }
:where(.cab) .mc-loading p { font-size: 12px; color: var(--c-fg-dim); }
:where(.cab) .mc-empty { text-align: center; padding: 48px 0; }
:where(.cab) .mc-empty .ic { width: 56px; height: 56px; border-radius: 999px; background: var(--c-bg-soft); display: grid; place-items: center; margin: 0 auto 16px; color: var(--c-fg-dim); }
:where(.cab) .mc-empty .ic svg { width: 28px; height: 28px; stroke: currentColor; }
:where(.cab) .mc-empty p { font-size: 14px; color: var(--c-fg-muted); }
:where(.cab) .mc-unavailable { background: var(--c-warn-bg); border: 1px solid color-mix(in oklab, var(--c-warn) 35%, var(--c-line)); border-radius: var(--c-r-md); padding: 14px 18px; font-size: 13px; color: var(--c-warn); }
:where(.cab) .mc-pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--c-line); gap: 12px; flex-wrap: wrap; }
:where(.cab) .mc-pagination .pg-info { font-family: var(--c-mono); font-size: 12px; color: var(--c-fg-muted); }
:where(.cab) .mc-pagination .pg-btns { display: flex; gap: 8px; }
:where(.cab) .mc-pagination .pg-btn { padding: 6px 12px; font-family: var(--c-mono); font-size: 12px; border-radius: var(--c-r-sm); border: 1px solid var(--c-line); background: var(--c-card); color: var(--c-fg-soft); cursor: pointer; }
:where(.cab) .mc-pagination .pg-btn:hover:not(:disabled) { background: var(--c-bg-soft); }
:where(.cab) .mc-pagination .pg-btn:disabled { opacity: .4; cursor: default; }

/* ── search console (organic) — additive, mock cabinet-search-console.html ── */
:where(.cab) .sc-note { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: oklch(0.96 0.02 245); border: 1px solid oklch(0.9 0.03 245); border-radius: var(--c-r-md); font-size: 13px; color: oklch(0.42 0.06 245); }
:where(.cab) .sc-note svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; }
/* one-line data-source caption under a panel heading (panel has no own padding) */
:where(.cab) .src-cap { margin: 0; padding: 12px 20px 14px; font-size: 12px; line-height: 1.45; color: var(--c-fg-muted); }
:where(.cab) .src-cap b { color: var(--c-fg-soft); font-weight: 600; }
:where(.cab) .sc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
:where(.cab) .sc-stat { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 18px 20px; }
:where(.cab) .sc-stat .k { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); margin-bottom: 10px; }
:where(.cab) .sc-stat .v { font-family: var(--c-sans); font-weight: 600; font-size: 32px; letter-spacing: -.035em; line-height: 1; }
:where(.cab) .sc-dev { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--c-line); border-bottom: 1px solid var(--c-line); }
:where(.cab) .sc-dev .d { background: var(--c-card); padding: 18px 22px; }
:where(.cab) .sc-dev .d .dvn { font-weight: 600; font-size: 15px; margin-bottom: 14px; }
:where(.cab) .sc-dev .d .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
:where(.cab) .sc-dev .d .cell .k { font-family: var(--c-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-fg-muted); margin-bottom: 4px; }
:where(.cab) .sc-dev .d .cell .vv { font-family: var(--c-sans); font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
:where(.cab) .sc-dev .d .cell .vv.warn { color: var(--c-warn); }
:where(.cab) .keypage { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--c-line-soft); }
:where(.cab) .keypage:last-child { border-bottom: none; }
:where(.cab) .keypage .kp { min-width: 0; }
:where(.cab) .keypage .kp .u { font-family: var(--c-mono); font-size: 12.5px; color: var(--c-acc-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cab) .keypage .kp .u a { color: var(--c-acc-deep); }
:where(.cab) .keypage .kp .u a:hover { text-decoration: underline; }
:where(.cab) .keypage .kp .s { font-family: var(--c-mono); font-size: 10.5px; color: var(--c-fg-dim); margin-top: 2px; }
:where(.cab) .keypage .ind { margin-left: auto; font-family: var(--c-mono); font-size: 11px; font-weight: 600; padding: 3px 11px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
:where(.cab) .keypage .ind.ok { background: var(--c-up-bg); color: var(--c-up); }
:where(.cab) .keypage .ind.neu { background: var(--c-bg-soft); color: var(--c-fg-muted); }
:where(.cab) .keypage .ind.err { background: var(--c-crit-bg); color: var(--c-crit); }
:where(.cab) .keypage .ind.warn { background: var(--c-warn-bg); color: var(--c-warn); }
:where(.cab) .show-more { text-align: center; padding: 14px; border-top: 1px solid var(--c-line); font-family: var(--c-mono); font-size: 12.5px; color: var(--c-acc-deep); cursor: pointer; background: none; width: 100%; border-left: none; border-right: none; border-bottom: none; }
:where(.cab) .show-more:hover { background: var(--c-bg-soft); }
:where(.cab) .sitemap-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--c-line-soft); }
:where(.cab) .sitemap-row:last-child { border-bottom: none; }
:where(.cab) .sitemap-row .u { font-family: var(--c-mono); font-size: 13px; color: var(--c-acc-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
:where(.cab) .sitemap-row .sm-sub { font-family: var(--c-mono); font-size: 10.5px; color: var(--c-fg-dim); margin-top: 2px; }
:where(.cab) .sitemap-row .st { margin-left: auto; font-family: var(--c-mono); font-size: 12px; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; flex-shrink: 0; }
:where(.cab) .sitemap-row .st .ok { color: var(--c-up); }
:where(.cab) .sitemap-row .st .err { color: var(--c-crit); }
:where(.cab) .sitemap-row .st .warn { color: var(--c-warn); }
:where(.cab) .gt .qlink { color: var(--c-acc-deep); }
:where(.cab) .gt .qlink a { color: var(--c-acc-deep); }
:where(.cab) .gt .qlink a:hover { text-decoration: underline; }
:where(.cab) .sc-empty { font-size: 13px; color: var(--c-fg-muted); text-align: center; padding: 18px 0; }
:where(.cab) .sc-findings { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; }

/* ── PageSpeed / «Швидкість сайту» tab ── */
:where(.cab) .spd-stack { display: flex; flex-direction: column; gap: 18px; }
:where(.cab) .spd-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
:where(.cab) .spd-head-row .cnote { flex: 1 1 320px; min-width: 0; }
:where(.cab) .spd-head-row .c-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; }

/* generic pill (warn/ok/alert) for cab — mirrors :where(.ui2) .pill */
:where(.cab) .pill { display: inline-block; font-family: var(--c-mono); font-size: 10px; font-weight: 600; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; background: var(--c-bg-soft); color: var(--c-fg-soft); }
:where(.cab) .pill.ok { background: var(--c-acc-soft); color: var(--c-acc-deep); }
:where(.cab) .pill.warn { background: var(--c-warn-bg); color: var(--c-warn); }
:where(.cab) .pill.alert { background: var(--c-crit-bg); color: var(--c-crit); }

/* empty state */
:where(.cab) .spd-empty { padding: 36px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
:where(.cab) .spd-empty-ic { width: 48px; height: 48px; border-radius: var(--c-r-md); background: var(--c-acc-soft); display: grid; place-items: center; margin-bottom: 6px; }
:where(.cab) .spd-empty-ic svg { width: 24px; height: 24px; color: var(--c-acc-deep); }
:where(.cab) .spd-empty-t { font-size: 14px; font-weight: 600; color: var(--c-fg); }
:where(.cab) .spd-empty-d { font-size: 12.5px; color: var(--c-fg-muted); margin-bottom: 6px; }
:where(.cab) .spd-empty .c-btn { display: inline-flex; align-items: center; gap: 7px; }
:where(.cab) .spd-msg { font-family: var(--c-mono); font-size: 11.5px; color: var(--c-acc-deep); margin-top: 4px; }
:where(.cab) .spd-msg.ok { color: var(--c-acc-deep); }
:where(.cab) .spd-msg.warn { color: var(--c-warn); }
:where(.cab) .spd-msg.crit { color: var(--c-crit); }

/* Lighthouse score gauges */
:where(.cab) .gauge-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
:where(.cab) .gauge { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 20px; display: flex; align-items: center; gap: 16px; }
:where(.cab) .gauge-ring-slot { display: inline-grid; place-items: center; flex-shrink: 0; }
:where(.cab) .gauge .ring { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; position: relative; flex-shrink: 0; }
:where(.cab) .gauge .ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--c-card); }
:where(.cab) .gauge .ring .rv { position: relative; font-family: var(--c-sans); font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
:where(.cab) .gauge .gm .k { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); margin-bottom: 4px; }
:where(.cab) .gauge .gm .s { font-size: 13px; color: var(--c-fg-soft); }

/* Core Web Vitals grid */
:where(.cab) .cwv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--c-line); border-bottom: 1px solid var(--c-line); }
:where(.cab) .cwv { background: var(--c-card); padding: 22px 24px; }
:where(.cab) .cwv .lab { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); margin-bottom: 12px; }
:where(.cab) .cwv .val { font-family: var(--c-sans); font-weight: 600; font-size: 34px; letter-spacing: -.035em; line-height: 1; color: var(--c-fg); }
:where(.cab) .cwv .val.good { color: var(--c-acc); }
:where(.cab) .cwv .val.warn { color: var(--c-warn); }
:where(.cab) .cwv .val.bad { color: var(--c-crit); }
:where(.cab) .cwv .note { font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-muted); margin-top: 10px; }

/* pages table */
:where(.cab) .spd-table-wrap { overflow-x: auto; }
:where(.cab) .gt .spd-url { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* recommendation cards */
:where(.cab) .spd-recs { display: flex; flex-direction: column; gap: 12px; }
:where(.cab) .rec-card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 16px 18px; }
:where(.cab) .rec-card .rc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
:where(.cab) .rec-card .rc-title { font-size: 14px; font-weight: 600; color: var(--c-fg); margin: 0; }
:where(.cab) .rec-card .rc-tags { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
:where(.cab) .rec-card .rc-tag { font-family: var(--c-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
:where(.cab) .rec-card .rc-tag.crit { background: var(--c-crit-bg); color: var(--c-crit); }
:where(.cab) .rec-card .rc-tag.warn { background: var(--c-warn-bg); color: var(--c-warn); }
:where(.cab) .rec-card .rc-tag.muted { background: var(--c-bg-soft); color: var(--c-fg-muted); }
:where(.cab) .rec-card .rc-tag.info { background: oklch(0.94 0.04 245); color: oklch(0.5 0.13 245); }
:where(.cab) .rec-card .rc-tag.acc { background: var(--c-acc-soft); color: var(--c-acc-deep); }
:where(.cab) .rec-card .rc-tag.dev { background: oklch(0.94 0.05 300); color: oklch(0.5 0.14 300); }
:where(.cab) .rec-card .rc-summary { font-size: 12.5px; color: var(--c-fg-soft); line-height: 1.55; margin: 0 0 8px; }
:where(.cab) .rec-card .rc-saving { font-family: var(--c-mono); font-size: 10.5px; color: var(--c-acc-deep); margin: 0 0 8px; }
:where(.cab) .rec-card .rc-step { display: flex; align-items: flex-start; gap: 7px; padding-top: 10px; border-top: 1px solid var(--c-line-soft); }
:where(.cab) .rec-card .rc-step svg { color: var(--c-acc); flex-shrink: 0; margin-top: 1px; }
:where(.cab) .rec-card .rc-step p { font-size: 12px; color: var(--c-fg); margin: 0; line-height: 1.5; }
:where(.cab) .rec-card .rc-note { font-size: 10.5px; color: var(--c-fg-dim); font-style: italic; margin: 6px 0 0; }

/* PSI deep link */
:where(.cab) .spd-psi-wrap { text-align: center; }
:where(.cab) .spd-psi-link { display: inline-flex; align-items: center; gap: 7px; font-family: var(--c-mono); font-size: 12px; font-weight: 600; color: var(--c-acc-deep); }
:where(.cab) .spd-psi-link:hover { color: var(--c-acc); }

@keyframes cab-spin { to { transform: rotate(360deg); } }

/* responsive: cabinet collapses sidebar + grids on small screens */
@media (max-width: 1000px) {
  :where(.cab) { grid-template-columns: 1fr; }
  :where(.cab) .side { display: none; }
  :where(.cab) .kgrid { grid-template-columns: repeat(2, 1fr); }
  :where(.cab) .barcols { grid-template-columns: 1fr; }
  :where(.cab) .barcols .bc:first-child { border-right: none; border-bottom: 1px solid var(--c-line); }
  :where(.cab) .mini-stats, :where(.cab) .mini-stats.three { grid-template-columns: repeat(2, 1fr); }
  :where(.cab) .mc-stats { grid-template-columns: repeat(2, 1fr); }
  :where(.cab) .sc-stats { grid-template-columns: repeat(2, 1fr); }
  :where(.cab) .sc-dev { grid-template-columns: 1fr; }
  :where(.cab) .gauge-row { grid-template-columns: 1fr; }
  :where(.cab) .cwv-grid { grid-template-columns: 1fr; }
}

/* ── cabinet reports tab (report cards) — additive, maps cabinet-reports mock ── */
:where(.cab) .reports-list { display: flex; flex-direction: column; gap: 18px; max-width: 1080px; }
:where(.cab) .rep-card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-lg); padding: 24px 26px; }
:where(.cab) .rep-card .rc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
:where(.cab) .rep-badge { font-family: var(--c-mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 5px 11px; border-radius: 999px; background: var(--c-bg-soft); color: var(--c-fg-soft); }
:where(.cab) .rep-badge.week { background: oklch(0.93 0.04 245); color: oklch(0.5 0.13 245); }
:where(.cab) .rep-badge.month { background: oklch(0.93 0.04 300); color: oklch(0.5 0.14 300); }
:where(.cab) .rep-card .rc-date { font-family: var(--c-mono); font-size: 12.5px; color: var(--c-fg-muted); }
:where(.cab) .rep-card .rc-sent { margin-left: auto; font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-dim); }
:where(.cab) .rep-card h3 { font-family: var(--c-sans); font-weight: 600; font-size: 19px; letter-spacing: -.02em; margin: 0 0 10px; color: var(--c-fg); }
:where(.cab) .rep-card p { font-size: 14px; color: var(--c-fg-soft); line-height: 1.6; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
:where(.cab) .rep-card .rc-actions { display: flex; align-items: center; gap: 16px; }
:where(.cab) .rep-card .open { font-family: var(--c-mono); font-size: 13px; font-weight: 600; color: var(--c-acc-deep); display: inline-flex; align-items: center; gap: 7px; background: none; border: none; padding: 0; cursor: pointer; }
:where(.cab) .rep-card .open:hover { color: var(--c-acc); }
:where(.cab) .rep-card .open svg { width: 13px; height: 13px; }
:where(.cab) .rep-card .rc-dash { font-family: var(--c-mono); font-size: 13px; color: var(--c-fg-muted); }
:where(.cab) .rep-card .rc-dash:hover { color: var(--c-fg-soft); }
:where(.cab) .rep-card .rc-expand { margin: 16px -26px -24px; padding: 18px 26px; border-top: 1px solid var(--c-line); background: var(--c-card-2); font-size: 13.5px; color: var(--c-fg-soft); line-height: 1.6; white-space: pre-line; }
:where(.cab) .reports-empty { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-lg); text-align: center; padding: 64px 24px; }
:where(.cab) .reports-empty .re-ic { width: 56px; height: 56px; border-radius: 999px; background: var(--c-bg-soft); display: grid; place-items: center; margin: 0 auto 16px; }
:where(.cab) .reports-empty .re-ic svg { width: 28px; height: 28px; color: var(--c-fg-dim); stroke: currentColor; }
:where(.cab) .reports-empty p { font-size: 13px; color: var(--c-fg-muted); margin: 0; }

/* ── cabinet behavior tab (Microsoft Clarity) — additive, no mock ── */
/* coverage banner (amber) */
:where(.cab) .beh-cov { display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: var(--c-r-md); background: var(--c-warn-bg); border: 1px solid color-mix(in oklab, var(--c-warn) 30%, var(--c-line)); }
:where(.cab) .beh-cov svg { width: 16px; height: 16px; color: var(--c-warn); flex-shrink: 0; }
:where(.cab) .beh-cov p { font-size: 12.5px; color: var(--c-warn); margin: 0; }
/* KPI value tone accents (scoped under .kc .v) */
:where(.cab) .kc .v.beh-warn { color: var(--c-warn); }
:where(.cab) .kc .v.beh-crit { color: var(--c-crit); }
:where(.cab) .kc .v.beh-info { color: oklch(0.55 0.13 245); }
:where(.cab) .beh-kgrid { grid-template-columns: repeat(3, 1fr); }
/* device comparison cards */
:where(.cab) .beh-dev-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 18px 20px; }
:where(.cab) .beh-dev-card { background: var(--c-card-2); border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 16px 18px; }
:where(.cab) .beh-dev-card .bd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
:where(.cab) .beh-dev-card .bd-name { font-size: 13.5px; font-weight: 600; color: var(--c-fg); }
:where(.cab) .beh-dev-card .bd-meta { font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-muted); }
:where(.cab) .beh-dev-card .bd-cells { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 12px; }
:where(.cab) .beh-dev-card .bd-k { font-size: 10.5px; color: var(--c-fg-muted); line-height: 1.3; margin-bottom: 4px; }
:where(.cab) .beh-dev-card .bd-v { font-family: var(--c-mono); font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 600; color: var(--c-fg); line-height: 1; }
:where(.cab) .beh-dev-card .bd-v.beh-warn { color: var(--c-warn); }
:where(.cab) .beh-dev-card .bd-v.beh-crit { color: var(--c-crit); }
:where(.cab) .beh-dev-card .bd-v.beh-info { color: oklch(0.55 0.13 245); }
/* recommendation rows */
:where(.cab) .beh-recs { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; }
:where(.cab) .beh-rec { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--c-r-md); border: 1px solid var(--c-line); background: var(--c-card-2); }
:where(.cab) .beh-rec svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
:where(.cab) .beh-rec p { font-size: 13px; color: var(--c-fg-soft); line-height: 1.5; margin: 0; }
:where(.cab) .beh-rec.warn { background: var(--c-warn-bg); border-color: color-mix(in oklab, var(--c-warn) 28%, var(--c-line)); }
:where(.cab) .beh-rec.warn svg { color: var(--c-warn); }
:where(.cab) .beh-rec.info { background: oklch(0.96 0.025 245); border-color: oklch(0.86 0.05 245); }
:where(.cab) .beh-rec.info svg { color: oklch(0.55 0.13 245); }
/* deep links */
:where(.cab) .beh-links { display: flex; flex-wrap: wrap; gap: 12px; }
:where(.cab) .beh-links .gmc-link { font-size: 12.5px; padding: 9px 14px; border: 1px solid var(--c-line); border-radius: var(--c-r-sm); background: var(--c-card); }
:where(.cab) .beh-links .gmc-link:hover { background: var(--c-bg-soft); color: var(--c-acc-deep); }
:where(.cab) .beh-links .gmc-link svg { width: 13px; height: 13px; }
:where(.cab) .beh-link-sub { color: var(--c-fg-muted); font-family: var(--c-sans); }
@media (max-width: 1000px) {
  :where(.cab) .beh-kgrid { grid-template-columns: repeat(2, 1fr); }
  :where(.cab) .beh-dev-grid { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────────────────────────────────────
   Multi-project summary view («Зведений звіт») — additive, scoped to .cab.
   Unique class prefixes (.sview / .sfam / .sum- / .b-proj) to avoid
   collisions with global cab classes. Reuses concept .panel/.kc/.kgrid/
   .mini-stats/.gt/.sbar/.share-bar/.ctabs/.crange components.
   ────────────────────────────────────────────────────────────────────── */
:where(.cab) .sview { display: flex; flex-direction: column; gap: 24px; }
:where(.cab) .sview-stack { display: flex; flex-direction: column; gap: 20px; }
:where(.cab) .sview-cards { display: flex; flex-direction: column; gap: 16px; }
:where(.cab) .sview-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
:where(.cab) .sview-head-l { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
:where(.cab) .sview-title { font-family: var(--c-sans); font-weight: 600; font-size: 22px; letter-spacing: -.02em; color: var(--c-fg); margin: 0; }
:where(.cab) .sview-head .crange { margin-left: 0; }
:where(.cab) .sview-loading { text-align: center; padding: 40px 16px; font-family: var(--c-mono); font-size: 12.5px; color: var(--c-fg-muted); }

/* panel body note + sub-labels */
:where(.cab) .sum-note { font-size: 12.5px; color: var(--c-fg-muted); margin: 0 0 14px; }
:where(.cab) .sum-note-body { padding: 0 20px; margin: 14px 0 0; }
:where(.cab) .sum-sub-label { font-family: var(--c-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-fg-soft); margin: 18px 0 12px; }
:where(.cab) .sum-chart { position: relative; height: 220px; margin-top: 18px; }
:where(.cab) .sum-chart-body { margin: 18px 20px; }
:where(.cab) .sum-acc { color: var(--c-acc); }
:where(.cab) .sum-cost { color: var(--c-dn); }
:where(.cab) .sum-na { color: var(--c-fg-dim); }
:where(.cab) .sum-dash { color: var(--c-fg-dim); }
:where(.cab) .sum-delta { font-family: var(--c-mono); font-weight: 600; }
:where(.cab) .sum-delta.up { color: var(--c-up); }
:where(.cab) .sum-delta.dn { color: var(--c-dn); }
:where(.cab) .panel-head .meta.sum-warn { color: var(--c-warn); }

/* mixed-currency 2-up kgrid */
:where(.cab) .kgrid.kg2 { grid-template-columns: repeat(2, 1fr); }

/* conversion-family selector (reuses .crange chip style) */
:where(.cab) .sfam { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
:where(.cab) .sfam-label { font-family: var(--c-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-fg-muted); }
:where(.cab) .sfam .crange { margin-left: 0; }
:where(.cab) .sfam-btn { padding: 7px 13px; border-radius: 7px; font-family: var(--c-mono); font-size: 12px; font-weight: 500; background: transparent; border: none; color: var(--c-fg-muted); cursor: pointer; }
:where(.cab) .sfam-btn.on { background: var(--c-lime); color: oklch(0.3 0.08 122); font-weight: 600; }

/* all-channels ad-contribution cards + channel rows */
:where(.cab) .sum-contrib { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px 20px 0; }
:where(.cab) .sum-contrib-v { font-family: var(--c-sans); font-weight: 600; font-size: 22px; letter-spacing: -.02em; color: var(--c-fg); }
:where(.cab) .sum-contrib-of { font-family: var(--c-mono); font-size: 12px; font-weight: 400; color: var(--c-fg-muted); }
:where(.cab) .sum-ch { display: inline-flex; align-items: center; gap: 9px; }
:where(.cab) .sum-ch-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
:where(.cab) table.gt tbody tr.sum-uplify-row td { background: var(--c-acc-soft); }
:where(.cab) table.gt tbody tr.sum-uplify-row:hover td { background: var(--c-acc-soft); }

/* per-project summary cards */
:where(.cab) .b-proj { display: block; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-lg); overflow: hidden; }
:where(.cab) a.b-proj-card { color: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
:where(.cab) a.b-proj-card:hover { border-color: color-mix(in oklab, var(--c-acc) 40%, var(--c-line)); box-shadow: 0 2px 12px -4px color-mix(in oklab, var(--c-acc) 30%, transparent); }
:where(.cab) .b-proj-head { display: flex; align-items: center; gap: 11px; padding: 16px 20px; border-bottom: 1px solid var(--c-line); background: var(--c-card-2); }
:where(.cab) .b-proj-ic { width: 30px; height: 30px; border-radius: var(--c-r-sm); background: var(--c-bg-soft); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
:where(.cab) .b-proj-ic .b-proj-img { width: 16px; height: 16px; object-fit: contain; }
:where(.cab) .b-proj-ic .b-proj-img-r { border-radius: 4px; }
:where(.cab) .b-proj-ic .b-proj-svg { width: 16px; height: 16px; color: var(--c-fg-muted); stroke: currentColor; }
:where(.cab) .b-proj-name { font-family: var(--c-sans); font-weight: 600; font-size: 15px; letter-spacing: -.01em; color: var(--c-fg); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cab) .b-proj-arrow { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--c-line); background: var(--c-card); display: inline-flex; align-items: center; justify-content: center; color: var(--c-fg-dim); flex-shrink: 0; transition: all .15s ease; }
:where(.cab) .b-proj-arrow svg { width: 14px; height: 14px; }
:where(.cab) a.b-proj-card:hover .b-proj-arrow { border-color: color-mix(in oklab, var(--c-acc) 40%, var(--c-line)); color: var(--c-acc-deep); background: var(--c-acc-soft); }
:where(.cab) .b-proj-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
:where(.cab) .b-proj-grid .kc { border: none; border-radius: 0; border-right: 1px solid var(--c-line-soft); }
:where(.cab) .b-proj-grid .kc:last-child { border-right: none; }
:where(.cab) .b-proj-empty { padding: 20px; font-size: 13px; color: var(--c-fg-muted); }
:where(.cab) .b-proj-curwarn { margin: 0 0 8px; padding: 6px 10px; border-radius: 8px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 11px; }
:where(.cab) .b-proj-dev { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px 20px; }
:where(.cab) .b-proj-dev-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--c-bg-soft); display: grid; place-items: center; margin-bottom: 12px; }
:where(.cab) .b-proj-dev-ic svg { width: 20px; height: 20px; color: var(--c-fg-dim); stroke: currentColor; }
:where(.cab) .b-proj-dev-t { font-size: 13.5px; font-weight: 500; color: var(--c-fg-soft); margin: 0; }
:where(.cab) .b-proj-dev-m { font-size: 12px; color: var(--c-fg-muted); margin: 4px 0 0; }

:where(.cab) .sum-empty { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-lg); text-align: center; padding: 48px 24px; font-size: 13px; color: var(--c-fg-muted); }

@media (max-width: 1000px) {
  :where(.cab) .b-proj-grid { grid-template-columns: repeat(2, 1fr); }
  :where(.cab) .b-proj-grid .kc:nth-child(2) { border-right: none; }
  :where(.cab) .b-proj-grid .kc:nth-child(1), :where(.cab) .b-proj-grid .kc:nth-child(2) { border-bottom: 1px solid var(--c-line-soft); }
  :where(.cab) .sum-contrib { grid-template-columns: 1fr; }
}

/* ── Meta Ads / Meta QA tabs (catalog · DPA · parity · pixel · drill-down) ── */
/* approved status pill (green) — complements .st-rej/.st-lim/.st-pend/.st-neu */
:where(.cab) .st-ok { font-family: var(--c-mono); font-size: 10.5px; padding: 2px 9px; border-radius: 999px; background: var(--c-up-bg); color: var(--c-up); white-space: nowrap; }

/* Meta QA — findings hint, severity strip lives on existing .mini-stats + .fix */
:where(.cab) .mq-fix-desc { font-size: 13px; color: var(--c-fg-soft); line-height: 1.55; margin: 6px 0 0; }
:where(.cab) .mq-fix-hint { margin-top: 12px; padding: 12px 14px; border-radius: var(--c-r-md); background: var(--c-acc-soft); border: 1px solid color-mix(in oklab, var(--c-acc) 25%, var(--c-line)); }
:where(.cab) .mq-fix-hint-k { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-acc-deep); margin: 0 0 4px; }
:where(.cab) .mq-fix-hint-v { font-size: 13px; color: var(--c-fg); line-height: 1.55; margin: 0; }

/* Catalog issue buckets header button + body */
:where(.cab) .mq-ai-btn { margin-left: auto; padding: 7px 14px; border-radius: var(--c-r-sm); background: oklch(0.55 0.16 300); color: #fff; font-family: var(--c-mono); font-size: 12px; font-weight: 600; border: none; cursor: pointer; }
:where(.cab) .mq-ai-btn:hover:not(:disabled) { background: oklch(0.48 0.16 300); }
:where(.cab) .mq-ai-btn:disabled { opacity: .6; cursor: default; }
:where(.cab) .mq-issues-body { padding: 16px 20px; }
:where(.cab) .mq-issues-list { display: flex; flex-direction: column; gap: 10px; }
:where(.cab) .mq-issues-list .fix { margin-bottom: 0; }
:where(.cab) .mq-ai-result { margin-bottom: 14px; padding: 16px 18px; border-radius: var(--c-r-md); background: oklch(0.97 0.02 300); border: 1px solid oklch(0.88 0.04 300); font-size: 13px; }
:where(.cab) .mq-ai-err { color: var(--c-crit); }
:where(.cab) .mq-ai-lead { font-weight: 600; color: oklch(0.4 0.13 300); margin: 0 0 12px; }
:where(.cab) .mq-ai-stack { display: flex; flex-direction: column; gap: 10px; }
:where(.cab) .mq-ai-grp { background: var(--c-card); border: 1px solid oklch(0.9 0.03 300); border-radius: var(--c-r-sm); padding: 12px 14px; }
:where(.cab) .mq-ai-grp-t { font-size: 13px; font-weight: 600; color: var(--c-fg); margin: 0; }
:where(.cab) .mq-ai-grp-c { font-weight: 400; color: var(--c-fg-muted); }
:where(.cab) .mq-ai-grp-d { font-size: 12.5px; color: var(--c-fg-soft); margin: 6px 0 0; line-height: 1.5; }
:where(.cab) .mq-ai-ul { margin: 8px 0 0; padding-left: 20px; font-size: 12.5px; color: var(--c-fg-soft); line-height: 1.55; }
:where(.cab) .mq-ai-ul li { margin: 4px 0; }
:where(.cab) .mq-ai-px { margin-top: 16px; }
:where(.cab) .mq-ai-px-lab { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: oklch(0.5 0.16 300); margin: 0 0 10px; }
:where(.cab) .mq-ai-impact { margin-top: 14px; font-size: 12.5px; color: oklch(0.45 0.13 300); }

/* AI product insights (inside .ai-block) */
:where(.cab) .mq-ins-summary { font-size: 14px; color: var(--c-fg-soft); line-height: 1.6; margin: 0 0 14px; }
:where(.cab) .mq-ins-lab { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-soft); margin: 14px 0 10px; }
:where(.cab) .mq-ins-lab.bad { color: var(--c-crit); }
:where(.cab) .mq-ins-stack { display: flex; flex-direction: column; gap: 8px; }
:where(.cab) .mq-ins-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--c-r-sm); border: 1px solid var(--c-line); }
:where(.cab) .mq-ins-row.good { background: var(--c-acc-soft); border-color: color-mix(in oklab, var(--c-acc) 25%, var(--c-line)); }
:where(.cab) .mq-ins-row.bad { background: var(--c-crit-bg); border-color: color-mix(in oklab, var(--c-crit) 22%, var(--c-line)); }
:where(.cab) .mq-ins-mk { color: var(--c-up); margin-top: 1px; flex-shrink: 0; }
:where(.cab) .mq-ins-mk.bad { color: var(--c-crit); }
:where(.cab) .mq-ins-body { min-width: 0; }
:where(.cab) .mq-ins-prod { font-size: 13px; font-weight: 600; color: var(--c-fg); margin: 0; }
:where(.cab) .mq-ins-why { font-size: 12px; color: var(--c-fg-soft); margin: 2px 0 0; line-height: 1.5; }
:where(.cab) .mq-ins-ul { margin: 0; padding-left: 20px; font-size: 13px; color: var(--c-fg-soft); line-height: 1.55; }
:where(.cab) .mq-ins-ul li { margin: 4px 0; }

/* Pixel health cards */
:where(.cab) .mq-card-stack { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
:where(.cab) .mq-px-card { border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
:where(.cab) .mq-px-name { font-size: 13px; font-weight: 600; color: var(--c-fg); margin: 0; }
:where(.cab) .mq-px-id { font-family: var(--c-mono); font-size: 11px; color: var(--c-fg-muted); margin-left: 4px; }
:where(.cab) .mq-px-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
:where(.cab) .mq-px-k { font-family: var(--c-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-fg-muted); margin: 0; }
:where(.cab) .mq-px-v { font-family: var(--c-sans); font-weight: 600; font-size: 22px; letter-spacing: -.02em; color: var(--c-fg); margin: 4px 0 0; }
:where(.cab) .mq-px-events { display: flex; flex-wrap: wrap; gap: 6px; }

/* score colour helpers (shared: pixel + creative eval) */
:where(.cab) .mq-sc-good { color: var(--c-acc); }
:where(.cab) .mq-sc-warn { color: var(--c-warn); }
:where(.cab) .mq-sc-bad { color: var(--c-crit); }
:where(.cab) .mq-sc-neu { color: var(--c-fg-dim); }
:where(.cab) .mq-sc-d { font-size: 13px; color: var(--c-fg-dim); font-weight: 400; }

/* Parity samples table lead */
:where(.cab) .mq-parity-wrap { padding: 16px 20px 20px; }
:where(.cab) .mq-parity-lead { font-size: 12.5px; color: var(--c-fg-muted); margin: 0 0 10px; }

/* Product list filters in panel head */
:where(.cab) .mq-filters { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
:where(.cab) .mq-select { font-family: var(--c-mono); font-size: 12px; padding: 6px 10px; border-radius: var(--c-r-sm); border: 1px solid var(--c-line); background: var(--c-card); color: var(--c-fg-soft); cursor: pointer; }
:where(.cab) .mq-select:focus { outline: none; border-color: color-mix(in oklab, var(--c-acc) 45%, var(--c-line)); }

/* Product cell (thumb + title) */
:where(.cab) .mq-prod-cell { display: flex; align-items: center; gap: 10px; }
:where(.cab) .mq-prod-img { width: 36px; height: 36px; border-radius: var(--c-r-sm); object-fit: cover; border: 1px solid var(--c-line); flex-shrink: 0; }
:where(.cab) .mq-prod-img-ph { background: var(--c-bg-soft); }
:where(.cab) .mq-prod-meta { min-width: 0; }
:where(.cab) .mq-prod-title { font-size: 13px; font-weight: 500; color: var(--c-fg); margin: 0; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cab) .mq-prod-sub { font-family: var(--c-mono); font-size: 10.5px; color: var(--c-fg-muted); margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Audiences list */
:where(.cab) .mq-aud-list { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
:where(.cab) .mq-aud-row { padding: 12px 14px; border-radius: var(--c-r-md); border: 1px solid var(--c-line); }
:where(.cab) .mq-aud-row.off { opacity: .6; }
:where(.cab) .mq-aud-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
:where(.cab) .mq-aud-name { font-size: 13px; font-weight: 600; color: var(--c-fg); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
:where(.cab) .mq-aud-sub { font-size: 11.5px; color: var(--c-fg-muted); margin: 6px 0 0; }

/* ── Drill-down modal (Campaign → Adset → Ad) ── */
:where(.cab) .mq-modal-ov { position: fixed; inset: 0; z-index: 50; background: oklch(0.2 0.02 260 / 0.55); backdrop-filter: blur(8px); display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow-y: auto; }
:where(.cab) .mq-modal { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-r-lg); box-shadow: 0 24px 60px -20px oklch(0.2 0.02 260 / 0.45); width: 100%; max-width: 960px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
:where(.cab) .mq-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--c-line); }
:where(.cab) .mq-bc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; font-size: 13px; }
:where(.cab) .mq-bc-root { color: var(--c-fg-muted); flex-shrink: 0; }
:where(.cab) .mq-bc-sep { width: 12px; height: 12px; color: var(--c-fg-dim); flex-shrink: 0; stroke: currentColor; }
:where(.cab) .mq-bc-node { color: var(--c-fg-soft); cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cab) .mq-bc-node:hover { color: var(--c-fg); }
:where(.cab) .mq-bc-node.cur { color: var(--c-fg); font-weight: 600; cursor: default; }
:where(.cab) .mq-modal-act { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
:where(.cab) .mq-mbtn { font-family: var(--c-mono); font-size: 12px; padding: 6px 12px; border-radius: var(--c-r-sm); border: 1px solid var(--c-line); background: var(--c-card); color: var(--c-fg-soft); cursor: pointer; }
:where(.cab) .mq-mbtn:hover { background: var(--c-bg-soft); }
:where(.cab) .mq-mbtn-close:hover { background: var(--c-crit-bg); color: var(--c-crit); border-color: color-mix(in oklab, var(--c-crit) 30%, var(--c-line)); }
:where(.cab) .mq-modal-body { flex: 1; overflow-y: auto; padding: 22px; }
:where(.cab) .mq-drill-lead { font-size: 12.5px; color: var(--c-fg-muted); margin: 0 0 14px; }
:where(.cab) .mq-drill-row { cursor: pointer; }
:where(.cab) .mq-drill-row:hover td { background: var(--c-acc-soft); }
:where(.cab) .mq-drill-nm { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--c-fg); }
:where(.cab) .mq-drill-chev { width: 12px; height: 12px; color: var(--c-acc); flex-shrink: 0; stroke: currentColor; }
:where(.cab) .mq-drill-sub { font-family: var(--c-mono); font-size: 10.5px; color: var(--c-fg-muted); margin-top: 2px; }

/* Ad cards (adset → ads level) */
:where(.cab) .mq-ad-list { display: flex; flex-direction: column; gap: 12px; }
:where(.cab) .mq-ad-card { border: 1px solid var(--c-line); border-radius: var(--c-r-md); padding: 16px; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
:where(.cab) .mq-ad-card:hover { background: var(--c-acc-soft); border-color: color-mix(in oklab, var(--c-acc) 30%, var(--c-line)); }
:where(.cab) .mq-ad-row { display: flex; align-items: flex-start; gap: 16px; }
:where(.cab) .mq-ad-thumb { width: 80px; height: 80px; border-radius: var(--c-r-md); object-fit: cover; border: 1px solid var(--c-line); flex-shrink: 0; }
:where(.cab) .mq-ad-thumb-ph { background: var(--c-bg-soft); display: grid; place-items: center; }
:where(.cab) .mq-ad-thumb-ph svg { width: 28px; height: 28px; color: var(--c-fg-dim); stroke: currentColor; }
:where(.cab) .mq-ad-body { flex: 1; min-width: 0; }
:where(.cab) .mq-ad-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
:where(.cab) .mq-ad-name { font-size: 14px; font-weight: 600; color: var(--c-fg); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cab) .mq-ad-tag { font-family: var(--c-mono); font-size: 9.5px; padding: 2px 7px; border-radius: 4px; background: var(--c-bg-soft); color: var(--c-fg-soft); white-space: nowrap; }
:where(.cab) .mq-ad-tag.warn { background: var(--c-warn-bg); color: var(--c-warn); }
:where(.cab) .mq-ad-tag.dev { background: oklch(0.94 0.05 300); color: oklch(0.5 0.14 300); }
:where(.cab) .mq-ad-ct { font-size: 12.5px; font-weight: 500; color: var(--c-fg-soft); margin: 6px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cab) .mq-ad-cb { font-size: 12.5px; color: var(--c-fg-muted); margin: 4px 0 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
:where(.cab) .mq-ad-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
:where(.cab) .mq-ad-sk { font-family: var(--c-mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-fg-muted); margin: 0; }
:where(.cab) .mq-ad-sv { font-family: var(--c-mono); font-size: 12.5px; font-weight: 600; color: var(--c-fg); margin: 2px 0 0; font-variant-numeric: tabular-nums; }

/* Ad detail layout */
:where(.cab) .mq-detail-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 22px; }
:where(.cab) .mq-detail-side { display: flex; flex-direction: column; gap: 12px; }
:where(.cab) .mq-detail-img { width: 100%; border-radius: var(--c-r-md); border: 1px solid var(--c-line); }
:where(.cab) .mq-detail-fields { font-size: 12.5px; color: var(--c-fg-soft); display: flex; flex-direction: column; gap: 4px; }
:where(.cab) .mq-detail-fields p { margin: 0; }
:where(.cab) .mq-fk { color: var(--c-fg-muted); }
:where(.cab) .mq-detail-links { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
:where(.cab) .mq-link { font-family: var(--c-mono); font-size: 12px; color: var(--c-acc-deep); }
:where(.cab) .mq-link:hover { text-decoration: underline; }
:where(.cab) .mq-detail-main { display: flex; flex-direction: column; gap: 16px; }
:where(.cab) .mq-detail-lab { font-family: var(--c-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-fg-muted); margin: 0 0 6px; }
:where(.cab) .mq-detail-title { font-size: 14px; font-weight: 500; color: var(--c-fg); margin: 0; }
:where(.cab) .mq-detail-body { font-size: 13px; color: var(--c-fg-soft); margin: 0; white-space: pre-line; line-height: 1.55; }

/* Creative AI eval card */
:where(.cab) .mq-eval { border: 1px solid oklch(0.9 0.03 300); background: oklch(0.98 0.012 300); border-radius: var(--c-r-md); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
:where(.cab) .mq-eval-cta { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
:where(.cab) .mq-eval-lab { font-family: var(--c-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: oklch(0.5 0.16 300); margin: 0; }
:where(.cab) .mq-eval-hint { font-size: 12.5px; color: var(--c-fg-soft); margin: 4px 0 0; }
:where(.cab) .mq-eval-btn { font-family: var(--c-mono); font-size: 12px; padding: 7px 14px; border-radius: var(--c-r-sm); background: oklch(0.55 0.16 300); color: #fff; border: none; cursor: pointer; flex-shrink: 0; }
:where(.cab) .mq-eval-btn:hover:not(:disabled) { background: oklch(0.48 0.16 300); }
:where(.cab) .mq-eval-btn:disabled { opacity: .6; cursor: default; }
:where(.cab) .mq-eval-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
:where(.cab) .mq-eval-model { font-family: var(--c-mono); font-size: 9.5px; color: var(--c-fg-dim); }
:where(.cab) .mq-sc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
:where(.cab) .mq-sc { text-align: center; }
:where(.cab) .mq-sc-k { font-family: var(--c-mono); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; color: var(--c-fg-muted); margin: 0; }
:where(.cab) .mq-sc-v { font-family: var(--c-sans); font-weight: 700; font-size: 18px; color: var(--c-fg); margin: 2px 0 0; }
:where(.cab) .mq-eval-sub { font-family: var(--c-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-fg); margin: 0 0 6px; }
:where(.cab) .mq-eval-sub.bad { color: var(--c-crit); }
:where(.cab) .mq-eval-ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--c-fg-soft); line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }

@media (max-width: 768px) {
  :where(.cab) .mq-detail-grid { grid-template-columns: 1fr; }
  :where(.cab) .mq-ad-stats { grid-template-columns: repeat(2, 1fr); }
  :where(.cab) .mq-sc-grid { grid-template-columns: repeat(2, 1fr); }
  :where(.cab) .mq-px-grid { grid-template-columns: repeat(2, 1fr); }
}
