/* Mole Hill Bikes brand tokens: the Mole Hill Bikes Design System (Nov 23, 2026; claude.ai artifact 3wf4Cn7YrfKBZK9jw8NfvL),
   same values as the website's --mhb-* tokens. Cobalt + valley navy on workshop white; status green #167A42 and red #B42318;
   corners: controls 6px, cards 8px, feature 12px, and no pill shapes on rectangles (only truly round things are round). */
:root {
  --cobalt: #023FAD;
  --navy: #011731;
  --cream: #FAECD2;
  --sky: #60AFFF;
  --orange: #B84E0B;
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --ink: #011731;
  --ink-2: #30435F;
  --muted: #66758A;
  --line: #D6DEE8;
  --cobalt-tint: #E6EDF9;
  --sky-tint: #E7F2FF;
  --orange-tint: #FBEEE6;
  --cream-tint: #FDF6EA;
  --ok: #167A42;
  --ok-tint: #E5F2EA;
  --err: #B42318;
  --err-tint: #FBEAEA;
  --focus: #023FAD;   /* cobalt on light grounds (sky failed 3:1 on white); dark themes use sky */
  --r-control: 6px;
  --r-card: 8px;
  --r-feature: 12px;
  --seg-bg: #E8EDF3;
  --btn-bg: var(--cobalt);
  --danger: var(--err);
  --warn: var(--orange);
  --workshop: var(--bg);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 16px/1.45 'Open Sans', system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
h1, h2, h3, .q-num { font-family: 'Overpass', 'Open Sans', sans-serif; font-weight: 800; color: var(--navy); }
h1, h2, h3 { text-transform: uppercase; letter-spacing: .02em; }
h2 { font-size: 1.15rem; margin: 22px 0 10px; }
h3 { font-size: 1rem; margin: 22px 0 8px; }
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 48px; }
a { color: var(--cobalt); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* header */
.top { background: var(--card); color: var(--navy); position: sticky; top: 0; z-index: 5; padding-top: env(safe-area-inset-top); border-bottom: 3px solid var(--cobalt); }
.top-row { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px 4px; }
.title { background: none; border: 0; padding: 4px 0; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.title img { height: 34px; width: auto; display: block; }
.title span { font: 800 .72rem/1.1 'Overpass', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }
.me { background: var(--cobalt-tint); border: 0; color: var(--navy); border-radius: var(--r-control); padding: 6px 12px; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* buttons */
.btn { border: 1px solid var(--line); background: var(--card); color: var(--navy); border-radius: var(--r-control); padding: 10px 14px; font-weight: 600; cursor: pointer; min-height: 44px; }
.btn.primary { background: var(--btn-bg); border-color: var(--btn-bg); color: #fff; font: 800 1rem 'Overpass', sans-serif; text-transform: uppercase; letter-spacing: .04em; }
@media (hover: hover) { .btn.primary:hover { background: var(--navy); border-color: var(--navy); } }
.btn.big { width: 100%; padding: 14px; font-size: 1.05rem; min-height: 52px; }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn.danger-outline { color: var(--err); border-color: var(--err); }
.btn.link { border: 0; background: none; color: var(--cobalt); padding: 6px 0; min-height: 0; }
.back { margin-bottom: 4px; }
.actions { display: flex; gap: 8px; margin-top: 14px; }
.actions.wrap { flex-wrap: wrap; }
.actions .btn.big { flex: 1; }

/* sign in */
.signin { max-width: 440px; padding-top: 40px; }
.brand-block { text-align: center; margin-bottom: 20px; }
.brand-block h1 { font-size: 1.5rem; margin: 10px 0 4px; }
.badge-logo { width: 180px; height: 180px; display: block; margin: 0 auto; }
.demo-note { background: var(--cream); color: var(--navy); border-radius: var(--r-card); padding: 8px 12px; font-size: .9rem; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.who { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); color: var(--navy); padding: 14px 10px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 64px; }
.who small { color: var(--muted); font-weight: 400; font-size: .78rem; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 22px 0 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* home */
.alert { background: var(--orange-tint); color: var(--orange); border-left: 4px solid var(--orange); border-radius: var(--r-card); padding: 10px 14px; font-weight: 600; margin-bottom: 12px; }
.queues { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.q-card { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--r-card); color: var(--navy); padding: 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; min-height: 96px; }
.q-num { font-size: 1.8rem; line-height: 1; }
.q-label { font-weight: 700; margin-top: 6px; }
.q-hint { color: var(--muted); font-size: .8rem; }
.q-card.s-pull { border-left-color: var(--muted); }
.q-card.s-to_build { border-left-color: var(--sky); }
.q-card.s-building { border-left-color: var(--cobalt); }
.q-card.s-qc { border-left-color: var(--navy); }
.q-card.s-notify { border-left-color: var(--orange); }

/* rows */
.list { display: flex; flex-direction: column; gap: 8px; }
.row { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); color: var(--navy); padding: 12px 14px; text-align: left; cursor: pointer; width: 100%; }
.row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.row-bike { font-weight: 700; margin-top: 6px; }
.row-sub { font-size: .88rem; }
.badge, .stage { font-size: .75rem; font-weight: 700; border-radius: var(--r-control); padding: 2px 9px; }
.r-sold { background: var(--cobalt); color: #fff; }
.r-test_ride { background: var(--sky-tint); color: var(--cobalt); }
.r-stock { background: var(--cream); color: var(--navy); }
.badge.so { background: var(--orange-tint); color: var(--orange); }
.badge.blocked { background: var(--err-tint); color: var(--err); }
.stage { border: 1px solid var(--line); color: var(--muted); }
.due { margin-left: auto; font-size: .82rem; color: var(--muted); font-weight: 600; }
.due.late { color: var(--orange); }
.due.soon { color: var(--cobalt); }

/* chips */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: var(--r-control); padding: 8px 12px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .92rem; }
input, select, textarea { border: 1px solid var(--line); border-radius: var(--r-control); padding: 11px 12px; background: var(--card); font-weight: 400; font-size: 16px; width: 100%; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.segs { display: flex; gap: 6px; }
.seg { flex: 1; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; text-align: center; border: 1px solid var(--line); border-radius: var(--r-control); padding: 11px 6px; background: var(--card); cursor: pointer; }
.seg input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); }
.check { flex-direction: row; align-items: center; gap: 10px; }
.check input { width: 22px; height: 22px; }
.cust { display: flex; flex-direction: column; gap: 14px; }
.inline-form { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.inline-form > input, .inline-form > select { flex: 1 1 180px; width: auto; }
.inline-form > textarea { flex: 1 1 220px; width: auto; }
.w-ship .inline-form > select { min-width: 0; max-width: 100%; }
.w-ship .row { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; overflow-wrap: anywhere; }
.note-form > textarea { flex-basis: 100%; } .note-form > .btn { margin-left: auto; }
textarea[data-grow] { resize: none; overflow: hidden; min-height: 46px; line-height: 1.45; overflow-wrap: anywhere; }
.inline-form > label, .inline-form > .scan-wrap { flex: 1 1 220px; }

/* detail */
.bike-title { font-size: 1.4rem; margin: 6px 0 8px; text-transform: none; letter-spacing: 0; }
.next { background: var(--card); border: 2px solid var(--cobalt); border-radius: var(--r-feature); padding: 14px; margin: 14px 0; }
.next p { margin: 0 0 10px; }
.next .btn + .btn { margin-top: 8px; }
.warn { color: var(--orange); font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }
.error { background: var(--err-tint); color: var(--err); border-radius: var(--r-card); padding: 10px 14px; font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; margin: 0; }
.facts dt { font-size: .78rem; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.timeline li { border-left: 3px solid var(--sky); padding-left: 10px; }

/* confirm sheet */
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: grid; place-items: end center; z-index: 20; padding: 16px; }
.sheet-card { background: var(--card); color: var(--ink); border-radius: var(--r-feature); padding: 16px; width: 100%; max-width: 440px; }

.undo { display: block; margin: -4px 0 12px; font-size: .92rem; }
.pin { font-size: 2rem; letter-spacing: .6em; text-align: center; padding: 14px; }
.brand-block h1 { font-size: 1.25rem; }
.badge, .stage { font-family: 'Open Sans', sans-serif; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.cards > * { min-width: 0; }   /* long text wraps instead of pushing out of the card */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.card h3 { margin: 0; font-size: 1rem; }
.card p { margin: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.link-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.link-btn { text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; font-size: .9rem; color: var(--cobalt); }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.toolbar input { flex: 1; }
.login-unknown { color: var(--muted); }
.login-email_link_invoices { color: var(--orange); }
details summary { cursor: pointer; color: var(--cobalt); font-weight: 600; font-size: .9rem; }
.card .check { font-weight: 600; margin-top: 4px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--cobalt); color: #fff; display: inline-grid; place-items: center; font: 800 1rem 'Overpass', sans-serif; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: .8rem; }
.avatar.lg { width: 84px; height: 84px; font-size: 2rem; }
.me { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-name { font: 800 1.2rem 'Overpass', sans-serif; color: var(--navy); }
.profile-links { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.who-line { display: flex; align-items: center; gap: 10px; }
.photo-btn { flex-direction: row; justify-content: center; align-self: flex-start; }
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.form p { margin: 0; }

/* schedule */
.whos-in { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--cobalt); border-radius: var(--r-card); padding: 12px 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.whos-in h2 { margin: 0; font-size: 1.05rem; }
.whos-in .alert { margin: 0; }
.shift-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.shift-list.card { padding: 12px 14px; }
.shift-line { display: flex; gap: 10px; align-items: flex-start; }
.shift-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shift-main .btn.link { align-self: flex-start; padding: 2px 0; font-size: .82rem; }
.day-tag { font: 800 .8rem 'Overpass', sans-serif; text-transform: uppercase; color: var(--ink-2); min-width: 78px; padding-top: 2px; }
.off { color: var(--orange); font-weight: 600; }
.pending { color: var(--cobalt); font-style: italic; }
.status { font-size: .75rem; font-weight: 700; border-radius: var(--r-control); padding: 2px 8px; margin-left: 6px; }
.st-pending { background: var(--sky-tint); color: var(--cobalt); }
.st-approved { background: var(--ok-tint); color: var(--ok); }
.st-declined { background: var(--err-tint); color: var(--err); }
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-nav h2 { margin: 0; font-size: 1.1rem; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 10px; }
.day.is-today { border: 2px solid var(--cobalt); }
.day .alert { margin: 0; padding: 6px 10px; }
.time-pair { display: flex; gap: 10px; }
.time-pair label { flex: 1; }
.reg-row, .reg-head { display: grid; grid-template-columns: 76px 1fr 1fr; gap: 8px; align-items: center; }
.reg-row { padding: 4px 0; border-bottom: 1px solid var(--line); }
.reg-row input[type="time"] { min-width: 0; width: 100%; padding-left: 8px; padding-right: 4px; }
.reg-row:has(input[type="checkbox"]:not(:checked)) input[type="time"] { opacity: .35; }
.reg-notes label { margin-bottom: 8px; }
.plain { list-style: none; margin: 0; padding: 0; }
.form.card h3 { margin: 0; }
.card .actions { flex-wrap: wrap; margin-top: 6px; }
.shift-main .status { align-self: flex-start; margin: 2px 0 0; }

/* ---------- app shell: bottom bar on phones, sidebar on computers ---------- */
:root { --nav-h: 64px; --side-w: 232px; }
.content { min-width: 0; }
.content main { padding-bottom: calc(var(--nav-h) + 32px + env(safe-area-inset-bottom)); }
.top-row { padding: 8px 16px; }
.title img { height: 30px; }
.page-title { flex: 1; margin: 0; font-size: 1rem; color: var(--ink-2); letter-spacing: .06em; padding-left: 12px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-name { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; }

.mainnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -2px 10px rgba(1, 23, 49, .06); display: flex; padding: 4px 4px env(safe-area-inset-bottom); }
.nav-brand { display: none; }
.nav-item { flex: 1; position: relative; background: none; border: 0; color: var(--muted); cursor: pointer; min-height: var(--nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: var(--r-card);
  font: 800 .68rem 'Overpass', sans-serif; text-transform: uppercase; letter-spacing: .05em; -webkit-tap-highlight-color: transparent; }
.nav-item .ico { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.on { color: var(--cobalt); }
.nav-item.on .ico { stroke-width: 2.2; }
.nav-item.on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--cobalt); }
.nav-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--orange); color: #fff; font: 700 .7rem/18px 'Open Sans', sans-serif; letter-spacing: 0; }

/* Page tabs: a segmented bar that always fits (no sideways scrolling), with the add button
   beside it on wide screens and on its own full-width line on phones. */
.chips { scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.subnav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.subnav .chips { flex: 1 1 auto; display: flex; gap: 3px; overflow: visible; padding: 3px; background: var(--seg-bg);
  border-radius: var(--r-feature); max-width: 560px; }
.subnav .chip { flex: 1 1 0; min-width: 0; border: 0; background: transparent; border-radius: 9px; padding: 8px 6px;
  white-space: normal; line-height: 1.2; font-size: .86rem; text-align: center; color: var(--ink-2); }
.subnav .chip.on { background: var(--card); color: var(--navy); box-shadow: 0 1px 3px rgba(1, 23, 49, .16); font-weight: 700; }
.subnav .btn.primary { flex: none; margin-left: auto; min-height: 42px; padding: 8px 16px; font-size: .92rem; white-space: nowrap; }
@media (max-width: 599px) {
  .subnav { flex-direction: column; align-items: stretch; gap: 8px; }
  .subnav .chips { max-width: none; }
  .subnav .btn.primary { margin-left: 0; width: 100%; }
}

/* "Mark as received": reads as something to tap, not a status. */
.tick-box { display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px;
  border: 2px solid currentColor; border-radius: 4px; }
.stage-chips { margin-top: 2px; }

@media (min-width: 900px) {
  .mainnav { top: 0; right: auto; bottom: 0; width: var(--side-w); flex-direction: column; gap: 2px; padding: 16px 12px;
    border-top: 0; border-right: 1px solid var(--line); box-shadow: none; }
  .nav-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: none; border: 0; cursor: pointer; padding: 4px 10px 18px; margin-bottom: 8px; border-bottom: 3px solid var(--cobalt); }
  .nav-brand img { height: 38px; }
  .nav-brand span { font: 800 .72rem 'Overpass', sans-serif; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
  .nav-item { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 0 12px; font-size: .85rem; }
  .nav-item.on { background: var(--cobalt-tint); }
  .nav-item.on::before { top: 10px; bottom: 10px; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .nav-badge { position: static; margin-left: auto; }
  .content { margin-left: var(--side-w); }
  .content main { padding-bottom: 48px; max-width: 960px; }
  .top { border-bottom: 1px solid var(--line); }
  .top-row { max-width: 960px; padding: 12px 16px; }
  .title { display: none; }
  .page-title { border-left: 0; padding-left: 0; font-size: 1.25rem; color: var(--navy); }
}
@media (max-width: 899px) { .me-name { display: none; } .me { padding: 3px; } .me:has(.me-switch) { padding-right: 12px; } }
.me-switch { font-weight: 700; color: var(--cobalt); }

/* SOPs */
.cat { font-size: .85rem; color: var(--ink-2); margin: 18px 0 8px; }
.sop-row .row-sub .badge { margin-right: 4px; }
.sop { gap: 10px; }
.sop-title { margin: 0; font-size: 1.3rem; text-transform: none; letter-spacing: 0; }
.md { line-height: 1.55; }
.md h3 { font-size: 1rem; margin: 20px 0 6px; }
.md h4 { font-size: .9rem; margin: 16px 0 4px; text-transform: uppercase; color: var(--ink-2); }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.md .callout { background: var(--cobalt-tint); border-left: 4px solid var(--cobalt); border-radius: var(--r-card); padding: 10px 12px; margin: 0 0 12px; }
.sop-meta { border-top: 1px solid var(--line); padding-top: 8px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.45; }

/* receiving */
.recv-card { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--orange); border-radius: var(--r-card); padding: 12px 14px; color: var(--navy); }
.recv-card > span:last-child { display: flex; flex-direction: column; }
.ship.s-delivered { border-left: 5px solid var(--orange); }
.ship.s-received { opacity: .85; }
.ship-st { white-space: nowrap; }
.ship-st.st-ordered { background: var(--cream); color: var(--navy); }
.ship-st.st-shipped, .ship-st.st-out_for_delivery { background: var(--sky-tint); color: var(--cobalt); }
.ship-st.st-delivered { background: var(--orange-tint); color: var(--orange); }
.ship-st.st-received { background: var(--ok-tint); color: var(--ok); }
.ship-st.st-cancelled { background: var(--err-tint); color: var(--err); }
.ship .actions { margin-top: 4px; }
.plan-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.plan-form > p { grid-column: 1 / -1; margin: 0; }
.plan-form input { width: 100%; min-width: 0; }
.plan-btns { grid-column: 1 / -1; display: flex; gap: 8px; }

/* warranty */
@media (max-width: 899px) { .nav-item.desktop-only { display: none; } }
.w-card { border-left-color: var(--cobalt); }
.w-st { white-space: nowrap; }
.w-new, .w-gathering { background: var(--cream); color: var(--navy); }
.w-blocked { background: var(--err-tint); color: var(--err); }
.w-submitted, .w-waiting_vendor, .w-parts_ordered { background: var(--sky-tint); color: var(--cobalt); }
.w-scheduled { background: var(--orange-tint); color: var(--orange); }
.w-completed { background: var(--ok-tint); color: var(--ok); }
.w-denied { background: var(--line); color: var(--ink-2); }
.claim-row .row-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.claim .next { background: var(--workshop, #F5F7FA); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 12px; }
.claim .next.late-box { border-color: var(--err); background: var(--err-tint); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo-grid figure { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-control); background: var(--line); display: block; }
.photo-grid figcaption { font-size: .75rem; color: var(--ink-2); }
.photo-add { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 96px; border: 2px dashed var(--line);
  border-radius: var(--r-control); color: var(--cobalt); font-weight: 700; cursor: pointer; padding: 8px; }
.photo-add.big-add { min-height: 72px; font-size: 1rem; background: var(--cobalt-tint); border-color: var(--cobalt); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 16px; margin: 0; }
.facts dt { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 0; }
.claim-row .late { color: var(--err); font-weight: 600; } .claim-row .soon { color: var(--cobalt); font-weight: 600; }

/* assembly timer */
.timer { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 10px 14px; margin-bottom: 6px; }
.timer.running { border-color: var(--cobalt); background: var(--cobalt-tint); }
.timer-num { font: 800 1.6rem 'Overpass', sans-serif; font-variant-numeric: tabular-nums; color: var(--navy); }
.timer .btn { min-width: 110px; }
.sec-toggles { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }

/* Push notifications */
.nudge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--sky-tint); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 14px; }
.nudge span { flex: 1 1 200px; }
.push-card { margin-top: 16px; }
.push-card ol { margin: 4px 0 0; padding-left: 20px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: var(--r-control); font-size: .8rem; font-weight: 600; }
.ok-pill { background: var(--ok-tint); color: var(--ok); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* To-dos and chores */
.tasks-today { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.tasks-today h2 { margin: 0; }
.card.task .actions { margin-top: 2px; }
.card.is-done { opacity: .72; }
.card.is-done h3 { text-decoration: line-through; text-decoration-thickness: 1px; }
.ask { display: flex; flex-direction: column; gap: 6px; width: 100%; background: var(--cream-tint); border-radius: 10px; padding: 10px; }
.badge.contents-bikes { background: var(--cobalt-tint); color: var(--cobalt); }
.badge.contents-parts { background: var(--orange-tint); color: var(--orange); }
.badge.contents-mixed { background: var(--sky-tint); color: var(--navy); }
@media (max-width: 899px) {
  .nav-item { min-width: 0; padding: 0 1px; letter-spacing: -.01em; font-size: .6rem; text-transform: none; font-weight: 700; }
  .nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Eight sections on a phone: a touch tighter so "Customers" and "Receiving" fit. */
@media (max-width: 430px) { .mainnav.many .nav-item { font-size: .54rem; letter-spacing: -.02em; } }

/* Long words and web addresses wrap instead of widening the page. */
.facts > div { min-width: 0; }
.facts dd, .card p, .card h3, .row-bike, .row-sub, .sheet-card p { overflow-wrap: anywhere; }
.nudge { margin-bottom: 12px; }
.sheet-card { max-width: min(420px, calc(100vw - 32px)); }
.task-open { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.task-open .card-head { width: 100%; }
.task-open:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 6px; }
.steps { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); padding: 10px 14px; margin: 12px 0; }
.steps legend { font-weight: 700; padding: 0 4px; }
.steps .check:has(input:checked) { color: var(--muted); text-decoration: line-through; }
.task-details { overflow-wrap: anywhere; margin: 10px 0; }
.btn.back { margin-bottom: 6px; }
.segs { flex-wrap: wrap; }
.danger-link { color: var(--err); }
.badge.w-lost { background: var(--line); color: var(--ink-2); }
.chips select { min-height: 36px; border-radius: var(--r-control); border: 1px solid var(--line); padding: 0 10px; background: var(--card); font: inherit; font-size: .85rem; }

/* Warranty: Bike vs Part / accessory. Fields marked k-bike / k-part show for that kind only;
   k-any labels show until a kind is picked. */
.kind-pick { border: 0; padding: 0; margin: 0; }
.kind-pick legend { font-weight: 700; margin-bottom: 6px; }
.form:not([data-kind="bike"]) .k-bike, .form:not([data-kind="part"]) .k-part { display: none !important; }
.form[data-kind="bike"] .k-any, .form[data-kind="part"] .k-any { display: none; }
.ebike-more summary { cursor: pointer; font-weight: 600; color: var(--cobalt); padding: 4px 0; }
.ebike-more .time-pair { margin-top: 10px; }
.receipt-check { align-self: end; min-height: 46px; }
.needs h3 { margin-top: 0; }
.needs.all-ok { border-left: 4px solid var(--ok); }
.needs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.needs-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.need-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center;
  justify-content: center; font-size: .75rem; font-weight: 800; color: #fff; flex: none; }
.ok-item .need-dot { background: var(--ok); border-color: var(--ok); }
.ok-item { color: var(--muted); }

/* Order emails copied into the app (Receiving). */
.mail-sheet { max-height: 85vh; overflow-y: auto; max-width: min(640px, calc(100vw - 32px)) !important; }
.mail-sheet .card-head { position: sticky; top: -16px; background: var(--card); padding: 4px 0 8px; z-index: 1; }
.mail + .mail { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.mail h4 { margin: 0 0 2px; font-size: 1rem; overflow-wrap: anywhere; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.45; }

/* Need-to-order list (Hub). */
.need-form { display: flex; flex-direction: column; gap: 10px; }
.card-picks { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-wrap .chip { white-space: normal; text-align: left; }
.need-group h3 { margin: 0 0 6px; }
.need-list { list-style: none; margin: 0; padding: 0; }
.need { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.need:first-child { border-top: 0; }
.need-main { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.need-btns { display: flex; gap: 6px 16px; align-items: center; flex-wrap: wrap; }
.need.is-ordered .need-main strong { color: var(--muted); text-decoration: line-through; }
details.card > summary { cursor: pointer; font-weight: 700; }


/* ---------- Dark theme (My profile → Theme). Same layout, darker tokens. ---------- */
:root[data-theme="dark"] {
  --cobalt: #8DB2FF;
  --navy: #EAF0F8;
  --sky: #8CC4FF;
  --orange: #F2A26B;
  --bg: #0B1422;
  --card: #15212F;
  --ink: #E6ECF4;
  --ink-2: #BAC6D6;
  --muted: #8E9DB2;
  --line: #2B3B50;
  --cobalt-tint: #1B2C49;
  --sky-tint: #17293F;
  --orange-tint: #3B2616;
  --cream: #3D3220;
  --cream-tint: #2A2417;
  --ok: #74D196;
  --ok-tint: #143020;
  --err: #F4878C;
  --err-tint: #3B1A1D;
  --seg-bg: #0E1928;
  --btn-bg: #2E62D3;
  --workshop: #0F1A28;
  --focus: #8CC4FF;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
  --cobalt: #8DB2FF;
  --navy: #EAF0F8;
  --sky: #8CC4FF;
  --orange: #F2A26B;
  --bg: #0B1422;
  --card: #15212F;
  --ink: #E6ECF4;
  --ink-2: #BAC6D6;
  --muted: #8E9DB2;
  --line: #2B3B50;
  --cobalt-tint: #1B2C49;
  --sky-tint: #17293F;
  --orange-tint: #3B2616;
  --cream: #3D3220;
  --cream-tint: #2A2417;
  --ok: #74D196;
  --ok-tint: #143020;
  --err: #F4878C;
  --err-tint: #3B1A1D;
  --seg-bg: #0E1928;
  --btn-bg: #2E62D3;
  --workshop: #0F1A28;
  --focus: #8CC4FF;
  color-scheme: dark;
  }
}
/* Things that use navy as a background with white text keep a strong blue in the dark. */
:root[data-theme="dark"] .chip.on, :root[data-theme="dark"] .seg input:checked + span { background: var(--btn-bg); border-color: var(--btn-bg); color: #fff; }
:root[data-theme="dark"] .subnav .chip.on { background: var(--card); color: var(--ink); border-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
:root[data-theme="dark"] .r-sold, :root[data-theme="dark"] .avatar { background: var(--btn-bg); color: #fff; }
:root[data-theme="dark"] .mainnav { box-shadow: 0 -2px 10px rgba(0,0,0,.4); }
:root[data-theme="dark"] img.logo-light { display: none; }
:root[data-theme="dark"] .title img.logo-dark, :root[data-theme="dark"] .nav-brand img.logo-dark { display: block; }
:root[data-theme="dark"] .sheet { background: rgba(0,0,0,.6); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { color: var(--ink); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .chip.on, :root[data-theme="auto"] .seg input:checked + span { background: var(--btn-bg); border-color: var(--btn-bg); color: #fff; }
  :root[data-theme="auto"] .subnav .chip.on { background: var(--card); color: var(--ink); border-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
  :root[data-theme="auto"] .r-sold, :root[data-theme="auto"] .avatar { background: var(--btn-bg); color: #fff; }
  :root[data-theme="auto"] .mainnav { box-shadow: 0 -2px 10px rgba(0,0,0,.4); }
  :root[data-theme="auto"] img.logo-light { display: none; }
  :root[data-theme="auto"] .title img.logo-dark, :root[data-theme="auto"] .nav-brand img.logo-dark { display: block; }
  :root[data-theme="auto"] .sheet { background: rgba(0,0,0,.6); }
  :root[data-theme="auto"] input, :root[data-theme="auto"] select, :root[data-theme="auto"] textarea { color: var(--ink); }
}
img.logo-dark, .title img.logo-dark, .nav-brand img.logo-dark { display: none; }
.theme-pick { border: 0; padding: 0; margin: 0; }
.theme-pick legend { font-weight: 700; margin-bottom: 6px; }

/* Build times (Builds → Build times). */
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.stat .q-num { font-size: 1.6rem; color: var(--navy); }
table.times { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.times th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 6px 6px 0; }
table.times td { padding: 8px 6px 8px 0; border-top: 1px solid var(--line); vertical-align: top; }

/* Search (magnifier in the header). */
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { background: var(--cobalt-tint); border: 0; color: var(--navy); border-radius: 999px; width: 40px; height: 40px; display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn .ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.big-search { font-size: 17px; padding: 13px 14px; }
.search-group h2 { display: flex; align-items: baseline; gap: 8px; }

/* No connection: last good copy on screen. */
.offline-bar { max-width: 760px; margin: 10px auto 0; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--orange-tint); color: var(--ink); border-radius: var(--r-card); font-size: .9rem; flex-wrap: wrap; }
@media (max-width: 791px) { .offline-bar { margin: 10px 16px 0; } }

/* Barcode scanning (📷 next to serial fields). */
.scan-wrap { display: flex; gap: 6px; align-items: stretch; }
.scan-wrap input { flex: 1; min-width: 0; }
.scan-btn { flex: none; min-width: 48px; padding: 0 10px; font-size: 1.1rem; }
.scan-sheet { position: fixed; inset: 0; z-index: 30; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.scan-view { position: relative; width: 100%; max-width: 560px; aspect-ratio: 4 / 3; background: #111; border-radius: 12px; overflow: hidden; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; left: 8%; right: 8%; top: 36%; bottom: 36%; border: 3px solid #60AFFF; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); }
.scan-hint { color: #fff; text-align: center; max-width: 480px; margin: 0; }
.scan-hint.scan-err { color: #FFB4A8; }
.scan-actions .btn { min-width: 140px; }

/* Long links or numbers never push the page wider than the screen. */
main { overflow-wrap: break-word; }
.claim, .claim .next, .timeline li, .timeline li div, .watch, .card .facts dd, .ok, .error { overflow-wrap: anywhere; min-width: 0; }
.timeline li { max-width: 100%; }

/* Warranty: send to vendor + emails on the timeline. */
.send-card .link-row { margin-top: 10px; }
.ok-line { color: var(--ok); font-weight: 600; }
.tl-mail details summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
.tl-mail.in { border-left-color: var(--orange) !important; }
.tl-mail .mail-body { margin-top: 6px; background: var(--bg); border-radius: var(--r-control); padding: 8px 10px; }

/* Shop message board */
.post-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-head strong { font-size: .95rem; }
.badge.pinned-b { background: var(--cream-tint); color: var(--orange); border: 1px solid var(--cream); }
.badge.new { background: var(--cobalt); color: #fff; vertical-align: middle; text-transform: none; letter-spacing: 0; }
.post-body { margin: 8px 0 2px; overflow-wrap: anywhere; }
.post-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 4px; }
.post-tools .btn { white-space: nowrap; }
.post.pinned { border-left: 4px solid var(--orange); }
.replies { margin: 10px 0 0 14px; padding-left: 12px; border-left: 2px solid var(--line); display: grid; gap: 10px; }
.reply .post-body { margin-top: 4px; }
.reply-form { margin-top: 10px; }
.reply-form input { flex: 1; min-width: 0; }
.compose { margin-bottom: 14px; }
.post-mini { text-align: left; }
.post-snip { margin-top: 4px; overflow-wrap: anywhere; color: var(--ink); }
.board-card .card-head h2 { display: flex; align-items: center; gap: 8px; }

/* Call / text buttons next to customer phone numbers */
.contact-btns { display: inline-flex; gap: 6px; margin-left: 6px; vertical-align: middle; }
.contact-btns .btn { padding: 4px 12px; min-height: 36px; display: inline-flex; align-items: center; font-size: .85rem; text-decoration: none; }
.text-sheet textarea { width: 100%; }
.text-sheet a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.cards.board { grid-template-columns: 1fr; max-width: 760px; }
.compose { max-width: 760px; }

/* Hub: a page of tiles, then each area with a way back */
/* Hub (Nov 29, 2026): short rows, not big tiles, so the whole Hub fits on about one phone screen. Icon, name and
   one-line hint on the left, the number that matters on the right. */
.hub-tiles { display: grid; grid-template-columns: 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.hub-tile { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 1px; align-items: center;
  text-align: left; cursor: pointer; background: var(--card); color: var(--ink); border: 0; border-top: 1px solid var(--line); border-radius: 0;
  padding: 10px 14px; min-height: 56px; font: inherit; }
.hub-tile:first-child { border-top: 0; }
.hub-tile:hover { background: var(--bg, #f4f6fa); }
.hub-tile .ico { grid-row: 1 / 3; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--cobalt); margin: 0; }
.hub-label { grid-column: 2; font-family: 'Overpass', 'Open Sans', sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--navy); font-size: .92rem; }
.hub-hint { grid-column: 2; font-size: .8rem; color: var(--muted); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-stat { grid-column: 3; grid-row: 1 / 3; font-size: .8rem; font-weight: 700; color: var(--ink-2); text-align: right; max-width: 9.5em; }
.hub-stat:empty { display: none; }
.hub-tile.alert { box-shadow: inset 4px 0 0 var(--orange); }
.hub-tile.alert .hub-stat { color: var(--orange); }
.hub-back { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.hub-back .back { margin: 0; padding-left: 0; }
.hub-jump { display: none; }
@media (min-width: 900px) { .hub-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1000px; } .hub-tile:nth-child(2) { border-top: 0; } .hub-tile:nth-child(even) { border-left: 1px solid var(--line); } .hub-hint { white-space: normal; } }
@media (min-width: 900px) { .hub-jump { display: flex; gap: 6px; flex-wrap: wrap; } }

/* Schedule: shift bars, the week table on computers, day cards on phones */
.tbar { position: relative; height: 6px; border-radius: 3px; background: var(--seg-bg); margin: 5px 0 3px; max-width: 260px; overflow: hidden; }
.tbar span { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.tbar .tb-open { background: var(--line); }
.tbar .tb-shift { background: var(--cobalt); }
.tbar .tb-out { background: var(--orange); }
.sched-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.lg { display: inline-block; width: 18px; height: 6px; border-radius: 3px; vertical-align: middle; }
.lg-shift { background: var(--cobalt); } .lg-out { background: var(--orange); }
.roster-wrap { display: none; }
@media (min-width: 900px) {
  .roster-wrap { display: block; overflow-x: auto; margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
  .days, .wk { display: none; }
}
.roster { border-collapse: collapse; width: 100%; min-width: 700px; table-layout: fixed; font-size: .9rem; }
.roster col.r-name-col { width: 130px; }
.subnav .chip .seg-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 9px; background: var(--orange); color: #fff; font-size: .72rem; line-height: 18px; }
@media (min-width: 600px) { .subnav .chip { white-space: nowrap; } }   /* phones: long tab names wrap instead of pushing the page sideways */
.roster th, .roster td { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
.roster thead th { background: var(--bg); font-weight: 400; }
.roster thead th:first-child, .roster tbody th { border-left: 0; }
.roster tbody th { white-space: nowrap; font-weight: 700; }
.r-who { display: inline-flex; align-items: center; gap: 8px; }
.r-day { font-family: 'Overpass', 'Open Sans', sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--navy); }
.r-time { font-weight: 600; white-space: nowrap; }
.r-gap { margin-top: 4px; font-size: .78rem; font-weight: 700; color: var(--orange); }
.roster .is-today { background: var(--cobalt-tint); }
.roster thead th.is-today { box-shadow: inset 0 3px 0 var(--cobalt); }
.roster td.r-off { background: var(--orange-tint); }
.roster .r-count th, .roster .r-count td { border-bottom: 0; color: var(--muted); font-weight: 700; }
.roster .tbar { max-width: none; }
.roster .btn.link.small { padding: 2px 0; min-height: 0; display: block; }
form[data-form="change"] { scroll-margin-top: 90px; }
.stage-chips { flex-wrap: wrap; overflow: visible; }
.stage-chips .chip { padding: 7px 11px; }

/* Team cards */
.person { display: flex; flex-direction: column; gap: 8px; }
.person-head { display: flex; align-items: center; gap: 12px; }
.person-id { flex: 1; min-width: 0; }
.person-id h3 { margin: 0; }
.person-contact { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.person-email { color: var(--ink-2); overflow-wrap: anywhere; }
.person-line { margin: 0; }
.person-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: var(--r-control); background: var(--cobalt-tint); color: var(--cobalt); }
.tag-muted { background: var(--seg-bg); color: var(--muted); }
.person-settings { border-top: 1px solid var(--line); padding-top: 8px; }
.person-settings summary { cursor: pointer; font-weight: 700; color: var(--cobalt); font-size: .92rem; }
.set-group { margin-top: 10px; }
.set-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.sec-toggles.col { flex-direction: column; }
.person-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.person-actions .btn.small { min-height: 38px; padding: 6px 14px; font-size: .9rem; }
.person-remove { margin-left: auto; }
.btn.link.danger-link, .btn.link.danger-link:hover { color: var(--err); }
.cards.team-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
/* Team > a person > Settings: the open card takes the whole row; four panels flow side by side (Nov 21, 2026) */
.team-cards .person:has(.person-settings[open]) { grid-column: 1 / -1; }
.person-settings summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; }
.person-settings summary::-webkit-details-marker { display: none; }
.person-settings summary::before { content: "\25B8"; font-size: .8em; transition: transform .15s; }
.person-settings[open] summary::before { transform: rotate(90deg); }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; margin-top: 10px; align-items: start; }
.set-panel { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--seg-bg); }
.set-panel h4 { margin: 0 0 2px; font-size: .8rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.set-panel > .set-hint { margin: 0 0 8px; }
.set-hint { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; line-height: 1.3; }
.set-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.set-pill { position: relative; display: inline-flex; cursor: pointer; }
.set-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.set-pill span { padding: 6px 12px; border-radius: var(--r-control); border: 1px solid var(--line); background: var(--card, #fff); font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.set-pill input:checked + span { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.set-pill input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.set-row { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); cursor: pointer; font-weight: 400; }
.set-panel h4 + .set-row { border-top: 0; }
.set-row input { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.set-name { font-weight: 600; display: block; }

/* Time off over several days */
.date-pair { display: flex; gap: 10px; }
.date-pair label { flex: 1; min-width: 0; }
.date-pair input { width: 100%; min-width: 0; box-sizing: border-box; }
.time-pair[hidden] { display: none; }

/* App feedback */
.fb-cta { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--ink); margin-bottom: 14px; }
.fb-cta:hover { border-color: var(--cobalt); }
.badge.fb-problem { background: var(--orange-tint); color: var(--orange); }
.badge.fb-idea { background: var(--cobalt-tint); color: var(--cobalt); }
.status.st-fb-new { color: var(--orange); }
.status.st-fb-planned { color: var(--cobalt); }
.status.st-fb-done { color: var(--ok, #1a7f37); }
.status.st-fb-wont { color: var(--muted); }
.fb.fb-done, .fb.fb-wont { opacity: .8; }
.fb-reply { background: var(--seg-bg); border-radius: 8px; padding: 8px 10px; margin: 8px 0 0; }

/* Schedule: month view */
.month-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 4px 0 10px; }
.month-tools label { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.month-tools select { width: auto; }
.month-tools select { min-height: 38px; }
.month { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.mhead { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding-bottom: 2px; }
.mcell { position: relative; min-height: 64px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px;
  padding: 4px 4px 3px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer; font: inherit; overflow: hidden; }
.mcell .md { font-size: .8rem; font-weight: 700; }
.mcell .mn { position: absolute; top: 4px; right: 5px; font-size: .7rem; font-weight: 700; color: var(--muted); }
.mcell .moff { display: flex; flex-wrap: wrap; gap: 2px; margin-top: auto; }
.mcell.out-month { background: transparent; border-style: dashed; opacity: .45; }
.mcell.past { opacity: .6; }
.mcell.is-today { box-shadow: inset 0 0 0 2px var(--cobalt); }
.mcell.sel { border-color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.mcell.short { background: var(--err-tint, #FDECEA); border-color: var(--err); }
.mcell.short .mn { color: var(--err); }
.mcell.who-off { background: var(--orange-tint); border-color: var(--orange); }
.ini { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 3px; border-radius: 9px;
  font-style: normal; font-size: .62rem; font-weight: 800; letter-spacing: .02em; }
.ini.off { background: var(--orange); color: #fff; }
.ini.part { border: 1.5px solid var(--orange); color: var(--orange); }
.ini.ask { border: 1.5px dashed var(--muted); color: var(--muted); }
.sched-legend .ini { vertical-align: middle; }
.alert.low { background: var(--err-tint, #FDECEA); color: var(--err); border-color: var(--err); }
.roster .r-low { color: var(--err); }
@media (min-width: 700px) { .mcell { min-height: 92px; padding: 6px; } .mcell .md { font-size: .95rem; } .ini { font-size: .7rem; height: 20px; min-width: 24px; } }
.avatar.two { font-size: .85rem; letter-spacing: -.02em; }
.avatar.sm.two { font-size: .62rem; }
.avatar.lg.two { font-size: 1.7rem; }

/* Need to order: scan, photos, urgent */
.scan-big { width: 100%; margin-bottom: 12px; min-height: 48px; font-weight: 700; }
.need-more { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 4px 0 10px; }
.need-more summary { cursor: pointer; font-weight: 700; color: var(--cobalt); }
.need-more[open] summary { margin-bottom: 8px; }
.need-photo { flex: none; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); display: block; }
.need-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.need.urgent { border-left: 4px solid var(--err); padding-left: 10px; }
.badge.urgent-b { background: var(--err-tint); color: var(--err); }
.upc-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.need-group .card-head { margin-bottom: 4px; }
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.signin-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* Warranty: keeping the customer up to date */
.badge.cu-due { background: var(--orange-tint); color: var(--orange); }
.cu-card h3 { margin-bottom: 4px; }
.cu-form { margin-top: 10px; }
.cu-list { list-style: none; margin: 14px 0 0; padding: 0; }
.cu-list li { padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.cu-list li > span { white-space: normal; display: block; }
.cu-list li.cu-failed > span { color: var(--err); }
.seg input:disabled + span { opacity: .45; cursor: not-allowed; }

/* Expense receipts */
.rcpt-add { width: 100%; margin-bottom: 14px; }
.rcpt-photos { display: grid; gap: 8px; }
.rcpt-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.rcpt-thumb { position: relative; width: 72px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center; flex: none; }
.rcpt-thumb a { display: grid; place-items: center; width: 100%; height: 100%; color: inherit; text-decoration: none; }
.rcpt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rcpt-pdf { font-weight: 700; font-size: 13px; color: var(--muted); }
.rcpt-x { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 13px; cursor: pointer; }
.rcpt-paid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.rcpt-paid .seg span { width: 100%; text-align: left; }
.rcpt { display: flex; gap: 12px; align-items: flex-start; }
.rcpt > .rcpt-thumbs { flex: none; max-width: 160px; }
.rcpt .rcpt-thumb { width: 60px; height: 80px; }
.rcpt-body { flex: 1; min-width: 0; }
.rcpt-top { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.rcpt-purpose { margin-top: 4px; overflow-wrap: anywhere; }
.rcpt-q { background: var(--orange-tint); color: var(--orange); border-radius: 8px; padding: 8px 10px; margin: 8px 0 0; }
.st-rcpt-new, .st-rcpt-filed { background: var(--sky-tint); color: var(--cobalt); }
.st-rcpt-question { background: var(--orange-tint); color: var(--orange); }
.st-rcpt-reconciled { background: var(--ok-tint); color: var(--ok); }
.rcpt-reconciled { opacity: .85; }
.rcpt-cats { margin-top: 18px; }
.rcpt-cats summary { cursor: pointer; }
.rcpt-cat-row { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr auto auto; gap: 8px; align-items: center; margin-top: 8px; }
.rcpt-cat-row.off input[name="name"] { text-decoration: line-through; opacity: .7; }
@media (max-width: 700px) {
  .rcpt-cat-row { grid-template-columns: 1fr 1fr; }
  .rcpt > .rcpt-thumbs { max-width: 64px; flex-direction: column; }
  .rcpt-top .status { margin-left: 0; }
}

/* "A new version is ready" bar (installed apps that stay open) */
#update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--navy, #011731); color: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); width: max-content; max-width: calc(100vw - 32px); font-size: 15px; }
@media (min-width: 900px) { #update-bar { bottom: 24px; } }
.rcpt-items { margin-top: 6px; }
.rcpt-items summary { cursor: pointer; color: var(--muted); }
.rcpt-items ul { list-style: none; margin: 6px 0 0; padding: 0; }
.rcpt-items li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rcpt-read-ok { color: var(--ok); }
.rcpt-read-err { color: var(--orange); }

/* Notifications inbox */
.bell-btn { position: relative; }
.bell-count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--orange, #d9480f); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.card.notice, .cards .card.notice { display: flex; flex-direction: row; align-items: flex-start; gap: 4px; padding: 0; }
.notice-main { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: flex-start; text-align: left; background: none; border: 0; padding: 12px 4px 12px 14px; color: inherit; font: inherit; cursor: pointer; }
.notice-ico { font-size: 20px; line-height: 1.2; flex: none; }
.notice-text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.notice.unread { border-left: 4px solid var(--cobalt); }
.notice:not(.unread) .notice-text strong { font-weight: 600; opacity: .85; }
.notice-x { align-self: flex-start; flex: none; width: 36px; height: 36px; margin: 8px 8px 0 0; padding: 0; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 15px; }
@media (hover: hover) { .notice-x:hover { background: var(--bg); color: var(--ink, inherit); } }
.cards.notice-list { grid-template-columns: 1fr; max-width: 760px; gap: 8px; }
.empty-inbox { text-align: center; padding: 40px 16px; }

/* Invoices at receiving */
.inv-missing { color: var(--orange); font-weight: 600; }
.choice-list { flex-direction: column; align-items: stretch; }
.choice-list .btn { width: 100%; }

/* Claude helpers */
.ai-row { display: grid; gap: 6px; margin-bottom: 6px; }
.ai-row .link-row, .ai-row { justify-items: start; }
.ai-btn { border: 1px dashed var(--cobalt); }
.need-snap { width: 100%; margin-bottom: 4px; }
.sop-ask { display: grid; gap: 8px; margin-bottom: 14px; }
.sop-answer { border-top: 1px solid var(--line); padding-top: 10px; }

/* Customer conversation on a claim */
.cu-waiting { background: var(--orange-tint); color: var(--orange); border-radius: 10px; padding: 8px 12px; margin: 6px 0; }
.badge.cu-replied { background: var(--orange); color: #fff; }
.chat { display: grid; gap: 8px; margin: 10px 0; }
.bubble { max-width: 88%; padding: 8px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); overflow-wrap: anywhere; }
.bubble > span { display: block; }
.bubble > div { white-space: pre-wrap; }
.bubble.shop { justify-self: end; background: var(--cobalt-tint); border-color: transparent; }
.bubble.customer { justify-self: start; }
.chat-pics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chat-pics img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.cu-photos { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Lists that read better one per row on wide screens (Nov 7 layout pass). */
.cards.rcpt-list, .cards.ship-list { grid-template-columns: 1fr; }
.card.rcpt { flex-direction: row; }
.rcpt > .rcpt-thumbs { flex-direction: column; }
.post-tools a.btn { text-decoration: none; }
.rcpt-top strong { overflow-wrap: anywhere; }
.ship .link-row .btn { white-space: nowrap; }

/* Bookings: test rides and service drop-offs (sql/037). */
.bk-time { font-variant-numeric: tabular-nums; color: var(--cobalt); margin-right: 4px; }
.badge.bk-test_ride { background: var(--sky-tint); color: var(--cobalt); }
.badge.bk-dropoff { background: var(--orange-tint); color: var(--orange); }
.badge.bk-st-booked { background: var(--sky-tint); color: var(--cobalt); }
.badge.bk-st-done { background: var(--ok-tint); color: var(--ok); }
.badge.bk-st-no_show, .badge.bk-st-cancelled { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.bk-row.bk-cancelled .row-bike { text-decoration: line-through; opacity: .7; }
.bk-day { margin-top: 14px; }
.bk-kinds { margin: -4px 0 8px; }
.bk-when { margin: 4px 0 0; font-size: 1.35rem; }
.bk-name { margin: 2px 0 4px; font-size: 1.05rem; }
.bk-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0; }
.bk-dl dt { color: var(--muted); font-size: .88rem; } .bk-dl dd { margin: 0; overflow-wrap: anywhere; }
.bk-slot-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 4px; }
.bk-slot-pick .chip { padding: 6px 10px; font-size: .85rem; }
.bk-slot-pick .chip.full { opacity: .55; }
.bk-waiting { display: block; width: 100%; text-align: left; border: 0; cursor: pointer; font: inherit; }
ul.plain { list-style: none; margin: 0 0 12px; padding: 0; }
.bk-days li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.bk-days li:first-child { border-top: 0; }
/* test ride prep sheet + bike list */
/* After the test ride (sql/191): one screen, chips only */
.ar h2 { margin: 0 0 2px; } .ar h3 { font-size: 15px; margin: 16px 0 8px; }
.ar .chip { min-height: 44px; white-space: normal; text-align: left; }
.ar-add { display: flex; gap: 8px; margin-top: 8px; } .ar-add input { flex: 1 1 auto; min-width: 0; }
.ar-picks { margin-top: 8px; } .ar-picks .chip-wrap { margin-top: 4px; }
.bk-after.rs h3 { font-size: 15px; margin: 0 0 6px; } .rs-cand { padding: 6px 0; border-top: 1px solid var(--line); } .rs-cand:first-of-type { border-top: 0; }
.rs-cand .actions, .bk-after.rs .actions { margin-top: 6px; }
.fr .card-head { align-items: center; } .fr .card-head h3 { flex: 1; text-align: center; margin: 0; }
.fr-chips { margin: 12px 0 8px; }
.misses details { margin: 8px 0; } .miss-list { margin: 6px 0 0; padding-left: 22px; } .miss-list li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.fr-funnel { margin: 8px 0 0; padding: 0; list-style: none; } .fr-funnel li { margin: 4px 0; }
.bk-after { margin: 10px 0; padding: 10px 14px; border-radius: var(--r-control); background: var(--sky-tint); } .bk-after p { margin: 0; }
.bk-prep { margin: 10px 0; padding: 12px 14px; border-radius: var(--r-control); background: var(--sky-tint); }
.bk-prep h3 { font-size: 15px; margin: 8px 0 4px; } .bk-prep h3:first-child { margin-top: 0; }
.bk-prep .plain-list { margin: 0 0 6px; padding-left: 18px; } .bk-prep .plain-list li { margin: 3px 0; }
.bk-prep details { margin-top: 8px; } .bk-prep summary { cursor: pointer; }
.bk-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.trb-list li { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.trb-list li:first-child { border-top: 0; } .trb-list li > span { min-width: 0; }
.trb-tags { display: block; overflow-wrap: anywhere; }
.trb-list li:has(> form) { display: block; }
.trb-form { margin: 8px 0; }
.bk-answers { margin: 8px 0 0; } .bk-answers dt { font-size: 13px; color: var(--muted); margin-top: 8px; } .bk-answers dd { margin: 2px 0 0; overflow-wrap: anywhere; }
/* time clock */
.tc-card .tc-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.tc-card.on { border-color: var(--ok); box-shadow: inset 4px 0 0 var(--ok); }
.tc-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tc-nav { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 4px 0 12px; }
.tc-days { margin: 10px 0; } .tc-day { padding: 10px 0; border-top: 1px solid var(--line); } .tc-day:first-child { border-top: 0; }
.tc-day-head { display: flex; justify-content: space-between; gap: 8px; }
.tc-ent { margin: 4px 0; } .tc-ent .pill { margin-left: 4px; }
.tc-fix { margin: 8px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--card); }
.tc-pend li { margin: 6px 0; }
.tc-table { width: 100%; border-collapse: collapse; } .tc-table th, .tc-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tc-table th { font-size: .85rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.tc-total { margin-top: 8px; }
/* Six or more segments (Schedule for Jordan/Aidan): two neat rows on phones instead of words breaking */
@media (max-width: 599px) { .subnav .chips:has(> .chip:nth-child(5)) { flex-wrap: wrap; } .subnav .chips:has(> .chip:nth-child(5)) > .chip { flex: 1 1 30%; white-space: nowrap; } }   /* 5+ tabs: rows of three on phones */
.tc-nav .tc-title { display: flex; flex-direction: column; line-height: 1.25; }
/* Today: compact Builds card */
.builds-card .card-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.builds-card .card-head h3 { margin: 0; }
.b-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 12px 0 6px; }
.b-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-top: 4px solid var(--line);
  border-radius: var(--r-control); background: var(--card); color: var(--navy); cursor: pointer; font: inherit; text-align: left; min-width: 0; }
.b-stat b { font-size: 1.35rem; line-height: 1; } .b-stat span { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.b-stat.s-pull { border-top-color: var(--muted); } .b-stat.s-to_build { border-top-color: var(--sky); } .b-stat.s-building { border-top-color: var(--cobalt); }
.b-stat.s-qc { border-top-color: var(--navy); } .b-stat.s-notify { border-top-color: var(--orange); }
.b-mine h3 { font-size: .95rem; margin: 14px 0 6px; } .b-mine .row { margin-bottom: 6px; }
.builds-card .due-link { color: var(--orange); padding-left: 0; padding-right: 0; display: block; text-align: left; }
@media (max-width: 599px) { .b-stats { gap: 4px; } .b-stat { padding: 6px 6px; } .b-stat span { white-space: normal; font-size: .72rem; line-height: 1.15; } }
/* Today: Needs attention */
.attn h3 { margin: 0 0 8px; }
/* Today: customers on sales, time clock readiness (sql/092) */
.cap-row { display: flex; align-items: center; gap: 14px; margin: 6px 0 8px; }
.cap-big { font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cap-big.good { color: var(--ok, #1a7f37); } .cap-big.mid { color: var(--orange); } .cap-big.low { color: var(--danger, #b42318); }
.cap-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cap-up { color: var(--ok, #1a7f37); font-size: .85rem; white-space: nowrap; } .cap-down { color: var(--danger, #b42318); font-size: .85rem; white-space: nowrap; }
.cap-bar { position: relative; height: 10px; border-radius: 5px; background: var(--seg-bg); overflow: hidden; }
.cap-fill { position: absolute; inset: 0 auto 0 0; background: var(--cobalt); opacity: .35; border-radius: 5px; }
.cap-fill.mail { opacity: 1; }
.cap-why { margin: 8px 0 0; }
.cap-people { margin-top: 8px; }
.cap-list, .ready-list { list-style: none; margin: 6px 0 0; padding: 0; }
.cap-list li { display: grid; grid-template-columns: 1fr auto 48px; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); }
.cap-list b { text-align: right; font-variant-numeric: tabular-nums; }
.ready-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.ready-list li > span:first-child { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ready-how { margin: 6px 0 0; padding-left: 20px; } .ready-how li { margin: 4px 0; }
.tc-first { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--orange-tint); }
.pill.warn { background: var(--orange-tint); color: var(--orange); }
/* Stuck list (Today): one line per thing, oldest first, with why and who's on it */
.stuck-card h3 { margin: 0; }
.stuck-sum { margin: 2px 0 4px; }
.stuck-list { list-style: none; margin: 0; padding: 0; }
.stuck-list.card { padding: 4px 14px; }
.stuck-row { display: flex; gap: 12px; padding: 12px 0; align-items: flex-start; }
.stuck-row + .stuck-row { border-top: 1px solid var(--line); }
.stuck-age { flex: none; width: 46px; border-radius: 10px; padding: 6px 0 5px; text-align: center; background: var(--seg-bg); color: var(--ink); line-height: 1.05; }
.stuck-age b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.stuck-age small { font-size: .68rem; color: var(--muted); }
.stuck-row.soon .stuck-age { background: var(--orange-tint); color: var(--orange); }
.stuck-row.soon .stuck-age small { color: var(--orange); }
.stuck-row.late .stuck-age { background: var(--danger-tint, #fde8e6); color: var(--danger, #b3261e); }
.stuck-row.late .stuck-age small { color: var(--danger, #b3261e); }
.stuck-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stuck-kind { color: var(--muted); }
.stuck-title { overflow-wrap: anywhere; }
.stuck-why { color: var(--muted); }
.stuck-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.stuck-who { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.stuck-who.me { color: var(--ink); font-weight: 700; }
.stuck-who.none { font-style: italic; }
.stuck-give { width: auto; min-height: 36px; padding: 4px 28px 4px 10px; font-size: .85rem; }
.stuck-fix { margin-left: auto; white-space: nowrap; }
.stuck-list + .chips, main > .chips { margin-bottom: 8px; }
.attn-list { list-style: none; margin: 0; padding: 0; }
.attn-list li + li { border-top: 1px solid var(--line); }
.attn-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 2px; background: none; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-height: 52px; }
.attn-row:hover .attn-go { transform: translateX(2px); }
.attn-n { flex: none; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 16px; display: grid; place-items: center; background: var(--orange-tint); color: var(--orange); font-weight: 800; }
.attn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; } .attn-text .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attn-go { flex: none; font-size: 1.4rem; color: var(--muted); transition: transform .15s; }
.attn-clear { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; } .attn-clear > span:first-child { color: var(--ok); font-weight: 800; }
.attn, .builds-card, .bk-card { margin-bottom: 14px; }
/* Receiving: carrier tracking */
.trk-box { margin: 6px 0; }
.trk-list { margin: 4px 0; } .trk { display: flex; align-items: baseline; gap: 8px; font-size: .9rem; margin: 3px 0; }
.trk-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); transform: translateY(1px); }
.trk-in_transit .trk-dot { background: var(--sky); } .trk-out_for_delivery .trk-dot { background: var(--orange); } .trk-delivered .trk-dot { background: var(--ok); }
.trk-exception .trk-dot { background: var(--err); } .trk-exception { color: var(--err); }

/* TV screens (Hub → TV screens) */
.scr-row { display: flex; align-items: center; gap: 12px; cursor: default; }
.scr-row.scr-off .scr-thumb, .scr-row.scr-off .scr-main { opacity: .55; }
.scr-thumb { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--navy); flex: none; }
.scr-icon { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.4rem; }
.scr-main { flex: 1; min-width: 0; }
.scr-main .row-bike { overflow-wrap: anywhere; }
.scr-tools { display: flex; gap: 6px; flex: none; }
.scr-big { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 8px; margin-bottom: 8px; }
.scr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scr-days { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.scr-help summary { cursor: pointer; font-weight: 700; }
.scr-help p { margin: 10px 0 0; }
@media (max-width: 520px) {
  .scr-row { flex-wrap: wrap; }
  .scr-thumb { width: 80px; }
  .scr-tools { width: 100%; justify-content: flex-end; }
}

/* ---------- Customers: Ascend look-up, special orders, service board ---------- */
.asc-fresh { margin: 0 0 8px; }
.cust-row .row-sub + .row-sub { margin-top: 2px; }
.row.static { cursor: default; }
.cust-head h2 { margin: 0; }
.cust-phone, .cust-addr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.cust-addr { align-items: flex-start; }
ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.so-card { gap: 8px; }
.so-card.so-waiting { border-left: 4px solid var(--cobalt); }
.so-card h3 .btn.link { padding: 0; font: inherit; font-weight: 700; text-align: left; }
.so-lines { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.so-lines .muted { display: block; }
.cust a.btn { text-decoration: none; }
.so-contact, .so-tell { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.so-told { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wo-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.wo-col { background: var(--seg-bg); border-radius: var(--r-card); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.wo-col h3 { margin: 2px 4px; font-size: .9rem; }
.wo-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.wo-card.late { border-left: 4px solid var(--err); }
.wo-card.today { border-left: 4px solid var(--orange); }
.wo-head { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; color: var(--ink); cursor: pointer; font: inherit; }
.wo-bike { color: var(--ink-2); }
.wo-meta { color: var(--muted); }
.wo-meta .late, .late-txt { color: var(--err); font-weight: 700; }
.wo-meta .today { color: var(--orange); font-weight: 700; }
.wo-more { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.wo-notes { white-space: pre-wrap; margin: 0; }
@media (max-width: 599px) { .wo-board { grid-template-columns: 1fr; } }
.so-sale { display: block; color: var(--ink-2); }
.so-bal { padding: 6px 8px; border-radius: var(--r-control); background: var(--seg-bg); }
.so-bal.due b { color: var(--orange); }
.so-bal.paid { color: var(--ok); }
.wo-parts { color: var(--ink-2); }
.wo-parts.all-in { color: var(--ok); font-weight: 700; }
.wo-card.parts-in { box-shadow: inset 0 0 0 2px var(--ok); }
.cust .toolbar input[data-input="wo-q"] { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: var(--r-control); padding: 0 10px; background: var(--card); color: var(--ink); }
.cu-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cu-presets .chip { font-size: .8rem; padding: 4px 10px; }

.w-cust { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px dashed var(--line); border-radius: var(--r-card); }
.w-cust-linked { color: var(--ok); }
.w-cust-results:empty { display: none; }

.prod-bar { display: flex; gap: 8px; align-items: stretch; }
.prod-bar .big-search { flex: 1; min-width: 0; }
.prod-scan { flex: none; white-space: nowrap; }
.prod-row { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.prod-row .prod-head { border: 0; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.prod-name { min-width: 0; }
.prod-nums { display: flex; flex-direction: column; align-items: flex-end; flex: none; text-align: right; }
.prod-price { font-weight: 800; font-size: 1.05rem; color: var(--navy); }
.prod-qoh.in { color: var(--ok); font-weight: 700; font-size: .85rem; }
.prod-qoh.out { color: var(--muted); font-size: .85rem; }
.prod-detail { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; padding: 0 14px 12px; }
.prod-detail dt { color: var(--muted); }
.prod-detail dd { margin: 0; overflow-wrap: anywhere; }
.prod-sub { display: block; margin-top: 2px; }
.prod-ser-hit { display: block; margin-top: 3px; color: var(--blue, #023FAD); }
.prod-sale { color: var(--err); }
.prod-links { margin: 0; padding: 0 14px 12px; }
.prod-cats, .prod-filters { margin-top: 10px; }
.prod-cats .chip .muted { font-weight: 400; margin-left: 2px; }
.prod-filters { flex-wrap: wrap; overflow: visible; }
.prod-filters select, .prod-filters .chip { flex: none; max-width: 100%; }
.prod-filters select { width: auto; min-height: 38px; padding: 0 28px 0 12px; font-weight: 600; color: var(--ink); }
.prod-filters select.on { background: var(--navy); color: var(--card); border-color: var(--navy); }
.prod-count { margin: 6px 0 8px; }

/* Phones: the app icon instead of the wordmark, so the page title fits next to the bell, search and photo. */
.title img.logo-badge { display: none; }
@media (max-width: 599px) {
  .title img.logo-light, .title img.logo-dark { display: none !important; }
  .title img.logo-badge { display: block; height: 36px; width: 36px; object-fit: contain; }
  .top-row { gap: 6px; padding-left: 12px; padding-right: 12px; }
  .page-title { padding-left: 10px; font-size: .95rem; letter-spacing: .03em; }
  .top-actions { gap: 4px; }
  .top-actions .icon-btn { width: 36px; height: 36px; }
}

/* Phone bottom bar: Today + the person's picks, the rest under More (in their order). */
.nav-more { display: none; }
@media (max-width: 899px) {
  .mainnav .nav-item { order: var(--o, 50); }
  .mainnav .nav-item.nav-extra { display: none; }
  .mainnav .nav-more { display: flex; }
}
.viewas-bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 16px; background: var(--orange); color: #fff; font-size: .88rem; }
.viewas-bar .btn { background: #fff; color: var(--navy); border: 0; }
.profile-pins .set-label { font-weight: 700; margin: 10px 0 4px; }

/* Used bikes (Hub → Used bikes) */
.ub-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ub-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px; cursor: pointer; }
.ub-thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--surface-2, #eee); }
.ub-thumb.empty { display: grid; place-items: center; font-size: 28px; }
.ub-title { font-weight: 600; }
.ub-st { font-size: 13px; font-weight: 600; }
.ub-st.ok { color: var(--ok, #1a7f37); }
.ub-st.ready { color: var(--accent, #b85c00); }
.ub-st.muted { color: var(--muted, #777); }
.ub-check { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ub-check li { color: var(--muted, #777); }
.ub-check li.ok { color: var(--ok, #1a7f37); }
.ub-steps { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--muted, #777); } .ub-steps .ok { color: var(--ok, #1a7f37); font-weight: 600; }
.ub-stepbox { display: grid; gap: 8px; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line, #ddd); border-radius: 10px; } .ub-stepbox .ok { color: var(--ok, #1a7f37); font-weight: 600; }
.ub-asc { margin: 6px 0; } .ub-asc.warn, .ub-asc .warn { color: var(--accent, #b85c00); font-weight: 600; }
.ub-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.ub-photos figure { margin: 0; }
.ub-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.ub-photos figcaption { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; margin-top: 4px; }
.ub-pending { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.ub-pending figure { margin: 0; }
.ub-pending img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; opacity: .55; }
.ub-pending .uploading img { opacity: .8; }
.ub-pending .failed img { outline: 2px solid #c0392b; opacity: 1; }
.ub-pending figcaption { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; margin-top: 4px; color: #666; }
.ub-pending .failed figcaption { color: #c0392b; }
.ub-specs { white-space: pre-wrap; font: inherit; margin: 0; }

/* Service check-in condition (customer → Check in a bike) */
.ci-grid { display: grid; gap: 10px; }
.ci-area { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.ci-area > span { font-weight: 600; min-width: 150px; }
.ci-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.ci-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line, #e5e5e5); padding: 4px 0; }
.ci-list li.ci-worn b { color: var(--accent, #b85c00); }
.ci-list li.ci-damaged b { color: var(--danger, #b42318); }
.ci-list li.ci-ok b { color: var(--ok, #1a7f37); }
p.pre { white-space: pre-wrap; }

/* Today: one even gap between every card (the clock card had no margin and sat on "Needs attention"). */
.home-main { display: flex; flex-direction: column; gap: 14px; }
.home-main > * { margin-top: 0; margin-bottom: 0; }

/* Section pages along the top (Today / Service / Sales / Stock / Team). Scrolls sideways on narrow phones. */
.secbar { max-width: 760px; margin: 0 auto; padding: 8px 10px 0; display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.secbar::-webkit-scrollbar { display: none; }
.secbar-item { flex: none; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: .9rem; padding: 8px 8px 10px; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.secbar-item.on { color: var(--navy); border-bottom-color: var(--cobalt); }
.secbar-item b { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--orange); color: #fff; font-size: .72rem; line-height: 18px; text-align: center; }
.secbar-item b.plain { background: var(--seg-bg); color: var(--ink); }
:root[data-theme="dark"] .secbar-item.on { color: var(--ink); }
.hub-sub { max-width: 760px; margin: 18px 0 8px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav-badge.phone-only { display: none; }
@media (max-width: 899px) { .nav-badge.phone-only { display: grid; } }

/* Service board order toggle */
.wo-sort { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.seg-mini { display: inline-flex; padding: 3px; gap: 3px; background: var(--seg-bg); border-radius: 10px; }
.seg-mini button { border: 0; background: transparent; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: .85rem; color: var(--ink); cursor: pointer; }
.seg-mini button.on { background: var(--card); color: var(--navy); font-weight: 700; box-shadow: 0 1px 3px rgba(1, 23, 49, .16); }
:root[data-theme="dark"] .seg-mini button.on { color: var(--ink); }

/* Quotes */
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.q-pill { display: inline-block; border-radius: var(--r-control); padding: 1px 9px; font-size: .74rem; font-weight: 700; vertical-align: middle; background: var(--seg-bg); color: var(--ink); }
.q-pill.sent { background: var(--sky-tint, #E6EDF9); color: var(--cobalt); }
.q-pill.ok { background: var(--ok-tint); color: var(--ok); } .q-pill.bad { background: var(--err-tint); color: var(--err); }
.q-pill.muted { background: transparent; border: 1px solid var(--line); color: var(--muted); }
:root[data-theme="dark"] .q-pill.ok { background: #143020; color: #74D196; } :root[data-theme="dark"] .q-pill.bad { background: #3A1A17; color: #F28B82; }
.q-pill.big { font-size: .85rem; padding: 3px 12px; }
table.q-lines { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: .95rem; }
.q-lines th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--line); padding: 0 0 6px; }
.q-lines td { border-bottom: 1px solid var(--line); padding: 8px 0; vertical-align: top; }
.q-lines .num { text-align: right; white-space: nowrap; padding-left: 10px; }
.q-totals { display: grid; gap: 3px; margin: 10px 0 0 auto; max-width: 320px; }
.q-totals > div { display: flex; justify-content: space-between; gap: 12px; }
.q-totals .grand { font-weight: 800; font-size: 1.1rem; border-top: 2px solid var(--ink); padding-top: 6px; margin-top: 2px; }
.q-totals .dep { color: var(--cobalt); font-weight: 700; } :root[data-theme="dark"] .q-totals .dep { color: var(--ink); }
.q-notes { background: var(--seg-bg); border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; }
.q-add { display: flex; gap: 8px; } .q-add input { flex: 1; min-width: 0; }
.q-prod-hits:empty { display: none; }
.q-lines-edit { display: grid; gap: 8px; margin: 10px 0; }
.q-line { display: grid; grid-template-columns: 1fr 64px 92px auto auto; gap: 6px; align-items: center; }
.q-line .q-sku { grid-column: 1 / -1; margin-top: -4px; }
.q-line input { min-width: 0; }
.q-line .q-tax { white-space: nowrap; }
@media (max-width: 520px) { .q-line { grid-template-columns: 70px 1fr auto auto; padding-bottom: 8px; border-bottom: 1px solid var(--line); } .q-line .q-desc { grid-column: 1 / -1; } }
/* Action groups on detail pages: one card per kind of action, a quiet row for the rare ones. */
.act-group h3 { margin: 0 0 2px; font-size: 1rem; }
.act-group > p.small { margin: 0 0 8px; }
.actions.subtle { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.actions.subtle:empty { display: none; }
.danger-text { color: var(--danger, #b42318) !important; }
/* Detail pages: tools for the thing itself in one row; the customer's page link in its own labelled block. */
.card-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.their-page { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--seg-bg); }
.their-page .actions.subtle { border-top-color: var(--line); }
.tp-label { font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.muted-link { color: var(--muted) !important; }
.page-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line); }
.block-form { margin-top: 8px; }

/* Bikes & serials (Stock) */
.ser-stats { margin-bottom: 10px; }
.ser-tabs { flex-wrap: wrap; }
.ser-no { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; letter-spacing: .02em; }
.ser-none { color: var(--warn, #b84e0b); font-weight: 600; }
.ser-built { color: var(--ok, #1a7f37); font-weight: 600; }
.ser-unbuilt { color: var(--orange, #b84e0b); font-weight: 600; }
.scan-card .chips { margin-bottom: 10px; }
.scan-list li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.ok-line { color: var(--ok, #1a7f37); font-weight: 600; }

/* Missed time / fix form: date-and-time boxes never wider than the screen; stacked on phones. */
.tc-fix { margin: 12px 0 16px; display: flex; flex-direction: column; gap: 12px; }
.tc-fix-title { margin: 0; font-size: 1rem; }
.tc-fix .tc-times { gap: 12px; }
.tc-fix .tc-times label { min-width: 0; }
.tc-fix input[type="datetime-local"] { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
@media (max-width: 599px) { .tc-fix .tc-times { flex-direction: column; } }
.tc-fix .actions { margin-top: 2px; }
.cleanup-list li { padding: 3px 0; border-bottom: 1px solid var(--line); }
.cleanup-list li.guess { background: var(--orange-tint, #fbeee6); }

/* Ascend PO on a delivery notice (sql/058) */
.po-box { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg, transparent); }
.po-box summary { cursor: pointer; }
.po-box.po-done summary strong { color: var(--ok, #157f3b); }
.po-lines { margin: 8px 0 4px; display: grid; gap: 4px; font-size: 14px; overflow-wrap: anywhere; }
.po-lines .po-wait { font-weight: 600; }
.po-pick .list { margin: 6px 0; }

/* Ascend import file (receiving) */
.subnav-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.af-src { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.af-src .btn.disabled { opacity: .5; pointer-events: none; }
.af-lines { display: grid; gap: 10px; margin: 10px 0; }
.af-line { padding: 10px 12px; display: grid; gap: 8px; }
.af-line label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; min-width: 0; }
.af-line input { width: 100%; min-width: 0; box-sizing: border-box; }
.af-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 720px) { .af-grid { grid-template-columns: 2fr 2fr 1fr 1fr; } }
.af-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.af-st { margin: 0; overflow-wrap: anywhere; }
.af-warn { color: var(--warn, #b54708); }

/* Claim ↔ customer */
.claim-cust { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.claim-cust.unlinked { display: grid; justify-content: stretch; border-style: dashed; }
.af-picks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.af-picks .btn { text-align: left; white-space: normal; }
.af-pages { padding: 10px 12px; display: grid; gap: 8px; }
.af-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.af-thumbs figure { margin: 0; width: 84px; }
.af-thumbs img { width: 84px; height: 110px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.af-thumbs figcaption { font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
.po-lines .po-so { padding-left: 2px; }
.po-for { margin: 2px 0 2px 26px; }
.po-so-sum { margin: 8px 0 0; }
.rc-btns { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.not-asc { margin: 6px 0; padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--warn, #b54708) 10%, transparent); }
.asc-close { display: inline-block; max-width: 100%; }
.rw-bal { font-weight: 800; font-size: 18px; color: var(--brand, #0B3C8C); }
.rw-act { margin: 6px 0 0; display: grid; gap: 2px; }
.rw-grid { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; align-items: end; }
@media (max-width: 600px) { .rw-grid { grid-template-columns: 1fr 1fr; } .rw-grid > label:first-child { grid-column: 1 / -1; } }
/* Rewards list: one tappable row per reward (Nov 10) */
.rw-status { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-control); background: var(--line); color: var(--muted); white-space: nowrap; }
.rw-status.on { background: var(--ok-tint); color: var(--ok); }
.rw-how { margin-top: 8px; } .rw-how summary, .rw-off summary { cursor: pointer; color: var(--muted); padding: 6px 0; }
.rw-list { display: grid; }
.rw-row { border-top: 1px solid var(--line); }
.rw-row:first-child { border-top: 0; }
.rw-row > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 12px 28px 12px 2px; position: relative; min-height: 48px; }
.rw-row > summary::-webkit-details-marker { display: none; }
.rw-row > summary::after { content: '›'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--muted); transition: transform .15s; }
.rw-row[open] > summary::after { transform: translateY(-50%) rotate(90deg); }
.rw-name { font-weight: 600; color: var(--ink); }
.rw-pts { font-weight: 700; color: var(--cobalt); text-align: right; white-space: nowrap; }
.rw-sub { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.rw-edit { padding: 0 2px 14px; display: grid; gap: 8px; }
.rw-off { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.rw-add { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.rw-add > summary { cursor: pointer; font-weight: 600; color: var(--cobalt); padding: 6px 0; }
.rw-add .rw-new { margin-top: 8px; }

/* ---------- Service ticket page (sql/065) ---------- */
:root { --dg-none: #D3DAE3; --dg-line: #8A97A8; --dg-good: #7E94B2; --dg-adjusted: #2F7DD1; --dg-replaced: #1F9A4B; --dg-soon: #D98A00; --dg-now: #C62F2F; }
:root[data-theme="dark"] { --dg-none: #33465E; --dg-line: #6F819A; --dg-good: #8DA2BF; --dg-adjusted: #5AA6F2; --dg-replaced: #4CC77A; --dg-soon: #F0AE3C; --dg-now: #F06A6A; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --dg-none: #33465E; --dg-line: #6F819A; --dg-good: #8DA2BF; --dg-adjusted: #5AA6F2; --dg-replaced: #4CC77A; --dg-soon: #F0AE3C; --dg-now: #F06A6A; } }
main.tk-wide { max-width: 1180px; }
.tk-head { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: start; }
.tk-head h2 { margin: 2px 0 4px; font-size: 1.35rem; }
.tk-head .eyebrow { margin: 0; font-size: 12px; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.tk-head p { margin: 0; }
.tk-stage { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tk-total { font-size: 1.3rem; }
.tk-notes { grid-column: 1 / -1; margin: 8px 0 0; }
.tk-cols { display: grid; gap: 12px 20px; }
@media (min-width: 980px) { .tk-cols { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); align-items: start; } }
.tk-chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-control); background: var(--seg-bg); color: var(--ink-2); white-space: nowrap; }
.tk-chip.ok, .tk-chip.st-ready, .tk-chip.r-replaced { background: var(--ok-tint); color: var(--ok); }
.tk-chip.warn, .tk-chip.st-you, .tk-chip.r-soon { background: var(--orange-tint); color: var(--orange); }
.tk-chip.r-now { background: var(--err-tint); color: var(--err); }
.tk-chip.r-adjusted, .tk-chip.st-work, .tk-chip.st-diag { background: var(--cobalt-tint); color: var(--cobalt); }
.tk-chip.muted { color: var(--muted); }
.tk-lines { width: 100%; border-collapse: collapse; font-size: 15px; }
.tk-lines th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.tk-lines td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tk-lines tfoot td { border-bottom: 0; color: var(--ink-2); }
.tk-lines .num { text-align: right; white-space: nowrap; }
.tk-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.tk-tag.labor { background: var(--cobalt-tint); color: var(--cobalt); }
.tk-tag.part { background: var(--cream-tint); color: var(--orange); }
.tk-rec { display: grid; gap: 6px; }
.tk-rec-top { display: flex; justify-content: space-between; gap: 12px; }
.tk-price { font-weight: 700; white-space: nowrap; }
.tk-rec.rs-approved { border-left: 4px solid var(--orange); }
.tk-rec.rs-added { border-left: 4px solid var(--ok); }
.tk-rec.rs-declined { opacity: .7; }
.tk-rec-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tk-insp-body { display: grid; gap: 12px; }
@media (min-width: 700px) { .tk-insp-body { grid-template-columns: minmax(260px, 1fr) 1fr; align-items: start; } }
.bike-dg { width: 100%; height: auto; display: block; max-width: 460px; }
.dg-part { transition: opacity .2s; }
.dg-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; color: var(--ink-2); }
.dg-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tk-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--dg-none); }
.tk-dot.r-good { background: var(--dg-good); } .tk-dot.r-adjusted { background: var(--dg-adjusted); } .tk-dot.r-replaced { background: var(--dg-replaced); }
.tk-dot.r-soon { background: var(--dg-soon); } .tk-dot.r-now { background: var(--dg-now); }
.tk-insp-list { display: grid; gap: 4px; margin: 6px 0; }
.tk-insp-form { display: grid; gap: 14px; }
@media (min-width: 980px) { .tk-insp-form { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.3fr); gap: 0 24px; align-items: start; } .tk-insp-side { position: sticky; top: 12px; } }
.tk-insp-side { display: grid; gap: 10px; align-content: start; }
.tk-insp-main { display: grid; gap: 14px; }
.tk-insp-main > label, .tk-insp-main > .actions { margin: 0; }
.tk-dg-live { max-width: 520px; }
.seg-btn { flex: 1; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: var(--r-control); padding: 9px 10px; font: inherit; font-weight: 600; cursor: pointer; }
.seg-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .seg-btn.on { background: var(--btn-bg); border-color: var(--btn-bg); }
.tk-w-box { border: 1px solid var(--line); border-radius: var(--r-card); padding: 4px 14px 12px; background: var(--card); }
.tk-w-box h3 { margin: 12px 0 8px; }
.tk-w-box.ask { border-color: var(--orange); background: var(--orange-tint); }
.tk-ask { display: grid; gap: 4px; padding: 6px 0; border-top: 1px solid var(--line); }
.tk-ask:first-of-type { border-top: 0; }
.tk-ask > span { font-weight: 600; }
.tk-w-row { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(120px, 1fr) minmax(120px, 1.2fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.tk-w-row select, .tk-w-row input, .tk-w-add select { padding: 7px 8px; font-size: 14px; min-height: 0; }
.tk-w-name { font-weight: 600; }
.tk-w-add { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
@media (max-width: 640px) { .tk-w-row { grid-template-columns: 1fr auto; } .tk-w-row select, .tk-w-row input { grid-column: 1 / -1; } .tk-w-row .btn { grid-row: 1; grid-column: 2; } .tk-w-add { grid-template-columns: 1fr 1fr; } .tk-w-add select:first-child { grid-column: 1 / -1; } }
.tk-wl-h { margin: 8px 0 2px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tk-noted { font-weight: 600; } .tk-noted.r-now { color: var(--err); } .tk-noted.r-soon { color: var(--orange); }
.tk-photos figure.staff-only img { opacity: .6; }
.tk-cap { width: 100%; font-size: 13px; padding: 4px 6px; margin-bottom: 2px; }
.tk-chat { max-height: 520px; overflow-y: auto; padding-right: 2px; }
.tk-chat .bubble time { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.tk-chat .bubble p { margin: 0; white-space: pre-wrap; }
.tk-chat .bubble .pics { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tk-chat .bubble .pics img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.bubble.note { background: var(--cream-tint); border: 1px dashed var(--line); }
.tk-compose { gap: 8px; }
.tk-send { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tk-quick { margin: 0; }
.tk-kind { max-width: 340px; margin-bottom: 4px; }
.bal-card { border-left: 4px solid var(--orange); }
.bal-due { font-size: 1.2rem; color: var(--orange); }
.bal-card li { padding: 4px 0; }
.bal-lines { width: 100%; border-collapse: collapse; margin: 4px 0 2px; } .bal-lines td { padding: 3px 0; border-bottom: 1px solid var(--line); vertical-align: top; } .bal-lines td.num { text-align: right; white-space: nowrap; padding-left: 12px; }
/* Owner snapshot (Hub) */
table.snap { width: 100%; border-collapse: collapse; font-size: 15px; }
.snap th { font-size: 12px; color: var(--muted); text-align: left; text-transform: uppercase; letter-spacing: .04em; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.snap td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.snap .num { text-align: right; white-space: nowrap; }
.snap .up { color: var(--ok); font-weight: 700; } .snap .down { color: var(--err); font-weight: 700; }
.snap-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 6px 0; }
.snap-stats div { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 12px; display: grid; }
.snap-stats b { font-size: 1.25rem; } .snap-stats span { font-size: 13px; color: var(--muted); }
/* Warranty claim page (layout pass, Nov 10): progress strip and two columns on wide screens (reuses .tk-cols). */
.w-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; list-style: none; margin: 6px 0 12px; padding: 0; }
.w-steps li { font-size: 12px; color: var(--muted); padding-top: 6px; border-top: 4px solid var(--line); }
.w-steps li.done { border-color: var(--cobalt); color: var(--ink-2); }
.w-steps li.now { border-color: var(--cobalt); color: var(--ink); font-weight: 700; }
@media (max-width: 600px) { .w-steps { grid-template-columns: repeat(3, 1fr); row-gap: 8px; } }
.claim-page .facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; }
.claim-page .tk-side .card { margin-top: 0; }
.tk-main, .tk-side { display: grid; gap: 12px; align-content: start; } .tk-main > .card, .tk-side > .card { margin: 0; }
.cust-logins { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; } .cust-logins .inline-form { margin-top: 6px; }

/* sql/070: reorder list, duplicate customers, service history by bike */
.snap.reo td { vertical-align: top; }
.dupe-person { display: block; padding: 4px 0 0; font-weight: 600; text-align: left; }
details.bh { border-top: 1px solid var(--line); padding: 8px 0; }
details.bh:first-of-type { border-top: 0; }
details.bh summary { cursor: pointer; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
details.bh ul { margin: 6px 0 0 4px; }
details.bh li { padding: 3px 0; }

/* Website "Message us" (sql/071) */
.web-msgs .web-body { margin: 6px 0 8px; white-space: pre-wrap; }

/* Warranty: start from the bike's serial; reimbursement claims (sql/073) */
.w-serial { background: var(--sky-tint); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 12px; margin-bottom: 12px; }
.w-serial [data-w-serial-results] { margin-top: 6px; }
.w-reimb { align-items: flex-start; gap: 8px; background: var(--cream-tint); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 12px; }
.w-reimb span { font-weight: 400; }
.badge.w-reimb-tag { background: var(--cream-tint); color: var(--orange); border: 1px solid var(--orange-tint); margin-left: 6px; }

/* Special orders: parts on tickets not ordered (sql/076) */
.chip.warn:not(.on) { border-color: var(--orange); color: var(--orange); }

/* Vendor returns: bulk warranty batches (sql/079) */
.badge.ok { background: var(--ok-tint); color: var(--ok); }
.badge.warn { background: var(--orange-tint); color: var(--orange); }
.badge.info { background: var(--cobalt-tint); color: var(--cobalt); }
.warn-text { color: var(--orange); font-weight: 600; }
.vr-new { flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 14px; }
.vr-new input { flex: 1 1 200px; min-width: 0; }
.vr-list { display: grid; gap: 12px; }
.vr-card h4 { margin: 14px 0 6px; font-size: 1rem; }
.vr-head { all: unset; box-sizing: border-box; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; font-size: 1.05rem; }
.vr-head:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.vr-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 0; margin: 10px 0 4px; font-size: .78rem; }
.vr-steps li { padding: 3px 9px; border-radius: var(--r-control); background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.vr-steps li.done { background: var(--ok-tint); color: var(--ok); border-color: transparent; }
.vr-steps li.on { background: var(--navy); color: var(--card); border-color: var(--navy); font-weight: 700; }
.vr-unit { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; background: var(--bg); }
.vr-unit h4 { margin-top: 0; }
.vr-sn { display: flex; gap: 8px; }
.vr-sn input { flex: 1; min-width: 0; }
.vr-hit { min-height: 1.4em; }
.vr-photo { align-self: flex-start; }
.vr-units li { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.vr-u { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.vr-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.vr-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.vr-ph { display: inline-flex; flex-direction: column; align-items: center; }
.vr-pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: .85rem/1.45 ui-monospace, Menlo, Consolas, monospace; max-height: 340px; overflow: auto; }
.vr-email, .vr-ascend, .vr-photos { margin-top: 6px; }
.vr-details { margin-top: 12px; }
.vr-details summary, .vr-done summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.vr-form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .vr-form .grid2 { grid-template-columns: 1fr; } }
.vr-next { width: 100%; margin-top: 14px; }

/* Warranty claim: space under the details card; the save confirmation and the new timeline entry */
.w-cols { margin-top: 16px; }
.w-saved { margin: 10px 0 0; font-weight: 600; }
.timeline li.tl-new { animation: tl-new 3s ease-out; border-radius: 6px; }
@keyframes tl-new { from { background: var(--ok-tint); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .timeline li.tl-new { animation: none; background: var(--ok-tint); } }

/* Save / error banner when the page's own message is scrolled out of view */
.save-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 12px;
  background: #167A42; color: #fff; font-weight: 600; box-shadow: 0 8px 24px rgba(1, 23, 49, .28); pointer-events: none; transition: opacity .3s; }
.save-toast.is-err { background: #A4262C; }
.save-toast button { all: unset; pointer-events: auto; cursor: pointer; font-size: 1.3rem; line-height: 1; padding: 0 2px; }
.save-toast.out { opacity: 0; }
@media (min-width: 900px) { .save-toast { bottom: 24px; } }

/* ✨ Write it (AI message to the customer) */
.ai-write { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px; }
.ai-write [data-ai-note] { flex: 1 1 180px; }
.cu-presets summary { cursor: pointer; padding: 4px 0; }
.cu-presets[open] { display: flex; flex-wrap: wrap; gap: 6px; }
.cu-presets[open] summary { flex-basis: 100%; }

/* Customer screen purchases: short rows, tap to open, search */
.cp-q { width: 100%; margin: 0 0 10px; }
.cp-row { border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.cp-row .cp-head { border: 0; background: transparent; }
.cp-head .row-bike { display: flex; justify-content: space-between; gap: 10px; }
.cp-lead { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cp-row, .cp-head, #cu-purchases, #cp-list, #cp-list .list { min-width: 0; max-width: 100%; }
.cp-row.open .cp-lead { white-space: normal; }
.cp-body { padding: 4px 14px 12px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.cp-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
#cp-list > .btn { margin-top: 10px; }

/* "What's included" under a service package line */
.pkg { margin: 4px 0 2px; font-size: .88rem; font-weight: 400; }
.pkg summary { cursor: pointer; color: var(--cobalt); font-weight: 600; }
.pkg ul { margin: 6px 0; padding-left: 20px; }
.pkg p { margin: 0; color: var(--ink-2); font-size: .82rem; }
/* Nov 10 audit: long customer names on special-order cards wrapped under the phone and were clipped. */
.so-card .card-head { flex-wrap: wrap; align-items: baseline; }
.so-card .card-head h3 { min-width: 0; }
.so-card .card-head h3 .btn.link { white-space: normal; text-align: left; }
/* Nov 10 audit: the chart legend's `.lg` (inline-block, 3px corners) was overriding the large avatar on Me. */
.avatar.lg { display: inline-grid; border-radius: 50%; vertical-align: middle; }
/* Nov 10 audit: the Reorder table squeezed item names into a narrow column on phones. Stack each line instead. */
@media (max-width: 560px) {
  table.snap.reo thead { display: none; }
  table.snap.reo tr { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.snap.reo td { border: 0; padding: 2px 6px; }
  table.snap.reo td:first-child { grid-column: 1 / -1; }
  table.snap.reo td.num { text-align: left; }
  table.snap.reo td.num::before { content: attr(data-l); display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
}
/* Storage after a bike is ready (sql/083) */
.wo-storage { margin: 6px 0 0; padding: 6px 10px; border-radius: var(--r-control); background: var(--cream-tint); color: var(--ink-2); }
.wo-storage.warn { background: var(--orange-tint); color: var(--orange); font-weight: 600; }
/* Old tickets in the service history and "Previous service on this bike" (sql/084) */
.bh-list { display: grid; gap: 6px; margin: 8px 0 0; }
.bh-tk { border: 1px solid var(--line); border-radius: var(--r-control); padding: 6px 10px; background: var(--card); }
.bh-tk summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.bh-tk summary::-webkit-details-marker { display: none; }
.bh-tk summary { color: var(--ink); font-weight: 400; }
.bh-tk-h { flex: 1 1 auto; }
.bh-work { flex-basis: 100%; color: var(--ink-2); order: 3; }
.bh-more { color: var(--cobalt); font-weight: 600; white-space: nowrap; }
.bh-tk[open] .bh-more { display: none; }
.bh-notes { margin: 8px 0 4px; }
.bh-lines { margin: 6px 0; width: 100%; }
.bh-tk .btn { margin-top: 4px; }
/* ---------- Desktop full width (Jordan, Nov 10): 1200px+ uses the whole screen ---------- */
@media (max-width: 1199px) { .wcols, .wcol { display: contents; } }
@media (min-width: 1200px) {
  .content main, .content main.tk-wide { max-width: 1600px; padding-left: 28px; padding-right: 28px; }
  .top-row, .secbar, .offline-bar { max-width: 1600px; }
  .top-row { padding-left: 28px; padding-right: 28px; }
  .cards.board, .compose, .hub-sub { max-width: none; }   /* notices stay a readable column */
  .wcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .wcols.side { grid-template-columns: minmax(340px, 0.8fr) minmax(0, 1.6fr); }
  .wcol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .wcol > * { margin-top: 0; margin-bottom: 0; }
  .wcol-sticky { position: sticky; top: 12px; }
  .wcol-h { margin-top: 0; }
  main > .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); align-items: start; }
  .cards.rcpt-list, .cards.ship-list { grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); }
  .wcol .cards.board { grid-template-columns: 1fr; }
  .tk-cols { grid-template-columns: minmax(0, 1.8fr) minmax(360px, 1fr); }
}
@media (min-width: 1200px) {
  /* Long forms on their own (new quote, used bike, claim, build request…) read better at a form's width than stretched. */
  .content main > form.form, .content main > .form.card, .content main > section.card > form.form:only-child { max-width: 980px; }
}
@media (min-width: 1600px) { .wcol .cards.board { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); } }
.badge.muted-badge { background: var(--seg-bg); color: var(--ink-2); font-weight: 600; margin-left: 6px; }
.wo-last { margin: 6px 0 0; color: var(--ink-2); }
/* Hub → Customer emails (sql/087) */
.pe-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 10px; }
.form-sub { margin: 18px 0 2px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 1rem; }
.pe-frame { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--workshop); }
.pe-preview { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .92rem; background: var(--cream-tint); color: var(--ink); border-radius: var(--r-control); padding: 12px 14px; margin: 8px 0; }
.status.st-on { background: var(--ok-tint, #e3f3e6); color: var(--ok, #1d6b2f); }

/* Quick check-in (Nov 12): photos first, OK by default, worn/damaged stand out when picked. */
.ci-shoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.ci-cam { font-size: 1.05rem; padding: 14px 18px; border-width: 2px; border-color: var(--navy); font-weight: 700; }
.seg.ci-worn input:checked + span { background: #b85c00; border-color: #b85c00; color: #fff; }
.seg.ci-damaged input:checked + span { background: #B42318; border-color: #B42318; color: #fff; }
.tk-quick { grid-column: 1 / -1; margin-top: 6px; }

/* Stuck hand-off note (sql/094) */
.stuck-note { display: block; margin-top: 2px; color: var(--navy); }
.stuck-note-form { margin-top: 8px; padding: 10px; border: 1px solid var(--line, #d7dde6); border-radius: 8px; background: var(--card-2, rgba(2,63,173,.04)); }
.stuck-note-form label { display: block; }
.stuck-note-form input { display: block; width: 100%; margin-top: 4px; }
.stuck-note-form .actions { margin-top: 8px; }

/* Hub → Settings (sql/095) */
.set-form .set-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 84px; gap: 6px 10px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line, #e3e7ee); }
.set-form .set-row .set-name { align-self: center; font-weight: 600; }
.set-form .set-row input { display: block; width: 100%; margin-top: 2px; }
.set-form .set-row .set-was { grid-column: 1 / -1; }
.set-form .set-row .set-was:empty { display: none; }
.set-map, .set-fixed { list-style: none; margin: 0; padding: 0; }
.set-map li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line, #e3e7ee); }
.set-map li:last-child, .set-fixed li:last-child { border-bottom: 0; }
.set-map li > div { flex: 1 1 240px; min-width: 0; }
.set-map li > div span { display: block; }
.set-fixed li { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line, #e3e7ee); }

/* Warranty: proof of purchase, coverage, warranty periods (sql/096) */
.proof-card .proof-line { margin: 4px 0 8px; }
.proof-card .proof-found { background: rgba(2,63,173,.06); border-radius: 8px; padding: 8px 10px; }
.cov-lines { list-style: none; margin: 8px 0; padding: 0; border: 1px solid var(--line, #e3e7ee); border-radius: 8px; }
.cov-lines li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 8px 10px; border-bottom: 1px solid var(--line, #e3e7ee); }
.cov-lines li:last-child { border-bottom: 0; }
.cov-lines li > span:first-child { flex: 1 1 150px; }
.cov-lines li.out strong { color: var(--err); } .cov-lines li.in strong { color: var(--ok); }
.cov-short { font-weight: 600; }
.pill.bad { background: var(--err-tint); color: var(--err); }
.wt-row .wt-nums { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0; }
.wt-row .pill { margin-left: 6px; }
.pill.ok { background: #e3f4ea; color: #1a7f4b; }
.proof-card .pill { white-space: nowrap; }
.pill.stock { background: #e7ecf5; color: #011731; }
.w-sug { margin: -4px 0 8px; }

/* Build queue tied to Ascend (sql/098) */
.build-links .alert { margin-bottom: 12px; } .build-links .alert p { margin: 4px 0 8px; }
.build-links .need-list .need { align-items: center; }
.need-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.build-sale { margin: 6px 0; }
.builds-card > .btn.link { display: block; text-align: left; margin-bottom: 4px; }

/* Products: assembled or not, per bike (from Ascend's serial list) */
.prod-built { display: block; margin-top: 2px; }
.prod-bikes { margin: 0; padding: 0 14px 12px; }
.prod-bike { padding: 3px 0; overflow-wrap: anywhere; }
.prod-bikes-note { margin: 4px 0 0; }

/* Special orders: where each line stands with the vendor, and its details */
.so-step { display: block; font-weight: 600; color: var(--ink-2); }
.so-step.no_po, .so-step.po_unsent { color: var(--orange, #b84e0b); }
.so-step.in { color: var(--ok, #1a7f37); }
.so-bo { margin-top: 4px; padding: 4px 8px; border-radius: 6px; background: var(--amber-bg, #fff4e0); overflow-wrap: anywhere; }
.so-bo.late { background: var(--red-bg, #fde8e8); }
.so-bo-form { margin-top: 6px; flex-wrap: wrap; }
.so-bo .btn.link { margin-left: 10px; }
.so-bo-btn { margin-right: 14px; }
.so-bo-form input[type="date"] { width: auto; }
.so-bo-form p { flex-basis: 100%; margin: 2px 0 0; }
.so-more { padding: 0; }
.so-detail { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 6px 0 4px; padding: 8px 10px; border-radius: var(--r-control); background: var(--seg-bg); }
.so-detail dt { color: var(--muted); }
.so-detail dd { margin: 0; overflow-wrap: anywhere; }

/* Back buttons: always at the left, and they look like a button (Jordan, Nov 12: the customer page's Back
   stretched across the page with its words in the middle, and looked like plain text). */
.btn.link.back { display: inline-flex; align-items: center; align-self: flex-start; justify-self: start; width: auto; text-align: left;
  padding: 8px 14px 8px 10px; min-height: 40px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--card); }
.btn.link.back:hover { border-color: var(--cobalt); }
.hub-back .back { padding-left: 10px; }

/* Ascend file: lines that are new to Ascend, and the vendor products download */
.af-vp { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; }
.af-vp-card { border-left: 4px solid var(--orange, #b84e0b); }

/* Receiving: an order's own page */
.ship-title { padding: 0; font: inherit; color: inherit; text-align: left; }
.ship-title:hover { color: var(--cobalt); }
.ship-one { margin-bottom: 14px; }
.ship-parts { margin-bottom: 14px; }

/* Ascend file: final-price invoice */
.af-final { border-left: 4px solid var(--ok, #1a7f37); }
.af-was { margin: 6px 0 0; color: var(--ok, #1a7f37); }

/* Monday turnaround check pop-up (app.js turnaroundCheck) */
.turn-check h3 { margin: 0 0 8px; }
.turn-check .turn-edit { margin-top: 12px; }
.turn-check .turn-edit input { width: 100%; }
/* Special-order email preview (sql/111): the plain-text email as the customer sees it. */
/* Hub → Customer emails, reworked Nov 29, 2026: a list of every email (on/off, when), one email open at a time.
   Phone: the list, or the open email with a way back. Desktop (900px+): the list on the left, the open email beside it. */
.ce { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }   /* minmax(0) here and below: a long one-line snippet (Today › Messages) made a phone page 536px wide (Dec 1) */
.ce-list, .ce-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.ce-list > p { margin: 0; }
.ce-group { padding-bottom: 6px; }
.ce-group h3 { margin-bottom: 4px; }
.ce-rows { list-style: none; margin: 0; padding: 0; }
.ce-rows li + li { border-top: 1px solid var(--line); }
.ce-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: var(--r-control);
  padding: 12px 6px; min-height: 56px; font: inherit; color: var(--ink); cursor: pointer; }
.ce-row:hover { background: var(--seg-bg); }
.ce-row::after { content: '›'; grid-column: 2; grid-row: 2; justify-self: end; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.ce-name { font-weight: 700; }
.ce-when { grid-column: 1; color: var(--muted); font-size: .85rem; }
.ce-pill { justify-self: end; align-self: start; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: var(--seg-bg); color: var(--ink-2); }
.ce-pill.is-on { background: var(--ok-tint); color: var(--ok); }
.ce-also { margin: 0; display: grid; gap: 8px; }
.ce-back { background: none; border: 0; padding: 0; font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; margin-bottom: 4px; }
.ce-card .card-head { margin-top: 2px; }
.ce-sub { margin: 4px 0 12px; }
.ce-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ce-actions .btn { flex: 1 1 140px; }
.ce-more > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.ce-more > summary::-webkit-details-marker { display: none; }
.ce-more > summary::after { content: '+'; font-size: 1.3rem; color: var(--muted); }
.ce-more[open] > summary::after { content: '−'; }
.ce-more > summary h3 { margin: 0; }
.ce-more[open] > summary { margin-bottom: 10px; }
.ce-frame { height: 640px; }
@media (max-width: 899px) {
  .ce.ce-has-open .ce-list, .ce-detail:not(.ce-picked) { display: none; }
  .ce-frame { height: 560px; }
}
@media (min-width: 900px) {
  .ce { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 16px; }
  .ce-back { display: none; }
  .ce-row.on { background: var(--cobalt-tint); }
  .ce-row.on .ce-name { color: var(--cobalt); }
  .ce-frame { height: 760px; }
  .ce-actions .btn { flex: 0 1 220px; }
}
.ce-text { overflow-wrap: anywhere; white-space: pre-wrap; font: 14px/1.5 var(--font-body, system-ui), sans-serif; background: var(--workshop); border: 1px solid var(--line); border-radius: var(--r-control); padding: 14px 16px; margin: 8px 0; max-height: 520px; overflow: auto; }

/* Order to-do list (Nov 14, 2026) */
.todo-steps li { padding: 4px 0; display: flex; gap: 8px; align-items: baseline; overflow-wrap: anywhere; }
.todo-steps li.done { color: var(--muted, #6b7280); }
.todo-steps li.done span { color: var(--ok, #1a7f37); font-weight: 700; }
.todo-line { color: var(--accent-ink, #8a4b00); }
.ship-items { margin: 2px 0; }
.ship-items li { padding: 1px 0; }
.po-guess { border-left: 3px solid var(--accent, #0b57d0); padding-left: 10px; }

/* Bookings at the top of Today (Nov 14, 2026) */
.bk-top { border-left: 5px solid var(--accent, #0b57d0); }
.bk-top.has { background: var(--accent-tint, #eef4ff); }
.bk-top .card-head { flex-wrap: wrap; gap: 4px 12px; }
.bk-top .bk-time { font-weight: 700; }
.bk-top .bk-past { opacity: .55; }
.bk-new-h { margin: 10px 0 4px; }

.nc-badge { background: #eef2f7; color: #334155; }

.tc-card.tc-stale { border-left: 5px solid var(--warn, #b45309); background: #fff7ed; }

/* Opening from the last saved copy while fresh data loads (Nov 15, 2026) */
.updating-bar { position: sticky; top: 0; z-index: 5; margin: 0 auto 6px; width: fit-content; padding: 3px 12px; border-radius: var(--r-control); font-size: 13px;
  background: var(--accent-tint, #eef4ff); color: var(--accent-ink, #0b57d0); display: flex; gap: 6px; align-items: center; }
.updating-bar .spin { width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: mhbspin .8s linear infinite; }
@keyframes mhbspin { to { transform: rotate(360deg); } }
/* Bulk warranty: product picks under the Product box (Nov 16, 2026). */
.vr-picks:empty, .vr-linked:empty { display: none; }
.vr-picks { display: flex; flex-direction: column; gap: 4px; margin: -4px 0 8px; }
.vr-pick { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; padding: 8px 10px; border: 1px solid var(--line, #d9dee5); border-radius: 8px; background: var(--card, #fff); font: inherit; cursor: pointer; }
.vr-pick:hover, .vr-pick:focus-visible { border-color: var(--accent, #1f6feb); }
.vr-linked { margin: -4px 0 8px; }
.vr-u-acts { display: flex; flex-wrap: wrap; gap: 2px 10px; justify-content: flex-end; align-items: center; flex-shrink: 0; }
.vr-units li.vr-editing { display: block; }
/* Bulk warranty layout (Nov 16, 2026): batch list, then one batch with sections that open and close. */
.vr-row { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.vr-row:hover { border-color: var(--navy); }
.vr-row:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.vr-row-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.vr-row-top h3 { margin: 0; font-size: 1.1rem; }
.vr-back { margin: 0 0 8px; padding-left: 0; }
.vr-card .vr-next { margin-top: 10px; width: 100%; }
.vr-sec { margin-top: 10px; padding: 0; }
.vr-sec > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; }
.vr-sec > summary::-webkit-details-marker { display: none; }
.vr-sec > summary::after { content: '▸'; color: var(--ink-2); transition: transform .15s; }
.vr-sec[open] > summary::after { transform: rotate(90deg); }
.vr-sec-t { font-weight: 700; }
.vr-sec-n { flex: 1; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-sec-b { padding: 0 16px 14px; }
.vr-sec-b .vr-unit, .vr-sec-b .vr-form { margin-top: 0; }
@media (min-width: 900px) { .vr-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
/* Messages: everyone waiting on a reply (Nov 16, 2026). */
.msgs-hub .msg-prev { margin: 4px 0 2px; font-size: .95rem; color: var(--ink); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.msgs-hub .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }

/* ---------- Messages tab (Nov 18, 2026): list beside the open conversation on computers, one at a time on phones ---------- */
.msgs-cols { display: grid; gap: 14px; }
.msgs-list .msgs-q { width: 100%; margin: 8px 0; }
.msg-seg { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--r-control); overflow: hidden; }
.msg-seg-btn { flex: 1; border: 0; background: var(--card); color: var(--ink); padding: 10px 8px; font: inherit; font-weight: 600; cursor: pointer; }
.msg-seg-btn + .msg-seg-btn { border-left: 1px solid var(--line); }
.msg-seg-btn.on { background: var(--navy); color: #fff; }
.msg-seg-btn b { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--orange); color: #fff; font-size: .75rem; line-height: 20px; }
:root[data-theme="dark"] .msg-seg-btn.on { background: var(--btn-bg); }
.msg-row.on { outline: 2px solid var(--cobalt); outline-offset: -2px; }
.msg-row.unread .row-bike { font-weight: 700; }
.msg-row .msg-prev { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.msg-who h3 { margin: 0; }
.msg-who .card-head { margin-bottom: 2px; }
.msgs-thread .tk-chat { max-height: 58vh; }
.msgs-empty { text-align: center; padding: 40px 16px; }
.msgs-back { display: none; padding-left: 0; }
@media (max-width: 899px) {
  .msgs-tab.open .msgs-list { display: none; }
  .msgs-tab:not(.open) .msgs-thread .msgs-empty { display: none; }
  .msgs-back { display: inline-block; margin-bottom: 4px; }
}
@media (min-width: 900px) {
  .content main.msgs-tab { max-width: 1240px; }
  .msgs-cols { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); align-items: start; }
  .msgs-list { position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow-y: auto; }
}
/* Phones without Messages on the bottom bar: a Messages button beside the bell (computers have it in the sidebar). */
.msg-btn { position: relative; }
.msg-btn.phone-only { display: none; }
@media (max-width: 899px) { .msg-btn.phone-only { display: inline-grid; } }
.msg-facts { margin: 10px 0 0; display: grid; gap: 4px; }
.msg-facts li { line-height: 1.4; }

/* Builds: sold in the box (sql/139) */
.badge.in-box { background: var(--seg-bg); color: var(--ink-2); }
.in-box-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* SOP photo steps (sql/141) */
.sop-steps { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 14px; }
.sop-step { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: start; }
.sop-step .step-no { width: 32px; height: 32px; border-radius: 50%; background: var(--cobalt); color: #fff; display: grid; place-items: center; font-weight: 800; }
.sop-step.m-ok .step-no { background: #16A34A; } .sop-step.m-notok .step-no { background: #DC2626; }
.sop-step .step-body { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--seg-bg); }
.sop-step.m-ok .step-body { border: 2px solid #16A34A; } .sop-step.m-notok .step-body { border: 2px solid #DC2626; }
.step-photo { display: block; width: 100%; max-width: 560px; border-radius: 8px; background: var(--line); min-height: 120px; object-fit: contain; }
.mark-tag { display: inline-block; margin: 8px 0 0; font-weight: 800; font-size: .85rem; }
.m-ok .mark-tag { color: #15803D; } .m-notok .mark-tag { color: #B91C1C; }
.sop-step .md p:first-child { margin-top: 6px; }
.steps-edit { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 12px; }
.steps-edit legend { font-weight: 800; padding: 0 4px; }
.step-edit { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.step-edit:first-of-type { border-top: 0; padding-top: 0; }
.step-pic { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.step-pic img { width: 100%; border-radius: 8px; background: var(--line); min-height: 80px; object-fit: cover; }
.step-txt { display: grid; gap: 6px; } .step-txt textarea { width: 100%; }
.step-mark { flex-wrap: wrap; }
.btn.on { background: #DC2626; color: #fff; border-color: #DC2626; }
@media (max-width: 560px) { .step-edit { grid-template-columns: 1fr; } .step-pic { flex-direction: row; flex-wrap: wrap; } .step-pic img { width: 120px; } }
.draw-ov { position: fixed; inset: 0; background: rgba(1, 23, 49, .92); z-index: 1000; display: flex; flex-direction: column; }
.draw-bar { display: flex; gap: 8px; align-items: center; padding: 10px; flex-wrap: wrap; }
.draw-colors { display: flex; gap: 6px; margin-right: auto; }
.draw-colors button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); cursor: pointer; }
.draw-colors button.on { border: 3px solid #fff; box-shadow: 0 0 0 2px var(--cobalt); }
.draw-wrap { flex: 1; display: grid; place-items: center; overflow: auto; padding: 8px; }
.draw-wrap canvas { max-width: 100%; max-height: calc(100vh - 80px); touch-action: none; border-radius: 6px; background: #000; }
.btn.build-sop { display: flex; width: 100%; justify-content: flex-start; margin: 8px 0; text-align: left; }

/* Skills matrix (sql/142) */
.sk-scroll { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; }
.sk-table { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.sk-table th, .sk-table td { padding: 6px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.sk-table .sk-who { position: sticky; left: 0; background: var(--card, #fff); text-align: left; white-space: nowrap; font-weight: 700; z-index: 1; padding-left: 12px; }
.sk-head { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 2px; max-width: 140px; font-weight: 700; font-size: .85rem; line-height: 1.2; }
.sk-head[disabled] { cursor: default; } .sk-head small { color: var(--muted); font-weight: 400; }
.sk-cell { all: unset; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 56px; min-height: 44px; border-radius: 10px; }
.sk-cell:focus-visible { outline: 2px solid var(--cobalt); }
.sk-cell small { font-size: .68rem; font-weight: 700; }
.sk-cell.ok { background: #DCFCE7; } .sk-cell.gap { background: #FEE2E2; } .sk-cell.soon { background: #FEF3C7; } .sk-cell.expired { background: #FECACA; outline: 2px solid #DC2626; }
.sk-cell.expired small { color: #B91C1C; } .sk-cell.soon small { color: #92400E; }
.sk-cell.mini { min-width: 14px; min-height: 14px; border-radius: 4px; vertical-align: -2px; cursor: default; }
.sk-dot { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-2, #30435F); vertical-align: middle; background: #fff; }
.sk-dot.sk-l1 { background: conic-gradient(var(--ink-2, #30435F) 0 25%, #fff 0); }
.sk-dot.sk-l2 { background: conic-gradient(var(--ink-2, #30435F) 0 50%, #fff 0); }
.sk-dot.sk-l3 { background: conic-gradient(var(--ink-2, #30435F) 0 75%, #fff 0); }
.sk-dot.sk-l4 { background: var(--ink-2, #30435F); }
.sk-dot.unconf { border-style: dashed; border-color: #B45309; }
.sk-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.sk-legend .sk-dot { width: 16px; height: 16px; }
.sk-confirm .row { margin-top: 8px; }
.sk-levels { border: 0; padding: 0; margin: 0; }

/* Talk instead of typing (Nov 23, 2026) */
.dict-btn { display: inline-flex; align-items: center; gap: 4px; margin: 4px 0 0 auto; padding: 4px 10px; border-radius: var(--r-control); border: 1px solid var(--line);
  background: var(--card, #fff); color: var(--cobalt); font: 600 .82rem/1.2 inherit; cursor: pointer; align-self: flex-end; width: max-content; }
label > .dict-btn { margin-left: auto; }
.dict-btn:hover { border-color: var(--cobalt); }
.inline-form > .dict-btn { margin: 0; align-self: center; }
.dict-sheet { display: grid; gap: 10px; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; }
.dict-sheet h3 { margin: 0; }
.dict-sheet textarea { width: 100%; }
.dict-live { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dict-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); flex: none; }
.dict-ov.listening .dict-dot { background: #DC2626; animation: dictPulse 1s ease-in-out infinite; }
@keyframes dictPulse { 50% { opacity: .35; transform: scale(.8); } }
.dict-out { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }

/* Hang tags (Products → Signs, sql/143) */
.sign-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.sign-row > span:first-child, .sign-row > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sign-flags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.sign-q { width: 100%; margin: 6px 0 10px; }
.sign-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: 16px; align-items: start; }
.sign-preview-wrap { position: sticky; top: 70px; }
.sign-preview { overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.18); background: #fff; margin: 0 auto; max-width: 100%; }
.sign-spec { display: grid; grid-template-columns: minmax(80px, 1fr) minmax(0, 1.6fr) auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.sign-spec.over input { opacity: .55; }
.sign-ai { background: var(--soft, #f4f6fa); border-radius: 8px; }
.sign-logo-row { display: flex; align-items: center; gap: 12px; }
.sign-logo-row strong { flex: 1; }
.sign-logo-box { width: 140px; height: 48px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line, #dde2ea); border-radius: 6px; }
.sign-logo-box img { max-width: 130px; max-height: 40px; object-fit: contain; }
@media (max-width: 820px) { .sign-edit { grid-template-columns: minmax(0, 1fr); } .sign-preview-wrap { position: static; } }
/* Phones (Jordan, Nov 24, 2026): fieldsets default to their widest content, which pushed the editor off the screen. */
.sign-form, .sign-form fieldset { min-width: 0; max-width: 100%; }
.sign-form input, .sign-form select, .sign-form textarea { max-width: 100%; min-width: 0; }
@media (max-width: 520px) { .sign-spec { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto; gap: 4px; } .sign-logo-row { flex-wrap: wrap; } }
.used-tag-preview { max-width: 440px; margin-top: 12px; }
/* Messages on Today (Nov 23, 2026) */
.today-msgs .card-head h3 { margin: 0; }
.today-msg-snip { display: block; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.today-msgs .attn-text { min-width: 0; }
/* Hub → Settings (Nov 23, 2026): the shared .set-row rule (Team) added a second border and a pointer here */
.set-form .set-row { border-top: 0; cursor: auto; font-weight: 400; }
.set-form .set-row:last-of-type { border-bottom: 0; }
.set-form h4 { margin: 18px 0 6px; font-size: .9rem; }
.set-form .actions { margin-top: 14px; }
.set-days { display: grid; gap: 0; }
.set-day { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr); gap: 4px 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.set-day-head { padding: 0; border: 0; }
.set-day input[type="time"] { display: block; width: 100%; min-width: 0; min-height: 40px; padding-left: 8px; padding-right: 4px; }
.set-day-open { margin: 0; }
.set-day-shift { padding-left: 30px; }
.set-day:has(input[type="checkbox"]:not(:checked)) input[type="time"] { opacity: .35; }
.set-inline { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 0; font-weight: 400; }
.set-inline input[type="number"] { width: 76px; min-height: 40px; }
.set-inline select { min-height: 40px; max-width: 100%; }
.set-form .set-row input { min-height: 40px; }
/* Rewards on a customer (Nov 23, 2026): near the top, with each reward's SKU to copy into Ascend */
.rw-card .rw-level { margin: 2px 0 8px; }
.rw-card ul.rw-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; }
.rw-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.rw-item:first-child { border-top: 0; }
.rw-item .rw-name { display: flex; flex-direction: column; min-width: 0; }
.rw-sku { font: 600 13px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); background: var(--seg-bg); border-radius: var(--r-control); padding: 4px 6px; white-space: nowrap; }
@media (max-width: 420px) { .rw-item { grid-template-columns: minmax(0, 1fr) auto; } .rw-item .rw-sku { grid-column: 1; justify-self: start; } }
.rw-find-row { display: flex; gap: 8px; margin-top: 4px; }
.rw-find-row input { flex: 1; min-width: 0; min-height: 44px; }

/* Hub → Customer app (sql/147) */
.ca-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 10px 0; }
.ca-ph { margin: 0; background: var(--surface, #fff); border: 1px solid var(--rule, #dde3ea); border-radius: var(--r-control, 8px); overflow: hidden; }
.ca-ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.ca-ph figcaption { padding: 8px; font-size: 14px; }
.ca-ph.muted img { opacity: .45; }

/* ---- pickup & delivery (sql/150) ---- */
.pd-run h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.pd-run h2 input[type="date"] { font: inherit; font-size: 1rem; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--card); color: var(--ink); }
.pd-stops { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.pd-list { display: grid; gap: 10px; }
.pd-stop { border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; background: var(--card); }
.pd-stop.on-run { border-left: 4px solid var(--cobalt); }
.pd-head { display: flex; gap: 10px; align-items: flex-start; }
.pd-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font: 800 .9rem/1 'Overpass', sans-serif; }
.pd-who { min-width: 0; }
.pd-who .btn.link { padding: 0; font-weight: 700; }
.pd-note { margin-top: 4px; color: var(--ink-2); }
.pd-bikes { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.pd-bikes li { padding: 8px 10px; background: var(--bg); border-radius: var(--r-control); }
.pd-bikes .actions { margin-top: 6px; }
.pd-tag { display: inline-block; font: 800 .68rem/1 'Overpass', sans-serif; text-transform: uppercase; letter-spacing: .06em; padding: 4px 6px; border-radius: 4px; background: var(--cobalt-tint); color: var(--cobalt); }
.pd-tag.st-deliver { background: var(--ok-tint); color: var(--ok); }
.pd-tag.st-shop { background: var(--seg-bg); color: var(--ink-2); }
.pd-foot { margin-top: 10px; }
.pd-edit { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
/* ---- mailing lists ---- */
.ml-list { display: grid; gap: 10px; }
.ml-card.st-ok { border-left: 4px solid var(--ok); }
.ml-card.st-review { border-left: 4px solid var(--orange); }
.ml-card.st-removed { opacity: .75; }
.ml-card h3 { margin: 0; }
.ml-card p { margin: 6px 0; }
.ml-found { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.ml-found li { padding: 8px 10px; background: var(--bg); border-radius: var(--r-control); }
.ml-found .btn.link { padding: 0; font-weight: 700; }
.ml-found .actions { margin-top: 4px; }
/* ---- customer tags ---- */
.cust-tags { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 8px; border-radius: 999px; background: var(--cobalt-tint); color: var(--cobalt); font-weight: 600; }
.tag-chip .btn.link { padding: 0 4px; min-height: 0; }
.cust-tags .inline-form { display: inline-flex; gap: 6px; align-items: center; }
.cust-tags .inline-form input { padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-control); font: inherit; }

/* ---- signs: To print list (Nov 24, 2026 layout) ---- */
.sp-card h3 { margin: 0; }
.sp-stale { margin: 8px 0; padding-left: 18px; display: grid; gap: 4px; }
.sp-stale .btn.link { padding: 0; font-weight: 600; }
.sp-card, .sp-bulk { margin-bottom: 12px; }
.card.sp-bulk { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 14px; }
.sp-bulk label { flex-direction: row; align-items: center; margin: 0; }
.sp-all { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.sp-all input, .sp-row input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--cobalt); }
.sp-bulk-do { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sp-as { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.sp-as select { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-control); font: inherit; background: var(--card); color: var(--ink); }
.sp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 8px; }
.sp-head h3 { margin: 0 0 2px; }
.sp-list { display: grid; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.sp-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--card); }
.sp-row + .sp-row { border-top: 1px solid var(--line); }
.sp-row.on { background: var(--cobalt-tint); }
.sp-main { flex: 1; min-width: 0; text-align: left; }
.sp-name.btn.link { padding: 0; min-height: 0; font-weight: 700; text-align: left; white-space: normal; justify-content: flex-start; }
.sp-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; font-size: .8rem; color: var(--muted); }
.sp-ok { color: var(--ok); font-weight: 600; }
.sp-warn { color: var(--orange); font-weight: 600; }
.sp-acts { display: flex; align-items: center; gap: 4px; flex: none; }
@media (max-width: 560px) {
  .sp-head .btn { width: 100%; }
  .sp-bulk-do { width: 100%; }
  .sp-bulk-do .sp-as { flex: 1 1 100%; }
  .sp-bulk-do select { flex: 1; min-width: 0; }
  .sp-bulk-do .btn { flex: 1; }
}
.gear-nopick { width: 18px; display: inline-block; flex: 0 0 auto; }
/* Sign types across the top of Signs (Nov 24, 2026): Bikes, Garmin, … */
.sign-cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line, #dde2ea); }
.sign-cat { font: 800 15px/1 Overpass, Arial, sans-serif; text-transform: uppercase; letter-spacing: .03em; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line, #dde2ea); background: var(--card, #fff); color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.sign-cat.on { background: var(--navy, #011731); color: #fff; border-color: var(--navy, #011731); }
.sign-cat .badge { font: 700 11px/1 'Open Sans', Arial, sans-serif; text-transform: none; letter-spacing: 0; background: var(--orange, #B84E0B); color: #fff; border-radius: 10px; padding: 3px 7px; }
.btn.link.back + .sign-edit { margin-top: 10px; }
.sign-form fieldset > input { display: block; width: 100%; margin-bottom: 6px; }
/* Shelf labels (Nov 24, 2026) */
.label-item { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, .8fr); gap: 6px; margin-bottom: 8px; align-items: center; }
.label-item .label-found { grid-column: 1 / -1; margin-top: -2px; }
.label-copies { width: 56px; }
@media (max-width: 520px) { .label-item { grid-template-columns: 1fr 1fr; } .label-item .scan-wrap { grid-column: 1 / -1; } }
.lb-hits-h { margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #667); }
/* App how-tos (Nov 24, 2026) */
.help-btn { font: 800 17px/1 Overpass, Arial, sans-serif; }
.help-panel { position: fixed; inset: 0 0 0 auto; width: min(460px, 100vw); background: var(--bg, #f4f6fa); z-index: 60; box-shadow: -8px 0 30px rgba(0,0,0,.25); display: flex; flex-direction: column; }
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: var(--card, #fff); border-bottom: 1px solid var(--line, #dde2ea); }
.help-head h2 { margin: 0; font-size: 18px; }
.help-body { overflow-y: auto; padding: 12px 14px 40px; flex: 1; }
.help-title { margin: 2px 0 6px; }
.help-steps { padding-left: 22px; }
.help-steps li { margin: 0 0 18px; }
.help-steps img { display: block; width: 100%; max-width: 330px; border-radius: 12px; border: 1px solid var(--line, #dde2ea); margin-top: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.help-more { margin-top: 14px; }
.howto-sec { margin: 10px 0 14px; padding: 10px 14px; }
.howto-sec summary { cursor: pointer; }
/* Search boxes with a camera button (Nov 24, 2026) */
.scan-wrap.big-scan { flex: 1; width: 100%; }
.scan-wrap.big-scan .big-search { flex: 1; min-width: 0; }
.q-add .scan-wrap { width: 100%; }
/* Stolen-bike serial alerts (sql/155) */
.stolen-card { border-top: 6px solid var(--danger, #b3261e); }
.stolen-card h2 { color: var(--danger, #b3261e); margin: 0 0 8px; font-size: 1.15rem; }
.stolen-today { border-left: 5px solid var(--danger, #b3261e); }
.stolen-today h3 { color: var(--danger, #b3261e); }
.stolen-hits { background: rgba(179, 38, 30, .06); border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.stolen-hits ul { margin: 4px 0 0; padding-left: 18px; }
/* Check them one by one (signs, Garmin cards) */
.check-run-start { margin: 6px 0 10px; }
.check-run-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; margin: 6px 0 10px; border-radius: 10px; background: var(--accent-soft, #e8f0ff); }
.check-run-bar span { flex: 1 1 200px; }
.help-fb { width: 100%; margin-top: 14px; }
/* Hub → Customer app: app-use counts (sql/158) */
.adopt { margin-bottom: 10px; } .adopt-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 6px 0; }
.adopt-nums > div { display: grid; } .adopt-nums b { font-size: 1.4rem; }
/* Hub → Parts for bikes: fit by model (sql/159) */
.fit-unchecked { border-left: 3px solid var(--warn, #c77700); } .fit-preview h4 { margin: 0 0 6px; }

/* Phone bottom bar editor (Nov 25, 2026): the bar in order, drag ⋮⋮ or use the arrows. */
.pin-list { list-style: none; margin: 6px 0 8px; padding: 0; display: grid; gap: 6px; max-width: 460px; }
.pin-fixed { padding: 2px 10px; }
.pin-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.pin-item.dragging { opacity: .85; box-shadow: 0 6px 18px rgba(1,23,49,.18); border-color: var(--accent, #023FAD); }
.pin-handle { cursor: grab; touch-action: none; user-select: none; padding: 6px 4px; font-weight: 700; color: var(--muted); letter-spacing: -2px; }
.pin-item.dragging .pin-handle { cursor: grabbing; }
.pin-name { flex: 1; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; } .pin-name .ico { width: 18px; height: 18px; }
.pin-btns { display: inline-flex; gap: 2px; }
.pin-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Product page: everything we know (sql/164). */
.prod-info { display: grid; gap: 10px; margin: 10px 14px 4px; }
.pi-sec { border-top: 1px solid var(--line); padding-top: 8px; }
.pi-sec ul.plain { margin: 4px 0; padding-left: 0; list-style: none; } .pi-sec li { margin: 2px 0; }
.pi-sec .pi-this { font-weight: 700; }
.pi-specs { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0; } .pi-specs dt { color: var(--muted); } .pi-specs dd { margin: 0; }

/* A product's own page (Nov 25, 2026). */
.prod-page .pp-head { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: start; }
.prod-page .pp-title h2 { margin: 0 0 2px; }
.prod-page .pp-nums { text-align: right; } .prod-page .pp-nums .prod-price { font-size: 1.4rem; font-weight: 800; }
.prod-page .pp-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.prod-page .pp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; margin-top: 14px; }
.prod-page .pp-col { display: grid; gap: 14px; }
.prod-page .pp-card h3 { margin: 0 0 8px; font-size: 1rem; }
.prod-page .pp-card ul.plain { list-style: none; padding: 0; margin: 4px 0 8px; } .prod-page .pp-card li { margin: 3px 0; }
.prod-page .pi-this { font-weight: 700; }
.prod-page .prod-detail { padding: 0; }
.prod-peek { margin: 4px 14px 6px; }
@media (max-width: 760px) { .prod-page .pp-grid { grid-template-columns: 1fr; } .prod-page .pp-head { grid-template-columns: 1fr; } .prod-page .pp-nums { text-align: left; } }

/* Search boxes: the browser's own clear ✕ is about 10px on phones. Draw a bigger one (Nov 25, 2026). */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; margin: 0 -4px 0 6px; cursor: pointer;
  background-color: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm4.3 12.9-1.4 1.4L12 13.4l-2.9 2.9-1.4-1.4 2.9-2.9-2.9-2.9 1.4-1.4 2.9 2.9 2.9-2.9 1.4 1.4-2.9 2.9z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm4.3 12.9-1.4 1.4L12 13.4l-2.9 2.9-1.4-1.4 2.9-2.9-2.9-2.9 1.4-1.4 2.9 2.9 2.9-2.9 1.4 1.4-2.9 2.9z'/%3E%3C/svg%3E") center / contain no-repeat;
}
input[type="search"]::-webkit-search-cancel-button:hover { background-color: var(--ink); }
@media (pointer: coarse) { input[type="search"]::-webkit-search-cancel-button { width: 30px; height: 30px; } }

/* Free freight on Need to order (freight.js; Jordan, Nov 27, 2026) */
.freight { margin: 2px 0 8px; padding: 6px 10px; border-radius: 8px; background: rgba(31,95,174,.08); }
.freight p { margin: 0; }
.freight.ready { background: rgba(43,122,61,.14); }
.freight.warn { background: rgba(214,140,0,.16); }
.freight-meter { height: 6px; margin-top: 6px; border-radius: 3px; background: rgba(0,0,0,.1); overflow: hidden; }
.freight-meter span { display: block; height: 100%; background: #2b7a3d; }
.freight.under .freight-meter span { background: #1f5fae; }
.freight-fill { margin-top: 6px; }
.freight-ready { margin: 0 0 8px; }

/* Shop TV: service board for a TV facing the workshop (#shoptv; Jordan, Nov 27, 2026). Sized for a 1080p TV read from the benches. */
.shoptv { min-height: 100vh; box-sizing: border-box; padding: 2.2vh 2.4vw; background: #0d1b2e; color: #f4f7fb; font-family: 'Open Sans', system-ui, sans-serif; display: flex; flex-direction: column; gap: 2vh; }
.shoptv h1, .shoptv h2 { color: inherit; font-family: 'Overpass', 'Open Sans', sans-serif; margin: 0; }
.tv-head { display: flex; align-items: baseline; gap: 2vw; }
.tv-head h1 { color: #fff; font-size: 5vh; letter-spacing: .04em; text-transform: uppercase; }
.tv-head p { margin: 0; font-size: 3vh; color: #b9c6d8; }
.tv-exit { margin-left: auto; color: #8fa3bd !important; font-size: 1.6vh; }
.tv-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2vw; }
.tv-stat { background: #16283f; border-radius: 1.2vh; padding: 1.4vh 1vw; text-align: center; border-top: .6vh solid #1f5fae; }
.tv-stat b { display: block; font-size: 8vh; line-height: 1; font-family: 'Overpass', sans-serif; }
.tv-stat span { font-size: 2.4vh; color: #b9c6d8; }
.tv-stat.bad { border-top-color: #e0532b; } .tv-stat.bad b { color: #ff8a65; }
.tv-stat.good { border-top-color: #2f9e55; }
.tv-cols { display: grid; grid-template-columns: 2.2fr 1fr; gap: 2vw; flex: 1; min-height: 0; }
.tv-cols h2 { font-size: 2.6vh; text-transform: uppercase; letter-spacing: .05em; color: #8fb8ff; margin-bottom: 1vh; }
.tv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8vh; }
.tv-row { display: grid; grid-template-columns: 9vw 1fr 8vw 10vw; align-items: center; gap: 1vw; background: #16283f; border-radius: 1vh; padding: 1vh 1vw; border-left: .7vh solid #1f5fae; font-size: 2.6vh; }
.tv-row.late { border-left-color: #e0532b; background: #2a1d22; }
.tv-row.today { border-left-color: #f0b429; }
.tv-t { font-weight: 700; color: #b9c6d8; }
.tv-b b { display: block; font-size: 3vh; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-b span { color: #b9c6d8; font-size: 2.2vh; }
.tv-age { font-weight: 700; } .tv-age.old { color: #ff8a65; }
.tv-due { text-align: right; color: #d7e0ec; } .tv-row.late .tv-due { color: #ff8a65; font-weight: 800; }
.tv-more, .tv-clear { font-size: 2.6vh; color: #b9c6d8; margin: 1vh 0 0; } .tv-clear { font-size: 4vh; color: #7ee2a0; }
.tv-side { background: #12233a; border-radius: 1.2vh; padding: 1.6vh 1.2vw; }
.tv-small { list-style: none; margin: 0 0 2.4vh; padding: 0; font-size: 2.2vh; display: grid; gap: .6vh; }
.tv-small span { color: #8fa3bd; font-size: 1.8vh; margin-left: .4vw; }
.tv-foot { font-size: 2.2vh; color: #b9c6d8; display: flex; justify-content: space-between; gap: 2vw; border-top: 1px solid #263b57; padding-top: 1vh; }
.tv-foot span { color: #6f85a3; font-size: 1.7vh; }
.freight.check { background: rgba(214,140,0,.12); }
.freight.check p + p { margin-top: 4px; }
.freight-quote { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.freight-quote input { width: 6em; }
/* Today screens by job (Nov 29, 2026): focus cards, "Everything else", the simple version, and the editor. */
.today-focus .list { display: flex; flex-direction: column; gap: 8px; }
.today-focus h4 { margin: 10px 0 4px; }
.today-more > summary { cursor: pointer; padding: 4px 0; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.today-more[open] > summary { margin-bottom: 10px; }
.today-more > .card, .today-more > section { margin-top: 12px; }
.today-simple { font-size: 1.12rem; }
.today-simple .card-head h3 { font-size: 1.35rem; }
.today-simple .row { padding: 18px 16px; min-height: 64px; }
.today-simple .row-bike { font-size: 1.2rem; font-weight: 700; }
.today-simple .tc-btns .btn, .today-simple .btn.primary { min-height: 56px; font-size: 1.15rem; }
.today-ed { margin-top: 8px; }
.today-ed-list { list-style: none; margin: 4px 0 8px; padding: 0; }
.today-ed-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line, #e3e7ee); }
.today-ed-row .check { flex: 1; }
.today-ed-row .check .muted { display: block; }
.today-assign { display: flex; flex-direction: column; gap: 6px; }
.today-assign .set-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; justify-content: space-between; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; margin: 0 10px 6px 0; }
/* System health (sql/177) */
.health-list { list-style: none; margin: 8px 0 0; padding: 0; }
.health-row { padding: 10px 0; border-top: 1px solid var(--line, #e3e8ef); }
.health-row:first-child { border-top: 0; }
.hl-ok { color: #1a7f37; font-size: .85em; font-weight: 600; margin-left: 6px; }
.hl-bad { color: #b42318; font-size: .85em; font-weight: 600; margin-left: 6px; }
.hl-wait { color: var(--muted); font-size: .85em; font-weight: 600; margin-left: 6px; }
.hl-err { color: #b42318; }

/* Build checklists (sql/180, buildcheck.js): big one-tap rows for a phone or tablet at the stand, one section open. */
.ck { display: flex; flex-direction: column; gap: 10px; }
.ck-head { display: flex; flex-direction: column; gap: 6px; }
.ck-count { font-size: 1.05rem; }
.ck-bar { height: 10px; border-radius: 5px; background: var(--seg-bg); overflow: hidden; }
.ck-bar span { display: block; height: 100%; background: var(--ok); transition: width .2s; }
.ck-sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.ck-sec > summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; min-height: 48px; cursor: pointer; font-weight: 700; color: var(--navy); }
.ck-sec.done > summary { color: var(--ok); }
.ck-sec[open] > summary { border-bottom: 1px solid var(--line); }
.ck-n { font-weight: 600; color: var(--muted); font-size: .9rem; }
.ck-rows { list-style: none; margin: 0; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.ck-qc > .ck-rows { padding: 0; }
.ck-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ck-tap { flex: 1 1 220px; display: flex; align-items: center; gap: 4px; text-align: left; min-height: 56px; padding: 10px 12px; font: inherit; font-size: 1.02rem;
  color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-control); }
button.ck-tap { cursor: pointer; }
.ck-tap .tick-box { flex: none; width: 24px; height: 24px; margin-right: 10px; color: var(--muted); position: relative; }
.ck-label { display: flex; flex-direction: column; gap: 2px; }
.ck-who { font-size: .8rem; color: var(--muted); }
.ck-row.on .ck-tap { background: var(--ok-tint); border-color: var(--ok); }
.ck-row.on .tick-box, .ck-row.na .tick-box { color: var(--ok); background: currentColor; }
.ck-row.on .tick-box::after, .ck-row.na .tick-box::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; line-height: 1; }
.ck-row.na .ck-tap { background: var(--seg-bg); }
.ck-row.na .ck-label { color: var(--muted); }
.ck-na, .ck-fail { flex: none; }
.ck .btn.big[disabled] { opacity: .6; cursor: default; }
/* Hub → Settings editor */
.ck-ed-list, .ck-ed-types { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.ck-ed-row { border: 1px solid var(--line); border-radius: var(--r-control); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.ck-ed-top { display: flex; gap: 6px; align-items: center; }
.ck-ed-top input { flex: 1; min-width: 0; }
.ck-ed-opts { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ck-ed-opts label.small { display: flex; gap: 6px; align-items: center; }
.ck-ed-types li { display: flex; gap: 6px; flex-wrap: wrap; }
.ck-ed-types input { flex: 1 1 140px; min-width: 0; }
.ck-qc .ck-tap { flex: 1 1 0; min-width: 0; }
.ck-qc .ck-row .ck-na { order: 3; flex-basis: 100%; text-align: left; min-height: 32px; padding: 2px 4px; }
.ck-qc .ck-fail { min-height: 56px; padding: 8px 10px; }
.ck-ed-row { padding: 6px 8px; gap: 2px; }
.ck-ed-head { font-weight: 700; color: var(--navy); margin-top: 6px; }
.ck-ed-more > summary { cursor: pointer; padding: 2px 0; }
.ck-ed-more .ck-ed-opts { padding-top: 6px; }
/* Add a bike to build, step by step (buildnew.js) */
.nb-step { margin: 4px 0 0; }
.nb-picked { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 12px; margin: 8px 0; }
.nb-picked > div { display: flex; flex-direction: column; gap: 2px; }
.nb-whys { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.nb-why { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-height: 64px; }
.nb-why .small { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .85; }
.nb-units .row, #nb-custs .row { text-align: left; }
.nb-newcust { margin: 8px 0; }
/* Build board (#buildtv): its styles live in buildboard.js, shared with the shop TVs (tv.html). */
/* New warranty claim, one step at a time (Nov 29, 2026). Every field stays in the form; only the current step shows. */
.wz .wz-step:not(.on) { display: none; }
.wz-step { display: contents; }
form:not(.wz) .wz-nav, form:not(.wz) [data-act="wz-back"] { display: none; }
.wz-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.wz-n { margin: 0; flex: 1 1 auto; }
.wz-dots { display: flex; gap: 6px; } .wz-dots i { width: 28px; height: 6px; border-radius: 3px; background: var(--line, #d5dbe3); }
.wz-dots i.done { background: var(--ok, #2f9e55); } .wz-dots i.on { background: var(--accent, #023FAD); }
.wz .wz-step.on { display: contents; }
.wz-nav { margin-top: 4px; }
/* Receiving: the next thing to do on an order, big, at the top of its to-do card (Nov 29, 2026). */
.ship-next { background: var(--tint, #eef3fb); border-radius: 10px; padding: 12px 14px; margin: 4px 0 10px; }
.ship-next p { margin: 0 0 6px; } .ship-next-h { font-size: 1.15rem; font-weight: 700; }
.ship-next .btn.big { width: 100%; }
/* Warranty claims on shop stock (Nov 29, 2026): "Whose bike is it?" in the customer step; stock hides the customer fields. */
.whose-pick .segs { display: grid; grid-template-columns: 1fr; gap: 6px; }
form[data-whose="stock"] .w-custonly { display: none; }
form:not([data-whose="stock"]) .w-stock-note { display: none; }
.w-stock-note { background: #fff4d6; border-radius: 8px; padding: 10px 12px; }
.badge.w-stock { background: #fff4d6; color: #7a4b00; }

/* Hub > App use (sql/185) */
.app-use .card-head select { width: auto; }
.au-list { list-style: none; margin: 8px 0 0; padding: 0; }
.au-list li { border-top: 1px solid var(--line); }
.au-list summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; cursor: pointer; list-style: none; }
.au-list summary::-webkit-details-marker { display: none; }
.au-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.au-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--cobalt); opacity: .55; }
/* Claim page in panes (Nov 29, 2026: one screen at a time): the top says where it stands, the chips switch the part below. */
.claim-page.panes .cp-pane:not(.on) { display: none; }
.cp-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.cp-tabs .cp-all { margin-left: auto; }
.claim-page:not(.panes) .cp-tabs .chip { display: none; }
/* On a phone the claim's progress is one row of bars with only the current step named. */
@media (max-width: 600px) {
  .claim-page.panes .w-steps { grid-template-columns: repeat(6, 1fr); position: relative; padding-bottom: 18px; }
  .claim-page.panes .w-steps li { font-size: 0; padding-top: 0; }
  .claim-page.panes .w-steps li.now { font-size: 12px; position: absolute; left: 0; bottom: 0; }
  .claim-page.panes .cp-tabs .chip { padding: 6px 10px; }
  .claim-page.panes form[data-form="w-move"] label > .small.muted { display: none; }   /* the placeholders say it */
}

/* Today → "Get their email" (sql/186): a short call list, one row per customer, the answer folded under it. */
.ge-list { list-style: none; margin: 8px 0 0; padding: 0; }
.ge-row { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.ge-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ge-name { font-weight: 700; }
.ge-ans > summary { cursor: pointer; color: var(--cobalt); padding: 4px 0; min-height: 32px; display: flex; align-items: center; }
.ge-form { display: grid; gap: 8px; margin-top: 4px; }
.ge-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ge-add { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ge-add h4 { margin: 0 0 2px; }
.ge-add li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; }
/* Warranty list in the Customer emails pattern (Nov 29, 2026): grouped rows, status pill, search; list beside the claim on a computer. */
.w-list-top { display: flex; gap: 8px; align-items: center; }
.w-list-top input { flex: 1; min-width: 0; }
.ce-pill.is-late { background: #fde8e6; color: #a4281b; }
.ce-pill.w-completed { background: var(--ok-tint); color: var(--ok); }
.claim-row .ce-when.late { color: #c0392b; font-weight: 600; } .claim-row .ce-when.soon { color: #9a6700; font-weight: 600; }
.claim-row .w-extra { grid-column: 1 / -1; }
.claim-row::after { grid-row: 1 / span 2; align-self: center; }
@media (max-width: 899px) { .w-pick { display: none; } }
@media (min-width: 900px) { .w-split > .ce { margin-top: 8px; } .w-split .ce-detail .claim-page { padding: 0; max-width: none; } .w-split .claim-page > .back { display: none; } }
/* Builds list in the Customer emails pattern (Nov 29, 2026). */
.ce-pill.is-soon { background: #fff4d6; color: #7a4b00; }
.b-row .b-extra { grid-column: 1 / -1; }
.b-row::after { grid-row: 1 / span 2; align-self: center; }
.b-list .stage-chips { margin: 0; }
.b-row, .claim-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.b-row::after, .claim-row::after { grid-column: 3; }
.b-row .ce-pill, .claim-row .ce-pill { grid-column: 2; grid-row: 1; }
.b-row .ce-when, .claim-row .ce-when { grid-column: 1 / 3; }
/* Rows stay short on a phone (Nov 29, 2026): one line for the next step, two for the name; the full text is one tap away. */
.b-row .ce-when:not(.b-extra), .claim-row .ce-when:not(.w-extra) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-row .ce-name, .claim-row .ce-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.b-row, .claim-row { padding-top: 10px; padding-bottom: 10px; }
/* Receiving list in the Customer emails pattern (Nov 29, 2026). */
.ship-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.ship-row::after { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.ship-row .ce-pill { grid-column: 2; grid-row: 1; }
.ship-row .ce-when { grid-column: 1 / 3; }
.ship-row .badge { font-size: .75rem; }
.ship-lst .chips { margin: 0; }
.ship-more { margin: 4px 0 0; }
.ship-how { margin-top: 6px; } .ship-how summary { cursor: pointer; }
/* The order page in panes on a phone (Nov 29, 2026): next step, order, parts, invoice. A computer shows it all. */
.ship-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 6px 0 0; }
.ship-head h2 { margin: 0; font-size: 1.15rem; min-width: 0; overflow-wrap: anywhere; }
.ship-page .ship-one > .ship > .card-head { display: none; }
.ship-page.panes .cp-pane:not(.on) { display: none; }
.ship-page:not(.panes) .cp-tabs .chip { display: none; }
@media (min-width: 900px) { .ship-page .cp-pane { display: block !important; } .ship-page .cp-tabs { display: none; } }
/* Service board in the Customer emails pattern (Nov 29, 2026): rows grouped by urgency, a due pill, tap to open the ticket. */
.wo-list .wo-board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.wo-list .wo-col { background: var(--card); display: block; padding: 12px; }
.wo-list .wo-card, .wo-list .wo-card.late, .wo-list .wo-card.today, .wo-list .wo-card.parts-in { background: none; border: 0; border-radius: 0; box-shadow: none; }
.wo-list .wo-head { padding: 10px 8px; color: var(--ink); }
.wo-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.wo-row::after { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.wo-row .ce-pill { grid-column: 2; grid-row: 1; }
.wo-row .ce-when { grid-column: 1 / 3; }
.wo-row .wo-bike { color: var(--ink-2); }
.wo-list .toolbar, .wo-list .chips, .wo-list .wo-sort { margin: 0; }
.wo-list .wo-tv { margin: 0; }
/* The ticket in panes on a phone: Work, Ticket, Customer. A computer shows it all. */
.tk-main > .cp-pane, .tk-side > .cp-pane { display: grid; gap: 12px; align-content: start; } .cp-pane > .card { margin: 0; }
.tk-page.panes .cp-pane:not(.on) { display: none; }
.tk-page:not(.panes) .cp-tabs .chip { display: none; }
@media (min-width: 900px) { .tk-page .cp-pane { display: grid !important; } .tk-page .cp-tabs { display: none; } .tk-split .ce-detail .tk-page { padding: 0; max-width: none; } }
.tk-split .tk-cols { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1500px) { .tk-split .tk-cols { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); } }
@media (max-width: 600px) { .tk-page.panes .cp-tabs .chip, .ship-page.panes .cp-tabs .chip { padding: 6px 10px; } }
/* Need to order, one step at a time on a phone (Nov 29, 2026): the list with Scan and Type it in on top; typing opens the form alone. */
.need-top { display: flex; gap: 8px; flex-wrap: wrap; } .need-top .scan-big { flex: 1 1 220px; margin: 0; } .need-top .need-type { flex: 1 1 140px; }
@media (max-width: 1199px) {
  .need-page:not(.adding) .need-form, .need-page:not(.adding) .card-picks, .need-page:not(.adding) .need-back { display: none; }
  .need-page.adding .need-listcol, .need-page.adding .need-top { display: none; }
}
@media (min-width: 1200px) { .need-page .need-back, .need-page .need-type { display: none; } }
/* Special orders in the Customer emails pattern (Nov 29, 2026): a row per customer, tap for the parts and the buttons. */
.so-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.so-row::after { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.so-row .ce-pill { grid-column: 2; grid-row: 1; }
.so-row .ce-when { grid-column: 1 / 3; }
/* A customer's parts take at most two lines in the list (Dec 1, 2026: three long part names ran to three or four lines on a phone). The customer's page lists them all. */
.so-row .ce-when { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.so-lst .chips { margin: 0; } .so-how summary { cursor: pointer; }
.ce-detail .so-one .so-card { margin: 0; }
/* Pickup & delivery one list at a time (Nov 29, 2026): Run, To pick up, To deliver, At the shop as tabs. */
.pd.panes .cp-pane:not(.on) { display: none; }
.pd:not(.panes) .cp-tabs .chip { display: none; }
@media (max-width: 600px) { .pd.panes .cp-tabs .chip { padding: 6px 10px; } }
.pd-short .pd-bikes li { padding: 2px 0; }
.pd-short .pd-foot { margin-top: 6px; }
.pd-more { margin-top: 6px; font-size: 14px; }
.pd-more summary { cursor: pointer; color: var(--muted, #666); }
.pd-more-bike { margin: 6px 0; }
/* Build page one part at a time (Nov 29, 2026): Next step, Details, Timeline. */
.bld-page.panes .cp-pane:not(.on) { display: none; }
.bld-page:not(.panes) .cp-tabs .chip { display: none; }
.bld-page .cp-tabs { margin: 10px 0; }
@media (max-width: 600px) { .bld-page.panes .cp-tabs .chip { padding: 6px 10px; } }
@media (min-width: 900px) { .bld-page .cp-pane { display: block !important; } .bld-page .cp-tabs { display: none; } }
.w-more { margin: 8px 0; } .w-more summary { cursor: pointer; color: var(--ink-2, #555); font-size: 14px; }
.form-more { border-top: 1px solid var(--line, #ddd); padding-top: 8px; } .form-more > summary { cursor: pointer; color: var(--ink-2, #555); font-size: 15px; padding: 6px 0; } .form-more[open] > summary { margin-bottom: 8px; } .form-more > label, .form-more > .time-pair { margin-bottom: 12px; }
.ce-more-li { list-style: none; padding: 6px 12px; } .ce-more { font-weight: 600; }
.wo-fold { all: unset; cursor: pointer; display: flex; align-items: center; gap: 6px; width: 100%; font: inherit; } .wo-fold-i { margin-left: auto; color: var(--ink-2, #555); } .wo-shut h3 { margin: 0; }
.ship-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 12px 12px; }
@media (max-width: 600px) { .ship-quick { flex-wrap: nowrap; } .ship-quick .btn { padding-left: 10px; padding-right: 10px; white-space: nowrap; flex: 0 0 auto; } .ship-quick .ok { min-width: 0; } }
/* Shorter Receiving rows (Dec 1, 2026). On a phone a row here was 190-250px: the two quick buttons stacked, and the
   items line ran to nine lines on a 45-line order. Now the buttons share a line and what's in the order is one line
   (the order's own page lists it all); the "Next:" line may take two. */
.ship-row .ce-when:not(.s-extra) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ship-row .ce-when.s-extra { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* Team (Nov 29, 2026): Customer-emails style list, then one person, then one part of their settings */
.tm .ce-list > .card-head { margin: 0; }
.tm-q { width: 100%; }
.tm-row { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.tm-row .avatar { grid-row: 1 / 3; }
.tm-row .ce-name { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-row .ce-pill { grid-column: 3; grid-row: 1; }
.tm-row .ce-when { grid-column: 2; grid-row: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-row::after { grid-column: 3; grid-row: 2; }
.ce-pill.tm-warn { background: var(--seg-bg); color: var(--warn); }
.tm .person { display: flex; flex-direction: column; gap: 8px; }
.tm-parts { border-top: 1px solid var(--line); margin-top: 4px; }
.tm-former-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.tm-part .set-row { padding: 10px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .tm .tm-back-part { display: block; } }
.tm-back-part { justify-self: start; text-align: left; align-self: start; }
@media (max-width: 899px) { .tm-row.on:not(:hover) { background: none; } }

/* Today as one short list (Nov 29, 2026) */
.td .ce-list > .card { margin: 0; }
.td-row .ce-pill.td-n { background: var(--cobalt-tint); color: var(--cobalt); }
.td-row .ce-when { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td .today-more > summary { cursor: pointer; padding: 4px 0; }
.td .ce-detail > .card { margin: 0; }
@media (max-width: 899px) { .td-row.on:not(:hover) { background: none; } }

/* Stuck as a short list, then one item (Nov 29, 2026) */
.st-row { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.st-row .st-age { grid-row: 1 / 3; display: grid; place-items: center; min-width: 44px; padding: 4px; border-radius: 8px; background: var(--seg-bg); line-height: 1.1; }
.st-row .st-age small { font-size: .68rem; color: var(--muted); }
.st-row.late .st-age { background: var(--warn-tint, #fde8dd); color: var(--warn); }
.st-row .ce-name { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-row .ce-pill { grid-column: 3; grid-row: 1; }
.st-row .ce-when { grid-column: 2; grid-row: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-row::after { grid-column: 3; grid-row: 2; }
.st .ce-detail .stuck-list { margin: 0; }
@media (max-width: 899px) { .st-row.on:not(:hover) { background: none; } }
/* The fix button right on each Stuck row (Dec 1, 2026): Receive, Open ticket, Tell them… in one tap, no detail screen first. */
.st-li { display: flex; align-items: center; gap: 6px; }
.st-li > .st-row { flex: 1; min-width: 0; }
.st-li > .st-fix { flex: none; white-space: nowrap; margin-right: 4px; padding-inline: 10px; }
.st-li > .st-row::after { content: none; }   /* the fix button is the way in; the row still opens the details */
@media (max-width: 899px) { .st-li .ce-pill:not(.is-on) { display: none; } }   /* "Nobody" on every row cost the name its room; the chip above counts them */

/* Snapshot as one short list (Nov 29, 2026) */
.snap-ce .ce-list > .actions { margin: 0; }
.snap-ce .ce-when { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snap-ce .ce-detail > .card { margin: 0; }
@media (max-width: 899px) { .snap-ce .ce-row.on:not(:hover) { background: none; } }

/* Schedule week as one row per day (Nov 29, 2026) */
.wk { margin-top: 8px; }
.wk .ce-when { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-pill.day-warn { background: var(--seg-bg); color: var(--warn); }
.wk .ce-detail > .day { margin: 0; }
@media (max-width: 899px) { .day-row.on:not(:hover) { background: none; } }

/* Training sites as one short list (Nov 29, 2026) */
.tr-ce .ce-when { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-ce .ce-detail > .card { margin: 0; }
@media (max-width: 899px) { .tr-ce .ce-row.on:not(:hover) { background: none; } }

/* Feedback as one short list (Nov 29, 2026) */
.fb-ce .fb-add { width: 100%; margin-bottom: 12px; }
.fb-ce .ce-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-ce .ce-detail > .card { margin: 0; }
.fb-form { max-width: 560px; }
@media (max-width: 899px) { .fb-ce .ce-row.on:not(:hover) { background: none; } }

/* Receipts as one short list (Nov 29, 2026) */
.rc-top { margin-bottom: 8px; }
.rc-ce .rcpt-add, .rc-ce .rcpt-new { width: 100%; margin-bottom: 12px; }
.rc-ce .ce-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-ce .ce-detail > .card { margin: 0; }
.ce-pill.is-warn { background: var(--seg-bg); color: var(--warn); }
@media (max-width: 899px) { .rc-ce .ce-row.on:not(:hover) { background: none; } }

/* System health: Ascend files folded (Nov 29, 2026) */
.health-feeds { margin-top: 12px; }
.health-feeds > summary { cursor: pointer; padding: 6px 0; }

/* Receipt form fits about one phone screen (Nov 29, 2026): photo buttons side by side, Paid with in short buttons */
.rcpt-form .rcpt-photos .link-row { flex-wrap: nowrap; gap: 8px; }
.rcpt-form .rcpt-photos .photo-btn { flex: 1; white-space: nowrap; }
.rcpt-form .rcpt-paid { grid-template-columns: repeat(3, 1fr); }
.rcpt-form .rcpt-paid .seg span { text-align: center; padding-left: 4px; padding-right: 4px; }
/* Builds: sold-bike gaps fold to one line each on a phone (Nov 29, 2026). Stage chips scroll in one row. */
.bl-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.bl-fold > summary::-webkit-details-marker { display: none; }
.bl-fold > summary::after { content: '›'; margin-left: auto; font-size: 1.3rem; color: var(--muted); transition: transform .15s; }
.bl-fold[open] > summary::after { transform: rotate(90deg); }
.bl-fold .bl-n { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 1px 9px; background: var(--cobalt-tint); color: var(--cobalt); }
.bl-fold.alert .bl-n { background: #fde8e6; color: #a4281b; }
.bl-fold + .bl-fold { margin-top: 10px; }
.build-links .bl-fold.alert { margin-bottom: 0; }
@media (max-width: 899px) { .b-list .stage-chips { flex-wrap: nowrap; overflow-x: auto; } .b-list .stage-chips .chip { flex: none; } }

/* Bike photo thumbnails from the website (Nov 29, 2026; bikephoto.js) */
.bike-thumb { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--line, #e3e6ea); vertical-align: middle; margin-right: 8px; flex: none; }
/* Bike pictures from molehillbikes.com on builds and service (Nov 29, 2026): a 48px thumbnail at the left of a row and
   a small photo above the title on the open item. Rows without a picture are unchanged. */
.ce-row.has-ph { position: relative; padding-left: 56px; }
.ce-row .bike-thumb.bk-thumb { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; margin: 0; border-radius: 8px; }
.wo-row.has-ph .ce-name, .wo-row.has-ph .wo-bike { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* On the open build or ticket the photo sits right of the title, so the page is no taller. */
img.bike-thumb.bk-photo { float: right; width: 84px; height: 60px; margin: 0 0 6px 10px; border-radius: 8px; }
/* A ticket booked from the website estimate (sql/188): one tap shows what they told us before drop-off. */
.tk-est { margin-bottom: 12px; }
.tk-est > summary { cursor: pointer; font-weight: 600; padding: 10px 12px; border-radius: var(--r-card); background: var(--cobalt-tint); color: var(--cobalt); list-style: none; }
.tk-est > summary::-webkit-details-marker { display: none; }
.tk-est[open] > summary { margin-bottom: 8px; }

/* Service package checklist on the ticket (svccheck.js, sql/196) */
.sv { display: flex; flex-direction: column; gap: 8px; }
.sv .card-head h3 { margin: 0; }
.sv-opts { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.sv-rows { gap: 4px; padding: 0; }
.sv-rows .ck-tap { min-height: 44px; padding: 6px 10px; font-size: .97rem; }
.sv-rows .ck-tap .tick-box { width: 22px; height: 22px; margin-right: 8px; }
.sv-rows .ck-tap[disabled] { opacity: .55; cursor: default; }
.sv-done > summary, .sv-note > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--navy); }
.sv-done > summary { color: var(--ok); }
.sv-note textarea { width: 100%; box-sizing: border-box; font: inherit; margin: 4px 0 6px; }
.sv-issues { border: 1px solid var(--warn, #c77700); background: var(--warn-tint, #fff6e5); border-radius: var(--r-control); padding: 8px 10px; }
.sv-issues ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sv-issues li { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-size: .92rem; }
.ck-ed-menu { display: flex; flex-direction: column; gap: 6px; margin: 0 0 8px; }
.ck-ed-go { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--card); font: inherit; text-align: left; cursor: pointer; color: inherit; }
.ck-ed-opts .chip-check { display: inline-flex; align-items: center; gap: 4px; width: auto; min-height: 36px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 18px; margin: 0; }
.ck-ed-opts .chip-check input { margin: 0; }
.ck-ed-opts label.small:has(select) { flex-direction: row; align-items: center; gap: 8px; }
.ck-ed-opts > .small.muted { flex-basis: 100%; }
.ck-ed .ck-ed-list { gap: 6px; }
.ck-ed .ck-ed-row { padding: 6px 8px; gap: 2px; }
.ck-ed .ck-ed-more > summary { min-height: 28px; display: flex; align-items: center; }

/* Check-in one step per screen for a new check-in (Nov 30, 2026); editing shows everything. */
.ci-form[data-step="1"] .ci-step:not([data-s="1"]), .ci-form[data-step="2"] .ci-step:not([data-s="2"]), .ci-form[data-step="3"] .ci-step:not([data-s="3"]) { display: none; }
.ci-step { display: flex; flex-direction: column; gap: 12px; }
.ci-steps span { opacity: .55; }
.ci-form[data-step="1"] .ci-steps [data-n="1"], .ci-form[data-step="2"] .ci-steps [data-n="2"], .ci-form[data-step="3"] .ci-steps [data-n="3"] { opacity: 1; font-weight: 700; color: var(--navy); }
.wo-ci-go { display: block; margin: -2px 0 4px 12px; padding: 4px 0; min-height: 32px; }
.chip.wo-ci { background: var(--accent, #023FAD); color: #fff; border-color: transparent; font-weight: 700; }
.ci-pick { margin: 0 0 8px; }

/* Ascend data out of date (Nov 29, 2026; ascfresh.js) */
.asc-stale { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--seg-bg); border-left: 4px solid var(--warn); color: var(--ink, inherit); }
.asc-stale strong { display: block; color: var(--warn); }

/* Short time forms stay narrow on a computer (Nov 30, 2026). */
.reg-form, .set-rules:has(.set-days) { max-width: 560px; }
form[data-form="change"] { max-width: 640px; }

/* Booking detail at phone width (Jordan, Nov 29, 2026): badges never break mid-word, the "Booked online" line wraps
   under them instead of squeezing beside, the phone number sits on its own line above Call / Text / email. */
.bk-detail .bk-headrow { flex-wrap: wrap; justify-content: flex-start; gap: 4px 12px; }
.bk-detail .bk-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.bk-detail .bk-badges .badge { white-space: nowrap; }
.bk-detail .bk-src { flex: 1 1 auto; }
.bk-detail .bk-phone { margin: 2px 0 0; }
.bk-detail .bk-contact { align-items: center; gap: 8px; margin: 6px 0 10px; }
.bk-detail .bk-contact .contact-btns { display: inline-flex; gap: 8px; margin-left: 0; }
.bk-detail .bk-dl:empty { display: none; }
.bk-detail .bk-contact .link-btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-lines { margin: 0 0 4px; } .rs-lines li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 14px; }
.rs-lines li + li { border-top: 1px solid var(--line); }
.rs-more { margin: 8px 0 0 !important; }

/* ---- Layout check of every screen (Nov 30, 2026): shared fixes, found with long names and long bike models at 390px and 1280px ---- */
/* A badge never splits over two lines ("Came | in") and a long title beside it can't squeeze it to a sliver. */
.badge, .stage, .pill { white-space: nowrap; }
.card-head > .badge, .card-head > .pill { flex: none; }
.card-head > h2, .card-head > h3 { min-width: 0; overflow-wrap: anywhere; }
/* A long "Blocked: reason" in a list row stays one line; the whole reason is on the item's own page. */
.ce-when .badge.blocked { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
/* Titles made from a long bike or item name: three lines at most in a card head, on the ticket page and on to-dos. */
.card-head > h3, .tk-head h2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
/* Small buttons beside text keep their words together ("MAKE | SIGN", "Customer | ›"). */
.row > .btn.small, .card-head > .btn.small:not(.link) { white-space: nowrap; flex: none; }
/* A link-style button that has to wrap (a long customer name) wraps from the left, not centred. */
.btn.link { text-align: left; }
/* Segmented tabs on a computer: each tab as wide as its words, so "Warranty periods" stays inside the bar. */
@media (min-width: 600px) { .subnav .chip { flex: 1 1 auto; padding: 8px 12px; } }
/* Stuck: the "Hand to…" picker is as tall as the button beside it. */
.stuck-foot select { min-height: 44px; }
/* Touch screens: text-style buttons, fold headings and small toggles are 21 to 35px tall. Their tap area (not their look) grows to 44px. */
@media (pointer: coarse) {
  :where(.btn.link, .seg-mini button, .chips > .chip, .me) { position: relative; }
  :where(.btn.link, .seg-mini button, .chips > .chip, .me)::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
  :where(details > summary) { padding-block: 7px; }
}
/* The two TV views (Shop TV, Builds board) opened on a phone: they're sized for a 1080p TV, so at phone width the columns
   overlapped and the page scrolled sideways. On a phone they stack and use normal text sizes. TVs are untouched. */
@media (max-width: 700px) {
  .shoptv { padding: 12px; gap: 12px; }
  .shoptv .tv-head { flex-wrap: wrap; align-items: center; gap: 2px 10px; }
  .shoptv .tv-head h1 { font-size: 24px; } .shoptv .tv-head p { font-size: 14px; flex: 1 1 auto; }
  .shoptv .tv-exit { font-size: 14px; margin-left: auto; white-space: nowrap; }
  .shoptv .tv-stats { gap: 6px; } .shoptv .tv-stat { padding: 8px 2px; border-radius: 8px; } .shoptv .tv-stat b { font-size: 26px; } .shoptv .tv-stat span { font-size: 11.5px; display: block; line-height: 1.25; margin-top: 2px; }
  .shoptv .tv-cols, .shoptv .bt-cols { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .shoptv .tv-cols h2, .shoptv .bt-col h2 { font-size: 15px; margin-bottom: 8px; }
  .shoptv .tv-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
  .shoptv .tv-row .tv-b { grid-column: 2; } .shoptv .tv-row .tv-age { grid-column: 3; grid-row: 1; text-align: right; } .shoptv .tv-row .tv-due { grid-column: 1 / -1; text-align: left; }
  .shoptv .tv-b b { font-size: 16px; } .shoptv .tv-b span { font-size: 13px; }
  .shoptv .tv-more, .shoptv .tv-small, .shoptv .bt-more { font-size: 14px; } .shoptv .tv-clear, .shoptv .bt-empty { font-size: 16px; } .shoptv .tv-small span { font-size: 12.5px; }
  .shoptv .tv-side, .shoptv .bt-col { padding: 10px; border-radius: 8px; }
  .shoptv .tv-foot { font-size: 13px; flex-direction: column; gap: 4px; } .shoptv .tv-foot span { font-size: 12px; }
  .shoptv .bt-list { gap: 8px; } .shoptv .bt-card { padding: 8px 10px; border-radius: 8px; }
  .shoptv .bt-top b { font-size: 16px; } .shoptv .bt-why { font-size: 12px; padding: 2px 7px; border-radius: 6px; }
  .shoptv .bt-sub, .shoptv .bt-who, .shoptv .bt-when { font-size: 13.5px; margin-top: 3px; }
  .shoptv .bt-pop { inset: 20vh 16px auto; padding: 20px 14px; border-radius: 14px; } .shoptv .bt-pop p { font-size: 15px; } .shoptv .bt-pop b { font-size: 26px; margin: 8px 0; } .shoptv .bt-pop span { font-size: 15px; } .shoptv .bt-pop em { font-size: 13px; }
}
.rs-cust { margin: 10px 0 0; } .rs-cust .btn.link { padding: 0; min-height: 0; }

/* ---- Stacked cards always have a gap (Nov 30, 2026) ----
   Why they kept touching: a .card has no margin of its own, and <main> is a plain block. Pages that wrap their cards in
   a grid or flex with `gap` were fine; any page that put two cards straight under <main> (booking + Customer
   conversation, Bookings settings, Rewards, App use, quotes, a message thread...) had them touch unless someone
   remembered a margin for that page. Now the gap is the default: a card that follows another card or a form gets 12px.
   :where() keeps this at zero specificity, so any page's own margin still wins. Containers that already space their
   children with `gap` are listed below so the two don't add up. tests/e2e/cardgap_test.cjs opens the main screens and
   fails if two stacked boxes touch. */
:where(.card, form.form) + :where(.card) { margin-top: 12px; }
:where(main:not(.cust)) > :where(.card) + :where(*) { margin-top: 12px; }
:where(.wo-board, .ce-list, .cards, .list, main.cust, main.cust > .wcols > .wcol, .ce-detail, .pp-col, .wcols, .bk-setlist, .bk-setpart, .bk-set, .cu-page .cp-pane) > :where(.card, form.form) { margin-top: 0; }
section.cp-pane > .card + .card { margin-top: 12px; }

/* Booking settings, one part at a time (Nov 30, 2026): a short list; tap a row for that part alone. List beside it on a computer. */
.bk-setwrap { display: grid; gap: 12px; }
.bk-setlist, .bk-setpart { display: grid; gap: 12px; align-content: start; min-width: 0; }
.bk-set { gap: 0; } .bk-part { gap: 14px; } .bk-part[hidden] { display: none; }
.bk-setlist .ce-row .ce-when { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 899px) { .bk-setwrap.picked .bk-setlist { display: none; } }
@media (min-width: 900px) { .bk-setwrap { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); align-items: start; } .bk-set-back { display: none; } }
.bk-part .sd-days { display: flex; flex-wrap: wrap; gap: 4px 16px; }
/* A new day for a late repair (sql/214, Nov 30, 2026): on the ticket, past the day we gave the customer. */
.tk-late, .tk-nd { grid-column: 1 / -1; }
.tk-late { margin: 8px 0 4px; padding: 10px 12px; border-radius: 10px; background: #fde8e6; color: #5c160e; }
.tk-late p { margin: 0 0 8px; }
.tk-late .nd-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.tk-late .nd-day { display: flex; flex-direction: column; font-size: 13px; gap: 2px; }
.tk-late .nd-day input { min-height: 40px; }
.tk-late .nd-row .btn { min-height: 40px; }
.tk-late .nd-how { margin-top: 6px; }
.tk-late .nd-how .btn.link { color: #7a1d12; }
.tk-nd { margin: 6px 0 0; }

/* Receipt categories, one at a time (Nov 30, 2026). */
.rcpt-cat-list { margin-top: 6px; } .rcpt-cat-list .ce-row.off .ce-name { text-decoration: line-through; opacity: .7; }
.rcpt-cat-list .ce-when { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcpt-cat-one { margin-top: 8px; max-width: 520px; }
.bk-cust { margin: 4px 0 2px; } .bk-cust p { margin: 0; } .bk-cust .btn.link { padding: 0 2px; min-height: 0; }
.bk-cust-pick { padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--r-control); display: grid; gap: 6px; }
.bk-cust-pick input[type=search] { width: 100%; }
.bk-cust-pick .actions:empty, .bk-cust-pick [data-bkc-results]:empty { display: none; }

/* Customer app > Parts for bikes, one part at a time (Nov 30, 2026). Reuses the booking-settings list-beside-detail layout. */
.ca-partbody { min-width: 0; } .ca-partbody > h3:first-child { margin-top: 0; }
@media (max-width: 899px) { main:has(.bk-setwrap.picked) > .adopt, main:has(.bk-setwrap.picked) .hub-body > .adopt { display: none; } }
@media (min-width: 900px) { .bk-setwrap .btn.link.bk-set-back { display: none; } }
.ca-partbody > .btn, .ca-partbody > .list + .btn { margin-top: 12px; }
/* Event form (Nov 30, 2026): date and time boxes pair up, also on a phone; the rest folds under "More". */
.ev-form .row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; } .ev-form .row2 > label { min-width: 0; } .ev-form .row2 input, .ev-form .row2 select { width: 100%; min-width: 0; }

/* One customer, one part at a time below 1200px (Nov 30, 2026). The groups are display: contents, so the cards keep the
   page's own gaps and the two-column computer layout is untouched. */
.cu-page .cp-pane { display: contents; } .cu-page .cp-tabs { margin: 0; }
@media (max-width: 1199px) { .cu-page.panes .cp-pane:not(.on) { display: none; } .cu-page:not(.panes) .cp-tabs .chip { display: none; } }
@media (min-width: 1200px) { .cu-page .cp-tabs { display: none; } }
@media (max-width: 600px) { .cu-page.panes .cp-tabs .chip { padding: 6px 10px; } }
@media (max-width: 1199px) { .cu-page.panes .row > .row-sub + .row-sub { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } }
/* Customer special orders on Hub > Orders (Nov 30, 2026): with that vendor's list, oldest first. */
.so-need-sum { margin: 0 0 10px; }
.need.so-need .need-main strong { overflow-wrap: anywhere; }

/* SOPs > Using the app, one area at a time (Nov 30, 2026). */
.howto-area { border-top: 1px solid var(--line); } .howto-sec > summary + .howto-area { margin-top: 8px; }
.howto-area > summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-size: 1rem; }
.howto-area[open] > summary { font-weight: 700; } .howto-area > .list { margin: 0 0 12px; }

/* The sign form, one part at a time on a phone (Nov 30, 2026). The parts are only hidden, never removed. */
.sg-tabs { display: none; } .sg-pane { display: contents; }
@media (max-width: 820px) {
  .sg-tabs { display: flex; margin: 0; } .sign-edit .sg-pane { display: none; }
  .sign-edit[data-pane="name"] .sg-pane[data-sp="name"], .sign-edit[data-pane="specs"] .sg-pane[data-sp="specs"], .sign-edit[data-pane="price"] .sg-pane[data-sp="price"],
  .sign-edit[data-pane="bikes"] .sg-pane[data-sp="bikes"], .sign-edit[data-pane="save"] .sg-pane[data-sp="save"] { display: contents; }
  .sign-edit:not([data-pane="save"]) .sign-preview-wrap { display: none; }
  .sign-edit[data-pane="save"] .sign-preview-wrap { max-width: 240px; order: -1; } .sign-edit[data-pane="save"] .sg-tabs { order: -2; }
}

/* Test ride bikes: the first eight, a search box, and Show all (Nov 30, 2026). */
.trb-list:not(.all) > li.trb-late { display: none; } .trb-list.all + .trb-allbtn { display: none; } .trb-list > li[hidden] { display: none; }
input[data-input="trb-q"] { width: 100%; margin: 8px 0 4px; }
.ge-review { justify-self: start; margin-top: 4px; }
.ge-texted { color: var(--ok, #1a7f37); }
.cu-finder a.row { text-decoration: none; color: inherit; }
/* Reorder: vendors first, one vendor at a time, search across all (Nov 30, 2026). */
.reo-wrap .reo-body { display: grid; gap: 12px; min-width: 0; } .reo-wrap input[type="search"] { width: 100%; margin-top: 8px; }
.reo-one .card-head { flex-wrap: wrap; gap: 8px; } .reo-one table.reo, .reo-found table.reo { width: 100%; }
@media (max-width: 899px) { .reo-wrap .reo-pick { display: none; } }
/* Need to order on a phone: a vendor with only customer special orders is one line until tapped (Nov 30, 2026). */
.need-group .need-fold { display: none; }
@media (max-width: 899px) { .need-group .need-fold { display: inline-flex; margin-left: auto; } .need-group.folded .need-list { display: none; } .need-group.folded .card-head { margin-bottom: 0; } .need-group.folded h3 { margin: 0; } }

/* Bike locations (where.js, sql/280) */
.wh-big { display: grid; gap: 10px; margin: 12px 0; }
.wh-big .btn.big .small { font-weight: 400; opacity: .85; }
.wh .big-scan { margin-top: 4px; }
.wh-places { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.wh-places .btn.big { width: 100%; }
.wh-go-btn { margin-top: 14px; }
.form.wh-type { flex-direction: row; gap: 8px; align-items: flex-end; margin-top: 12px; }
.wh-type label { flex: 1; min-width: 0; margin: 0; }
.wh-type .btn { flex: none; }
.wh-step { margin: 4px 0 8px; }
.wh-saved h2 { margin: 4px 0; letter-spacing: .02em; }
.wh-now { font-size: 1.05rem; margin: 10px 0; }
.wh-mv-li { display: flex; gap: 8px; align-items: center; padding: 8px 4px; }
.wh-mv { flex: 1; min-width: 0; display: grid; gap: 1px; }
.wh-mv > * { overflow-wrap: anywhere; }
.wh-hist li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.wh-edit li { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.wh-edit li input[data-input] { flex: 1 1 0; min-width: 0; width: auto; }
.wh-edit li .btn { flex: none; padding-left: 10px; padding-right: 10px; }
.wh-edit .check { flex: none; flex-direction: row; align-items: center; gap: 4px; }
.wh-edit .check { margin: 0; }
@media (min-width: 700px) { .wh-big { grid-template-columns: 1fr 1fr; } }
.wh-scan-more { margin-top: 10px; }

/* Warranty: "no news yet" one-tap follow-up on an overdue claim waiting on a vendor */
.w-nonews { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; }
.w-nonews-btns { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Builds: "where is it now?" one-tap move (where.js whereNudge) */
.wh-nudge { margin: .4rem 0 .6rem; padding: .6rem .7rem; border: 1px solid var(--line, #d6dbe3); border-radius: 10px; }
.wh-nudge p { margin: 0 0 .4rem; }
.wh-nudge-btns { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
/* Boxes in neighbouring wrappers (Nov 30, 2026, later). The card-gap rule above spaces cards that are siblings. These
   four had the two boxes in different wrappers, so nothing spaced them and the guard test (siblings only) never
   compared them: a Receiving order's panes on a computer ("To do on this order" sat on the order card), a ticket's
   two columns when they stack, the Service sort switch over the board, and the Customers columns on a phone.
   tests/e2e/cardgap_test.cjs now compares every pair of boxes, wherever they sit. */
@media (min-width: 900px) { .ship-page > .cp-pane + .cp-pane { margin-top: 12px; } }
.ship-page:not(.panes) > .cp-pane + .cp-pane { margin-top: 12px; }
.ship-page .cards.ship-one { grid-template-columns: minmax(0, 1fr); }   /* the order card is as wide as the cards around it */
.wo-list .wo-sort { margin: 0 0 10px; }
@media (max-width: 1199px) { :where(:not(main.cust)) > .wcols > .wcol + .wcol > :where(.card, form.form):first-child { margin-top: 12px; } }
.wh-enter-list li { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.wh-enter-list li > div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.wh-enter-acts { display: flex; gap: 6px; flex: none; }
.ce-rows .ad-ok, .ce-rows .ad-map { display: inline-block; margin: 2px 12px 6px 12px; padding: 4px 0; }
.sl-list .sl-cust { display: block; margin: -2px 0 6px 12px; padding: 2px 0; }
.sl-list .sl-what { display: block; }
.chips.sl-chips { flex-wrap: wrap; gap: 6px; } .chips.sl-chips .chip { padding: 6px 10px; min-width: 0; font-size: 15px; }
.ce-rows .ad-map + .ad-ok { margin-left: 4px; }
.ce-rows .ad-map a.maplink { color: var(--cobalt); text-decoration: none; }
/* Addresses open Google Maps when tapped (Nov 30, 2026). Underlined so it reads as a link; padding widens the tap area. */
a.maplink { color: inherit; text-decoration: underline; text-decoration-color: var(--cobalt); text-underline-offset: 3px; padding: 4px 0; }

/* Bench tablet (app.js isBench): bigger checklist rows for greasy fingers at the work stand */
.bench-set { display: flex; gap: .5rem; align-items: center; justify-content: center; margin: 18px auto 0; max-width: 420px; text-align: left; }
body.bench .ck-tap { min-height: 64px; font-size: 1.15rem; }
body.bench .ck-tap .tick-box { transform: scale(1.3); }

/* Ticket header: deposit paid and what's left (app.js tkPaidLine) */
.tk-paid { display: block; text-align: right; margin-top: 2px; max-width: 6.5em; line-height: 1.3; }
/* For customers on a vendor order: the part and who it's for on the left, "Tell them" on the right (Dec 1, 2026). */
.ship-cust-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .ship-cust-row > div { min-width: 0; } .ship-cust-row .btn { flex: 0 0 auto; }

/* Quotes, new/edit (quotes.js, Dec 1, 2026): one step per screen, items with a photo. */
.qw-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qw-steps { list-style: none; display: flex; gap: 4px; padding: 0; margin: 6px 0 12px; counter-reset: qw; }
.qw-steps li { flex: 1; counter-increment: qw; font-size: .8rem; font-weight: 700; color: var(--muted); border-top: 4px solid var(--line); padding-top: 4px; }
.qw-steps li span::before, .qw-steps li .btn::before { content: counter(qw) ' '; }
.qw-steps li.done { border-top-color: var(--cobalt); }
.qw-steps li.now { border-top-color: var(--cobalt); color: var(--ink); }
.qw-steps li .btn { padding: 0; min-height: 0; font-size: .8rem; }
.qw h2 { margin-top: 0; }
.qw .card label { display: block; margin-bottom: 10px; }
.qw .card label > input:not([type="checkbox"]), .qw .card label > select, .qw .card textarea { width: 100%; }
.qw-sub { font-size: .9rem; margin: 16px 0 6px; }
.qw-hits:empty { display: none; }
.qw-hits { margin: 6px 0 10px; }
.qw .list { display: grid; gap: 8px; }
.row.qw-line { display: flex; align-items: center; gap: 10px; }
.qw-line-text { flex: 1; min-width: 0; display: block; }
.qw-line-text .row-bike { margin-top: 0; display: block; overflow-wrap: anywhere; }
.qw-line-text .row-sub { display: block; }
.qw-line-amt { flex: none; white-space: nowrap; }
.qw-thumb { flex: none; width: 52px; height: 52px; border-radius: var(--r-control); object-fit: contain; background: #fff; border: 1px solid var(--line); display: inline-grid; place-items: center; font-size: 22px; vertical-align: middle; }
.qw-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ink); margin-top: 10px; padding-top: 8px; font-size: 1.05rem; }
/* Good / Better / Best (sql/334): items grouped by option, the "add to" chips, the option the customer did not pick. */
.qw-opt-h { margin: 14px 0 4px; font-size: 0.95rem; }
.qw-opt { border-top: 1px solid var(--line); margin-top: 8px; }
.qw-addto { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.qw-optnames { margin-top: 12px; }
.q-opt-row th { text-align: left; padding-top: 12px; font-size: 0.9rem; text-transform: none; letter-spacing: 0; }
.q-not-chosen { opacity: .45; }
.qw-nav { padding: 6px 0 10px; }
.qw-photo img { max-width: 100%; max-height: 220px; border-radius: var(--r-card); border: 1px solid var(--line); background: #fff; display: block; }
.qw-photo { margin-bottom: 10px; }
.qw-file { cursor: pointer; }
.qw-rode .chip { margin: 2px 4px 2px 0; }
.qw-linked { margin: 0 0 10px; }
.qw-more summary { cursor: pointer; font-weight: 600; margin-top: 4px; }
.qw-more textarea { margin-top: 6px; }
.q-item { display: flex; gap: 8px; align-items: flex-start; }
.q-item .qw-thumb { width: 40px; height: 40px; }
.q-item a { color: inherit; }
.q-pill.warn { background: var(--orange-tint); color: var(--orange); }
/* Team → Website (webteam.js, sql/340): the card the way the About page shows it. */
.wc-prev { display: flex; gap: 14px; align-items: flex-start; margin-top: 10px; padding: 12px; border: 1px solid var(--line, #dce3ec); border-radius: 12px; background: var(--card, #fff); }
.wc-prev img, .wc-nophoto { flex: 0 0 96px; width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.wc-nophoto { display: grid; place-items: center; background: var(--sky-tint, #eef2f7); color: var(--muted, #5b6b80); font-size: 12px; text-align: center; }
.wc-prev p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; }
.wc-meta { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #5b6b80); }
.wc-name { font-weight: 800; text-transform: uppercase; font-size: 16px; }
.wc-link { display: inline-block; margin-top: 6px; font-size: 14px; color: var(--cobalt, #023fad); overflow-wrap: anywhere; }
.wc-crop img { display: block; width: min(100%, 320px); aspect-ratio: 1; object-fit: cover; border-radius: 12px; margin: 6px 0 10px; }
.wc-pick { display: block; text-align: center; }
@media (max-width: 420px) { .wc-prev { flex-direction: column; } .wc-prev img, .wc-nophoto { width: 100%; height: auto; aspect-ratio: 1; flex-basis: auto; max-width: 240px; } }

/* An order's actions (Dec 1, 2026): a note on its own line, one row of buttons with the main one first, then a row of
   quiet links spaced far enough apart to read as separate things. Guard: tests/e2e/actionrow_test.cjs. */
.ship-acts { margin-top: 10px; display: grid; gap: 8px; }
.ship-acts .act-note { margin: 0; }
.ship-acts .actions.act-main { margin: 0; flex-wrap: wrap; align-items: center; }
.ship-acts .actions.act-main:not(:has(*)) { display: none; }
.act-more { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 20px; padding-top: 6px; border-top: 1px solid var(--line); }
.act-more .btn.link { padding: 6px 0; white-space: nowrap; }
@media (max-width: 600px) { .ship-acts .actions.act-main > .btn { flex: 1 1 auto; } }
/* Messages: "Not a customer message" line (sql/350). */
.msg-upd-note { margin: 0 0 8px; }
.ar-bought { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-card); background: var(--ok-tint); }
.qw-kept { border-left: 4px solid var(--warn, #d08a00); }
.qw-kept h3 { margin: 0 0 .25rem; }

/* Hub → How-tos & posts (guides.js, sql/380): the post preview, square photo above the words like Facebook shows it. */
.gp-prev { margin-top: 10px; border: 1px solid var(--line, #dce3ec); border-radius: 12px; overflow: hidden; background: var(--card, #fff); max-width: 520px; }
.gp-prev img, .gp-nophoto { display: block; width: 100%; aspect-ratio: 1; max-height: 240px; object-fit: cover; }
.gp-nophoto { display: grid; place-items: center; aspect-ratio: 3 / 1; background: var(--sky-tint, #eef2f7); color: var(--muted, #5b6b80); font-size: 13px; }
.gp-text { padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.gp-posts { list-style: none; margin: 0; padding: 0; }
.gp-post { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line, #dce3ec); }
.gp-post .actions { margin: 0; }
.gp-post .error { flex-basis: 100%; }
form[data-form="gp-post"] textarea { width: 100%; font: inherit; }
.qw-copyto { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 10px; }
.qw-grp-acts { margin: 6px 0 4px; }
.bk-follow h3 { font-size: 15px; margin: 0 0 6px; } .bk-follow .bk-follow-msg { margin: 8px 0; padding: 8px 10px; border-left: 3px solid var(--cobalt); background: var(--card); border-radius: var(--r-control); }
.bk-follow .actions { margin-top: 8px; }
