/* Growth Accelerator dashboard — dark, matches the black/silver brand mark. */
:root {
  --bg: #0a0b0e;
  --panel: #12141a;
  --panel-2: #171a22;
  --line: #232734;
  --ink: #e8eaf0;
  --muted: #8b91a3;
  --accent: #2f6df6;
  --accent-soft: rgba(47, 109, 246, 0.14);
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --grey: #6b7280;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 800; letter-spacing: 0.02em; }
h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 8px; }
.mt { margin-top: 22px; }
.muted { color: var(--muted); }
.pending { color: var(--amber); font-weight: 600; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px; border-bottom: 1px solid var(--line);
  background: rgba(10, 11, 14, 0.9); position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.mark { width: 40px; height: 40px; border-radius: 10px; mix-blend-mode: screen; }
.wordmark-sm {
  font-weight: 900; text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.82rem;
}
.topbar-sub { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.22em; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ---------- buttons / chips / pills ---------- */
.btn {
  display: inline-block; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--ink); padding: 8px 16px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; cursor: pointer;
  transition: all 0.15s ease;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #1c4fd6; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; margin-top: 12px; }
.chip {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}
.chip-warn { background: rgba(245, 158, 11, 0.14); color: var(--amber); }
.pill {
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.pill-lg { font-size: 0.78rem; padding: 6px 16px; }
.pill-green { background: rgba(34, 197, 94, 0.15); color: var(--green); box-shadow: inset 0 0 0 1px rgba(34,197,94,.35); }
.pill-red { background: rgba(239, 68, 68, 0.15); color: var(--red); box-shadow: inset 0 0 0 1px rgba(239,68,68,.35); }
.pill-grey { background: rgba(107, 114, 128, 0.15); color: #9aa1b0; box-shadow: inset 0 0 0 1px rgba(107,114,128,.35); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 20px; padding: 42px 34px; text-align: center;
}
.login-mark { width: 76px; height: 76px; border-radius: 18px; mix-blend-mode: screen; margin-bottom: 18px; }
.wordmark {
  font-weight: 900; text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 1.15rem; line-height: 1.35;
}
.login-sub { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; margin: 10px 0 26px; }
.login-input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); padding: 12px 14px; font-size: 0.95rem; outline: none;
}
.login-input:focus { border-color: var(--accent); }
.login-error { color: var(--red); font-size: 0.82rem; margin-bottom: 14px; }

/* ---------- layout ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 28px 26px 60px; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 22px;
}
.panel-sub { color: var(--muted); font-size: 0.85rem; margin: -6px 0 16px; }
.src-tag { font-size: 0.62rem; letter-spacing: 0.08em; background: var(--panel-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.empty-state { text-align: center; padding: 70px 30px; }
.empty-state h2 { justify-content: center; }
.empty-state p { color: var(--muted); max-width: 420px; margin: 0 auto; }

/* ---------- overview board ---------- */
.board-note { color: var(--muted); font-size: 0.8rem; margin-bottom: 18px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.account-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: block; transition: border-color 0.15s ease, transform 0.15s ease;
}
.account-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.account-name { font-weight: 800; font-size: 1.02rem; }
.account-meta { color: var(--muted); font-size: 0.78rem; margin: 4px 0 14px; }
.account-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.account-stats .k { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; display: block; }
.account-stats .v { font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.account-stats-empty { color: var(--muted); font-size: 0.82rem; }
.account-alerts { color: var(--red); font-size: 0.8rem; font-weight: 700; margin-top: 12px; }
.account-sync { color: var(--muted); font-size: 0.68rem; margin-top: 12px; }

/* ---------- client head ---------- */
.client-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.client-name { font-size: 1.6rem; font-weight: 900; letter-spacing: 0.01em; }
.client-meta { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.status-block { text-align: right; max-width: 320px; }
.status-note { color: var(--muted); font-size: 0.72rem; margin-top: 8px; }

/* ---------- stat strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
}
.stat-k { color: var(--muted); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 6px; }
.stat-v { font-size: 1.55rem; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ---------- funnel / leak ---------- */
.leak-check { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; }
.leak-check.leak-ok { border-color: rgba(34,197,94,.4); }
.leak-check.leak-bad { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.06); }
.leak-row { display: flex; justify-content: space-between; font-size: 0.88rem; padding: 3px 0; }
.leak-row strong { font-variant-numeric: tabular-nums; }
.leak-note { color: var(--muted); font-size: 0.72rem; margin-top: 8px; }
.fbar-row { display: grid; grid-template-columns: 130px 1fr 46px; align-items: center; gap: 12px; margin: 9px 0; }
.fbar-label { color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; }
.fbar-track { background: var(--panel-2); border-radius: 6px; height: 22px; overflow: hidden; }
.fbar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #6d9bff); border-radius: 6px; min-width: 2px; }
.fbar-n { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.fbar-conv { color: var(--muted); font-size: 0.68rem; margin: -4px 0 0 142px; }

/* ---------- efficiency ---------- */
.eff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eff { background: var(--panel-2); border-radius: 10px; padding: 12px 14px; }
.eff .k { display: block; color: var(--muted); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; }
.eff .v { display: block; font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.eff .sub { display: block; color: var(--muted); font-size: 0.66rem; margin-top: 2px; }

/* ---------- chart ---------- */
#daily-chart svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: 18px; color: var(--muted); font-size: 0.72rem; margin-top: 8px; }
.chart-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }

/* ---------- grading ---------- */
.input {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); padding: 10px 12px; font-size: 0.9rem; outline: none; width: 100%;
}
.input:focus { border-color: var(--accent); }
.grade-row { margin-bottom: 12px; }
.grade-buttons { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.gbtn {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  border-radius: 10px; padding: 10px 16px; font-size: 0.85rem; font-weight: 700; cursor: pointer;
  transition: all 0.12s ease;
}
.gbtn:hover { border-color: var(--accent); }
.gbtn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.gbtn-win.active { background: var(--green); border-color: var(--green); }
.grade-extras { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.amount-wrap { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.input-amount { width: 130px; }
.quality-wrap { display: flex; align-items: center; gap: 6px; }
.quality-wrap .k { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; margin-right: 4px; }
.qbtn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--muted); font-weight: 800; cursor: pointer;
}
.qbtn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.grade-msg { font-size: 0.82rem; min-height: 20px; margin-top: 6px; }
.grade-msg.ok { color: var(--green); }
.grade-msg.err { color: var(--red); }
.recent-grades { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.grade-item { display: flex; align-items: center; gap: 12px; padding: 5px 0; font-size: 0.84rem; }
.grade-status { font-weight: 700; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 9px; border-radius: 999px; background: var(--panel-2); }
.s-closed { color: var(--green); } .s-booked { color: var(--accent); }
.s-cancelled, .s-no_show, .s-disqualified { color: var(--red); }
.s-estimate { color: var(--amber); } .s-showed { color: #6d9bff; }
.grade-name { flex: 1; }
.grade-amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.grade-q, .grade-ts { color: var(--muted); font-size: 0.74rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th { color: var(--muted); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid rgba(35, 39, 52, 0.6); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ad-name { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vchip { font-size: 0.64rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 9px; border-radius: 999px; }
.v-winner, .v-ok { background: rgba(34,197,94,.14); color: var(--green); }
.v-fatigue, .v-lowdata, .v-low-data { background: rgba(245,158,11,.14); color: var(--amber); }
.v-failure, .v-miss { background: rgba(239,68,68,.14); color: var(--red); }
.v-na { background: var(--panel-2); color: var(--muted); }

/* ---------- operator panels ---------- */
.panel-operator { border-left: 3px solid var(--accent); }
.diag-verdict { font-size: 1.25rem; font-weight: 900; letter-spacing: 0.04em; margin-bottom: 12px; }
.diag-walk { margin: 0 0 12px 18px; color: var(--muted); font-size: 0.84rem; }
.diag-walk li { margin: 3px 0; }
.alerts { margin-top: 14px; }
.alert-row { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3); border-radius: 10px; padding: 10px 14px; margin: 8px 0; font-size: 0.85rem; }

.attribution-note { color: var(--muted); font-size: 0.76rem; text-align: center; max-width: 640px; margin: 30px auto 0; }

/* ---------- command center: tabs ---------- */
.page-wide { max-width: 1320px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab-btn {
  background: transparent; border: none; color: var(--muted); cursor: pointer;
  font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 10px 16px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--ink); border-bottom-color: var(--accent); }
.tab-pane.hidden { display: none; }
.stat-strip-6 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-sub { color: var(--muted); font-size: 0.68rem; margin-top: 4px; }
.trend { font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.66rem; }
.trend.up { color: var(--green); }
.trend.down { color: var(--red); }
.two-col-wide { grid-template-columns: 1.2fr 1fr; }
@media (max-width: 900px) { .two-col-wide { grid-template-columns: 1fr; } }
.pending-block {
  color: var(--muted); font-size: 0.85rem; background: var(--panel-2);
  border: 1px dashed var(--line); border-radius: 10px; padding: 16px 18px;
}

/* ---------- CEO brief ---------- */
#ov-brief p { margin: 6px 0; font-size: 0.92rem; }
.brief-list { margin: 4px 0 4px 20px; font-size: 0.88rem; }
.brief-list li { margin: 5px 0; }
.brief-actions li { color: var(--ink); }
.brief-actions li::marker { color: var(--accent); font-weight: 800; }

/* ---------- source chips / activity ---------- */
.src-chip {
  font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid; border-radius: 999px; padding: 1px 8px; white-space: nowrap;
}
.act-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 0.84rem; border-bottom: 1px solid rgba(35,39,52,.5); }
.act-row:last-child { border-bottom: none; }
.act-date { color: var(--muted); font-size: 0.72rem; min-width: 78px; font-variant-numeric: tabular-nums; }
.act-verb { color: var(--muted); }
.act-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-val { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- pipeline board ---------- */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.board-col { min-width: 230px; max-width: 250px; flex: 1; background: var(--panel-2); border-radius: 12px; padding: 10px; max-height: 640px; overflow-y: auto; }
.board-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 4px 6px 10px; position: sticky; top: 0; background: var(--panel-2); }
.board-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.pcard-blocked { border-color: rgba(239,68,68,.45); }
.pcard-top { display: flex; justify-content: space-between; gap: 8px; }
.pcard-name { font-weight: 700; font-size: 0.84rem; }
.pcard-val { font-weight: 800; font-size: 0.82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pcard-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.pcard-rep, .pcard-days { color: var(--muted); font-size: 0.7rem; }
.pcard-margin { color: var(--muted); font-size: 0.7rem; margin-top: 4px; }
.pcard-blocker { color: var(--red); font-size: 0.74rem; font-weight: 700; margin-top: 6px; }
.pcard-notes { color: var(--muted); font-size: 0.72rem; margin-top: 4px; }

/* ---------- lead sources / blended ---------- */
.blended-note { color: var(--muted); font-size: 0.84rem; margin-top: 12px; }
.blended-note strong { color: var(--ink); }

/* ---------- bottlenecks ---------- */
.bn-item { border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; padding: 14px 18px; margin-bottom: 12px; }
.bn-high { border-left-color: var(--red); }
.bn-medium { border-left-color: var(--amber); }
.bn-low { border-left-color: var(--grey); }
.bn-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bn-rank { color: var(--muted); font-weight: 900; }
.bn-area { font-weight: 800; font-size: 0.95rem; flex: 1; }
.bn-metric { font-size: 0.88rem; }
.bn-impact { color: var(--muted); font-size: 0.8rem; margin-top: 3px; }
.bn-action { color: var(--accent); font-size: 0.86rem; font-weight: 700; margin-top: 8px; }
.bn-clear { color: var(--green); font-weight: 700; }

/* ---------- add client (operator overview) ---------- */
.add-client { margin-bottom: 22px; }
.add-client-form { display: grid; grid-template-columns: 2fr 1fr 1.4fr auto; gap: 10px; }
@media (max-width: 800px) { .add-client-form { grid-template-columns: 1fr; } }
.add-client .grade-msg code { background: var(--panel-2); padding: 2px 8px; border-radius: 6px; font-weight: 800; }

/* ---------- layout format v2 (video-style): accent cards, sections, rates ---------- */
:root {
  --violet: #7c5cff;
  --sky: #6d9bff;
}
.section-label {
  color: var(--muted); font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.18em; margin: 26px 0 12px;
}
.section-label:first-child { margin-top: 0; }
.stat { border-left: 3px solid var(--line); }
.stat--blue   { border-left-color: var(--accent); }
.stat--green  { border-left-color: var(--green); }
.stat--violet { border-left-color: var(--violet); }
.stat--amber  { border-left-color: var(--amber); }
.stat--red    { border-left-color: var(--red); }
.stat--sky    { border-left-color: var(--sky); }
.stat-cap { color: var(--muted); font-size: 0.72rem; margin-top: 5px; }
.stat-v { letter-spacing: -0.01em; }

/* funnel v2: label | bar | count | rate */
.f2-row {
  display: grid; grid-template-columns: 120px 1fr 52px 130px;
  align-items: center; gap: 12px; margin: 11px 0;
}
.f2-label { color: var(--ink); font-size: 0.86rem; }
.f2-track { background: var(--panel-2); border-radius: 5px; height: 20px; overflow: hidden; }
.f2-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--sky)); border-radius: 5px; min-width: 2px; }
.f2-n { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.f2-rate { color: var(--muted); font-size: 0.76rem; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .f2-row { grid-template-columns: 90px 1fr 44px 90px; } .f2-rate { font-size: 0.68rem; } }

/* ============ app shell (RoofCommand-style layout, GA brand) ============ */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  background: #0d0e12; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; }
.side-brand .mark { width: 38px; height: 38px; }
.side-brand .wordmark-sm { font-size: 0.66rem; line-height: 1.3; }
.side-sub { color: var(--muted); font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.2em; margin-top: 2px; }
.side-nav { padding: 10px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: none; color: var(--muted); cursor: pointer;
  font-size: 0.86rem; font-weight: 600; padding: 10px 12px; border-radius: 10px;
  text-align: left;
}
.nav-item:hover { color: var(--ink); background: var(--panel); }
.nav-item.active { color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(47,109,246,.35); }
.nav-item .ni { width: 20px; text-align: center; font-size: 0.85rem; opacity: 0.85; }
.side-foot { padding: 12px 14px 16px; border-top: 1px solid var(--line); }
.side-client { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.side-client-name { font-weight: 800; font-size: 0.8rem; }
.side-client-meta { color: var(--muted); font-size: 0.68rem; }
.side-link { display: block; color: var(--muted); font-size: 0.76rem; padding: 4px 2px; }
.side-link:hover { color: var(--ink); }

.main { min-width: 0; }
.mtop {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 26px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; background: rgba(10,11,14,.92); backdrop-filter: blur(10px);
}
.mtop-title { font-size: 1.25rem; font-weight: 900; }
.mtop-sub { color: var(--muted); font-size: 0.74rem; display: flex; align-items: center; gap: 8px; }
.mtop-right { display: flex; align-items: center; gap: 10px; }
.input-search { width: 230px; padding: 8px 12px; font-size: 0.84rem; }
.content { padding: 24px 26px 60px; max-width: 1380px; }
.pg.hidden { display: none; }
.plink { color: var(--accent); font-size: 0.72rem; font-weight: 700; margin-left: auto; text-transform: none; letter-spacing: 0; }
.ttm-badge { font-size: 0.66rem; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 10px; font-weight: 800; }

/* callout row (BOTTLENECK / AD SPEND / REP RISK cards) */
.callout-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 22px; }
.callout { border: 1px solid; border-radius: var(--radius); padding: 16px 18px; background: var(--panel); }
.callout-red { border-color: rgba(239,68,68,.45); }
.callout-amber { border-color: rgba(245,158,11,.45); }
.callout-violet { border-color: rgba(124,92,255,.45); }
.callout-k { display: flex; align-items: center; gap: 7px; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 8px; }
.callout-red .callout-k { color: var(--red); } .callout-amber .callout-k { color: var(--amber); } .callout-violet .callout-k { color: var(--violet); }
.callout-t { font-size: 1.25rem; font-weight: 900; margin-bottom: 4px; }
.callout-d { color: var(--muted); font-size: 0.8rem; }
.callout-link { display: inline-block; margin-top: 10px; color: var(--accent); font-size: 0.8rem; font-weight: 700; cursor: pointer; }

/* pipeline snapshot */
.snap-row { margin: 12px 0; }
.snap-row-top { display: flex; justify-content: space-between; font-size: 0.84rem; margin-bottom: 5px; }
.snap-row-top .n { font-weight: 800; font-variant-numeric: tabular-nums; }
.snap-track { background: var(--panel-2); height: 7px; border-radius: 4px; overflow: hidden; }
.snap-fill { height: 100%; border-radius: 4px; }

/* jobs table */
.jobs-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.sel { width: auto; padding: 8px 10px; font-size: 0.82rem; }
.jobs-count { margin-left: auto; color: var(--muted); font-size: 0.84rem; font-weight: 700; }
.jobs-table td { padding: 12px 10px; }
.jobs-table tbody tr { cursor: pointer; }
.jobs-table tbody tr:hover td { background: rgba(47,109,246,.05); }
.jcust { font-weight: 800; }
.jcust .warn { color: var(--red); margin-left: 5px; }
.jsub { color: var(--muted); font-size: 0.72rem; font-weight: 400; }
.stage-chip { font-size: 0.68rem; font-weight: 800; padding: 3px 11px; border-radius: 999px; white-space: nowrap; }
.st-new_lead { background: rgba(109,155,255,.14); color: var(--sky); }
.st-appointment { background: rgba(47,109,246,.16); color: #7ea4ff; }
.st-estimate { background: rgba(124,92,255,.16); color: #a78bfa; }
.st-sold { background: rgba(245,158,11,.16); color: var(--amber); }
.st-production { background: rgba(34,197,94,.14); color: var(--green); }
.st-completed { background: rgba(139,145,163,.16); color: #aab0c0; }
.st-lost { background: rgba(239,68,68,.13); color: var(--red); }
.owner-cell { display: flex; align-items: center; gap: 8px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 800; color: var(--muted); }
.chev { color: var(--muted); }

/* modals */
.modal-overlay { position: fixed; inset: 0; background: rgba(5,6,8,.7); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 20px; overflow-y: auto; }
.modal-overlay.hidden { display: none; }
.modal-x { background: transparent; border: none; color: var(--muted); font-size: 1rem; cursor: pointer; }
.modal-x:hover { color: var(--ink); }

/* daily brief (email-style card) */
.brief-card { width: 100%; max-width: 720px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.brief-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); font-weight: 800; }
.brief-body { background: #f4f6fb; color: #101623; margin: 18px; border-radius: 10px; padding: 22px 26px; font-size: 0.92rem; line-height: 1.6; }
.brief-body .bmeta { color: #47506b; font-size: 0.8rem; margin-bottom: 12px; }
.brief-body h3 { color: #101623; font-size: 1.05rem; text-transform: none; letter-spacing: 0; margin: 0 0 12px; }
.brief-body p { margin: 8px 0; }
.brief-body strong { font-weight: 800; }
.brief-body ol { margin: 6px 0 6px 20px; }
.brief-foot { padding: 0 20px 16px; color: var(--muted); font-size: 0.72rem; }

/* job detail modal */
.job-card { width: 100%; max-width: 880px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px 30px; }
.job-head { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.job-name { font-size: 1.45rem; font-weight: 900; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.job-contact { color: var(--muted); font-size: 0.82rem; margin-top: 6px; display: flex; gap: 16px; flex-wrap: wrap; }
.job-value-k { color: var(--muted); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.14em; text-align: right; }
.job-value { font-size: 1.8rem; font-weight: 900; color: var(--accent); text-align: right; }
.blocker-chip { font-size: 0.7rem; font-weight: 700; color: var(--red); background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.35); padding: 3px 11px; border-radius: 999px; }
.jtimeline { display: flex; align-items: flex-start; margin: 30px 0 10px; }
.jt-step { display: flex; flex-direction: column; align-items: center; min-width: 74px; }
.jt-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel-2); display: flex; align-items: center; justify-content: center; font-size: 0.6rem; }
.jt-step.done .jt-dot { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.jt-label { color: var(--muted); font-size: 0.62rem; margin-top: 7px; text-align: center; }
.jt-step.done .jt-label { color: var(--ink); }
.jt-conn { flex: 1; height: 2px; background: var(--line); margin-top: 11px; }
.jt-conn.done { background: linear-gradient(90deg, var(--accent), var(--sky)); }
.job-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 22px; }
@media (max-width: 760px) { .job-cols { grid-template-columns: 1fr; } }
.jact { border-left: 2px solid var(--line); padding-left: 16px; }
.jact-item { position: relative; margin-bottom: 14px; font-size: 0.85rem; }
.jact-item::before { content: ""; position: absolute; left: -21px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--grey); }
.jact-item.hot::before { background: var(--red); }
.jact-item.warm::before { background: var(--amber); }
.jact-sub { color: var(--muted); font-size: 0.72rem; }
.jdetail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(35,39,52,.55); font-size: 0.84rem; }
.jdetail-row span:first-child { color: var(--muted); }
.jdetail-row strong { font-variant-numeric: tabular-nums; }

/* lead sources page */
.srcperf-row { display: grid; grid-template-columns: 1.5fr 70px 110px 60px 84px 70px 54px; gap: 10px; align-items: center; padding: 12px 4px; border-bottom: 1px solid rgba(35,39,52,.55); font-size: 0.84rem; }
.srcperf-head { color: var(--muted); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; border-bottom: 1px solid var(--line); }
.srcperf-name { font-weight: 800; }
.srcperf-sub { color: var(--muted); font-size: 0.7rem; font-weight: 400; }
.mini-track { background: var(--panel-2); height: 6px; border-radius: 3px; overflow: hidden; display: inline-block; width: 64px; margin-right: 7px; vertical-align: middle; }
.mini-fill { height: 100%; border-radius: 3px; }
.roas-good { color: var(--green); font-weight: 800; }
.num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.recent-jobs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 800px) { .recent-jobs-grid { grid-template-columns: 1fr; } }
.rj-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; cursor: pointer; }
.rj-card:hover { border-color: var(--accent); }
.rj-name { font-weight: 800; font-size: 0.9rem; }
.rj-sub { color: var(--muted); font-size: 0.72rem; }
.rj-val { font-weight: 900; color: var(--amber); white-space: nowrap; }

/* finance channels */
.fchan { border-bottom: 1px solid rgba(35,39,52,.55); padding: 16px 4px; }
.fchan-top { display: flex; justify-content: space-between; align-items: baseline; }
.fchan-name { font-weight: 800; font-size: 1rem; }
.fchan-cpa { font-size: 1.5rem; font-weight: 900; color: var(--green); }
.fchan-cpa.bad { color: var(--red); }
.fchan-sub { color: var(--muted); font-size: 0.78rem; margin-top: 3px; display: flex; justify-content: space-between; align-items: center; }
.eff-chip { font-size: 0.64rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.eff-good { background: rgba(34,197,94,.14); color: var(--green); }
.eff-bad { background: rgba(239,68,68,.13); color: var(--red); }
.fin-note { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.3); border-radius: 10px; padding: 12px 16px; font-size: 0.84rem; margin-top: 16px; }

/* bottlenecks page */
.bn-summary { border: 1px solid rgba(239,68,68,.4); border-radius: var(--radius); background: var(--panel); padding: 20px 24px; margin-bottom: 22px; }
.bn-summary h3 { font-size: 1.05rem; text-transform: none; letter-spacing: 0; color: var(--ink); display: flex; gap: 10px; align-items: center; }
.bn-summary p { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.bnf-row { display: grid; grid-template-columns: 90px 1fr 40px; gap: 12px; align-items: center; margin: 12px 0; }
.bnf-label { font-size: 0.86rem; }
.bnf-track { background: var(--panel-2); border-radius: 6px; height: 26px; overflow: hidden; }
.bnf-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--sky)); display: flex; align-items: center; padding-left: 10px; font-size: 0.72rem; font-weight: 800; min-width: 24px; }
.bnf-n { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.trend-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
.trend-card.off { border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.04); }
.trend-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.trend-name { font-weight: 800; }
.trend-status { font-size: 0.64rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.ts-ok { background: rgba(34,197,94,.14); color: var(--green); }
.ts-off { background: rgba(239,68,68,.13); color: var(--red); }
.trend-nums { display: flex; align-items: baseline; gap: 14px; }
.trend-cur { font-size: 1.7rem; font-weight: 900; }
.trend-card.off .trend-cur { color: var(--red); }
.trend-vs { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; }
.trend-avg { font-size: 1.25rem; font-weight: 800; color: var(--muted); }
.trend-lost { margin-left: auto; color: var(--red); font-weight: 900; font-size: 1.1rem; }

/* reps page */
.rep-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 14px; display: grid; grid-template-columns: 46px 1.6fr repeat(4, 1fr); gap: 16px; align-items: center; }
.rep-card.risk { border-color: rgba(239,68,68,.5); }
.rep-rank { font-size: 1.3rem; font-weight: 900; color: var(--muted); text-align: center; }
.rep-name { font-weight: 900; font-size: 1.05rem; }
.rep-rev { font-size: 1.5rem; font-weight: 900; color: var(--green); }
.rep-rev-k { color: var(--muted); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.12em; }
.rep-bar { background: var(--panel-2); border-radius: 3px; height: 6px; width: 140px; overflow: hidden; margin-top: 6px; }
.rep-bar-fill { height: 100%; background: var(--green); border-radius: 3px; }
.rep-card.risk .rep-bar-fill { background: var(--red); }
.rep-stat { text-align: right; }
.rep-stat .v { font-size: 1.3rem; font-weight: 900; font-variant-numeric: tabular-nums; display: block; }
.rep-stat .k { color: var(--muted); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; }
.rep-stat .v.good { color: var(--green); } .rep-stat .v.bad { color: var(--red); }
.rep-warnbar { grid-column: 1 / -1; background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3); border-radius: 10px; padding: 10px 14px; font-size: 0.82rem; }
@media (max-width: 900px) { .rep-card { grid-template-columns: 34px 1fr 1fr; } .rep-stat { text-align: left; } }

/* ask AI panel */
.askai { position: fixed; top: 0; right: 0; bottom: 0; width: 360px; background: var(--panel); border-left: 1px solid var(--line); z-index: 90; display: flex; flex-direction: column; box-shadow: -18px 0 40px rgba(0,0,0,.4); }
.askai.hidden { display: none; }
.askai-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); font-weight: 800; }
.askai-body { padding: 18px; }
.askai-q { border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font-size: 0.85rem; margin-top: 10px; color: var(--muted); }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; }
  .side-nav { flex-direction: row; }
  .side-foot { display: none; }
  .input-search { display: none; }
}

/* ---------- Ask AI chat ---------- */
.askai-intro { padding: 20px 18px 6px; text-align: center; }
.askai-intro-t { font-weight: 800; }
.askai-intro-d { color: var(--muted); font-size: 0.78rem; margin-top: 4px; }
.askai-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.askai-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 0.86rem; white-space: pre-wrap; line-height: 1.5; }
.askai-msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.askai-msg.ai { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.askai-msg.pending { color: var(--muted); font-style: italic; }
.askai-suggestions { display: flex; flex-direction: column; gap: 8px; }
.askai-q { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 10px; padding: 11px 14px; font-size: 0.85rem; text-align: left; cursor: pointer; }
.askai-q:hover { border-color: var(--accent); color: var(--ink); }
.askai-inputrow { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.askai-inputrow .input { flex: 1; }
.askai-foot { color: var(--muted); font-size: 0.66rem; padding: 0 16px 12px; text-align: center; }

/* ---------- auth pages (signup / account) ---------- */
.login-ok { color: var(--green); font-size: 0.82rem; margin-bottom: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-links { margin-top: 18px; font-size: 0.8rem; color: var(--muted); }
.auth-links a { color: var(--accent); font-weight: 600; }
.auth-sep { margin: 0 8px; }
.auth-hint { color: var(--muted); font-size: 0.72rem; text-align: left; line-height: 1.5; }
.account-card { max-width: 420px; text-align: center; }
.account-rows { text-align: left; margin: 18px 0 6px; }
.account-row { display: flex; justify-content: space-between; padding: 8px 2px; border-bottom: 1px solid rgba(35,39,52,.55); font-size: 0.86rem; }
.account-row span { color: var(--muted); }
.account-h { margin-top: 22px; margin-bottom: 10px; text-align: left; }

/* ---------- Connect CRM (operator) ---------- */
.btn-warn { border-color: rgba(245,158,11,.5); color: var(--amber); }
.btn-warn:hover { border-color: var(--amber); background: rgba(245,158,11,.08); }
.crm-card { max-width: 520px; }
.crm-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.crm-label { color: var(--muted); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 6px; }
.crm-linked { color: var(--green); font-size: 0.85rem; font-weight: 700; }
.crm-help { color: var(--muted); font-size: 0.76rem; line-height: 1.5; }
.crm-help code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; }

/* ---------- create-client wizard ---------- */
.page-narrow { max-width: 720px; }

.wiz-eyebrow {
  color: var(--accent); font-size: 0.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 8px;
}
.wiz-panel h2 { font-size: 1.05rem; text-transform: none; letter-spacing: 0.01em; color: var(--ink); }
.wiz-field { margin-bottom: 20px; }
.wiz-field label {
  display: block; margin-bottom: 7px; font-size: 0.72rem; font-weight: 800;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em;
}
.wiz-hint { color: var(--muted); font-size: 0.78rem; line-height: 1.55; margin-top: 7px; }
.wiz-hint strong { color: var(--ink); font-weight: 700; }

.wiz-found { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 22px; }
.wiz-found-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 11px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}
.wiz-found-row:last-child { border-bottom: none; }
.wiz-found-row .k { color: var(--muted); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; }
.wiz-found-row .v { text-align: right; font-weight: 600; }
.wiz-found-row.is-warn .v { color: var(--amber); }

.wiz-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

.wiz-drop {
  display: block; border: 1px dashed var(--line); border-radius: 12px;
  background: var(--panel-2); padding: 38px 20px; text-align: center; cursor: pointer;
  margin-bottom: 20px; transition: all 0.12s ease;
}
.wiz-drop:hover, .wiz-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.wiz-drop-icon { font-size: 1.7rem; margin-bottom: 8px; }
.wiz-drop-main { font-weight: 700; margin-bottom: 4px; }
.wiz-drop-sub { color: var(--muted); font-size: 0.8rem; }

.wiz-code { margin: 14px 0 20px; color: var(--muted); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; }
.wiz-code code {
  /* text-transform MUST stay none: invite codes are case-sensitive (checked against
     the client's dashboard.password), so uppercasing them here would hand the
     operator a code that can't work. */
  display: inline-block; margin-left: 10px; background: var(--panel-2); color: var(--ink);
  padding: 6px 12px; border-radius: 8px; font-size: 0.95rem; font-weight: 800;
  letter-spacing: 0; text-transform: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 620px) {
  .wiz-actions { flex-direction: column-reverse; }
  .wiz-actions .btn { width: 100%; }
}
.board-actions { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.sync-note { font-size: 0.78rem; margin-left: 10px; }
.sync-note.is-ok { color: var(--muted); }
.sync-note.is-err { color: var(--red); }

/* ---------- speed to lead ---------- */
.speed-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 20px; }
.speed-stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.speed-stat .k { display: block; color: var(--muted); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.11em; margin-bottom: 6px; }
.speed-stat .v { font-size: 1.4rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.speed-stat .v.good { color: var(--green); }
.speed-stat .v.warn { color: var(--amber); }
.speed-stat .v.bad  { color: var(--red); }
.speed-buckets { display: flex; flex-direction: column; gap: 10px; }
.sb-head { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
.sb-bar { height: 7px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.sb-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.hook-row { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.hook-label { color: var(--muted); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 9px; }
.hook-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hook-line code { flex: 1; min-width: 240px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: 0.78rem; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.hook-help { color: var(--muted); font-size: 0.76rem; margin-top: 9px; line-height: 1.5; }
.hook-help code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; }

/* ---------- data integrity banner ---------- */
.health-banner { border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; border: 1px solid; }
.health-banner.is-bad { background: rgba(239,68,68,.09); border-color: rgba(239,68,68,.4); }
.health-banner.is-warn { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.35); }
.hb-title { font-weight: 800; font-size: 0.88rem; margin-bottom: 6px; }
.health-banner.is-bad .hb-title { color: var(--red); }
.health-banner.is-warn .hb-title { color: var(--amber); }
.hb-detail { font-size: 0.82rem; color: var(--ink); margin-top: 7px; line-height: 1.5; }
.hb-fix { color: var(--muted); font-size: 0.79rem; margin-top: 4px; }

/* ---------- owner home (operator landing) ---------- */
.side-nav a.nav-item { display: flex; align-items: center; gap: 10px; }
.topbar-owner { position: static; backdrop-filter: none; background: transparent; padding: 22px 28px 10px; border-bottom: 0; align-items: flex-end; }
.owner-h1 { font-size: 1.5rem; letter-spacing: 0; margin-top: 2px; }
.owner-stamp { font-size: 0.74rem; }
.owner-content { padding: 10px 28px 60px; }
.o-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 22px; }
.o-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: block; color: inherit; }
a.o-card:hover { border-color: var(--accent); }
.o-card .stat-k { margin-bottom: 8px; }
.o-card .stat-v { font-size: 1.7rem; }
.o-card .stat-sub { font-size: 0.74rem; }
.o-two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 22px; }
.o-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.o-panel h2 { margin-bottom: 14px; }
.o-funnel { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 8px 0 14px; }
.o-step { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; text-align: center; min-width: 0; }
.o-step b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.o-step span { display: block; color: var(--muted); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; line-height: 1.3; }
.o-step small { display: block; color: var(--accent); font-size: 0.66rem; margin-top: 3px; }
.o-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.o-table th { text-align: left; color: var(--muted); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.o-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.o-table tr:last-child td { border-bottom: 0; }
.o-table .num { text-align: right; }
.o-empty { color: var(--muted); font-size: 0.86rem; padding: 14px 0; }
.o-setup { background: var(--accent-soft); border: 1px solid rgba(47,109,246,.35); border-radius: 12px; padding: 14px 16px; font-size: 0.86rem; margin-bottom: 18px; }
.o-setup code { background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 6px; font-size: 0.8rem; }
.o-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.o-row:last-child { border-bottom: 0; }
.o-row .name { font-weight: 700; }
.o-row .meta { color: var(--muted); font-size: 0.76rem; }
.o-clients-list a { color: var(--accent); font-size: 0.8rem; }
.o-ab { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.o-ab .o-step { text-align: left; padding: 12px 14px; }
.o-badge { display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.o-badge.live { color: var(--green); border-color: rgba(34,197,94,.4); }
@media (max-width: 1000px) { .o-two { grid-template-columns: 1fr; } .o-funnel { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .app { grid-template-columns: 1fr; } .side { display: none; } }
/* revenue range block */
.o-rev { margin-bottom: 22px; }
.o-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.o-preset { font-size: 0.74rem; font-weight: 700; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--panel-2); }
.o-preset:hover { color: var(--ink); border-color: var(--accent); }
.o-preset.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.o-range-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.o-range-row label { display: flex; flex-direction: column; gap: 4px; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.o-range-row input[type=date] { background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 0.85rem; color-scheme: dark; }
.o-rev-big { padding: 18px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.o-rev-total { font-size: 2.4rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--green); }
.o-rev-sub { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
