:root {
  --bg:#f5f6f8; --card:#fff; --ink:#141920; --muted:#6b7480; --line:#e2e6ea;
  --accent:#1b6ef3; --good:#0f8a68; --warn:#c2410c; --bad:#c0392b; --radius:10px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#0e1116; --card:#161a20; --ink:#e7ebef; --muted:#98a2ae; --line:#252b33;
          --accent:#5b9bff; --good:#34d39e; --warn:#fb923c; --bad:#f87171; }
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink);
       font:14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif; }
h1 { font-size:22px; margin:0 0 6px; }
h2 { font-size:17px; margin:0; letter-spacing:-.01em; }
h3 { font-size:14px; margin:32px 0 12px; color:var(--muted);
     text-transform:uppercase; letter-spacing:.05em; }
a { color:var(--accent); }
.sub { color:var(--muted); font-size:13px; }
.err { color:var(--bad); }
.center { max-width:400px; margin:18vh auto; text-align:center; background:var(--card);
          border:1px solid var(--line); border-radius:var(--radius); padding:40px 28px; }
.center .btn { margin-top:22px; }

nav { display:flex; align-items:center; gap:4px; padding:0 18px; height:52px;
      background:var(--card); border-bottom:1px solid var(--line);
      position:sticky; top:0; z-index:5; overflow-x:auto; }
nav b { margin-right:18px; white-space:nowrap; }
nav a { padding:7px 12px; border-radius:7px; text-decoration:none; color:var(--muted);
        font-size:13.5px; white-space:nowrap; }
nav a.on { background:var(--bg); color:var(--ink); font-weight:500; }
nav .spacer { flex:1; }
nav .who { color:var(--muted); font-size:12.5px; margin-right:10px; white-space:nowrap; }
main { max-width:1240px; margin:0 auto; padding:24px 18px 80px; }
section { margin-bottom:8px; }
.head { display:flex; align-items:center; justify-content:space-between; gap:14px;
        margin-bottom:14px; flex-wrap:wrap; }

.btn { background:var(--accent); color:#fff; border:0; border-radius:7px; cursor:pointer;
       padding:10px 18px; font-size:14px; font-weight:500; text-decoration:none;
       display:inline-block; }
.btn.sm { padding:7px 14px; font-size:13px; }
.ghost { background:none; border:1px solid var(--line); color:var(--muted);
         border-radius:7px; padding:7px 13px; font-size:13px; cursor:pointer; }
.ghost:hover { color:var(--ink); }
.pill { background:var(--warn); color:#fff; border-radius:99px; padding:1px 7px;
        font-size:11px; font-weight:600; margin-left:4px; }

.card { background:var(--card); border:1px solid var(--line);
        border-radius:var(--radius); padding:18px; margin-bottom:16px; }
.filters { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:14px; }
select, input[type=text], input[type=date], input[type=search], input[type=email], input[type=number] {
  background:var(--card); color:var(--ink); border:1px solid var(--line);
  border-radius:7px; padding:7px 10px; font-size:13px; font-family:inherit; }
.chk { display:flex; align-items:center; gap:5px; font-size:13px; color:var(--muted); }

.scroll { overflow-x:auto; background:var(--card); border:1px solid var(--line);
          border-radius:var(--radius); }
table { width:100%; border-collapse:collapse; font-size:13.5px; }
th { text-align:left; color:var(--muted); font-weight:500; font-size:11.5px;
     text-transform:uppercase; letter-spacing:.05em; padding:12px 12px;
     border-bottom:1px solid var(--line); white-space:nowrap; }
td { padding:9px 12px; border-bottom:1px solid var(--line); vertical-align:middle; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover { background:var(--bg); }
td.num, th.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
td select, td input { padding:5px 7px; font-size:12.5px; max-width:170px; }
td.desc { max-width:340px; }

.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
         gap:1px; background:var(--line); border:1px solid var(--line);
         border-radius:var(--radius); overflow:hidden; margin-bottom:16px; }
.stat { background:var(--card); padding:15px 17px; }
.stat .k { color:var(--muted); font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; }
.stat .v { font-size:23px; font-weight:600; margin-top:3px; letter-spacing:-.02em;
           font-variant-numeric:tabular-nums; }
.stat .v.good { color:var(--good); } .stat .v.bad { color:var(--bad); }
.stat .n { font-size:12px; color:var(--muted); margin-top:3px; }

.bar { height:8px; background:var(--line); border-radius:99px; overflow:hidden; }
.bar > i { display:block; height:100%; background:var(--accent); }
.tag { display:inline-block; background:var(--bg); border:1px solid var(--line); white-space:nowrap;
       padding:1px 8px; border-radius:99px; font-size:11.5px; color:var(--muted); }
.tag.warn { border-color:var(--warn); color:var(--warn); }
.tag.good { border-color:var(--good); color:var(--good); }
.note { border-left:3px solid var(--warn); background:var(--card); border-radius:0 8px 8px 0;
        padding:12px 16px; margin-bottom:16px; font-size:13.5px; }
[hidden] { display:none !important; }

/* one line per row: a wrapped supplier name makes the statement unreadable */
td.one { max-width:0; width:40%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
td.nw, th.nw { white-space:nowrap; }
tr.in td { background:color-mix(in srgb, var(--good) 7%, transparent); }
td.num.good { color:var(--good); }

tr.done td { background:color-mix(in srgb, var(--good) 5%, transparent); }

/* ── WOW Sales additions ── */
.reg { display:inline-block; font-weight:700; letter-spacing:.06em; background:#f7d117; color:#111;
       border:1px solid #c9a900; border-radius:4px; padding:1px 7px; font-size:12.5px; white-space:nowrap; }
a.rowlink { color:inherit; text-decoration:none; }
tbody tr.click { cursor:pointer; }
.status { display:inline-block; padding:1px 8px; border-radius:99px; font-size:11.5px; border:1px solid var(--line); color:var(--muted); }
.status.stock { border-color:var(--accent); color:var(--accent); }
.status.prep { border-color:var(--warn); color:var(--warn); }
.status.listed { border-color:var(--good); color:var(--good); }
.status.reserved { border-color:#8b5cf6; color:#8b5cf6; }
.status.sold { background:var(--good); border-color:var(--good); color:#fff; }
.status.written_off, .status.kept { opacity:.7; }
.grid2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:16px; }
.kv { display:grid; grid-template-columns:150px 1fr; gap:6px 12px; font-size:13.5px; }
.kv b { color:var(--muted); font-weight:500; }
.kv span { word-break:break-word; }
dialog { border:1px solid var(--line); border-radius:var(--radius); background:var(--card); color:var(--ink);
         padding:0; width:min(720px, 94vw); }
dialog::backdrop { background:rgba(0,0,0,.45); }
dialog form { padding:22px 24px; }
dialog h2 { margin-bottom:14px; }
.fgrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px 14px; }
.fgrid label { display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--muted); }
.fgrid label.wide { grid-column:1 / -1; }
.fgrid input, .fgrid select, .fgrid textarea { width:100%; background:var(--card); color:var(--ink); border:1px solid var(--line);
  border-radius:7px; padding:7px 10px; font-size:13px; font-family:inherit; }
.fgrid textarea { min-height:64px; resize:vertical; }
.actions { display:flex; gap:8px; justify-content:flex-end; margin-top:18px; align-items:center; }
.actions .left { margin-right:auto; }
.danger { color:var(--bad); border-color:var(--bad); }
.muted { color:var(--muted); }
.neg { color:var(--bad); } .pos { color:var(--good); }
.crumb { color:var(--muted); font-size:13px; margin-bottom:8px; display:inline-block; text-decoration:none; }
.emptyrow td { text-align:center; color:var(--muted); padding:24px; }
h2 .reg { font-size:15px; vertical-align:middle; margin-right:8px; }
.warnbox { border-left:3px solid var(--bad); }
@media (max-width:640px) { .kv { grid-template-columns:120px 1fr; } .stat .v { font-size:19px; } }

.thumb { display:inline-block; height:44px; border-radius:6px; object-fit:cover; vertical-align:middle; background:var(--line); }
.thumb.none { height:44px; }
td.pic { width:72px; padding-right:0; }
h2 .thumb { height:64px; margin-right:10px; }

/* ── vehicle page 2026 ── */
.hero { display:grid; grid-template-columns:minmax(220px,380px) 1fr; gap:22px; background:var(--card); border:1px solid var(--line);
        border-radius:16px; padding:18px; margin-bottom:16px; }
.hero-pic img { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:12px; display:block; background:var(--line); }
.hero-pic .nopic { aspect-ratio:4/3; border-radius:12px; background:var(--bg); border:1px dashed var(--line); display:flex; align-items:center; justify-content:center; color:var(--muted); }
.hero-top { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:8px; }
.hero-title { font-size:26px; margin:0 0 2px; letter-spacing:-.02em; }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin:14px 0; }
.chip { background:var(--bg); border:1px solid var(--line); border-radius:99px; padding:4px 11px; font-size:12.5px; }
.chip b { color:var(--muted); font-weight:500; margin-right:5px; font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
.hero-actions { display:flex; gap:8px; flex-wrap:wrap; }
.card { border-radius:14px; }
.cardhead { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.cardhead h3 { margin:0; }
.grid3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; margin-bottom:16px; }
.grid2 { margin-bottom:16px; }
.kv { grid-template-columns:110px 1fr; }
.notes { font-size:13px; color:var(--muted); margin:10px 0 0; line-height:1.5; }
.cbar { display:flex; height:14px; border-radius:99px; overflow:hidden; background:var(--line); }
.cbar i, .legend i { display:block; height:100%; }
.legend { display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:12px; font-size:12.5px; color:var(--muted); }
.legend span { display:flex; align-items:center; gap:6px; }
.legend i { width:10px; height:10px; border-radius:3px; }
.legend b { color:var(--ink); font-weight:600; }
.c1 { background:#3b82f6; } .c2 { background:#93c5fd; } .c3 { background:#f59e0b; } .c4 { background:#10b981; } .c5 { background:#ef4444; } .c6 { background:#a78bfa; }
.checks { list-style:none; margin:0; padding:0; }
.checks li { display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid var(--line); font-size:13.5px; color:var(--muted); }
.checks li:last-child { border-bottom:0; }
.checks li.ok { color:var(--ink); }
.tick { width:20px; height:20px; border-radius:50%; border:1.5px solid var(--line); display:inline-flex; align-items:center; justify-content:center; font-size:12px; flex:none; }
.checks li.ok .tick { background:var(--good); border-color:var(--good); color:#fff; }
button.link { background:none; border:0; color:var(--accent); cursor:pointer; font-size:12.5px; padding:0 4px; font-family:inherit; }
.doclist { list-style:none; margin:0; padding:0; }
.doclist li { display:flex; align-items:center; gap:8px; padding:7px 0; border-bottom:1px solid var(--line); font-size:13.5px; }
.doclist li:last-child { border-bottom:0; }
.doclist a { flex:1; text-decoration:none; color:var(--ink); display:flex; align-items:center; gap:8px; }
.doclist a:hover { color:var(--accent); }
.dicon { width:26px; height:26px; border-radius:7px; background:var(--bg); border:1px solid var(--line); display:inline-flex; align-items:center; justify-content:center; font-size:13px; }
button.x { background:none; border:0; color:var(--muted); cursor:pointer; font-size:16px; line-height:1; padding:2px 6px; }
button.x:hover { color:var(--bad); }
.scroll.flat { border:0; border-radius:0; background:transparent; }
.tag.cat-transport { border-color:#10b981; color:#10b981; } .tag.cat-auction_fees { border-color:#f59e0b; color:#f59e0b; }
.tag.cat-parts, .tag.cat-repair, .tag.cat-labour { border-color:#ef4444; color:#ef4444; } .tag.cat-advertising { border-color:#a78bfa; color:#a78bfa; }
@media (max-width:700px) { .hero { grid-template-columns:1fr; } .hero-title { font-size:21px; } }
.chip.bad { border-color:var(--bad); color:var(--bad); } .chip.warn { border-color:var(--warn); color:var(--warn); } .chip.good { border-color:var(--good); }
.warnc { color:var(--warn); }
