/* PRO D Auto — shop UI. Dark by default (bays, glare, grease); light theme follows the device. */
:root {
  --bg: #0f1114; --panel: #171a1f; --panel2: #1e2228; --line: #2b3038; --ink: #eef0f3; --muted: #8e98a4;
  --accent: #e3342f; --accent-ink: #fff; --ok: #1f9d55; --warn: #e0a100; --info: #3b82f6; --red: #ff5a52;
  --radius: 14px; --gap: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Inter, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef0f3; --panel: #fff; --panel2: #f5f6f8; --line: #dde1e6; --ink: #14171c; --muted: #5f6873;
    --red: #c9221c; color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
/* what the page scrolls into view (the VIN sheet, a field) stops clear of the sticky top bar and Valerie's button */
html { scroll-padding-top: calc(70px + env(safe-area-inset-top)); scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.4 var(--font); -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.3px; }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
h4 { margin: 12px 0 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .red { color: var(--red); } .okc { color: var(--ok); }
.boot { display: grid; place-items: center; height: calc(100vh / var(--zoom, 1)); font-weight: 900; font-size: 34px; letter-spacing: 2px; }
.boot b, .brand b { color: var(--accent); }

/* nav */
nav.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 900; letter-spacing: 1.5px; font-size: 18px; white-space: nowrap; }
.brand.big { font-size: 40px; text-align: center; margin-bottom: 20px; }
nav .links { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
nav .links a { display: flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; white-space: nowrap; }
nav .links a.on { background: var(--panel2); color: var(--ink); }
nav .ic { font-size: 15px; }
.who { background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 99px; padding: 7px 12px; font: 600 13px var(--font); white-space: nowrap; }
/* iPad and smaller laptops: the seven sections always fit (no hidden scroll): tighter, then words only, then icons only */
@media (min-width: 761px) and (max-width: 1499px) { nav .links a { padding: 8px 8px; gap: 5px; } nav.top { gap: 8px; } }
@media (min-width: 761px) and (max-width: 1439px) { nav .links a .ic { display: none; } nav .links a { padding: 8px 10px; } }
@media (min-width: 761px) and (max-width: 1099px) { nav .newjob .lbl { display: none; } nav .newjob { padding: 8px 12px; } }
@media (min-width: 761px) and (max-width: 1023px) { nav .links a .ic { display: inline-flex; } nav .links a span:not(.ic) { display: none; } nav .links a { padding: 8px; } }
@media (max-width: 760px) {
  nav .links a span:not(.ic) { display: none; }
  nav .newjob { padding: 8px 12px; min-height: 40px; } nav .newjob .lbl { display: none; }
  nav.top { gap: 8px; padding-left: 10px; padding-right: 10px; } nav .links a { padding: 8px; }
  table.lines td:first-child { display: none; }
  .jhead h1 { font-size: 24px; }
  .brand { font-size: 15px; }
}

main { padding: 16px; padding-bottom: 110px; }
.page { max-width: 1280px; margin: 0 auto; }
.page.narrow { max-width: 820px; }
.pagehead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

/* building blocks */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: var(--gap); }
.card.err, .err { color: var(--red); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: var(--gap); }
.grid2 > .card { margin: 0; } .grid2 + .grid2 { margin-top: var(--gap); } .span2 { grid-column: span 2; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.row.wrap { flex-wrap: wrap; justify-content: flex-start; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; align-items: end; }
.row3 > * { min-width: 0; }
@media (max-width: 560px) { .row3 { grid-template-columns: 1fr; } .span2 { grid-column: span 1; } }
input[type=datetime-local], input[type=date], input[type=time] { min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; min-height: 44px; }
.grow { flex: 1; min-width: 0; }
label { min-width: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 10px; }
label.chk { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; font-size: 15px; }
label.chk.block { display: flex; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
input, select, textarea { font: 16px var(--font); color: var(--ink); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; width: 100%; min-width: 0; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 0; border-color: transparent; }
textarea { resize: vertical; }
.search { margin-bottom: 12px; font-size: 17px; padding: 13px 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 14px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--ink); font: 600 15px var(--font); cursor: pointer; white-space: nowrap; min-height: 44px; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--red); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.btn.big { min-height: 56px; font-size: 18px; padding: 14px 22px; }
.icon { background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; width: 40px; height: 40px; font-size: 16px; cursor: pointer; }
.icon:disabled { opacity: .3; }
.linkbtn { background: none; border: 0; color: var(--info); font: inherit; cursor: pointer; padding: 0 4px; }
.seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { background: none; border: 0; color: var(--muted); font: 600 14px var(--font); padding: 8px 12px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--ink); }
.seg.big { display: flex; flex-wrap: wrap; width: 100%; }
.seg.big label { flex: 1; flex-direction: row; align-items: center; gap: 8px; margin: 0; padding: 12px; border-radius: 9px; color: var(--ink); font-size: 15px; min-width: 160px; }
.seg.big label:has(input:checked) { background: var(--panel); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--panel2); border: 1px solid var(--line); white-space: nowrap; }
.pill.sm { padding: 2px 8px; font-size: 11.5px; }
.s-in_progress { background: color-mix(in srgb, var(--ok) 22%, transparent); border-color: var(--ok); }
.s-waiting_approval, .s-waiting_parts, .l-proposed { background: color-mix(in srgb, var(--warn) 18%, transparent); border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.s-done, .l-approved, .s-approved { background: color-mix(in srgb, var(--info) 20%, transparent); border-color: color-mix(in srgb, var(--info) 60%, transparent); }
.s-paused { border-style: dashed; }
.l-declined, .s-canceled { opacity: .65; text-decoration: line-through; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--warn); margin-left: 6px; text-transform: uppercase; letter-spacing: .4px; }
.hint { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--info) 14%, transparent); font-size: 14px; }
.warnbox { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--panel)); }
.hint.warnhint { background: color-mix(in srgb, var(--warn) 16%, transparent); margin: 0 0 10px; }
.empty { padding: 18px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

/* lists */
.list { display: flex; flex-direction: column; gap: 8px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.card .lrow { background: var(--panel2); margin-top: 8px; }
.lrow .num { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.lrow .r { text-align: right; }
.lrow2 { padding: 8px 0; border-bottom: 1px solid var(--line); margin: 0; }

/* job page */
.jhead { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.jhead h1 { font-size: 30px; }
.jctl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.jctl select { width: auto; min-height: 44px; }
table { width: 100%; border-collapse: collapse; }
table.lines td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.lines td.n, table.sums td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.lines .acts { width: 44px; }
table.sums { margin-top: 8px; } table.sums td { padding: 3px 6px; color: var(--muted); }
table.sums tr.tot td { color: var(--ink); font-weight: 800; font-size: 19px; padding-top: 8px; }
.k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 3px 7px; border-radius: 6px; background: var(--panel2); }
.k-labor { color: #7fb3ff; } .k-part { color: #f6c453; } .k-discount { color: var(--ok); }
tr.st-declined td { opacity: .5; }
.kinds { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.alog { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 10px; }
.thumb img, .thumb .vid { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: grid; place-items: center; background: var(--panel2); }
.thumb label { margin: 4px 0 0; flex-direction: row; align-items: center; gap: 6px; }
.thumb .delphoto { margin-top: 4px; width: 100%; color: var(--muted); }
.upload { cursor: pointer; }
.note { padding: 10px 0; border-bottom: 1px solid var(--line); }
.smsbox { width: 100%; font-size: 15px; }
.cust-pick { position: relative; }
.results { display: flex; flex-direction: column; gap: 6px; }
.res { text-align: left; background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 12px; font: 15px var(--font); cursor: pointer; }
.cust-chosen { padding: 12px; border-radius: 12px; background: var(--panel2); margin-bottom: 8px; }
.newjob h2 { margin-top: 22px; } .newjob h2:first-child { margin-top: 0; }

/* money */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 10px; }
.tiles.wide { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tile .k { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; background: none; padding: 0; }
.tile .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.range { flex-wrap: wrap; margin-top: 0; } .range label { margin: 0; }
.grid2 + .card { margin-top: var(--gap); }

/* board */
.board { display: grid; gap: 16px; max-width: 1600px; margin: 0 auto; }
.b-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: stretch; }
.b-head .spots { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.clock .time { font-size: 48px; font-weight: 800; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.clock .date { color: var(--muted); margin-top: 4px; }
.spot { flex: 1; min-width: 110px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 12px; }
.spot.full { border-style: solid; background: var(--panel); }
.spot.bay.full { border-color: var(--accent); }
.spot .sn { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.spot .sc { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.active-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.active-card { background: var(--panel); border: 2px solid var(--ok); border-radius: 18px; padding: 18px; }
.active-card.over { border-color: var(--red); }
.ac-top { display: flex; justify-content: space-between; gap: 10px; }
.ac-car { font-size: 30px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.ac-sub { color: var(--muted); margin-top: 4px; font-size: 16px; }
.ac-who { font-weight: 800; color: var(--ok); white-space: nowrap; }
.bar { height: 12px; background: var(--panel2); border-radius: 99px; overflow: hidden; margin: 14px 0 8px; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .5s; }
.over .bar i { background: var(--red); }
.ac-nums { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 15px; font-variant-numeric: tabular-nums; }
.ac-btns { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.qrow { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.qpos { font-weight: 900; font-size: 20px; color: var(--muted); text-align: center; }
.qcar { font-weight: 700; font-size: 17px; } .qsub { color: var(--muted); font-size: 14px; }
.qmeta { text-align: right; } .qbtns { display: flex; gap: 6px; }
@media (max-width: 700px) { .qrow { grid-template-columns: 26px 1fr; } .qmeta { text-align: left; grid-column: 2; } .qbtns { grid-column: 1 / -1; justify-content: flex-end; } }
/* an empty shop: one friendly card instead of empty sections */
.b-welcome { text-align: center; padding: 36px 20px; margin: 0; }
.b-welcome .bw-ic { display: inline-flex; padding: 16px; border-radius: 50%; background: var(--panel2); color: var(--accent); margin-bottom: 10px; }
.b-welcome h2 { font-size: 22px; margin: 0 0 6px; } .b-welcome p { max-width: 520px; margin: 0 auto; line-height: 1.5; }
.b-welcome .bw-btns { justify-content: center; margin-top: 18px; }
.b-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.mini { display: block; padding: 10px; border-radius: 10px; background: var(--panel2); margin-bottom: 8px; }

/* Wall screen mode: bigger everything, no clutter. */
body.wall nav.top { opacity: .35; } body.wall nav.top:hover { opacity: 1; }
body.wall main { padding: 20px 28px; }
body.wall .clock .time { font-size: 76px; }
body.wall .ac-car { font-size: 44px; }
body.wall .b-active h2, body.wall .b-queue h2 { font-size: 22px; }
body.wall .tile .v { font-size: 34px; }

/* modal */
.modal-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; width: min(560px, 100%); max-height: calc(100vh / var(--zoom, 1) - 32px); overflow: auto; }
.modal.wide { width: min(860px, 100%); }
/* the dialog's buttons stay in view while a long form scrolls (POPS-2: Save was below the fold on a phone) */
.modal .row.actions { position: sticky; bottom: -20px; z-index: 1; margin: 12px -20px -20px; padding: 12px 20px 20px; background: var(--panel); border-top: 1px solid var(--line); }
.pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }

/* toasts */
/* taps go through a toast to what's under it (a form's Save on a phone), except on the toast's own buttons (Undo…) */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toasts button, #toasts a { pointer-events: auto; }
.toast { background: var(--panel2); border: 1px solid var(--line); padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.35); transition: opacity .4s, transform .4s; max-width: calc(90vw / var(--zoom, 1)); }
.toast.ok { border-color: var(--ok); } .toast.err { border-color: var(--red); color: var(--red); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* Valera */
.vbtn { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; width: 64px; height: 64px; border-radius: 50%;
  border: 0; background: var(--accent); color: #fff; box-shadow: 0 10px 30px rgba(227,52,47,.45); cursor: pointer; }
.vface { font: 900 26px var(--font); }
.vbtn .badge { position: absolute; top: -2px; right: -2px; background: var(--warn); color: #000; font: 800 12px var(--font); border-radius: 99px; padding: 2px 7px; }
.vpanel { position: fixed; right: 18px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 41; width: min(420px, calc(100vw / var(--zoom, 1) - 36px));
  height: min(560px, calc(100vh / var(--zoom, 1) - 140px)); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.5); overflow: hidden; }
.vpanel[hidden] { display: none; }
.vhead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.vhead .vname { flex: 1; font-size: 17px; }
.vtoggle { flex-direction: row; margin: 0; align-items: center; gap: 4px; }
.vhead .x { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }
.vfeed { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.vmsg { max-width: 88%; padding: 9px 12px; border-radius: 14px; background: var(--panel2); font-size: 15px; }
.vmsg.me { align-self: flex-end; background: var(--accent); color: #fff; }
.vmsg.attn { border-left: 3px solid var(--warn); }
.vmsg .at { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.vmsg.me .at { color: rgba(255,255,255,.75); }
.vquick { display: flex; gap: 6px; padding: 0 12px 8px; flex-wrap: wrap; }
.vquick button { background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: 99px; padding: 6px 12px; font: 600 13px var(--font); cursor: pointer; }
.vform { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.vform .mic { width: 46px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); font-size: 18px; cursor: pointer; }
.vform .mic.on { background: var(--accent); animation: pulse 1s infinite; }
.vform .send { border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: 700 14px var(--font); padding: 0 14px; cursor: pointer; }
.vnote { font-size: 11.5px; color: var(--muted); text-align: center; padding: 0 0 8px; }
@keyframes pulse { 50% { opacity: .6; } }

.login { max-width: 360px; margin: calc(14vh / var(--zoom, 1)) auto 0; }
.login .btn { width: 100%; margin-top: 14px; }
.row.wrap > input, .row.wrap > select { width: auto; flex: 1 1 150px; }
.row.wrap > input[type=date] { flex: 0 1 170px; }

/* parts + texts */
.porder { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: 13px; }
.o-needed { background: color-mix(in srgb, var(--red) 18%, transparent); border-color: var(--red); }
.o-ordered { background: color-mix(in srgb, var(--warn) 18%, transparent); border-color: var(--warn); }
.o-arrived { background: color-mix(in srgb, var(--ok) 20%, transparent); border-color: var(--ok); }
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; padding: 4px 0 10px; }
.bubble { max-width: 85%; padding: 9px 12px; border-radius: 14px; background: var(--panel2); font-size: 15px; }
.bubble.out { align-self: flex-end; background: color-mix(in srgb, var(--info) 30%, var(--panel2)); }
.bubble .orig { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-style: italic; }
.bubble .meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.compose textarea { margin-top: 6px; }
.inbox { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 14px; align-items: start; }
.inbox.none { grid-template-columns: 1fr; } .empty .small { margin-top: 6px; }
@media (max-width: 760px) { .inbox { grid-template-columns: 1fr; } }
.convs { display: flex; flex-direction: column; gap: 6px; }
.conv { position: relative; display: block; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.conv.on { border-color: var(--accent); }
.conv .unread { position: absolute; right: 10px; bottom: 10px; background: var(--accent); color: #fff; border-radius: 99px; font: 800 11px var(--font); padding: 2px 7px; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 26px; }
.convbox { min-height: 300px; }

/* ---------- the guided tour ---------- */
.tour { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.tour-card { pointer-events: auto; }
.tour.tapping .tour-hole { animation: tour-pulse 1.3s ease-in-out infinite; }
@keyframes tour-pulse { 0%, 100% { outline-color: var(--accent); outline-offset: 0; } 50% { outline-color: #ff8a80; outline-offset: 5px; } }
.tour-card.in { animation: tour-in .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes tour-in { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
.tour-hint { flex: 1; text-align: right; align-self: center; color: var(--accent); font-weight: 700; font-size: 17px; }
/* a new screen slides in, so it's clear the page changed */
main.enter { animation: page-in .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes page-in { from { opacity: 0; translate: 26px 0; } to { opacity: 1; translate: 0 0; } }
.tour-hole { position: fixed; border-radius: 16px; box-shadow: 0 0 0 200vmax rgba(5, 6, 8, .74); outline: 3px solid var(--accent);
  transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease; pointer-events: none; }
.tour-card { position: fixed; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw / var(--zoom, 1) - 32px)); background: var(--panel);
  border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; box-shadow: 0 24px 80px rgba(0, 0, 0, .6); transition: top .35s ease; }
.tour-card.mid { top: 50% !important; transform: translate(-50%, -50%); }
.tour-card h2 { font-size: 24px; margin: 6px 0 8px; }
.tour-card p { font-size: 18px; line-height: 1.45; margin: 0 0 18px; color: var(--ink); }
.tour-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; font-weight: 600; }
.tour-mute { background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--ink); }
.tour-btns { display: flex; justify-content: space-between; gap: 12px; }
.tour-btns .tour-next { flex: 1; max-width: 300px; margin-left: auto; }
form.person { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }

/* ---------- start-up: "Garage Manager", then "Welcome to PRO D Auto" ---------- */
#intro { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 60%, #1b1013 0%, #08090b 70%); transition: opacity .4s ease; }
#intro.out { opacity: 0; pointer-events: none; }
.gm { text-align: center; }
.gm-word { font-weight: 900; font-size: clamp(44px, 9vw, 112px); letter-spacing: .12em; line-height: 1; color: #f5f5f7; }
.gm-word.thin { font-weight: 300; letter-spacing: .32em; font-size: clamp(22px, 4.2vw, 50px); color: #a9adb6; margin-top: 14px; }
.gm-word span { display: inline-block; opacity: 0; transform: translateY(26px); filter: blur(8px); animation: gm-rise .6s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes gm-rise { to { opacity: 1; transform: none; filter: none; } }
.gm-line { height: 3px; margin: 26px auto 0; width: 0; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: gm-line .9s .55s cubic-bezier(.6, 0, .2, 1) forwards; }
@keyframes gm-line { to { width: min(520px, 70vw); } }
.wl { text-align: center; animation: wl-in .55s cubic-bezier(.2, .8, .2, 1); }
@keyframes wl-in { from { opacity: 0; transform: scale(1.12); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
.wl-hi { color: #a9adb6; font-size: clamp(18px, 2.6vw, 28px); font-weight: 500; letter-spacing: .04em; }
.wl-logo { font-weight: 900; font-size: clamp(48px, 9vw, 110px); letter-spacing: .12em; margin-top: 8px; }
.wl-logo b { color: var(--accent); display: inline-block; animation: wl-d 1.1s ease-out; text-shadow: 0 0 40px rgba(227, 52, 47, .6); }
@keyframes wl-d { 0% { transform: scale(.6); opacity: 0; } 45% { transform: scale(1.15); opacity: 1; } 100% { transform: none; } }
.wl-name { margin-top: 14px; font-size: clamp(22px, 3.4vw, 38px); font-weight: 700; opacity: 0; animation: gm-rise .5s .35s forwards; }
.login { animation: login-in .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes login-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Settings: shop / profiles ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--panel2); border-radius: 12px; margin: 6px 0 16px; }
.tabs a { padding: 9px 16px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; }
.tabs a.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.person-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 14px; border-radius: 18px; background: var(--panel);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.person-btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.person-btn b { font-size: 19px; }
.ava { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 28px; border: 2px solid var(--line); }
.ava.big { width: 52px; height: 52px; font-size: 24px; display: inline-grid; margin-right: 12px; vertical-align: middle; }
h2.ph { display: flex; align-items: center; font-size: 26px; margin: 14px 0; }
.look .lk { margin: 16px 0; }
.lk-label { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.preview { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); padding: 12px; transition: background .25s ease; }
.pv-bar { display: flex; justify-content: space-between; font-size: .85em; opacity: .9; margin-bottom: 10px; }
.pv-bar i { color: var(--accent); font-style: normal; }
.pv-card { border-radius: 12px; padding: 12px 14px; }
.pv-k { font-size: .75em; opacity: .65; text-transform: uppercase; letter-spacing: .05em; }
.pv-v { font-size: 1.25em; font-weight: 800; margin: 4px 0 8px; }
.pv-bar2 { height: 8px; border-radius: 4px; background: rgba(127, 127, 127, .3); overflow: hidden; } .pv-bar2 i { display: block; width: 62%; height: 100%; background: var(--ok); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; font-size: 20px; }
.sw.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.sw.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.wheelbox { display: flex; gap: 18px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.wheel { position: relative; width: 190px; height: 190px; border-radius: 50%; touch-action: none; cursor: crosshair;
  background: radial-gradient(circle, #808080 0%, rgba(128, 128, 128, 0) 72%), conic-gradient(from 90deg, red, yellow, lime, cyan, blue, magenta, red); }
.wheel .dot { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #000, 0 2px 6px rgba(0, 0, 0, .5); pointer-events: none; }
.wheel-side { flex: 1; min-width: 160px; }
.chip { margin-top: 12px; border-radius: 10px; padding: 10px; text-align: center; font: 600 13px ui-monospace, Menlo, monospace; color: #fff; text-shadow: 0 1px 2px #000; border: 1px solid var(--line); }
.fonts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fontbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 12px; background: var(--panel2); border: 2px solid var(--line); color: var(--ink); cursor: pointer; }
.fontbtn b { font-size: 26px; } .fontbtn span { font-size: 12px; color: var(--muted); }
.fontbtn.on { border-color: var(--accent); }
.look input[type=range] { width: 100%; accent-color: var(--accent); }

/* ---------- design pass (2026-10-13): depth, motion, consistent icons ---------- */
body { background: radial-gradient(1100px 520px at 12% -8%, rgba(227, 52, 47, .07), transparent 60%),
  radial-gradient(900px 600px at 105% 110%, rgba(70, 90, 255, .05), transparent 60%), var(--bg); background-attachment: fixed; min-height: calc(100vh / var(--zoom, 1)); }
nav.top { backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); background: color-mix(in srgb, var(--bg) 78%, transparent); }
nav .ic { display: inline-flex; }
nav .ico { display: block; }
nav .links a { transition: background .18s ease, color .18s ease; }
nav .links a:hover { color: var(--ink); }
nav .links a.on .ico { color: var(--accent); }
.btn { transition: transform .12s ease, filter .15s ease, background .15s ease, border-color .15s ease; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.96); }
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card, .tile, .spot, .qrow, .active-card, .lrow { box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px -18px rgba(0, 0, 0, .55); }
.tile .v, .time, .tot, .sums, .num, .v, td { font-variant-numeric: tabular-nums; }
.tile { transition: transform .2s ease; }
.spot { transition: border-color .25s ease, background .25s ease; }
.spot .free { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; opacity: .75; }
.spot.full.bay { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--panel)), var(--panel)); }
.active-card .bar { height: 12px; border-radius: 6px; overflow: hidden; }
.active-card .bar > * { border-radius: 6px; background-image: linear-gradient(90deg, rgba(255, 255, 255, .18), transparent 60%); transition: width .6s ease; }
.active-card.over { box-shadow: 0 0 0 1px rgba(255, 90, 82, .25), 0 0 34px -6px rgba(255, 69, 58, .35); }
.qrow { transition: transform .15s ease, border-color .15s ease; }
.qrow:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.pill { letter-spacing: .01em; }
h1 { letter-spacing: -.02em; }
/* keep the last row of content clear of Valerie's round button */
main { padding-bottom: 130px; }
.vbtn { box-shadow: 0 10px 30px rgba(227, 52, 47, .45), 0 0 0 1px rgba(255, 255, 255, .08) inset; transition: transform .15s ease; }
.vbtn:active { transform: scale(.94); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* quick quote */
.qq-lines { display: flex; flex-direction: column; gap: 6px; max-height: calc(52vh / var(--zoom, 1)); overflow: auto; margin: 6px 0 12px; }
.qq-line { display: grid; grid-template-columns: auto auto 1fr 80px 100px 90px; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.qq-line.off { opacity: .45; }
.qq-line input[type=number] { width: 100%; }
.qq-line input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.qq-past { width: 100%; text-align: left; cursor: pointer; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; font: inherit; }
.qq-past:hover { border-color: var(--accent); }
.qq-foot { align-items: center; gap: 12px; }
@media (max-width: 640px) { .qq-line { grid-template-columns: auto 1fr 70px 80px; } .qq-line .k, .qq-line [data-sum] { display: none; } }
/* ---------- inspections: big green / yellow / red taps ---------- */
.insp-card { margin-top: var(--gap); }
.itpls { display: flex; flex-wrap: wrap; gap: 10px; }
.itpls .btn { flex: 1 1 260px; justify-content: space-between; white-space: normal; text-align: left; min-width: 0; }
.ihead { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.ihead h2 { margin-bottom: 2px; }
.icounts { display: flex; gap: 6px; }
.ic { font-weight: 800; font-size: 15px; padding: 6px 11px; border-radius: 99px; border: 1px solid; font-variant-numeric: tabular-nums; }
.ic.ok { color: var(--ok); border-color: var(--ok); } .ic.soon { color: var(--warn); border-color: var(--warn); } .ic.now { color: var(--red); border-color: var(--red); }
.ibar { display: flex; height: 8px; background: var(--panel2); border-radius: 99px; overflow: hidden; margin: 12px 0 4px; }
.ibar i { display: block; height: 100%; transition: width .3s; } .ibar i.ok { background: var(--ok); } .ibar i.soon { background: var(--warn); } .ibar i.now { background: var(--red); }
.idone { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: color-mix(in srgb, var(--ok) 14%, transparent); }
h3.isec { margin: 18px 0 4px; }
.iit { padding: 10px 0 10px 12px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; }
.iit.st-ok { border-left-color: var(--ok); } .iit.st-soon { border-left-color: var(--warn); } .iit.st-now { border-left-color: var(--red); }
.iit.st-na { opacity: .6; }
.iit-top { display: flex; align-items: center; gap: 12px; }
.iit-name { flex: 1; min-width: 0; font-size: 17px; font-weight: 600; }
.imeas { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tri { display: flex; gap: 6px; flex: none; }
.tb { width: 82px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 12px; border: 2px solid; background: var(--panel2); font: 700 12px var(--font); cursor: pointer; touch-action: manipulation; }
.tb b { font-size: 20px; line-height: 1; }
.tb.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.tb.soon { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.tb.now { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.tb.on { color: #fff; } .tb.ok.on { background: var(--ok); border-color: var(--ok); }
.tb.soon.on { background: var(--warn); border-color: var(--warn); color: #1a1300; } .tb.now.on { background: var(--red); border-color: var(--red); }
.tb:active { transform: scale(.96); }
.imore { margin-top: 6px; font-size: 14px; padding: 6px 0; }
.iit-more { margin-top: 8px; }
.ichips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.ichips .imeasure { width: 150px; min-height: 44px; }
.irow label.btn { margin: 0; flex-direction: row; color: var(--ink); font-size: 13px; }
.ichip { min-width: 46px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); font: 700 16px var(--font); cursor: pointer; }
.ichip.on { background: var(--ink); color: var(--bg); }
.irow { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.irow.wrap { flex-wrap: wrap; }
.irow input { min-height: 46px; }
.ithumb { position: relative; display: inline-block; }
.ithumb img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; display: block; }
.ithumb .ix { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--panel); color: var(--ink); font-size: 11px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.tpl-item { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 8px; margin-top: 8px; align-items: center; }
.tpl-item.add { grid-template-columns: 1fr 1fr auto; margin-top: 14px; }
@media (max-width: 600px) {
  .ihead h2 { font-size: 16px; }
  .iit-top { flex-wrap: wrap; gap: 8px; }
  .iit-name { flex-basis: 100%; }
  .tri { width: 100%; } .tb { flex: 1; width: auto; }
  .ichips .imeasure { flex: 1 1 120px; width: auto; }
  .tpl-item, .tpl-item.add { grid-template-columns: 1fr 44px; } .tpl-item input { grid-column: 1; }
  .tpl-item .icon { grid-column: 2; grid-row: 1 / span 2; } .tpl-item .btn { grid-column: 1 / -1; }
}

/* Valerie working / confirming */
.vmsg.working { min-width: 64px; }
.vmsg .dots { display: inline-flex; gap: 5px; padding: 4px 2px; }
.vmsg .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: vdot 1.1s infinite ease-in-out; }
.vmsg .dots i:nth-child(2) { animation-delay: .15s; } .vmsg .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes vdot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.vmsg .did { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--ok); }
.vconfirm { display: flex; gap: 8px; margin-top: 8px; }

/* board on a phone: clock on its own line, the three money/job tiles share the width */
@media (max-width: 600px) {
  .b-head { grid-template-columns: 1fr; gap: 10px; }
  .clock { display: flex; align-items: baseline; gap: 10px; }
  .clock .time { font-size: 36px; white-space: nowrap; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tiles .tile { padding: 10px 12px; min-width: 0; }
  .tiles .tile .v { font-size: clamp(14px, 4.1vw, 20px); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tiles .tile { padding: 10px 9px; }
  .tiles .tile .k { font-size: 10px; }
}
.hours-person { padding: 8px 0; border-bottom: 1px solid var(--line); } .hours-person:last-child { border-bottom: 0; }

/* phones: the sections become a bottom tab bar (thumb reach, all seven visible); Valerie's button sits above it */
@media (max-width: 600px) {
  nav .links { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); overflow: visible;
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
    border-top: 1px solid var(--line); }
  nav .links a { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 0; border-radius: 10px; }
  nav .links a span:not(.ic) { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  nav .links a .ico { width: 22px; height: 22px; }
  nav .links a.on { background: none; color: var(--accent); }
  /* a blurred top bar would trap the fixed tab bar inside itself, so on phones it's solid */
  nav.top { justify-content: space-between; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  nav .brand { flex: 1; }
  .vbtn { bottom: calc(76px + env(safe-area-inset-bottom)); width: 56px; height: 56px; }
  /* ...and on phones clear of the bottom tab bar too (a sheet's buttons must never end up under it) */
  html { scroll-padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
  .vpanel { bottom: calc(140px + env(safe-area-inset-bottom)) !important; }
  main { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .tour-card { bottom: auto; }
}
/* service reminders: what's coming due (customers page, customer's cars, board link, common jobs intervals) */
.ddot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: var(--ok); }
.ddot.d-overdue { background: var(--red); } .ddot.d-soon { background: var(--warn); }
.due-overdue { background: color-mix(in srgb, var(--red) 18%, transparent); border-color: var(--red); }
.due-soon { background: color-mix(in srgb, var(--warn) 18%, transparent); border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.duecard h2 { margin: 0; }
.duerow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-top: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; }
.duerow > a { min-width: 0; } .duerow .small { margin-top: 3px; color: var(--muted); } .duerow .small .red { color: var(--red); }
.duel { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.duei { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--panel2); border-radius: 10px; }
.duei .ddot { margin-right: 0; }
.duebtns { margin-top: 8px; }
.duelink { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--warn); }
.dthread .thread { max-height: 260px; }
.oprow { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, auto); gap: 8px; align-items: center; margin-top: 8px; }
.oprow label { flex-direction: row; align-items: center; gap: 5px; margin: 0; white-space: nowrap; }
.oprow input { padding: 8px 10px; } .oprow .oph { width: 76px; } .oprow .opmo { width: 66px; } .oprow .opmi { width: 104px; }
.oprow.ophead { margin-top: 0; } .oprow .opev { grid-column: span 2; }
@media (max-width: 560px) {
  .oprow { grid-template-columns: repeat(3, auto); justify-content: start; } .oprow > .grow { grid-column: 1 / -1; }
  .oprow.ophead { display: none; } .oprow .oph, .oprow .opmo { width: 60px; } .oprow .opmi { width: 92px; }
  .duerow { flex-wrap: wrap; } .duerow > a { flex-basis: 100%; }
  .clock { flex-wrap: wrap; } .duelink { margin-top: 0; }
}
/* Valerie's log (Settings → Shop): what was said, her answer, and what she actually did as chips */
.vlog { display: flex; flex-direction: column; gap: 8px; }
.vlrow { min-width: 0; padding: 10px 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; }
.vlhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.vlhead .vlmode { margin-left: auto; white-space: nowrap; }
.vlsaid { margin-top: 4px; font-weight: 600; overflow-wrap: anywhere; }
.vlreply { margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--line); font-size: 14.5px; overflow-wrap: anywhere; cursor: pointer;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.vlreply.open { display: block; }
.vlsteps { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.vstep { display: inline-block; max-width: 100%; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; line-height: 1.5;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); overflow-wrap: anywhere; }
.vstep.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.vstep.bad { color: var(--red); border-color: color-mix(in srgb, var(--red) 55%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); }
.vstep.wait { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.vstep .vserr { font-weight: 400; }
.tour-tools { display: inline-flex; align-items: center; gap: 6px; }
.tour-end { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 99px; padding: 5px 12px; font: 600 13px var(--font); cursor: pointer; }
.tour-end:hover { color: var(--ink); border-color: var(--muted); }
.tour-btns .tour-later { flex: 0 0 auto; }

/* the VIN box: typed, scanned with the app's camera, or said (plate.js, dictate.js) */
.vinrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; align-items: end; margin-top: 10px; }
.vinrow > label { margin-top: 0; }
.vinrow > .vin-state, .vinrow > .vin-sheet, .vinrow > .dict-msg { grid-column: 1 / -1; }
.vin-input { font: 700 20px ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 1.5px; min-height: 56px; }
.vin-input::placeholder { font: 500 15px var(--font); letter-spacing: 0; }
.vin-btns { display: flex; gap: 10px; }
.vin-btns .btn { flex: 1; }
@media (max-width: 560px) { .vinrow { grid-template-columns: minmax(0, 1fr); } .vin-btns { margin-top: 10px; } .vin-btns .btn { padding: 12px; font-size: 16px; } }
.vin-state { min-height: 22px; margin-top: 6px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.vin-state.ok { color: var(--ok); } .vin-state.warn { color: var(--warn); }
.vinrow.has-sheet > .vin-state { display: none; }
.flash-ok { animation: flash-ok 1.2s ease-out; }
@keyframes flash-ok { 0%, 45% { border-color: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 35%, transparent); } }

/* the mic inside a field (dictate.js): big enough for a gloved thumb, never covers the text */
.dict-wrap { position: relative; display: block; width: 100%; min-width: 0; }
.row > .dict-wrap, .irow > .dict-wrap { flex: 1; }
.row.wrap > .dict-wrap { flex: 1 1 150px; width: auto; }
.dict-wrap > .has-dict { padding-right: 54px; }
.dict-wrap:has(> .search) { margin-bottom: 12px; } .dict-wrap > .search { margin-bottom: 0; }
.dict-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; touch-action: manipulation;
  transition: background .15s, color .15s, box-shadow .1s; }
.dict-btn::before { content: ''; position: absolute; inset: -6px; }          /* the real target: 54 × 54 */
.dict-wrap.ta .dict-btn { top: 4px; transform: none; }
.dict-btn:hover { color: var(--ink); background: var(--panel); }
.dict-btn.wait { color: var(--accent); }
.dict-btn.wait::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); animation: dict-spin .8s linear infinite; }
.dict-btn.on { background: var(--accent); color: #fff; animation: dict-pulse 1.4s ease-in-out infinite; }
.dict-btn.on.lvl { animation: none; box-shadow: 0 0 0 calc(3px + var(--lvl, 0) * 9px) color-mix(in srgb, var(--accent) 30%, transparent); }
.dict-btn.closing { background: conic-gradient(var(--accent) calc(var(--left, 1) * 1turn), color-mix(in srgb, var(--accent) 40%, transparent) 0); }
.dict-btn.err { color: var(--red); }
.has-dict.dict-on { outline: 2px solid var(--accent); outline-offset: 0; }
@keyframes dict-spin { to { transform: rotate(360deg); } }
@keyframes dict-pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 22%, transparent); } }
.dict-msg { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 6px 6px 6px 12px; border-radius: 10px; font-size: 14px; font-weight: 500;
  color: var(--ink); background: color-mix(in srgb, var(--info) 14%, transparent); }
.dict-msg.err { background: color-mix(in srgb, var(--red) 14%, transparent); }
.dict-msg > span { flex: 1; }
.dict-msg .linkbtn { font-weight: 700; min-height: 40px; padding: 0 8px; }
.dict-msg .x { background: none; border: 0; color: var(--muted); font-size: 16px; min-width: 40px; min-height: 40px; cursor: pointer; }

/* the sheet under the VIN box after it was said: 17 boxes, what's wrong, and big buttons */
.vin-sheet { margin-top: 10px; padding: 14px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--panel2); color: var(--ink); }
.vin-sheet.ok { border-color: var(--ok); } .vin-sheet.warn { border-color: var(--warn); } .vin-sheet.bad { border-color: var(--red); }
.vs-title { font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.vin-sheet.ok .vs-title { color: var(--ok); } .vin-sheet.warn .vs-title { color: var(--warn); } .vin-sheet.bad .vs-title { color: var(--red); }
.vin-boxes { display: grid; grid-template-columns: repeat(17, minmax(0, 1fr)); gap: 3px; }
.vb { position: relative; min-height: 50px; padding: 14px 0 4px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font: 700 22px ui-monospace, "SF Mono", Menlo, monospace; text-align: center; cursor: pointer; touch-action: manipulation; }
.vb small { position: absolute; top: 2px; left: 0; right: 0; font-size: 10px; font-weight: 600; color: var(--muted); }
.vb.fix { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 18%, var(--panel)); }
.vb.doubt { border: 2px solid var(--warn); }
.vb.ioq { background: color-mix(in srgb, var(--info) 18%, var(--panel)); }
@media (max-width: 560px) {
  .vin-boxes { grid-template-columns: repeat(9, minmax(0, 1fr)); } .vb { font-size: 20px; }
  .vs-cand { flex-wrap: wrap; } .vs-cand > div { flex: 1 1 100%; } .vs-cand .btn { flex: 1 1 100%; }
}
.vs-car { margin-top: 8px; font-weight: 600; }
.vs-notes { margin-top: 8px; }
.vs-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.vs-btns .btn { flex: 1 1 140px; }
.vs-cand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.vs-vin { font: 700 19px ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 1px; word-break: break-all; }
.vs-vin b { color: var(--warn); text-decoration: underline; }

/* a VIN for Valerie, shown big with its car before she gets it (or before she saves one he hasn't seen): one big tap */
.vvin { flex: none; max-height: 62%; overflow-y: auto; padding: 12px; border-top: 2px solid var(--warn); background: var(--panel2); }
.vvin[hidden] { display: none; }
.vvin .vs-title { color: var(--warn); margin-bottom: 8px; }
.vvin .vin-boxes { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.vvin .vb { min-height: 46px; padding: 9px 0 5px; font-size: 22px; }
.vvin .vs-car { font-size: 16px; }
.vvin .vs-btns { margin-top: 10px; }
.vvin .vs-btns .btn { flex: 1 1 120px; }
.vpanel.vin-up .vquick { display: none; }

/* Valerie's own mic, and the dot that says hands-free is listening for her name */
.vform .mic { display: grid; place-items: center; color: var(--ink); min-height: 46px; }
.vform .mic.on { color: #fff; }
.vform .mic.wait { color: var(--accent); }
.vform .mic.closing { animation: none; background: conic-gradient(var(--accent) calc(var(--left, 1) * 1turn), color-mix(in srgb, var(--accent) 40%, transparent) 0); }
.vbtn.ears::after { content: ''; position: absolute; left: 3px; bottom: 3px; width: 13px; height: 13px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg); }

/* shop days (closed days, the day work starts, parts expected on a day) */
.sdbanner { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; font-weight: 700; background: color-mix(in srgb, var(--warn) 18%, var(--panel)); border: 1px solid color-mix(in srgb, var(--warn) 60%, transparent); }
.sdline { margin-top: 4px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.mini.sdwait > a.mini { padding: 0; margin: 0; background: none; }
.sdask { padding: 0; font-weight: 700; }
.pill.startson { background: color-mix(in srgb, var(--info) 16%, transparent); border-color: color-mix(in srgb, var(--info) 55%, transparent); }
.pill.startson.late { background: color-mix(in srgb, var(--red) 16%, transparent); border-color: var(--red); color: var(--red); }
.startrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.startrow .startf { flex-direction: row; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.startrow .startf input { width: auto; min-width: 150px; margin: 0; }
.sdsug { white-space: normal; text-align: left; }
.sdweek { margin-top: 10px; }
.sddays { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sdday { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.sdday input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sdday span { display: inline-block; min-width: 44px; padding: 8px 10px; border-radius: 10px; text-align: center; font-weight: 700; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.sdday input:checked + span { background: color-mix(in srgb, var(--ok) 20%, transparent); border-color: var(--ok); color: var(--ink); }
.sdday input:focus-visible + span { outline: 2px solid var(--info); outline-offset: 2px; }
.sdadd { margin-top: 6px; }
/* who's in on the days that aren't the usual, and "I'm working Saturday" for the person logged in (board) */
.sdpeople { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sdchip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 12px; font-weight: 700;
  background: color-mix(in srgb, var(--ok) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); }
.sdchip.short, .sdchip.off { background: color-mix(in srgb, var(--warn) 14%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.sdmine { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.sdyou { font-weight: 700; color: var(--ok); }
.sdpicked { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sdpick { position: relative; overflow: hidden; display: inline-flex; flex-direction: row; margin: 0; color: var(--ink); }
.sdpick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.sdlist { display: grid; gap: 6px; margin: 8px 0; }
.sdprow { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); }
.sdprow .grow { flex: 1; min-width: 0; }
.sdprow .icon { width: 44px; height: 44px; flex: none; }
.sdadd input, .sdadd select { min-height: 44px; }   /* text inputs run 43px by padding alone */
@media (max-width: 560px) { .sdmine { margin-left: 0; } }

/* Parts orders (job page card, the Record order sheet, the Parts page groups). Staff only. */
.pobox { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.pobox h3 { margin: 0; }
.porow { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; padding: 8px 0; border-top: 1px dashed var(--line); }
.porow:first-of-type { border-top: 0; }
.porow .grow { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.porow.gone { opacity: .6; }
.poact { display: flex; gap: 6px; flex-wrap: wrap; }
.polabel { font-weight: 700; margin: 12px 0 4px; }
.pochips { display: flex; flex-wrap: wrap; gap: 6px; }
.pochip { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.pochip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pochip span { display: inline-flex; flex-direction: column; justify-content: center; min-width: 44px; padding: 8px 12px; border-radius: 10px;
  text-align: center; font-weight: 700; background: var(--panel2); border: 1px solid var(--line); color: var(--ink); line-height: 1.15; }
.pochip span small { font-weight: 600; font-size: 11px; color: var(--muted); }
.pochip.shut span { background: color-mix(in srgb, var(--warn) 12%, var(--panel2)); border-style: dashed; }
.pochip input:checked + span { background: color-mix(in srgb, var(--ok) 22%, transparent); border-color: var(--ok); border-style: solid; }
.pochip input:focus-visible + span { outline: 2px solid var(--info); outline-offset: 2px; }
.pocol { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
/* Compare prices for a part (D8: web/parts-compare.js). Staff only. Big buttons; one column on a phone. */
.pcsheet h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pcsheet [hidden] { display: none !important; }   /* a hidden .btn / .hint stays hidden (.btn sets its own display) */
.pcpart { font-size: 15px; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.pcsearch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; }
.pcsearch .lbl { font-weight: 700; margin-right: 4px; }
.pcstores { display: flex; flex-wrap: wrap; gap: 6px; }
.pcstore { min-height: 44px; display: inline-flex; align-items: center; }
.pclist { margin: 6px 0 4px; }
.pcrow { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; padding: 10px 0; border-top: 1px dashed var(--line); }
.pcrow:first-child { border-top: 0; }
.pcrow .grow { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.pcrow.picked { background: color-mix(in srgb, var(--ok) 9%, transparent); border-radius: 10px; padding: 10px 8px; }
.pchead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pcsup { font-size: 16px; }
.pcrow .pill.ok { background: color-mix(in srgb, var(--ok) 22%, transparent); border-color: var(--ok); }
.pcbadges { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.pcbadge { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 99px; border: 1px solid; white-space: nowrap; }
.pcbadge.b-list { color: var(--ok); border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.pcbadge.b-cost { color: var(--info); border-color: var(--info); background: color-mix(in srgb, var(--info) 12%, transparent); }
.pcbadge.b-soon { color: var(--warn); border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.pcnums { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin-top: 2px; }
.pcshut { margin-top: 6px; padding: 6px 10px; background: color-mix(in srgb, var(--warn) 16%, transparent); }
.pcact { display: flex; gap: 6px; flex-wrap: wrap; }
.pcact .btn { min-height: 44px; min-width: 44px; }
.pcadd { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); scroll-margin-bottom: 110px; }   /* ✎ scrolls to it: Save / Cancel clear of the sticky "Back to the part" bar */
.pcadd h3 { margin: 0 0 4px; }
.pcmore { margin-top: 8px; } .pcmore summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.pcformbtns { justify-content: flex-end; margin-top: 8px; }
.pcformbtns .btn { min-height: 44px; }
@media (max-width: 560px) {
  .pcact { width: 100%; } .pcact .btn.primary { flex: 1; }
  .pcstore { padding: 8px 10px; }
}
.pgroup { margin-top: 18px; }
.pgroup.late h3 { color: var(--red); }
