/* Dealer OS (Today, Inventory, Buying, Paperwork, car story). Ported from the approved mock
   (manheim-scout/research/voltra-replacement/mock/index.html) and scoped under .dos so the coaching pages keep their look. */
:root {
  --good: #13795b; --good-soft: #e3f4ec; --great: #0e6b5c;
  --violet: #6b46c1; --violet-soft: #f0ebfb;
  --bar-1: #0e6b5c; --bar-2: #7fb8ad; --track: #eef0f3; --side-line: #1d2733;
  --shadow-lg: 0 20px 50px rgba(16,24,40,.18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --good: #4cc79a; --good-soft: #13291f; --great: #34b39a; --violet: #b39cf5; --violet-soft: #251d3d;
    --bar-1: #34b39a; --bar-2: #2a5f55; --track: #1f2832; --side-line: #18202a; --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1116; --surface: #151b22; --surface-2: #19212a; --line: #26303b; --line-2: #1f2832;
  --ink: #e8ecf1; --ink-2: #c6ced8; --muted: #8b95a3; --faint: #677180;
  --accent: #34b39a; --accent-2: #2a9c86; --accent-soft: #14302a; --accent-ink: #071612;
  --red: #f07167; --red-soft: #3a1d1b; --amber: #f0b45a; --amber-soft: #352816; --blue: #7aa2ff; --blue-soft: #1a2541;
  --side: #0a0e13; --side-hover: #121921; --shadow: none;
  --good: #4cc79a; --good-soft: #13291f; --great: #34b39a; --violet: #b39cf5; --violet-soft: #251d3d;
  --bar-1: #34b39a; --bar-2: #2a5f55; --track: #1f2832; --side-line: #18202a; --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------- shell additions (nav groups, theme button, source dots) ---------- */
.navgroup { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--side-muted); padding: 12px 10px 5px; }
.navgroup:first-of-type { padding-top: 2px; }
#nav a.on { box-shadow: inset 0 0 0 1px var(--side-line); }
.srcdots { display: grid; gap: 5px; padding-bottom: 8px; border-bottom: 1px solid var(--side-line); margin-bottom: 4px; }
.srcrow { display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sdot { width: 7px; height: 7px; border-radius: 50%; background: #31c48d; flex: none; display: inline-block; }
.sdot.warn { background: #f59e0b; } .sdot.bad { background: #ef4444; }
.themebtn { background: none; border: 0; padding: 0; color: var(--side-muted); cursor: pointer; text-align: left; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.themebtn:hover { color: var(--side-on); }
.themebtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; }
@media (max-width: 900px) {
  .navgroup { display: none; }
  #nav .mtheme { display: inline-flex !important; }
}
#nav .mtheme { display: none; }

/* ---------- page parts ---------- */
.dos { --radius: 12px; }
.dos .pos { color: var(--good); } .dos .neg { color: var(--red); } .dos .warnc { color: var(--amber); }
.dos .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.dos .grow { flex: 1; }
.dos .topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; position: relative; }
.dos .search { flex: 1 1 280px; max-width: 440px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; color: var(--muted); position: relative; }
.dos .search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; padding: 0; box-shadow: none; }
.dos .search kbd { font: 11px/1 inherit; border: 1px solid var(--line); border-radius: 5px; padding: 3px 5px; color: var(--faint); }
.dos .sres { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 30; overflow: hidden; }
.dos .sres a { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; color: var(--ink); border-bottom: 1px solid var(--line-2); cursor: pointer; }
.dos .sres a:last-child { border-bottom: 0; }
.dos .sres a.on, .dos .sres a:hover { background: var(--surface-2); }
.dos .sres small { color: var(--muted); margin-left: auto; white-space: nowrap; }
.dos .iconbtn { height: 34px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: var(--ink-2); font-weight: 550; font-size: 13px; white-space: nowrap; }
.dos .iconbtn:hover { border-color: var(--faint); }
.dos .iconbtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.dos .head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.dos .head h1 { font-size: 24px; font-weight: 680; letter-spacing: -.015em; margin: 0; }
.dos .head p { margin: 4px 0 0; color: var(--muted); max-width: 760px; }
.dos .head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dos .seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.dos .seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 550; font-size: 13px; white-space: nowrap; }
.dos .seg button.on { background: var(--accent-soft); color: var(--accent); }
.dos .seg button .n { font-size: 11px; opacity: .75; margin-left: 4px; font-variant-numeric: tabular-nums; }

.dos .health { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 16px; box-shadow: var(--shadow); }
.dos .health b { color: var(--ink); font-weight: 600; }
.dos .health .ok { display: inline-flex; align-items: center; gap: 7px; color: var(--good); font-weight: 600; }
.dos .health .warn { display: inline-flex; align-items: center; gap: 7px; color: var(--amber); font-weight: 600; }
.dos .health .sep { width: 1px; height: 14px; background: var(--line); }
.dos .health .lnk { color: var(--ink-2); cursor: pointer; border-bottom: 1px dashed var(--faint); }
.dos .health .lnk:hover { color: var(--accent); border-color: var(--accent); }
.dos .health .src { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dos .health .src.stale { color: var(--amber); }
.dos .health .src.stale .sdot { background: #f59e0b; }
.dos .recon { width: 100%; display: grid; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line); margin-top: 2px; }
.dos .recon .r { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; color: var(--ink-2); }
.dos .recon .r b { white-space: nowrap; }

.dos .kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.dos .kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--shadow); cursor: pointer; transition: border-color .15s, background .15s; min-width: 0; text-align: left; }
.dos .kpi:hover { border-color: var(--accent); }
.dos .kpi.sel { border-color: var(--accent); background: var(--accent-soft); }
.dos .kpi .l { font-size: 12px; color: var(--muted); font-weight: 550; display: flex; justify-content: space-between; gap: 6px; }
.dos .kpi .l i { font-style: normal; color: var(--faint); font-size: 11px; opacity: 0; transition: opacity .15s; }
.dos .kpi:hover .l i { opacity: 1; }
.dos .kpi .v { font-size: 25px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dos .kpi .v small { font-size: 15px; color: var(--muted); font-weight: 600; }
.dos .kpi .s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.dos .kbar { height: 5px; background: var(--track); border-radius: 9px; margin-top: 9px; display: flex; overflow: hidden; }
.dos .kbar i { display: block; height: 100%; }

.dos .grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
.dos .grid3 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
.dos .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.dos .panel + .panel { margin-top: 16px; }
.dos .grid2 .panel + .panel, .dos .grid3 .panel + .panel { margin-top: 0; }
.dos .panel .ph { display: flex; align-items: center; gap: 8px 10px; padding: 13px 16px 10px; flex-wrap: wrap; }
.dos .panel .ph h2 { font-size: 14.5px; margin: 0; font-weight: 650; text-transform: none; letter-spacing: 0; color: var(--ink); }
.dos .panel .ph .sub { color: var(--muted); font-size: 12.5px; }
.dos .panel .ph .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dos .pad { padding: 4px 16px 16px; }
.dos .filterchip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 3px 6px 3px 11px; font-size: 12px; font-weight: 600; }
.dos .filterchip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; }

.dos .callout { display: flex; gap: 13px; padding: 15px 16px; }
.dos .callout .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.dos .callout .ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dos .callout.up .ic { background: var(--good-soft); color: var(--good); }
.dos .callout.down .ic { background: var(--red-soft); color: var(--red); }
.dos .callout .k { font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dos .callout h3 { margin: 2px 0 3px; font-size: 15px; }
.dos .callout p { margin: 0; color: var(--ink-2); font-size: 13px; }
.dos .callout .link { margin-top: 7px; display: inline-block; font-weight: 600; font-size: 12.5px; cursor: pointer; color: var(--accent); }

/* ---------- tables ---------- */
.dos .tw { overflow-x: auto; }
.dos table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dos th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 8px 7px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); position: static; text-transform: none; letter-spacing: 0; user-select: none; vertical-align: bottom; }
.dos th[data-sort] { cursor: pointer; } .dos th[data-sort]:hover { color: var(--ink); }
.dos th.num { text-align: right; }
.dos th .ar { opacity: .6; font-size: 10px; color: var(--accent); }
.dos td { padding: 10px 7px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.dos tbody tr[data-open], .dos tbody tr.click { cursor: pointer; transition: background .1s; }
.dos tbody tr[data-open]:hover, .dos tbody tr.click:hover { background: var(--surface-2); }
.dos tbody tr:last-child td { border-bottom: 0; }
.dos tfoot td { font-weight: 650; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 0; }
.dos td.car b { display: block; font-weight: 600; white-space: nowrap; }
.dos td.car .sub, .dos .car .sub { display: block; font-size: 12px; color: var(--muted); }
.dos td:first-child, .dos th:first-child { padding-left: 16px; } .dos td:last-child, .dos th:last-child { padding-right: 16px; }
.dos .chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 2px 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.dos .chip.scout { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.dos .chip.src { background: transparent; }
.dos .chip.amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.dos .chip.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.dos .chip.green { background: var(--good-soft); color: var(--good); border-color: transparent; }
.dos .chip.violet { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
/* F&I not recorded before Apr 17 2026: a verdict that judges front gross only */
.dos .fonly { display: inline-block; font-size: 10.5px; font-weight: 600; color: var(--muted); border: 1px dashed var(--line); border-radius: 99px; padding: 0 6px; white-space: nowrap; vertical-align: middle; }
.dos .vb { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.dos .b-great { background: var(--accent-soft); color: var(--great); }
.dos .b-good { background: var(--good-soft); color: var(--good); }
.dos .b-ok { background: var(--amber-soft); color: var(--amber); }
.dos .b-loss { background: var(--red-soft); color: var(--red); }
.dos .b-blue { background: var(--blue-soft); color: var(--blue); }
.dos .b-violet { background: var(--violet-soft); color: var(--violet); }
.dos .b-gray { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.dos .src-td { white-space: nowrap; }
.dos .doit { min-width: 230px; max-width: 320px; }
.dos .doit .why { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: normal; line-height: 1.35; }
.dos .mini { display: inline-flex; align-items: center; gap: 6px; }
.dos .mini .t { width: 46px; height: 5px; border-radius: 9px; background: var(--track); overflow: hidden; display: inline-block; }
.dos .mini .t i { display: block; height: 100%; border-radius: 9px; }
.dos .more { display: block; width: 100%; border: 0; border-top: 1px solid var(--line-2); background: var(--surface-2); color: var(--accent); font-weight: 600; padding: 10px; cursor: pointer; border-radius: 0 0 var(--radius) var(--radius); }
.dos .pend { color: var(--faint); font-size: 11.5px; }

/* paperwork strip */
.dos .pw { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 16px 16px; }
.dos .pw .item { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface-2); cursor: pointer; color: var(--ink); }
.dos .pw .item:hover { border-color: var(--accent); }
.dos .pw .item b { font-size: 17px; font-variant-numeric: tabular-nums; }
.dos .pw .item span { font-size: 12.5px; color: var(--muted); }
.dos .pw .item.dim { opacity: .65; }

/* phone cards */
.dos .cards { display: none; }
.dos .ccard { border-top: 1px solid var(--line-2); padding: 13px 16px; cursor: pointer; }
.dos .ccard:first-child { border-top: 0; }
.dos .ccard .r1 { display: flex; align-items: flex-start; gap: 10px; }
.dos .ccard .r1 .car { flex: 1; min-width: 0; }
.dos .ccard .r1 .car b { display: block; font-weight: 600; }
.dos .ccard .big { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.dos .ccard .r2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.dos .ccard .r2 div { background: var(--surface-2); border-radius: 8px; padding: 6px 8px; min-width: 0; }
.dos .ccard .r2 small { display: block; font-size: 11px; color: var(--muted); }
.dos .ccard .r2 strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.dos .ccard .r3 { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.dos .ccard .r3 .why { font-size: 12px; color: var(--muted); flex-basis: 100%; }

/* charts */
.dos svg text { font-family: inherit; }
.dos .c-grid { stroke: var(--line-2); }
.dos .c-lbl { fill: var(--muted); font-size: 11px; }
.dos .c-val { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.dos .c-t { fill: var(--bar-1); } .dos .c-p { fill: var(--bar-2); } .dos .c-hot { fill: var(--red); } .dos .c-hot2 { fill: var(--red); opacity: .55; }
.dos .legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.dos .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dos .agebar { cursor: pointer; } .dos .agebar:hover rect { opacity: .85; }
.dos .conc { display: grid; gap: 9px; }
.dos .conc .row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 40px; align-items: center; gap: 10px; font-size: 13px; }
.dos .conc .row .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dos .conc .tr { height: 8px; background: var(--track); border-radius: 9px; position: relative; }
.dos .conc .tr i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; background: var(--bar-1); }
.dos .conc .tr u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); border-radius: 2px; }
.dos .conc .row.warn .tr i { background: var(--amber); }

/* flooring alert list */
.dos .alerts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; padding: 0 16px 12px; }
.dos .alerts a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); color: var(--ink); cursor: pointer; }
.dos .alerts a:hover b { color: var(--accent); }
.dos .alerts a b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dos .alerts a span { font-size: 12px; color: var(--muted); }
.dos .alerts a .amt { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--red); }

/* buying */
.dos .bucket .ph .pill { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.dos .spark { display: block; }
.dos .trend { font-size: 12px; font-weight: 650; white-space: nowrap; }
.dos td.why { font-size: 12px; color: var(--muted); max-width: 300px; white-space: normal; }
.dos .strat { font-size: 12px; white-space: nowrap; }
.dos .strat .on { color: var(--good); font-weight: 600; } .dos .strat .off { color: var(--faint); }
.dos .hot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 4px 16px 16px; }
.dos .hot .h { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: var(--surface-2); cursor: pointer; }
.dos .hot .h:hover { border-color: var(--accent); }
.dos .hot .h .d { font-size: 22px; font-weight: 750; color: var(--red); letter-spacing: -.02em; }
.dos .hot .h .d small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.dos .hot .h b { display: block; font-size: 13px; margin-top: 2px; }
.dos .hot .h span { font-size: 12px; color: var(--muted); }
.dos tr.expand td { background: var(--surface-2); padding: 8px 16px 12px; }
.dos .carlist { display: flex; flex-wrap: wrap; gap: 6px; }
.dos .carlist a { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 9px; font-size: 12px; color: var(--ink); cursor: pointer; }
.dos .carlist a:hover { border-color: var(--accent); }
.dos .note { font-size: 12.5px; color: var(--muted); padding: 10px 16px 14px; border: 0; }
.dos .infobar { display: flex; gap: 10px; align-items: flex-start; background: var(--blue-soft); color: var(--ink-2); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.dos .infobar svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--blue); stroke-width: 1.8; margin-top: 1px; }
.dos .empty { padding: 28px 16px; text-align: center; color: var(--muted); }

/* rep grid */
.dos .grid-reps td.cell { text-align: center; font-variant-numeric: tabular-nums; }
.dos .grid-reps td.cell.on { background: var(--good-soft); color: var(--good); font-weight: 650; }

/* ---------- car story drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8,12,18,.42); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--bg); box-shadow: var(--shadow-lg); transform: translateX(104%); transition: transform .26s cubic-bezier(.2,.8,.2,1); z-index: 50; overflow-y: auto; border-left: 1px solid var(--line); overscroll-behavior: contain; }
.drawer.on { transform: none; }
.drawer .dh { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 20px 14px; z-index: 2; }
.drawer .dh .x { position: absolute; right: 14px; top: 14px; width: 34px; padding: 0; justify-content: center; }
.drawer .dh h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; padding-right: 44px; text-transform: none; color: var(--ink); font-weight: 650; }
.drawer .dh .meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; }
.drawer .vin { display: inline-flex; align-items: center; gap: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 4px 1px 7px; color: var(--ink-2); }
.drawer .vin button { border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 4px; font-size: 11px; font-weight: 600; padding: 1px 6px; cursor: pointer; }
.drawer .dh .chips { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.drawer .db { padding: 16px 20px 40px; display: grid; gap: 14px; }
.drawer .db > .panel + .panel { margin-top: 0; }
.drawer .warnbox { background: var(--amber-soft); color: var(--amber); border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 550; }
.drawer .stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.drawer .stats4 div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; min-width: 0; }
.drawer .stats4 small { display: block; font-size: 11px; color: var(--muted); }
.drawer .stats4 strong { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.drawer .stats4 em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); }
.drawer .signal { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; }
.drawer .signal .vb { font-size: 13px; padding: 4px 10px; }
.drawer .signal p { margin: 0; font-size: 13px; color: var(--ink-2); }
.drawer .tl { list-style: none; margin: 0; padding: 4px 16px 14px 16px; }
.drawer .tl li { display: grid; grid-template-columns: 54px 18px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 6px 0; position: relative; font-size: 13px; }
.drawer .tl li .d { color: var(--muted); font-size: 12px; padding-top: 1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.drawer .tl li .n { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); margin-top: 4px; position: relative; z-index: 1; }
.drawer .tl li.k .n { background: var(--accent); }
.drawer .tl li.sold .n { background: var(--good); border-color: var(--good); }
.drawer .tl li.bad .n { border-color: var(--red); }
.drawer .tl li.rc .n { border-color: var(--violet); background: var(--violet-soft); }
.drawer .tl li::before { content: ""; position: absolute; left: 66px; top: 18px; bottom: -8px; width: 2px; background: var(--line); }
.drawer .tl li:last-child::before { display: none; }
.drawer .tl li .w b { font-weight: 600; } .drawer .tl li .w span { display: block; color: var(--muted); font-size: 12px; }
.drawer .tl li .a { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.drawer .wf { padding: 2px 16px 14px; }
.drawer .wf .row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 84px; gap: 10px; align-items: center; font-size: 12.5px; padding: 3px 0; }
.drawer .wf .row .lane { height: 16px; position: relative; }
.drawer .wf .row .lane i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.drawer .wf .row .lane i.dash { background: repeating-linear-gradient(90deg, var(--bar-2) 0 5px, transparent 5px 8px) !important; opacity: .8; }
.drawer .wf .row.total { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 7px; font-weight: 650; }
.drawer .wf .row .num { text-align: right; }
.drawer .wf .row span small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.drawer .cks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 2px 16px 16px; }
.drawer .ck { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--surface-2); }
.drawer .ck small { display: block; font-size: 11.5px; color: var(--muted); }
.drawer .ck strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.drawer .ck em { font-style: normal; font-size: 12px; margin-left: 6px; }
.drawer .files { padding: 2px 16px 16px; display: grid; gap: 7px; }
.drawer .file { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 13px; background: var(--surface); }
.drawer .file .top { display: flex; align-items: center; gap: 10px; }
.drawer .file .fi { width: 30px; height: 34px; border-radius: 5px; background: var(--red-soft); color: var(--red); font-size: 9.5px; font-weight: 800; display: grid; place-items: center; flex: none; }
.drawer .file .fi.img { background: var(--blue-soft); color: var(--blue); }
.drawer .file .who { min-width: 0; flex: 1; }
.drawer .file b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer .file .who span { font-size: 12px; color: var(--muted); }
.drawer .file .amt { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.drawer .file .amt small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.drawer .file .acts { display: flex; gap: 10px; margin-top: 6px; padding-left: 40px; font-size: 12px; flex-wrap: wrap; align-items: center; }
.drawer .file .acts a { cursor: pointer; font-weight: 600; }
.drawer .file .acts .warnc { color: var(--amber); font-weight: 600; }
.drawer .file form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; margin-top: 8px; padding-left: 40px; }
.drawer .file form label { font-size: 11.5px; color: var(--muted); display: grid; gap: 2px; }
.drawer .file form input, .drawer .file form select { padding: 5px 8px; font-size: 13px; width: 100%; }
.drawer .file form .full { grid-column: 1 / -1; }
.drawer .file form .btns { grid-column: 1 / -1; display: flex; gap: 8px; }
.drawer .drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.drawer .drop b { color: var(--accent); }
.drawer .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drawer .rsum { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 10px; }
.drawer .spin { display: inline-block; width: 11px; height: 11px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: s .8s linear infinite; vertical-align: -1px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .dos .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .dos .topbar { margin-bottom: 12px; }
  .dos .search { max-width: none; }
  .dos .grid2, .dos .grid3 { grid-template-columns: minmax(0, 1fr); }
  .dos .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dos .kpi { padding: 11px 12px; } .dos .kpi .v { font-size: 21px; }
  .dos .head h1 { font-size: 21px; }
  .dos .head .right { margin-left: 0; width: 100%; }
  .dos .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .dos .health .sep { display: none; }
  .dos .tw.mob-cards { display: none; }
  .dos .hide-sm { display: none; }
  .dos .cards { display: block; }
  .dos .hot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dos .alerts { grid-template-columns: minmax(0, 1fr); }
  .dos .conc .row { grid-template-columns: minmax(0, 1fr) 90px 34px; }
  .drawer .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drawer .cks { grid-template-columns: minmax(0, 1fr); }
  .drawer .wf .row { grid-template-columns: 104px minmax(0, 1fr) 72px; }
  .drawer .db { padding: 14px 12px 40px; } .drawer .dh { padding: 14px 14px 12px; }
  .drawer .file form { padding-left: 0; } .drawer .file .acts { padding-left: 0; }
  .drawer .tl { padding: 4px 12px 12px; }
  .drawer .tl li { grid-template-columns: 46px 16px minmax(0, 1fr) auto; gap: 6px; }
  .drawer .tl li::before { left: 57px; }
}

/* ---------- fixes after the first screenshot pass ---------- */
@media (min-width: 901px) {
  .shell { background: linear-gradient(to right, var(--side) 232px, transparent 232px); }
  .shell > main { max-width: 1380px; }
}
.dos .kpi { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; font: inherit; color: inherit; }
.dos .kpi .kbar { margin-top: auto; } .dos .kpi .s + .kbar { margin-top: 9px; }
.dos td.car b { white-space: normal; }
.dos .inv td.car { max-width: 230px; }
.dos .nosrc { font-size: 11.5px; color: var(--faint); white-space: nowrap; }

/* ---- charts (Insights + page charts) ---- */
.dos .mk { cursor: pointer; }
.dos svg .mk:hover { opacity: .8; }
.dos svg .dot { stroke: var(--surface); stroke-width: 1; fill-opacity: .85; }
.dos .c-ref { stroke: var(--muted); stroke-dasharray: 4 4; }
.dos .legend.wrap, .dos .legend:not(.right) { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.dos .hb { display: grid; gap: 8px; }
.dos .hr, .dos .rr { display: grid; grid-template-columns: minmax(120px, 1.1fr) minmax(80px, 1.4fr) auto; gap: 10px; align-items: center; padding: 3px 4px; border-radius: 6px; }
.dos .hr.mk:hover, .dos .rr.mk:hover { background: var(--surface-2); }
.dos .hr .nm, .dos .rr .nm { min-width: 0; display: flex; flex-direction: column; }
.dos .hr .nm b, .dos .rr .nm b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dos .hr .nm small, .dos .rr .nm small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.dos .hr .tr { height: 10px; background: var(--track); border-radius: 99px; overflow: hidden; }
.dos .hr .tr i { display: block; height: 100%; border-radius: 99px; }
.dos .hr .num, .dos .rr .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; gap: 8px; align-items: center; justify-content: flex-end; min-width: 64px; }
.dos .rr .tr { position: relative; height: 22px; }
.dos .rr .tr u { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.dos .rr .tr i { position: absolute; top: 7px; height: 8px; border-radius: 99px; background: var(--bar-2); }
.dos .rr .tr b { position: absolute; top: 3px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--bar-1); }
.dos .rr.axis { padding-bottom: 0; }
.dos .rr.axis .tr { height: 14px; }
.dos .rr.axis em { position: absolute; transform: translateX(-50%); font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.dos .turn { display: inline-block; min-width: 26px; text-align: center; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.dos .turn.fast { background: var(--good-soft); color: var(--good); border-color: transparent; }
.dos .turn.slow { background: var(--red-soft); color: var(--red); border-color: transparent; }
.dos .drill { border-top: 1px solid var(--line); padding: 10px 14px 12px; }
.dos .drill .dh2 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.dos .drill .dh2 .x { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; }
.dos .dl { display: grid; }
.dos .dl a { display: grid; grid-template-columns: minmax(0, 1fr) 56px 96px 92px; gap: 10px; align-items: center; padding: 7px 6px; border-bottom: 1px solid var(--line-2); cursor: pointer; color: inherit; text-decoration: none; }
.dos .dl a:hover { background: var(--surface-2); }
.dos .dl .car { display: flex; flex-direction: column; min-width: 0; }
.dos .dl .car b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dos .dl .car small { color: var(--muted); font-size: 11.5px; }
.dos .dl .num { text-align: right; font-variant-numeric: tabular-nums; }
.dos .defs p { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.dos .rules { margin: 0; padding: 0 14px 12px; list-style: none; display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.dos .rules b { color: var(--ink); }
.dos details.panel > summary { cursor: pointer; list-style: none; }
.dos details.panel > summary::-webkit-details-marker { display: none; }
.dos .draft-tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--amber); background: var(--amber-soft); padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 1px; }
/* photos */
.dos .thumb { width: 52px; height: 38px; object-fit: cover; border-radius: 5px; background: var(--track); flex: none; }
/* The cell stays a table cell: as a flex box it was only as wide as its own content, so the row line stopped short of the next column.
   The photo floats, and the name centres beside it. */
.dos td.car.ph-row { display: table-cell; }
.dos td.car.ph-row > .thumb { float: left; margin: 1px 10px 1px 0; display: block; }
.dos td.car.ph-row > div { min-width: 0; min-height: 40px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.drawer .gallery { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scroll-snap-type: x mandatory; }
.drawer .gallery figure { margin: 0; flex: none; scroll-snap-align: start; }
.drawer .gallery img { height: 150px; width: auto; max-width: 260px; object-fit: cover; border-radius: 8px; display: block; background: var(--track); }
.drawer .gallery figcaption { font-size: 11px; color: var(--muted); margin-top: 3px; }
/* CRM on the car story */
.drawer .crm .who { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-size: 13px; }
.drawer .crm .conf { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.drawer .crm .conf.high { background: var(--good-soft); color: var(--good); }
.drawer .crm .conf.medium { background: var(--amber-soft); color: var(--amber); }
.drawer .crm .conf.low { background: var(--red-soft); color: var(--red); }
.drawer .crm .cnts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.drawer .crm .tch { display: grid; grid-template-columns: 92px 18px minmax(0, 1fr); gap: 4px 8px; font-size: 12.5px; max-height: 280px; overflow: auto; border-top: 1px solid var(--line-2); padding-top: 8px; }
.drawer .crm .tch .k { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; background: var(--bar-2); }
.drawer .crm .tch .k.in { background: var(--good); } .drawer .crm .tch .k.call { background: var(--blue); } .drawer .crm .tch .k.note { background: var(--faint); }
.drawer .crm .lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, 32%); gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.drawer .crm .lead small { color: var(--muted); }
.drawer .crm .lead a { cursor: pointer; }
.drawer .desc { white-space: pre-wrap; font-size: 13px; line-height: 1.5; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.dos .desc-list .d { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 14px; border-top: 1px solid var(--line-2); }
.dos .desc-list .d p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
@media (max-width: 900px) {
  .dos .hr, .dos .rr { grid-template-columns: minmax(0, 1fr) 90px auto; }
  .dos .dl a { grid-template-columns: minmax(0, 1fr) 44px 80px; }
  .dos .dl a > span:last-child { display: none; }
  .dos .thumb { width: 44px; height: 32px; }
}

:root { --v-good: #4aa88a; --v-thin: #b9c6c1; --v-pend: #e4e7ec; --v-nocar: #9aa1ad; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --v-good: #2e8c72; --v-thin: #44525c; --v-pend: #2a333d; --v-nocar: #5b6672; } }
:root[data-theme="dark"] { --v-good: #2e8c72; --v-thin: #44525c; --v-pend: #2a333d; --v-nocar: #5b6672; }
.dos .kpi .v { overflow-wrap: anywhere; }
@media (max-width: 700px) { .dos .dts-lbl { display: none; } }

/* ---- chart readout + things you can point at (2026-11-10) ---- */
.ctip { position: fixed; z-index: 90; max-width: 280px; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 8px 24px rgba(0,0,0,.18); pointer-events: none; }
.ctip b { display: block; color: var(--ink); font-weight: 650; } .ctip div:last-child:not(:only-child) { color: var(--muted); }
.dos svg .dot { transition: opacity .12s; }
.dos svg .dot:hover { opacity: 1; fill-opacity: 1; stroke: var(--ink); stroke-width: 2; }
.dos svg.flt .dot:not(.on) { opacity: .1; } .dos svg.flt .dot.on { fill-opacity: 1; }
.dos .lpt { cursor: default; stroke: currentColor; stroke-opacity: 0; stroke-width: 12; } .dos .lpt:hover { stroke-opacity: .25; }
.dos .c-strong { fill: var(--ink); font-weight: 650; }
.dos .c-hotzone { fill: var(--red); opacity: .07; }
.dos .pvhow { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: var(--ink-2); } .dos .pvhow b { color: var(--ink); }
.dos .pvleg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dos .pvleg button { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; color: var(--ink-2); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.dos .pvleg button i { width: 9px; height: 9px; border-radius: 50%; } .dos .pvleg button b { color: var(--ink); font-variant-numeric: tabular-nums; }
.dos .pvleg button:hover, .dos .pvleg button.on { background: var(--surface-2); border-color: var(--muted); }
.dos .pvzs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.dos .pvz { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; text-align: left; font: inherit; color: var(--ink-2); background: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.dos .pvz b { grid-row: span 2; font-size: 22px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; } .dos .pvz span { font-size: 13px; font-weight: 600; color: var(--ink); } .dos .pvz small { font-size: 12px; color: var(--muted); }
.dos .pvz:hover { background: var(--surface-2); border-color: var(--muted); } .dos .pvz.hot b { color: var(--red); }
@media (max-width: 700px) { .dos .pvz { grid-template-columns: 1fr; padding: 8px 10px; } .dos .pvz b { grid-row: auto; } .dos .pvz small { display: none; } }
/* sales trend: slices, lines, legend and table rows light each other up */
.dos .trleg button { display: inline-flex; align-items: center; gap: 6px; font: inherit; color: inherit; background: none; border: 0; border-radius: 6px; padding: 2px 6px; margin: -2px -6px; cursor: pointer; } .dos .trleg button b { color: var(--ink); }
.dos .trpanel [data-n] { cursor: pointer; transition: opacity .12s; } .dos .trpie .sl { transition: opacity .12s, transform .12s; transform-box: view-box; transform-origin: 100px 100px; }
.dos .trpanel.hl svg [data-n]:not(.on), .dos .trpanel.hl .trleg button:not(.on) { opacity: .28; }
.dos .trpanel.hl .trpie .sl.on { transform: scale(1.06); } .dos .trpanel.hl .ser.on path { stroke-width: 3; }
.dos .trleg button.on, .dos .trtab tr.on td, .dos .trtab tr[data-n]:hover td { background: var(--surface-2); }
.dos .trpie .ps { font-size: 10px; } .dos .trpie { max-width: 300px; }

/* ---- Needs review ---- */
.dos .rvk { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } .dos .rvk .kpi { text-align: left; font: inherit; color: inherit; }
.dos .rv { scroll-margin-top: 12px; } .dos .rv .ph .chip { margin-left: 4px; }
.dos .rvsub { margin: 0; padding: 0 16px 10px; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 900px; }
.dos .rvl { border-top: 1px solid var(--line-2); }
.dos .rvr { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) 110px auto; gap: 12px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.dos .rvr:hover { background: var(--surface-2); } .dos .rvr:last-child { border-bottom: 0; }
.dos .rvr .car { display: flex; flex-direction: column; min-width: 0; } .dos .rvr .car b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dos .rvr .car small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dos .rvr .why { font-size: 13px; color: var(--ink-2); } .dos .rvr .why b { color: var(--ink); }
.dos .rvr .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; min-width: 96px; } .dos .rvr .num small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.dos .rvr .act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

@media (max-width: 700px) { .dos .rvr { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 12px; } .dos .rvr .why { grid-column: 1 / -1; order: 3; } .dos .rvr .act { grid-column: 1 / -1; order: 4; justify-content: flex-start; } .dos .rvr .num + .num { display: none; } .dos .rvsub { padding: 0 12px 10px; } }

/* ---- shared table controls (tables.js) ---- */
.dos .tbar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
.dos .tbar .grow { flex: 1; } .dos .tbar .tn { white-space: nowrap; }
.dos .tbar .tq { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; background: var(--surface); min-width: 0; }
.dos .tbar .tq svg { width: 14px; height: 14px; fill: none; stroke: var(--faint); stroke-width: 1.8; flex: none; }
.dos .tbar .tq input { border: 0; outline: 0; background: none; color: var(--ink); font: inherit; padding: 6px 0; width: 170px; min-width: 0; }
.dos .tbar button, .dos .tpager button { font: inherit; font-size: 12.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.dos .tbar button:hover, .dos .tpager button:hover:not(:disabled) { border-color: var(--muted); color: var(--ink); } .dos .tpager button:disabled { opacity: .45; cursor: default; }
.dos .tmenu { position: relative; }
.dos .tpop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; max-height: 360px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); display: grid; gap: 6px; color: var(--ink-2); }
.dos .tpop[hidden] { display: none; } .dos .tpop b { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dos .tpop label { display: flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; } .dos .tpop input[type=checkbox] { accent-color: var(--accent); }
.dos .tpop [data-reset] { margin-top: 4px; } .dos .tpop .tnone { font-size: 12px; color: var(--muted); max-width: 230px; }
.dos .tpop form { display: flex; gap: 6px; margin-top: 4px; } .dos .tpop form input { flex: 1; min-width: 0; font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.dos .tpop .tv { display: flex; gap: 4px; } .dos .tpop .tv [data-v] { flex: 1; text-align: left; } .dos .tpop .tv [data-x] { padding: 5px 9px; }
.dos .tpager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); } .dos .tpager[hidden] { display: none; } .dos .tpager span { margin-right: auto; }
.dos th.tsort { cursor: pointer; } .dos th.tsort:hover { color: var(--ink); }
.dos tr[hidden] { display: none; }
@media (max-width: 700px) { .dos .tbar, .dos .tpager { display: none; } }

/* ---- Today: the morning screen ---- */
.dos .recon-d { margin-bottom: 14px; } .dos .recon-d > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; cursor: pointer; } .dos .recon-d > summary::-webkit-details-marker { display: none; }
.dos .recon-d > summary .ok, .dos .recon-d > summary .warn { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; } .dos .recon-d > summary .ok { color: var(--good); } .dos .recon-d > summary .warn { color: var(--amber); }
.dos .recon-d > summary .lnk { margin-left: auto; color: var(--muted); font-size: 12px; } .dos .recon-d[open] > summary { margin-bottom: 8px; }
.dos .kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .dos a.kpi { display: block; color: inherit; text-decoration: none; }
.dos .kpi { position: relative; overflow: hidden; } .dos .kpi .spark { position: absolute; right: 12px; top: 14px; width: 96px; height: 28px; pointer-events: none; }
.dos .kline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: -6px 2px 16px; font-size: 12.5px; color: var(--muted); } .dos .kline .sep { width: 1px; height: 12px; background: var(--line); } .dos .kline a { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; color: var(--ink-2); } .dos .kline a.neg { color: var(--red); }
.dos .dotoday { margin-bottom: 16px; } .dos .dotoday .ph .lnk { font-size: 12.5px; color: var(--accent); text-decoration: none; }
.dos .rvr.todo { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 2fr) 120px; padding: 8px 16px; } .dos .rvr.todo .rk { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.dos .rvr.todo .chip { margin-right: 6px; }
@media (max-width: 1180px) { .dos .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .dos .rvr.todo { grid-template-columns: 18px minmax(0, 1fr) auto; } .dos .rvr.todo .why { grid-column: 2 / -1; } .dos .kpi .spark { width: 64px; } }
/* panels keep their own height instead of stretching to the tallest neighbour */
.dos .grid2, .dos .grid3 { align-items: start; }

.dos .kpi.static { cursor: default; } .dos .kpi.static:hover { border-color: var(--line); }
/* gradient-filled marks */
.dos .agebar .c-t { fill: url(#g-varbar1); } .dos .agebar .c-p { fill: url(#g-varbar2); } .dos .agebar .c-hot, .dos .agebar .c-hot2 { fill: url(#g-varred); }
.dos .trline .fill { pointer-events: none; }

/* Needs review: decisions waiting on a person (admins only) */
.dos .dec { margin-bottom: 16px; } .dos .dec > summary { cursor: pointer; list-style: none; } .dos .dec > summary::-webkit-details-marker { display: none; }
.dos .rvr.decr { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) auto; cursor: default; align-items: start; } .dos .rvr.decr:hover { background: none; }
.dos .rvr.decr .btn { white-space: nowrap; text-decoration: none; }
@media (max-width: 700px) { .dos .rvr.decr { grid-template-columns: minmax(0, 1fr); } }

.dos details.checks > summary { cursor: pointer; list-style: none; } .dos details.checks > summary::-webkit-details-marker { display: none; }
.dos details.checks .health { box-shadow: none; margin-bottom: 0; } .dos details.checks #tie { margin: 0 16px 8px; box-shadow: none; }

/* ---- Buying: scout strategies with their switches ---- */
.dos .sstrat { margin-bottom: 16px; } .dos .stl { border-top: 1px solid var(--line-2); }
.dos .str { display: grid; grid-template-columns: 40px minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1.2fr); gap: 14px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line-2); }
.dos .str.off .nm, .dos .str.off .rn { opacity: .5; }
.dos .str .nm, .dos .str .rn { display: grid; gap: 1px; min-width: 0; } .dos .str b { font-size: 13.5px; font-weight: 600; } .dos .str small { font-size: 12px; color: var(--muted); }
.dos .str .rn { text-align: right; } .dos .str .rn b { font-weight: 550; font-size: 13px; }
.dos .str .md { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dos .str select { font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; max-width: 100%; }
.dos .str .la { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; } .dos .str .la input { accent-color: var(--accent); }
.dos .sw { position: relative; display: inline-block; width: 36px; height: 21px; cursor: pointer; } .dos .sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: inherit; }
.dos .sw i { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .15s; } .dos .sw i::after { content: ""; position: absolute; top: 2.5px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.dos .sw input:checked + i { background: var(--accent); } .dos .sw input:checked + i::after { transform: translateX(14px); } .dos .sw input:disabled + i { opacity: .55; } .dos .sw input:disabled { cursor: default; }
.dos .sw input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 900px) { .dos .str { grid-template-columns: 40px minmax(0, 1fr); } .dos .str .md, .dos .str .rn { grid-column: 2; text-align: left; } }
.dos .sstrat .note { white-space: normal; } .dos .str small { overflow-wrap: anywhere; }

/* ---- Insights: every sold car by what it made ---- */
.dos #soldcars .panel { margin-bottom: 16px; } .dos .scctl { display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 0 16px 12px; }
.dos .soldcars .barcol { width: 22%; min-width: 90px; padding-left: 0; } .dos .soldcars td.barcol i { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--bar-2), var(--bar-1)); }
.dos .soldcars td.barcol i.neg { background: linear-gradient(90deg, var(--red), color-mix(in srgb, var(--red) 55%, transparent)); }
.dos .grid2.one { grid-template-columns: minmax(0, 1fr); }

/* strategies: edit forms, suggestions */
.dos .str { grid-template-columns: 40px minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1.2fr) auto; }
.dos .str .ed { align-self: center; } .dos .str .stf { grid-column: 2 / -1; }
.dos .stf { display: grid; gap: 10px; padding: 12px 16px 14px; background: var(--surface-2); border-radius: 10px; margin: 4px 0 2px; }
.dos .sstrat > .stf { margin: 0 16px 12px; }
.dos .stf label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); } .dos .stf input:not([type=checkbox]), .dos .stf textarea { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; resize: vertical; }
.dos .stf p { margin: 0; } .dos .stf2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.dos .stf fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; } .dos .stf legend { font-size: 12px; color: var(--muted); padding: 0 0 4px; }
.dos .stf .la { display: inline-flex; grid-template-columns: none; align-items: center; gap: 5px; color: var(--ink-2); font-size: 12.5px; }
.dos .stfb { display: flex; flex-wrap: wrap; gap: 8px; } .dos .btn.danger { color: var(--red); margin-left: auto; }
.dos .stdraft { border-top: 1px solid var(--line-2); } .dos .sth { padding: 10px 16px 2px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dos .str.draft .md { gap: 8px; }
@media (max-width: 900px) { .dos .str { grid-template-columns: 40px minmax(0, 1fr); } .dos .str .ed { grid-column: 2; justify-self: start; } .dos .str .stf { grid-column: 1 / -1; } .dos .stf2 { grid-template-columns: minmax(0, 1fr); } }

.dos .str .rec { grid-column: 2 / -1; font-size: 12px; color: var(--muted); margin-top: -4px; } .dos .str .rec b { font-weight: 600; color: var(--ink-2); } .dos .str .rec b.warnc { color: var(--amber); }

/* Stat cards with a trend: the line sits at the bottom of the card (so lines align across a row), with the change beside it */
.dos .kpi .tr { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 6px; margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--muted); }
.dos .kpi .tr .spw { position: relative; grid-column: 1 / -1; height: 34px; margin-bottom: 5px; }
.dos .kpi .tr .spark { position: static; width: 100%; height: 100%; }
.dos .kpi .tr .mk { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.dos .kpi .tr span { font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; } .dos .kpi .tr span.neg { color: var(--red); } .dos .kpi .tr span.pos { color: var(--good); }
.dos .kpi .tr small { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dos .kpi .mix { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; margin-top: auto; } .dos .kpi .mix i { background: currentColor !important; min-width: 3px; }

/* Buying: the cars a scout strategy picked, by sale day (dealer/picks-<sale>, opened from the strategy's row) */
.dos .str .pkb { justify-self: end; font: inherit; font-size: 12px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 3px 0 0; cursor: pointer; }
.dos .str .pkb:hover { text-decoration: underline; }
.dos .str .spk { grid-column: 1 / -1; min-width: 0; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px 14px; margin-top: 2px; }
.dos .spkd { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
.dos .spkd button { flex: none; display: grid; gap: 1px; text-align: left; font: inherit; padding: 6px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.dos .spkd button.on { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.dos .spkd b { font-size: 12.5px; font-weight: 600; } .dos .spkd small { font-size: 11.5px; color: var(--muted); }
.dos .spkh { font-size: 12.5px; color: var(--muted); margin: 10px 2px 8px; line-height: 1.5; }
.dos .spkl { background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.dos .pkc { display: grid; grid-template-columns: 64px minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.8fr) auto; gap: 12px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line-2); font-size: 13px; }
.dos .pkc:first-child { border-top: 0; }
.dos .pkc .ph64 { width: 64px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--surface-2); display: block; }
.dos .pkc b { font-weight: 600; font-size: 13.5px; } .dos .pkc .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.dos .pkc .pkch { display: flex; flex-wrap: wrap; gap: 5px; }
.dos .pkc .why { display: block; font-size: 12px; color: var(--ink-2); margin-top: 4px; line-height: 1.45; } .dos .pkc .why .muted { color: var(--muted); }
.dos .pkc .lk { display: grid; gap: 2px; text-align: right; font-size: 12px; white-space: nowrap; } .dos .pkc .lk a { color: var(--accent); font-weight: 550; }
.dos .lt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.dos .lt.R { background: var(--red); } .dos .lt.Y { background: #d9a400; } .dos .lt.G { background: var(--good, #15803d); } .dos .lt.B { background: var(--blue); }
.dos .spke { padding: 14px 4px 4px; font-size: 13px; color: var(--muted); }
.dos .spk .more { margin-top: 10px; }
@media (max-width: 900px) {
  .dos .str .pkb { justify-self: start; } .dos .str .spk { padding: 10px; }
  .dos .pkc { grid-template-columns: 56px minmax(0, 1fr); gap: 4px 10px; align-items: start; } .dos .pkc > :nth-child(n+3) { grid-column: 2; }
  .dos .pkc .ph64 { width: 56px; height: 42px; } .dos .pkc .lk { text-align: left; display: flex; flex-wrap: wrap; gap: 4px 12px; }
}
