/* Roadway OS — application styles
   Single accent (#1e22aa) on near-black text and cool-gray surfaces.
   Inter (variable) self-hosted; system stack fallback. No external assets. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #1e22aa;
  --brand-600: #181c8f;
  --brand-100: #e9eafb;
  --brand-50: #f4f5fe;
  --ink: #12142b;
  --ink-2: #3b3f57;
  --ink-3: #6b7088;
  --ink-4: #9a9eb5;
  --line: #e4e6ef;
  --line-2: #eef0f6;
  --bg: #f5f6fa;
  --panel: #ffffff;
  --ok: #157a4f;  --ok-bg: #e7f6ee;
  --warn: #9a5b00; --warn-bg: #fff4e0;
  --bad: #b3261e; --bad-bg: #fdecea;
  --info: #1e22aa; --info-bg: #e9eafb;
  --radius: 10px;
  --radius-s: 7px;
  --shadow: 0 1px 2px rgba(18,20,43,.04), 0 1px 3px rgba(18,20,43,.06);
  --side-w: 244px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; color: var(--ink-2); }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
strong, .strong { font-weight: 600; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.wrap { word-break: break-word; overflow-wrap: anywhere; }
.right { text-align: right; }
.dim { opacity: .6; }
.hint { font-size: 11.5px; color: var(--ink-4); margin-top: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px 10px; z-index: 100; }
.ico { flex: 0 0 auto; vertical-align: -3px; }
.sep { height: 1px; background: var(--line); margin: 16px 0; }
.bad-link { color: var(--bad); font-weight: 600; }

/* ── Shell ─────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.side { width: var(--side-w); flex: 0 0 var(--side-w); background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 15px; letter-spacing: -.01em; min-height: 30px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 14px; height: 14px; border-radius: 4px; background: var(--brand); box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
.side .side-close { display: none; }
.nav { padding: 6px 10px; flex: 1; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; margin-bottom: 2px; }
.nav-item:hover { background: var(--bg); text-decoration: none; color: var(--ink); }
.nav-item.active { background: var(--brand-100); color: var(--brand); font-weight: 600; }
.nav-item .ico { color: var(--ink-4); }
.nav-item.active .ico { color: var(--brand); }
.nav-badge { margin-left: auto; background: var(--brand); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 600; }
.nav-badge.warn { background: var(--warn); }
.side-foot { border-top: 1px solid var(--line); padding: 12px 12px; display: flex; align-items: center; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--ink); }
.me:hover { text-decoration: none; }
.me-text { display: flex; flex-direction: column; min-width: 0; }
.me-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-role { font-size: 11.5px; color: var(--ink-3); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-100); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex: 0 0 auto; }
.avatar.small { width: 24px; height: 24px; font-size: 10px; vertical-align: middle; margin-right: 4px; }
.side-backdrop { display: none; }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; min-height: 60px; }
.topbar .side-open { display: none; }
.page-title { font-size: 18px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.crumbs + .page-title { display: none; }
.crumbs a { color: var(--ink-3); }
.crumbs span:last-child { color: var(--ink); font-weight: 600; }
.crumb-sep { color: var(--ink-4); }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.main { padding: 24px 28px 48px; max-width: 1240px; width: 100%; }
body.wide .main { max-width: none; }
.lead { color: var(--ink-2); max-width: 900px; margin-bottom: 18px; }

/* ── Layout helpers ────────────────────────────────────── */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.tight { gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.gap { gap: 12px; }
.row.end { align-items: flex-end; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.inline { display: inline; }
form.inline { display: inline-block; }

/* ── Cards ─────────────────────────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { font-size: 14px; font-weight: 650; }
.card-actions { display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.card-body > .table-wrap:first-child { margin: -18px; margin-bottom: 0; }
.card-body > .table-wrap:first-child + .pager { margin-top: 18px; }
.sub { font-size: 13px; font-weight: 650; margin: 6px 0 2px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }

/* ── KPIs ──────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi.attention { border-color: #f0c98a; background: linear-gradient(180deg, #fffaf0, #fff); }
.kpi-label { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.kpi-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ── Health & lists ────────────────────────────────────── */
.health { list-style: none; margin: 0; padding: 0; }
.health li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.health li:last-child { border-bottom: 0; }
.health li .ico { margin-top: 2px; }
.health li.ok .ico { color: var(--ok); }
.health li.bad .ico { color: var(--bad); }
.health-label { font-weight: 600; font-size: 13px; }
.health-text { color: var(--ink-3); font-size: 12.5px; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 8px; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: minmax(110px, 36%) 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--ink-3); font-size: 12.5px; padding-top: 2px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.timeline li:last-child { border-bottom: 0; }
.tl-time { color: var(--ink-3); font-size: 12px; white-space: nowrap; min-width: 130px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px 5px 12px; background: var(--panel); color: var(--ink); font-size: 12.5px; }
.chip:hover { border-color: var(--brand); text-decoration: none; }
.chip.static { padding-right: 6px; }
.chip code { background: none; padding: 0; }
.chip-count { background: var(--line-2); border-radius: 999px; padding: 0 8px; font-weight: 600; font-size: 11.5px; }
.chip-x { border: 0; background: none; color: var(--ink-4); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.chip-x:hover { color: var(--bad); }

/* ── Tables ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #fafbfe; }
.table tbody tr:last-child td { border-bottom: 0; }
.table.compact th, .table.compact td { padding: 7px 10px; }
.table td.sample code { max-width: 220px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.kv-table td:first-child { width: 34%; color: var(--ink-2); }
.table .role-select { min-width: 170px; }

/* ── Pills / notices / flash ───────────────────────────── */
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--line-2); color: var(--ink-2); text-transform: capitalize; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.muted { background: var(--line-2); color: var(--ink-3); }
.pill.neutral { text-transform: none; }
.pill.plain { text-transform: none; white-space: normal; }
.pill.pace { text-transform: none; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-s); border: 1px solid; margin-bottom: 16px; font-size: 13.5px; }
.notice .ico { margin-top: 2px; }
.notice.info { background: var(--info-bg); border-color: #cfd2f5; color: var(--ink); }
.notice.info .ico { color: var(--info); }
.notice.warn { background: var(--warn-bg); border-color: #f2d9a6; }
.notice.warn .ico { color: var(--warn); }
.notice.bad { background: var(--bad-bg); border-color: #f3c3bf; }
.notice.bad .ico { color: var(--bad); }
.notice.ok { background: var(--ok-bg); border-color: #b9e3c9; }
.notice.ok .ico { color: var(--ok); }
.flash { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: var(--radius-s); margin-bottom: 14px; font-size: 13.5px; border: 1px solid; position: sticky; top: 72px; z-index: 4; box-shadow: var(--shadow); }
.flash.success { background: var(--ok-bg); border-color: #b9e3c9; color: var(--ok); }
.flash.error { background: var(--bad-bg); border-color: #f3c3bf; color: var(--bad); }
.flash.info { background: var(--info-bg); border-color: #cfd2f5; color: var(--info); }
.flash a { color: inherit; text-decoration: underline; }
.flash-x { margin-left: auto; border: 0; background: none; color: inherit; cursor: pointer; opacity: .7; padding: 2px; }
.flash-x:hover { opacity: 1; }

/* ── Forms ─────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 12px; color: var(--ink-3); }
.field-error { font-size: 12px; color: var(--bad); font-weight: 500; }
.field.has-error .input { border-color: var(--bad); }
.input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid #d5d8e4; border-radius: var(--radius-s); background: #fff; color: var(--ink); font: inherit; font-size: 13.5px; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; padding: 9px 11px; resize: vertical; min-height: 70px; }
select.input { padding-right: 30px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7088' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
select.input[multiple] { height: auto; padding: 6px; background-image: none; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,34,170,.14); }
.input[readonly], .input:disabled { background: #f7f8fb; color: var(--ink-3); }
.input.small { height: 30px; font-size: 12.5px; padding: 0 8px; }
.input.short { width: 120px; }
.input.auto { width: auto; min-width: 160px; }
.input.mono { font-family: var(--mono); font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.check input { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; }
.check.dim { opacity: .55; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: var(--radius-s); border: 1px solid #d5d8e4; background: #fff; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; text-decoration: none; }
.btn:hover { background: #f7f8fb; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-600); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.danger:not(.ghost) { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger.ghost:hover { background: var(--bad-bg); border-color: #f3c3bf; }
.btn.small { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.icon-btn { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 6px; border-radius: 6px; display: inline-flex; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.link { color: var(--brand); font-size: 13px; }

/* ── Toolbar / segments / search ───────────────────────── */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search .ico { position: absolute; left: 10px; top: 11px; color: var(--ink-4); }
.search .input { padding-left: 32px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--panel); }
.seg-item { padding: 0 12px; height: 36px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); border-right: 1px solid var(--line); font-weight: 500; }
.seg-item:last-child { border-right: 0; }
.seg-item:hover { background: var(--bg); text-decoration: none; }
.seg-item.active { background: var(--brand-100); color: var(--brand); font-weight: 600; }
.seg-item.attention:not(.active) { color: var(--bad); }
.seg-count { background: rgba(0,0,0,.06); border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 600; }
.seg-item.active .seg-count { background: rgba(30,34,170,.12); }
.pager { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; font-size: 13px; color: var(--ink-3); }
.pager-links { display: flex; gap: 8px; }
.drawer { margin-bottom: 16px; }
.drawer[hidden] { display: none; }
.details { margin-top: 12px; }
.details summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.settings-nav a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; color: var(--ink-2); font-weight: 500; }
.settings-nav.tabs a.on { background: var(--brand); color: #fff; }
.settings-nav a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c, #ccc); margin-right: 8px; vertical-align: -1px; }

/* ── Code blocks ───────────────────────────────────────── */
.code { font-family: var(--mono); font-size: 12.5px; background: #12142b; color: #e6e8f5; border-radius: var(--radius-s); padding: 12px 14px; overflow-x: auto; margin: 8px 0; line-height: 1.55; }
.code.wrap { white-space: pre-wrap; word-break: break-all; }
.code.copy { position: relative; padding-right: 70px; cursor: copy; }
.code.copy::after { content: "copy"; position: absolute; right: 10px; top: 9px; font-size: 11px; color: #9a9eb5; border: 1px solid #3b3f57; border-radius: 4px; padding: 1px 7px; font-family: var(--font); }
.code.copy.copied::after { content: "copied"; color: #7fd6a4; border-color: #7fd6a4; }
.code.inline-code { display: inline-block; margin: 0; padding: 6px 70px 6px 10px; }
.diff { display: inline; margin-right: 10px; font-size: 12px; line-height: 1.9; }
.diff-k { color: var(--ink-3); white-space: nowrap; margin-right: 4px; }
.diff del, .diff ins { margin-right: 4px; overflow-wrap: anywhere; }
.audit-table td.entity { max-width: 260px; }
.audit-table td.change { min-width: 280px; }
.diff del { color: var(--bad); background: var(--bad-bg); padding: 0 4px; border-radius: 3px; text-decoration: line-through; }
.diff ins { color: var(--ok); background: var(--ok-bg); padding: 0 4px; border-radius: 3px; text-decoration: none; }
.mail-preview { border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: #f3f4f8; }
.mail-frame { width: 100%; height: 620px; border: 0; background: #f3f4f8; }
.empty { text-align: center; padding: 36px 20px; color: var(--ink-3); }
.empty-title { font-weight: 600; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* ── Templates & rules ─────────────────────────────────── */
.code-input { font-size: 12.5px; line-height: 1.5; tab-size: 2; white-space: pre; overflow: auto; background: #fbfbfe; }
.tags { margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags-title { flex-basis: 100%; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; margin: 4px 0 2px; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; background: #fff; cursor: copy; font-size: 12px; }
.tag-chip:hover { border-color: var(--brand); background: var(--brand-50); }
.tag-chip.copied { border-color: var(--ok); background: var(--ok-bg); }
.tag-chip code { background: none; padding: 0; }
.snippet { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: copy; background: #fff; }
.snippet:hover { border-color: var(--brand); background: var(--brand-50); }
.snippet.copied { border-color: var(--ok); background: var(--ok-bg); }
.snippet code { background: none; padding: 0; color: var(--brand); font-weight: 600; }
.snippet-ex { font-size: 11.5px; color: var(--ink-2); margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.tag-role { font-size: 10.5px; color: var(--brand); background: var(--brand-100); border-radius: 999px; padding: 0 6px; }
.conds { display: flex; flex-direction: column; gap: 8px; }
[hidden] { display: none !important; }
.check input[type=radio] { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; }
.cond-row { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 8px; }
.check.small { font-size: 12px; }
@media (max-width: 900px) { .cond-row { grid-template-columns: 1fr; } }

/* ── Reports ───────────────────────────────────────────── */
.brand-img { border-radius: 7px; display: inline-block; vertical-align: middle; object-fit: contain; flex: 0 0 auto; }
.pub-brand .brand-img { border-radius: 9px; }
.pub-brand { gap: 12px; }
.pub-brand .brand-name { font-size: 17px; }
.hidden { display: none !important; }
.report-bar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; position: relative; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.add-filter { border-style: dashed; color: var(--brand); border-color: var(--brand); text-transform: uppercase; letter-spacing: .04em; font-size: 12px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-50); border: 1px solid #cfd2f5; color: var(--brand); border-radius: 8px; padding: 6px 8px 6px 12px; font-size: 13px; font-weight: 500; max-width: 420px; }
.filter-chip-label { color: var(--brand); opacity: .75; }
.filter-chip-x { color: var(--brand); font-size: 16px; line-height: 1; padding: 0 4px; text-decoration: none; }
.filter-chip-x:hover { color: var(--bad); text-decoration: none; }
.clear-all { text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.filter-wrap { position: relative; }
.filter-panel { position: absolute; z-index: 20; left: 0; top: 100%; margin-top: 6px; width: 380px; max-width: calc(100vw - 48px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(18,20,43,.14); }
.filter-panel[hidden] { display: none; }
.fp-step { padding: 14px; }
.fp-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; margin-bottom: 10px; }
.fp-search { margin-bottom: 8px; }
.fp-list { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; }
.fp-group { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-4); padding: 10px 8px 4px; font-weight: 600; }
.fp-dim { width: 100%; text-align: left; border: 0; background: none; padding: 9px 8px; font: inherit; font-size: 14px; color: var(--ink); border-radius: 6px; cursor: pointer; }
.fp-dim:hover { background: var(--bg); color: var(--brand); }
.fp-options { max-height: 340px; overflow-y: auto; margin: 4px 0 10px; }
.fp-opt { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.fp-opt:hover { background: var(--bg); }
.fp-opt input { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; flex: 0 0 auto; }
.fp-opt-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-opt-n { color: var(--ink-4); font-size: 12px; }
.fp-loading { color: var(--ink-3); padding: 12px 6px; font-size: 13px; }
.fp-actions { display: flex; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.fp-actions .btn.primary { flex: 1; }
.kpis.kpis-6 { grid-template-columns: repeat(6, 1fr); }
.kpis.kpis-auto { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.chart { display: block; position: relative; margin: 0 0 6px; width: 100%; overflow: visible; }
.chart .chart-svg { display: block; max-width: 100%; }
.chart-empty { padding: 18px 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; min-height: 26px; margin-bottom: 4px; font-size: 12.5px; color: var(--ink-2); }
.chart-key { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 2px 4px; font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; border-radius: 4px; }
button.chart-key:hover { background: var(--bg); }
.chart-key.off { opacity: .4; text-decoration: line-through; }
.chart-key.cmp { cursor: default; color: var(--ink-3); }
.sw { display: inline-block; flex: none; }
.sw.line { width: 16px; height: 3px; border-radius: 2px; background: var(--c, #1e22aa); }
.sw.dash { width: 18px; height: 3px; background: repeating-linear-gradient(90deg, var(--c, #1e22aa) 0 6px, transparent 6px 10px); opacity: .7; }
.sw.bar { width: 10px; height: 10px; border-radius: 3px; background: var(--c, #1e22aa); }
.chart-tip { position: absolute; z-index: 6; pointer-events: none; background: #12142b; color: #fff; border-radius: 8px; padding: 9px 12px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 8px 24px rgba(18,20,43,.22); min-width: 150px; max-width: 320px; }
.chart-tip-title { font-weight: 600; color: #fff; margin-bottom: 4px; white-space: nowrap; }
.chart-tip-row { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.chart-tip-row .chart-tip-name { color: #c9cbe0; flex: 1; }
.chart-tip-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-tip-cmp { color: #a9acc4; padding-left: 17px; white-space: nowrap; font-size: 12px; }
.chart-tip-cmp .up { color: #6fd39a; font-weight: 600; } .chart-tip-cmp .down { color: #ff8a80; font-weight: 600; } .chart-tip-cmp .same { color: #c9cbe0; }
.chart-cross { pointer-events: none; }
.chart-dot { transition: r .08s; }
.chart-donut { display: inline-block; width: auto; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-slice { transition: stroke-width .1s, opacity .1s; cursor: default; }
.donut-legend { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.donut-legend li { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 4px; }
.donut-legend li:hover { background: var(--bg); }
.donut-legend .dl-name { flex: 1; min-width: 90px; }
.donut-legend b { font-variant-numeric: tabular-nums; }
.donut-legend .dl-share { color: var(--ink-3); min-width: 44px; text-align: right; }
.impact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.impact-col { background: var(--bg); border-radius: var(--radius-s); padding: 16px 18px; }
.impact-title { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.impact-big { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 2px; }
.grid2.top { align-items: start; }
.grid2.top .card + .card { margin-top: 0; }
.table.num td { font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
@media (max-width: 1300px) { .kpis.kpis-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .kpis.kpis-6 { grid-template-columns: repeat(2, 1fr); } .impact { grid-template-columns: 1fr; } }

/* ── Ad Spend ──────────────────────────────────────────── */
.adgrid td, .adgrid th { vertical-align: middle; }
.adgrid.dense td, .adgrid.dense th { padding: 3px 8px; font-size: 12.5px; line-height: 1.25; }
.adgrid.dense th { font-size: 11px; padding: 6px 8px; }
.adgrid.dense tbody tr { height: 30px; }
.adgrid.dense tbody tr.alt td { background: #f7f8fb; }
.adgrid.dense tbody tr:hover td { background: #eef0fa; }
.adgrid.dense td.li { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--c, transparent); }
.adgrid.dense td.li a { font-weight: 600; }
.adgrid.dense .pill { padding: 1px 7px; font-size: 11px; }
.adgrid.dense .badge { font-size: 10.5px; padding: 0 6px; }
.adgrid.dense .who { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .03em; background: var(--line-2); color: var(--ink-3); border-radius: 4px; padding: 1px 4px; margin-left: 3px; }
.adgrid .group-row td { background: var(--tint, var(--bg)); padding: 7px 10px 5px; border-top: 2px solid var(--line); border-left: 3px solid var(--c, var(--line)); font-size: 13px; }
.adgrid .total-row td { background: var(--bg); font-weight: 600; border-top: 2px solid var(--line); }
.adgrid .w-check { width: 28px; }
.input.cell { width: 118px; text-align: right; padding: 3px 7px 3px 16px; height: 26px; font-size: 12.5px; }
.money-input { position: relative; display: inline-block; }
.money-input > .cur { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); color: var(--ink-4); font-size: 12px; pointer-events: none; }
.money-input > .input { padding-left: 18px; }
.money-input > .input.cell { padding-left: 16px; }
.adgrid.dense td.mono, .adgrid .mono { font-variant-numeric: tabular-nums; }
/* annual grid */
.yeargrid td, .yeargrid th { padding: 3px 6px; font-size: 12px; white-space: nowrap; }
.yeargrid td.li { max-width: 260px; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--c, transparent); font-weight: 600; }
.yeargrid td.heat { text-align: right; font-variant-numeric: tabular-nums; background: rgba(30,34,170, var(--h, 0)); color: var(--ink); }
.yeargrid td.heat.hot { color: #fff; }
.yeargrid td.future { color: var(--ink-4); font-style: italic; }
.yeargrid .group-row td { background: var(--tint, var(--bg)); border-top: 2px solid var(--line); font-size: 12.5px; }
.yeargrid .sub td { background: var(--bg); font-weight: 600; }
.yeargrid tbody tr:hover td.heat { outline: 1px solid var(--brand); outline-offset: -1px; }
.quarters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quarter { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.quarter h4 { margin: 0 0 6px; font-size: 13px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.quarter .q-big { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.quarter .q-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); padding: 2px 0; }
@media (max-width: 1100px) { .quarters { grid-template-columns: repeat(2, 1fr); } }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c, #c9cbe0); margin-right: 8px; vertical-align: -1px; }
.badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-3); background: var(--bg); border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
.ok-text { color: var(--ok); }
.kpi.attention .kpi-value { color: var(--bad); }
.comments { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.comments li { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; }
.comments .c-head { font-size: 13px; margin-bottom: 3px; }
.comments .c-body { font-size: 14px; white-space: normal; word-break: break-word; }
.check.small span { font-size: 13px; }
.grid3.top { align-items: start; }
.grid3.top .card + .card { margin-top: 0; }
.pill.info { background: var(--brand-50); color: var(--brand); }

/* ── Email report ───────────────────────────────────────── */
.kpis.kpis-4 { grid-template-columns: repeat(4, 1fr); }
.funnel { display: flex; flex-direction: column; gap: 10px; }
.f-lab { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.f-bar { height: 14px; background: var(--line-2); border-radius: 7px; overflow: hidden; }
.f-bar span { display: block; height: 100%; background: var(--brand); border-radius: 7px; }
.heat { border-collapse: collapse; width: 100%; margin: 4px 0 14px; table-layout: fixed; }
.heat th { font-size: 10px; color: var(--ink-4); font-weight: 500; padding: 0 0 3px; text-align: center; }
.heat tbody th { text-align: right; padding-right: 6px; width: 34px; }
.heat td { height: 16px; border: 1px solid #fff; border-radius: 2px; background: var(--bg); }
.heat-title { font-size: 13px; font-weight: 600; margin-top: 4px; }
@media (max-width: 1100px) { .kpis.kpis-4 { grid-template-columns: repeat(2, 1fr); } }

/* ── Global search ─────────────────────────────────────── */
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-right .topbar-actions { margin-left: 0; }
.topsearch { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 10px; width: 240px; border: 1px solid #d5d8e4; border-radius: var(--radius-s); background: #fafbfd; color: var(--ink-3); font: inherit; font-size: 13px; cursor: text; text-align: left; transition: border-color .12s, box-shadow .12s; }
.topsearch:hover { border-color: var(--ink-4); background: #fff; }
.topsearch:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,34,170,.14); }
.topsearch .ico { color: var(--ink-4); }
.topsearch-text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topsearch-kbd, .cmdk kbd { display: inline-block; min-width: 18px; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: #fff; color: var(--ink-3); font: 600 11px/18px var(--font); text-align: center; }
body.cmdk-open { overflow: hidden; }
.cmdk { position: fixed; inset: 0; z-index: 60; }
.cmdk[hidden] { display: none !important; }
.cmdk-backdrop { position: absolute; inset: 0; background: rgba(18,20,43,.42); backdrop-filter: blur(2px); }
.cmdk-dialog { position: relative; margin: 9vh auto 0; width: min(680px, calc(100vw - 32px)); max-height: 78vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 80px rgba(18,20,43,.28), 0 2px 8px rgba(18,20,43,.12); overflow: hidden; animation: cmdk-in .12s ease-out; }
@keyframes cmdk-in { from { opacity: 0; transform: translateY(-6px) scale(.99); } to { opacity: 1; transform: none; } }
.cmdk-input-wrap { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 16px; border-bottom: 1px solid var(--line); }
.cmdk-input-wrap .ico { color: var(--ink-4); }
.cmdk-input { flex: 1; border: 0; outline: none; background: none; font: inherit; font-size: 16px; height: 44px; color: var(--ink); min-width: 0; }
.cmdk-x { border: 0; background: none; color: var(--ink-4); cursor: pointer; padding: 6px; border-radius: 6px; display: inline-flex; }
.cmdk-x:hover { background: var(--bg); color: var(--ink); }
.cmdk-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; min-height: 0; }
.cmdk-list:empty { display: none; }
.cmdk-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); font-weight: 700; padding: 8px 10px 4px; }
.cmdk-row a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.cmdk-row.on a { background: var(--brand-50); }
.cmdk-row.on .cmdk-title { color: var(--brand); }
.cmdk-type { flex: 0 0 92px; font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--line-2); border-radius: 999px; padding: 2px 8px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cmdk-title { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-row.archived .cmdk-title { color: var(--ink-3); font-weight: 500; }
.cmdk-empty { padding: 18px 12px; color: var(--ink-3); font-size: 13px; text-align: center; }
.cmdk-blocked { color: var(--bad); font-weight: 500; }
.cmdk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--line-2); background: #fafbfd; font-size: 11.5px; color: var(--ink-3); }
.cmdk-hint kbd { margin-right: 2px; }
.cmdk-status { white-space: nowrap; }
/* results page */
.search-page-form { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.search.big { max-width: 640px; }
.search.big .input { height: 44px; font-size: 15px; padding-left: 38px; }
.search.big .ico { top: 13px; left: 12px; }
.search-tabs { margin-bottom: 14px; }
.search-list { list-style: none; margin: -18px; padding: 0; }
.search-row a { display: flex; align-items: center; gap: 14px; padding: 11px 18px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.search-row:last-child a { border-bottom: 0; }
.search-row a:hover { background: #fafbfe; }
.search-row a:hover .sr-title { color: var(--brand); }
.sr-ico { color: var(--ink-4); display: inline-flex; }
.sr-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sr-title { font-weight: 600; font-size: 14px; }
.sr-sub { font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.sr-type { font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--line-2); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.search-row.archived .sr-title { color: var(--ink-3); font-weight: 500; }
.search-note { padding: 10px 18px; color: var(--ink-3); font-size: 12.5px; border-bottom: 1px solid var(--line-2); }
/* audit entry */
.audit-diff td { vertical-align: top; }
.audit-diff td:first-child { width: 20%; }
.audit-diff tr.changed td { background: #fffbea; }
.audit-diff .code { margin: 0; max-height: 420px; overflow: auto; font-size: 12px; }
.audit-val { white-space: pre-wrap; overflow-wrap: anywhere; }
.mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; } .mb10 { margin-bottom: 10px; }
.table.limits th { text-align: center; }
.table.limits td { text-align: center; }
.table.limits td.strong { text-align: left; white-space: nowrap; }
.table.limits .input.short { width: 96px; display: inline-block; }
kbd { font-family: var(--font); }

/* ── Public pages ──────────────────────────────────────── */
body.public { background: var(--bg); }
.pub-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.pub-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 24px rgba(18,20,43,.06); padding: 34px 32px 30px; }
.pub-card.wide { max-width: 640px; }
.pub-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; margin-bottom: 22px; }
.pub-title { font-size: 22px; margin-bottom: 6px; }
.pub-sub { color: var(--ink-3); margin-bottom: 20px; }
.pub-text { color: var(--ink-2); }
.pub-foot { margin: 18px 0 0; color: var(--ink-3); font-size: 13px; }
.pub-legal { color: var(--ink-4); font-size: 11.5px; margin-top: 10px; }
.err-code { font-size: 48px; font-weight: 800; color: var(--brand); letter-spacing: -.03em; line-height: 1; margin-bottom: 8px; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: transform .18s ease; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  body.side-open .side { transform: none; }
  body.side-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(18,20,43,.35); z-index: 20; }
  .side .side-close, .topbar .side-open { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  .main { padding: 16px 16px 40px; }
  .grid2, .grid3, .perm-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 8px; }
  .toolbar .search { max-width: none; }
  .crumbs + .page-title { display: block; }
  .crumbs { display: none; }
  .topsearch { width: 36px; padding: 0; justify-content: center; }
  .topsearch-text, .topsearch-kbd { display: none; }
  .cmdk-dialog { margin-top: 8px; width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .cmdk-type { flex-basis: 84px; font-size: 10px; padding: 2px 6px; }
  .cmdk-foot .cmdk-hint { display: none; }
  .search-page-form .btn { display: none; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr; }
  .pub-card { padding: 26px 20px; }
}
@media print {
  .side, .topbar-actions, .topsearch, .cmdk, .btn, .flash-x { display: none !important; }
  .main-wrap { margin: 0; }
}

/* ── Sales board (0.14) ──────────────────────────────── */
.rav { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 700; font-size: 12px; flex: 0 0 auto; color: #fff; letter-spacing: .02em; overflow: hidden; object-fit: cover; vertical-align: middle; }
.rav.small { width: 24px; height: 24px; font-size: 10px; }
.rav.big { width: 56px; height: 56px; font-size: 19px; }
.rav.xl { width: 72px; height: 72px; font-size: 24px; }
.rav.c0 { background: #1e22aa; } .rav.c1 { background: #0f766e; } .rav.c2 { background: #b45309; } .rav.c3 { background: #be123c; } .rav.c4 { background: #4d7c0f; }
.rav.c5 { background: #6d28d9; } .rav.c6 { background: #0369a1; } .rav.c7 { background: #a21caf; } .rav.c8 { background: #b91c1c; } .rav.c9 { background: #374151; }
.rav.photo { background: var(--line-2); }
.rep-cell { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.rep-cell:hover { text-decoration: none; } .rep-cell:hover .rep-n { text-decoration: underline; }
.rep-text { display: flex; flex-direction: column; line-height: 1.25; } .rep-n { font-weight: 600; }
.rep-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; } .rep-name { font-size: 20px; font-weight: 700; }
.rep-edit-head { display: flex; align-items: center; gap: 14px; }
table.board td.rank, table.board th.rank { width: 70px; white-space: nowrap; }
.rank-n { display: inline-block; min-width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%; background: var(--line-2); font-weight: 700; font-size: 12.5px; }
tr.top1 .rank-n { background: #f6c343; color: #4a3300; } tr.top2 .rank-n { background: #d7dbe6; color: #2a2f45; } tr.top3 .rank-n { background: #e3b084; color: #4a2a10; }
tr.me td { background: var(--brand-50); } tr.zero td { color: var(--ink-3); }
.mv { font-size: 11px; font-weight: 700; margin-left: 2px; } .mv.up { color: var(--ok); } .mv.down { color: var(--bad); } .mv.same { color: var(--ink-4); } .mv.new { color: var(--brand); text-transform: uppercase; font-size: 10px; }
.delta { font-size: 11px; font-weight: 600; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); } .delta.same, .delta.muted { color: var(--ink-4); }
td.num { white-space: nowrap; }
.tgt { display: inline-flex; flex-direction: column; gap: 3px; min-width: 120px; } .tbar { width: 120px; height: 8px; display: block; } .tbar-bg { fill: var(--line-2); } .tbar-fg { fill: var(--brand); }
.tgt.near .tbar-fg { fill: #d59b1a; } .tgt.hit .tbar-fg { fill: var(--ok); } .tgt-text { font-size: 11.5px; font-weight: 600; }
.tgt-big .tgt { min-width: 320px; } .tgt-big .tbar { width: 320px; height: 12px; } .tgt-big .tgt-text { font-size: 14px; }
.kpi-value .tgt { min-width: 0; display: flex; } .kpi-value .tbar { width: 100%; } .kpi-value .tgt-text { font-size: 14px; }
.feed { list-style: none; margin: 0; padding: 0; } .feed-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line-2); } .feed-row:last-child { border-bottom: 0; }
.feed-main { flex: 1; min-width: 0; font-size: 13px; } .feed-right { text-align: right; font-size: 13px; white-space: nowrap; }
.feed-row.cancelled .feed-main, .feed-row.cancelled .feed-right { opacity: .55; text-decoration: line-through; }
table.bookings tr.cancelled td { color: var(--ink-4); }
table.mix td { padding: 5px 8px; }
table.targets .input.short { width: 130px; } table.targets tr.team td { background: var(--bg); }
table.goals .input.short { width: 120px; }
/* Groups (offices / regions / teams / move types) */
.gchip { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--c, #9a9eb5); color: #fff; vertical-align: middle; flex: 0 0 auto; }
.gchip.lg { width: 40px; height: 40px; border-radius: 12px; } .gchip .gicon.img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; } .swatch-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch-opt { position: relative; cursor: pointer; } .swatch-box { display: block; width: 28px; height: 28px; border-radius: 8px; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); }
.swatch-opt input:checked + .swatch-box { border-color: #fff; box-shadow: 0 0 0 2px var(--ink); }
.icon-grid { display: flex; flex-wrap: wrap; gap: 6px; } .icon-opt { position: relative; cursor: pointer; } .icon-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.icon-box { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); }
.icon-opt input:checked + .icon-box { border-color: var(--brand); background: var(--brand-soft, #eef0ff); color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); max-height: 260px; overflow: auto; }
/* Standings (group views) */
.seg.views { margin-right: 6px; }
.kpi-unit { font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.tgt.stretch .tbar-fg { fill: #7c3aed; }
table.standings tr.members td { padding-top: 0; padding-bottom: 10px; border-top: 0; background: transparent; }
table.standings tr.members + tr td { border-top: 1px solid var(--line); }
.member-strip { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.member { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 12px; color: var(--ink-2); }
.member:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); } .member.zero { opacity: .55; } .member.me { border-color: var(--brand); background: var(--brand-50); }
.member .rav { width: 22px; height: 22px; font-size: 9px; } .member-name { font-weight: 600; } .member-num { color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* Streaks, personal bests, honours (0.18.1) */
.kpis.kpis-4 { grid-template-columns: repeat(4, 1fr); } @media (max-width: 900px) { .kpis.kpis-4 { grid-template-columns: repeat(2, 1fr); } }
.streak { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.streak.hot { background: #fde8e6; color: #b42318; } .streak.cold { background: #e0f2fe; color: #0369a1; } .streak.small { font-size: 11px; padding: 0 6px; }
.pb { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; background: #16a34a; color: #fff; vertical-align: middle; } .pb.small { font-size: 10px; }
.dstrip { display: inline-flex; gap: 2px; } .dcell { width: 10px; height: 14px; border-radius: 2px; background: var(--line-2); display: inline-block; }
.dcell.on { background: var(--ok); } .dcell.off { background: var(--bg); } .dcell.off.on { background: #9bd3b6; } .dcell.today { outline: 2px solid var(--brand); outline-offset: 1px; }
.honours { list-style: none; margin: 0; padding: 0; } .honour-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); } .honour-row:last-child { border-bottom: 0; }
.honour-main { flex: 1; min-width: 0; font-size: 13px; } .gchip.ach { border-radius: 50%; }
.hall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 20px; }
.hall-cell { min-width: 0; } .hall-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.hall-list { list-style: none; margin: 0; padding: 0; } .hall-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; border-bottom: 1px solid var(--line-2); } .hall-row:last-child { border-bottom: 0; }
.hall-rank { width: 18px; color: var(--ink-4); font-weight: 600; font-size: 12px; } .hall-row.first .hall-rank { color: #b7791f; } .hall-who { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hall-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.rod-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; } .rod-day { border: 1px solid var(--line-2); border-radius: 8px; padding: 6px; min-height: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); }
.rod-day.won { background: #fffbea; border-color: #f5d87a; } .rod-day.today { border-color: var(--brand); } .rod-date { text-align: center; line-height: 1.15; } .rod-who { display: inline-flex; }
.trophy-grid { display: flex; flex-wrap: wrap; gap: 8px; } .trophy { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; background: var(--panel); } .trophy.none { opacity: .45; } .trophy b { font-size: 14px; }
.copy-link { display: inline-block; margin-top: 6px; padding: 6px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; word-break: break-all; user-select: all; }
.sales-bar .input.auto { max-width: 220px; }

/* TV mode (0.18: views, group cards, goal bar, celebrations, light theme) */
body.tv { --tv-bg: #0b0d1a; --tv-card: #141830; --tv-card-2: #1a1f3d; --tv-line: #232749; --tv-line-2: #1f2340; --tv-ink: #eef0f8; --tv-ink-2: #dfe2f3; --tv-muted: #aab0d0; --tv-dim: #6b7199; --tv-gold: #f6c343; --tv-silver: #d7dbe6; --tv-bronze: #e3b084; --tv-ok: #6ee7a8; --tv-bad: #f08a8a; --tv-flash: #1f3b2a;
  margin: 0; background: var(--tv-bg); color: var(--tv-ink); min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
body.tv.light { --tv-bg: #eef0f6; --tv-card: #ffffff; --tv-card-2: #f4f5fb; --tv-line: #d9dcea; --tv-line-2: #e3e5ee; --tv-ink: #12142a; --tv-ink-2: #2a2e4a; --tv-muted: #5c6283; --tv-dim: #8a90ad; --tv-gold: #c99a12; --tv-silver: #7d8499; --tv-bronze: #b2733a; --tv-ok: #1a7f4b; --tv-bad: #b42318; --tv-flash: #dff5e8; }
.tv-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 32px; border-bottom: 1px solid var(--tv-line-2); }
.tv-brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; white-space: nowrap; } .tv-view-name { color: var(--tv-muted); font-weight: 600; }
.tv-views { display: flex; gap: 6px; } .tv-view-tab { font: inherit; font-size: 14px; font-weight: 600; color: var(--tv-muted); background: transparent; border: 1px solid var(--tv-line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.tv-view-tab.active { color: var(--tv-ink); background: var(--tv-card-2); border-color: var(--tv-muted); }
.tv-right { display: flex; align-items: center; gap: 22px; white-space: nowrap; }
.tv-period { font-size: 20px; color: var(--tv-muted); } .tv-clock { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tv-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; padding: 18px 32px 0; }
.tv-kpi { background: var(--tv-card); border: 1px solid var(--tv-line); border-radius: 14px; padding: 14px 20px; min-width: 0; }
.tv-kpi-label { font-size: 14px; color: var(--tv-muted); } .tv-kpi-value { font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tv-kpi-sub { font-size: 14px; color: var(--tv-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-kpi-unit { font-size: 16px; font-weight: 600; color: var(--tv-muted); margin-left: 8px; letter-spacing: 0; }
.tv-kpi.goal .tv-kpi-value { font-size: 20px; margin-top: 10px; } .tv-kpi.goal .tgt { width: 100%; min-width: 0; } .tv-kpi.goal .tbar { width: 100%; height: 12px; } .tv-kpi.goal .tgt-text { font-size: 15px; color: var(--tv-ink-2); }
.tv-kpi.goal.stage-stretch { border-color: #7c3aed; } .tv-kpi.goal.stage-done { border-color: var(--tv-ok); }
.tv-main { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(320px, 1fr); gap: 20px; padding: 18px 32px; flex: 1; align-items: start; min-height: 0; }
.tv-board { min-width: 0; transition: opacity .22s ease, transform .22s ease; } .tv-board.switching { opacity: 0; transform: translateY(6px); }
.tv-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tv-row { display: grid; grid-template-columns: 70px 72px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--tv-card); border: 1px solid var(--tv-line); border-radius: 14px; padding: 12px 18px; transition: background .4s, border-color .4s; position: relative; }
.tv-row.top1 { border-color: var(--tv-gold); background: var(--tv-card-2); } .tv-row.top2 { border-color: var(--tv-silver); } .tv-row.top3 { border-color: var(--tv-bronze); }
.tv-rank { display: flex; align-items: center; gap: 6px; } .tv-rank-n { font-size: 34px; font-weight: 800; width: 48px; text-align: center; }
.top1 .tv-rank-n { color: var(--tv-gold); } .top2 .tv-rank-n { color: var(--tv-silver); } .top3 .tv-rank-n { color: var(--tv-bronze); }
.tv-name { font-size: 26px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tv-sub { font-size: 14px; color: var(--tv-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-who { min-width: 0; } .tv-who .tgt { margin-top: 6px; } .tv-who .tbar { width: 260px; } body.tv .tbar-bg { fill: var(--tv-line); } .tv-who .tgt-text { color: var(--tv-ink-2); }
.tv-nums { display: flex; gap: 28px; align-items: baseline; text-align: right; white-space: nowrap; } .tv-big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; } .tv-unit { font-size: 14px; color: var(--tv-muted); margin-left: 6px; } .tv-jobs .tv-big { font-size: 26px; color: var(--tv-ink-2); }
.tv-rows.compact { gap: 8px; } .tv-rows.compact .tv-row { grid-template-columns: 60px 56px minmax(0, 1fr) auto; padding: 9px 16px; } .tv-rows.compact .rav.xl { width: 56px; height: 56px; font-size: 18px; }
.tv-rows.compact .tv-rank-n { font-size: 28px; width: 40px; } .tv-rows.compact .tv-name { font-size: 22px; } .tv-rows.compact .tv-big { font-size: 28px; } .tv-rows.compact .tv-jobs .tv-big { font-size: 22px; } .tv-rows.compact .tv-who .tgt { margin-top: 3px; } .tv-rows.compact .tv-who .tbar { width: 200px; height: 6px; }
.tv-rows.dense { gap: 6px; } .tv-rows.dense .tv-row { grid-template-columns: 52px 48px minmax(0, 1fr) auto; padding: 7px 14px; gap: 12px; } .tv-rows.dense .rav.xl { width: 48px; height: 48px; font-size: 16px; }
.tv-rows.dense .tv-rank-n { font-size: 24px; width: 36px; } .tv-rows.dense .tv-name { font-size: 20px; } .tv-rows.dense .tv-sub { font-size: 12.5px; } .tv-rows.dense .tv-big { font-size: 24px; } .tv-rows.dense .tv-jobs .tv-big { font-size: 20px; } .tv-rows.dense .tv-who .tgt { display: none; }
.tv-zero { color: var(--tv-dim); font-size: 14px; margin: 14px 4px 0; }
/* Group cards */
.tv-gchip { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: var(--c, #9a9eb5); color: #fff; flex: 0 0 auto; } .tv-gchip .gicon.img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.tv-grid { display: grid; gap: 14px; } .tv-grid.cols-1 { grid-template-columns: 1fr; } .tv-grid.cols-2 { grid-template-columns: 1fr 1fr; } .tv-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.tv-gcard { background: var(--tv-card); border: 1px solid var(--tv-line); border-radius: 16px; padding: 16px 18px 14px; position: relative; overflow: hidden; transition: background .4s, border-color .4s; min-width: 0; }
.tv-gcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c, #9a9eb5); }
.tv-gcard.top1 { border-color: var(--tv-gold); background: var(--tv-card-2); }
.tv-ghead { display: grid; grid-template-columns: 48px 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; } .tv-ghead .tv-rank-n { width: 40px; }
.tv-gname { min-width: 0; } .tv-gprize { font-size: 13px; color: var(--tv-gold); margin-top: 2px; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-gline { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 12px; font-size: 15px; color: var(--tv-muted); } .tv-gstat { display: inline-flex; align-items: baseline; gap: 6px; } .tv-gstat .k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; } .tv-gstat b { color: var(--tv-ink); font-size: 18px; } .tv-gstat .m { color: var(--tv-muted); }
.tv-gstat.lead b { color: var(--tv-ok); } .tv-gstat.behind b { color: var(--tv-bad); }
.tv-ggoal { margin-top: 10px; } .tv-ggoal .tgt { width: 100%; min-width: 0; } .tv-ggoal .tbar { width: 100%; height: 10px; } .tv-ggoal .tgt-text { color: var(--tv-ink-2); font-size: 13px; }
.tv-gmembers { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--tv-line); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.tv-gm { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; } .tv-gm-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; } .tv-gm-num { color: var(--tv-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tv-gm.zero { opacity: .5; } .tv-gm.more { color: var(--tv-dim); font-size: 13px; }
.tv-grid.cols-3 .tv-gmembers { grid-template-columns: 1fr; } .tv-grid.cols-3 .tv-name { font-size: 22px; } .tv-grid.cols-3 .tv-big { font-size: 28px; } .tv-grid.cols-3 .tv-gchip { width: 44px; height: 44px; }
.tv-grow .tv-ghead { grid-template-columns: 48px 44px minmax(0, 1fr) auto; } .tv-grow .tv-gchip { width: 44px; height: 44px; border-radius: 12px; } .tv-grow { display: block; } .tv-grow .tv-gline { margin-top: 6px; font-size: 14px; } .tv-grow .tv-gstat b { font-size: 15px; }
/* Feed */
.tv-feed { background: var(--tv-card); border: 1px solid var(--tv-line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; min-width: 0; }
.tv-feed h2 { margin: 0 0 10px; font-size: 14px; color: var(--tv-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.tv-feed ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.tv-feed-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--tv-line); transition: background .4s; } .tv-feed-row:last-child { border-bottom: 0; }
.tv-feed-main { flex: 1; min-width: 0; } .tv-feed-line { font-size: 16px; } .tv-feed-sub { font-size: 13px; color: var(--tv-muted); margin-top: 2px; }
.tv-feed-right { text-align: right; white-space: nowrap; } .tv-feed-val { font-size: 18px; font-weight: 700; } .tv-feed-ago { font-size: 12px; color: var(--tv-dim); }
.tv-feed-row.cancelled { opacity: .5; text-decoration: line-through; } .tv-feed-row.whale .tv-feed-val { color: var(--tv-gold); }
.tv-tag { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 7px; border-radius: 999px; background: var(--tv-line); color: var(--tv-muted); vertical-align: 2px; }
.tv-tag.ok { background: #123a2a; color: #6ee7a8; } .tv-tag.bad { background: #3a1414; color: #f08a8a; } .tv-tag.whale { background: #3b2f08; color: var(--tv-gold); }
body.tv.light .tv-tag.ok { background: #dff5e8; color: #1a7f4b; } body.tv.light .tv-tag.bad { background: #fde8e6; color: #b42318; } body.tv.light .tv-tag.whale { background: #fff3cd; color: #8a6508; }
.tv-today { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--tv-line); display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.tv-today-label { color: var(--tv-muted); text-transform: uppercase; letter-spacing: .06em; font-size: 13px; } .tv-today-val { font-weight: 700; }
.tv-foot { display: flex; justify-content: space-between; padding: 10px 32px; font-size: 13px; color: var(--tv-dim); border-top: 1px solid var(--tv-line-2); } .tv-foot .muted { color: var(--tv-dim); }
.tv-loading, .tv-feed-empty { color: var(--tv-dim); padding: 20px; text-align: center; list-style: none; }
body.tv .delta.up { color: var(--tv-ok); } body.tv .delta.down { color: var(--tv-bad); } body.tv .delta.same, body.tv .delta.muted { color: var(--tv-dim); }
/* Celebrations */
.tv-row.flash, .tv-feed-row.flash { border-color: var(--tv-ok); animation: tvflash 1.2s ease-in-out 5; }
@keyframes tvflash { 0%, 100% { background: var(--tv-card); } 50% { background: var(--tv-flash); } }
.tv-row.rise { border-color: var(--tv-gold); box-shadow: 0 0 0 2px rgba(246,195,67,.35), 0 10px 40px rgba(246,195,67,.15); } .tv-rise-tag { display: inline-block; margin: 2px 0 2px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #12142a; background: var(--tv-gold); border-radius: 999px; padding: 2px 9px; }
.tv-gcard.wash, .tv-grow.wash { animation: tvwash 1.5s ease-in-out 3; } @keyframes tvwash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 4px var(--c), 0 0 60px var(--c); } }
.tv-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.tv-hearts { position: absolute; } .tv-heart { position: absolute; bottom: 10%; color: #ff6b8b; opacity: 0; animation: tvheart 2s ease-out forwards; text-shadow: 0 2px 10px rgba(0,0,0,.3); }
@keyframes tvheart { 0% { transform: translate(0, 0) scale(.4); opacity: 0; } 12% { opacity: 1; } 100% { transform: translate(var(--dx, 0), -170px) scale(1.25); opacity: 0; } }
.tv-toast { position: absolute; left: 32px; bottom: 118px; display: flex; align-items: center; gap: 14px; background: var(--tv-card-2); border: 1px solid var(--tv-ok); border-radius: 16px; padding: 14px 20px 14px 14px; box-shadow: 0 20px 60px rgba(0,0,0,.45); transform: translateY(40px); opacity: 0; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .4s; max-width: 640px; color: var(--tv-ink); }
.tv-toast.in { transform: translateY(0); opacity: 1; } .tv-toast-line { font-size: 20px; } .tv-toast-sub { font-size: 14px; color: var(--tv-muted); margin-top: 2px; } .tv-toast-val { font-size: 28px; font-weight: 800; color: var(--tv-ok); margin-left: 8px; white-space: nowrap; }
.tv-toast.milestone { border-color: var(--tv-gold); } .tv-toast-ic { color: var(--tv-gold); display: flex; }
.tv-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(6,8,20,.92); color: #fff; opacity: 0; transition: opacity .5s; text-align: center; padding: 40px; }
.tv-overlay.in { opacity: 1; } .tv-overlay.whale { background: radial-gradient(ellipse at center, rgba(30,34,170,.55), rgba(6,8,20,.96) 70%); } .tv-overlay.goal { background: radial-gradient(ellipse at center, rgba(26,127,75,.5), rgba(6,8,20,.96) 70%); } .tv-overlay.goal.stretch { background: radial-gradient(ellipse at center, rgba(124,58,237,.55), rgba(6,8,20,.96) 70%); }
.tv-whale-icon { color: var(--tv-gold); animation: tvbob 2.4s ease-in-out infinite; } @keyframes tvbob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
.tv-overlay-kicker { font-size: 18px; text-transform: uppercase; letter-spacing: .2em; color: #c9cdee; } .tv-overlay-sub { font-size: 22px; color: #c9cdee; max-width: 900px; }
.tv-whale-amt { font-size: 64px; font-weight: 900; letter-spacing: -.02em; color: var(--tv-gold); font-variant-numeric: tabular-nums; }
.tv-flap { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; } .flap { display: inline-flex; align-items: center; justify-content: center; width: 1.05em; height: 1.35em; background: #15182e; border: 1px solid #353a62; border-radius: .12em; font-weight: 900; font-variant-numeric: tabular-nums; position: relative; color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.4); }
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.55); } .flap.space { background: transparent; border: 0; box-shadow: none; } .flap.space::after { display: none; } .flap.set { color: var(--tv-gold); }
.tv-flap.big { font-size: 96px; } .tv-flap.big .flap.set { color: #fff; } .tv-flap.name { font-size: 48px; } .tv-flap.name .flap { width: .95em; }
.tv-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; display: none; } .tv-confetti.on { display: block; }
/* Badges on the TV */
body.tv .streak { font-size: 14px; padding: 2px 9px; margin-left: 10px; vertical-align: 3px; } body.tv .streak.hot { background: #3a1414; color: #ffb4a8; } body.tv .streak.cold { background: #0f2a3f; color: #8fd3ff; }
body.tv.light .streak.hot { background: #fde8e6; color: #b42318; } body.tv.light .streak.cold { background: #e0f2fe; color: #0369a1; }
body.tv .pb { font-size: 12px; margin-left: 8px; vertical-align: 4px; padding: 2px 7px; }
.tv-rows.dense .streak, .tv-rows.dense .pb { font-size: 11px; vertical-align: 2px; }
/* Honours strip */
.tv-honours { display: flex; gap: 28px; align-items: center; padding: 10px 32px; border-top: 1px solid var(--tv-line-2); overflow: hidden; white-space: nowrap; }
.tv-hon-group { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; overflow: hidden; } .tv-hon-group:first-child { flex: 0 0 auto; } .tv-hon-chip { flex: 0 0 auto; } .tv-hon-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--tv-dim); margin-right: 4px; }
.tv-hon-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--tv-card); border: 1px solid var(--tv-line); font-size: 14px; color: var(--tv-muted); } .tv-hon-chip strong { color: var(--tv-ink); }
.tv-hon-chip.win { border-color: var(--tv-gold); } .tv-hon-more { color: var(--tv-dim); font-size: 13px; } .tv-gchip.ach { border-radius: 50%; }
.tv-toast.award { border-color: var(--c, #f6c343); } .tv-overlay.award { background: radial-gradient(ellipse at center, rgba(202,138,4,.45), rgba(6,8,20,.96) 70%); }
/* Race */
.tv-race { display: flex; flex-direction: column; gap: 12px; } .tv-race.dense { gap: 6px; }
.tv-lane { display: grid; grid-template-columns: 250px minmax(0, 1fr) 190px; gap: 18px; align-items: center; background: var(--tv-card); border: 1px solid var(--tv-line); border-radius: 14px; padding: 10px 18px; position: relative; }
.tv-lane.top1 { border-color: var(--tv-gold); background: var(--tv-card-2); } .tv-lane.done .tv-track-fill { background: linear-gradient(90deg, #1a7f4b, #6ee7a8); }
.tv-lane-head { display: flex; align-items: center; gap: 10px; min-width: 0; } .tv-lane-head .tv-rank-n { font-size: 26px; width: 36px; }
.tv-lane-name { font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-track { position: relative; height: 54px; background: var(--tv-line-2); border-radius: 999px; overflow: visible; }
.tv-track-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #1e22aa, #5b61ff); transition: width 1.2s cubic-bezier(.2,.8,.2,1); max-width: 100%; }
.tv-runner { position: absolute; top: 50%; transform: translate(-50%, -50%); transition: left 1.2s cubic-bezier(.2,.8,.2,1); } .tv-runner .rav { box-shadow: 0 0 0 3px var(--tv-card), 0 6px 20px rgba(0,0,0,.4); }
.tv-flag { position: absolute; top: -8px; transform: translateX(-50%); font-size: 26px; line-height: 1; z-index: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.tv-lane-num { text-align: right; white-space: nowrap; } .tv-lane-num .tv-big { font-size: 28px; display: block; } .tv-lane-sub { font-size: 13px; color: var(--tv-muted); }
.tv-race.dense .tv-lane { padding: 5px 14px; grid-template-columns: 220px minmax(0, 1fr) 160px; } .tv-race.dense .tv-track { height: 36px; } .tv-race.dense .tv-runner .rav { width: 34px; height: 34px; font-size: 12px; } .tv-race.dense .tv-lane-name { font-size: 17px; } .tv-race.dense .tv-lane-num .tv-big { font-size: 22px; } .tv-race.dense .tv-lane-head .tv-rank-n { font-size: 20px; width: 30px; }
@media (max-width: 1100px) { .tv-kpis { grid-template-columns: repeat(2, 1fr); } .tv-main { grid-template-columns: 1fr; } .tv-row { grid-template-columns: 56px 56px minmax(0, 1fr) auto; } .tv-name { font-size: 20px; } .tv-big { font-size: 26px; } .tv-kpi-value { font-size: 30px; } .tv-who .tbar { width: 180px; } .tv-grid.cols-2, .tv-grid.cols-3 { grid-template-columns: 1fr; } .tv-flap.big { font-size: 56px; } .tv-flap.name { font-size: 30px; } }
table.board { font-size: 13px; }
table.board th, table.board td { padding: 9px 8px; }
table.board .rep-n { white-space: nowrap; }
table.board .tgt { min-width: 104px; } table.board .tbar { width: 104px; }
table.board td.num .delta, table.board td .small { white-space: nowrap; }
.src-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .src-col h3.sub { margin: 0 0 2px; } .src-sub { margin-bottom: 8px; }
@media (max-width: 900px) { .src-grid { grid-template-columns: 1fr; } }

/* ── Ad Spend insights (0.16) ───────────────────────────── */
.pace-wrap { display: block; }
.pace-track .pbar { display: block; width: 100%; }
.pbar { display: inline-block; width: 120px; vertical-align: middle; }
.warn-text { color: var(--warn); } .info-text { color: #0369a1; }
.seg button.seg-item { border: 0; border-right: 1px solid var(--line); background: transparent; font: inherit; cursor: pointer; border-radius: 0; }
.seg button.seg-item:last-child { border-right: 0; }
.seg button.seg-item.active { background: var(--brand-100); color: var(--brand); font-weight: 600; }
.pace-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.pace-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--brand); }
.pace-dot.tick { width: 3px; border-radius: 1px; background: #12142b; margin-right: 9px; }
.pace-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.pace-kpi { background: var(--bg); border-radius: var(--radius-s); padding: 10px 12px; min-width: 0; }
.pace-kpi.attention { background: var(--bad-bg); }
.pace-kpi-label { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .02em; font-weight: 600; }
.pace-kpi-value { font-size: 19px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pace-kpi-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.35; }
.money-grid { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 14px; align-items: start; }
.money-donut { text-align: center; }
.money-donut .donut { display: block; margin: 0 auto 4px; }
.money-table { margin: 0; }
.money-table th.spent-col, .money-table td.spent-col { min-width: 160px; white-space: nowrap; }
.money-table td.spent-col .pbar { width: 96px; margin-right: 8px; }
.money-table .table { width: 100%; }
.money-table .spent-text { font-size: 12.5px; }
.money-table .spent-text .pill { margin-left: 4px; }
.money-table th .muted { font-weight: 500; font-size: 11px; }
.money-table .total-row td { background: var(--bg); font-weight: 600; border-top: 2px solid var(--line); }
.dot { display: inline-block; vertical-align: -1px; margin-right: 6px; flex: none; }
.center { text-align: center; }
table.watch td { vertical-align: top; }
table.watch tr.sev3 td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
table.watch tr.sev2 td:first-child { box-shadow: inset 3px 0 0 #d59b1a; }
table.watch tr.sev1 td:first-child { box-shadow: inset 3px 0 0 var(--line); }
@media (max-width: 1200px) { .pace-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .money-grid { grid-template-columns: 1fr; } .money-donut .donut { width: 160px; height: 160px; } .pace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 0.19: the seasonal greeting pill on the classic TV header (boards.js adds it) */
.tv-greet { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: 14px; font-weight: 600; margin-left: 10px; } .tv-greet[hidden] { display: none; } body.tv.light .tv-greet { background: rgba(0,0,0,.06); border-color: rgba(0,0,0,.12); }

/* 0.19 · TV boards setup */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.input.color { padding: 2px 4px; height: 36px; width: 64px; cursor: pointer; }
.tv-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 5px; margin-right: 4px; vertical-align: middle; border: 1px solid rgba(0,0,0,.15); }
@media (max-width: 900px) { .grid4 { grid-template-columns: 1fr 1fr; } }

/* Goals page (0.21): the month grids */
table.goals.months .input.short { width: 118px; } table.goals.months td { vertical-align: top; padding-top: 9px; } table.goals.months tr.current td { background: var(--brand-100); } table.goals.months tr.past td { color: var(--ink-3); }
table.goals.months tr.divider td { background: var(--bg); padding: 6px 12px; } table.goals.months th .btn.small { height: 22px; padding: 0 7px; font-size: 11px; margin-left: 6px; vertical-align: middle; }
table.goals.months .input.filled { box-shadow: 0 0 0 2px var(--brand-100); } .goal-trail { margin-top: 3px; max-width: 320px; line-height: 1.35; }
.rep-default { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); margin-bottom: 12px; align-items: center; } .rep-default label .money-input, .rep-default label .input { margin-left: 6px; }
.goal-strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 118px; margin: 4px 0 2px; } .goal-strip .m { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 3px; }
.goal-strip .col { position: relative; flex: 1 1 auto; width: 100%; max-width: 40px; border-radius: 6px; background: var(--bg); } .goal-strip .bar { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px 6px 3px 3px; background: var(--brand); min-height: 3px; }
.goal-strip .bar.ok { background: var(--ok); } .goal-strip .bar.cur { background: #22a3c4; } .goal-strip em { position: absolute; left: -3px; right: -3px; height: 2px; background: var(--ink); opacity: .6; }
.goal-strip .l { font-size: 11px; color: var(--ink-3); white-space: nowrap; } .goal-strip .v { font-size: 11px; font-weight: 600; white-space: nowrap; }

/* TV boards → Marketing (0.21): the source chips */
.src-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; } .src-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 12.5px; }
.src-chip b { font-weight: 700; } .src-chip em { font-style: normal; color: var(--ink-3); } .src-chip.unmapped { border-style: dashed; } .src-chip.unmapped em { color: var(--ink-4); }

.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 4px; } .checks label { white-space: nowrap; }
