/* ReclipIt founder admin dashboard V2 (2026-11-24; V1 shell kept). No new palette: the light values are the approved Account / Auth light
   surface (index.html .acp-account, creators/creators.css :root), the sidebar values are the dashboard's own dark sidebar
   (index.html :root --side, --raised, --line, --text-2/3, --ice). Radius ladder 4 / 8 / 10 / 14. Motion: none beyond hover
   colour changes (motion reports state; nothing here animates). */
:root {
  /* light workspace (Account / Auth) */
  --bg: #E7ECF2; --card: #FFFFFF; --surface-2: #F4F7FA; --well: #DCE3EC;
  --line: #D4DCE6; --line-2: #C7D1DD; --line-3: #B2BFCE;
  --text: #0A1220; --text-2: #3E4859; --text-3: #5B6576;
  --blue: #1E6FEA; --blue-h: #195FD0; --ok: #157F3C; --warn: #B54708; --error: #B42318;
  --card-shadow: 0 1px 2px rgba(10,18,32,.04), 0 14px 34px -22px rgba(10,18,32,.22);
  /* dark sidebar (the dashboard's) */
  --side: #101A2B; --side-raised: #18263B; --side-line: #26364D; --side-text: #F8FAFC; --side-text-2: #94A3B8; --side-text-3: #8191A8; --ice: #CFE0FF;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ring: 0 0 0 2px #FFFFFF, 0 0 0 4px #5B95F0;
  --sbw: 232px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell: dark sidebar + light workspace ---------- */
/* desktop: a two-column grid; the dark column runs the page's full height, its content stays in view (sticky) */
.shell { display: grid; grid-template-columns: var(--sbw) minmax(0, 1fr); min-height: 100vh; }
.side { position: relative; z-index: 20; background: var(--side); border-right: 1px solid var(--side-line); color: var(--side-text-2); }
.side-in { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px 14px; }
.side-top { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; margin-bottom: 22px; }
.mark { display: inline-flex; line-height: 0; }
.mark img { width: auto; height: 24px; }
.side-tag { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--side-text-3); }
.nav { display: grid; gap: 2px; }
.nav-i { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px 0 12px; border-radius: 8px; font-size: 14px; font-weight: 550; color: var(--side-text-2); }
.nav-i svg { width: 16px; height: 16px; flex: none; }
.nav-i:hover { background: var(--side-raised); color: var(--side-text); }
.nav-i[aria-current="page"] { background: var(--side-raised); color: var(--side-text); }
.nav-i[aria-current="page"] svg { color: var(--ice); }
.nav-n { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; color: var(--side-text); font-variant-numeric: tabular-nums; }
.nav-i:focus-visible { box-shadow: 0 0 0 2px var(--side), 0 0 0 4px #5B95F0; }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--side-line); font-size: 12.5px; line-height: 1.4; color: var(--side-text-3); }
.side-foot b { display: block; font-weight: 550; color: var(--side-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; min-height: 100vh; outline: none; }
.page { max-width: 1120px; padding: 40px 44px 64px; }

/* ---------- page header ---------- */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.ph h1 { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.ph p { margin-top: 4px; font-size: 14px; color: var(--text-3); }
.ph .btn { flex: none; }

/* ---------- surfaces, sections ---------- */
.sf { background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--card-shadow); }
.sec + .sec { margin-top: 34px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.sec-h p { font-size: 13px; color: var(--text-3); }
.note { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--text-3); }
.note + .note { margin-top: 4px; }

/* the KPI ledger: one surface, hairline cells (a ledger, not a row of cards) */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { min-width: 0; padding: 20px 22px 18px; border-left: 1px solid var(--line); }
.kpi:nth-child(4n + 1) { border-left: 0; }
.kpi:nth-child(n + 5) { border-top: 1px solid var(--line); }
.kpi dt { font-size: 12.5px; font-weight: 550; color: var(--text-3); }
.kpi .v { display: block; margin-top: 6px; font-size: 28px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .v.sm { font-size: 20px; line-height: 1.3; }
.kpi .v .u { font-size: 15px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.kpi .s { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--text-3); }
.kpi .na { color: var(--text-3); font-weight: 600; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { padding: 11px 16px; font-size: 12px; font-weight: 600; text-align: left; color: var(--text-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr:first-child td { border-top: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .q { color: var(--text-3); }
.tbl .mono { font-family: var(--mono); font-size: 12.5px; color: var(--text-3); }
.tbl .wrap { min-width: 220px; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; }

/* funnel rows: the stage, its count, its share of the cohort and a hairline bar (one data mark; the paid stage in blue) */
.bar { position: relative; height: 6px; min-width: 80px; border-radius: 4px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--line-3); }
.bar.key i { background: var(--blue); }
.tbl td.bc { width: 30%; vertical-align: middle; }

/* status: text + dot (no pills) */
.st { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--line-3); }
.st.s-new::before, .st.s-running::before, .st.s-queued::before, .st.s-leased::before, .st.s-open::before { background: var(--blue); }
.st.s-shortlisted::before, .st.s-call_invited::before, .st.s-recovering::before { background: var(--text-2); }
.st.s-accepted::before, .st.s-succeeded::before, .st.s-ok::before { background: var(--ok); }
.st.s-failed::before, .st.s-bad::before { background: var(--error); }
.st.s-interrupted::before { background: var(--warn); }

/* ---------- buttons (the light Account set) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s; }
.btn:disabled { cursor: default; opacity: .55; }
.btn-primary { background: var(--blue); color: #FFFFFF; }
.btn-primary:hover:not(:disabled) { background: var(--blue-h); }
.btn-secondary { background: #FFFFFF; border-color: var(--line-2); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line-3); }
.btn-quiet { height: 34px; padding: 0 10px; color: var(--text-2); }
.btn-quiet:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: #FFFFFF; border-color: var(--line-2); color: var(--error); }
.btn-danger:hover:not(:disabled) { background: #FEF3F2; border-color: #F4B7B1; }

/* ---------- applications: list + detail ---------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: var(--well); }
.seg button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font-size: 13.5px; font-weight: 550; color: var(--text-2); }
.seg button i { font-style: normal; margin-left: 5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] { background: #FFFFFF; color: var(--text); box-shadow: 0 1px 2px rgba(10,18,32,.10); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--text); }
.inbox { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 18px; }
.alist { overflow: hidden; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; width: 100%; padding: 13px 16px; border: 0; border-top: 1px solid var(--line);
  background: transparent; text-align: left; }
.alist li:first-child .arow { border-top: 0; }
.arow:hover { background: var(--surface-2); }
.arow[aria-current="true"] { background: #EAF1FE; }   /* the dashboard's --field-drop light-blue tint: the selected applicant */
.arow b { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow .d { font-size: 12.5px; color: var(--text-3); text-align: right; }
.arow .m { grid-column: 1 / -1; font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 28px 20px; font-size: 14px; color: var(--text-3); text-align: center; }
.det { padding: 24px 26px 22px; }
.det-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.det-h h2 { font-size: 20px; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; overflow-wrap: anywhere; }
.det-h p { margin-top: 4px; font-size: 13.5px; color: var(--text-3); }
.dl { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 0; margin-top: 18px; border-top: 1px solid var(--line); }
.dl dt, .dl dd { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dl dt { color: var(--text-3); }
.dl dd { min-width: 0; overflow-wrap: anywhere; }
.dl a { color: var(--blue); font-weight: 550; }
.dl a:hover { text-decoration: underline; text-underline-offset: 3px; }
.dl .none { color: var(--text-3); }
.lbl { margin-top: 20px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.quote { margin-top: 8px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14.5px;
  line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.warn { margin-top: 14px; font-size: 13.5px; color: var(--warn); }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.acts .final { font-size: 14px; color: var(--text-2); }
.acts .msg { flex-basis: 100%; font-size: 13.5px; color: var(--text-2); }
.acts .msg.err { color: var(--error); }
.cfm { flex-basis: 100%; font-size: 14px; color: var(--text); }
.back { display: none; }

/* ---------- operations ---------- */
.health { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.health > div { padding: 14px 18px; border-left: 1px solid var(--line); min-width: 0; }
.health > div:nth-child(4n + 1) { border-left: 0; }
.health > div:nth-child(n + 5) { border-top: 1px solid var(--line); }
.health dt { font-size: 12.5px; color: var(--text-3); }
.health dd { margin-top: 4px; font-size: 14.5px; font-weight: 600; }

/* ---------- settings ---------- */
.set { max-width: 680px; }
.set .row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 22px; border-top: 1px solid var(--line); }
.set .row:first-child { border-top: 0; }
.set .row dt { font-size: 14px; color: var(--text-3); }
.set .row dd { font-size: 14.5px; font-weight: 550; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.set .foot { display: flex; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); }

/* ---------- the sign-in gate (light, the Auth ground) ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-c { width: min(420px, 100%); padding: 30px 30px 26px; text-align: left; }
.gate-c.sf { box-shadow: var(--card-shadow); }
.gate-c img { width: auto; height: 26px; margin-bottom: 22px; }
.gate-c h1 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.gate-c p { margin-top: 6px; font-size: 14.5px; color: var(--text-3); }
.gate-c .btn { margin-top: 20px; width: 100%; height: 42px; }
.gate-wait { text-align: center; color: var(--text-3); font-size: 14px; }

/* ---------- loading: fixed geometry, values fill in place ---------- */
.ph-line { display: inline-block; width: 64px; height: 1em; border-radius: 4px; background: var(--surface-2); vertical-align: middle; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .kpis, .health { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(4n + 1), .health > div:nth-child(4n + 1) { border-left: 1px solid var(--line); }
  .kpi:nth-child(2n + 1), .health > div:nth-child(2n + 1) { border-left: 0; }
  .kpi:nth-child(n + 3), .health > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .shell { display: block; }
  .side { position: sticky; top: 0; border-right: 0; border-bottom: 1px solid var(--side-line); }
  .side-in { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px)); }
  .side-top { margin: 0; height: 32px; padding: 0 4px; }
  .mark img { height: 20px; }
  .side-foot { display: none; }
  /* phones: the four sections as one row of equal tabs (icon over label), all always visible */
  .nav { order: 3; flex-basis: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
  .nav-i { position: relative; flex-direction: column; justify-content: center; gap: 3px; height: 50px; padding: 0 4px; font-size: 11.5px; }
  .nav-i span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-n { position: absolute; top: 5px; left: calc(50% + 10px); margin: 0; font-size: 11px; }
  .page { padding: 22px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
  .ph { align-items: flex-start; margin-bottom: 18px; }
  .ph > div { min-width: 0; }
  .ph .btn-quiet { margin: -2px -10px 0 0; }
  .ph h1 { font-size: 23px; }
  .kpi { padding: 15px 15px 14px; }
  .kpi .v { font-size: 23px; }
  .kpi .v.sm { font-size: 17px; }
  .tbl th, .tbl td { padding: 10px 12px; }
  .tbl td.bc { display: none; }
  .tbl th.bc { display: none; }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox.has-sel .alist { display: none; }
  .inbox:not(.has-sel) .det { display: none; }
  .back { display: inline-flex; margin: -4px 0 12px -10px; }
  .det { padding: 18px 16px 18px; }
  .dl { grid-template-columns: minmax(0, 1fr); }
  .dl dt { padding: 10px 0 0; border-bottom: 0; font-size: 12.5px; }
  .dl dd { padding: 2px 0 10px; }
  .acts .btn { flex: 1 1 auto; }
  .set .row { padding: 14px 16px; }
  .seg { display: flex; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .seg button { flex: none; }
}
.tbl .sm { display: none; }
@media (max-width: 860px) {
  .tbl { font-size: 13.5px; }
  .tbl th, .tbl td { padding: 10px 8px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 14px; }
  .tbl th:last-child, .tbl td:last-child { padding-right: 14px; }
  .tbl .lg, .tbl .ph-hide { display: none; }
  .tbl .sm { display: inline; }
  .sec-h { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { .btn, .nav-i { transition: none; } }
.tbl .nw { white-space: nowrap; }

/* ================= V2: one chart per section ================= */
/* account row (desktop sidebar foot) opens Settings; on phones the header's settings icon does */
.side-foot { padding: 8px 0 0; }
.acct { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-text-3); }
.acct span { min-width: 0; flex: 1; }
.acct small { display: block; font-size: 12px; }
.acct svg { width: 16px; height: 16px; flex: none; }
.acct:hover, .acct[aria-current="page"] { background: var(--side-raised); color: var(--side-text-2); }
.acct[aria-current="page"] svg { color: var(--ice); }
.side-set { display: none; }

/* header right: the period control */
.ph-r { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.per button { min-width: 44px; padding: 0 10px; }
.cust { display: flex; gap: 8px; }
.cust label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.cust input { height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); font: inherit; font-size: 13.5px; color: var(--text); }

/* the chart card: metric tabs on top (each tab carries its own headline number), one chart under them */
.chart-card { overflow: hidden; }
.mtabs { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; border-bottom: 1px solid var(--line); }
.mtabs button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 16px 20px 15px; border: 0; border-left: 1px solid var(--line);
  background: var(--surface-2); text-align: left; transition: background .15s; }
.mtabs button:first-child { border-left: 0; }
.mtabs button:hover { background: #EEF2F6; }
.mtabs button[aria-selected="true"] { background: var(--card); box-shadow: inset 0 -2px 0 var(--text); }
.mtabs .ml { font-size: 12.5px; font-weight: 550; color: var(--text-3); }
.mtabs button[aria-selected="true"] .ml { color: var(--text-2); }
.mtabs .mv { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mtabs .mv.sm { font-size: 16px; line-height: 1.85; }
.mtabs .ms { font-size: 12.5px; line-height: 1.35; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mtabs .na { color: var(--text-3); font-weight: 600; }
.ph-tabs { height: 92px; background: var(--surface-2); }
.chart-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 22px 0; }
.chart-meta p { max-width: 720px; font-size: 13px; line-height: 1.45; color: var(--text-3); }
.chart { position: relative; min-height: 270px; margin: 6px 14px 0 8px; outline: none; }
.chart:focus-visible { box-shadow: var(--ring); border-radius: 8px; }
.chart svg { display: block; touch-action: pan-y; }
.chart .g { stroke: var(--line); stroke-width: 1; }
.chart .g0 { stroke: var(--line-3); stroke-width: 1; }
.chart .yt, .chart .xt { font: 11.5px var(--sans); fill: var(--text-3); font-variant-numeric: tabular-nums; }
.chart .gap-t { font: 12px var(--sans); fill: var(--text-3); }
.chart .bn { font: 600 11.5px var(--sans); fill: var(--text-2); font-variant-numeric: tabular-nums; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .xh { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .hit { cursor: crosshair; }
.tip { position: absolute; top: 4px; z-index: 5; min-width: 170px; max-width: 260px; padding: 9px 11px; border-radius: 10px; background: var(--card); border: 1px solid var(--line-2);
  box-shadow: 0 8px 24px -10px rgba(10,18,32,.28); font-size: 12.5px; pointer-events: none; }
.tip .th { margin-bottom: 5px; font-weight: 600; color: var(--text); }
.tip .tr { display: flex; align-items: center; gap: 7px; padding: 1px 0; color: var(--text-2); }
.tip .tr i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.tip .tr span { flex: 1; }
.tip .tr b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.tip .tt { margin-top: 4px; padding-top: 5px; border-top: 1px solid var(--line); }
.tip .tn { margin-top: 3px; color: var(--text-3); }
.chart-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px; padding: 6px 22px 14px; }
.lgd { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--text-2); }
.lgd li { display: inline-flex; align-items: center; gap: 6px; }
.lgd i { width: 10px; height: 10px; border-radius: 3px; }
.tview { margin-left: auto; font-size: 12.5px; color: var(--text-3); }
.tview summary { cursor: pointer; list-style: none; padding: 4px 0; }
.tview summary::-webkit-details-marker { display: none; }
.tview summary:hover { color: var(--text); }
.tview[open] { flex-basis: 100%; }
.tview .scroll { max-height: 300px; overflow: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; }
.tview .tbl { font-size: 13px; }

/* basis: text + dot (Actual / Calculated / Estimate / Partial estimate / Not connected / Example data) */
.bas { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.bas::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-3); }
.bas.b-ok::before { background: var(--ok); }
.bas.b-calc::before { background: var(--text-2); }
.bas.b-est::before { background: var(--warn); }
.bas.b-off { color: var(--text-3); }
.bas.b-ex::before { background: var(--warn); }

/* compact health strip (Code) */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.strip > div { padding: 12px 18px; border-left: 1px solid var(--line); min-width: 0; }
.strip > div:first-child { border-left: 0; }
.strip dt { font-size: 12px; color: var(--text-3); }
.strip dd { margin-top: 2px; font-size: 14.5px; font-weight: 600; }

/* progressive disclosure: details rows on one surface */
.details { margin-top: 26px; display: grid; gap: 0; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--card-shadow); overflow: hidden; }
.sec + .details, .chart-card + .details { margin-top: 26px; }
.dx + .dx { border-top: 1px solid var(--line); }
.dx summary { display: flex; align-items: baseline; gap: 14px; padding: 15px 20px; cursor: pointer; list-style: none; }
.dx summary::-webkit-details-marker { display: none; }
.dx summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; flex: none; align-self: center; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.dx[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.dx summary:hover { background: var(--surface-2); }
.dx .dt { font-size: 14.5px; font-weight: 600; }
.dx .ds { font-size: 13px; color: var(--text-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx .db { padding: 0 20px 18px; }
.dx .db .scroll { border: 1px solid var(--line); border-radius: 10px; }
.dx .db .health { border: 1px solid var(--line); border-radius: 10px; }
.prose { max-width: 720px; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.details .dx .sec { margin: 0; }
.sec:not(.details) > .dx { margin-top: 12px; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--card-shadow); }

/* provider costs */
.costs .pn { font-weight: 600; }
.costs .tot td { background: var(--surface-2); font-weight: 600; }
.costs .tot .q { font-weight: 500; }

/* content: not connected + example */
.nc { padding: 34px 26px 32px; max-width: 640px; }
.nc h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.nc p { margin-top: 6px; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.nc .btn { margin-top: 18px; }
.exb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 14px; padding: 10px 8px 10px 14px; border: 1px solid #F1C48F; border-radius: 10px; background: #FFF8EE; font-size: 13.5px; color: var(--text-2); }
.exb b { color: var(--warn); }
.exb .btn { margin-left: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.filters label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.filters select { height: 34px; padding: 0 30px 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); font: inherit; font-size: 13.5px; color: var(--text); }

@media (max-width: 1100px) {
  .mtabs button { padding: 14px 14px 13px; }
  .mtabs .mv { font-size: 21px; }
}
@media (max-width: 860px) {
  .side-set { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-left: auto; border-radius: 8px; color: var(--side-text-2); }
  .side-set svg { width: 18px; height: 18px; }
  .side-set[aria-current="page"] { background: var(--side-raised); color: var(--ice); }
  .side-top { flex: 1; }
  .ph { flex-direction: column; align-items: stretch; gap: 12px; }
  .ph-r { align-items: stretch; }
  .per { width: 100%; }
  .per button { flex: 1; }
  .cust input { width: 100%; min-width: 0; }
  .cust label { flex: 1; min-width: 0; }
  /* phones: the metric tabs scroll sideways; the selected one stays readable */
  .mtabs { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mtabs::-webkit-scrollbar { display: none; }
  .mtabs button { flex: 0 0 auto; min-width: 148px; max-width: 200px; padding: 13px 14px 12px; }
  .mtabs .mv { font-size: 20px; }
  .chart-meta { flex-direction: column; gap: 6px; padding: 14px 14px 0; }
  .chart { min-height: 210px; margin: 4px 6px 0 2px; }
  .chart-foot { padding: 4px 14px 12px; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip > div:nth-child(3) { border-left: 0; }
  .strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .strip > div { padding: 10px 14px; }
  .dx summary { flex-wrap: wrap; gap: 2px 12px; padding: 14px 14px; position: relative; padding-right: 34px; }
  .dx summary::after { position: absolute; right: 16px; top: 22px; }
  .dx .ds { flex-basis: 100%; white-space: normal; }
  .dx .db { padding: 0 12px 14px; }
  .nc { padding: 24px 16px; }
  .exb .btn { margin-left: -10px; }
  .filters label { flex: 1 1 140px; }
  .filters select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .mtabs button, .dx summary::after { transition: none; } }
.chart-card + .sec { margin-top: 34px; }
.costs .tot td:first-child { white-space: nowrap; }

/* ================= V3: a metric-card grid drives one chart; visible panels below ================= */
.page { max-width: 1180px; }
.ph p { font-size: 13px; }
/* the chart panel */
.cp { overflow: visible; }
.cp-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 4px; }
.cp-t { display: flex; flex-direction: column; min-width: 0; }
.cp-l { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.cp-v { margin-top: 4px; font-size: 34px; font-weight: 650; letter-spacing: -.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cp-v .na { font-size: 22px; color: var(--text-3); font-weight: 600; }
.cp-s { margin-top: 5px; font-size: 13px; color: var(--text-3); }
.cp .chart { margin-top: 2px; }
/* the metric cards: a wrapping grid, never a carousel */
.mcs { display: grid; gap: 10px; margin-top: 12px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mcs.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mc { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding: 13px 14px 12px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--card); text-align: left; transition: border-color .15s, box-shadow .15s, background .15s; }
.mc:hover { border-color: var(--line-3); }
.mc.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.mc-l { display: flex; align-items: center; gap: 6px; width: 100%; font-size: 12.5px; font-weight: 550; color: var(--text-3); white-space: nowrap; }
.mc.on .mc-l { color: var(--text-2); }
.mc-v { font-size: 21px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mc-v.sm { font-size: 15px; line-height: 1.75; }
.mc-v .na { color: var(--text-3); font-weight: 600; }
.mc-s { font-size: 12px; line-height: 1.35; color: var(--text-3); max-width: 100%; overflow-wrap: anywhere; }
.flag { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: var(--warn); }
/* the info control */
.info { position: relative; display: inline-flex; vertical-align: middle; }
.info-b { display: inline-flex; width: 18px; height: 18px; padding: 1px; border: 0; border-radius: 50%; background: none; color: var(--text-3); }
.info-b svg { width: 16px; height: 16px; }
.info-b:hover, .info-b:focus-visible { color: var(--text); }
.info-t { position: absolute; z-index: 30; top: calc(100% + 6px); left: -8px; width: max-content; max-width: min(320px, 78vw); padding: 10px 12px; border-radius: 10px;
  background: var(--text); color: #F8FAFC; font-size: 12.5px; font-weight: 450; line-height: 1.45; letter-spacing: 0; text-transform: none; white-space: normal;
  box-shadow: 0 10px 26px -12px rgba(10,18,32,.45); opacity: 0; visibility: hidden; transition: opacity .12s; pointer-events: none; }
.info:hover .info-t, .info-b:focus + .info-t { opacity: 1; visibility: visible; }
/* panels below the chart: always visible, two columns */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; align-items: start; }
.pgrid.one { grid-template-columns: minmax(0, 1fr); }
.pn { min-width: 0; overflow: visible; }
.pn.wide { grid-column: 1 / -1; }
.pn-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 18px 10px; }
.pn-h h2 { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.pn-h > span { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.pn-f { padding: 8px 18px 14px; font-size: 12.5px; color: var(--text-3); }
.pn-sep { height: 8px; }
/* the data table */
.dt-w { overflow-x: auto; }
.dt { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.dt th { padding: 8px 18px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; text-align: left; color: var(--text-3);
  background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.dt td { padding: 11px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt tbody tr:hover td { background: #F8FAFC; }
.dt .r { text-align: right; white-space: nowrap; }
.dt .b { font-weight: 600; }
.dt .q, .dt .q * { color: var(--text-3); }
.dt tfoot td { border-top: 1px solid var(--line-2); border-bottom: 0; font-weight: 650; background: var(--surface-2); }
.dt-empty { padding: 26px 18px !important; text-align: center; color: var(--text-3); }
.srt { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.srt:hover { color: var(--text); }
.srt i { font-style: normal; min-width: 8px; }
.dt th[aria-sort] { color: var(--text); }
.mini { display: inline-block; width: 44px; height: 4px; margin-left: 10px; border-radius: 4px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); vertical-align: middle; overflow: hidden; }
.mini i { display: block; height: 100%; background: var(--line-3); }
.tag { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--text-3); }
.sub-sm { display: none; }
.dt .bas { font-size: 12.5px; }
.dt .info-t { left: auto; right: -8px; }
/* signup to payment: a compact stage list */
.fn-h, .fn li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 64px 48px 48px; align-items: center; gap: 10px; padding: 0 18px; }
.fn-h { padding-top: 8px; padding-bottom: 8px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.fn-h span:nth-child(n + 3) { text-align: right; }
.fn { margin: 0; padding: 0 0 6px; list-style: none; }
.fn li { padding-top: 9px; padding-bottom: 9px; border-top: 1px solid var(--line); font-size: 13.5px; }
.fn-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-b { height: 6px; border-radius: 4px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.fn-b i { display: block; height: 100%; border-radius: 4px; background: var(--line-3); }
.fn li.key .fn-b i { background: var(--blue); }
.fn li.key { font-weight: 600; }
.fn-n, .fn-p, .fn-o { text-align: right; font-variant-numeric: tabular-nums; }
.fn-p, .fn-o { color: var(--text-3); }
.fn li.key .fn-p { color: var(--text); }
.fn { padding-bottom: 6px; }
/* Content: secondary navigation */
.subnav { display: flex; gap: 22px; margin: -6px 0 20px; border-bottom: 1px solid var(--line-2); }
.subnav a { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 10px 0 11px; font-size: 14px; font-weight: 600; color: var(--text-3); }
.subnav a:hover { color: var(--text); }
.subnav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--text); }
.subnav i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.nc-p .nc { padding: 6px 22px 26px; }
.nc-p .nc p { font-size: 14px; color: var(--text-3); margin: 0; }
.nc-p .nc h2 + p { margin-top: 6px; }
.nc-p > .nc:first-child { padding-top: 26px; }
.exb { justify-content: space-between; padding: 8px 8px 8px 14px; font-size: 13px; }
.exb b { margin-right: 8px; }
.exb .btn { margin-left: 0; }
.filters { margin-bottom: 12px; }
.inbox { margin-top: 0; }

@media (max-width: 1180px) {
  .mcs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .ph { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 16px; }
  .ph > div:first-child { flex: 1; }
  .ph-r { flex-basis: 100%; }
  .cp-h { padding: 16px 14px 2px; }
  .cp-v { font-size: 28px; }
  .mcs, .mcs.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mcs.n3 .mc:last-child { grid-column: 1 / -1; }
  .mc { padding: 11px 12px 10px; }
  .mc-v { font-size: 19px; }
  .mc-l { font-size: 12px; }
  .pgrid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 20px; }
  .pn-h { padding: 14px 14px 8px; }
  .pn-f { padding: 8px 14px 12px; }
  .dt { font-size: 13px; }
  .dt th, .dt td { padding-left: 10px; padding-right: 10px; }
  .dt th:first-child, .dt td:first-child { padding-left: 14px; }
  .dt th:last-child, .dt td:last-child { padding-right: 14px; }
  .dt .ph-hide { display: none; }
  .dt .sub-sm { display: block; font-size: 12px; color: var(--text-3); }
  .fn-h, .fn li { grid-template-columns: minmax(0, 1.6fr) minmax(28px, .6fr) 58px 40px 40px; gap: 8px; padding-left: 14px; padding-right: 14px; }
  .subnav { gap: 18px; margin-top: -2px; }
  .info-t { max-width: 72vw; }
}
@media (prefers-reduced-motion: reduce) { .mc, .info-t { transition: none; } }
/* V3 fixes: the closed table view takes no width; the info popover never widens the page (a bottom sheet on phones) */
.tview { min-width: 0; max-width: 100%; }
.tview:not([open]) .scroll { display: none; }
.chart-foot { min-width: 0; }
.info-t { display: none; }
.info:hover .info-t, .info-b:focus + .info-t { display: block; }
@media (max-width: 860px) {
  .info-t, .dt .info-t { position: fixed; left: 16px; right: 16px; top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none;
    padding: 13px 15px; font-size: 13.5px; border-radius: 12px; }
}
@media (max-width: 860px) {
  .fn-h, .fn li { grid-template-columns: minmax(0, 1fr) 62px 46px 44px; }
  .fn-b, .fn-h span:nth-child(2) { display: none; }
}
.dt .nw { white-space: nowrap; }
.nc-p .nc h2 { font-size: 16px; font-weight: 650; }
.nc-p .nc .info { margin-left: 4px; }
.dt .info { margin-left: 4px; }

/* ================= V3.1: period control with a calendar icon; not-connected = muted + diagonal hatching ================= */
.per-w { position: relative; }
.per { flex-wrap: nowrap; }
.per button { min-width: 0; padding: 0 11px; }
.per .cal-b { display: inline-flex; align-items: center; justify-content: center; width: 36px; padding: 0; }
.per .cal-b svg { width: 16px; height: 16px; }
.cal-p { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 300px; padding: 14px;
  box-shadow: 0 16px 36px -18px rgba(10,18,32,.35); }
.cal-p label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.cal-p input { height: 36px; min-width: 0; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); font: inherit; font-size: 14px; color: var(--text); }
.cal-a { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.cal-a .btn { height: 34px; }
.ph p { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.ph .pl { color: var(--text-2); font-weight: 550; }
.ph .pl.cust-on { color: var(--text); font-weight: 650; }
.ph .upd { color: var(--text-3); }
/* the hatch: a grey, low-contrast stripe on the inactive surface; text on it keeps --text-2 / --text-3 contrast */
.mc.off, tr.off td, .off-r { background-color: #F3F5F8;
  background-image: repeating-linear-gradient(135deg, rgba(91,101,118,.09) 0 1.5px, transparent 1.5px 8px); }
.mc.off { border-style: dashed; border-color: var(--line-3); }
.mc.off .mc-l { color: var(--text-3); }
.mc.off .mc-v .na { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.mc.off.on { border-style: solid; border-color: var(--text-2); box-shadow: inset 0 0 0 1px var(--text-2); }
tr.off td { color: var(--text-3); }
tr.off td.b { color: var(--text-2); }
.dt tbody tr.off:hover td { background-color: #F3F5F8; }
.off-r { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 230px; margin: 12px 22px 22px;
  border: 1px dashed var(--line-3); border-radius: 12px; text-align: center; padding: 20px; }
.off-l { padding: 4px 10px; border-radius: 8px; background: var(--card); font-size: 14px; font-weight: 650; color: var(--text-2); box-shadow: 0 0 0 1px var(--line-2); }
.off-s { margin-top: 6px; font-size: 13px; color: var(--text-3); background: var(--card); padding: 1px 6px; border-radius: 4px; }
.off-x { display: flex; justify-content: center; padding: 0 22px 22px; margin-top: -8px; }
.off-p > .off-r:first-child { margin-top: 22px; }
@media (max-width: 860px) {
  .per { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) 40px; width: 100%; }
  .per button { padding: 0; }
  .per .cal-b { width: auto; }
  .cal-p { left: 0; right: 0; width: auto; }
  .off-r { min-height: 180px; margin: 10px 14px 16px; }
}
