@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/plex-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/plex-500.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/atkinson-400.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/atkinson-700.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/plex-600.woff2') format('woff2'); }

/* v1.11 palette: Graphite (dark) and Warm paper (light); Digi's blue → purple → rose stays on buttons and charts */
:root, [data-theme="dark"] {
  --bg: #18181b; --bg-glow-1: transparent; --bg-glow-2: transparent; --side: #111113;
  --panel: #232327; --panel-solid: #232327; --panel-2: #2e2e33;
  --line: #34343a; --line-2: #45454d;
  --text: #fafafa; --text-2: #a1a1aa; --muted: #8b8b94;
  --blue: #4f8cff; --purple: #8b5cf6; --rose: #ec4899; --cyan: #38bdf8;
  --grad: linear-gradient(90deg, #4f8cff, #8b5cf6 55%, #ec4899);
  --grad-soft: linear-gradient(135deg, rgba(79, 140, 255, .18), rgba(139, 92, 246, .14) 50%, rgba(236, 72, 153, .12));
  --glow: 0 1px 2px rgba(0, 0, 0, .25);
  --glow-strong: none;
  --accent: #8b5cf6; --accent-text: #ffffff; --accent-soft: rgba(139, 92, 246, .18);
  --good: #34d399; --bad: #fb7185; --warn: #fbbf24; --info: #60a5fa;
  --good-soft: rgba(52, 211, 153, .12); --bad-soft: rgba(251, 113, 133, .13); --warn-soft: rgba(251, 191, 36, .12); --info-soft: rgba(96, 165, 250, .12);
  --c-cur: #4f8cff; --c-cur-2: #8b5cf6; --c-cur-fill: rgba(99, 102, 241, .22); --c-cur-soft: rgba(139, 92, 246, .38); --c-prev: #7c80a8;
  --c-amz: #38bdf8; --c-fk: #ec4899; --c-ad: rgba(139, 92, 246, .55); --c-band: rgba(236, 72, 153, .10); --c-marker: #f472b6;
  --heat: 139 92 246; --alt: #f472b6;
  --radius: 14px; --radius-sm: 9px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f0e7; --bg-glow-1: transparent; --bg-glow-2: transparent; --side: #ebe7dc;
  --panel: #f9f7f0; --panel-solid: #f9f7f0; --panel-2: #e9e5d9;
  --line: #ddd8ca; --line-2: #cbc5b4;
  --text: #141413; --text-2: #5e5d59; --muted: #73726c;
  --blue: #2563eb; --purple: #7c3aed; --rose: #db2777; --cyan: #0284c7;
  --grad: linear-gradient(90deg, #2563eb, #7c3aed 55%, #db2777);
  --grad-soft: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(124, 58, 237, .07) 50%, rgba(219, 39, 119, .06));
  --glow: 0 1px 2px rgba(20, 20, 19, .05);
  --glow-strong: none;
  --accent: #7c3aed; --accent-soft: rgba(124, 58, 237, .10);
  --good: #059669; --bad: #e11d48; --warn: #b45309; --info: #2563eb;
  --good-soft: rgba(5, 150, 105, .09); --bad-soft: rgba(225, 29, 72, .08); --warn-soft: rgba(180, 83, 9, .09); --info-soft: rgba(37, 99, 235, .08);
  --c-cur: #2563eb; --c-cur-2: #7c3aed; --c-cur-fill: rgba(99, 102, 241, .14); --c-cur-soft: rgba(124, 58, 237, .30); --c-prev: #9a97b5;
  --c-amz: #0284c7; --c-fk: #db2777; --c-ad: rgba(124, 58, 237, .40); --c-band: rgba(219, 39, 119, .08); --c-marker: #db2777;
  --heat: 124 58 237; --alt: #db2777;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 .9375rem/1.5 'IBM Plex Sans', system-ui, 'Segoe UI', sans-serif; font-variant-numeric: tabular-nums; }
a { color: var(--info); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; }
h2 { font-size: 1.15rem; } h3 { font-size: 1rem; } h4 { font-size: .85rem; color: var(--text-2); margin: 12px 0 6px; font-weight: 500; }
p { margin: 0 0 10px; }
code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.note { color: var(--text-2); font-size: .85rem; margin: 10px 0 0; }
.text-bad { color: var(--bad); } .text-good { color: var(--good); }
.mt { margin-top: 18px; }
.clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strong { font-weight: 600; }

/* top bar */
.topbar { display: flex; align-items: center; gap: 24px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--c-amz) 0 50%, var(--c-fk) 50% 100%); position: relative; }
.brand-mark::after { content: ''; position: absolute; inset: 7px; border-radius: 3px; background: var(--panel); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text small { color: var(--muted); font-size: .75rem; }
.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a { color: var(--text-2); text-decoration: none; padding: 7px 12px; border-radius: var(--radius-sm); font-weight: 500; }
.mainnav a:hover { background: var(--panel-2); color: var(--text); }
.mainnav a[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
.userbox { display: flex; align-items: center; gap: 10px; }
.userlink { color: var(--text-2); text-decoration: none; font-weight: 500; }
.userlink:hover, .userlink.is-active { color: var(--text); }
.inline { display: inline; margin: 0; }

.page { max-width: 1320px; margin: 0 auto; padding: 22px 28px 60px; }
.page-title { font-size: 1.5rem; margin-bottom: 12px; }
.lead { color: var(--text-2); max-width: 760px; margin-bottom: 18px; }
.narrow { max-width: 680px; }

/* buttons and inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 500; font-size: .9rem; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--text-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-quiet:hover { color: var(--text); border-color: var(--line-2); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-small { padding: 5px 10px; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.iconbtn { background: none; border: 1px solid var(--line); color: var(--text-2); border-radius: 99px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: .82rem; }
.iconbtn:hover { color: var(--text); border-color: var(--line-2); }
.linkbtn { background: none; border: 0; color: var(--info); font: inherit; padding: 0; cursor: pointer; text-decoration: underline; }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 10px; min-height: 36px; }
input:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="date"] { min-width: 150px; }
input[type="checkbox"] { min-height: 0; width: 16px; height: 16px; accent-color: var(--accent); }
label { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; color: var(--text-2); font-weight: 500; }
label small { color: var(--muted); font-weight: 400; }
label.check { flex-direction: row; align-items: center; gap: 6px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.form legend { padding: 0 6px; font-weight: 600; color: var(--text); }
.form .btn { align-self: flex-start; }
.form-after { margin-top: 10px; }
.row2 { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.form.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: none; align-items: end; }
.grid3 .span3 { grid-column: 1 / -1; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.danger-zone { border: 1px dashed var(--bad); border-radius: var(--radius); padding: 16px; }

/* notices */
.notice { padding: 10px 14px; border-radius: var(--radius-sm); margin: 0 0 14px; border: 1px solid transparent; }
.notice-ok { background: var(--good-soft); border-color: var(--good); }
.notice-bad { background: var(--bad-soft); border-color: var(--bad); }
.notice-info { background: var(--info-soft); border-color: var(--info); }
.notice-warn { background: var(--warn-soft); border-color: var(--warn); }
.notice-warn p { margin: 0 0 10px; }
.pill { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text-2); font-weight: 500; vertical-align: middle; }
.pill-good { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.pill-req { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.pill-hero { background: var(--accent-soft, var(--panel-2)); border-color: transparent; color: var(--accent, var(--text)); }
.pm-hero { align-self: end; }
.pm-hero small { display: block; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 5px; background: var(--panel-2); color: var(--text-2); white-space: nowrap; }
.tag-amz { background: color-mix(in srgb, var(--c-amz) 20%, transparent); color: var(--c-amz); }
.tag-fk { background: color-mix(in srgb, var(--c-fk) 20%, transparent); color: var(--c-fk); }
.tag-good { background: var(--good-soft); color: var(--good); } .tag-bad { background: var(--bad-soft); color: var(--bad); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }

/* auth */
.auth-wrap { display: grid; place-items: center; min-height: 70vh; }
.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; width: 100%; max-width: 400px; }
.auth-card.wide { max-width: 620px; }
.auth-card h1 { font-size: 1.4rem; margin-bottom: 16px; }
.auth-card .form { max-width: none; }
.steps { padding-left: 20px; } .steps li { margin-bottom: 8px; }
.codebox { background: var(--panel-2); border: 1px solid var(--line); padding: 12px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .8rem; }
.secret { font: 600 1.15rem/1.4 ui-monospace, Consolas, monospace; letter-spacing: .06em; background: var(--panel-2); border: 1px dashed var(--line-2); padding: 10px 12px; border-radius: var(--radius-sm); margin: 8px 0; user-select: all; }

/* panels and cards */
.panel, .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; min-width: 0; }
.panel h2 { margin-bottom: 12px; } .panel h3 { margin: 18px 0 10px; }
.card h3 { margin-bottom: 12px; }
.card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0 auto 0 0; }
.card-foot { margin-top: 14px; }
.subnav { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.subnav a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--text-2); text-decoration: none; font-size: .85rem; }
.subnav a:hover { color: var(--text); border-color: var(--line-2); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid2.wide-left { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.grid3:not(.form) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid2 > .card, .grid3 > .card { margin-bottom: 16px; }

/* dashboard controls */
.controls { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.filters select { width: 100%; }
.periods { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.period { padding: 14px 16px; }
.period-prev { background: var(--panel-2); }
.period-cur { background: color-mix(in srgb, var(--c-cur) 8%, var(--panel)); }
.period-title { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-prev { background: var(--c-prev); } .dot-cur { background: var(--c-cur); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chips button { font: inherit; font-size: .82rem; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); cursor: pointer; }
.chips button:hover { color: var(--text); }
.period-cur .chips button[aria-pressed="true"] { background: var(--c-cur); border-color: var(--c-cur); color: #fff; }
.period-prev .chips button[aria-pressed="true"] { background: var(--c-prev); border-color: var(--c-prev); color: #10131c; }
.dates { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.period-note { font-size: .82rem; color: var(--text-2); margin: 8px 0 0; }
.swap { border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--panel); color: var(--text-2); padding: 0 12px; cursor: pointer; font-size: 1.1rem; }
.swap:hover { color: var(--text); }
.datastate { font-size: .8rem; color: var(--muted); margin: 12px 0 0; }
.loading { position: fixed; right: 20px; bottom: 20px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 99px; font-size: .85rem; z-index: 20; }

/* attention: the one loud element */
.attention { margin-bottom: 18px; }
.attention h2 { font-size: 1.05rem; margin-bottom: 10px; }
.attention ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.attention li { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--info); border-radius: 0; padding: 12px 14px; font-size: .95rem; line-height: 1.45; }
.attention li.alert-good { border-left-color: var(--good); background: linear-gradient(90deg, var(--good-soft), var(--panel) 60%); }
.attention li.alert-bad { border-left-color: var(--bad); background: linear-gradient(90deg, var(--bad-soft), var(--panel) 60%); }
.attention li.alert-warn { border-left-color: var(--warn); background: linear-gradient(90deg, var(--warn-soft), var(--panel) 60%); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-lead { border-color: color-mix(in srgb, var(--c-cur) 55%, var(--line)); }
.kpi-label { font-size: .8rem; color: var(--text-2); font-weight: 500; }
.kpi-value { font-size: 1.75rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
.kpi-foot { font-size: .8rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.kpi-sub { color: var(--muted); }
.delta { font-size: .8rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.delta.is-good { color: var(--good); } .delta.is-bad { color: var(--bad); }

/* segmented control */
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { font: inherit; font-size: .82rem; padding: 5px 11px; background: transparent; color: var(--text-2); border: 0; border-right: 1px solid var(--line-2); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); font-weight: 600; }

/* charts */
.chartbox { position: relative; height: 260px; }
.chartbox.tall { height: 320px; }
.chartbox.short { height: 180px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--text-2); margin: 10px 0 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.sw-cur { background: var(--c-cur); height: 3px; } .sw-prev { border-top: 2px dashed var(--c-prev); height: 0; }
.sw-band { background: var(--c-band); border: 1px solid var(--c-amz); } .sw-marker { border-left: 2px dashed var(--c-marker); width: 2px; height: 12px; }
.sw-amz { background: var(--c-amz); } .sw-fk { background: var(--c-fk); }

/* blocks */
.block { margin-top: 30px; }
.block-title { font-size: 1.25rem; margin-bottom: 4px; }
.block-sub { color: var(--text-2); font-size: .9rem; margin-bottom: 14px; max-width: 760px; }
.block > .block-title + .grid2, .block > .block-title + .grid3, .block > .block-title + .card { margin-top: 14px; }

/* bar lists */
.barlist { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto auto; gap: 10px; align-items: center; font-size: .86rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.bar-track { height: 9px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--c-cur); border-radius: 3px; }
.bar-fill.is-muted { background: var(--muted); } .bar-fill.is-alt { background: var(--alt); }
.bar-val { font-weight: 600; min-width: 44px; text-align: right; }
.bar-extra { min-width: 64px; text-align: right; color: var(--text-2); font-size: .8rem; }

/* split bars (marketplace by state) */
.split-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto auto; gap: 10px; align-items: center; font-size: .86rem; padding: 4px 0; }
.split-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-bar { display: flex; height: 9px; border-radius: 3px; overflow: hidden; background: var(--panel-2); }
.split-a { background: var(--c-amz); } .split-f { background: var(--c-fk); }
.split-nums { color: var(--text-2); font-size: .8rem; min-width: 70px; text-align: right; }

/* tables */
.tablewrap { overflow-x: auto; }
.tablewrap.scrolly { max-height: 520px; overflow-y: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .87rem; }
.tbl th { text-align: left; font-weight: 500; color: var(--text-2); font-size: .78rem; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl-compact td, .tbl-compact th { padding: 6px 8px; }
.tbl .sku { display: block; font-size: .75rem; }
.row-warn td { background: var(--bad-soft); }
.sortbtn { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }
.tbl-matrix td.heat { background: rgb(var(--heat) / var(--a)); }
.mini summary { cursor: pointer; color: var(--text-2); font-size: .85rem; }
.mini form { margin-top: 8px; }

/* heatmap */
.heatmap { display: flex; flex-direction: column; gap: 3px; overflow-x: auto; }
.hm-row { display: grid; grid-template-columns: 36px repeat(24, minmax(14px, 1fr)); gap: 3px; align-items: center; min-width: 480px; }
.hm-head span { font-size: .7rem; color: var(--muted); }
.hm-day { font-size: .78rem; color: var(--text-2); }
.hm-cell { height: 22px; border-radius: 3px; background: rgb(var(--heat) / var(--a)); outline: 1px solid var(--panel-2); }
.bigline { font-size: .95rem; }

/* mix */
.stat { font-size: 1.6rem; font-weight: 600; margin: 0; display: flex; gap: 10px; align-items: baseline; }
.pairs { list-style: none; margin: 0; padding: 0; font-size: .86rem; }
.pairs li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.pairs li:last-child { border-bottom: 0; }
.pairs-big li { padding: 8px 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 20px; margin: 0 0 12px; }
.facts.tight { grid-template-columns: 1fr; gap: 8px; }
.facts div { min-width: 0; }
.facts dt { font-size: .78rem; color: var(--text-2); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.fest-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.inline-label { flex-direction: row; align-items: center; gap: 10px; font-size: .9rem; }
.inline-label select { min-width: 280px; }

.empty { text-align: center; padding: 60px 20px; background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty h2 { margin-bottom: 8px; }
.empty.small { padding: 22px; text-align: left; margin-bottom: 16px; }

/* import */
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 36px 20px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dz-main { font-size: 1.05rem; color: var(--text); font-weight: 600; }
.dz-sub { color: var(--muted); font-weight: 400; }
.detect-grid { display: grid; grid-template-columns: 1fr 1.4fr 140px; gap: 14px; margin-bottom: 8px; }
.sample { font-size: .8rem; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { position: relative; height: 26px; background: var(--panel-2); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 14px; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .82rem; font-weight: 600; }
.guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.guide ul { padding-left: 18px; margin: 8px 0 16px; color: var(--text-2); font-size: .9rem; }
.guide li { margin-bottom: 6px; } .guide strong { color: var(--text); }

@media (max-width: 1100px) {
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3:not(.form) { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .page { padding: 16px; }
  .topbar { padding: 10px 16px; gap: 12px; }
  .mainnav { order: 3; width: 100%; overflow-x: auto; }
  .periods { grid-template-columns: 1fr; }
  .swap { border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; }
  .grid2, .grid2.wide-left, .grid3:not(.form), .grid3.form, .attention ul, .fest-grid, .guide, .detect-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

#cmpProducts .clip { max-width: 190px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.kpi-small { font-size: 1.1rem; }
.brand-ws { color: var(--text-2); font-size: .8rem; border-left: 1px solid var(--line); padding-left: 12px; }
.trialbar { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 8px 14px; margin-bottom: 14px; font-size: .9rem; }

/* ===== Neon visual layer ===== */
body { background: radial-gradient(900px 500px at 85% -10%, var(--bg-glow-1), transparent 60%), radial-gradient(700px 500px at -10% 30%, var(--bg-glow-2), transparent 60%), var(--bg); background-attachment: fixed; }
.topbar { background: color-mix(in srgb, var(--panel-solid) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand-text strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.05rem; letter-spacing: .01em; }
.brand-mark { background: var(--grad); box-shadow: var(--glow-strong); }
.brand-mark::after { background: var(--panel-solid); inset: 8px; border-radius: 50%; }
.mainnav a[aria-current="page"] { background: var(--grad-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

.panel, .card, .kpi, .controls, .auth-card, .attention li, .empty { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--glow); backdrop-filter: blur(10px); }
.card, .panel { border-radius: var(--radius); }
.card h3, .panel h2, .attention h2, .card-head h2, .card-head h3 { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; color: var(--text); }
.panel h2 { font-size: .85rem; }
.page-title, .block-title, .auth-card h1 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.block-title { font-size: 1.35rem; letter-spacing: .01em; }

.kpi { position: relative; overflow: hidden; border-radius: var(--radius); padding: 16px 18px 14px; }
.kpi::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: .85; }
.kpi-label { text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
.kpi-value { font-size: 1.95rem; }
.kpi-lead { border-color: var(--line-2); box-shadow: var(--glow), var(--glow-strong); }
.kpi-spark { position: absolute; right: 12px; bottom: 10px; width: 42%; height: 38px; opacity: .95; pointer-events: none; }
.kpi .kpi-foot { position: relative; z-index: 1; }
.kpi.has-spark .kpi-foot { max-width: 58%; }

.btn-primary { background: var(--grad); border: 0; box-shadow: var(--glow-strong); }
.btn-primary:hover { filter: brightness(1.1); }
.btn { border-radius: 10px; }
.period-cur .chips button[aria-pressed="true"] { background: var(--grad); border-color: transparent; box-shadow: var(--glow-strong); }
.period-cur { background: var(--grad-soft); }
.seg button[aria-pressed="true"] { background: var(--grad-soft); box-shadow: inset 0 0 0 1px var(--line-2); }
.dot-cur { background: var(--grad); box-shadow: 0 0 8px var(--c-cur); }

.bar-track { background: var(--panel-2); height: 8px; border-radius: 99px; }
.bar-fill { background: var(--grad); border-radius: 99px; box-shadow: 0 0 10px rgba(139, 92, 246, .35); }
.bar-fill.is-alt { background: linear-gradient(90deg, var(--purple), var(--rose)); }
.split-bar { border-radius: 99px; height: 8px; }
.progress-bar { background: var(--grad); }

.attention li { border-radius: 12px; border-left-width: 3px; }
.attention li.alert-good { border-left-color: var(--good); background: linear-gradient(90deg, var(--good-soft), var(--panel) 55%); }
.attention li.alert-bad { border-left-color: var(--rose); background: linear-gradient(90deg, var(--bad-soft), var(--panel) 55%); }
.attention li.alert-warn { border-left-color: var(--warn); background: linear-gradient(90deg, var(--warn-soft), var(--panel) 55%); }

.trialbar { background: var(--grad-soft); border: 1px solid var(--line-2); box-shadow: var(--glow); }
.tag-amz { background: color-mix(in srgb, var(--c-amz) 18%, transparent); color: var(--c-amz); }
.tag-fk { background: color-mix(in srgb, var(--c-fk) 18%, transparent); color: var(--c-fk); }
.tbl th { background: transparent; text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; }
.tablewrap.scrolly .tbl th { background: var(--panel-solid); }
.hm-cell { border-radius: 4px; box-shadow: 0 0 6px rgb(var(--heat) / calc(var(--a) * .6)); outline: 0; }
.stat { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.dropzone { border-color: var(--line-2); background: var(--grad-soft); }
.dropzone:hover, .dropzone.is-over { box-shadow: var(--glow-strong); }
input, select, textarea { background: var(--panel-2); border-color: var(--line); border-radius: 10px; }
.iconbtn { background: var(--grad-soft); border-color: var(--line-2); color: var(--text); }
::selection { background: rgba(139, 92, 246, .35); }
.userbox-guest { margin-left: auto; }

/* profit and loss */
.leak { display: flex; flex-direction: column; gap: 6px; }
.leak-row { display: grid; grid-template-columns: minmax(130px, 190px) 1fr 110px 54px; gap: 10px; align-items: center; font-size: .87rem; }
.leak-row .leak-track { height: 10px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.leak-row .leak-fill { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.leak-row.is-cost .leak-fill { background: linear-gradient(90deg, var(--rose), var(--purple)); opacity: .85; }
.leak-row.is-total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; font-weight: 600; }
.leak-row.is-total.is-neg .leak-fill { background: var(--bad); }
.leak-val { text-align: right; font-weight: 600; white-space: nowrap; }
.leak-pct { text-align: right; color: var(--text-2); font-size: .8rem; }
.kpi-value.is-neg { color: var(--bad); }
.block-first { margin-top: 0; margin-bottom: 18px; }
.sw-ch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.split-bar span { display: block; height: 100%; }

/* product scorecard */
.quad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.quad-card { border-radius: var(--radius); padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--glow); position: relative; overflow: hidden; min-width: 0; }
.quad-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; }
.quad-win::before { background: linear-gradient(90deg, var(--good), var(--cyan)); }
.quad-gem::before { background: linear-gradient(90deg, var(--blue), var(--purple)); }
.quad-trap::before { background: linear-gradient(90deg, var(--warn), var(--rose)); }
.quad-lose::before { background: linear-gradient(90deg, var(--rose), var(--bad)); }
.quad-card h3 { margin-bottom: 2px; }
.quad-card .quad-do { color: var(--text-2); font-size: .82rem; margin: 0 0 10px; }
.quad-card .quad-n { font-size: 1.6rem; font-weight: 600; margin: 0 0 8px; }
.quad-card ul { list-style: none; margin: 0; padding: 0; font-size: .84rem; }
.quad-card li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.quad-card li:last-child { border-bottom: 0; }
.quad-card li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quad-card li span:last-child { color: var(--text-2); white-space: nowrap; }
.pareto-line { font-size: 1rem; margin: 0 0 12px; }
.pareto-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--panel-2); margin-bottom: 8px; }
.pareto-bar span { display: block; height: 100%; }
@media (max-width: 1100px) { .quad { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .quad { grid-template-columns: 1fr; } }

/* ===================== App frame (premium layout) ===================== */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 18px; height: 18px; flex: none; }
.view-hidden { display: none !important; }
.has-shell .page-title { display: none; }
body.has-shell { --side-w: 252px; }

.shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); display: flex; flex-direction: column; padding: 0;
  background: var(--side); border-right: 1px solid var(--line); z-index: 40; overflow: hidden; }
/* v1.11: logo and search stay at the top, the account row at the bottom; only the pages in between scroll */
.side-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.side-top { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
.side-top .nav-search, .side-top .nav-ask { margin: 0; }
.side-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 12px 12px; display: flex; flex-direction: column; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand-logo { width: 34px; height: 34px; border-radius: 10px; flex: none; box-shadow: var(--glow-strong); object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 1rem; }
.brand-text small { color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.side-close { display: none; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-group { margin: 12px 10px 4px; font-size: .75rem; color: var(--muted); font-weight: 500; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 400; font-size: .9rem; position: relative; transition: background .12s; }
.side-nav a:hover { background: var(--panel-2); }
.side-nav a[aria-current="page"] { background: var(--panel-2); font-weight: 500; }
.side-nav a .ico { color: var(--text-2); }
/* v1.9 menu: brand switcher, search, pinned pages, groups that open and close */
.nav-brand { display: flex; gap: 6px; align-items: center; padding: 0 2px; }
.nav-brand label { flex: 1; display: flex; flex-direction: row; align-items: center; gap: 8px; min-width: 0; margin: 0; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 4px 0 10px; background: var(--panel-2); text-align: left; font-weight: 400; }
.nav-brand-k { font-size: .72rem; color: var(--muted); flex: none; }
.nav-brand select { flex: 1; min-width: 0; width: auto; margin: 0; border: 0; box-shadow: none; background-color: transparent; color: var(--text); font: inherit; font-size: .88rem; padding: 8px 4px; text-align: left; }
.nav-search { display: flex; align-items: center; gap: 8px; margin: 6px 2px 2px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.nav-search .ico { width: 16px; height: 16px; color: var(--muted); flex: none; }
.nav-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .88rem; padding: 9px 0; box-shadow: none; }
.nav-search input:focus { outline: none; }
.nav-search:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px var(--accent-soft); }
.nav-ask { display: flex; align-items: center; gap: 8px; margin: 4px 2px 0; padding: 8px 10px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--text); text-decoration: none; font-size: .86rem; background: var(--accent-soft); }
.nav-ask .ico { width: 16px; height: 16px; color: var(--purple); flex: none; }
.nav-ask span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-none { margin: 6px 10px 0; font-size: .8rem; color: var(--muted); }
.nav-pins .side-group { margin-top: 10px; }
.nav-pins.is-dim { display: none; }
.nav-pin-list { display: flex; flex-direction: column; gap: 2px; }
.nav-pin-list a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .9rem; }
.nav-pin-list a:hover { background: var(--panel-2); color: var(--text); }
.nav-pin-list .ico { width: 15px; height: 15px; fill: var(--warn); stroke: var(--warn); }
.side-nav { margin-top: 4px; }
.nav-item { display: flex; align-items: center; gap: 2px; position: relative; }
.nav-item > a { padding-right: 34px; }
.nav-item > a { flex: 1; min-width: 0; }
.nav-item > a span { overflow: hidden; text-overflow: ellipsis; }
.nav-pin { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); flex: none; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s; }
.nav-pin .ico { width: 14px; height: 14px; }
.nav-item:hover .nav-pin, .nav-pin:focus-visible, .nav-pin.is-on { opacity: 1; }
.nav-pin.is-on .ico { fill: var(--warn); stroke: var(--warn); }
.nav-pin:hover { background: var(--panel-2); color: var(--text); }
@media (hover: none) { .nav-pin { opacity: .55; } }
.nav-group > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text); font-weight: 400; font-size: .9rem; cursor: pointer; user-select: none; }
.nav-group > summary .ico:first-child { color: var(--text-2); }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: var(--panel-2); }
.nav-group > summary:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; }
.nav-label { flex: 1; min-width: 0; }
.nav-count { display: none; }
.nav-group[open] .nav-count { display: none; }
.nav-chev { width: 15px; height: 15px; color: var(--muted); transition: transform .15s; }
.nav-group[open] .nav-chev { transform: rotate(90deg); }
.nav-group:not([open]):has(a[aria-current="page"]) > summary { background: var(--panel-2); font-weight: 500; }
.nav-items { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 6px; }
.side-nav .nav-items a { padding: 6px 10px 6px 38px; font-size: .875rem; color: var(--text-2); }
.side-nav .nav-items a:hover, .side-nav .nav-items a[aria-current="page"] { color: var(--text); }
.nav-bottom { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.nav-extra { margin-top: 4px; }
.side-nav .nav-extra a { padding-left: 14px; font-size: .88rem; }
.bell { position: relative; color: var(--text-2); }
.bell.is-active { color: var(--text); background: var(--panel-2); }
.bell-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: #e11d48; color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; }
.pill-info { background: var(--info-soft); border-color: var(--info); color: var(--info); }
.alert-wait p { margin: 0; }
.alert-date { font-size: .95rem; margin: 0 0 10px; color: var(--text-2); }
.alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.alert-item { display: flex; gap: 12px; align-items: flex-start; }
.alert-item.is-new .alert-title { font-weight: 600; }
.alert-body { flex: 1; min-width: 0; }
.alert-body p { margin: 0 0 3px; }
.alert-title { color: var(--text); }
.alert-meta { font-size: .78rem; color: var(--muted); }
.alert-new { display: inline-block; font-size: .68rem; font-weight: 700; color: #fff; background: #e11d48; border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }
.report-form { align-items: end; }
/* account row and its menu (v1.11) */
.side-foot { flex: none; position: relative; border-top: 1px solid var(--line); padding: 8px 12px 12px; }
.acct-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; box-shadow: none; }
.acct-btn:hover, .acct-btn[aria-expanded="true"], .acct-btn.is-active { background: var(--panel-2); }
.acct-btn > .ico { width: 16px; height: 16px; color: var(--muted); }
.acct-av { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--text); font-weight: 600; font-size: .85rem; }
.acct-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.acct-mail { font-size: .84rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-plan { font-size: .75rem; color: var(--muted); }
.acct-menu { position: absolute; left: 12px; right: 12px; bottom: calc(100% - 4px); z-index: 60; display: flex; flex-direction: column; gap: 1px; padding: 6px; max-height: calc(100vh - 120px); overflow-y: auto;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.acct-menu[hidden] { display: none; }
.acct-email { margin: 0; padding: 6px 10px 6px; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu form { margin: 0; }
.acct-menu a, .acct-menu button, .acct-sub > summary, .acct-theme { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text);
  font: inherit; font-size: .875rem; text-decoration: none; text-align: left; cursor: pointer; box-shadow: none; box-sizing: border-box; }
.acct-menu a:hover, .acct-menu button:hover, .acct-sub > summary:hover, .acct-menu a[aria-current="page"] { background: var(--panel-2); }
.acct-menu .ico { width: 16px; height: 16px; color: var(--text-2); }
.acct-grow { flex: 1; min-width: 0; }
.acct-val { font-size: .78rem; color: var(--muted); }
.acct-sub > summary { list-style: none; }
.acct-sub > summary::-webkit-details-marker { display: none; }
.acct-sub[open] > summary .nav-chev { transform: rotate(90deg); }
.acct-langs { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 4px 26px; }
.acct-langs button[aria-checked="true"] { font-weight: 600; }
.acct-langs button[aria-checked="true"]::after { content: '✓'; color: var(--purple); }
.acct-theme { cursor: default; flex-wrap: wrap; gap: 6px 8px; padding-right: 6px; }
.acct-theme:hover { background: transparent; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); }
.acct-theme .acct-grow { flex: 1 1 auto; white-space: nowrap; }
.acct-theme .seg { flex: none; }
.acct-menu .seg button { width: auto; min-height: 0; padding: 3px 6px; font-size: .75rem; border-radius: 6px; color: var(--text-2); }
.acct-menu .seg button[aria-checked="true"] { background: var(--panel-2); color: var(--text); font-weight: 600; }
.acct-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }

.main { flex: 1; margin-left: var(--side-w); min-width: 0; display: flex; flex-direction: column; }
.has-shell .topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 14px 32px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); flex-wrap: nowrap; }
.top-title { font-size: 1.3rem; font-weight: 600; margin: 0; letter-spacing: -.01em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-open { display: none; }
.trial-chip { font-size: .78rem; padding: 5px 12px; border-radius: 99px; background: var(--grad-soft); border: 1px solid var(--line-2); white-space: nowrap; }
.iconbtn { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.has-shell .page { max-width: 1400px; width: 100%; margin: 0 auto; padding: 24px 32px 64px; }

.guestbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; }
.page-guest { max-width: 1100px; margin: 0 auto; padding: 10px 20px 60px; }

/* filters: one-line summary + panel */
.filterbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-btn { gap: 8px; background: var(--grad-soft); border-color: var(--line-2); }
.filter-btn[aria-expanded="true"] { box-shadow: var(--glow-strong); }
.filter-summary { margin: 0; color: var(--text-2); font-size: .9rem; }
.controls-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.controls-head h2 { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }

/* calmer, more corporate surfaces */
.card, .panel, .kpi { box-shadow: var(--glow); }
.block { margin-top: 26px; }
.block-first { margin-top: 4px; }
.block-title { font-size: 1.2rem; }
.kpis { margin-bottom: 16px; }

/* mobile tab bar */
.tabbar { display: none; }

@media (max-width: 1024px) {
  body.has-shell { --side-w: 0px; }
  .sidebar { width: 280px; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  .sidebar.is-open { transform: none; }
  .side-close, .nav-open { display: inline-grid; }
  .scrim { position: fixed; inset: 0; background: rgba(3, 4, 12, .55); backdrop-filter: blur(2px); z-index: 35; }
  .main { margin-left: 0; }
  .has-shell .topbar { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  .top-title { font-size: 1.1rem; }
  .has-shell .page { padding: 16px 14px 96px; }
  body.nav-locked { overflow: hidden; }

  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--panel-solid) 94%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 0; background: none; color: var(--muted);
    font: inherit; font-size: .68rem; font-weight: 500; text-decoration: none; border-radius: 10px; cursor: pointer; }
  .tabbar .ico { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--text); }
  .tabbar a[aria-current="page"] .ico { color: var(--purple); filter: drop-shadow(0 0 6px rgba(139, 92, 246, .6)); }

  /* filters become a slide-up sheet */
  .controls { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 86vh; overflow-y: auto; margin: 0;
    border-radius: 18px 18px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(0,0,0,.5); }
  body.filters-open::after { content: ''; position: fixed; inset: 0; background: rgba(3,4,12,.55); z-index: 45; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filter-summary { font-size: .82rem; flex-basis: 100%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px 14px 12px; }
  .kpi-value { font-size: 1.35rem; }
  .kpi.has-spark .kpi-foot { max-width: none; }
  .kpi-spark { position: static; width: 100%; height: 28px; margin-top: 6px; }
  .attention ul { grid-template-columns: 1fr; }
  .chartbox.tall { height: 240px; }
  .leak-row { grid-template-columns: minmax(96px, 120px) 1fr 86px 38px; gap: 8px; font-size: .8rem; }
  .bar-row, .split-row { grid-template-columns: minmax(80px, 110px) 1fr auto auto; gap: 8px; font-size: .8rem; }
  .card, .panel { padding: 14px; }
  .trial-chip { display: none; }
}
@media (max-width: 420px) {
  .kpi-value { font-size: 1.2rem; }
  .filters { grid-template-columns: 1fr; }
}
.iconbtn.side-close, .iconbtn.nav-open { display: none; }
@media (max-width: 1024px) { .iconbtn.side-close, .iconbtn.nav-open { display: inline-grid; } }
.attention li.alert-more { background: transparent; border: 0; box-shadow: none; padding: 4px 2px; }

.btn-wide { width: 100%; justify-content: center; padding: 11px 16px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; margin: 16px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ticks { list-style: none; padding: 0; margin: 12px 0 18px; }
.ticks li { padding: 5px 0 5px 26px; position: relative; color: var(--text-2); }
.ticks li::before { content: ''; position: absolute; left: 4px; top: 11px; width: 10px; height: 6px; border-left: 2px solid var(--purple); border-bottom: 2px solid var(--purple); transform: rotate(-45deg); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.plan-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.plan-best { border-color: var(--line-2); box-shadow: var(--glow-strong); }
.side-user.is-guest { color: var(--text); background: var(--grad-soft); }
a.trial-chip { color: var(--text); text-decoration: none; }
@media (max-width: 1024px) { .has-shell .topbar .btn-small { padding: 6px 10px; font-size: .78rem; } .plans { grid-template-columns: 1fr; } }

/* plans, usage, help */
.plan-name { font-size: 1.8rem; font-weight: 600; margin: 4px 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.meter { margin-bottom: 14px; }
.meter-top { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: 5px; }
.meter-track { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.meter-track span { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.meter.is-full .meter-track span { background: linear-gradient(90deg, var(--warn), var(--bad)); }
.period-switch > input { position: absolute; opacity: 0; pointer-events: none; }
.period-switch > label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 99px; margin: 0 6px 16px 0; cursor: pointer; color: var(--text-2); font-size: .88rem; }
.period-switch > input:checked + label { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow-strong); }
.period-switch > input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.save-tag { font-size: .7rem; padding: 1px 6px; border-radius: 99px; background: var(--good-soft); color: var(--good); }
.period-switch .py { display: none; }
.plan-for { margin: 0; font-size: .85rem; }
.plan-price { margin: 4px 0; font-size: .9rem; } .plan-price strong { font-size: 1.6rem; }
.btn.is-disabled { opacity: .6; pointer-events: none; justify-content: center; }
.help-mail { font-size: 1.15rem; font-weight: 600; margin: 6px 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 2px; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 500; }
.faq details p { margin: 8px 0 0; color: var(--text-2); }
.guest-actions { display: flex; gap: 6px; }
.amt { width: 130px; }
.has-shell .topbar .btn-small .ico { width: 15px; height: 15px; }

/* ===== Form alignment system (desktop + mobile) ===== */
.form.grid3 { align-items: start; row-gap: 16px; }
.form.grid3 > label { min-width: 0; }
.form.grid3 > label input, .form.grid3 > label select { width: 100%; }
.form.grid3 > div:last-child { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.form label small { line-height: 1.35; }
.form label { gap: 6px; }
input, select, textarea { min-height: 40px; }
.inline-form { align-items: center; }
.inline-form > * { flex: none; }
.inline-form input:not([type="checkbox"]), .inline-form select { min-height: 34px; }
.tbl td .inline-form { flex-wrap: wrap; }
.panel > form + .tablewrap, .panel > .tablewrap + h3 { margin-top: 16px; }
@media (max-width: 820px) {
  .form.grid3 { grid-template-columns: 1fr; }
  .form.grid3 > div:last-child .btn { width: 100%; justify-content: center; }
  .inline-form { width: 100%; }
  .inline-form select, .inline-form input:not([type="checkbox"]) { flex: 1 1 140px; }
  .tbl td .inline-form .btn { flex: none; }
  .row2 { grid-template-columns: 1fr; }
  .subnav { overflow-x: auto; flex-wrap: nowrap; }
  .subnav a { white-space: nowrap; }
  .auth-card { padding: 22px 18px; }
}

/* tables that become cards on phones */
@media (max-width: 820px) {
  .tbl-stack thead { display: none; }
  .tbl-stack, .tbl-stack tbody { display: block; }
  .tbl-stack tr { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: var(--panel-2); }
  .tbl-stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0 !important; padding: 7px 0; text-align: right; }
  .tbl-stack td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; text-align: left; flex: none; }
  .tbl-stack td input:not([type="checkbox"]) { width: 55%; max-width: 220px; }
  .tbl-stack td .inline-form { justify-content: flex-end; width: auto; }
  .tbl-stack tr.row-new td:first-child input { width: 60%; }
}
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.codes code { font-size: 1rem; text-align: center; padding: 8px; letter-spacing: .06em; }
.codes-panel { border-color: var(--warn); }
.btnrow form { margin: 0; }

/* value-only lock (Free plan) */
.blurv { filter: blur(6px); user-select: none; pointer-events: none; display: inline-block; opacity: .85; }
.lockbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; border-radius: 12px;
  background: var(--grad-soft); border: 1px solid var(--line-2); box-shadow: var(--glow); }
.lockbar strong { font-weight: 600; }
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.qr-box { background: #fff; border-radius: 14px; padding: 14px; width: 240px; max-width: 100%; margin: 10px auto; }
.qr-box svg { width: 100%; height: auto; display: block; }
.center { text-align: center; color: var(--text-2); }
.upi-id { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.upi-btn { display: none; }
@media (max-width: 820px) { .pay-grid { grid-template-columns: 1fr; } .upi-btn { display: inline-flex; } }
/* announcement bar + popup */
.promo-bar { position: relative; z-index: 60; display: flex; align-items: center; padding: 0 44px 0 0; font-size: .88rem; font-weight: 500; color: #fff; overflow: hidden; }
.promo-viewport { overflow: hidden; flex: 1; min-width: 0; }
.promo-track { display: inline-flex; white-space: nowrap; will-change: transform; animation: promo-scroll 40s linear infinite; }
.promo-item { padding: 9px 48px 9px 0; }
.promo-item::after { content: '✦'; margin-left: 48px; opacity: .7; }
.promo-bar:hover .promo-track, .promo-bar:focus-within .promo-track { animation-play-state: paused; }
@keyframes promo-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .promo-track { animation: none; } .promo-item:not(:first-child) { display: none; } .promo-viewport { text-align: center; } }
.promo-bar a { color: #fff; font-weight: 700; text-decoration: underline; }
.promo-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: inherit; font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; }
.promo-launch { background: linear-gradient(90deg, #2563eb, #7c3aed 55%, #db2777); }
.promo-summer { background: linear-gradient(90deg, #f97316, #ef4444 60%, #db2777); }
.promo-monsoon { background: linear-gradient(90deg, #0ea5e9, #2563eb 60%, #4f46e5); }
.promo-winter { background: linear-gradient(90deg, #38bdf8, #6366f1 60%, #a78bfa); }
.promo-festive { background: linear-gradient(90deg, #f59e0b, #dc2626 60%, #9333ea); }
.promo-pop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 18px; background: rgba(3, 4, 12, .6); backdrop-filter: blur(3px); }
.promo-pop[hidden] { display: none; }
.promo-pop .promo-card { position: relative; max-width: 420px; width: 100%; padding: 28px 24px 22px; border-radius: 18px; background: var(--panel-solid); color: var(--text);
  border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0,0,0,.5); text-align: center; }
.promo-pop .promo-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; border-radius: 18px 18px 0 0; background: inherit; }
.promo-pop.promo-launch .promo-card::before { background: linear-gradient(90deg, #2563eb, #7c3aed, #db2777); }
.promo-pop.promo-summer .promo-card::before { background: linear-gradient(90deg, #f97316, #db2777); }
.promo-pop.promo-monsoon .promo-card::before { background: linear-gradient(90deg, #0ea5e9, #4f46e5); }
.promo-pop.promo-winter .promo-card::before { background: linear-gradient(90deg, #38bdf8, #a78bfa); }
.promo-pop.promo-festive .promo-card::before { background: linear-gradient(90deg, #f59e0b, #9333ea); }
.promo-pop h2 { font-size: 1.35rem; margin: 6px 0 10px; } .promo-pop p { color: var(--text-2); margin-bottom: 18px; }
.promo-pop .promo-x { top: 16px; transform: none; color: var(--text-2); }
@media (max-width: 1024px) { .promo-bar { font-size: .8rem; } .promo-track { animation-duration: 28s; } }
.promo-x { background: rgba(0,0,0,.15) !important; border-radius: 8px; }

/* footer with automatic copyright year */
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding: 18px 0 6px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 820px) { .site-footer { flex-direction: column; align-items: flex-start; } }

.coupon-form { margin: 8px 0 12px; }
.coupon-form label { display: flex; flex-direction: column; gap: 6px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; text-transform: uppercase; letter-spacing: .05em; }

/* keep the sidebar (logo) below the announcement bar */
:root { --promo-h: 34px; }
/* bar lives inside the main column; the menu always uses the full height */
.main > .promo-bar { position: relative; z-index: 31; }

/* screen lock + data protection mode */
.lock-card { text-align: center; } .lock-card .form { text-align: left; }
.lock-ico { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-soft); color: var(--purple); }
.wm { position: fixed; inset: 0; z-index: 25; pointer-events: none; background-repeat: repeat; }
body.protect .page { -webkit-user-select: none; user-select: none; }
body.protect .page input, body.protect .page textarea { -webkit-user-select: text; user-select: text; }
body.protect.is-obscured .main { filter: blur(14px); transition: filter .1s; }
@media print { body.protect * { visibility: hidden !important; } body.protect::after { visibility: visible; content: 'Printing is disabled for this business. Use Download instead.'; position: fixed; top: 40%; left: 0; right: 0; text-align: center; font: 600 18px sans-serif; color: #000; } }
.protect-row { margin: 10px 0 4px; }

/* Download menu (PDF / Excel / CSV / email / schedule) */
.dlmenu { position: relative; display: inline-block; }
.dl-raise { position: relative; z-index: 30; }
.dl-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 250px; padding: 6px; display: flex; flex-direction: column;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.dl-list[hidden] { display: none; }
.card-foot .dl-list { right: auto; left: 0; }
.dl-list [role="menuitem"] { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font: inherit; font-size: .9rem; text-align: left; text-decoration: none; cursor: pointer; min-height: 40px; }
.dl-list [role="menuitem"]:hover, .dl-list [role="menuitem"]:focus-visible { background: var(--panel-2); outline: none; }
.dl-list [role="menuitem"]:focus-visible { box-shadow: inset 0 0 0 2px var(--purple); }
.dl-group { margin: 6px 10px 2px; font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dl-group:first-child { margin-top: 2px; }
.tag-pro { background: color-mix(in srgb, var(--purple) 20%, transparent); color: var(--purple); }
.dl-dialog { width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 24px; border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--panel-solid); color: var(--text); }
.dl-dialog::backdrop { background: rgba(5, 6, 13, .6); }
.dl-dialog h2 { margin: 0 0 6px; font-size: 1.15rem; }
.dl-dialog .notice { margin: 0; }
.panel[id] { scroll-margin-top: 84px; }
.dl-freq legend { padding: 0 4px; font-weight: 600; font-size: .9rem; }
@media (max-width: 640px) {
  .dlmenu, .dlmenu .dl-btn { width: 100%; }
  .dl-list, .card-foot .dl-list { left: 0; right: 0; min-width: 0; }
}

/* Plans page: comparison table (features on the left, one column per plan) */
.plans-title { margin-left: auto; margin-right: auto; }
.period-switch { text-align: center; }
#perY:checked ~ .plan-cmp .pm { display: none; }
#perY:checked ~ .plan-cmp .py { display: inline-flex; }
#perY:checked ~ .plan-cmp span.py { display: inline; }
.plan-cmp { overflow-x: auto; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.plan-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.plan-table th, .plan-table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.plan-table thead th { border-top: 0; vertical-align: top; padding-top: 20px; padding-bottom: 18px; }
.plan-table .pt-feat { width: 30%; text-align: left; font-weight: 400; }
.pt-intro-title { margin: 0 0 10px; font-size: 1.1rem; font-weight: 600; color: var(--text); }
.pt-points { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 7px; font-size: .84rem; color: var(--text-2); }
.pt-points li { position: relative; padding-left: 22px; }
.pt-points li::before { content: ""; position: absolute; left: 3px; top: .2em; width: 5px; height: 10px; border: solid var(--good); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pt-label { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.plan-table tbody th { text-align: left; font-weight: 400; color: var(--text-2); }
.plan-table td { text-align: center; font-weight: 600; }
.plan-table td.is-no { color: var(--muted); font-weight: 400; }
.plan-table .pt-plan { text-align: left; width: 23.3%; }
.plan-table .pt-plan h3 { margin: 0 0 4px; font-size: 1.1rem; text-transform: none; letter-spacing: 0; }
.plan-table .pt-plan .plan-price { margin: 10px 0 12px; }
.plan-table .pt-best { background: color-mix(in srgb, var(--purple) 9%, transparent); }
.plan-table thead .is-current { box-shadow: inset 0 3px 0 var(--purple); }
.plan-table .pt-feat, .plan-table tbody th { position: sticky; left: 0; z-index: 1; background: var(--panel-solid); }
.plan-flag.is-empty { visibility: hidden; }
.plan-flag { display: inline-block; margin-bottom: 8px; font-size: .7rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--grad); color: #fff; }
@media (max-width: 640px) {
  .plan-table { min-width: 620px; font-size: .8rem; }
  .plan-table th, .plan-table td { padding: 9px 10px; }
  .plan-table .pt-feat, .plan-table tbody th { width: 130px; min-width: 130px; }
  .plan-table .pt-plan .plan-price strong { font-size: 1.3rem; }
}

/* Import: "What are you importing?" platform picker */
.pick-groups { display: grid; grid-template-columns: 2fr 1.6fr 1fr; gap: 18px; }
.pick-group h3 { margin: 0 0 8px; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pick-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-btns .pick-btn { padding: 9px 14px; min-height: 40px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--panel-2); color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; }
.pick-btns .pick-btn:hover { border-color: var(--purple); }
.pick-btns .pick-btn:focus-visible, .linkbtn.pick-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-btns .pick-btn[aria-pressed="true"] { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow-strong); }
.linkbtn.pick-btn[aria-pressed="true"] { font-weight: 600; }
.pick-guide { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); }
.pick-guide h3 { margin: 0 0 6px; font-size: .95rem; text-transform: none; letter-spacing: 0; }
.pick-guide ul { margin: 0 0 12px; padding-left: 18px; }
.pick-guide li { margin: 4px 0; font-size: .9rem; color: var(--text-2); }
@media (max-width: 900px) { .pick-groups { grid-template-columns: 1fr; } }

/* Owner panel: storage meter */
.pill-warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.pill-bad { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.storage-line { margin: 0 0 10px; }
.storage-bar { height: 12px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; margin-bottom: 10px; }
.storage-bar > div { height: 100%; border-radius: 99px; background: var(--good); }
.storage-bar.is-warn > div { background: var(--warn); }
.storage-bar.is-urgent > div { background: var(--bad); }

/* Channels: profit and loss by channel */
.pl-insights { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.pl-insights li { padding: 9px 12px; border-radius: var(--radius-sm); border-left: 3px solid var(--line-2); background: var(--panel-2); font-size: .9rem; }
.pl-insights li.is-good { border-left-color: var(--good); background: var(--good-soft); }
.pl-insights li.is-bad { border-left-color: var(--bad); background: var(--bad-soft); }
.pl-insights li.is-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.pl-insights li.is-lock { border-left-color: var(--purple); }
.tbl tr.pl-total td { border-top: 2px solid var(--line-2); }

/* Sample data banner */
.sample-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.btnrow.center { justify-content: center; }

/* Business health page */
.health-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.health-head .lead { flex: 1 1 380px; margin: 0; }
.health-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .health-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.health-kpis .kpi-value { font-size: clamp(1.25rem, 2.2vw, 1.6rem); overflow-wrap: anywhere; }
.health-actions { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.health-actions li { padding-left: 4px; line-height: 1.5; }
.health-actions li::marker { font-weight: 700; color: var(--purple); }
.health-list { list-style: none; margin: 0 0 14px; padding: 0; }
.health-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.health-list li span { min-width: 0; overflow-wrap: anywhere; }

/* ad insights */
.score { font-size: 2.4rem; font-weight: 700; line-height: 1.1; margin: 4px 0 2px; }
.score small { font-size: 1rem; font-weight: 500; color: var(--muted); margin-left: 2px; }
.score-good { color: var(--good); } .score-fair { color: var(--warn); } .score-attention { color: var(--bad); }
.insight-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.insight { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.insight.is-bad { background: var(--bad-soft); border-color: var(--bad); }
.insight.is-warn { background: var(--warn-soft); border-color: var(--warn); }
.insight.is-good { background: var(--good-soft); border-color: var(--good); }

/* Products & mapping (products.php) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pm-kpis .kpi.pm-short { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.pm-tabs a[aria-current="page"] { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.pm-form { align-items: start; }
.pm-form .pm-wide { grid-column: 1 / -1; }
.pm-form textarea { width: 100%; resize: vertical; }
.pm-form .btnrow { margin-top: 0; }
.pm-form .pm-end { align-self: end; padding-bottom: 2px; }
.pm-form input[readonly] { opacity: .7; }
.pm-linkform { margin-top: 12px; }
.pm-delete { margin-top: 18px; }
.pm-filter { margin-bottom: 12px; }
.pm-filter input[type="search"] { flex: 1 1 220px; max-width: 360px; }
.pm-table td { vertical-align: top; }
.pm-table td > .btn-small { margin-top: -5px; }
.pm-nowrap { white-space: nowrap; }
.pm-table code, .pm-panel code { font-size: .82rem; overflow-wrap: anywhere; }
.pm-listings { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-listing { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.pm-pick { min-width: 230px; }
.pm-pick input { width: 100%; }
.pm-why { display: block; margin-top: 4px; font-size: .76rem; color: var(--text-2); line-height: 1.4; }
.pm-bulkbar { margin: 0 0 10px; align-items: center; }
.pm-pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.pm-pager .note { margin: 0 auto 0 0; }
@media (max-width: 820px) {
  .pm-table td { vertical-align: middle; }
  .pm-table .sku { text-align: right; }
  .pm-pick { min-width: 0; flex-direction: column; align-items: flex-end !important; }
  .tbl-stack td.pm-pick input:not([type="checkbox"]) { width: 100%; max-width: none; }
  .pm-why { text-align: right; }
  .pm-listings { justify-content: flex-end; }
  .pm-filter input[type="search"] { max-width: none; }
}
.pm-cell { min-width: 0; }
@media (max-width: 820px) { .tbl-stack td > .pm-cell { text-align: right; overflow-wrap: anywhere; } }

/* ---------- Ads workspace (ads.php) ---------- */
.ads { display: flex; flex-direction: column; gap: 18px; }
.ads .card { margin-bottom: 0; }
.ads h2 { margin: 0 0 10px; }
.ads-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; }
.ads-head .page-title { margin: 2px 0 4px; }
.ads-eyebrow { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); font-weight: 600; margin: 0; }
.ads-sub { margin: 0; font-size: .92rem; }
.ads-period { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ads-tabs { margin-bottom: 0; }
.ads-tabs a[aria-current="page"] { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.ads-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ads-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: .82rem; color: var(--text-2); white-space: nowrap; text-decoration: none; }
a.ads-chip-link:hover { color: var(--text); border-color: var(--accent); }
.ads-chip-link { max-width: 100%; white-space: normal; text-align: left; padding-top: 5px; padding-bottom: 5px; line-height: 1.35; }
.ads-chips .inline-form { max-width: 100%; }
.ads-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ads-dot-good { background: var(--good); } .ads-dot-warn { background: var(--warn); } .ads-dot-bad { background: var(--bad); }
.ads-hero { display: flex; flex-wrap: wrap; gap: 16px; }
.ads-flow { flex: 2 1 540px; display: flex; flex-direction: column; gap: 16px; background-image: var(--grad-soft); }
.ads-leak { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background-image: linear-gradient(180deg, var(--bad-soft), transparent 65%); }
.ads-leak .ads-big { color: var(--bad); }
.ads-flow-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.ads-flow-row > div { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.ads-k { font-size: .8rem; color: var(--text-2); }
.ads-big { font-size: 1.75rem; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
.ads-big.is-good { color: var(--good); } .ads-big.is-bad { color: var(--bad); }
.ads-d { font-size: .8rem; color: var(--text-2); }
.ads-d.is-good { color: var(--good); } .ads-d.is-bad { color: var(--bad); } .ads-d.is-warn { color: var(--warn); }
.ads-arrow { color: var(--muted); font-size: 1.3rem; }
.ads-split { display: flex; flex-direction: column; gap: 8px; }
.ads-split .note { margin: 0; }
.ads-split-bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: var(--panel-2); }
.ads-seg { display: block; height: 100%; }
.ads-seg-cost { background: #5b67a8; } .ads-seg-fees { background: #7366d6; } .ads-seg-ship { background: #9585e0; } .ads-seg-returns { background: #c084fc; }
.ads-seg-gst { background: #8f94b8; } .ads-seg-ads { background: var(--rose); } .ads-seg-profit { background: var(--good); }
.ads-split-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--text-2); }
.ads-split-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.ads-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ads-leg-ads { color: var(--rose); } .ads-leg-profit { color: var(--good); font-weight: 600; }
.ads-leak-list { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .86rem; }
.ads-leak-list li { display: flex; justify-content: space-between; gap: 10px; }
.ads-leak-list a { color: var(--text); overflow-wrap: anywhere; }
.ads-leak .btn { align-self: flex-start; margin-top: auto; }
.ads-row-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.ads-row-head h2 { margin: 0; }
.ads-row-head .note { margin: 0; }
.ads-lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ads-lane { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ads-lane-head { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 11px; font-weight: 700; }
.ads-lane-scale .ads-lane-head { background: var(--good-soft); color: var(--good); }
.ads-lane-hold .ads-lane-head { background: var(--info-soft); color: var(--info); }
.ads-lane-fix .ads-lane-head { background: var(--warn-soft); color: var(--warn); }
.ads-lane-stop .ads-lane-head { background: var(--bad-soft); color: var(--bad); }
.ads-lane-empty { margin: 4px 2px; }
.ads-vcard { display: flex; flex-direction: column; gap: 5px; padding: 12px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; color: var(--text); min-height: 44px; }
.ads-vcard:hover { border-color: var(--line-2); }
.ads-vcard strong { font-size: .95rem; }
.ads-vcard .note { margin: 0; line-height: 1.4; }
.ads-vval { font-size: 1.05rem; font-weight: 600; }
.ads-lane-scale .ads-vval { color: var(--good); } .ads-lane-hold .ads-vval { color: var(--info); } .ads-lane-fix .ads-vval { color: var(--warn); } .ads-lane-stop .ads-vval { color: var(--bad); }
.ads-two { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.ads-two > .card { flex: 1 1 340px; }
.ads-two > .ads-moves { flex: 3 1 520px; }
.ads-two > .ads-per100 { flex: 2 1 300px; }
.ads-move { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel-2); margin-bottom: 10px; }
.ads-move-text { display: flex; flex-direction: column; gap: 3px; flex: 1 1 280px; min-width: 0; }
.ads-move-text .note { margin: 0; }
.ads-move-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ads-gain { font-size: .86rem; color: var(--good); font-weight: 600; }
.ads-bar-row, .ads-wf-row { display: grid; grid-template-columns: minmax(80px, 140px) minmax(0, 1fr) 82px; gap: 10px; align-items: center; margin: 8px 0; font-size: .88rem; }
.ads-bar-row .num, .ads-wf-row .num { text-align: right; }
.ads-bar { height: 10px; border-radius: 5px; background: var(--panel-2); overflow: hidden; display: block; }
.ads-bar > span { display: block; height: 100%; border-radius: 5px; }
.ads-bar .is-good { background: var(--good); } .ads-bar .is-bad { background: var(--bad); } .ads-bar .is-total { background: var(--c-prev); }
.ads-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.ads-lens { display: inline-flex; gap: 3px; padding: 4px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line); flex-wrap: wrap; }
.ads-lens a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .88rem; }
.ads-lens a[aria-selected="true"] { color: var(--accent-text, #fff); background: var(--grad); }
.ads-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ads-explore { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.ads-trail { flex: 1 1 220px; max-width: 280px; }
.ads-trail ol { list-style: none; margin: 8px 0 14px; padding: 0; }
.ads-trail li { display: flex; gap: 10px; padding: 8px 0; position: relative; }
.ads-trail li:not(:last-child)::after { content: ''; position: absolute; left: 5px; top: 24px; bottom: -8px; width: 2px; background: var(--line-2); }
.ads-trail-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); margin-top: 3px; flex: none; box-sizing: border-box; background: var(--panel); }
.ads-trail li.is-here .ads-trail-dot { background: var(--grad); border: 0; }
.ads-trail-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.ads-trail-txt .note { margin: 0; font-size: .75rem; }
.ads-views { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }
.ads-views li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ads-viewsave { display: flex; gap: 6px; flex-wrap: wrap; }
.ads-viewsave label { flex: 1 1 120px; } .ads-viewsave input { width: 100%; }
.ads-table { flex: 999 1 520px; min-width: 0; padding: 4px 0 0; }
.ads-table .tbl td { vertical-align: top; }
.ads-table tfoot td { border-top: 1px solid var(--line-2); font-weight: 600; }
.ads-foot { padding: 4px 16px 14px; }
.ads-sel td { background: var(--accent-soft); }
.ads-why { flex: 1 1 320px; max-width: 420px; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); order: 2; }
.ads-why h2 { font-size: 1rem; text-transform: none; letter-spacing: 0; margin: 2px 0 0; }
.ads-why p { line-height: 1.5; }
.ads-todo { padding: 11px 13px; border-radius: 12px; background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 45%, transparent); font-size: .9rem; line-height: 1.45; margin-top: 10px; }
.ads-kw { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: .72rem; font-weight: 600; }
.ads-kw-brand { background: var(--info-soft); color: var(--info); } .ads-kw-generic { background: var(--accent-soft); color: var(--accent); } .ads-kw-competitor { background: var(--warn-soft); color: var(--warn); }
.ads-v { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.ads-v-scale { background: var(--good-soft); color: var(--good); } .ads-v-hold { background: var(--info-soft); color: var(--info); }
.ads-v-fix { background: var(--warn-soft); color: var(--warn); } .ads-v-stop { background: var(--bad-soft); color: var(--bad); }
.ads-tag-meta { background: color-mix(in srgb, var(--blue) 18%, transparent); color: var(--blue); }
.ads-tag-google { background: var(--good-soft); color: var(--good); }
.ads-assign { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.ads-assign label { flex: 1 1 140px; } .ads-assign input { width: 100%; min-height: 34px; }
.ads-rulebox { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.ads-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 1.02rem; color: var(--text-2); }
.ads-slot { display: inline-flex; flex-direction: row; align-items: center; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--accent-soft); }
.ads-slot select, .ads-slot input { border: 0; background: transparent; color: var(--text); font-weight: 600; min-height: 42px; }
.ads-slot-mode { border-color: color-mix(in srgb, var(--good) 55%, var(--line)); background: var(--good-soft); }
.ads-sentence-btns { width: 100%; margin-top: 6px; }
.ads-rule { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 10px; }
.ads-rule.is-off { opacity: .65; }
.ads-sched { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: .9rem; }
.ads-sched li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
.ads-sched .num { color: var(--text-2); }
.ads-checks { display: flex; flex-direction: column; gap: 8px; }
.ads-conns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.ads-conn { display: flex; flex-direction: column; gap: 10px; }
.ads-conn.is-warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.ads-conn .note { margin: 0; }
.ads-conn-head { display: flex; gap: 12px; align-items: center; }
.ads-conn-head > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ads-logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; flex: none; }
.ads-logo-meta { background: color-mix(in srgb, var(--blue) 18%, transparent); color: var(--blue); }
.ads-logo-google { background: var(--good-soft); color: var(--good); }
.ads-logo-amazon { background: color-mix(in srgb, var(--c-amz) 18%, transparent); color: var(--c-amz); }
.ads-logo-linkedin { background: color-mix(in srgb, #0a66c2 18%, transparent); color: #3b8fe0; }
.ads-accts fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.ads-conn .btnrow { margin-top: 0; }
@media (max-width: 820px) {
  .ads-head { align-items: stretch; }
  .ads-tabs { flex-wrap: wrap; overflow: visible; }
  .ads-period { width: 100%; }
  .ads-period label { flex: 1 1 140px; } .ads-period select, .ads-period input { width: 100%; }
  .ads-flow-row { flex-direction: column; align-items: flex-start; }
  .ads-arrow { transform: rotate(90deg); line-height: 1; }
  .ads-big { font-size: 1.45rem; }
  .ads-trail { max-width: none; order: 0; }
  .ads-why { max-width: none; order: 1; }
  .ads-table { order: 2; }
  .ads-filters { width: 100%; }
  .ads-filters label { flex: 1 1 140px; } .ads-filters select { width: 100%; }
  .ads-lens { width: 100%; } .ads-lens a { flex: 1 1 auto; justify-content: center; padding: 0 8px; font-size: .82rem; }
  .ads-move-btns { width: 100%; } .ads-move-btns .btn, .ads-move-btns form { flex: 1 1 auto; }
  .ads-move-btns form.inline { display: flex; gap: 8px; } .ads-move-btns form .btn { flex: 1 1 0; }
  .ads-bar-row, .ads-wf-row { grid-template-columns: minmax(70px, 100px) minmax(0, 1fr) 76px; }
  .ads-table .tbl-stack td { text-align: right; }
  .ads-table tfoot tr { display: block; }
  .ads-sentence { font-size: .95rem; }
  .ads-sentence-btns .btn { flex: 1 1 auto; }
}

/* Profit grid (D2) */
.grid-wrap { max-height: 72vh; overflow: auto; }
.grid-tbl thead th { position: sticky; top: 0; background: var(--panel-solid); z-index: 2; }
.grid-tbl .grid-prod { position: sticky; left: 0; background: var(--panel-solid); z-index: 1; text-align: left; min-width: 180px; max-width: 260px; }
.grid-tbl thead .grid-prod { z-index: 3; }
.grid-tbl .grid-prod a, .grid-tbl .grid-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid-tbl .grid-prod small { display: block; font-weight: 400; }
.grid-tbl td.g-good { background: var(--good-soft); color: var(--good); }
.grid-tbl td.g-thin { background: var(--warn-soft, rgba(234,170,0,.14)); }
.grid-tbl td.g-bad { background: var(--bad-soft); color: var(--bad); }
.grid-tbl .est { margin-right: .2em; opacity: .75; font-weight: 400; }
.grid-est { margin: 8px 0 12px; }
.grid-tbl tfoot th, .grid-tbl tfoot td { border-top: 2px solid var(--line-2); }
@media (max-width: 640px) { .grid-tbl .grid-prod { min-width: 130px; max-width: 150px; } .grid-wrap { max-height: none; } }
.grid-tbl tbody th, .grid-tbl tfoot th { text-transform: none; letter-spacing: normal; font-size: .88rem; color: var(--text); }
.grid-tbl tbody th a { text-decoration: none; }
.biz-months { display: grid; gap: 6px; }
.biz-month { border: 1px solid var(--line); border-radius: 10px; }
.biz-month summary { display: flex; gap: 12px; align-items: center; padding: 10px 14px; cursor: pointer; }
.biz-month summary span:first-child { font-weight: 600; min-width: 80px; }
.biz-month summary strong { margin-left: auto; }
.biz-list { list-style: none; margin: 0; padding: 0 14px 10px; }
.biz-list li { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.biz-list li > span:first-child { flex: 1; min-width: 0; }
.biz-list small { display: block; }

/* Team access (K1–K3) */
.access-form { margin-top: 8px; }
.access-scope { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; grid-column: 1 / -1; }
.access-scope legend { font-size: .85rem; padding: 0 4px; }
.access-chs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }
.code-sample { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: .85rem; white-space: pre-wrap; overflow-x: auto; }
.store-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.store-head h2 { margin: 0; }
.steps-mini { margin: 8px 0 14px; padding-left: 20px; color: var(--text-2); }
.steps-mini li { margin: 4px 0; }

/* Setup wizard (N1) */
.setup-progress { height: 10px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin: 6px 0 4px; }
.setup-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-cur, #7c6cff), var(--good)); border-radius: 99px; }
.setup-steps { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.setup-step { display: flex; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.setup-step.is-done { opacity: .75; }
.setup-num { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; border: 2px solid var(--line-2); }
.setup-step.is-done .setup-num { background: var(--good-soft); color: var(--good); border-color: var(--good); }
.setup-body { min-width: 0; flex: 1; }
.setup-body h2 { font-size: 1rem; margin: 4px 0 2px; }
.setup-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; border-radius: 14px;
  border: 1px solid var(--line-2); background: var(--info-soft); color: var(--text); text-decoration: none; }
.setup-banner-bar { flex: 1 1 120px; height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.setup-banner-bar span { display: block; height: 100%; background: var(--good); }
.setup-banner-go { font-weight: 600; }
.access-cell { min-width: 0; }
.access-cell details { margin-top: 4px; }
@media (max-width: 640px) { .access-cell { text-align: right; } .access-cell .access-form { text-align: left; } }
.ads-bebids { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px 0; }
.whatif-in { display: inline-flex; align-items: center; gap: 4px; }
.whatif-in input { width: 76px; text-align: right; }
.whatif-btns { padding: 12px 16px 0; }
.where-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.where-two .panel { min-width: 0; }
.where-copy { display: block; margin: 12px 0 8px; font-size: .85rem; }
.where-copy textarea { width: 100%; margin-top: 4px; font-size: .85rem; }
@media (max-width: 900px) { .where-two { grid-template-columns: 1fr; } }

/* Data quality (N6) */
.dq-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.dq-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.dq-icon { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; }
.dq-good .dq-icon { background: var(--good-soft); color: var(--good); }
.dq-warn .dq-icon { background: var(--warn-soft); color: var(--warn, #d97706); }
.dq-bad .dq-icon { background: var(--bad-soft); color: var(--bad); }
.dq-info .dq-icon { background: var(--info-soft); color: var(--text-2); }
.dq-body { flex: 1; min-width: 0; }
.dq-body h2 { font-size: 1rem; margin: 0 0 2px; }
.dq-body p { margin: 0; color: var(--text-2); }
@media (max-width: 640px) { .dq-item { flex-wrap: wrap; } .dq-item .btn { margin-left: 46px; } }

/* Ask Digi (J1–J3) */
.ask-form textarea { width: 100%; font-size: 1rem; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ask-chips button { cursor: pointer; font: inherit; }
.ask-q { font-weight: 600; margin: 0 0 8px; }
.ask-a p { margin: 0 0 8px; }
.ask-a ul { margin: 0 0 8px; padding-left: 20px; }
.ask-hist { margin: 6px 0; }
.brand-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.brand-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.brand-item > div { display: flex; flex-direction: column; min-width: 0; }
.brand-item.is-on { border-color: var(--good); }
.help-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.help-search { display: flex; gap: 8px; margin: 8px 0 16px; }
.help-search input { flex: 1; min-width: 0; }
.help-topic { margin: 18px 0 8px; font-size: .95rem; color: var(--text-2); }
.faq ol { margin: 0 0 8px; padding-left: 20px; }
.ads-halo { margin-top: 16px; } .ads-halo .ads-flow-row { margin-top: 8px; }
.dp-bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin: 12px 0 4px; }
.dp-bar { flex: 1; background: var(--c-cur, #7c6cff); border-radius: 3px 3px 0 0; min-width: 0; }
.dp-bar.is-quiet { background: var(--line-2); }
.dp-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-bottom: 8px; }
.season-list { display: grid; gap: 14px; }
.season-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.season-head h2 { margin: 0 0 2px; }
.unusual-box ul { margin: 6px 0; padding-left: 18px; } .unusual-box { margin-bottom: 14px; }
.copy-list { list-style: none; padding: 0; margin: 4px 0 8px; }
.copy-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }

/* Custom overview */
#dash.is-custom { display: flex; flex-direction: column; }
.dash-custom { margin: 8px 0 16px; }
.dash-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 16px; margin: 8px 0; }
.dash-pick { display: flex; align-items: center; gap: 8px; }
.dash-pick span { flex: 1; }
.dash-pick input[type=number] { width: 58px; }
.file-queue { margin-top: 10px; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: 12px; }

/* Google Sheets links (D7) */
.sheet-links { display: grid; gap: 8px; margin: 10px 0; }
.sheet-links label { display: grid; gap: 4px; font-size: .85rem; }
.sheet-links input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; width: 100%; min-width: 0; }

/* Who buys on Amazon (H5) */
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.demo-card h3 { margin-top: 0; }
.demo-bar { display: inline-block; height: 8px; width: calc(var(--w, 0%) * 0.6); max-width: 60px; background: var(--accent); border-radius: 4px; margin-right: 6px; vertical-align: middle; }

/* v1.9 Overview: health card, channel status, four main tiles, help "?", explain panels, drill bar */
.kpi-label { display: flex; align-items: center; gap: 6px; }
.kpi.is-loss .kpi-value { color: var(--bad); }
.kpi-nodata { font-size: 1.1rem; color: var(--muted); font-weight: 500; }
.kpi-word { font-size: .72rem; font-weight: 600; text-transform: none; letter-spacing: 0; }
.kpi-word.is-good { color: var(--good); } .kpi-word.is-bad { color: var(--bad); }
.q { display: inline-grid; place-items: center; width: 18px; height: 18px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--text-2);
  font: 600 .7rem/1 inherit; cursor: pointer; text-transform: none; letter-spacing: 0; flex: none; position: relative; z-index: 2; }
.q:hover, .q[aria-expanded="true"] { background: var(--accent-soft); color: var(--text); border-color: var(--purple); }
.q::after { content: ''; position: absolute; inset: -12px; } /* bigger touch target */
.help-pop { position: fixed; z-index: 80; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.55);
  font-size: .85rem; color: var(--text-2); }
.help-pop p { margin: 6px 0 0; }
.help-pop .help-t { color: var(--text); font-size: .92rem; }
.help-pop b { color: var(--text); font-weight: 600; }
.status-block { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
.status-block > :only-child { grid-column: 1 / -1; }
.health-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--grad-soft); color: var(--text); text-decoration: none; }
.health-card:hover { box-shadow: var(--glow-strong); }
.health-k { display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 600; color: var(--text-2); }
.health-k .ico { width: 16px; height: 16px; color: var(--rose); }
.health-nums { display: flex; gap: 28px; flex-wrap: wrap; }
.health-nums > span { display: flex; flex-direction: column; gap: 2px; }
.health-nums small { color: var(--text-2); font-size: .75rem; }
.health-nums strong { font-size: 1.4rem; font-weight: 600; }
.health-line { font-size: .9rem; color: var(--text-2); }
.health-line strong { color: var(--text); }
.health-sub { font-size: .78rem; color: var(--muted); }
.health-go { margin-top: auto; font-size: .85rem; font-weight: 600; color: var(--purple); }
.ch-status-card { margin: 0; }
.card-title { margin: 0 0 10px; }
.ch-status { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.chs { display: grid; grid-template-columns: minmax(80px, 1fr) auto minmax(0, 1.4fr); gap: 10px; align-items: center; font-size: .88rem; }
.chs-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chs-badge { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; border: 1px solid; white-space: nowrap; }
.chs-why { color: var(--text-2); font-size: .82rem; }
.chs-ok .chs-badge { color: var(--good); background: var(--good-soft); }
.chs-watch .chs-badge { color: var(--warn); background: var(--warn-soft); }
.chs-act .chs-badge { color: var(--bad); background: var(--bad-soft); }
.chs-few .chs-badge { color: var(--muted); background: var(--panel-2); }
.explain { margin-top: 10px; font-size: .85rem; color: var(--text-2); }
.explain > summary { cursor: pointer; color: var(--purple); font-weight: 600; font-size: .82rem; width: fit-content; }
.explain ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.explain p { margin: 8px 0 0; }
.explain strong { color: var(--text); }
.card-titles { margin-right: auto; min-width: 0; }
.card-head .card-titles h2 { margin: 0; text-transform: none; letter-spacing: 0; font-size: 1rem; }
.card-sub { margin: 2px 0 6px; font-size: .78rem; color: var(--muted); }
h3 + .card-sub { margin-top: -4px; }
#shareTitle, #adTitle { text-transform: none; letter-spacing: 0; font-size: .95rem; }
.sw-sofar { border-top: 2px dotted var(--c-cur); height: 0; }
.drill-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 1024px) { .status-block { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .chs { grid-template-columns: 1fr auto; } .chs-why { grid-column: 1 / -1; margin-top: -4px; } }
.fresh-chip { font-size: .74rem; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.fresh-chip.is-old { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
@media (max-width: 700px) { .fresh-chip { font-size: .66rem; padding: 3px 7px; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; } }
.trends-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.tr-spark { display: block; }
.tr-spark.is-good { color: var(--good); } .tr-spark.is-bad { color: var(--bad); }
.trends-few > summary { cursor: pointer; font-weight: 600; }
.empty-state h2 { margin-top: 0; }
.alert-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
@media (max-width: 700px) { .alert-item { flex-wrap: wrap; } .alert-acts { width: 100%; } }
.dash-picks[data-js] { grid-template-columns: 1fr; max-width: 520px; }
.dash-move { display: inline-flex; gap: 4px; }
.dash-move .btn { min-width: 34px; padding: 4px 8px; }
.no-match { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.no-match span { flex: 1 1 260px; }
.have-box { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2); }
.have-box h3 { margin: 0 0 8px; }
.date-order { margin: 10px 0; padding: 12px 14px; border: 1px solid var(--warn); border-radius: var(--radius-sm); background: var(--warn-soft); }
.date-order p { margin: 0 0 6px; }
.date-choice { display: flex; flex-direction: column; gap: 6px; }
.receipt-link { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.receipt-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.receipt-head h2 { margin: 2px 0 4px; text-transform: none; letter-spacing: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.receipt-no { margin: 0; font-size: .78rem; color: var(--muted); }
.pager { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.gsign { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.gsign h2 { margin: 0 0 4px; font-size: 1.05rem; }
.gsign p { margin: 0; max-width: 70ch; }
.gsign .btnrow { margin: 0; }
.conn-group { margin-bottom: 26px; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.conn-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.conn-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.conn-head h3 { margin: 0; text-transform: none; letter-spacing: 0; font-size: 1rem; }
.conn-head .note { margin: 2px 0 0; }
.conn-badge { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; border: 1px solid; white-space: nowrap; }
.conn-ok .conn-badge { color: var(--good); background: var(--good-soft); }
.conn-warn .conn-badge { color: var(--warn); background: var(--warn-soft); }
.conn-none .conn-badge { color: var(--muted); background: var(--panel-2); }
.conn-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.conn-status { margin: 0; font-size: .88rem; color: var(--text-2); }
.conn-problem { margin: 0; font-size: .85rem; color: var(--warn); }
.conn-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }
.conn-actions .btn { gap: 6px; }
.conn-actions .ico { width: 15px; height: 15px; }
.conn-nolive { font-size: .78rem; color: var(--muted); flex: 1 1 100%; order: 3; }
.conn-sheet { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.conn-sheet p { margin: 0; font-size: .86rem; }
.sheet-dlg { max-width: 760px; width: calc(100vw - 32px); border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel-solid); color: var(--text); padding: 20px; }
.sheet-dlg::backdrop { background: rgba(3, 4, 12, .6); }
.sheet-steps { margin: 0 0 10px; padding-left: 20px; color: var(--text-2); font-size: .9rem; display: flex; flex-direction: column; gap: 4px; }
.note-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-top: 8px; }
.note-form label:nth-child(3) { flex: 1 1 280px; }
.preview-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-color: var(--purple); }
.preview-bar span { flex: 1 1 300px; }
.report-hold label { display: block; }
.report-hold input[type=number] { width: 70px; display: inline-block; margin: 0 6px; }
.cmp-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin: 6px 0 16px; }
.cmp-form fieldset { display: flex; gap: 8px; align-items: end; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px 10px; margin: 0; }
.cmp-form legend { font-weight: 700; font-size: .8rem; padding: 0 4px; }
.cmp-tbl td:first-child { white-space: nowrap; }
.cmp-tbl tr.cmp-key td { background: var(--accent-soft); }
.cmp-checks ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cmp-checks li { display: flex; gap: 8px; align-items: baseline; }
.cmp-checks li span { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .75rem; }
.cmp-checks li.is-ok span { color: var(--good); background: var(--good-soft); }
.cmp-checks li.is-warn span { color: var(--warn); background: var(--warn-soft); }
.dec-verdict h2 { margin-top: 0; font-size: 1.15rem; text-transform: none; letter-spacing: 0; }
.dec-winner { border-color: var(--good); }
.dec-insufficient { border-color: var(--warn); }
.dec-flip { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.dec-try > summary { cursor: pointer; font-weight: 600; }
/* v1.10 refer a seller */
.refer h2 { margin: 0 0 6px; font-size: 1.05rem; }
.refer-link { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.refer-link input { flex: 1 1 280px; min-width: 0; font-family: var(--mono, monospace); }
/* v1.10 support access */
.support-log { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; font-size: .88rem; }
.support-log .muted { display: inline-block; min-width: 92px; }
/* v1.10 14-day survey */
.survey { margin-bottom: 16px; }
.survey legend { font-weight: 600; margin-bottom: 8px; }
.survey-nums { display: flex; flex-wrap: wrap; gap: 6px; }
.survey-nums label { position: relative; }
.survey-nums input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.survey-nums span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; }
.survey-nums input:checked + span { background: var(--accent, #7c5cff); border-color: transparent; color: #fff; }
.survey-nums input:focus-visible + span { outline: 2px solid var(--accent, #7c5cff); outline-offset: 2px; }
.survey-ends { display: flex; justify-content: space-between; max-width: 480px; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.fb-kinds { border: 0; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.fb-kinds legend { font-weight: 600; margin-bottom: 4px; }
.fb-msg { max-width: 60ch; white-space: normal; }
.survey .survey-scale { border: 0; padding: 0; margin: 0 0 6px; min-width: 0; }
.survey .survey-scale legend { padding: 0; float: left; width: 100%; margin-bottom: 10px; }
.survey .survey-scale legend + * { clear: both; }
#leads form.filters { margin-top: 10px; }
/* v1.10 audit: long tick-box labels in one-line forms wrap instead of pushing the page wider on phones */
.inline-form > label.check { flex: 1 1 240px; min-width: 0; }
.inline-form > label:not(.check) { min-width: 0; max-width: 100%; }
/* an input inside a stacked label must not take its flex size as height */
.inline-form label > input:not([type="checkbox"]):not([type="radio"]), .inline-form label > select { flex: 0 0 auto; min-width: 0; }

/* ===================== v1.11: text size, font, Settings like Claude ===================== */
html[data-size="s"] { font-size: 93.75%; }
html[data-size="l"] { font-size: 112.5%; }
html[data-size="xl"] { font-size: 125%; }
html[data-font="system"] body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif; }
html[data-font="easy"] body { font-family: 'Atkinson Hyperlegible', 'IBM Plex Sans', system-ui, sans-serif; letter-spacing: .01em; }
button, input, select, textarea { font-family: inherit; }

.set-wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 36px; align-items: start; }
.set-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.set-h { margin: 2px 12px 10px; font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; }
.set-group { margin: 14px 0 4px; padding: 12px 12px 0; border-top: 1px solid var(--line); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.set-nav a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: .9rem; }
.set-nav a:hover { background: var(--panel-2); color: var(--text); }
.set-nav a[aria-current="page"] { background: var(--panel-2); color: var(--text); font-weight: 500; }
.set-body { min-width: 0; }
.set-body .narrow { margin-left: 0; }
@media (max-width: 900px) {
  .set-wrap { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .set-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; scrollbar-width: none; }
  .set-h { display: none; }
  .set-group { margin: 0 2px 0 8px; padding: 0 0 0 10px; border-top: 0; border-left: 1px solid var(--line); align-self: center; white-space: nowrap; }
  .set-nav a { white-space: nowrap; border: 1px solid var(--line); flex: none; }
}

/* Appearance page */
.pref { padding: 22px 0; border-bottom: 1px solid var(--line); }
.pref:first-of-type { padding-top: 4px; }
.pref:last-of-type { border-bottom: 0; }
.pref h2 { font-size: 1rem; margin: 0 0 2px; }
.pref > p { margin: 0 0 14px; color: var(--text-2); font-size: .875rem; }
.pref fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.pref legend { position: absolute; left: -9999px; }
.pick3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 640px; }
.pick-card { position: relative; display: flex; flex-direction: column; margin: 0; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; overflow: hidden; background: var(--panel); font-weight: 500; }
.pick-card input { position: absolute; opacity: 0; pointer-events: none; }
.pick-card:has(input:checked) { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
.pick-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-card .pick-name { padding: 10px 12px; font-size: .875rem; }
.pick-card .pick-note { display: block; padding: 0 12px 10px; margin-top: -6px; font-size: .78rem; color: var(--muted); font-weight: 400; }
.mode-prev { display: flex; height: 76px; }
.mode-prev i { display: block; }
.mode-prev .mp-side { width: 32%; padding: 10px 7px; box-sizing: border-box; display: flex; flex-direction: column; gap: 5px; }
.mode-prev .mp-side i { height: 5px; border-radius: 3px; }
.mode-prev .mp-main { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 7px; }
.mode-prev .mp-card { height: 28px; border-radius: 5px; }
.mode-prev .mp-btn { height: 8px; width: 46%; border-radius: 4px; background: linear-gradient(90deg, #4f8cff, #8b5cf6 55%, #ec4899); }
.mp-dark { background: #18181b; } .mp-dark .mp-side { background: #111113; } .mp-dark .mp-side i { background: #45454d; } .mp-dark .mp-card { background: #232327; border: 1px solid #34343a; }
.mp-light { background: #f3f0e7; } .mp-light .mp-side { background: #ebe7dc; } .mp-light .mp-side i { background: #cbc5b4; } .mp-light .mp-card { background: #f9f7f0; border: 1px solid #ddd8ca; }
.mp-auto { background: linear-gradient(90deg, #f3f0e7 50%, #18181b 50%); } .mp-auto .mp-side { background: #ebe7dc; } .mp-auto .mp-side i { background: #cbc5b4; } .mp-auto .mp-card { background: #232327; border: 1px solid #34343a; }
.font-aa { padding: 12px 12px 0; font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.font-aa.f-default { font-family: 'IBM Plex Sans', sans-serif; }
.font-aa.f-system { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.font-aa.f-easy { font-family: 'Atkinson Hyperlegible', sans-serif; font-weight: 700; }
.size-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); }
.size-seg label { margin: 0; display: flex; align-items: center; padding: 6px 14px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-weight: 400; }
.size-seg label input { position: absolute; opacity: 0; pointer-events: none; }
.size-seg label:has(input:checked) { background: var(--panel-2); color: var(--text); font-weight: 600; }
.size-seg label:has(input:focus-visible) { outline: 2px solid var(--accent); }
.size-seg .sz-s { font-size: .82rem; } .size-seg .sz-m { font-size: .9rem; } .size-seg .sz-l { font-size: 1rem; } .size-seg .sz-xl { font-size: 1.1rem; }
.size-prev { margin-top: 14px; max-width: 640px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.size-prev p { margin: 0; }
.size-prev .sp-k { font-size: .8rem; color: var(--muted); }
.size-prev .sp-v { font-size: 1.35rem; font-weight: 600; margin: 2px 0; }
.size-prev .sp-d { font-size: .9rem; color: var(--text-2); }
.lang-list { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.lang-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-size: .95rem; text-align: left; cursor: pointer; box-shadow: none; }
.lang-list button[aria-pressed="true"] { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple); font-weight: 600; }
.lang-list .ln-en { margin-left: auto; color: var(--muted); font-size: .8rem; font-weight: 400; }
.pref-saved { font-size: .82rem; color: var(--good); margin-left: 10px; }
@media (max-width: 640px) { .pick3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .mode-prev { height: 56px; } .font-aa { font-size: 1.3rem; } }

/* Connections: money in / money out (v1.11) */
.conn-formula { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 16px; margin: 0 0 6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: .9rem; }
.conn-formula .cf-in, .conn-formula .cf-out { padding: 3px 10px; border-radius: 99px; font-weight: 500; }
.conn-formula .cf-in { background: var(--good-soft); color: var(--good); }
.conn-formula .cf-out { background: var(--warn-soft); color: var(--warn); }
.conn-formula .cf-op { color: var(--text-2); }
.conn-ghead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.conn-gico { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; }
.conn-gico .ico { width: 20px; height: 20px; }
.conn-in .conn-gico { background: var(--good-soft); color: var(--good); }
.conn-out .conn-gico { background: var(--warn-soft); color: var(--warn); }
.conn-ghead h2 { margin: 0; }
.conn-tag { margin-left: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; vertical-align: middle; }
.conn-in .conn-tag { color: var(--good); } .conn-out .conn-tag { color: var(--warn); }
.conn-ghead p { margin: 2px 0 0; color: var(--text-2); font-size: .875rem; }
.conn-more { margin-top: 10px; }
.conn-more > summary { list-style: none; margin-bottom: 12px; white-space: normal; text-align: left; height: auto; }
.conn-more > summary::-webkit-details-marker { display: none; }
.conn-more[open] > summary { display: none; }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check-list li { padding: 10px 12px 10px 38px; border-radius: 10px; border: 1px solid var(--line); position: relative; }
.check-list li::before { position: absolute; left: 12px; top: 10px; font-weight: 700; }
.check-list li.ok::before { content: '✓'; color: var(--good); }
.check-list li.warn { border-color: var(--warn); background: var(--warn-soft); }
.check-list li.warn::before { content: '!'; color: var(--warn); }
.otab-about { margin: -4px 0 14px; }
.inspect-cover { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: var(--bg); color: var(--text); text-align: center; }
.inspect-cover[hidden] { display: none; }
body.is-inspecting .shell, body.is-inspecting .page { filter: blur(14px); }

/* v1.13 F09: data freshness strip on the dashboard */
.fresh-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: .85rem; }
.fresh-k { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fresh-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 360px; min-width: 0; }
.src-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); color: var(--text-2); max-width: 100%; }
.src-chip b { color: var(--text); font-weight: 600; }
.src-chip > span:not(.fresh-dot) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fresh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.src-chip.is-old .fresh-dot { background: var(--warn); }
.src-chip.is-bad { background: var(--bad-soft); }
.src-chip.is-bad .fresh-dot { background: var(--bad); }
.fresh-acts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fresh-health { text-decoration: none; padding: 3px 10px; border-radius: 999px; background: var(--good-soft); color: var(--good); }
.fresh-health.is-warn { background: var(--warn-soft); color: var(--warn); }
.fresh-health.is-bad { background: var(--bad-soft); color: var(--bad); }
.fresh-how { color: var(--text-2); }
/* v1.13 H11: data health score */
.dq-score { display: flex; align-items: center; gap: 18px; }
.dq-score-n { font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--good); }
.dq-score-n small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.dq-score-warn .dq-score-n { color: var(--warn); }
.dq-score-bad .dq-score-n { color: var(--bad); }
.dq-impact { margin: 4px 0 0; font-size: .8rem; color: var(--muted); }
/* v1.13 F09: how numbers are calculated */
.calc-list dt { font-weight: 600; margin-top: 16px; }
.calc-list dd { margin: 4px 0 0; }
.calc-list dd p { margin: 0 0 4px; }
@media (max-width: 640px) { .fresh-strip { padding: 8px 10px; } .fresh-acts { width: 100%; } .dq-score { gap: 12px; } }
.plain-list { margin: 0; padding-left: 20px; } .plain-list li { margin: 0 0 8px; }
/* v1.14 B01/B02: ad spend overview */
.spend-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.spend-pick { flex-wrap: wrap; }
.spend-bar { display: inline-block; width: 64px; height: 8px; border-radius: 4px; background: var(--panel-2); vertical-align: middle; overflow: hidden; }
.spend-bar > span { display: block; height: 100%; background: var(--c-cur, var(--info)); border-radius: 4px; }
.spend-best { font-weight: 700; color: var(--good); }
.spend-trend { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.spend-day { flex: 1 1 0; min-width: 2px; height: 100%; display: flex; flex-direction: column-reverse; }
.spend-seg { display: block; width: 100%; }
.spend-day .spend-seg:last-child { border-radius: 3px 3px 0 0; }
.spend-c0 { background: #7c8cff; } .spend-c1 { background: #f59e0b; } .spend-c2 { background: #34d399; }
.spend-c3 { background: #f472b6; } .spend-c4 { background: #60a5fa; } .spend-c5 { background: #a78bfa; }
.spend-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; padding: 0; font-size: .82rem; color: var(--text-2); }
.spend-legend span { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.spend-budget { width: 110px; text-align: right; }
.spend-sentence { font-weight: 600; margin: 10px 0; }
.ads-thin { margin-top: 12px; } .ads-thin summary { cursor: pointer; font-weight: 600; } .ads-thin-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.spend-pct { width: 60px; } .inline-label { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* v1.15 Phase 4 */
.claims-kpis .text-good, .text-good { color: var(--good); }
.claim-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.claim-form input { width: 100px; }
.cash-chart { display: flex; align-items: flex-end; gap: 1px; height: 140px; border-bottom: 1px solid var(--line); }
.cash-bar { flex: 1 1 0; min-width: 1px; background: var(--good); opacity: .75; border-radius: 2px 2px 0 0; }
.cash-bar.is-low { background: var(--warn); } .cash-bar.is-neg { background: var(--bad); }
.cash-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cash-days input { width: 70px; }
.reorder-form input { width: 86px; }
.reorder-tbl tr.is-urgent td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.text-warn { color: var(--warn); }
@media (max-width: 640px) { .claim-form input, .reorder-form input { width: 100%; } }
/* v1.16 Phase 5 */
.cmp-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; width: 100%; }
.why-sentence { font-size: 1.05rem; font-weight: 600; margin: 4px 0 8px; }
.why-parts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.why-parts li { display: grid; grid-template-columns: minmax(110px, 180px) 1fr auto; gap: 10px; align-items: center; font-size: .9rem; }
.why-bar { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.why-bar span { display: block; height: 100%; border-radius: 4px; }
.why-bar .is-pos { background: var(--good); } .why-bar .is-neg { background: var(--bad); }
.chip { display: inline-block; font-size: .82rem; padding: 4px 11px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--text-2); text-decoration: none; }
.chip:hover { color: var(--text); } .chip.is-on { background: var(--panel-2); color: var(--text); border-color: var(--text-2); }
.organic-spark { display: inline-flex; align-items: flex-end; gap: 3px; height: 34px; }
.og-wk { display: inline-flex; align-items: flex-end; gap: 1px; height: 100%; }
.og-s, .og-o { display: inline-block; width: 4px; min-height: 1px; border-radius: 2px 2px 0 0; }
.og-s, .og-s-key { background: #f59e0b; } .og-o, .og-o-key { background: #34d399; }
.og-s-key, .og-o-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.price-res { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 12px; }
.price-res dt { font-size: .8rem; color: var(--text-2); }
.price-res dd { margin: 2px 0 0; font-size: 1.4rem; font-weight: 600; }
.price-form label { display: flex; flex-direction: column; gap: 4px; }
.todo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.todo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); flex-wrap: wrap; }
.todo-body { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.todo-body a { color: var(--text); text-decoration: none; } .todo-body a:hover { text-decoration: underline; }
.todo-money { font-weight: 600; }
.todo-deadline, .todo-spike { border-left: 3px solid var(--bad); }
.target-bar { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--panel-2); margin: 6px 0 2px; }
.target-bar span { display: block; height: 100%; border-radius: 4px; background: var(--info); }
.target-bar i { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text); }
.today-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0 0 14px; }
.today-card h2 { font-size: 1rem; margin: 0; }
.today-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; font-size: .92rem; }
.today-list a { color: var(--text); }
.price-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.price-form > .note, .price-form > .btnrow { grid-column: 1 / -1; }
@media (max-width: 640px) { .price-form { grid-template-columns: 1fr; } }

/* v1.17 Phase 6 */
.ads-bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 16px 0; }
.bulk-tick { display: inline-flex; margin-right: 6px; }
.bulk-tick input { width: 16px; height: 16px; }
.bulk-preview { margin: 12px 16px; }
.bulk-preview ul { margin: 6px 0 8px 18px; padding: 0; }
.kw-groups .kpi { text-decoration: none; color: inherit; }
.kw-groups .kpi[aria-current] { outline: 2px solid var(--accent, #2563eb); }
.kw-form select { max-width: 130px; }
.heat { display: grid; grid-template-columns: 40px repeat(24, minmax(10px, 1fr)); gap: 2px; font-size: 11px; overflow-x: auto; }
.heat span { display: block; min-height: 18px; border-radius: 2px; }
.heat .hl { min-height: 0; color: var(--muted, #667085); text-align: center; }
.heat .hd { min-height: 0; color: var(--muted, #667085); align-self: center; }
.age-bar { display: flex; height: 10px; border-radius: 4px; overflow: hidden; min-width: 120px; background: var(--line, #e5e7eb); }
.age-bar span { display: block; height: 100%; }
.sched-form select, .sched-form input { max-width: 100%; min-width: 0; }
.sched-form label { min-width: 0; }
/* v1.18 voice */
.voice-ask { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.voice-ask select { width: auto; }
#voiceBtn.is-listening { background: var(--bad, #dc2626); color: #fff; border-color: transparent; }
/* v1.18 saved views */
.views-menu { position: relative; }
.views-menu > summary { list-style: none; cursor: pointer; position: relative; }
.views-menu > summary::-webkit-details-marker { display: none; }
.views-n { position: absolute; top: 2px; right: 2px; font-size: 10px; line-height: 1; }
.views-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: min(320px, calc(100vw - 32px)); background: var(--panel-solid, #fff); color: var(--text, inherit);
  border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.views-h { font-weight: 600; margin: 0 0 6px; }
.views-list { list-style: none; margin: 0 0 8px; padding: 0; }
.views-list li { display: flex; gap: 6px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--line, #eee); }
.views-list li a { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.views-save label { display: block; margin: 6px 0; }
@media (max-width: 640px) { .views-pop { position: fixed; left: 16px; right: 16px; top: 60px; width: auto; max-height: 70vh; overflow-y: auto; } }
/* v1.19 creatives */
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 12px 0; }
.cr-card { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; background: var(--panel-solid, #fff); min-width: 0; }
.cr-card.is-tired { border-color: var(--warn, #f59e0b); }
.cr-thumb { flex: 0 0 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--accent-soft, #eee); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.cr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cr-body { min-width: 0; flex: 1; }
.cr-name { font-size: 14px; margin: 0 0 2px; overflow-wrap: anywhere; }
.cr-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 6px 0 0; font-size: 12px; }
.cr-facts dt { color: var(--muted, #667085); }
.cr-facts dd { margin: 0; font-weight: 600; }
/* v1.20 agents */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.agent-grid .panel { margin: 0; }
.agent-card.is-on { border-color: var(--good, #16a34a); }
/* v1.21 return claims */
.retclaim h3 { margin: 0; font-size: 15px; }
.ev-list { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.claim-pack { max-width: 820px; }
.pack-tbl th { text-align: left; width: 34%; }
.pack-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pack-files img { width: 100%; height: auto; border: 1px solid var(--line, #ddd); border-radius: 6px; }
.pack-files figcaption { font-size: 12px; color: var(--muted, #666); }
@media print { .no-print, .sidebar, .topbar, .tabbar, .site-footer { display: none !important; } }
.muted-row td { opacity: .65; }


/* v1.22 F07: Arabic, right to left */
[dir="rtl"] body { font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, 'IBM Plex Sans', sans-serif; }
[dir="rtl"] .sidebar { inset: 0 0 0 auto; border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .main { margin-left: 0; margin-right: var(--side-w); }
[dir="rtl"] .nav-brand label, [dir="rtl"] .nav-brand select { text-align: right; }
[dir="rtl"] .num, [dir="rtl"] td.num, [dir="rtl"] th.num { text-align: left; }
[dir="rtl"] .pick-guide ul { padding-left: 0; padding-right: 18px; }
@media (max-width: 1024px) {
  [dir="rtl"] .sidebar { transform: translateX(102%); }
  [dir="rtl"] .sidebar.is-open { transform: none; }
  [dir="rtl"] .main { margin-right: 0; }
}

/* v1.22 H13: shared links */
.share-new { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.share-url { width: 100%; font-family: ui-monospace, monospace; font-size: .82rem; }
.share-page { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
.share-page .share-title { display: block; }

/* v1.22 H15 / H10: public pages */
.tools-page, .site-page { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
.tools-page .tools-title, .site-page .site-title { display: block; }
.calc-out { margin-top: 14px; }
.tools-cta { margin-top: 18px; }
.site-hero { padding: 18px 0 8px; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 16px 0; }
.site-grid .card h2 { font-size: 1.05rem; margin: 0 0 6px; }
.site-list { margin: 8px 0; padding-left: 18px; }
[dir="rtl"] .site-list { padding-left: 0; padding-right: 18px; }
.site-best { border-color: var(--purple); }
.site-langs { margin: 4px 0 0; font-size: .85rem; }
.site-langs a { margin-inline-end: 10px; }
.site-langs a[aria-current] { font-weight: 600; text-decoration: none; }
[dir="rtl"] .site-page, .site-page[dir="rtl"] { text-align: right; }
.site-page[dir="rtl"] .site-list { padding-left: 0; padding-right: 18px; }
/* v1.23.1: your own agents */
.stack-form { display: grid; gap: 10px; max-width: 640px; margin-top: 10px; }
.stack-form label:not(.check) { display: grid; gap: 4px; }
.stack-form textarea { width: 100%; }
.agent-own { border: 1px solid var(--line, #3f3f46); border-radius: 10px; padding: 12px; margin: 10px 0; }
.agent-own.is-on { border-color: var(--good, #16a34a); }
.agent-own h3 { margin: 0; font-size: 1rem; }

/* ===== v1.25: chosen v1.24.1 features in the v1.23.1 look ===== */
/* v1.25: pages of the open tab as pills */
.tabpills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 0 18px; padding: 2px 2px 4px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.tabpills::-webkit-scrollbar { display: none; }
.tabpills a { flex: none; scroll-snap-align: start; padding: 9px 15px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--text-2); text-decoration: none; font-size: .86rem; white-space: nowrap; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.tabpills a:hover { color: var(--text); border-color: var(--line-2); }
.tabpills a[aria-current="page"] { background: var(--grad); border-color: transparent; color: #fff; font-weight: 500; }
.tabpills.ads-tabs { margin-bottom: 18px; }

/* v1.25 Overview */
#dash.is-custom { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); column-gap: 16px; }
#dash.is-custom > * { grid-column: 1 / -1; min-width: 0; }
#dash.is-custom.has-per100 > #trendBlock { grid-column: 1; }
#dash.is-custom.has-per100 > #per100Block { grid-column: 2; }
#per100Block { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
#per100Block .note { margin: auto 0 0; }
.per100 { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.per100-ring { width: 170px; height: 170px; }
.per100-k { fill: var(--text-2); font-size: 11px; } .per100-v { fill: var(--text); font-size: 22px; font-weight: 600; } .per100-v.is-neg { fill: var(--bad); }
.per100-leg { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 7px; font-size: .86rem; }
.per100-leg li { display: flex; align-items: center; gap: 8px; } .per100-leg li span { flex: 1; color: var(--text-2); }
.per100-leg i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.per100-leg .is-keep span, .per100-leg .is-keep b { color: var(--good); }
.per100-leg .is-loss i { background: var(--bad); } .per100-leg .is-loss b, .per100-leg .is-loss span { color: var(--bad); }
.card-headline { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-headline .note { margin: 0; }
.top-card { margin-bottom: 16px; }
details.fresh-strip { display: block; padding: 0; }
.fresh-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 11px 16px; cursor: pointer; list-style: none; font-size: .88rem; }
.fresh-line::-webkit-details-marker { display: none; }
.fresh-line .fresh-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); flex: none; }
.fresh-line .fresh-dot.is-old { background: var(--warn); } .fresh-line .fresh-dot.is-bad { background: var(--bad); }
.fresh-sum { flex: 1 1 auto; } .fresh-sum b { font-weight: 600; }
.fresh-score { padding: 3px 10px; border-radius: 99px; background: var(--good-soft); color: var(--good); font-size: .8rem; }
.fresh-score.is-warn, .fresh-score.is-bad { background: var(--bad-soft); color: var(--bad); }
.fresh-open { color: var(--info); text-decoration: underline; font-size: .85rem; }
details.fresh-strip[open] .fresh-open { display: none; }
.fresh-body { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 0 16px 14px; }
details.fresh-strip.has-issue { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.survey-small { margin-top: 8px; }
@media (max-width: 900px) {
  #dash.is-custom { grid-template-columns: minmax(0, 1fr); }
  #dash.is-custom.has-per100 > #trendBlock, #dash.is-custom.has-per100 > #per100Block { grid-column: 1; }
}

/* v1.25 P&L steps */
.pl-steps-card { margin-bottom: 16px; }
.pl-steps { overflow-x: auto; } .pl-steps svg { width: 100%; min-width: 560px; height: auto; display: block; }
.ps-val { fill: var(--text); font-size: 12px; font-weight: 600; } .ps-val.is-good, .ps-lab.is-good { fill: var(--good); } .ps-val.is-bad { fill: var(--bad); }
.ps-lab { fill: var(--text-2); font-size: 12px; }
.ps-link { stroke: var(--line-2); stroke-dasharray: 3 3; } .ps-axis { stroke: var(--line-2); }
.days-bar { display: block; width: 100%; min-width: 70px; height: 6px; margin-top: 5px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.days-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--good); }
.days-bar.is-mid > span { background: var(--purple); } .days-bar.is-bad > span { background: var(--bad); }
.gst-sum { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.eq-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 11px; background: var(--panel-2); }
.eq-row b { white-space: nowrap; }
.eq-total { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--purple) 55%, transparent); font-weight: 600; }

/* v1.25 product cards */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.pcards:empty { display: none; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pc-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pc-img { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.pc-name { min-width: 0; display: flex; flex-direction: column; } .pc-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pc-name .note { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .pc-nums small { display: block; color: var(--text-2); font-size: .75rem; } .pc-nums b { font-size: 1rem; }
.pc-stock { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: .82rem; } .pc-stock .days-bar { grid-column: 1 / -1; }
.pc-k { color: var(--text-2); font-size: .82rem; margin: 0; } .pc-d.is-good { color: var(--good); } .pc-d.is-bad { color: var(--bad); } .pc-d.is-mid { color: var(--text); }
.pc-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: auto; } .pc-acts { display: flex; gap: 6px; flex-wrap: wrap; }
/* v1.25 money coming in */
.in-chart { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; height: 190px; align-items: end; padding: 22px 0 22px; position: relative; }
.in-day { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.in-known { display: block; background: var(--purple); border-radius: 3px 3px 0 0; }
.in-est { display: block; background: color-mix(in srgb, var(--purple) 40%, transparent); border-radius: 3px 3px 0 0; }
.in-val { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: .72rem; white-space: nowrap; }
.in-day i { position: absolute; bottom: -20px; left: 0; font-style: normal; font-size: .68rem; color: var(--text-2); white-space: nowrap; }
.in-leg { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--text-2); margin: 6px 0 0; } .in-leg span { display: inline-flex; align-items: center; gap: 6px; }
.in-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; } .in-sw-known { background: var(--purple); } .in-sw-est { background: color-mix(in srgb, var(--purple) 40%, transparent); }
@media (max-width: 600px) { .in-val { display: none; } .in-day i { font-size: .6rem; } }
.ready { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 12px; } .ready-top { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; } .ready-top span { color: var(--text-2); }
.ready .days-bar { height: 8px; }
/* v1.25 connection tiles */
.conn-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 0 0 18px; }
.conn-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; }
.conn-tile:hover { border-color: var(--line-2); }
.conn-tile.is-bad { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.conn-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.conn-tile-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.conn-tile .note { margin: 0; }
.conn-tile.is-bad .note { color: var(--bad); }
.dq-mini { margin-bottom: 16px; }
.dq-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.dq-list li { display: flex; gap: 10px; align-items: baseline; } .dq-list li > span:first-child { width: 18px; flex: none; font-weight: 700; text-align: center; }
.dq-list .is-good > span:first-child { color: var(--good); } .dq-list .is-bad > span:first-child { color: var(--bad); }

@media (max-width: 820px) { .tabpills.ads-tabs { flex-wrap: nowrap; overflow-x: auto; } }

/* v1.25: buttons line up with the boxes next to them (Update, Save, Show, Compare… on every page) */
.ads-filters { align-items: flex-end; }
.ads-filters .btn, .ads-filters button { min-height: 40px; }
.health-head .btn, .health-head button { min-height: 40px; }
.cmp-form:has(> fieldset) > label, .cmp-form:has(> fieldset) > .form-actions { margin-bottom: 11px; }
.cmp-form .form-actions .btn { min-height: 40px; }
.form.grid3 > details { grid-column: 1 / -1; }
.inline-form:has(> label > input:not([type="checkbox"]):not([type="radio"]), > label > select) { align-items: flex-end; }
.inline-form:has(> label > input:not([type="checkbox"]):not([type="radio"]), > label > select) > .btn,
.inline-form:has(> label > input:not([type="checkbox"]):not([type="radio"]), > label > select) > button { min-height: 36px; }
.inline-form > label > input:not([type="checkbox"]):not([type="radio"]), .inline-form > label > select { min-height: 36px; }
/* v1.25: owner panel sections live in the left menu; the buttons stay only on phones */
@media (min-width: 1025px) { .otabs { display: none; } }
.owner-nav .side-group { margin: 6px 12px 4px; }
