:root {
  /* C4L1BRATE: magenta, cyan and yellow on black, from the logo */
  --bg: #08080a; --panel: #131318; --panel2: #1b1b22; --line: #2a2a34;
  --text: #f1f1f5; --muted: #a0a0b0; --accent: #ff1fe3; --accent2: #3ff3ff;
  --magenta: #ff1fe3; --cyan: #3ff3ff; --yellow: #fff22e;
  --ok: #2fbf71; --warn: #f2b33d; --bad: #e5484d; --info: #3e8ef7;
  --radius: 10px;
}
* { box-sizing: border-box; }
/* scrollbars: dark track, slim thumb that lights up magenta on hover */
html { color-scheme: dark; scrollbar-color: #3a3a46 transparent; }
* { scrollbar-width: thin; scrollbar-color: #3a3a46 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3a3a46; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--magenta); background-clip: padding-box; }
::-webkit-scrollbar-corner, ::-webkit-scrollbar-button { display: none; background: transparent; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

header.top { display: flex; align-items: center; gap: 1.5rem; padding: .8rem 1.5rem; background: #0b0d10; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
header.top .brand { font-weight: 800; letter-spacing: .02em; color: var(--text); font-size: 1.1rem; }
header.top .brand span { color: var(--accent); }
.brand img { height: 30px; width: auto; max-width: 100%; display: block; }
.side .brand img { height: auto; width: 100%; max-width: 200px; }
.mobilebar .brand img { height: 24px; }
header.top { background: #000; }
header.top nav { display: flex; gap: 1.1rem; flex: 1; flex-wrap: wrap; }
header.top nav a { color: var(--muted); }
header.top nav a.on, header.top nav a:hover { color: var(--text); text-decoration: none; }
.credit-pill { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem; font-weight: 600; white-space: nowrap; }
.credit-pill b { color: var(--cyan); }

main { max-width: min(1600px, 100%); margin: 0 auto; padding: 1.75rem 1.5rem 4rem; }
.narrow { max-width: 460px; margin: 3rem auto; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.grid { display: grid; gap: 1.25rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stat .n { font-size: 1.8rem; font-weight: 800; }
.stat .l { color: var(--muted); font-size: .85rem; }

label { display: block; font-size: .85rem; color: var(--muted); margin: .7rem 0 .3rem; }
input[type=text], input[type=search], input[type=url], input[type=email], input[type=password], input[type=number], input[type=datetime-local], input[type=date], input[type=time], input[type=tel], input:not([type]), select, textarea, input[type=file] {
  width: 100%; padding: .6rem .7rem; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.check { display: flex; gap: .55rem; align-items: flex-start; color: var(--text); font-size: .95rem; }
.check input { margin-top: .3rem; }

.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: .65rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: #ff52ea; text-decoration: none; box-shadow: 0 0 0 1px #ff52ea55, 0 0 14px #ff1fe355; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.danger { background: var(--bad); }
.btn.sm { padding: .35rem .7rem; font-size: .85rem; }
.btn.block { width: 100%; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }

.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.b-queued { background: #3e8ef722; color: var(--info); }
.b-in_progress { background: #f2b33d22; color: var(--warn); }
.b-completed { background: #2fbf7122; color: var(--ok); }
.b-rejected, .b-cancelled { background: #e5484d22; color: var(--bad); }
.b-draft { background: #9aa3b222; color: var(--muted); }
.b-auto { background: #ff1fe322; color: var(--accent); }

.flash { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.flash.success { background: #2fbf7115; border-color: #2fbf7155; }
.flash.error { background: #e5484d15; border-color: #e5484d55; }
.flash.warning { background: #fff22e12; border-color: #fff22e55; color: var(--yellow); }

.opt { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem; border: 1px solid var(--line); border-radius: 8px; margin-bottom: .6rem; cursor: pointer; background: var(--panel2); }
.opt:hover { border-color: var(--muted); }
.opt input { margin-top: .25rem; transform: scale(1.2); }
.opt .price { margin-left: auto; font-weight: 700; color: var(--accent); white-space: nowrap; }
.total-bar { position: sticky; bottom: 0; background: #0b0d10ee; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.total-bar .t { font-size: 1.3rem; font-weight: 800; }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; }
code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88em; }

.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; background: var(--panel2); }
.dropzone.drag { border-color: var(--accent); }
.plan { display: flex; flex-direction: column; }
.plan .price { font-size: 1.8rem; font-weight: 800; margin: .3rem 0; }
.plan form { margin-top: auto; }
.empty { text-align: center; padding: 2rem; color: var(--muted); }
details summary { cursor: pointer; color: var(--muted); }
.inline-form { display: inline; }
@media (max-width: 700px) { header.top { flex-wrap: wrap; } .hide-sm { display: none; } }

table.optlist { table-layout: fixed; }
table.optlist td { padding: .45rem .5rem; vertical-align: middle; overflow: hidden; }
table.optlist td:last-child { white-space: nowrap; overflow: visible; width: 170px; }
table.optlist tr.built td { background: #2fbf710d; }
table.optlist tr.built td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
table.optlist tr.picked td { background: #ff1fe314; }
input[type=file].slim { padding: .3rem .4rem; font-size: .85rem; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg label { margin: 0; cursor: pointer; }
.seg input { display: none; }
.seg span { display: block; padding: .55rem 1.4rem; color: var(--muted); font-weight: 600; background: var(--panel2); }
.seg input:checked + span { background: var(--accent); color: #fff; }
.badge.b-unit { background: #9aa3b222; color: var(--text); }
.part { border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; margin-bottom: .75rem; background: var(--panel2); }
.part.on { border-color: var(--accent); }
.part .part-body { display: none; }
.part.on .part-body { display: block; }
.part-head { margin: 0; }
.part-head strong { font-size: 1rem; }
.tiers { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tier { margin: 0; cursor: pointer; }
.tier input { display: none; }
.tier-box { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); color: var(--text); }
.tier-box .badge { align-self: flex-start; margin-top: .2rem; }
.tier-price { font-size: 1.35rem; font-weight: 800; color: var(--accent); }
.tier input:checked + .tier-box { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

@media print {
  header.top, .noprint, .flash { display: none !important; }
  body { background: #fff; color: #000; }
  main { padding: 0; }
  .card { border: 0; background: #fff; padding: 0; }
  .muted { color: #555; }
  th, td { border-color: #ccc; }
}

/* ---- left sidebar layout ---- */
:root { --side: 232px; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: #0b0d10; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 1.1rem .8rem; z-index: 20; overflow-y: auto; }
.side .brand { font-weight: 800; font-size: 1.15rem; color: var(--text); padding: .2rem .6rem 1rem; text-decoration: none; }
.side .brand span, .mobilebar .brand span { color: var(--accent); }
.side .credit-pill { display: block; border-radius: 10px; padding: .55rem .8rem; margin: 0 .2rem 1rem; text-align: center; color: var(--muted); font-weight: 500; }
.side .credit-pill b { display: block; font-size: 1.15rem; }
.side .pill-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin: 0 .2rem 1rem; }
.side .pill-pair .credit-pill { margin: 0; padding: .5rem .4rem; font-size: .8rem; }
.side .pill-pair .credit-pill b { font-size: 1rem; }
.credit-pill.t-pill b { color: var(--ok); }
.credit-pill:hover { text-decoration: none; border-color: var(--cyan); }
.side nav { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.side nav a, .side-foot > a { display: block; padding: .55rem .75rem; border-radius: 8px; color: var(--muted); text-decoration: none; }
.side nav a:hover, .side-foot > a:hover { background: var(--panel2); color: var(--text); }
.side nav a.on, .side-foot > a.on { background: var(--panel2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.side-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); opacity: .7; padding: .9rem .75rem .25rem; }
.side-group:first-child { padding-top: 0; }
.side-foot { border-top: 1px solid var(--line); padding-top: .75rem; display: flex; flex-direction: column; gap: .5rem; }
.side-foot > a { color: var(--text); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
body.with-side main { margin-left: var(--side); max-width: none; padding: 1.75rem 2rem 4rem; }
body.with-side main > * { max-width: 2200px; }          /* fill wide screens; the grids reflow into more columns */
body.with-side .total-bar { max-width: 2200px; }
.mobilebar { display: none; }
.side-scrim { display: none; }
@media (max-width: 900px) {
  .mobilebar { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1rem; background: #0b0d10;
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15; }
  .mobilebar .brand { font-weight: 800; color: var(--text); text-decoration: none; }
  .side { transform: translateX(-100%); transition: transform .2s ease; }
  body.side-open .side { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; background: #0008; z-index: 19; }
  body.with-side main { margin-left: 0; padding: 1.25rem 1rem 4rem; }
}
@media print { .side, .mobilebar, .side-scrim { display: none !important; } body.with-side main { margin-left: 0; } }

table.optlist tr.req-missing td { background: #e5484d0d; }
table.optlist tr.req-missing td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
table.optlist tr.off td:not(:first-child), table.optlist tr.off strong { opacity: .5; }
.stat-n { font-size: 1.6rem; font-weight: 800; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: .5rem; box-shadow: 0 0 0 3px #2fbf7133; vertical-align: middle; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; height: 120px; margin-top: 1rem; align-items: end; }
.bar { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bar .fill { background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar span { font-size: .72rem; color: var(--muted); text-align: center; margin-top: .3rem; white-space: nowrap; }
.tiles { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tiles.big { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: .3rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.tile-mono { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; letter-spacing: .02em;
  background: linear-gradient(135deg, #ff1fe333, #3ff3ff12); color: var(--accent2); margin-bottom: .3rem; }
.tile-img { display: block; height: 110px; border-radius: 8px; background: var(--panel2) center / cover no-repeat; margin-bottom: .4rem; }
.hero-img { display: block; width: 180px; height: 110px; border-radius: 10px; background: var(--panel2) center / cover no-repeat; }
a.engine { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem .2rem; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; flex-wrap: wrap; }
a.engine:last-child { border-bottom: 0; }
a.engine:hover { background: var(--panel2); }
.figs { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.up { color: var(--ok); }
.figbar { display: grid; grid-template-columns: 70px 1fr 120px; gap: .75rem; align-items: center; margin: .55rem 0; }
.figbar-label { color: var(--muted); font-size: .9rem; }
.figbar-track { height: 14px; background: var(--panel2); border-radius: 7px; overflow: hidden; }
.figbar-fill { display: block; height: 100%; background: var(--accent); border-radius: 7px; }
.figbar-fill.stock { background: #6b7385; }
.figbar-val { text-align: right; }
.tile-logo { height: 52px; display: flex; align-items: center; margin-bottom: .3rem; }
.tile-logo img { max-height: 44px; max-width: 90px; object-fit: contain; }
.reg-plate input { width: 200px; background: #f7d117; color: #111; font-weight: 800; font-size: 1.3rem; letter-spacing: .08em; text-transform: uppercase;
  text-align: center; border: 2px solid #111; border-radius: 6px; padding: .45rem .6rem; }
.reg-plate input::placeholder { color: #0006; }
/* Car search: a UK rear number plate, centred */
.reg-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.25rem; padding: 1.5rem 1.25rem; }
.reg-bar .reg-hint { flex-basis: 100%; text-align: center; margin-top: -.4rem; }
.reg-bar .btn { padding: .85rem 1.4rem; font-size: 1rem; }
.uk-plate { display: inline-flex; align-items: stretch; width: min(420px, 100%); height: 84px; background: #f9d10f;
  border-radius: 10px; border: 3px solid #111; box-shadow: inset 0 0 0 2px #f9d10f, inset 0 0 0 4px #111a, 0 6px 18px #0007;
  overflow: hidden; cursor: text; margin: 0; }
.uk-band { flex: 0 0 52px; background: #0b47a7; color: #fff; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; padding: 0 0 .55rem; gap: .25rem; }
.uk-band .uk-ring { color: #f9d10f; font-size: 1.05rem; line-height: 1; letter-spacing: 0; }
.uk-band b { font-size: 1.15rem; font-weight: 800; letter-spacing: .04em; font-family: Arial, Helvetica, sans-serif; }
.uk-plate input { flex: 1; min-width: 0; height: 100%; margin: 0; border: 0; border-radius: 0; background: transparent; color: #111;
  text-align: center; text-transform: uppercase; font-family: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  font-stretch: condensed; font-weight: 800; font-size: 3rem; letter-spacing: .06em; padding: 0 .5rem; box-shadow: none; outline: none; }
.uk-plate input::placeholder { color: #1116; }
.uk-plate:focus-within { box-shadow: inset 0 0 0 2px #f9d10f, inset 0 0 0 4px #111a, 0 0 0 3px var(--accent), 0 6px 18px #0007; }
@media (max-width: 560px) { .uk-plate { height: 68px; } .uk-plate input { font-size: 2.2rem; } .uk-band { flex-basis: 42px; } }

.view-pill{display:block;margin:0 0 .6rem;padding:.5rem .75rem;border-radius:8px;background:var(--yellow);color:#111;font-weight:600;font-size:.85rem;text-decoration:none}
.view-pill span{display:block;font-weight:500;font-size:.78rem;opacity:.85}
.view-pill:hover{background:#fff67a}

.sysboxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.sysbox { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; background: var(--panel2); }
.sysbox .sys-name { font-weight: 800; font-size: 1.15rem; }
.sysbox .sys-status { font-weight: 700; text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; margin: .15rem 0 .3rem; }
.sysbox .sys-note { color: var(--muted); margin-top: .25rem; }
.sys-removed { border-color: #ef4444; background: rgba(239, 68, 68, .1); } .sys-removed .sys-status { color: #f87171; }
.sys-maybe { border-color: #eab308; background: rgba(234, 179, 8, .1); } .sys-maybe .sys-status { color: #facc15; }
.sys-intact { border-color: rgba(34, 197, 94, .5); } .sys-intact .sys-status { color: #4ade80; }
.sys-absent { opacity: .6; } .sys-absent .sys-status { color: var(--muted); }
/* dyno chart */
.dyno-wrap{position:relative;margin-top:.6rem}
.dyno-wrap svg{width:100%;height:auto;display:block;cursor:crosshair}
.dyno-key{margin-right:.8rem;white-space:nowrap}
.dyno-key i,.dyno-tip i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:.35rem;vertical-align:-1px}
.dyno-tip{position:absolute;top:8px;background:#0f1217ee;border:1px solid #2a2f3a;border-radius:8px;padding:.5rem .7rem;font-size:.82rem;pointer-events:none;white-space:nowrap}
.dyno-tip div{margin-top:.2rem}
.opt-extra { margin-left: auto; white-space: nowrap; font-weight: 700; color: var(--yellow); font-size: .9rem; }
.opt.off, .tier.off { opacity: .42; cursor: not-allowed; }
.hours-bar { padding: .65rem 1rem; font-size: .9rem; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.25rem; }
.hours-bar.auto { background: #fff22e14; color: var(--yellow); border-color: #fff22e40; }
.hours-bar.closed { background: #e5484d1f; color: #ff8a8d; border-color: #e5484d55; }
.ann-banner { border-left: 3px solid var(--cyan); }
.ann-banner.warn { border-left-color: var(--yellow); }
.modal-back { position: fixed; inset: 0; background: #000b; display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.modal { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--magenta); border-radius: var(--radius); max-width: 520px; width: 100%; padding: 1.4rem 1.5rem; box-shadow: 0 20px 60px #000a; }
.modal.warn { border-top-color: var(--yellow); }
.modal h2 { margin-top: 0; }
.modal .body { white-space: pre-line; color: var(--text); margin: .4rem 0 1.2rem; }
.mode-support { color: var(--ok); }
.mode-auto { color: var(--yellow); }
.mode-closed { color: var(--bad); }
input[type=datetime-local], input[type=date], input[type=time] { color-scheme: dark; }
.nav-count { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; border-radius: 999px; background: var(--magenta); color: #fff; font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.3rem; margin-left: .3rem; }
table.kv th { text-align: left; color: var(--muted); font-weight: 500; vertical-align: top; }
/* job chat */
.chat-thread { display: flex; flex-direction: column; gap: .6rem; max-height: 460px; overflow-y: auto; padding: .2rem .1rem .6rem; }
.msg { max-width: 78%; padding: .55rem .8rem; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.msg.mine { align-self: flex-end; background: #ff1fe31a; border-color: #ff1fe355; }
.msg.theirs { align-self: flex-start; }
.msg.sys { align-self: center; max-width: 90%; background: transparent; border-style: dashed; color: var(--muted); font-size: .88rem; }
.msg-head { font-size: .75rem; color: var(--muted); margin-bottom: .2rem; }
.msg-body { white-space: pre-wrap; word-break: break-word; }
.msg-file { margin-top: .3rem; font-size: .88rem; }
.chat-form textarea { min-height: 70px; }
.unread-dot { display: inline-block; min-width: 1.2rem; padding: 0 .35rem; border-radius: 999px; background: var(--magenta); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1.2rem; text-align: center; }
.bal-edit { display: inline-block; margin-left: .4rem; position: relative; text-align: left; }
.bal-edit summary { cursor: pointer; color: var(--cyan); list-style: none; }
.bal-edit summary::-webkit-details-marker { display: none; }
.bal-edit form { position: absolute; right: 0; top: 1.6rem; z-index: 6; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .6rem; display: grid; gap: .4rem; width: 220px; box-shadow: 0 10px 30px #000a; }
.bal-edit input, .bal-edit select { padding: .4rem .5rem; }

/* compact options page */
.vstrip .big { font-size: 1.15rem; }
.vstrip details.more { margin-top: .6rem; }
.vstrip details.more summary { cursor: pointer; }
.tiers { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tier-box { padding: .6rem .8rem; gap: .1rem; }
.tier-price { font-size: 1.15rem; }
.optsearch { margin: .8rem 0 .2rem; max-width: 340px; }
.optcat h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .9rem 0 .4rem; }
.opts { display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.opts .opt { align-items: center; gap: .5rem; padding: .45rem .65rem; margin: 0; font-size: .9rem; }
.opts .opt input { margin: 0; transform: none; }
.opts .opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel2)); }
.opt .bolt, .tier .bolt { font-size: .85rem; }
.opts .opt-extra { font-size: .82rem; }

/* instant (green) vs manual (orange) options */
.opt.auto, .tier.auto .tier-box { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--panel2)); }
.opt.manual, .tier.manual .tier-box { border-color: color-mix(in srgb, #ff8a1f 55%, transparent); background: color-mix(in srgb, #ff8a1f 7%, var(--panel2)); }
.opt .kind, .tier .kind { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .1rem .45rem; border-radius: 999px; white-space: nowrap; }
.opt .kind { margin-left: auto; }
.opt .opt-extra { margin-left: .4rem; }
.tier .kind { align-self: flex-start; margin-top: .25rem; }
.opt.auto .kind, .tier.auto .kind { color: var(--ok); background: color-mix(in srgb, var(--ok) 18%, transparent); }
.opt.manual .kind, .tier.manual .kind { color: #ff8a1f; background: color-mix(in srgb, #ff8a1f 18%, transparent); }
.opts .opt.auto:has(input:checked) { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok) inset; background: color-mix(in srgb, var(--ok) 20%, var(--panel2)); }
.opts .opt.manual:has(input:checked) { border-color: #ff8a1f; box-shadow: 0 0 0 1px #ff8a1f inset; background: color-mix(in srgb, #ff8a1f 18%, var(--panel2)); }
.opt.auto input { accent-color: var(--ok); } .opt.manual input { accent-color: #ff8a1f; }
.legend { color: var(--muted); }
.kdot { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin: 0 .3rem 0 .8rem; vertical-align: -1px; }
.kdot.auto { background: var(--ok); } .kdot.manual { background: #ff8a1f; }

/* ---- customer flow ---- */
.upflow { max-width: 680px; margin: 0 auto; }
.drop { display: block; position: relative; border: 2px dashed var(--line); border-radius: 14px; background: var(--panel);
  padding: 2.6rem 1.5rem; text-align: center; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; margin: 0; }
.drop:hover, .drop.drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.drop.drag { transform: scale(1.01); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-empty { display: flex; flex-direction: column; gap: .3rem; align-items: center; pointer-events: none; }
.drop-empty strong { font-size: 1.15rem; }
.drop-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); margin-bottom: .4rem; }
.drop-icon.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); margin: 0; }
.drop.has { padding: 1.1rem 1.3rem; border-style: solid; text-align: left; }
.drop-file { display: flex; gap: 1rem; align-items: center; }
.drop-file > div:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.drop-file .btn { position: relative; z-index: 1; pointer-events: none; }
.found { margin-top: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem;
  animation: c4in .25s ease-out; }
.found-row { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; flex-wrap: wrap; }
.found-row > .muted:first-child { width: 80px; }
.found-row select { flex: 1; max-width: 360px; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--cyan); }
.unit-pick { display: flex; gap: .4rem; }
.unit-pick .btn.on { border-color: var(--accent); color: var(--accent); }
.need { color: var(--warn); margin: .4rem 0 0; }
.center { text-align: center; }
#go:disabled { opacity: .45; cursor: not-allowed; }
@keyframes c4in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.c4-loader { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: #07070acc; backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s; }
.c4-loader.on { opacity: 1; }
.c4-panel { width: min(420px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 2rem 1.8rem 1.6rem;
  text-align: center; box-shadow: 0 20px 60px #000a; transform: translateY(8px); transition: transform .3s; }
.c4-loader.on .c4-panel { transform: none; }
.c4-panel h2 { margin: 1rem 0 .2rem; }
.c4-sub { min-height: 1.2em; overflow-wrap: anywhere; }
.c4-spin { width: 58px; height: 58px; margin: 0 auto; border-radius: 50%; position: relative;
  background: conic-gradient(var(--accent), var(--cyan), var(--yellow), var(--accent)); animation: c4rot 1.1s linear infinite; }
.c4-spin span { position: absolute; inset: 5px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-size: 1.5rem; }
.c4-loader.ok .c4-spin { animation: none; background: var(--ok); }
.c4-loader.ok .c4-spin span::after { content: "✓"; color: var(--ok); }
.c4-loader.bad .c4-spin { animation: none; background: var(--bad); }
.c4-loader.bad .c4-spin span::after { content: "!"; color: var(--bad); font-weight: 800; }
@keyframes c4rot { to { transform: rotate(360deg); } }
.c4-steps { list-style: none; padding: 0; margin: 1.2rem 0 1rem; text-align: left; display: grid; gap: .45rem; font-size: .9rem; }
.c4-steps li { color: var(--muted); opacity: .45; padding-left: 1.6rem; position: relative; transition: opacity .25s, color .25s; }
.c4-steps li::before { content: ""; position: absolute; left: 0; top: .2em; width: .9em; height: .9em; border-radius: 50%; border: 2px solid var(--line); }
.c4-steps li.now { opacity: 1; color: var(--text); }
.c4-steps li.now::before { border-color: var(--accent); border-top-color: transparent; animation: c4rot .8s linear infinite; }
.c4-steps li.done { opacity: 1; color: var(--text); }
.c4-steps li.done::before { border-color: var(--ok); background: var(--ok); }
.c4-loader.bad .c4-steps { display: none; }
.c4-bar { height: 4px; border-radius: 4px; background: var(--panel2); overflow: hidden; }
.c4-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--cyan)); transition: width .3s; }
.c4-err p { margin: 1rem 0; }

.ready { display: flex; gap: 1rem; align-items: center; margin-bottom: .9rem; }
.ready-tick { width: 54px; height: 54px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800;
  background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); position: relative; }
.ready.fresh .ready-tick { animation: c4pop .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes c4pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.ready.waiting .ready-tick { background: color-mix(in srgb, #ff8a1f 16%, transparent); color: #ff8a1f; }
.ready.waiting .pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #ff8a1f; animation: c4pulse 1.8s ease-out infinite; }
@keyframes c4pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.5); opacity: 0; } }
.ready-opts { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.btn.big { padding: .8rem 1.3rem; font-size: 1rem; }
[hidden] { display: none !important; }

/* ---- file check ---- */
.check-page { max-width: 860px; margin: 0 auto; }
.verdict { display: flex; gap: 1.1rem; align-items: center; border-width: 2px; }
.verdict h1 { font-size: 1.6rem; }
.v-icon { width: 58px; height: 58px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; font-weight: 800;
  animation: c4pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.v-stock { border-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.v-stock .v-icon { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.v-modified { border-color: color-mix(in srgb, var(--bad) 60%, transparent); }
.v-modified .v-icon { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.v-unknown .v-icon { background: var(--panel2); color: var(--muted); }
.file-line { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.file-line > div { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.file-line .fname { overflow-wrap: anywhere; font-size: .9rem; }
.sysboxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.sysbox { border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .2rem; border: 2px solid; text-align: center; }
.sysbox strong { font-size: 1.2rem; }
.sysbox span { font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; }
.sysbox em { font-style: normal; font-size: .75rem; opacity: .85; }
.s-on { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--panel2)); color: var(--ok); }
.s-off { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--panel2)); color: var(--bad); }
.s-maybe { border-color: #ff8a1f; background: color-mix(in srgb, #ff8a1f 10%, var(--panel2)); color: #ff8a1f; }
.s-na { border-color: var(--line); background: var(--panel2); color: var(--muted); }
.sysbox strong { color: var(--text); }
.codes-ok { color: var(--ok); font-weight: 700; margin: 0; }
table.codes { width: 100%; }
table.codes td, table.codes th { padding: .4rem .5rem; text-align: left; border-bottom: 1px solid var(--line); }
.check-actions { justify-content: flex-end; gap: .6rem; margin-top: .5rem; }
.print-only { display: none; }
@media print {
  body { background: #fff !important; color: #000 !important; }
  aside, nav, .sidebar, .side, .no-print, .hours-bar, .flash, .ann-banner { display: none !important; }
  main { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .print-only { display: flex !important; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
  .card { background: #fff !important; border: 1px solid #bbb !important; box-shadow: none !important; break-inside: avoid; color: #000; }
  .muted { color: #555 !important; }
  .sysbox { background: #fff !important; }
  .sysbox strong { color: #000 !important; }
  .s-on { color: #0a7a3c !important; border-color: #0a7a3c !important; }
  .s-off { color: #b3261e !important; border-color: #b3261e !important; }
  .v-icon { border: 2px solid currentColor; }
}
@media print {
  .card { padding: .8rem 1rem !important; margin-bottom: .7rem !important; }
  .print-head img { background: #0b0b10; padding: 5px 10px; border-radius: 6px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sysbox, .v-icon, .badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- Stage 3 bookings ---- */
.s3-intro { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.s3-intro p:first-child { flex: 1; min-width: 280px; }
.s3-price { font-size: 1.35rem; font-weight: 800; color: var(--yellow); margin: 0; }
.s3-form h2 { margin: 1.2rem 0 .5rem; font-size: 1.05rem; }
.s3-form h2:first-of-type { margin-top: 0; }
.s3-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .3rem 1rem; }
.s3-f.wide { grid-column: 1 / -1; }
.yesno { display: flex; gap: .4rem 1rem; align-items: center; flex-wrap: wrap; }
.yesno .check { margin: 0; }
.yesno .yes-what { flex: 1; min-width: 180px; }
.badge.s3-requested { background: color-mix(in srgb, #ff8a1f 20%, transparent); color: #ff8a1f; }
.badge.s3-accepted { background: color-mix(in srgb, var(--cyan) 20%, transparent); color: var(--cyan); }
.badge.s3-confirmed, .badge.s3-done { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.badge.s3-declined, .badge.s3-cancelled { background: var(--panel2); color: var(--muted); }

/* ---- logs & photos ---- */
.jf-logs { display: grid; gap: .5rem; margin: .8rem 0; }
.jf-log { display: flex; gap: .8rem; align-items: center; padding: .6rem .8rem; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
.jf-log > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.jf-ic { font-size: 1.3rem; }
.jf-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin: .8rem 0; }
.jf-photos figure { margin: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.jf-photos img { display: block; width: 100%; height: 120px; object-fit: cover; }
.jf-photos figcaption { padding: .35rem .5rem; overflow-wrap: anywhere; }
.jf-add { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .8rem; }
.jf-add input[type=text] { flex: 1; min-width: 180px; }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 .2rem; }
/* ---- log viewer ---- */
.lv { display: grid; grid-template-columns: 260px 1fr; gap: 1rem; margin-top: 1rem; align-items: start; }
.lv-side { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; }
.lv-list { overflow: auto; margin-top: .5rem; display: grid; gap: .1rem; }
.lv-ch { display: flex; align-items: center; gap: .45rem; padding: .25rem .35rem; border-radius: 6px; cursor: pointer; font-size: .85rem; margin: 0; }
.lv-ch:hover { background: var(--panel2); }
.lv-ch input { margin: 0; }
.lv-ch i, .lv-readout i, .lv-stats i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--line); flex: none; margin-right: .3rem; }
.lv-main canvas { width: 100%; display: block; cursor: crosshair; user-select: none; }
.lv-readout { min-height: 1.6rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-bottom: .4rem; }
.lv-readout span { display: inline-flex; align-items: center; }
.lv-stats { width: 100%; margin-top: .8rem; }
.lv-stats td, .lv-stats th { padding: .3rem .5rem; text-align: right; }
.lv-stats td:first-child, .lv-stats th:first-child { text-align: left; }
@media (max-width: 800px) { .lv { grid-template-columns: 1fr; } .lv-side { position: static; max-height: 260px; } }

.lk-frame { margin-top: 1rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.lk-frame iframe { display: block; width: 100%; height: calc(100vh - 170px); min-height: 520px; border: 0; }

/* ---- fitting notes ---- */
.fit-card { border-color: color-mix(in srgb, #ff8a1f 60%, transparent); background: color-mix(in srgb, #ff8a1f 6%, var(--panel)); }
.fit-card h2 { color: #ff8a1f; }
.fit-note + .fit-note { border-top: 1px solid var(--line); margin-top: .9rem; padding-top: .9rem; }
.fit-note h3 { margin: 0 0 .3rem; }
.fit-body { white-space: pre-line; }
.fit-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem; margin-top: .7rem; }
.fit-photos figure { margin: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.fit-photos img { display: block; width: 100%; height: 140px; object-fit: cover; }
.fit-photos figcaption { padding: .35rem .5rem; }
.fit-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .1rem .8rem; margin-bottom: .6rem; }
.fit-opts .check { margin: 0; }
.fit-row { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.fit-row.off { opacity: .55; }

/* WinOLS review list: how sure a solution is */
.mk { display:inline-block; padding:.25rem .6rem; border-radius:999px; font-weight:700; font-size:.8rem; white-space:nowrap; }
.mk-exact { background:#123d22; color:#4ade80; border:1px solid #22c55e; }
.mk-imported { background:#10304a; color:#7cc4ff; border:1px solid #3b82f6; }
.mk-close { background:#4a2a08; color:#ffb547; border:1px solid #f59e0b; }
.mk-bot { background:#2a2a33; color:#cfcfda; border:1px solid #55556a; }

/* nothing spills out of its box: long file names, codes and links wrap instead */
.grid > *, .row > *, .card { min-width: 0; }
.card { overflow-wrap: anywhere; }
.btn { max-width: 100%; }
.btn.big { display: inline-flex; flex-direction: column; align-items: flex-start; white-space: normal; text-align: left; }
.btn .fname { display: block; font-size: .8rem; font-weight: 500; opacity: .85; overflow-wrap: anywhere; margin-top: .15rem; }
.mono, td, dd { overflow-wrap: anywhere; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ECU coverage */
.cov-sum { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:.8rem; margin-bottom:1.1rem; }
.cov-box { display:block; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:.8rem 1rem; color:var(--text); }
.cov-box:hover { text-decoration:none; border-color:var(--muted); }
.cov-box.on { border-color:var(--accent); }
.cov-box strong { display:block; font-size:1.6rem; }
.cov-box span { display:block; font-size:.78rem; color:var(--muted); }
.cv { display:inline-block; padding:.15rem .55rem; border-radius:999px; font-weight:700; font-size:.78rem; white-space:nowrap; }
.cv-covered, .cov-box.cv-covered strong { color:#4ade80; } .cv-covered { background:#123d22; }
.cv-stock, .cov-box.cv-stock strong { color:#7cc4ff; } .cv-stock { background:#10304a; }
.cv-asked, .cov-box.cv-asked strong { color:#ffb547; } .cv-asked { background:#4a2a08; }
.cv-missing { background:#2a2a33; color:#a0a0b4; }
/* second file on the upload page (gearbox / DCU with the engine read) */
.second { border-top: 1px solid var(--line); margin-top: .9rem; padding-top: .9rem; }
.drop.small-drop { padding: 1rem; margin: .5rem 0; }
.drop.small-drop .drop-empty { flex-direction: row; justify-content: center; flex-wrap: wrap; }
.drop.small-drop .drop-file { display: flex; gap: .8rem; align-items: center; }
.drop.small-drop .drop-file[hidden] { display: none; }
/* customer dashboard: files + news side by side, subscription meter, month trend */
.dash-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 1.25rem; margin-top: 1.25rem; align-items: start; }
.dash-cols > .card { margin: 0; }
@media (max-width: 1000px) { .dash-cols { grid-template-columns: 1fr; } }
.meter { height: 8px; border-radius: 6px; background: var(--panel2); overflow: hidden; margin: .5rem 0 .35rem; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--magenta), var(--cyan)); border-radius: 6px; }
.trend { font-size: .9rem; vertical-align: middle; }
.trend.up { color: var(--ok); } .trend.down { color: var(--muted); }
.news .lib { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .4rem 0 1rem; }
.news .lib div { background: var(--panel2); border-radius: 8px; padding: .55rem .6rem; text-align: center; }
.news .lib b { display: block; font-size: 1.15rem; }
.news .lib span { font-size: .75rem; color: var(--muted); }
.news-item { border-top: 1px solid var(--line); padding: .65rem 0; }
.news-item strong { display: block; margin: .15rem 0; }
.dash-main, .dash-side { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.dash-main > .card, .dash-side > .card { margin: 0; }
.news .lib { grid-template-columns: repeat(2, 1fr); }
.dl-ready { border-left: 3px solid var(--ok); }
.ready-row { padding: .45rem 0; border-top: 1px solid var(--line); gap: .6rem; }
.ready-row:first-of-type { border-top: 0; }
.nudge { border-left: 3px solid var(--warn); gap: 1rem; margin-bottom: 1.25rem; }
.nudge form { margin: 0; }
/* training */
.t-grid { margin-top: .6rem; grid-template-columns: repeat(auto-fill, minmax(280px, 340px)); }
.t-card { padding: 0; overflow: hidden; display: block; color: inherit; text-decoration: none; }
.t-card:hover { border-color: var(--magenta); }
.t-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--panel2); }
.t-cover-blank { display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 800; color: var(--magenta); }
.t-body { padding: .9rem 1rem 1rem; }
.t-body strong { display: block; margin: .1rem 0 .2rem; }
.t-course { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .t-course { grid-template-columns: 1fr; } }
.t-main > .card, .t-side > .card { margin-top: 0; margin-bottom: 1.25rem; }
.t-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 1rem; display: block; }
.t-video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.t-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.t-module { padding: .6rem 0; border-top: 1px solid var(--line); }
.t-module:first-of-type { border-top: 0; }
.t-lesson { padding: .35rem 0 .35rem .2rem; gap: .5rem; }
.t-lesson.on { background: var(--panel2); border-radius: 6px; padding-left: .5rem; }
.t-tick { color: var(--ok); font-weight: 700; display: inline-block; width: 1.2rem; }
.t-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; border: 2px solid var(--muted); margin: 0 .55rem 0 .15rem; vertical-align: middle; }
.t-price { font-size: 2rem; font-weight: 800; }
.t-buy { position: sticky; top: 1rem; }
.lead { font-size: 1.1rem; }
/* 1-1 sessions */
.s-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
.s-day { margin: 0; }
.s-date { display: flex; flex-direction: column; margin-bottom: .6rem; }
.s-date span { color: var(--muted); font-size: .85rem; }
.s-slot { margin-top: .4rem; }
.s-row { border-top: 1px solid var(--line); padding: .7rem 0; }
.s-row:first-of-type { border-top: 0; }
.s-row.booked { border-left: 3px solid var(--ok); padding-left: .7rem; }
.s-promo { color: inherit; text-decoration: none; gap: 1rem; border-left: 3px solid var(--cyan); margin-bottom: 1.25rem; }
.s-promo:hover { border-color: var(--magenta); }

/* All files: search + grouped orders */
.files-search { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .9rem 1rem; }
.files-search input[type=search] { flex: 1; min-width: 16rem; margin: 0; }
.files-search .chips { display: flex; gap: .4rem; align-items: center; width: 100%; flex-wrap: wrap; }
.files-search .chip { text-decoration: none; color: var(--muted); }
.files-search .chip.on { color: var(--text); border-color: var(--accent); }
.files-table tbody.fgroup { border-top: 2px solid var(--line); }
.files-table tbody.fgroup tr td { border-bottom-color: transparent; }
.files-table tbody.fgroup:hover { background: var(--panel2); }
.files-table td.fg-reg { vertical-align: top; }
.badge.b-unit { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.files-table td.nowrap, .files-table td.num, .files-table .btn { white-space: nowrap; }
.files-table td.hide-sm.muted { font-size: .85rem; max-width: 11rem; }
.files-table td.mono { font-size: .8rem; }
.files-search .chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Support: signed in as a customer */
.support-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: #3a2a05; border: 1px solid #f9d10f; color: #ffe27a; border-radius: 10px; padding: .6rem .9rem; margin-bottom: 1rem; }
.support-bar .btn { background: #f9d10f; color: #111; border-color: #f9d10f; }
.support-cell { white-space: nowrap; }
.support-cell form { display: inline-block; margin: 0 .3rem .2rem 0; }
.support-cell .bal-edit form { display: block; }

/* Customer file page: status + chat big on the left, the rest in smaller boxes on the right */
.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 1rem; align-items: start; }
.job-main, .job-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.job-main > .card, .job-side > .card, .job-side > form.card { margin: 0; }
.job-main #chat .chat-thread { max-height: 620px; min-height: 220px; }
.job-main #chat h2 { font-size: 1.35rem; }
.job-side .card { padding: .9rem 1rem; font-size: .92rem; }
.job-side .card h2 { font-size: 1.02rem; margin: 0 0 .5rem; }
.job-side .kv { grid-template-columns: auto 1fr; font-size: .88rem; }
.job-side .kv dd { word-break: break-word; }
.job-side .fit-card .fit-photos img { max-height: 90px; }
.job-side .stockback form { flex-wrap: wrap; }
@media (max-width: 1000px) { .job-layout { grid-template-columns: 1fr; } }
/* option chips with "what's needed on the car" */
.ready-opts .chip.has-tip { position: relative; cursor: help; }
.ready-opts .chip .tip-i { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%;
  font-size: .68rem; font-weight: 700; background: #ffffff22; margin-left: .25rem; font-style: italic; }
.ready-opts .opt-tip { display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: max-content;
  max-width: 340px; background: #1d1d22; color: var(--text); border: 1px solid var(--accent); border-radius: 10px;
  padding: .7rem .8rem; box-shadow: 0 10px 30px #000a; font-weight: 400; font-size: .86rem; line-height: 1.4; white-space: normal; text-align: left; }
.ready-opts .opt-tip::before { content: ""; position: absolute; top: -6px; left: 18px; width: 10px; height: 10px;
  background: #1d1d22; border-left: 1px solid var(--accent); border-top: 1px solid var(--accent); transform: rotate(45deg); }
.ready-opts .opt-tip strong { display: block; margin-bottom: .3rem; color: var(--cyan, #5ee); }
.ready-opts .opt-tip .tip-line { display: block; margin-top: .25rem; }
.ready-opts .chip.has-tip:hover .opt-tip, .ready-opts .chip.has-tip:focus .opt-tip, .ready-opts .chip.has-tip:focus-within .opt-tip { display: block; }
.ready-opts .opt-tip .tip-photos { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .4rem; }
.ready-opts .opt-tip .tip-photos img { height: 70px; border-radius: 6px; border: 1px solid var(--line); }
.ready-opts .opt-tip { max-width: 380px; }

/* add more + remove fault codes: two equal boxes side by side, under the download */
.job-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; align-items: stretch; }
.job-pair:empty { display: none; }
.job-pair > form.card { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.job-pair > form.card h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.job-pair > form.card > :last-child { margin-top: auto !important; }
.job-pair #addons > div.row.spread:last-of-type { margin-top: auto !important; padding-top: .8rem; }
.job-pair #addons label.opt-row, .job-pair #addons .opt-grid { min-width: 0; }
.job-pair #addons details > *:not(summary) { max-height: 340px; overflow-y: auto; }
.job-side .card, .job-main > .card, .job-pair > .card { overflow-wrap: anywhere; }

/* file versions: v1 > v2 > v3 */
.badge.b-ver { font-size: .72rem; vertical-align: middle; margin-left: .4rem; background: #3a2a05; color: #ffe27a; border: 1px solid #f9d10f66; }
.versions { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin: -.2rem 0 .7rem; }
.versions .muted { margin-right: .2rem; }
.versions .ver { padding: .2rem .6rem; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: .85rem; }
.versions .ver:hover { border-color: var(--accent); }
.versions .ver.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.versions .ver.on small { font-weight: 400; opacity: .85; }
.versions .ver.gone { opacity: .45; text-decoration: line-through; }
.versions .ver-sep { color: var(--muted); }

/* Customers tabs + subscriptions */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin: 0 0 1rem; }
.tabs .tab { padding: .55rem 1rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs .tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs .tab:hover { color: var(--text); }
.subs-table td { vertical-align: top; }
.subs-table .usage { font-size: .9rem; }
.subs-table .usage-bar { height: 6px; border-radius: 4px; background: var(--panel2); margin: .3rem 0 .15rem; width: 140px; overflow: hidden; }
.subs-table .usage-bar span { display: block; height: 100%; background: var(--accent); }
.sub-menu { position: relative; display: inline-block; }
.sub-menu > summary { list-style: none; cursor: pointer; }
.sub-menu > summary::-webkit-details-marker { display: none; }
.sub-menu .sub-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 270px; background: #1d1d22;
  border: 1px solid var(--line); border-radius: 10px; padding: .7rem; box-shadow: 0 10px 30px #000a; white-space: normal; }
.sub-menu .sub-pop form { margin: 0 0 .35rem; }
.sub-menu .sub-pop hr { border: 0; border-top: 1px solid var(--line); margin: .55rem 0; }
.del-acct > summary { color: var(--bad); }
.del-acct form { min-width: 260px; }

/* day picker (Stage 3) */
.daypicker { border: 1px solid var(--line); border-radius: 10px; padding: .6rem; max-width: 330px; background: var(--panel2); }
.daypicker .dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.daypicker .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.daypicker .dp-wd { text-align: center; font-size: .72rem; color: var(--muted); padding: .15rem 0; }
.daypicker .dp-day { padding: .4rem 0; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--text); cursor: pointer; font: inherit; font-size: .88rem; }
.daypicker .dp-day:hover:not(:disabled) { border-color: var(--accent); }
.daypicker .dp-day.today { border-color: var(--line); }
.daypicker .dp-day.on { background: var(--accent); color: #fff; }
.daypicker .dp-day:disabled { color: #ffffff33; cursor: not-allowed; }
.daypicker .dp-day.blocked, .daypicker .dp-sw.blocked { background: repeating-linear-gradient(45deg, #e5484d22 0 4px, transparent 4px 8px); color: #e5484d88; text-decoration: line-through; }
.daypicker .dp-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; }
.daypicker .dp-time { width: auto; margin: 0; }
.daypicker .dp-key { margin: .4rem 0 0; display: flex; align-items: center; gap: .35rem; }
.daypicker .dp-sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.s3-sessions td { vertical-align: top; }
.s3-approve { display: grid; gap: .35rem; min-width: 220px; }
.s3-approve input { margin: 0; }
.blocked-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.blocked-day { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .3rem .25rem .7rem; border-radius: 999px;
  border: 1px solid #e5484d55; background: #e5484d14; font-size: .88rem; margin: 0; }
.blocked-day .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 0 .35rem; }
.blocked-day .x:hover { color: var(--text); }

/* support */
.ticket-list { display: flex; flex-direction: column; gap: .5rem; }
.ticket-row { display: block; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; }
.ticket-row:hover { border-color: var(--accent); text-decoration: none; }
.ticket-row.unread { border-color: var(--accent); background: #ff1fd810; }
.ticket-row .new { color: var(--accent); }
.ticket-last { margin-top: .25rem; }
.badge.st-open { background: #3a2a05; color: #ffe27a; }
.badge.st-answered { background: #0f3a2a; color: #6ee7b7; }
.badge.st-closed { background: var(--panel2); color: var(--muted); }
tr.unread-row td { background: #ff1fd80c; }

/* sign-in pages: binary rain behind */
#matrix-bg { position: fixed; inset: 0; z-index: 0; opacity: .55; pointer-events: none; }
main.over-matrix { position: relative; z-index: 1; }
main.over-matrix .card { background: rgba(20, 20, 24, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 20px 60px #000c; }

/* map switching */
.ms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .2rem 1rem; }
.ms-form h2 { margin-top: 1.2rem; }
.ms-checks { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.ms-locs-wrap { overflow-x: auto; }
.ms-locs input, .ms-locs select { margin: 0; min-width: 0; }
.ms-locs td { padding: .25rem .3rem; }
.ms-locs .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.badge.ms-new { background: #3a2a05; color: #ffe27a; }
.badge.ms-looking, .badge.ms-in_progress { background: #0d2c3a; color: #7dd3fc; }
.badge.ms-quoted { background: #2a1a3a; color: #d8b4fe; }
.badge.ms-ready { background: #0f3a2a; color: #6ee7b7; }
.badge.ms-declined { background: var(--panel2); color: var(--muted); }

/* ---- CAN tools (Tactrix in the browser) */
.can-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 1rem; margin-top: .8rem; }
@media (max-width: 900px) { .can-split { grid-template-columns: 1fr; } }
.can-tbl { max-height: 560px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.can-tbl-sm { max-height: 260px; margin-top: .8rem; }
.can-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.can-table th { position: sticky; top: 0; background: var(--panel2); text-align: left; padding: .35rem .5rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.can-table td { padding: .25rem .5rem; border-top: 1px solid var(--line); white-space: nowrap; }
.can-table td.r, .can-table th.r { text-align: right; }
.can-table tr[data-k] { cursor: pointer; }
.can-table tr[data-k]:hover td { background: var(--panel2); }
.can-table tr.on td { background: color-mix(in srgb, var(--accent2) 14%, transparent); }
.can-table .b { display: inline-block; width: 1.9em; text-align: center; border-radius: 3px; transition: background .4s; }
.can-table .b.moved { color: var(--accent2); }
.can-table .b.warm { background: color-mix(in srgb, var(--yellow) 22%, transparent); }
.can-table .b.hot { background: color-mix(in srgb, var(--accent) 55%, transparent); color: #fff; }
.can-side { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.can-chart { width: 100%; height: 220px; background: var(--panel2); border-radius: 8px; }
.can-send { width: 100%; border-collapse: collapse; margin: .6rem 0; }
.can-send th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; padding: .2rem .3rem; }
.can-send td { padding: .2rem .3rem; }
.can-arm { font-weight: 700; color: var(--warn); font-size: .9rem; }
.can-out { background: var(--panel2); border-radius: 8px; padding: .6rem .8rem; margin-top: .7rem; min-height: 2.2rem; white-space: pre-wrap; }
.can-console { background: var(--panel2); border-radius: 8px; padding: .6rem .8rem; margin-top: .7rem; height: 420px; overflow: auto; white-space: pre-wrap; font-size: .78rem; }
.can-pids { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.can-vals { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin-top: .8rem; }
.can-vals > div { background: var(--panel2); border-radius: 8px; padding: .5rem .7rem; display: flex; flex-direction: column; }
.can-vals b { font-size: 1.4rem; }
.can-req { display: flex; gap: .8rem; align-items: center; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.can-req > div { flex: 1; }
.can-req-form { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; }
.can-ask { border-color: var(--accent2); }
.badge.can-waiting { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.badge.can-done { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.badge.can-cancelled { background: #9aa3b222; color: var(--muted); }
.can-rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .can-rec-grid { grid-template-columns: 1fr; } }
.can-steps { white-space: pre-wrap; background: var(--panel2); border-radius: 8px; padding: .6rem .8rem; }
.can-steps-list { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.can-progress { height: 10px; background: var(--panel2); border-radius: 99px; overflow: hidden; margin: .6rem 0; }
.can-progress > div { height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.sig-dlg { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(720px, 94vw); }
.sig-dlg::backdrop { background: #000a; }
.sig-form { display: flex; flex-direction: column; gap: .55rem; padding: 1.2rem 1.4rem; }
.sig-form .row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.sig-form label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: .2rem; flex: 1; min-width: 110px; }
.sig-form label.check { flex-direction: row; align-items: center; flex: 0 0 auto; min-width: 0; }
.sig-err { color: var(--bad); min-height: 1em; margin: 0; }
.finder-h { font-size: 1rem; margin: 1rem 0 .4rem; }
.can-table.finder td { white-space: normal; }
.kv { border-collapse: collapse; font-size: .88rem; }
.kv th { text-align: left; color: var(--muted); font-weight: 500; padding: .2rem 1rem .2rem 0; }
.kv td { padding: .2rem 0; }
.lib-list { margin-top: .8rem; overflow-x: auto; }
.lib-pick { display: flex; flex-direction: column; gap: .2rem; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; }
.nowrap { white-space: nowrap; }
.btn.big { font-size: 1.1rem; padding: .8rem 1.6rem; }
.can-before li { margin-bottom: .35rem; }
.can-stages { list-style: none; padding: 0; margin: 1rem 0 .5rem; display: flex; flex-direction: column; gap: .35rem; }
.can-stages li { color: var(--muted); padding-left: 1.6rem; position: relative; }
.can-stages li::before { content: "○"; position: absolute; left: .2rem; }
.can-stages li.now { color: var(--text); font-weight: 600; }
.can-stages li.now::before { content: "●"; color: var(--accent); }
.can-stages li.done { color: var(--ok); }
.can-stages li.done::before { content: "✔"; }
.dl-top { display: flex; gap: 1.5rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.dl-left, .dl-right { display: flex; flex-direction: column; gap: .5rem; min-width: 260px; }
.dl-right { align-items: flex-end; }
.btn.rec.on { background: var(--bad); border-color: var(--bad); }
.dl-save { display: flex; gap: .5rem; flex-wrap: wrap; }
.dl-save input { min-width: 240px; }
.dl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; }
@media (max-width: 1000px) { .dl-grid { grid-template-columns: 1fr; } }
.dl-canvas { width: 100%; height: 300px; display: block; }
.dl-legend { max-height: 80vh; overflow: auto; }
.lg-item { display: grid; grid-template-columns: auto 10px 1fr auto auto; gap: .45rem; align-items: center; padding: .2rem 0; font-size: .88rem; cursor: pointer; }
.lg-sw { width: 10px; height: 10px; border-radius: 3px; }
.lg-v { font-variant-numeric: tabular-nums; }
.lg-group { margin: .7rem 0 .2rem; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lg-link { background: none; border: 0; color: var(--accent2); cursor: pointer; padding: 0; font: inherit; text-transform: none; letter-spacing: 0; }
.dl-card { display: flex; gap: .8rem 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.dl-card-text { flex: 1 1 260px; min-width: 0; }
.dl-card-btns { display: flex; gap: .5rem; flex-wrap: wrap; flex: 0 1 auto; max-width: 100%; min-width: 0; }
.dl-card-btns .btn { white-space: nowrap; }
.svc-fn { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.svc-fn h2 { margin: 0 0 .3rem; }
.svc-pre { background: color-mix(in srgb, var(--warn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius: 8px; padding: .6rem .8rem; }
.svc-pre p { margin: .3rem 0 0; }
.remote-box { display: flex; flex-direction: column; gap: .6rem; }
.remote-status { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; }
.remote-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); display: inline-block; flex: 0 0 auto; }
.remote-dot.wait { background: var(--warn); animation: rdot 1.6s infinite; }
.remote-dot.on { background: var(--ok); }
.remote-dot.busy { background: var(--accent2); animation: rdot .6s infinite; }
@keyframes rdot { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .remote-dot.wait, .remote-dot.busy { animation: none; } }
.remote-head { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.remote-banner { display: flex; gap: .6rem; align-items: center; padding: .5rem .7rem; margin: .5rem 0; border-radius: 8px; background: color-mix(in srgb, var(--ok) 14%, transparent); }
.remote-tx { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; padding: .6rem .8rem; border-radius: 8px;
  background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; filter: saturate(.6); }
.dtc-table tr.dtc-mod td { background: var(--panel2); padding-top: .5rem; }
.dtc-table td { white-space: normal; }
.dtc-legend { list-style: none; margin: .2rem 0 .7rem; padding: .5rem .7rem; display: grid; gap: .35rem; background: var(--panel2); border-radius: 8px; }
.dtc-legend li { display: grid; grid-template-columns: 5.2rem 1fr; gap: .5rem; align-items: baseline; }
.dtc-legend .badge { justify-self: start; }
.lv-pull { display: block; width: 100%; text-align: left; background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: .35rem .6rem; margin-top: .35rem; cursor: pointer; font: inherit; font-size: .85rem; }
.lv-pull:hover { border-color: var(--accent2); }
.lv-compare { display: flex; flex-direction: column; gap: .3rem; margin-top: .9rem; }
.cmp-pick { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.cmp-pick select { margin-top: .3rem; min-width: 240px; }
.cmp-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }
.cmp-sw.a { background: #ff1fe3; } .cmp-sw.b { background: #3ff3ff; }
.cmp-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; }
@media (max-width: 900px) { .cmp-grid { grid-template-columns: 1fr; } }
.cmp-chs { display: flex; flex-direction: column; gap: .25rem; margin-top: .4rem; max-height: 70vh; overflow: auto; }
.cmp-canvas { width: 100%; height: 300px; display: block; }
.star { background: none; border: 0; cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--muted); padding: 0 .2rem; }
.star.on { color: #f5b301; }
.can-table .en { cursor: text; }

/* ---- admin job page: the work up top, the rest folded ---- */
.aj-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.aj-head h1 { margin: 0; }
.aj-sub { margin: .3rem 0 0; color: var(--muted); }
.aj-sub strong { color: var(--text); font-weight: 600; }

/* progress stepper */
.aj-steps { list-style: none; display: flex; margin: 0 0 1.25rem; padding: 0; counter-reset: step; }
.aj-steps li { flex: 1; position: relative; text-align: center; color: var(--muted); font-size: .8rem; }
.aj-steps li .dot { display: flex; width: 26px; height: 26px; margin: 0 auto .35rem; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--panel2); border: 1px solid var(--line); font-size: .78rem; font-weight: 700; position: relative; z-index: 1; }
.aj-steps li::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.aj-steps li:first-child::before { display: none; }
.aj-steps li.done { color: var(--text); }
.aj-steps li.done .dot { background: var(--ok); border-color: var(--ok); color: #06240f; }
.aj-steps li.done::before { background: var(--ok); }
.aj-steps li.active { color: var(--accent2); }
.aj-steps li.active .dot { background: var(--accent2); border-color: var(--accent2); color: #042a2e; box-shadow: 0 0 0 4px #3ff3ff22; }
.aj-steps li.bad { color: var(--bad); }
.aj-steps li.bad .dot { background: var(--bad); border-color: var(--bad); color: #fff; }
.aj-steps li.bad::before { background: var(--bad); }

/* two columns: work on the left, vehicle + facts on the right */
.aj-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.aj-main { min-width: 0; }
.aj-aside { position: sticky; top: 1rem; }
.aj-aside .card { margin-bottom: 1rem; }

/* vehicle card */
.veh-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 .6rem; }
.veh-img { width: 100%; height: 130px; object-fit: contain; margin-bottom: .5rem; }
.veh-name { font-size: 1.2rem; font-weight: 700; }
.veh-sub { color: var(--accent2); font-size: .9rem; margin-top: .1rem; }
.veh-gains { margin-top: .9rem; display: flex; flex-direction: column; gap: .5rem; }
.veh-gains > div { display: flex; align-items: baseline; gap: .5rem; }
.veh-gains .l { width: 4.2rem; flex: 0 0 4.2rem; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.veh-gains .v { font-weight: 600; }
.veh-gains .v b { color: var(--accent2); }
.veh-gains .g { margin-left: auto; color: var(--ok); font-weight: 700; font-size: .85rem; }
.veh-gfoot { margin: .3rem 0 0; }
.veh-facts .kv { grid-template-columns: auto 1fr; gap: .45rem .8rem; }
.aj-mini { white-space: normal; }
.aj-mini .badge { padding: .1rem .5rem; font-size: .72rem; }
.aj-mini .mono { display: none; }

@media (max-width: 900px) {
  .aj-cols { grid-template-columns: 1fr; }
  .aj-aside { position: static; }
  .aj-steps li .lbl { font-size: .72rem; }
}

.aj-work { border-color: var(--line); border-left: 3px solid var(--accent); }
.aj-work.aj-done { border-left-color: var(--ok); }
.aj-top { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .2rem; }
.aj-state { font-weight: 700; font-size: 1.05rem; }
.aj-wants { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
.aj-opt { background: #ffffff10; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .85rem; font-weight: 600; font-size: .95rem; }
.aj-opt.manual { border-color: var(--warn); color: var(--warn); }
.aj-note { margin-top: .8rem; padding: .7rem .9rem; border-radius: 10px; background: #3fb95014; border: 1px solid #3fb95055; white-space: pre-wrap; }
.aj-why { margin-top: .8rem; }

/* download + side links */
.aj-deliver-row { display: flex; gap: 1rem; align-items: stretch; flex-wrap: wrap; margin-top: 1rem; }
.aj-dl { flex: 1; min-width: 300px; display: flex; align-items: center; gap: .9rem; text-decoration: none;
  background: linear-gradient(180deg, #1d1d24, #17171d); border: 1px solid var(--accent); border-radius: 12px; padding: 1rem 1.15rem; color: var(--text); }
.aj-work.aj-done .aj-dl { border-color: var(--accent); }
.aj-dl:hover { border-color: var(--accent2); background: #20202a; text-decoration: none; }
.aj-dl .ic { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 10px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.aj-dl-t { display: flex; flex-direction: column; min-width: 0; }
.aj-dl-t .t { font-weight: 700; font-size: 1.05rem; }
.aj-dl-t .f { color: var(--muted); font-size: .82rem; word-break: break-all; }
.aj-side { display: flex; flex-direction: column; gap: .5rem; justify-content: center; min-width: 160px; }
.aj-side a { display: block; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 9px; text-align: center; color: var(--text); }
.aj-side a:hover { border-color: var(--muted); text-decoration: none; }
.aj-alt { margin: .5rem 0 0; color: var(--muted); }
.aj-deliver { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.aj-deliver h2 { margin-top: 0; }
.aj-file { display: block; border: 2px dashed var(--line); border-radius: 12px; padding: 1.1rem; text-align: center; cursor: pointer; margin-bottom: .6rem; }
.aj-file:hover, .aj-file:focus-within { border-color: var(--accent); }
.aj-file input { display: block; width: 100%; margin: 0 auto .3rem; }
.aj-file span { color: var(--muted); font-size: .9rem; }
.btn.big.aj-go { width: 100%; justify-content: center; align-items: center; margin-top: .8rem; padding: 1rem; font-size: 1.15rem; }
details.fold > summary, .fold-bar { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
details.fold > summary::-webkit-details-marker, .fold-bar::-webkit-details-marker { display: none; }
details.fold > summary h2 { margin: 0; font-size: 1.05rem; }
details.fold > summary::after, .fold-bar::after { content: '▾'; color: var(--muted); transition: transform .15s; margin-left: auto; }
details[open].fold > summary::after, details[open] > .fold-bar::after { transform: rotate(180deg); }
.fold-wrap { margin-bottom: 1rem; }
.fold-bar { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1.25rem; font-weight: 700; justify-content: flex-start; }
details[open] > .fold-bar { margin-bottom: .6rem; }
.fold-wrap > .card:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .aj-head { flex-direction: column-reverse; gap: .4rem; }
  details.fold > summary > .muted, .fold-bar > .muted { display: none; }
  .aj-deliver-row { flex-direction: column; }
  .aj-dl { min-width: 0; }
  .aj-side { min-width: 0; }
  .aj-wants { margin-left: 0; width: 100%; }
}

/* ---- vehicle pre-check ---- */
.pc-step { display: flex; gap: .8rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.pc-step:last-of-type { border-bottom: 0; }
.pc-step b { display: block; }
.pc-step .pc-st { display: block; margin-top: .1rem; }
.pc-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; margin-top: .15rem; }
.pc-step.on .pc-dot { border-color: var(--accent); box-shadow: 0 0 0 4px #ff1fe322; animation: pcpulse 1.2s infinite; }
.pc-step.done .pc-dot { background: var(--ok); border-color: var(--ok); }
.pc-step.bad .pc-dot { background: var(--bad); border-color: var(--bad); }
@keyframes pcpulse { 50% { box-shadow: 0 0 0 7px #ff1fe311; } }
.pc-ask { padding: .8rem 1rem; border: 1px dashed var(--line); border-radius: 12px; margin-top: .8rem; }
.pc-flag { padding: .55rem .8rem; border-radius: 10px; margin-bottom: .45rem; border: 1px solid var(--line); }
.pc-flag.ok { border-color: #2fbf7166; background: #2fbf7112; }
.pc-flag.check { border-color: #f2b33d66; background: #f2b33d12; }
.pc-flag.warn { border-color: #e5484d88; background: #e5484d14; }
.pc-badge { font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; border: 1px solid var(--line); }
.pc-badge.ok { color: var(--ok); border-color: var(--ok); }
.pc-badge.check { color: var(--warn); border-color: var(--warn); }
.pc-badge.warn { color: var(--bad); border-color: var(--bad); }
@media print {
  .pc-report .lv { display: block; }
  .pc-flag { border: 1px solid #999 !important; background: #fff !important; color: #000; }
}
.pc-brand { display: flex; align-items: center; gap: 1.2rem; background: #fff; color: #111; border-radius: 14px; padding: 1rem 1.3rem; margin-bottom: 1rem; }
.pc-brand > img:first-child { max-height: 72px; max-width: 260px; object-fit: contain; }
.pc-brand-txt { display: flex; flex-direction: column; gap: .1rem; flex: 1; min-width: 0; }
.pc-brand-txt strong { font-size: 1.15rem; }
.pc-brand-txt .muted { color: #666 !important; }
.pc-brand-ours { height: 26px; align-self: flex-end; border-radius: 6px; background: #0b0d10; padding: 4px 8px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.logo-preview { background: #fff; border-radius: 10px; padding: .8rem; display: inline-block; margin-bottom: .4rem; }
.logo-preview img { max-height: 70px; max-width: 260px; display: block; }
@media print { .pc-brand { border: 1px solid #ccc; } .pc-report .card { break-inside: auto !important; } }
.bk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: .8rem 0 1rem; }
.bk-stats > div { display: flex; flex-direction: column; gap: .15rem; background: var(--panel2); border-radius: 8px; padding: .6rem .75rem; }
.bk-stats strong { font-size: 1.05rem; }
.bk-buttons { display: grid; gap: .6rem; margin-bottom: .6rem; }
.bk-buttons .btn { padding: .9rem 1rem; font-size: 1rem; }

/* clickable job rows + row actions */
tr.rowlink { cursor: pointer; }
tr.rowlink:hover td { background: var(--panel2); }
.jobs-table td.job-actions { white-space: nowrap; text-align: right; width: 1%; }
.job-actions form { display: inline; }
.icon-btn { background: transparent; border: 1px solid var(--line); border-radius: 7px; padding: .3rem .5rem; cursor: pointer;
  font-size: .95rem; line-height: 1; color: var(--muted); margin-left: .25rem; }
.icon-btn:hover { border-color: var(--muted); color: var(--text); }
.icon-btn.danger:hover { border-color: var(--bad); color: var(--bad); }
