/* ALVIS preview: Dashboards section. All rules scoped under #dashboards.
   Shell (carousel, tabs, skeleton) is shared. Each product has its own surface, density and signature:
   .cr  CRM operator desk   dense, icon rail, kanban board, inspector
   .fn  Finance ledger      airy, editorial numbers, runway track, split cash-flow chart
   .sl  Sales floor         dark floor, scoreboard type, segmented attainment, live leaderboard */
#dashboards {
  --dsh-W: min(1100px, 92vw);
  --dsh-H: max(calc(var(--dsh-W) * 0.625), 560px);
  --dsh-ease: cubic-bezier(0.32, 0.72, 0, 1);
  overflow-x: clip;
}
#dashboards .dsh-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }

/* ── carousel ── */
#dashboards .dsh-stage {
  position: relative; height: var(--dsh-H);
  perspective: 1800px; perspective-origin: 50% 50%;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none;
}
#dashboards .dsh-stage[data-drag] { cursor: grabbing; }
#dashboards .dsh-slide {
  position: absolute; left: 50%; top: 0;
  width: var(--dsh-W); height: var(--dsh-H); margin-left: calc(var(--dsh-W) / -2);
  container: dsh / inline-size;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-3);
  box-shadow: inset 0 1px 0 var(--hi);
  overflow: hidden; transform-origin: 50% 50%;
  transition: transform 550ms var(--dsh-ease), opacity 550ms var(--dsh-ease);
  will-change: transform, opacity;
}
#dashboards .dsh-stage[data-drag] .dsh-slide { transition: none; }
#dashboards .dsh-slide:not([data-active]) { cursor: pointer; }
#dashboards .dsh-stage:focus-visible .dsh-slide[data-active] { outline: 2px solid var(--accent); outline-offset: 3px; }
#dashboards .dsh-nav-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; }
#dashboards .dsh-arrow[aria-disabled="true"] { opacity: 0.4; cursor: default; }
#dashboards .dsh-tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-3); }
#dashboards .dsh-tab { height: 30px; padding: 0 14px; border-radius: var(--r-2); font-size: 0.84rem; color: var(--ink-2); border: 1px solid transparent; transition: transform 140ms var(--ease-out), background-color 150ms ease, color 150ms ease; }
#dashboards .dsh-tab:active { transform: scale(0.97); }
#dashboards .dsh-tab[aria-selected="true"] { background: var(--raised); color: var(--ink); border-color: var(--line-2); box-shadow: inset 0 1px 0 var(--hi); }
#dashboards .dsh-hint { text-align: center; margin: 16px 0 0; }
#dashboards .dsh-play { margin-left: 4px; }

/* ── state: skeleton, then the product ── */
#dashboards .dsh-app { position: absolute; inset: 0; color: var(--ink); font-size: 12px; line-height: 1.25; opacity: 0; transition: opacity 320ms var(--ease-out); }
#dashboards .dsh-root[data-state="ready"] .dsh-app { opacity: 1; }
#dashboards .dsh-skel { position: absolute; inset: 0; opacity: 1; transition: opacity 300ms var(--ease-out); pointer-events: none; padding: 18px; display: grid; gap: 14px; align-content: start; }
#dashboards .dsh-root[data-state="ready"] .dsh-skel { opacity: 0; }
#dashboards .sk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#dashboards .sk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#dashboards .sk-three { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 14px; }
#dashboards .sk-six { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
#dashboards .sk-crm { grid-template-columns: 40px 1fr; padding: 0; gap: 0; height: 100%; }
#dashboards .sk-rail { display: grid; gap: 16px; align-content: start; justify-items: center; padding: 14px 0; border-right: 1px solid var(--line); background: var(--bg-2); }
#dashboards .sk-main { display: grid; gap: 14px; align-content: start; padding: 14px; }
#dashboards .sk-cols { display: grid; grid-template-columns: repeat(5, 1fr) 1.3fr; gap: 10px; }
#dashboards .sk-cols > div { display: grid; gap: 8px; align-content: start; }
#dashboards .sk-sl { background: var(--bg); height: 100%; }

/* shared atoms */
#dashboards .dc { font-size: 0.72em; color: var(--ink-3); margin-right: 2px; font-weight: 400; }
#dashboards .tnum { font-variant-numeric: tabular-nums; }
#dashboards .mtr { display: inline-flex; gap: 1.5px; align-items: center; }
#dashboards .mtr i { width: 3px; height: 9px; border-radius: 0.5px; background: var(--inset); }
#dashboards .mtr[data-tone="ok"] i.on { background: var(--ok); }
#dashboards .mtr[data-tone="warn"] i.on { background: var(--warn); }
#dashboards .mtr[data-tone="danger"] i.on { background: var(--danger); }
#dashboards .mtr[data-tone="won"] i.on { background: var(--accent); }
#dashboards .is-flash { animation: dshFlash 1500ms var(--ease-out); }
@keyframes dshFlash {
  0% { box-shadow: inset 0 0 0 1px var(--accent), inset 0 0 0 999px var(--accent-wash); }
  100% { box-shadow: inset 0 0 0 1px transparent, inset 0 0 0 999px transparent; }
}

/* ═════════════ CRM operator desk ═════════════ */
#dashboards .cr { display: grid; grid-template-columns: 52px minmax(0, 1fr); font-size: 11.5px; }
#dashboards .cr-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; background: var(--bg-2); border-right: 1px solid var(--line); }
#dashboards .cr-logo { width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-2); background: var(--ink); color: var(--bg); font: 600 10px var(--font-display); letter-spacing: 0.04em; margin-bottom: 10px; }
#dashboards .cr-rail i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-2); font-size: 16px; color: var(--ink-3); }
#dashboards .cr-rail i.on { color: var(--ink); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2); }
#dashboards .cr-rail-sp { flex: 1; }
#dashboards .cr-me { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent); font-size: 9.5px; font-weight: 600; }
#dashboards .cr-main { display: grid; grid-template-rows: 46px auto minmax(0, 1fr); min-width: 0; min-height: 0; }
#dashboards .cr-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--line); }
#dashboards .cr-crumbs { display: flex; align-items: center; gap: 6px; color: var(--ink-3); white-space: nowrap; }
#dashboards .cr-crumbs i { font-size: 10px; }
#dashboards .cr-crumbs b { color: var(--ink); font-weight: 600; }
#dashboards .cr-tools { display: flex; align-items: center; gap: 8px; }
#dashboards .cr-search { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 6px 0 9px; border: 1px solid var(--line); border-radius: var(--r-2); color: var(--ink-3); background: var(--bg-2); min-width: 168px; }
#dashboards .cr-search kbd { margin-left: auto; }
#dashboards .cr-tools .sel { min-width: 132px; }
#dashboards .cr-tools .sel-trigger { height: 28px; font-size: 11.5px; }
#dashboards .cr-faces { display: inline-flex; }
#dashboards .cr-faces span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 8.5px; font-weight: 600; background: var(--raised); border: 1.5px solid var(--panel); color: var(--ink-2); margin-left: -6px; }
#dashboards .cr-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
#dashboards .cr-m { padding: 10px 14px 11px; display: grid; gap: 5px; }
#dashboards .cr-m + .cr-m { border-left: 1px solid var(--line); }
#dashboards .cr-m-k { color: var(--ink-3); font-size: 10.5px; }
#dashboards .cr-m-v { font: 500 19px/1 var(--font-display); letter-spacing: -0.02em; }
#dashboards .cr-m-v small { font: 400 11px var(--font-body); color: var(--ink-3); letter-spacing: 0; }
#dashboards .cr-body { display: grid; grid-template-columns: minmax(0, 1fr) 248px; min-height: 0; }
#dashboards .cr-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 10px; min-height: 0; overflow: hidden; }
#dashboards .cr-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-3); }
#dashboards .cr-col-h { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 6px; padding: 9px 9px 8px; border-bottom: 1px solid var(--line); }
#dashboards .cr-col-dot { width: 6px; height: 6px; border-radius: 1px; background: var(--ink-3); }
#dashboards .cr-col[data-stage="proposal"] .cr-col-dot { background: var(--ink-2); }
#dashboards .cr-col[data-stage="negotiation"] .cr-col-dot { background: var(--warn); }
#dashboards .cr-col[data-stage="won"] .cr-col-dot { background: var(--accent); }
#dashboards .cr-col-n { font-weight: 600; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#dashboards .cr-col-c { color: var(--ink-3); font-family: var(--font-mono); font-size: 9.5px; }
#dashboards .cr-col-v { grid-column: 2 / -1; color: var(--ink-2); font-size: 10.5px; }
#dashboards .cr-col-b { display: grid; gap: 6px; padding: 6px; align-content: start; min-height: 0; overflow: hidden; }
#dashboards .cr-card {
  display: grid; gap: 6px; padding: 9px 9px 8px; border-radius: var(--r-2);
  background: var(--panel); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--hi);
  cursor: pointer; outline: none; transition: border-color 160ms ease;
}
#dashboards .cr-card:focus-visible { border-color: var(--accent); }
#dashboards .cr-card.is-sel { border-color: color-mix(in oklab, var(--accent) 70%, var(--line)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 40%, transparent); }
#dashboards .cr-card-t { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
#dashboards .cr-card-t b { font-weight: 600; font-size: 11.5px; line-height: 1.25; }
#dashboards .cr-tag { flex-shrink: 0; font-size: 9px; padding: 2px 5px; border-radius: var(--r-1); color: var(--ink-2); background: var(--inset); }
#dashboards .cr-tag[data-tone="hot"] { color: var(--warn); background: color-mix(in oklab, var(--warn) 14%, transparent); }
#dashboards .cr-tag[data-tone="slow"] { color: var(--danger); background: color-mix(in oklab, var(--danger) 13%, transparent); }
#dashboards .cr-card-v { font: 500 15px/1 var(--font-display); letter-spacing: -0.015em; }
#dashboards .cr-card-m { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--ink-3); font-family: var(--font-mono); }
#dashboards .cr-card-f { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 10px; }
#dashboards .cr-city { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dashboards .cr-av { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; font-size: 7.5px; font-weight: 600; background: var(--inset); color: var(--ink-2); }
#dashboards .cr-av[data-o="you"] { background: var(--accent-wash); color: var(--accent); }
#dashboards .cr-more { text-align: center; padding: 6px; color: var(--ink-3); font-size: 10px; border: 1px dashed var(--line-2); border-radius: var(--r-2); }

#dashboards .cr-insp { border-left: 1px solid var(--line); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 13px; min-height: 0; overflow: hidden; }
#dashboards .cr-i-h { display: flex; align-items: center; gap: 10px; }
#dashboards .cr-i-logo { width: 34px; height: 34px; border-radius: var(--r-2); display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line-2); font: 600 12px var(--font-display); }
#dashboards .cr-i-h b { display: block; font-size: 12.5px; }
#dashboards .cr-i-h span { color: var(--ink-3); font-size: 10.5px; }
#dashboards .cr-i-v { font: 500 22px/1 var(--font-display); letter-spacing: -0.025em; }
#dashboards .cr-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
#dashboards .cr-steps li { position: relative; display: flex; align-items: center; gap: 9px; height: 19px; color: var(--ink-3); font-size: 10.5px; }
#dashboards .cr-steps li i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--panel); position: relative; z-index: 1; flex-shrink: 0; }
#dashboards .cr-steps li + li::before { content: ""; position: absolute; left: 3px; top: -6px; height: 12px; width: 1px; background: var(--line-2); }
#dashboards .cr-steps li.done { color: var(--ink-2); }
#dashboards .cr-steps li.done i { background: var(--ink-3); border-color: var(--ink-3); }
#dashboards .cr-steps li.cur { color: var(--ink); font-weight: 600; }
#dashboards .cr-steps li.cur i { background: var(--accent); border-color: var(--accent); outline: 3px solid var(--accent-wash); }
#dashboards .cr-i-f { margin: 0; display: grid; gap: 7px; }
#dashboards .cr-i-f div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#dashboards .cr-i-f dt { color: var(--ink-3); font-size: 10.5px; }
#dashboards .cr-i-f dd { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
#dashboards .cr-i-next { padding: 9px 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-2); }
#dashboards .cr-i-next span { color: var(--ink-3); font-size: 10px; }
#dashboards .cr-i-next p { margin: 4px 0 0; font-size: 11px; line-height: 1.4; }
#dashboards .cr-i-k { color: var(--ink-3); font-size: 10px; }
#dashboards .cr-i-act { min-height: 0; overflow: hidden; }
#dashboards .cr-i-act ol { list-style: none; margin: 7px 0 0; padding: 0; display: grid; gap: 8px; }
#dashboards .cr-i-act li { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; gap: 8px; align-items: start; border-radius: var(--r-1); }
#dashboards .cr-i-act li i { width: 5px; height: 5px; margin-top: 4px; border-radius: 1px; background: var(--ink-3); }
#dashboards .cr-i-act li.is-new i { background: var(--accent); }
#dashboards .cr-i-act li.is-new { animation: crIn 520ms var(--ease-out); }
#dashboards .cr-i-act p { margin: 0; color: var(--ink-2); font-size: 10.5px; line-height: 1.35; }
#dashboards .cr-i-act b { color: var(--ink); font-weight: 600; }
#dashboards .cr-i-act time { color: var(--ink-3); font-size: 9.5px; font-family: var(--font-mono); }
@keyframes crIn { from { opacity: 0; transform: translateY(-6px); } }

/* ═════════════ Finance CFO ledger ═════════════ */
#dashboards .fn { display: grid; grid-template-rows: 58px auto minmax(0, 1fr) auto; background: var(--panel); font-size: 12px; }
#dashboards .fn-top { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); }
#dashboards .fn-title { display: flex; align-items: baseline; gap: 12px; }
#dashboards .fn-title h3 { margin: 0; font: 500 20px var(--font-display); letter-spacing: -0.02em; }
#dashboards .fn-title span { color: var(--ink-3); font-size: 11.5px; }
#dashboards .fn-tools { display: flex; align-items: center; gap: 16px; }
#dashboards .fn-sync { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-3); font-size: 11px; }
#dashboards .fn-sync-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
#dashboards .fn-seg { display: inline-flex; border-bottom: 1px solid var(--line-2); }
#dashboards .fn-seg button { height: 28px; padding: 0 10px; font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); border-bottom: 1.5px solid transparent; margin-bottom: -1px; transition: color 150ms ease, border-color 150ms ease; }
#dashboards .fn-seg button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
#dashboards .fn-k { color: var(--ink-3); font-size: 11px; }
#dashboards .fn-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; padding: 18px 24px 16px; border-bottom: 1px solid var(--line); }
#dashboards .fn-runway { display: grid; gap: 8px; min-width: 0; }
#dashboards .fn-big { display: flex; align-items: baseline; gap: 10px; }
#dashboards .fn-big .tnum { font: 400 60px/0.9 var(--font-display); letter-spacing: -0.045em; }
#dashboards .fn-unit { color: var(--ink-2); font-size: 14px; }
#dashboards .fn-track { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; margin-top: 6px; }
#dashboards .fn-cell { height: 12px; border-radius: 1px; background: var(--inset); overflow: hidden; position: relative; }
#dashboards .fn-cell i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 700ms var(--ease-out); }
#dashboards .fn-cell.is-full i { transform: scaleX(1); }
#dashboards .fn-cell.is-part i { transform: scaleX(var(--p)); }
#dashboards .fn-cell.is-zero { background: transparent; box-shadow: inset 0 0 0 1px var(--warn); }
#dashboards .fn-track-l { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); color: var(--ink-3); font-size: 10px; font-family: var(--font-mono); height: 26px; }
#dashboards .fn-track-l b { position: absolute; left: var(--x); top: -38px; transform: translateX(-50%); color: var(--warn); font-weight: 500; font-family: var(--font-body); font-size: 10.5px; white-space: nowrap; }
#dashboards .fn-stats { margin: 0; display: grid; align-content: start; }
#dashboards .fn-stats > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
#dashboards .fn-stats > div:first-child { padding-top: 2px; }
#dashboards .fn-stats > div:last-child { border-bottom: 0; }
#dashboards .fn-stats dt { color: var(--ink-3); font-size: 11px; }
#dashboards .fn-stats dd { margin: 0; font: 500 19px/1 var(--font-display); letter-spacing: -0.02em; grid-row: span 1; }
#dashboards .fn-sub { grid-column: 1 / -1; color: var(--ink-3); font-size: 10.5px; }
#dashboards .fn-sub .up { color: var(--ok); }
#dashboards .fn-sub .down { color: var(--danger); }
#dashboards .fn-prog { grid-column: 1 / -1; height: 3px; background: var(--inset); border-radius: 2px; overflow: hidden; margin-top: 4px; }
#dashboards .fn-prog i { display: block; height: 100%; background: var(--ink-2); transform-origin: left; transition: transform 700ms var(--ease-out); }
#dashboards .fn-flow { padding: 12px 24px 6px; display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
#dashboards .fn-flow-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#dashboards .fn-lg { display: flex; gap: 14px; color: var(--ink-3); font-size: 10.5px; }
#dashboards .fn-lg > span, #dashboards .fn-read span { display: inline-flex; align-items: center; gap: 6px; }
#dashboards .lg-bal { width: 12px; height: 2px; background: var(--accent); }
#dashboards .lg-in { width: 7px; height: 7px; border-radius: 1px; background: var(--ink-2); }
#dashboards .lg-out { width: 7px; height: 7px; border-radius: 1px; background: color-mix(in oklab, var(--danger) 70%, transparent); }
#dashboards .fn-chart { position: relative; min-height: 150px; margin-bottom: 20px; cursor: crosshair; }
#dashboards .fn-svg { position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% - 64px); height: 100%; overflow: visible; }
#dashboards .fn-g { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
#dashboards .fn-g--mid { stroke: var(--line-2); }
#dashboards .fn-area { fill: var(--accent-wash); }
#dashboards .fn-line, #dashboards .fn-tail { fill: none; stroke: var(--accent); stroke-width: 1.75; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
#dashboards .fn-tail { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
#dashboards .fn-dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; vector-effect: non-scaling-stroke; }
#dashboards .fn-in { fill: var(--ink-2); opacity: 0.75; transform-box: fill-box; transform-origin: bottom; }
#dashboards .fn-out { fill: var(--danger); opacity: 0.55; transform-box: fill-box; transform-origin: top; }
#dashboards .fn-yl span { position: absolute; right: 0; transform: translateY(-50%); color: var(--ink-3); font-size: 9.5px; font-family: var(--font-mono); }
#dashboards .fn-yl .fn-yl-b { transform: translateY(-50%); right: auto; left: -14px; }
#dashboards .fn-xl span { position: absolute; bottom: -18px; transform: translateX(-50%); color: var(--ink-3); font-size: 9.5px; font-family: var(--font-mono); white-space: nowrap; }
#dashboards .fn-xl span:first-child { transform: none; }
#dashboards .fn-xl span:last-child { transform: translateX(-100%); }
#dashboards .fn-xl { position: absolute; left: 0; right: 64px; bottom: 0; top: 0; pointer-events: none; }
#dashboards .fn-cross { position: absolute; top: 0; bottom: 0; left: var(--x, 0); width: 1px; background: var(--ink-3); opacity: 0; pointer-events: none; transition: opacity 120ms ease; }
#dashboards .fn-read { position: absolute; top: 4px; left: var(--x, 0); margin-left: 12px; display: grid; gap: 5px; padding: 9px 11px; min-width: 168px; font-size: 10.5px; color: var(--ink-2);
  background: var(--raised); border: 1px solid var(--line-2); border-radius: var(--r-2); box-shadow: inset 0 1px 0 var(--hi); opacity: 0; pointer-events: none; transition: opacity 120ms ease; }
#dashboards .fn-read[data-flip-l] { margin-left: 0; transform: translateX(calc(-100% - 12px)); }
#dashboards .fn-read b { color: var(--ink); font-weight: 600; }
#dashboards .fn-read em { margin-left: auto; padding-left: 14px; font-style: normal; color: var(--ink); }
#dashboards .fn-chart[data-hover] .fn-cross, #dashboards .fn-chart[data-hover] .fn-read { opacity: 1; }
#dashboards .fn-low { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--line); }
#dashboards .fn-spend, #dashboards .fn-ar { padding: 12px 24px 14px; display: grid; gap: 10px; align-content: start; min-width: 0; }
#dashboards .fn-ar { border-left: 1px solid var(--line); grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: 20px; align-items: start; }
#dashboards .fn-ar .fn-k { grid-column: 1 / -1; }
#dashboards .fn-stack { display: flex; gap: 2px; height: 10px; }
#dashboards .fn-stack span { border-radius: 1px; }
#dashboards .fn-seg-0 { background: var(--accent); }
#dashboards .fn-seg-1 { background: color-mix(in oklab, var(--ink) 62%, transparent); }
#dashboards .fn-seg-2 { background: color-mix(in oklab, var(--ink) 44%, transparent); }
#dashboards .fn-seg-3 { background: color-mix(in oklab, var(--ink) 30%, transparent); }
#dashboards .fn-seg-4 { background: color-mix(in oklab, var(--ink) 19%, transparent); }
#dashboards .fn-seg-5 { background: color-mix(in oklab, var(--ink) 11%, transparent); }
#dashboards .fn-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
#dashboards .fn-legend li { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; gap: 7px; align-items: center; font-size: 10.5px; color: var(--ink-2); }
#dashboards .fn-legend li i { width: 7px; height: 7px; border-radius: 1px; }
#dashboards .fn-legend li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#dashboards .fn-legend b { font-weight: 500; color: var(--ink); font-size: 10.5px; }
#dashboards .fn-legend em { display: none; }
#dashboards .fn-aging { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; align-items: end; align-self: start; }
#dashboards .fn-age { display: grid; gap: 4px; justify-items: start; font-size: 9px; color: var(--ink-3); min-width: 0; }
#dashboards .fn-age-bar { width: 100%; height: 64px; display: flex; align-items: flex-end; background: var(--bg-2); border-radius: 1px; overflow: hidden; }
#dashboards .fn-age-bar i { width: 100%; height: 100%; background: var(--ink-2); transform-origin: bottom; transition: transform 700ms var(--ease-out); }
#dashboards .fn-age[data-b="2"] i, #dashboards .fn-age[data-b="3"] i { background: var(--warn); }
#dashboards .fn-age[data-b="4"] i { background: var(--danger); }
#dashboards .fn-age b { color: var(--ink); font-weight: 500; font-size: 9.5px; white-space: nowrap; }
#dashboards .fn-age b .dc { display: none; }
#dashboards .fn-age span:last-child { white-space: nowrap; }
#dashboards .fn-inv { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; }
#dashboards .fn-inv li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--line); border-radius: var(--r-1); }
#dashboards .fn-inv li:last-child { border-bottom: 0; }
#dashboards .fn-inv li div { min-width: 0; }
#dashboards .fn-inv b { display: block; font-weight: 600; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#dashboards .fn-inv div span { color: var(--ink-3); font-size: 9.5px; font-family: var(--font-mono); }
#dashboards .fn-inv em { font-style: normal; font-size: 11px; text-align: right; }
#dashboards .fn-inv .chip { grid-column: 1 / -1; justify-self: start; height: 18px; font-size: 9.5px; padding: 0 6px; }

/* ═════════════ Sales revenue floor ═════════════ */
#dashboards .sl { display: grid; grid-template-rows: 54px auto minmax(0, 1fr) auto; background: var(--bg); font-size: 12px; }
#dashboards .sl-top { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); }
#dashboards .sl-title { display: flex; align-items: baseline; gap: 12px; }
#dashboards .sl-title h3 { margin: 0; font: 600 15px var(--font-body); letter-spacing: -0.005em; }
#dashboards .sl-title span { color: var(--ink-3); font-size: 11.5px; font-family: var(--font-mono); }
#dashboards .sl-live { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; border: 1px solid var(--line-2); border-radius: var(--r-2); font-size: 10.5px; color: var(--ink-2); }
#dashboards .sl-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: slLive 1.8s ease-in-out infinite; }
@keyframes slLive { 50% { opacity: 0.25; } }
#dashboards .sl-k { color: var(--ink-3); font-size: 11px; }
#dashboards .sl-sub { color: var(--ink-3); font-size: 11px; }
#dashboards .sl-hero { display: grid; grid-template-columns: 230px minmax(0, 1fr) 128px; gap: 32px; align-items: center; padding: 18px 24px 20px; border-bottom: 1px solid var(--line); }
#dashboards .sl-att { display: grid; gap: 6px; }
#dashboards .sl-big { font: 400 62px/0.88 var(--font-display); letter-spacing: -0.05em; }
#dashboards .sl-big small { font-size: 0.42em; letter-spacing: 0; color: var(--ink-2); margin-left: 3px; }
#dashboards .sl-meter { position: relative; padding-top: 22px; }
#dashboards .sl-segs { display: flex; gap: 3px; height: 34px; }
#dashboards .sl-segs i { flex: 1; border-radius: 1px; background: var(--inset); transition: background-color 400ms ease; }
#dashboards .sl-segs i.on { background: var(--accent); }
#dashboards .sl-segs i.ahead { background: var(--accent-2); }
#dashboards .sl-pace { position: absolute; top: 0; bottom: 18px; left: calc(var(--p, 0) * 100%); width: 0; pointer-events: none; transition: left 600ms var(--ease-out); }
#dashboards .sl-pace i { position: absolute; top: 16px; bottom: -4px; left: -0.5px; width: 1px; background: var(--ink); }
#dashboards .sl-pace em { position: absolute; top: 0; left: 0; transform: translateX(-50%); white-space: nowrap; font-style: normal; font-size: 10px; color: var(--ink-2); font-family: var(--font-mono); }
#dashboards .sl-scale { display: flex; justify-content: space-between; margin-top: 7px; color: var(--ink-3); font-size: 9.5px; font-family: var(--font-mono); }
#dashboards .sl-delta { display: grid; gap: 4px; justify-items: end; text-align: right; }
#dashboards .sl-delta b { font: 400 34px/0.95 var(--font-display); letter-spacing: -0.04em; }
#dashboards .sl-delta b.up { color: var(--ok); }
#dashboards .sl-delta b.down { color: var(--danger); }
#dashboards .sl-mid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); min-height: 0; }
#dashboards .sl-board, #dashboards .sl-curve { display: flex; flex-direction: column; min-height: 0; padding: 14px 24px 12px; }
#dashboards .sl-curve { border-left: 1px solid var(--line); }
#dashboards .sl-h { display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); font-size: 11px; margin-bottom: 8px; }
#dashboards .sl-lg { display: flex; gap: 14px; }
#dashboards .sl-lg > span { display: inline-flex; align-items: center; gap: 6px; }
#dashboards .lg-act { width: 12px; height: 2px; background: var(--accent); }
#dashboards .lg-tgt { width: 12px; height: 0; border-top: 1.5px dashed var(--ink-3); }
#dashboards .sl-rows { list-style: none; margin: 0; padding: 0; display: grid; }
#dashboards .sl-row {
  display: grid; grid-template-columns: 22px 28px minmax(0, 1fr) 118px 92px 50px 30px; gap: 10px; align-items: center;
  height: 42px; border-bottom: 1px solid var(--line); padding: 0 4px; border-radius: var(--r-1); transition: opacity 300ms ease;
}
#dashboards .sl-row.is-dim { opacity: 0.35; }
#dashboards .sl-rank { font: 500 17px var(--font-display); color: var(--ink-3); }
#dashboards .sl-row:first-child .sl-rank { color: var(--ink); }
#dashboards .sl-av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line-2); font-size: 9px; font-weight: 600; color: var(--ink-2); }
#dashboards .sl-who { min-width: 0; display: grid; gap: 1px; }
#dashboards .sl-who b { font-weight: 600; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#dashboards .sl-who span { color: var(--ink-3); font-size: 10px; }
#dashboards .sl-amt { font-size: 11.5px; text-align: right; white-space: nowrap; }
#dashboards .sl-amt small { color: var(--ink-3); font-size: 9.5px; }
#dashboards .sl-bar { position: relative; height: 4px; background: var(--inset); border-radius: 2px; }
#dashboards .sl-bar i { position: absolute; inset: 0; background: var(--ink-2); border-radius: 2px; transform-origin: left; transition: transform 700ms var(--ease-out); }
#dashboards .sl-bar b { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--ink-3); }
#dashboards .sl-row:nth-child(-n+3) .sl-bar i { background: var(--accent); }
#dashboards .sl-pct { font-family: var(--font-mono); font-size: 10.5px; text-align: right; }
#dashboards .sl-mv { font-size: 9.5px; font-family: var(--font-mono); text-align: right; }
#dashboards .sl-mv.up { color: var(--ok); }
#dashboards .sl-mv.down { color: var(--danger); }
#dashboards .sl-ticker { margin-top: auto; padding-top: 10px; display: flex; gap: 10px; align-items: baseline; font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
#dashboards .sl-tk { overflow: hidden; text-overflow: ellipsis; }
#dashboards .sl-tk[data-new] { animation: slTk 460ms var(--ease-out); }
@keyframes slTk { from { opacity: 0; transform: translateY(8px); } }
#dashboards .sl-chart { position: relative; flex: 1; min-height: 120px; margin-bottom: 16px; }
#dashboards .sl-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#dashboards .sl-g { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
#dashboards .sl-gap { fill: var(--accent-wash); }
#dashboards .sl-tgt { stroke: var(--ink-3); stroke-width: 1.25; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
#dashboards .sl-today { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
#dashboards .sl-act { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
#dashboards .sl-dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; }
#dashboards .sl-c-l { position: absolute; transform: translate(-50%, -110%); color: var(--ink-2); font-size: 9.5px; font-family: var(--font-mono); }
#dashboards .sl-c-x { position: absolute; bottom: -16px; transform: translateX(-50%); color: var(--ink-3); font-size: 9.5px; font-family: var(--font-mono); }
#dashboards .sl-c-x:first-of-type { transform: none; }
#dashboards .sl-c-y { position: absolute; right: 0; transform: translateY(-120%); color: var(--ink-3); font-size: 9.5px; font-family: var(--font-mono); }
#dashboards .sl-regions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); }
#dashboards .sl-rg { text-align: left; display: grid; gap: 4px; padding: 11px 16px 13px; border-radius: 0; transition: background-color 160ms ease; position: relative; }
#dashboards .sl-rg + .sl-rg { border-left: 1px solid var(--line); }
#dashboards .sl-rg-n { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 10.5px; white-space: nowrap; }
#dashboards .sl-rg-n::before { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--ok); }
#dashboards .sl-rg[data-tone="warn"] .sl-rg-n::before { background: var(--warn); }
#dashboards .sl-rg[data-tone="danger"] .sl-rg-n::before { background: var(--danger); }
#dashboards .sl-rg b { font: 400 22px/1 var(--font-display); letter-spacing: -0.03em; }
#dashboards .sl-rg b small { font-size: 0.55em; color: var(--ink-3); margin-left: 1px; }
#dashboards .sl-rg-bar { height: 3px; background: var(--inset); border-radius: 2px; overflow: hidden; }
#dashboards .sl-rg-bar i { display: block; height: 100%; background: var(--ink-2); transform-origin: left; transition: transform 700ms var(--ease-out); }
#dashboards .sl-rg[data-tone="ok"] .sl-rg-bar i { background: var(--ok); }
#dashboards .sl-rg-v { color: var(--ink-3); font-size: 9.5px; font-family: var(--font-mono); }
#dashboards .sl-rg[aria-pressed="true"] { background: var(--raised); }
#dashboards .sl-rg[aria-pressed="true"] b { color: var(--accent); }

/* ── responsive: the container is the slide ── */
@container dsh (max-width: 980px) {
  #dashboards .cr-body { grid-template-columns: minmax(0, 1fr); }
  #dashboards .cr-insp { display: none; }
  #dashboards .cr-faces { display: none; }
  #dashboards .sl-row { grid-template-columns: 22px 28px minmax(0, 1fr) 104px 64px 46px 26px; }
}
@container dsh (max-width: 760px) {
  #dashboards .cr { grid-template-columns: minmax(0, 1fr); }
  #dashboards .cr-rail, #dashboards .cr-search { display: none; }
  #dashboards .cr-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #dashboards .cr-m:nth-child(3) { border-left: 0; }
  #dashboards .cr-m:nth-child(n+3) { border-top: 1px solid var(--line); }
  #dashboards .cr-board { overflow-x: auto; grid-template-columns: repeat(5, 172px); scrollbar-width: thin; touch-action: pan-x pan-y; }
  #dashboards .sk-crm { grid-template-columns: minmax(0, 1fr); }
  #dashboards .sk-rail, #dashboards .sk-insp { display: none; }
  #dashboards .sk-cols { grid-template-columns: repeat(2, 1fr); }

  #dashboards .fn { display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: none; }
  #dashboards .fn > *, #dashboards .sl > * { flex-shrink: 0; }
  #dashboards .fn-flow { grid-template-rows: auto 170px; }
  #dashboards .fn-top { min-height: 56px; padding: 0 16px; }
  #dashboards .fn-title span, #dashboards .fn-sync { display: none; }
  #dashboards .fn-hero { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 16px; }
  #dashboards .fn-big .tnum { font-size: 48px; }
  #dashboards .fn-flow { padding: 12px 16px 6px; }
  #dashboards .fn-chart { height: 170px; flex: none; }
  #dashboards .fn-lg { display: none; }
  #dashboards .fn-low { grid-template-columns: minmax(0, 1fr); }
  #dashboards .fn-spend, #dashboards .fn-ar { padding: 12px 16px; }
  #dashboards .fn-ar { border-left: 0; border-top: 1px solid var(--line); grid-template-columns: minmax(0, 1fr); }
  #dashboards .sk-two, #dashboards .sk-three { grid-template-columns: minmax(0, 1fr); }

  #dashboards .sl { display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: none; }
  #dashboards .sl-top { min-height: 52px; padding: 0 16px; }
  #dashboards .sl-hero { grid-template-columns: minmax(0, 1fr) auto; gap: 14px 16px; padding: 14px 16px; }
  #dashboards .sl-meter { grid-column: 1 / -1; grid-row: 2; }
  #dashboards .sl-big { font-size: 46px; }
  #dashboards .sl-mid { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  #dashboards .sl-board { min-height: auto; }
  #dashboards .sl-curve { display: none; }
  #dashboards .sl-board { padding: 12px 16px; }
  #dashboards .sl-row { grid-template-columns: 18px 26px minmax(0, 1fr) 48px 26px; }
  #dashboards .sl-amt, #dashboards .sl-bar { display: none; }
  #dashboards .sl-regions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #dashboards .sl-rg:nth-child(4) { border-left: 0; }
  #dashboards .sl-rg:nth-child(n+4) { border-top: 1px solid var(--line); }
  #dashboards .sl-rg { padding: 10px 12px; }
  #dashboards .sk-six { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  #dashboards { --dsh-W: 88vw; --dsh-H: 664px; }
  #dashboards .dsh-nav-row { margin-top: 20px; }
  #dashboards .dsh-arrow { display: none; }
  #dashboards .dsh-tab { padding: 0 12px; }
}

@media (hover: hover) and (pointer: fine) {
  #dashboards .dsh-tab:hover:not([aria-selected="true"]) { color: var(--ink); background: var(--raised); }
  #dashboards .cr-card:hover:not(.is-sel) { border-color: var(--line-2); }
  #dashboards .fn-seg button:hover { color: var(--ink); }
  #dashboards .sl-rg:hover:not([aria-pressed="true"]) { background: var(--panel); }
}

@media (prefers-reduced-motion: reduce) {
  #dashboards .dsh-slide { transition: opacity 300ms ease; }
  #dashboards .sl-live i { animation: none; }
  #dashboards .fn-cell i, #dashboards .fn-prog i, #dashboards .fn-age-bar i, #dashboards .sl-bar i, #dashboards .sl-rg-bar i, #dashboards .sl-pace { transition: none; }
  #dashboards .is-flash, #dashboards .cr-i-act li.is-new, #dashboards .sl-tk[data-new] { animation: none; }
}
