/* Trust Autos — the category standard, done properly.
   White ground, near-black ink, blue-600 as the one accent, soft gray lanes,
   hairline borders, one grotesque (Figtree) with tabular figures for money.
   Red only for flags and traps, green only for profit and go. */

/* ---------- fonts ---------- */

@font-face {
  font-family: 'Figtree';
  src: url('fonts/Figtree-var.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */

:root {
  --bg: #ffffff;
  --ink: #0f172a;
  --ink-2: #64748b;
  --ink-3: #94a3b8;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --accent-soft: #eff6ff;
  --lane: #eef2f6;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-soft: #edf1f5;
  --red: #dc2626;
  --red-ink: #b91c1c;
  --red-bg: #fee2e2;
  --amber: #d97706;
  --amber-ink: #92400e;
  --amber-bg: #fef3c7;
  --green: #16a34a;
  --green-ink: #15803d;
  --green-bg: #dcfce7;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 16px rgba(15, 23, 42, .06);
  --shadow-card-hover: 0 2px 4px rgba(15, 23, 42, .07), 0 10px 24px rgba(15, 23, 42, .10);
  --shadow-pop: 0 4px 10px rgba(15, 23, 42, .10), 0 18px 44px rgba(15, 23, 42, .16);
  --r-card: 12px;
  --r-lane: 14px;
  --r-control: 9px;
  --r-chip: 999px;
  --nav-h: clamp(56px, 4.69vw, 96px);
  --gutter: clamp(16px, 1.5vw, 30px);
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}



/* Night: the same admin under office-off lighting. Blue stays the accent,
   flags stay red, profit stays green. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --ink: #e6ecf5;
    --ink-2: #8fa1b8;
    --ink-3: #64748b;
    --accent: #60a5fa;
    --accent-ink: #0b1220;
    --accent-soft: #12203a;
    --lane: #101a2c;
    --card: #16223a;
    --border: #24324a;
    --border-soft: #1c2940;
    --red: #f87171;
    --red-ink: #fca5a5;
    --red-bg: #3f1d24;
    --amber: #fbbf24;
    --amber-ink: #fcd34d;
    --amber-bg: #3a2c12;
    --green: #4ade80;
    --green-ink: #86efac;
    --green-bg: #12321f;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 16px rgba(0, 0, 0, .35);
    --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, .4), 0 10px 24px rgba(0, 0, 0, .45);
    --shadow-pop: 0 4px 10px rgba(0, 0, 0, .5), 0 18px 44px rgba(0, 0, 0, .55);
  }
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

/* An author display rule beats the UA's [hidden] rule, so state it once, loudly. */
[hidden] { display: none !important; }

html { color-scheme: light dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  accent-color: var(--accent);
  caret-color: var(--accent);
}

::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

* { scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; line-height: 1.15; text-wrap: balance; margin: 1.6em 0 .5em; }
h1 { font-size: 1.7rem; margin-top: 0; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }

b { font-weight: 700; }
small { font-size: .8em; }

img { max-width: 100%; display: block; }

output { display: inline-block; }

table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border-soft); }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 600; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.money-fig, .num { font-variant-numeric: tabular-nums; }

/* ---------- top nav ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.mark {
  font-weight: 800;
  font-size: clamp(22px, 1.76vw, 36px);
  letter-spacing: .015em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}
.mark b { color: var(--accent); font-weight: 800; }

.top-note { color: var(--ink-2); font-size: .85rem; margin-left: auto; }
.top .nav-add { margin-left: auto; height: 40px; padding: 0 15px; font-size: .88rem; white-space: nowrap; }
.nav-add-icon { width: 17px; height: 17px; flex: none; }
@media (max-width: 899.98px) {
  .top .nav-add { gap: 0; width: 40px; padding: 0; flex: none; }
  .top .nav-add .nav-add-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

.account {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-2);
  text-decoration: none;
}
.account:hover { text-decoration: none; color: var(--ink); }
.account .badge {
  display: grid;
  place-items: center;
  width: clamp(36px, 2.15vw, 44px);
  height: clamp(36px, 2.15vw, 44px);
  border-radius: 50%;
  background: #334155;
  color: #fff;
  font-weight: 700;
  font-size: .95em;
  letter-spacing: .04em;
}
@media (prefers-color-scheme: dark) { .account .badge { background: #cbd5e1; color: #0b1220; } }
.account svg { width: 18px; height: 18px; }

/* Tabs: text tabs in the nav bar on wide screens, a bottom bar on phones. */
.tabs {
  display: flex;
  gap: clamp(18px, 2.2vw, 44px);
}
.tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--nav-h);
  color: var(--ink-2);
  font-weight: 600;
  font-size: clamp(14px, 1.07vw, 22px);
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-selected="true"] { color: var(--accent); }
.tabs a[aria-selected="true"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}

@media (min-width: 900px) {
  .tabs { position: fixed; top: 0; left: clamp(300px, 23.3vw, 478px); z-index: 31; }
  .nav-add + .account { margin-left: 14px; }
  .top-note { position: fixed; right: calc(var(--gutter) + 70px); top: 0; line-height: var(--nav-h); }
}

@media (max-width: 899.98px) {
  .tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    justify-content: space-around;
    gap: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabs a { height: 56px; flex: 1; justify-content: center; }
  .tabs a[aria-selected="true"]::after { top: 0; bottom: auto; border-radius: 0 0 3px 3px; }
  body { padding-bottom: 64px; }
  .nav-add + .account { margin-left: 14px; }
  .top-note { display: none; }
}

/* ---------- views ---------- */

main { min-height: 60vh; }

.view { padding: 0 var(--gutter) 48px; max-width: 1040px; margin: 0 auto; }
#view-cars, #view-list { max-width: none; }

.view-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }

.hint { color: var(--ink-2); font-size: .85rem; line-height: 1.5; max-width: 75ch; }

/* ---------- the KPI strip ---------- */

.kpis {
  display: grid;
  grid-template-columns: 1.11fr .92fr 1fr .97fr;
  align-items: center;
  min-height: clamp(72px, 8vw, 164px);
  padding: clamp(10px, 1vw, 20px) calc(var(--gutter) + 10px);
  border-bottom: 1px solid var(--border);
  margin: 0 calc(-1 * var(--gutter));
}
.kpi {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.2vw, 26px);
  padding-right: 16px;
}
.kpi + .kpi { border-left: 1px solid var(--border-soft); padding-left: clamp(16px, 2.2vw, 46px); }
.kpi svg { width: clamp(22px, 1.8vw, 38px); height: clamp(22px, 1.8vw, 38px); color: var(--accent); flex: none; }
.kpi small {
  display: block;
  font-size: clamp(11px, .84vw, 17px);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 2px;
}
.kpi .fig {
  font-size: clamp(24px, 2.68vw, 55px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi .fig.na { color: var(--ink-3); font-weight: 600; }
.kpi .fig .vs {
  font-size: clamp(12px, .98vw, 20px);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-2);
  margin-left: .35em;
}

/* ---------- the board ---------- */

.board {
  display: grid;
  /* The comp's lanes taper slightly left to right; measured ratios, not equal sevenths. */
  grid-template-columns: 1.093fr 1.093fr 1.016fr 1fr 1fr 1fr 1.078fr;
  gap: clamp(12px, .93vw, 19px);
  padding-top: clamp(8px, .63vw, 13px);
  align-items: stretch;
}

.station {
  background: var(--lane);
  border-radius: var(--r-lane);
  padding: clamp(8px, .6vw, 12px);
  min-height: max(320px, 50.5vw);
  display: flex;
  flex-direction: column;
}

.post {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: clamp(3px, .34vw, 7px) clamp(4px, .4vw, 8px) clamp(12px, 1.1vw, 24px);
}
.post h2 {
  margin: 0;
  font-size: clamp(13px, 1.12vw, 23px);
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink);
}
.post .count { color: var(--ink-2); font-weight: 600; font-size: clamp(12px, .94vw, 19px); font-variant-numeric: tabular-nums; }

.jobs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: clamp(8px, .61vw, 12.5px); flex: 1; }

.job {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  view-transition-class: job;
}
.job:hover { box-shadow: var(--shadow-card-hover); }
.job[draggable="true"] { cursor: grab; }
.job.dragging { opacity: .45; }

.job-open { display: block; color: inherit; text-decoration: none; }
.job-open:hover { text-decoration: none; }
.job-open:hover .job-name { color: var(--accent); }

.job-photo {
  width: 100%;
  height: clamp(92px, 7.3vw, 150px);
  object-fit: cover;
  background: var(--lane);
}
.job-photo-none {
  width: 100%;
  height: clamp(92px, 7.3vw, 150px);
  display: grid;
  place-items: center;
  background: var(--lane);
  color: var(--ink-3);
}
.job-photo-none svg { width: 34px; height: 34px; }

.job-body {
  display: flex;
  flex-direction: column;
  min-height: clamp(70px, 4.93vw, 101px);
  padding: clamp(7px, .5vw, 10px) clamp(6px, .44vw, 9px) 0;
}
.job-body .job-name { margin-bottom: clamp(3px, .2vw, 4px); }
.station[data-station="recon"] { padding-right: clamp(4px, .3vw, 6px); }
/* The sold lane breathes: nothing there needs tight scanning any more. */
.station[data-station="sold"] .jobs { gap: clamp(13px, 1.56vw, 32px); }
.station[data-station="sold"] .job-body { padding-left: clamp(10px, 1vw, 21px); }
.station[data-station="sold"] .advance { padding-left: clamp(12px, 1.2vw, 25px); }

.job-name {
  display: block;
  font-size: clamp(11px, .79vw, 16px);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--ink);
}

.job-flags { display: flex; gap: 6px; margin: 0 0 0 clamp(-6px, -.29vw, 0px); }
.flag-chip {
  display: inline-flex;
  align-items: center;
  gap: clamp(3px, .25vw, 5px);
  padding: clamp(4px, .3vw, 6px) clamp(5px, .4vw, 8px);
  border-radius: 7px;
  font-size: clamp(11px, .74vw, 15px);
  font-weight: 600;
}
.flag-chip svg { width: clamp(11px, .78vw, 16px); height: clamp(11px, .78vw, 16px); }
.flag-chip.red { background: var(--red-bg); color: var(--red-ink); }
.flag-chip.amber { background: var(--amber-bg); color: var(--amber-ink); }

.job-max {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: clamp(12px, .93vw, 19px);
  padding: 0 0 clamp(8px, .7vw, 14px);
}
.job-flags + .job-max { margin-top: clamp(4px, .3vw, 6px); }
/* The won lane sets its figure a step lower, as the comp does. */
.station[data-station="won"] .job-max { margin-top: clamp(22px, 1.66vw, 34px); }
.job-max small {
  font-size: clamp(10px, .64vw, 13px);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--ink-2);
}
.job-max b {
  font-size: clamp(15px, 1.07vw, 22px);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.1;
  color: var(--ink);
}
.job-max .fig-note { font-size: clamp(11px, .8vw, 16px); color: var(--ink-2); font-weight: 500; }
.job-max .good, .pl .good, .fig-note .good { color: var(--green-ink); }
.job-max .bad, .pl .bad, .fig-note .bad { color: var(--red-ink); }

.advance {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: clamp(7px, .6vw, 12px) clamp(10px, .6vw, 12px);
  border: 0;
  border-top: 1px solid var(--border-soft);
  background: none;
  color: var(--ink-2);
  font: 500 clamp(11px, .78vw, 16px)/1 var(--font);
  cursor: pointer;
  text-align: left;
}
.advance svg { width: 1.05em; height: 1.05em; transition: translate .15s ease-out; }
.advance:hover { color: var(--accent); }
.advance:hover svg { translate: 3px 0; }

/* Drop slot: an empty station, or one about to receive from a loaded feeder. */
.slot {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  min-height: clamp(180px, 16vw, 300px);
  border: 1.5px dashed color-mix(in srgb, var(--ink-3) 55%, transparent);
  border-radius: var(--r-card);
  color: var(--ink-3);
  font-size: clamp(12px, .9vw, 18px);
  font-weight: 500;
  text-align: center;
  padding: 14px;
}
.slot svg { width: clamp(22px, 1.6vw, 32px); height: clamp(22px, 1.6vw, 32px); opacity: .8; }
.station.drop-ok .slot, .slot.drag-over {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.below-board { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 56px; flex-wrap: wrap; }

.off-line { margin-top: 24px; color: var(--ink-2); }
.off-line summary { cursor: pointer; font-weight: 600; }
.off-line .jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 14px; }

.first-run { text-align: center; padding: 64px 16px; }
.first-run h2 { margin-top: 0; }
.first-run .hint { margin: 10px auto 22px; }
.first-run .actions { justify-content: center; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--r-control);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font: 600 .95rem/1 var(--font);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
.btn:active { translate: 0 1px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.quiet { background: none; }
.btn.danger { color: var(--red-ink); border-color: color-mix(in srgb, var(--red) 40%, var(--border)); background: none; }
.btn.danger:hover { background: var(--red-bg); }
.btn.small { height: 38px; padding: 0 14px; font-size: .85rem; }
.btn.icon { width: 40px; height: 40px; padding: 0; }
.btn.icon svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .5; cursor: default; }

.actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* ---------- forms ---------- */

.field { margin: 16px 0; }
.field label, .field legend { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.field input:not([type="date"]):not([type="file"]), .field select, .field textarea {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  background: var(--card);
  color: var(--ink);
  font: 400 1rem/1.3 var(--font);
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.field input[type="date"] { height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--card); color: var(--ink); font: 400 .95rem var(--font); width: 100%; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 0; outline-width: 2px; border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }

fieldset.field { border: 0; padding: 0; margin: 16px 0; }

.row { display: flex; gap: 10px; align-items: center; }
.row .money { flex: 1; min-width: 0; }
.row .btn, .row > select { white-space: nowrap; flex: none; width: auto; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 18px; }

.money { position: relative; display: flex; align-items: center; }
.money > span { position: absolute; left: 12px; color: var(--ink-2); font-weight: 600; }
.money input { padding-left: 26px !important; font-variant-numeric: tabular-nums; }
.money.big input { height: 60px; font-size: 1.7rem; font-weight: 700; }
.money.big > span { font-size: 1.2rem; }

.vin-input { text-transform: uppercase; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .05em; }
.miles-input { max-width: 110px; }

.seg { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: var(--r-control); overflow: hidden; }
.seg button {
  height: 38px;
  border-radius: 6px;
  padding: 0 16px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: 600 .9rem var(--font);
  cursor: pointer;
}
.seg button + button { margin-left: 2px; }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.seg.small button { height: 32px; padding: 0 12px; font-size: .8rem; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-chip);
  background: var(--card);
  font: 500 .85rem var(--font);
  color: var(--ink);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- bid view ---------- */

.bid-layout { display: grid; gap: 34px; align-items: start; }
@media (min-width: 900px) { .bid-layout { grid-template-columns: minmax(0, 1fr) 340px; } }

.import-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  margin: 18px 0 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: var(--r-card);
  background: var(--accent-soft);
  color: var(--ink);
  font: 400 .9rem/1.45 var(--font);
  text-align: left;
  cursor: pointer;
}
.import-cta:hover { border-color: var(--accent); }
.import-cta .cta-arrow { width: 18px; height: 18px; color: var(--accent); flex: none; }
.import-cta b { display: block; }

.result {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  border: 1px solid var(--border);
  border-radius: var(--r-lane);
  padding: 22px;
  box-shadow: var(--shadow-card);
  background: var(--card);
}
.result-label { font-size: .78rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.result-num { display: block; font-size: 3rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.result-sub { color: var(--ink-2); font-size: .85rem; }
.result.loss .result-num { color: var(--red-ink); }

.breakdown { margin-top: 16px; color: var(--ink-2); }
.breakdown summary { cursor: pointer; font-weight: 600; font-size: .85rem; }
.breakdown table { width: 100%; margin-top: 8px; font-size: .85rem; }

.check-out { font-size: .9rem; font-weight: 600; }
.check-out.ok { color: var(--green-ink); }
.check-out.no { color: var(--red-ink); }

.car-card { border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px 16px; margin: 14px 0; background: var(--card); }
.car-name { font-weight: 700; margin: 0; }
.car-meta { color: var(--ink-2); font-size: .85rem; margin: 2px 0 0; }

/* ---------- strips (report) ---------- */

.strip { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--lane); position: relative; margin-top: 10px; }
.strip .z { height: 100%; }
.strip .go { background: var(--green); }
.strip .thin { background: var(--amber); }
.strip .loss { background: var(--red); }
.strip .s-bid { background: #334155; }
.strip .s-fee { background: #64748b; }
.strip .s-cost { background: #94a3b8; }
.strip .s-left { background: var(--green); }
.strip .ham { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(-55deg, rgba(15,23,42,.5) 0 3px, transparent 3px 6px); }
.strip .now { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--ink); border-radius: 2px; }
.strip-note { display: flex; justify-content: space-between; color: var(--ink-2); font-size: .8rem; margin: 6px 0 0; }
.strip-note b { color: var(--ink); font-variant-numeric: tabular-nums; }

.plate { display: inline-flex; flex-direction: column; }
.plate small { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.plate b { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.profit small { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); display: block; }
.profit b { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- lists ---------- */

.drop {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 34px 16px;
  border: 1.5px dashed color-mix(in srgb, var(--ink-3) 55%, transparent);
  border-radius: var(--r-lane);
  color: var(--ink-2);
  text-align: center;
  cursor: pointer;
  margin: 18px 0;
}
.drop:hover, .drop.drag-over { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop b { color: var(--ink); }

.car-list { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 12px; }
.car-list > li { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }
.car-list a { display: block; color: inherit; padding: 14px 16px; }
.car-list a:hover { text-decoration: none; border-color: var(--ink-3); }

.sl-new { border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; margin: 16px 0; background: var(--card); }

/* ---------- plan / p&l ---------- */

.plan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.plan > div { border: 1px solid var(--border-soft); border-radius: var(--r-control); padding: 10px 12px; background: var(--lane); }
.plan dt { font-size: .72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.plan dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }

.pl { font-weight: 600; margin: 14px 0; }

/* ---------- sheets ---------- */

.sheet {
  border: 0;
  border-radius: var(--r-lane);
  box-shadow: var(--shadow-pop);
  padding: 0;
  width: min(680px, calc(100vw - 32px));
  background: var(--card);
  color: var(--ink);
}
.sheet::backdrop { background: rgba(15, 23, 42, .45); }
.sheet[open] { animation: sheet-in .18s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheet-in { from { opacity: 0; translate: 0 10px; } }
.sheet form { padding: 22px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 8px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }

@media (max-width: 640px) {
  .sheet { width: 100vw; max-width: none; margin: auto 0 0; border-radius: var(--r-lane) var(--r-lane) 0 0; max-height: 92dvh; }
}

.imp-preview { color: var(--ink-2); font-size: .9rem; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 76px;
  translate: -50% 0;
  z-index: 40;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: var(--r-chip);
  font-weight: 600;
  font-size: .9rem;
  box-shadow: var(--shadow-pop);
  animation: toast-in .18s cubic-bezier(.2, .8, .2, 1);
}
@keyframes toast-in { from { opacity: 0; translate: -50% 8px; } }

/* ---------- settings ---------- */

.sticky-save { position: sticky; bottom: 0; background: var(--bg); padding: 14px 0; border-top: 1px solid var(--border); }
@media (max-width: 899.98px) { .sticky-save { bottom: 56px; } }

/* ---------- motion ---------- */

::view-transition-group(*) { animation-duration: .22s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- board on smaller screens ---------- */

/* A classic (non-overlay) scrollbar narrows the viewport; keep the board's
   right edge where a full-width viewport would put it. */
@media (min-width: 1200px) {
  #view-cars { padding-right: max(6px, calc(var(--gutter) - 10px)); }
}

@media (max-width: 1199.98px) {
  .board { display: flex; flex-direction: column; gap: 14px; }
  .station { min-height: 0; }
  /* Loaded stations first; empty ones fold to quiet rows at the end. */
  .station.empty { order: 1; background: none; padding: 4px 0; }
  .station.empty .slot { min-height: 72px; grid-auto-flow: column; }
  .jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .kpis { grid-template-columns: 1fr 1fr; row-gap: 4px; min-height: 0; padding-top: 14px; padding-bottom: 14px; }
  .kpi + .kpi { border-left: 0; padding-left: 0; }
  .kpi { padding: 6px 0; }
}

/* ================= sections: report, lists, settings, login =================
   Same system as the board: white cards, hairline borders, soft gray grounds,
   blue as the one accent, red only for flags and traps, green only for profit. */

/* ---------- car report ---------- */

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-weight: 600; padding: 14px 0 10px; }
.back:hover { color: var(--ink); text-decoration: none; }
.back-arrow { width: 16px; height: 16px; }

.rep-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-end; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.rep-name { font: 700 1.75rem/1.12 var(--font); letter-spacing: -.015em; margin: 0; }
.rep-meta { color: var(--ink-2); margin: 5px 0 0; font-size: .9rem; }
.rep-meta code { font: .95em ui-monospace, 'Cascadia Mono', Consolas, monospace; color: var(--ink); }
.rep-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rep-actions select { width: auto; height: 44px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--card); color: var(--ink); font: 600 .9rem var(--font); padding: 0 10px; }

.route { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; }
.route li { position: relative; padding: 26px 4px 0; font: 600 .74rem/1.2 var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
.route li::before { content: ''; position: absolute; left: 0; right: 0; top: 9px; height: 3px; background: var(--border); }
.route li::after { content: ''; position: absolute; left: 50%; top: 4px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border); }
.route li.done { color: var(--ink-2); }
.route li.done::before, .route li.here::before { background: var(--accent); }
.route li.done::after { background: var(--accent); border-color: var(--accent); }
.route li.here { color: var(--accent); font-weight: 700; }
.route li.here::after { width: 19px; height: 19px; margin-left: -9.5px; top: 1px; background: var(--bg); border: 5px solid var(--accent); }
.route-row { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.route-row .route { flex: 1; margin: 0; }
.route-note { font-size: .86rem; color: var(--ink-2); margin: -6px 0 14px; }
@media (max-width: 559px) {
  .route { grid-template-columns: repeat(7, 4.4rem); overflow-x: auto; padding-bottom: 4px; }
  .route-row { flex-wrap: wrap; }
  .route-row .route { flex: 1 1 100%; }
}

/* The verdict row: the max bid is the one blue block on the page. */
.verdict { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.tile { flex: 1 1 11rem; min-width: 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }
.tile .k { display: block; font: 600 .7rem/1.2 var(--font); text-transform: uppercase; letter-spacing: .09em; color: var(--ink-2); }
.tile b { display: block; font: 700 1.7rem/1.1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.01em; margin: 4px 0 2px; overflow-wrap: anywhere; }
.tile .sub { display: block; font-size: .84rem; color: var(--ink-2); }
.tile.signal { flex: 1.5 1 100%; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-card); }
.tile.signal .k, .tile.signal .sub { color: color-mix(in srgb, var(--accent-ink) 78%, var(--accent)); }
.tile.signal b { font-size: 2.9rem; color: var(--accent-ink); }
.tile .good { color: var(--green-ink); }
.tile .bad { color: var(--red-ink); }
@media (max-width: 699px) { .tile:not(.signal) { flex-basis: 45%; } }
@media (min-width: 700px) { .tile.signal { flex-basis: 17rem; } }

.flags { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 0 18px; }
@media (min-width: 700px) { .flags { grid-template-columns: 1fr 1fr; } }
.flag { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-weight: 500; font-size: .93rem; border-bottom: 1px solid var(--border-soft); }
.flag::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; }
.flag.red { color: var(--red-ink); font-weight: 600; }
.flag.red::before { background: var(--red); }
.flag.amber { color: var(--ink); }
.flag.amber::before { background: var(--amber); }
.flag.green { color: var(--ink-2); }
.flag.green::before { background: var(--green); }

.photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; scroll-snap-type: x proximity; }
.photos a { flex: none; scroll-snap-align: start; }
.photos img { display: block; width: 200px; height: 150px; object-fit: cover; border-radius: 8px; background: var(--lane); }
.photos a:first-child img { width: 260px; height: 195px; }

.rep-grid { display: grid; gap: 16px; }
@media (min-width: 900px) {
  .rep-grid { display: block; columns: 2; column-gap: 16px; }
  .rep-grid > .panel { break-inside: avoid; margin: 0 0 16px; display: inline-block; width: 100%; }
  .rep-grid > .panel.wide { column-span: all; }
}
.panel { min-width: 0; border: 1px solid var(--border); border-radius: var(--r-lane); background: var(--card); padding: 18px; }
.panel h2 { margin: 0 0 12px; font-size: 1.1rem; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.panel h2 small { font: 500 .84rem/1.2 var(--font); text-transform: none; letter-spacing: 0; color: var(--ink-2); }
.panel .hint { margin-top: 8px; }
.panel textarea { width: 100%; min-height: 84px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--card); color: var(--ink); font: 400 .95rem/1.45 var(--font); resize: vertical; }
.rep-head + .panel { border-top: 1px solid var(--border); }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; }
.facts dt { color: var(--ink-2); font-size: .88rem; padding: 7px 0; border-bottom: 1px solid var(--border-soft); }
.facts dd { margin: 0; padding: 7px 0 7px 14px; border-bottom: 1px solid var(--border-soft); font-weight: 550; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.facts dd.bad { color: var(--red-ink); font-weight: 700; }
.facts dd.warn { color: var(--amber-ink); font-weight: 700; }

.dmg { width: 100%; border-collapse: collapse; }
.dmg td { padding: 7px 0; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.dmg td:last-child { text-align: right; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.dmg .why { display: block; color: var(--ink-2); font-size: .82rem; }
.dmg tr.total td { border-bottom: 0; border-top: 2px solid var(--ink); font-weight: 700; }
.dmg.seen td:nth-child(2) { width: 1%; padding: 7px 10px; }
.dmg.seen a { color: var(--ink); font-weight: 600; }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.plan-out { margin-top: 10px; padding: 12px 14px; border-radius: var(--r-control); background: var(--accent); color: var(--accent-ink); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan-out:not(:has(b)) { background: var(--lane); color: var(--ink); }
.plan-out b { font: 700 2rem/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.plan-out span { font-size: .9rem; }

.rc-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag, .sev, .vd { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tag.yes { background: var(--amber-bg); color: var(--amber-ink); }
.tag.maybe { background: var(--lane); color: var(--ink-2); border: 1px solid var(--border); }
.tag.no { background: transparent; color: var(--ink-3); text-decoration: line-through; }
.tag.park { background: var(--red-bg); color: var(--red-ink); }
.recalls { list-style: none; margin: 0; padding: 0; }
.recalls details { border-bottom: 1px solid var(--border-soft); }
.recalls summary { cursor: pointer; padding: 8px 0; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: baseline; list-style: none; }
.recalls summary::-webkit-details-marker { display: none; }
.recalls summary b { font-size: .92rem; font-weight: 600; }
.recalls summary .why { grid-column: 2 / -1; color: var(--ink-2); font-size: .82rem; }
.recalls summary .yr { color: var(--ink-2); font-size: .82rem; }
.recalls .body { padding: 0 0 10px; font-size: .92rem; }
.recalls .body p { margin: 0 0 6px; }
.more-recalls > summary { cursor: pointer; color: var(--ink-2); font-weight: 600; padding: 8px 0; }

.bars { list-style: none; margin: 0; padding: 0; }
.bars li { margin: 0 0 6px; }
.bars details summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: .9rem; }
.bars details summary::-webkit-details-marker { display: none; }
.bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--lane); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.bars .samples { font-size: .85rem; color: var(--ink-2); margin: 6px 0 10px; padding-left: 12px; border-left: 1px solid var(--border); }
.bars .samples p { margin: 0 0 6px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; text-align: center; }
.stat-row div { background: var(--lane); border-radius: var(--r-control); padding: 8px 4px; }
.stat-row b { display: block; font: 700 1.3rem/1.15 var(--font); font-variant-numeric: tabular-nums; }
.stat-row span { font-size: .7rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }

.links { list-style: none; margin: 0; padding: 0; }
.links li { padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.links a { color: var(--accent); font-weight: 600; }
.links span { display: block; color: var(--ink-2); font-size: .85rem; }

.seen-sum { margin: 0 0 10px; font-size: 1rem; }
.sev.minor, .sev.clean, .sev.light { background: var(--green-bg); color: var(--green-ink); }
.sev.moderate { background: var(--amber-bg); color: var(--amber-ink); }
.sev.major, .sev.heavy, .sev.severe { background: var(--red-bg); color: var(--red-ink); }

/* ---------- sales lists ---------- */

.list-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px 16px; color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.list-item:hover { border-color: var(--ink-3); box-shadow: var(--shadow-card); }
.list-item .name { font: 700 1.05rem/1.25 var(--font); }
.list-item .meta { color: var(--ink-2); font-size: .85rem; }
.list-item .figure { grid-row: 1 / span 2; grid-column: 2; text-align: right; align-self: center; }
.list-item .figure b { display: block; font: 700 1.35rem/1.1 var(--font); font-variant-numeric: tabular-nums; }
.list-item .figure span { font-size: .7rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }

.sl-run, .sl-sum { margin-bottom: 16px; }
.sl-run .bar { height: 10px; margin: 6px 0 4px; }
.sl-market { margin: 0 0 6px; font-size: 1.02rem; max-width: 75ch; }
.top-buys { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.top-buys li { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); padding: 14px 16px; display: flex; flex-direction: column; }
.top-buys p { margin: 4px 0; font-size: .95rem; }
.top-buys li .actions { margin-top: auto; padding-top: 8px; }
.tb-head .link-btn { font: 700 1.08rem/1.25 var(--font); text-decoration: none; color: var(--ink); padding: 0; min-height: 0; text-align: left; }
.tb-head .link-btn:hover { color: var(--accent); }
.tb-head span { display: block; color: var(--ink-2); font-size: .85rem; }
.sl-cols { display: grid; gap: 0 22px; }
@media (min-width: 900px) { .sl-cols { grid-template-columns: repeat(3, 1fr); } }
.sl-points { margin: 0; padding: 0 0 0 18px; font-size: .92rem; }
.sl-points li { margin: 0 0 6px; }
.sl-points .link-btn { font-weight: 700; padding: 0; min-height: 0; }
.sl-shared { margin: 0 0 10px; font-size: .9rem; color: var(--ink-2); }
.sl-shared b { color: var(--ink); }
.sl-basis { margin: 4px 0 10px; }
.sl-basis a { color: var(--accent); font-weight: 600; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lane); background: var(--card); }
.sl-table { border-collapse: collapse; width: 100%; min-width: 1020px; font-size: .88rem; }
.sl-table th { text-align: left; font: 600 .72rem/1.2 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); background: var(--lane); padding: 10px 8px; white-space: nowrap; border-bottom: 1px solid var(--border); }
.sl-table td { padding: 8px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.sl-table tr:last-child td { border-bottom: 0; }
.sl-table td > span:not(.heat):not(.grade):not(.vd) { display: block; color: var(--ink-2); font-size: .8rem; }
.sl-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sl-table .stock { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .82rem; white-space: nowrap; }
.sl-table .car { min-width: 190px; }
.sl-table .car b { font-weight: 600; }
.sl-table .max { font: 700 1.05rem/1.2 var(--font); font-variant-numeric: tabular-nums; background: var(--accent-soft); color: var(--ink); }
.sl-table .max.over { background: transparent; color: var(--red-ink); }
/* The vet's note is why the sheet exists: it gets the full row width under its car. */
.sl-table tr:not(.note-row) > td { border-bottom: 0; padding-bottom: 4px; }
.sl-table .note-row td { padding: 0 8px 10px; border-bottom: 1px solid var(--border); }
.sl-table .note { white-space: normal; max-width: 0; }
.sl-table .note > span:not(.vd) { display: inline-block; margin-left: 14px; color: var(--ink-2); font-size: .82rem; }
.sl-table .bad { color: var(--red-ink); font-weight: 600; }
.sl-table .warn-t { color: var(--amber-ink) !important; font-weight: 600; }
.sl-table tr.v-pass td, .sl-table tr.v-skip td, .sl-table tr.v-none td { color: var(--ink-2); }
.sl-table tr.v-pass .max, .sl-table tr.v-trap .max { background: transparent; color: var(--ink-2); }
.sl-table tr.hl td, .sl-table tr.hl + .note-row td { background: var(--accent-soft); }
.sl-table .empty { text-align: center; }
@media (prefers-reduced-motion: no-preference) { .sl-table tr td { transition: background-color .6s; } }

.heat { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.heat::before { content: ''; width: 18px; height: 10px; background: linear-gradient(90deg, var(--ink) 0 5px, transparent 5px 6.5px, var(--ink) 6.5px 11.5px, transparent 11.5px 13px, var(--ink) 13px); }
.heat.warm::before { background: linear-gradient(90deg, var(--ink) 0 5px, transparent 5px 6.5px, var(--ink) 6.5px 11.5px, transparent 11.5px 13px, var(--border) 13px); }
.heat.cold::before { background: linear-gradient(90deg, var(--ink) 0 5px, transparent 5px 6.5px, var(--border) 6.5px 11.5px, transparent 11.5px 13px, var(--border) 13px); }
.heat.cold { color: var(--ink-2); }
.vd.buy { background: var(--green-bg); color: var(--green-ink); }
.vd.maybe { background: var(--amber-bg); color: var(--amber-ink); }
.vd.trap { background: var(--red-bg); color: var(--red-ink); }
.vd.pass { border: 1px solid var(--border); color: var(--ink-2); }
.grade { display: inline-block; font: 700 1.05rem/1 var(--font); min-width: 1.8em; text-align: center; padding: 4px 5px; border-radius: 7px; border: 2px solid currentColor; }
.grade.g-A, .grade.g-B { color: var(--green-ink); }
.grade.g-C { color: var(--amber-ink); }
.grade.g-D, .grade.g-F { color: var(--red-ink); }

/* ---------- settings ---------- */

.auction-edit { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px 16px; margin: 0 0 12px; }
.auction-edit > .row { align-items: end; }
.auction-edit .field { margin-bottom: 10px; }
.fee-comp { border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 6px; }
.fee-comp .row { flex-wrap: wrap; align-items: end; }
.fee-comp .row > * { flex: 1 1 120px; }
.tiers, .dmg-edit { width: 100%; border-collapse: collapse; margin: 6px 0; }
.tiers th, .dmg-edit th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); text-align: left; font-weight: 600; padding: 0 4px 4px; border-bottom: 0; }
.tiers td, .dmg-edit td { padding: 2px 4px; border-bottom: 0; }
.tiers input, .dmg-edit input { height: 38px; padding: 6px 8px; }
.tiers td:last-child, .dmg-edit td:last-child { width: 40px; }
.tiers .btn.icon, .dmg-edit .btn.icon { height: 36px; width: 36px; font-size: 1.1rem; }
.dmg-edit td:nth-child(2), .dmg-edit td:nth-child(3) { width: 26%; }

/* ---------- shared odds and ends ---------- */

.filters { margin: 12px 0; }
.link-btn { background: none; border: 0; color: var(--accent); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; font: inherit; padding: 6px 0; min-height: 36px; }
.link-btn.danger { color: var(--red-ink); }
.loading { color: var(--ink-2); font-style: italic; }
.check-out.good { color: var(--green-ink); }
.check-out.bad { color: var(--red-ink); }
.money.pct > span { left: auto; right: 12px; }
.money.pct > input { padding-left: 12px !important; padding-right: 30px !important; }
.imp-preview:empty { display: none; }
.imp-preview { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 10px; }
.imp-preview img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--lane); }
.imp-preview .car-name { font-size: 1.1rem; }
.imp-preview .car-meta { margin: 2px 0 0; }

/* ---------- sign in ---------- */

.login-page { background: var(--lane); min-height: 100dvh; display: flex; flex-direction: column; }
.login-page .top { background: transparent; border-bottom: 0; }
.login { width: min(420px, calc(100% - 32px)); flex: none; min-height: 0; margin: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lane); padding: 26px 24px 22px; box-shadow: var(--shadow-pop); }
.login h1 { font: 700 1.6rem/1.15 var(--font); letter-spacing: -.01em; margin: 0 0 8px; }
.login .btn { width: 100%; margin-top: 4px; }

/* ---------- Cars: the view switch, the spec line, and the all-cars table ---------- */

.cars-bar { display: flex; align-items: center; gap: 12px; padding: clamp(7px, .55vw, 11px) 0 0; }
/* The list is meant to be read whole: nothing below it competes for the fold. */
#cars-table:not([hidden]) ~ .below-board { margin-top: 20px; }

/* Specs on the card: what a buyer reads before the money. */
.job-spec {
  display: block;
  margin: 2px 0 0;
  font-size: clamp(10.5px, .7vw, 14px);
  line-height: 1.3;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* The board fits the window: each lane scrolls inside itself, headers stay put. */
/* The board stays a board: lanes grow with their load. 'All cars' is the view that
   puts every car on one screen, and it is the one the board opens into by default. */

/* All cars: every car as a preview card, several across, all on one screen. */
.cars-grid {
  list-style: none;
  margin: clamp(10px, .8vw, 16px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr));
  gap: clamp(12px, 1vw, 20px);
}
/* Cards in a grid row share a height, so the foot sits on the bottom edge, not mid-card. */
.cars-grid .job { display: flex; flex-direction: column; }
.cars-grid .job-open { flex: 1; display: flex; flex-direction: column; }
.cars-grid .job-body { flex: 1; min-height: 0; padding-bottom: 2px; }
.cars-grid .station-pill { align-self: flex-start; margin: 0 0 6px; }
.cars-grid .job-max { margin-top: clamp(8px, .6vw, 12px); }
.station-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--lane);
  color: var(--ink-2);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.station-pill.st-bidding { background: var(--accent-soft); color: var(--accent); }
.station-pill.st-sold { background: var(--green-bg); color: var(--green-ink); }
.station-pill.st-passed { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--border); }
