/* RPM Wrench front-counter UI — tokens and shell from docs/design/DESIGN.md (owner-approved 2026-10-23), colors and type from
   the RPM Design System v1 (C:\DataBackup\RPM-Design-System\v1\rpm-theme.css, owner 2026-11-11): dark base, dark-gray panels,
   white text, orange accent, Segoe UI at weights 400 and 600 only. Change colors only against that file. */
:root {
  /* NM1 (2026-11-12): the v1 tokens — --rpm-bg #0B0D12, --rpm-panel #2B2E33, --rpm-text #FFFFFF, --rpm-muted #C9CED6,
     --rpm-accent #FF7A18, --rpm-glow #40BAFF, --rpm-ok/warn/danger. The print view keeps its paper colors (see .pv-*). */
  --paper: #0B0D12; --card: #2B2E33; --line: #454951; --line-soft: #3A3E45;
  --ink: #FFFFFF; --ink-2: #ECEEF1; --muted: #C9CED6;
  --emph: #3E424A; --emph-ink: #FFFFFF; --nav: #121419; --accent: #FF7A18; --accent-dark: #E85D00; --accent-text: #FF7A18; --accent-tint: #3A2A1C;
  --glow: #40BAFF; --glow-tint: #1C2A36;
  --ok-bg: #1E3A28; --ok-text: #39D353; --warn-bg: #3E3018; --warn-text: #FFB300; --bad-bg: #3E2222; --bad-text: #FF5A5A; --danger: #FF5A5A;
  --neutral-bg: #34373E; --hover: #3E424A; --row-hover: #34373E; --hit-hover: #3A2A1C;
  --r-card: 12px; --r-input: 9px; --r-pill: 99px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --font: "Segoe UI", Arial, Helvetica, sans-serif;
}
/* TH1 (owner 2026-11-10): "I want to change the black screen to light screen in the app. Can you put the setting where we can
   change to either." The Light screen = the paper palette the app had before the cluster theme; the dark bar, the sidebar in
   the cluster look and the cluster itself stay dark on both. app.js keeps the choice per browser (the button in the top bar). */
:root[data-theme="light"] {
  --paper: #F4F2EE; --card: #FFFFFF; --line: #DED9D1; --line-soft: #EFEBE5;
  --ink: #1B1917; --ink-2: #3D3935; --muted: #5E5852;
  --emph: #1F1D1B; --emph-ink: #FFFFFF; --nav: #1F1D1B; --accent: #E8692A; --accent-dark: #C9541A; --accent-text: #A8420C; --accent-tint: #FFF1E6;
  --glow: #1F7AE0; --glow-tint: #E6F1FF;
  --ok-bg: #E3F1E7; --ok-text: #1D5B33; --warn-bg: #FFF1E6; --warn-text: #A8420C; --bad-bg: #FDE8E8; --bad-text: #8A1F1F; --danger: #B42318;
  --neutral-bg: #FAF8F5; --hover: #EFEBE5; --row-hover: #FAF8F5; --hit-hover: #FFF1E6;
}
:root[data-theme="light"] mark { background: #FFE9A8; }
:root[data-theme="light"] .search-box { background: #FFFFFF; color: var(--ink); }
:root[data-theme="light"] .search-box input { color: var(--ink); }
:root[data-theme="light"] .signin { background: #0B0D12; } /* the sign-in is the cluster: it stays on the dark stage */
:root[data-theme="light"] .signin-foot { color: #C9CED6; }
:root[data-theme="light"] .topbar .shop-name, :root[data-theme="light"] .topbar .link-button, :root[data-theme="light"] .topbar .user { color: #ECEEF1; } /* the bar stays dark: its text stays light */
:root[data-theme="light"] .topbar .link-button:hover, :root[data-theme="light"] .topbar .user:hover { color: #fff; }
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; color: #ECEEF1; }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle .when-dark { display: inline-flex; } .theme-toggle .when-light { display: none; }
:root[data-theme="light"] .theme-toggle .when-dark { display: none; } :root[data-theme="light"] .theme-toggle .when-light { display: inline-flex; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }
h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h2 { margin: 0; font-size: 16px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.hidden { display: none !important; }
.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button { font-family: inherit; }
/* F0: "A newer version is ready" bar over everything (an open tab keeps the code it loaded). */
.version-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 80; display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 48px; padding: 8px 16px; background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.version-bar .btn { background: #fff; color: var(--accent); border-color: #fff; min-height: 36px; }

/* ---------- Shell ---------- */
.shell { display: flex; flex-direction: column; min-height: 100vh; }
.topbar { background: var(--nav); color: #fff; display: flex; align-items: center; gap: var(--s5); padding: 0 var(--s5); min-height: 64px; flex-wrap: wrap; border-bottom: 2px solid var(--accent); } /* v1 .rpm-topbar: the orange rule under the bar */
.brand { color: #fff; font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.brand:hover { color: #fff; text-decoration: none; }
/* The owner's RPM Wrench logo (2026-11-05): 46 px tall in the 64 px bar, 70 px on the sign-in card. */
.brand { display: inline-flex; align-items: center; min-height: 46px; }
.brand img, .signin-brand img { display: block; height: auto; max-width: 100%; }
.search { flex: 1 1 420px; max-width: 720px; position: relative; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--card); color: var(--muted); border-radius: 10px; padding: 0 14px; height: 42px; border: 2px solid transparent; transition: border-color .12s; }
.search-box:focus-within { border-color: var(--accent); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-hint { font-size: 12px; color: var(--muted); white-space: nowrap; }
.search-results { position: absolute; left: 0; right: 0; top: 48px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 18px 48px rgba(0,0,0,.45); overflow: hidden; z-index: 5; }
.search-results .head { padding: 10px 16px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.search-results .foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line-soft); background: var(--neutral-bg); font-size: 13px; }
.hit { display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line-soft); color: var(--ink); min-height: 44px; }
.hit:hover, .hit.active { background: var(--hit-hover); text-decoration: none; color: var(--ink); }
.hit .who { font-weight: 600; }
.hit .meta { font-size: 13px; color: var(--muted); }
.hit .tag { font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent-tint); border-radius: var(--r-pill); padding: 3px 9px; white-space: nowrap; }
.hit .hit-icon { display: inline-grid; place-items: center; color: var(--muted); }
.hit.active .hit-icon, .hit .hit-icon.customer { color: var(--accent-text); }
.hit .meta em { font-style: italic; }
.search-results .foot .muted { color: var(--muted); }
.search-results .hit:first-of-type { border-top: 0; }
.search-results { max-height: min(70vh, 640px); overflow-y: auto; }
mark { background: #5A3A1A; color: inherit; padding: 0 1px; border-radius: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--s4); font-size: 14px; }
.shop-name { color: var(--ink-2); }
.user { display: inline-flex; align-items: center; gap: var(--s2); }
/* P8b: the user chip is a link to Your account (change my password); 44 px tall like every other target. */
a.user { color: inherit; min-height: 44px; padding: 0 10px 0 4px; border-radius: 10px; }
a.user:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
a.user:hover #user-name { text-decoration: underline; }
/* P8b: a user who must change the office-set password sees no entries and no search box until it is done (app.js gates the routes). */
body.must-change .search { visibility: hidden; }
body.must-change .sidenav { visibility: hidden; }
.account-card { max-width: 820px; }
.account-card .card-head .small { font-size: 13px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); display: inline-grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; }
.link-button { background: none; border: 0; color: var(--ink-2); font-size: 13px; cursor: pointer; padding: var(--s2); min-height: 44px; }
.link-button:hover { color: #fff; text-decoration: underline; }

.body { display: flex; flex-wrap: wrap; flex: 1; }
/* RW3 (owner 2026-11-10): the sidebar in the cluster's curved-menu look on every screen — WORKSPACE heading, the widget's icons,
   glowing slabs with a blue edge, the silver selected slab with the orange tick, a › arrow. Entries' text is still just the name. */
.sidenav { flex: 0 0 236px; padding: 18px 12px 20px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); background: linear-gradient(180deg, #070B12 0%, #0B1017 60%, #0A0F16 100%); box-shadow: inset -1px 0 0 #142033; }
.nav-heading { margin: 0 0 6px; padding: 10px 14px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #F4F7FF; text-shadow: 0 0 6px rgba(126,170,255,.6); background: linear-gradient(90deg, #121b2a, #0d1420); border-top: 1px solid #2a3a52; border-bottom: 1px solid #1a2639; clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%); }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; min-height: 46px; color: #E6EEFB; font-weight: 500; font-size: 16px; text-shadow: 0 0 2px #bde5ff; background: linear-gradient(180deg, rgba(16,24,38,.95), rgba(9,14,22,.95)); border: 1px solid #1a2740; border-bottom-color: #2a68a8; box-shadow: 0 1px 0 rgba(64,186,255,.35), inset 0 -1px 0 rgba(64,186,255,.25); clip-path: polygon(0 0, 100% 0, 98.5% 100%, 0 100%); }
.nav-item .nav-ico { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item::after { content: "›"; margin-left: auto; font-size: 22px; font-weight: 300; line-height: 1; opacity: .9; }
.nav-item:hover { background: linear-gradient(180deg, rgba(30,46,72,.95), rgba(14,22,36,.95)); color: #fff; text-decoration: none; }
.nav-item.on { background: linear-gradient(175deg, #fcfdff 0%, #d5e2ff 26%, #a7b5d1 61%, #f8fbff 100%); color: #020912; text-shadow: none; font-weight: 600; border-color: #c8e7ff; box-shadow: inset 0 0 3px #fff, 0 0 6px rgba(126,170,255,.4); }
.nav-item.on::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 4px; background: var(--accent); }
.nav-item.on .nav-ico { stroke: #020912; }
.nav-spacer { flex: 1; }
.content { flex: 999 1 560px; min-width: 0; padding: 28px 32px; display: flex; flex-direction: column; gap: 28px; outline: 0; }
@media (max-width: 900px) {
  .sidenav { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: var(--s3) var(--s4); }
  .nav-spacer { display: none; }
  .nav-heading { display: none; }
  .nav-item { flex: 1 1 auto; min-height: 44px; font-size: 15px; }
  .content { padding: 20px 16px; }
  .table-wrap { overflow-x: auto; }
}

/* ---------- Building blocks ---------- */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.page-head .lede { margin-top: var(--s1); color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 600; font-size: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--neutral-bg); text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.card-body { padding: 16px 18px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--ink); }
.tile:hover { border-color: var(--line); text-decoration: none; color: var(--ink); }
.tile .n { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.tile .s { font-size: 13px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s5); }
@media (max-width: 1100px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 600; white-space: nowrap; }
td { padding: 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:hover td { background: var(--row-hover); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: var(--r-pill); padding: 3px 10px; letter-spacing: .02em; white-space: nowrap; }
.pill.quote { background: var(--neutral-bg); color: var(--ink-2); }
.pill.work { background: var(--warn-bg); color: var(--warn-text); }
.pill.ready, .pill.ok { background: var(--ok-bg); color: var(--ok-text); }
.pill.bad { background: var(--bad-bg); color: var(--bad-text); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 14px; border-radius: var(--r-input); font-weight: 600; color: var(--ink-2); border: 1px solid transparent; }
.tab:hover { background: var(--hover); text-decoration: none; color: var(--ink); }
.tab.on { background: var(--card); border-color: var(--line); color: var(--ink); font-weight: 600; }
.tab .c { font-size: 12px; font-weight: 600; background: var(--neutral-bg); border-radius: var(--r-pill); padding: 2px 8px; color: var(--ink-2); }
.tab.on .c { background: var(--emph); color: #fff; }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-input); min-height: 44px; padding: 0 12px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.quick-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: var(--s1); }
.quick-link { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-weight: 600; }
.quick-link:hover { background: var(--row-hover); text-decoration: none; color: var(--ink); }
.quick-link.add { justify-content: center; border-style: dashed; border-color: var(--line); color: var(--muted); }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: var(--s1); }
.coming { display: inline-block; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--neutral-bg); border-radius: var(--r-pill); padding: 3px 10px; }
.status { font-size: 13px; color: var(--muted); }
.status.error { color: var(--bad-text); }
/* P1b: postal address autocomplete (Smarty, like the invoice app) on the customer edit / new forms */
.addr-wrap { position: relative; }
.addr-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 6; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-input); box-shadow: 0 18px 48px rgba(0,0,0,.45); overflow: hidden; max-height: 320px; overflow-y: auto; }
.addr-suggest .head { padding: 8px 14px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.addr-suggest button { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line-soft); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.addr-suggest button:hover, .addr-suggest button.active { background: var(--hit-hover); }
.addr-suggest button .place { font-size: 13px; color: var(--muted); white-space: nowrap; }
.addr-suggest button .tag { font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent-tint); border-radius: var(--r-pill); padding: 3px 9px; white-space: nowrap; }
.addr-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.addr-actions .status.ok { color: var(--ok-text); font-weight: 600; }

/* ---------- Sign-in ---------- */
.signin { position: fixed; inset: 0; background: var(--paper); display: grid; place-items: center; padding: var(--s4); z-index: 20; }
.signin-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 28px; display: flex; flex-direction: column; gap: var(--s4); box-shadow: 0 18px 48px rgba(0,0,0,.45); }
.signin-brand { font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.signin-card h1 { font-size: 24px; }
/* S1: "Forgot my password" — a link under Sign in, and a second card in the same place (username, recovery code, new password). */
.signin { overflow-y: auto; align-items: safe center; }
.signin-card .signin-link { align-self: center; padding: 0 8px; margin-top: -4px; }
.recover-card { max-width: 440px; gap: var(--s3); }
.recover-help { margin: 0; }
.with-button { display: flex; gap: 8px; }
.with-button input { flex: 1; min-width: 0; }
#recover-code, .recovery-code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
/* S1: the recovery code on Your account — shown once in a tinted box, large enough to copy onto paper. */
.recovery-card { max-width: 820px; margin-top: var(--s4); }
.recovery-new { background: var(--accent-tint); border: 1px solid var(--accent-dark); border-radius: var(--r-card); padding: 16px 18px; margin-bottom: 16px; }
.recovery-new .label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--accent-text); }
.recovery-code { display: block; font-size: 26px; font-weight: 600; color: var(--ink); margin: 6px 0 10px; user-select: all; overflow-wrap: anywhere; }
.recovery-new p { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }

/* ---------- Customer page (R3, Customer.dc.html) ---------- */
.content > .crumbs + .page-head { margin-top: -14px; }
.crumbs { font-size: 13px; color: var(--muted); }
.page-head h1.loading { color: var(--muted); font-weight: 600; }
.page-head .lede .pill { vertical-align: 1px; }
.cust-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 22px; align-items: start; }
@media (max-width: 1100px) { .cust-grid { grid-template-columns: minmax(0, 1fr); } }
.link-btn { background: none; border: 0; padding: 8px 0; min-height: 44px; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent-text); cursor: pointer; }
.link-btn:hover { color: var(--accent); text-decoration: underline; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; } .kv dd { margin: 0; }
.contact .notes { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 14px; }
.contact .notes p { margin-top: 6px; font-size: 14px; }
.contact-edit, .add-vehicle, .new-customer { display: flex; flex-direction: column; gap: 12px; }
.add-vehicle { padding: 16px 18px; border-bottom: 1px solid var(--line-soft); background: var(--neutral-bg); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.vin-row { display: flex; gap: 10px; align-items: flex-end; } .vin-row .grow { flex: 1; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* P8 (Settings › Users): roles and shops are PICKED from a boxed list of checkboxes (44 px rows), never typed. */
.pick-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-input); background: var(--card); padding: 2px 12px; }
.pick-list .check { min-height: 40px; }
.pick-list .check + .check { border-top: 1px solid var(--line-soft); }
.pick-list input:disabled + span { color: var(--muted); }
.user-form .field input.ro { background: var(--paper); color: var(--muted); }
#users-table tr.inactive td { color: var(--muted); }
#users-table td:first-child, #users-table td:nth-child(4), #users-table td:nth-child(6) { white-space: nowrap; }
#users-table td:nth-child(2) { word-break: break-word; min-width: 160px; }
/* Under ~1480 px the Password changed column gives way so the three action buttons stay inside the card (no sideways scroll). */
@media (max-width: 1480px) { #users-table th:nth-child(5), #users-table td:nth-child(5) { display: none; } }
.pick-list .check input { flex: none; }
.user-form .form-actions, #pw-form .form-actions { margin-top: 12px; }
.field textarea { padding: 10px 12px; resize: vertical; }
.veh { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; border-top: 1px solid var(--line-soft); }
.veh-icon { width: 56px; height: 56px; border-radius: 10px; background: var(--paper); display: grid; place-items: center; }
.veh-name { font-weight: 600; font-size: 16px; } .veh-name a { color: var(--ink); } .veh-name a:hover { color: var(--accent-text); }
.veh-meta { margin-top: 2px; } .veh-third { margin-top: 6px; } .veh-third .pill { margin-right: 4px; }
.veh-actions { display: flex; flex-direction: column; gap: 8px; }
.btn.sm { min-height: 36px; padding: 0 14px; border-radius: 9px; }
.btn.on { background: var(--emph); border-color: var(--emph); color: #fff; }
.btn.ww { background: var(--hit-hover); border-color: var(--accent-dark); } .btn.ww.on { background: var(--accent-text); border-color: var(--accent-text); color: #fff; }
.card-head.wrap { flex-wrap: wrap; gap: 10px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.history-table { min-width: 720px; } .history-table td { vertical-align: top; padding: 12px; } .history-table th { padding: 10px 12px; }
.history-table td.work { max-width: 420px; }
.history-table tr.ww td:first-child { border-left: 3px solid var(--accent-dark); }
.ww-detail td { background: var(--neutral-bg); }
.ww-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; font-size: 13px; }
.ww-grid ul { margin: 6px 0 0; padding-left: 18px; } .ww-grid p { margin: 6px 0 0; }
@media (max-width: 900px) { .veh { grid-template-columns: 1fr; } .veh-icon { display: none; } .veh-actions { flex-direction: row; } .grid3 { grid-template-columns: 1fr 1fr; } }

/* ---------- Staged document (R4, Document.dc.html) ---------- */
.doc-head .titles { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.doc-head .titles h1 { margin: 0; }
.doc-head .btn.dark { background: var(--emph); border-color: var(--emph); color: #fff; }
#doc-status { font-size: 14px; }
#doc-status.hidden { display: none; }
.steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 20px; }
.steps .arrow { color: var(--line); }
.step { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 99px; font-weight: 600; font-size: 14px; color: var(--muted); background: var(--neutral-bg); min-height: 44px; }
.step.done { background: var(--ok-bg); color: var(--ok-text); }
.step.now { background: var(--emph); color: #fff; }
.who-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.hcard { padding: 14px 18px; }
.hcard .hname { font-weight: 600; font-size: 16px; }
.hcard .hname a { color: var(--ink); }
.hcard.four { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.hcard.five > div:first-child { grid-column: 1 / -1; } /* VH2: Mileage in — required — on its own row above advisor / technician / promised / bay */
.label .req { color: var(--danger, var(--danger)); font-weight: 600; margin-left: 2px; }
/* DS1 — Edit on a document's Customer / Vehicle card, and the in-place form that replaces the header cards */
.label .party-edit { margin-left: 8px; font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.party-form { margin-bottom: 16px; padding: 16px 18px; }
.party-form .card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 8px; }
.party-form .check { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 14px; }
.party-form .actions { display: flex; gap: 8px; align-items: center; }
.in { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 14px; color: var(--ink); background: var(--card); }
.in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 122, 24, .28); }
.in:disabled { background: var(--neutral-bg); color: var(--ink-2); }
.in.ro { display: flex; align-items: center; background: var(--neutral-bg); border-color: var(--line-soft); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.in.picked { background: var(--neutral-bg); }
.in.needs-pick { border-color: var(--accent); }
.hcard.four .in { height: 36px; }
.phrases { padding: 16px 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill.big { padding: 6px 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.pill.warn { background: var(--warn-bg); color: var(--warn-text); }
.pill.plain { background: var(--neutral-bg); color: var(--ink-2); }
.pill .x { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; padding: 0 2px; line-height: 1; }
.btn.dashed { border-style: dashed; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; }
.btn.sm.x { padding: 0; width: 36px; }
.jobs { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.jobs-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.jobs-head h2 { font-size: 17px; }
.job { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: visible; }
.jobh { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--neutral-bg); border-bottom: 1px solid var(--line-soft); border-radius: 12px 12px 0 0; flex-wrap: wrap; }
.jobt { display: flex; align-items: center; gap: 10px; flex: 1 1 320px; min-width: 0; }
.jobt .in.title { height: 36px; font-weight: 600; max-width: 420px; }
/* P5 (partial 3): the job title box carries the job-name picker (same .sug as the lines, hung under the 36 px box) */
.jobt .title-wrap { flex: 1 1 320px; max-width: 420px; min-width: 0; display: block; }
.jobt .title-wrap .in.title { width: 100%; max-width: none; }
.jobt .title-wrap .sug { top: 40px; }
.jobb { display: flex; gap: 8px; flex-wrap: wrap; }
/* P1 (b)+(d), the owner's compact row: Type · Part # (110 px, part lines only) · Description · Qty / hrs · Rate · Disc · Tax ☐ · Amount · × */
.line { display: grid; grid-template-columns: 100px 110px minmax(0, 1fr) 80px 100px 90px 44px 100px 36px; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.line .in.pn { font-variant-numeric: tabular-nums; }
/* F4: the empty Part # box must read as a box to fill — a darker, bolder placeholder than the browser's default grey */
.line .in.pn::placeholder { color: var(--ink-2); font-weight: 600; opacity: 1; }
.line .taxbox { display: flex; align-items: center; justify-content: center; height: 44px; cursor: pointer; }
.line .taxbox input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.line:last-child { border-bottom: 0; }
.line.head { background: var(--neutral-bg); padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.line.head .label { margin: 0; }
.line.empty-line { display: block; padding: 14px 16px; }
/* P2 (2): the "+ Add to parts with this number" row under a part line whose number is not on file */
.line.addpart { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 6px 16px 10px 226px; background: var(--neutral-bg); }
.line.addpart .btn.sm { min-height: 44px; }
.line.addpart .error { color: var(--bad-text); }
/* C2 (owner 2026-11-05): under a part line — New / Used / Reman and the notes box, starting under the Description box. */
.line.has-meta { border-bottom: 0; padding-bottom: 4px; }
.line.partmeta { display: flex; align-items: center; gap: 10px; padding: 0 62px 10px 246px; }
.line.partmeta .cond { display: flex; gap: 6px; flex: none; }
.line.partmeta .cond-btn { min-height: 44px; min-width: 64px; padding: 0 14px; font-size: 13px; }
.line.partmeta .in.note { flex: 1; min-width: 0; }
.line.partmeta.ro { padding-top: 0; }
.line.partmeta .part-note { font-size: 13px; color: var(--ink-2); font-style: italic; }
@media (max-width: 900px) { .line.partmeta { padding-left: 16px; padding-right: 16px; flex-wrap: wrap; } }
.line .amount { justify-content: flex-end; border-color: transparent; background: transparent; font-weight: 600; display: flex; align-items: center; }
.pick-wrap { position: relative; }
.sug { position: absolute; left: 0; right: 0; top: 46px; min-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.45); z-index: 20; overflow: hidden; }
.sug > input.in { margin: 8px; width: calc(100% - 16px); }
/* C1 (owner 2026-11-05): the picker says how many match and loads more — the rows then scroll inside the panel. */
.sug-list { max-height: min(62vh, 560px); overflow-y: auto; scroll-padding: 36px 0 66px; }
/* The count row stays at the bottom edge of the picker and the heading at its top while the rows scroll between them —
   "Showing 8 of 402 that match · Show more" is on screen without scrolling, however short the window. */
.sug-list > .sug-head { position: sticky; top: 0; z-index: 1; background: var(--card); }
.sug .row.more { position: sticky; bottom: 0; z-index: 1; border-top: 1px solid var(--line); }
.sug .row.more { background: var(--neutral-bg); cursor: default; font-size: 13px; }
.sug .row.more:hover { background: var(--neutral-bg); }
.sug .row.more .btn { min-height: 44px; flex: none; }
.sug-head { padding: 8px 12px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: flex; justify-content: space-between; }
.sug-head .fits { color: var(--accent-text); text-transform: none; letter-spacing: 0; }
.sug .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; min-height: 44px; align-items: center; color: var(--ink); border-top: 1px solid var(--line-soft); font-size: 14px; }
.sug .row:hover, .sug .row.active { background: var(--hit-hover); text-decoration: none; }
.sug .row small { color: var(--muted); }
.sug .row > .num { white-space: nowrap; flex: 0 0 auto; } /* P4: "0.5 h" / "$89.99 ea" stays on one line beside a long industry phrase */
.sug .row.ask { background: var(--neutral-bg); color: var(--muted); }
.sug .row.ask strong { color: var(--accent-text); }
.sug .row.ask.done { background: var(--ok-bg); color: var(--ok-text); cursor: default; }
.sug .row.ask.done strong { color: var(--ok-text); }
/* ---------- Settings › Catalog requests (R5) ---------- */
.req-form { display: grid; grid-template-columns: minmax(0, 2fr) 150px minmax(0, 1.4fr) auto auto; gap: 8px; align-items: center; }
.req-form .in { min-height: 40px; }
.req-phrase { font-weight: 600; }
.req-meta { font-size: 13px; color: var(--muted); }
@media (max-width: 1100px) { .req-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.side-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px; gap: 16px; }
.card.pad { padding: 16px 18px; }
.card.pad h2 { font-size: 15px; margin-bottom: 10px; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photos .ph { aspect-ratio: 4 / 3; border-radius: 8px; background: var(--neutral-bg); display: grid; place-items: center; font-size: 12px; height: auto; }
.tot { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; gap: 12px; align-items: center; }
.tot.grand { font-size: 18px; font-weight: 600; border-top: 2px solid var(--ink); border-bottom: 0; padding-top: 10px; }
.tot.balance { border-bottom: 0; color: var(--accent-text); font-weight: 600; }
.tot.tax .in { width: 64px; height: 30px; display: inline-block; padding: 0 6px; margin: 0 4px; }
.tot.tax > span:first-child { white-space: nowrap; } /* F5: "Tax (parts, 10 %)" stays on one line */
.tot.taxable { color: var(--ink-2); font-size: 13px; }
.totals { background: var(--neutral-bg); }
.pay-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
@media (max-width: 1100px) { .who-grid, .phrases, .side-grid { grid-template-columns: minmax(0, 1fr); } .line { grid-template-columns: 90px 90px minmax(0, 1fr) 64px 84px 76px 40px 90px 36px; } }

/* ---------- Jobs list (R6, Jobs.dc.html) ---------- */
.jobs-bar { align-items: center; gap: 6px; }
.jobs-bar .tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.jobs-bar .tab { padding: 0 10px; }
/* Shop-floor sub-entries (R10) sit after the stage tabs behind a thin divider; a module that is off has no tab. */
.jobs-bar #jobs-modules:empty { display: none; }
.jobs-bar .tab-sep { display: inline-block; width: 1px; height: 24px; background: var(--line); margin: 0 6px; align-self: center; }
.jobs-bar #jobs-modules .tab { color: var(--muted); }
.jobs-bar #jobs-modules .tab.on, .jobs-bar #jobs-modules .tab:hover { color: var(--ink); }
.filter-box { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-input); padding: 0 12px; min-height: 44px; flex: 1 1 160px; min-width: 160px; max-width: 320px; margin-left: auto; color: var(--muted); }
.filter-box:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.filter-box input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 14px; min-width: 0; color: var(--ink); background: transparent; }
.jobs-bar select.btn { font-weight: 600; min-height: 44px; }
.row-a { color: var(--ink); font-weight: 600; }
a.row-a:hover { color: var(--ink); }
a.row-a.job { color: var(--accent-text); font-weight: 600; }
#jobs-table th, #jobs-table td { padding-left: 10px; padding-right: 10px; }
#jobs-table th:first-child, #jobs-table td:first-child { padding-left: 14px; }
#jobs-table th:last-child, #jobs-table td:last-child { padding-right: 14px; }
#jobs-table td { white-space: nowrap; }
#jobs-table td.work { color: var(--ink-2); }
#jobs-table td.work span { display: inline-block; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
#jobs-table td.num { font-weight: 500; }
#jobs-table td.owed { font-weight: 600; color: var(--bad-text); }
#jobs-table td:last-child { font-weight: 600; }
.jobs-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.jobs-foot .links { display: flex; gap: 14px; }
.jobs-foot .links a { font-weight: 600; min-height: 24px; display: inline-flex; align-items: center; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; vertical-align: -2px; margin-right: 6px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media print {
  .topbar, #sidenav, .page-head .actions, .jobs-bar, .jobs-foot .links, #sign-out { display: none !important; }
  body { background: var(--paper); }
  .card { border: 0; box-shadow: none; }
  #jobs-table { min-width: 0 !important; font-size: 12px; }
  #jobs-table a { color: var(--ink); text-decoration: none; }
}

/* ---------- Appointments (R7, Appointments.dc.html) ---------- */
.day-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.day { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 10px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.day strong { font-size: 20px; font-weight: 600; color: var(--ink); }
.day:hover { background: var(--hover); text-decoration: none; color: var(--ink); }
.day.today strong { color: var(--accent-text); }
.day.on { background: var(--emph); color: var(--ink-2); } .day.on strong { color: #fff; }
.day-summary { margin-left: 12px; font-size: 13px; color: var(--muted); }
.slot { display: grid; grid-template-columns: 92px 1fr; gap: 0 16px; border-top: 1px solid var(--line-soft); padding: 14px 18px; align-items: start; }
.slot:first-child { border-top: 0; }
.slot .time { font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 12px; }
.slot .time small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.appt { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.6fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 10px; background: var(--card); min-width: 0; }
.appt.done { border-left-color: var(--ok-text); background: var(--neutral-bg); }
.appt.in { border-left-color: var(--nav); }
.appt .who { font-weight: 600; } .appt .who-a, .appt .veh-a { color: var(--ink); } .appt .veh-a { font-weight: 600; }
.appt .who-a:hover, .appt .veh-a:hover { color: var(--accent-text); }
.appt .nolink { color: var(--ink); }
.appt .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.appt .unconfirmed { color: var(--accent-text); font-weight: 600; }
.appt .act { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.appt .act .btn { min-height: 44px; padding: 0 12px; font-size: 13px; }
.appt .act .pill { align-self: center; }
.more { position: relative; display: inline-flex; }
.appt-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.45); padding: 6px; z-index: 5; display: flex; flex-direction: column; }
.appt-menu button { background: none; border: 0; text-align: left; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); min-height: 44px; padding: 0 12px; border-radius: 8px; cursor: pointer; }
.appt-menu button:hover { background: var(--hover); }
.appt-menu button.danger { color: var(--bad-text); }
.appt-status { padding: 8px 2px 0; grid-column: 2; }
.reschedule { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.reschedule .field input, .reschedule .field select { min-height: 44px; }
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.week-day.today { border-color: var(--accent); }
.week-day h2 { font-size: 15px; } .week-day h2 a { color: var(--ink); }
.week-row { display: grid; grid-template-columns: 76px 1fr; gap: 2px 10px; padding: 10px 18px; border-top: 1px solid var(--line-soft); border-left: 4px solid var(--accent); }
.week-row.in { border-left-color: var(--nav); } .week-row.done { border-left-color: var(--ok-text); opacity: .75; }
.week-row .time { font-weight: 600; font-variant-numeric: tabular-nums; }
.week-row .who-a { color: var(--ink); font-weight: 600; } .week-row .meta { grid-column: 2; font-size: 13px; color: var(--muted); }
.new-appt { display: flex; flex-direction: column; gap: 14px; max-width: 920px; }
@media (max-width: 900px) { .appt { grid-template-columns: minmax(0, 1fr); } .appt .act { justify-content: flex-start; } .slot { grid-template-columns: 72px 1fr; padding: 12px; } .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Vehicle finder (R8, Vehicles.dc.html) ---------- */
.lbl { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.vf-finder { padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; margin-bottom: 18px; }
.vf-finder .in { height: 40px; }
.vf-finder .btn { height: 40px; }
.vf-result { overflow: hidden; }
.vf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.vf-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vf-title h2 { margin: 0; font-size: 17px; font-weight: 600; }
.vf-rank { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--emph); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }
.chip:hover { text-decoration: none; color: #fff; }
.chip.o { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.chip.o:hover { background: var(--hover); color: var(--ink); }
.vf-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.vf-table { border-right: 1px solid var(--line-soft); border-radius: 0; border-top: 0; border-left: 0; border-bottom: 0; }
.vf-table th a { color: var(--muted); text-decoration: none; }
.vf-table th a:hover { color: var(--ink); }
.vf-table td, .vf-table th { white-space: nowrap; }
.vf-name { font-weight: 600; }
.vf-more { padding: 10px 14px; border-top: 1px solid var(--line-soft); }
.vf-side { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.vf-probs { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.vf-prob { display: flex; justify-content: space-between; gap: 10px; }
.vf-prob a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf-prob a.on { font-weight: 600; text-decoration: underline; }
.bar { height: 8px; border-radius: 99px; background: var(--neutral-bg); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
.vf-engs { font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.vf-eng { display: flex; justify-content: space-between; gap: 10px; }
.vf-actions { display: flex; gap: 8px; margin-top: auto; }
@media (max-width: 1100px) { .vf-grid { grid-template-columns: 1fr; } .vf-table { border-right: 0; border-bottom: 1px solid var(--line-soft); } }
@media (max-width: 900px) { .vf-finder { grid-template-columns: 1fr 1fr; } }

/* ---------- Home (R9): tiles load, quick links edit ---------- */
.tile .n .spinner { width: 22px; height: 22px; border-width: 3px; }
#floor-table td .row-a.job { font-weight: 600; }
.ql-edit { color: var(--accent-text); font-size: 13px; font-weight: 600; min-height: 44px; padding: 0 var(--s2); }
.ql-edit:hover { color: var(--accent-dark); }
button.quick-link { font: inherit; font-size: 15px; background: var(--card); cursor: pointer; width: 100%; text-align: left; }
button.quick-link.add { font-weight: 600; justify-content: center; }
button.quick-link.add[disabled] { opacity: .5; cursor: default; }
#ql-card.editing .quick-links { grid-template-columns: minmax(0, 1fr); } /* one per row while editing so the label and its ↑ ↓ ✕ both fit */
.quick-link.editing { display: flex; align-items: center; gap: 8px; padding-right: 4px; cursor: grab; background: var(--card); }
.quick-link.editing .grip { color: var(--muted); font-size: 14px; letter-spacing: -2px; user-select: none; }
.quick-link.editing .ql-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-link.editing .ql-tools { display: inline-flex; gap: 2px; }
.quick-link.editing.dragging { opacity: .5; }
.quick-link.editing.over { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ql-btn { min-width: 36px; min-height: 36px; border: 0; background: transparent; border-radius: 8px; color: var(--ink-2); font: inherit; font-size: 15px; cursor: pointer; }
.ql-btn:hover { background: var(--neutral-bg); }
.ql-btn.remove:hover { background: var(--bad-bg); color: var(--bad-text); }
.ql-btn[disabled] { opacity: .3; cursor: default; }
.ql-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; background: var(--neutral-bg); }
.ql-form-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
@media (max-width: 700px) { .ql-form { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Parts › Receiving (R10, supplier module body; no mockup — borrows the Jobs tabs/table and the Customer cards) ---------- */
#rcv-tabs .tab { padding: 0 10px; }
#rcv-table td, #rcv-orders td, #rcv-lines td { white-space: nowrap; }
#rcv-lines td:nth-child(3), #rcv-lines td.rcv-cat { white-space: normal; min-width: 160px; }
#rcv-lines td.rcv-cat .small { max-width: 260px; }
#rcv-lines tr.rcv-unmatched td { background: var(--row-hover); }
.rcv-state { padding: 10px 14px; border-radius: 9px; background: var(--neutral-bg); font-size: 14px; color: var(--ink-2); }
.rcv-state.ok { background: var(--ok-bg); color: var(--ok-text); }
.rcv-state.warn { background: var(--warn-bg); color: var(--warn-text); }
.rcv-state.bad { background: var(--bad-bg); color: var(--bad-text); }
.rcv-state + .rcv-state { margin-top: 8px; }
.rcv-actions { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--line-soft); background: var(--neutral-bg); border-radius: 0 0 var(--r-card) var(--r-card); }
.rcv-actions .field { min-width: 220px; }
.rcv-actions .field .in { height: 44px; }
.rcv-actions .check { min-height: 44px; }
#rcv-form .in { min-height: 44px; }
#rcv-form textarea.in { font-family: ui-monospace, Consolas, monospace; font-size: 14px; padding: 10px 12px; }
#rcv-form .field[hidden], #rcv-form .grid2[hidden] { display: none; }

/* Reports › Receivables (receivables.js): age tiles above the tab strip, two panes under a customer's invoices. */
.ar-tiles .tile { background: var(--paper); padding: 14px 16px; gap: 4px; }
.ar-tiles .tile .n { font-size: 24px; }
.ar-tiles .tile.on { border-color: var(--accent); background: var(--accent-tint); }
.ar-filter { max-width: 520px; }
.ar-filter input { min-height: 44px; }
.ar-filter[hidden] { display: none; }
.ar-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; border-top: 1px solid var(--line-soft); }
@media (max-width: 1100px) { .ar-two { grid-template-columns: minmax(0, 1fr); } }
.ar-pane h3 { font-size: 16px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.ar-form .in { min-height: 44px; }
.ar-form .grid2 + .grid2 { margin-top: 10px; }
.ar-form > .field { margin-top: 10px; }
.ar-terms-line { font-size: 15px; font-weight: 600; }
.ar-default { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ar-default .label { font-size: 11px; text-transform: uppercase; font-weight: 600; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
#ar-default-form .ar-form, #ar-terms-form .ar-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
#ar-pay-result .rcv-state { margin-bottom: 12px; }

/* Jobs › Inspections (R10, inspections.js): one card per job's checklist; items are 44 px rows with a real checkbox. */
.insp-body { display: grid; gap: 16px; }
.insp-list { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; background: var(--card); }
.insp-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.insp-list-head h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.insp-item { border-bottom: 1px solid var(--line-soft); font-size: 15px; } .insp-item:last-child { border-bottom: 0; }
.insp-item.done span:first-of-type { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.insp-item input { width: 22px; height: 22px; }
.insp-start-form { margin-top: 10px; } .insp-start-form .in { min-height: 44px; }
.insp-start-form .status.error { color: var(--bad-text); }
/* Receivables customer page: the Take payment / Terms panes now sit above the invoice table (R10 partial 5). */
.ar-two { border-top: 0; border-bottom: 1px solid var(--line-soft); }
/* Jobs › Time clock (R10, timeclock.js): one row per technician, the punch buttons and their pick lists in the last cell. */
#tc-table td, #tc-punches td { white-space: nowrap; }
#tc-table td.tc-name { font-weight: 600; }
#tc-table td.num { font-variant-numeric: tabular-nums; }
.tc-act { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.tc-act .btn.sm { min-height: 36px; }
.tc-pick { width: auto; max-width: 240px; height: 36px; font-size: 13px; }
.tc-link-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tc-h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 8px; }
#tc-punches td.tc-time { font-weight: 600; font-variant-numeric: tabular-nums; }
/* Jobs › Dispatch (R10, dispatch.js): one column per technician (Unassigned first, accent border), one card per work order. */
.dsp-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding: 16px 20px 20px; align-items: start; }
.dsp-board > .empty { grid-column: 1 / -1; }
.dsp-col { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.dsp-col.unassigned { border-color: var(--accent); }
.dsp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); min-height: 56px; }
.dsp-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.dsp-cards { display: grid; gap: 10px; padding: 10px; }
.dsp-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.dsp-row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dsp-row1 .row-a.job { font-weight: 600; font-size: 16px; }
.dsp-row2 { font-size: 14px; }
.dsp-work { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsp-time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dsp-time.over { color: var(--bad-text); font-weight: 600; }
.dsp-assign { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.dsp-label { font-size: 11px; text-transform: uppercase; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.dsp-pick { width: auto; min-width: 170px; height: 44px; font-size: 14px; }
.dsp-assign .status.error { color: var(--bad-text); }
.dsp-none { padding: 14px; font-size: 14px; }
/* Reports › Marketing (R10, marketing.js): pick lists in rows of three, the list table, labels + reminders panes (no mockup — borrows the Vehicle finder's finder and the Jobs table). */
.mk-form .lbl { display: block; margin-bottom: 8px; }
.mk-form .grid3 + .grid3 { margin-top: 10px; }
.mk-form .in { min-height: 44px; }
.mk-form .check[hidden] { display: none; }
.mk-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mk-actions .status.error, .ar-form .status.error { color: var(--bad-text); }
#mk-table td, #mk-outbox-table td { white-space: nowrap; }
#mk-table td.mk-needs { white-space: normal; min-width: 140px; max-width: 260px; }
#mk-table td.mk-veh { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
#mk-table td.num { font-variant-numeric: tabular-nums; }
#mk-two.ar-two { border-top: 1px solid var(--line); border-bottom: 0; }
#mk-label-result .rcv-state, #mk-rem-result .rcv-state { margin-top: 12px; }

/* Reports › Shop reports (R10, shopreports.js): report + period pick lists in one row, totals as tiles, the governed table below. */
.sr-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.sr-form .field { min-width: 220px; flex: 1 1 220px; max-width: 360px; }
.sr-form .in { min-height: 44px; }
.sr-form .form-actions .btn { min-height: 44px; }
.sr-tools { display: flex; gap: 8px; align-items: center; }
.sr-tools .btn { min-height: 44px; }
.sr-tiles { padding: 14px 18px 4px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.sr-tiles .tile .n { font-size: 22px; font-variant-numeric: tabular-nums; }
.sr-tiles .tile .n.muted { color: var(--muted); }
#sr-table td { white-space: nowrap; }
#sr-table td.nowrap { white-space: nowrap; }
#sr-table td.num, #sr-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
#sr-table td.sr-graph { width: 120px; }
#sr-table td.sr-graph .bar { height: 10px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
#sr-status.error { color: var(--bad-text); }

/* V1 — known issues per vehicle (customer page vehicle card) */
.veh-issues { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; line-height: 1.5; }
.veh-issues .chip { height: 44px; padding: 0 14px; cursor: pointer; border: 0; font-family: inherit; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.veh-issues .chip:hover, .veh-issues .chip.on { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-text); }
.veh-issues .issues-refresh { color: var(--accent-text); font-weight: 600; }
.veh-issues .bad-text { color: var(--bad-text); font-weight: 600; }
.issues-panel { flex-basis: 100%; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px 24px; }
.issues-group h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); }
.issues-group ul { margin: 0; padding: 0; list-style: none; }
.issues-group li { padding: 6px 0; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--ink-2); }
.issues-group li:first-child { border-top: 0; }
.issues-group li .pill { margin-right: 4px; vertical-align: 1px; }
.issues-foot { grid-column: 1 / -1; font-size: 12px; padding-top: 4px; border-top: 1px solid var(--line); }
/* F6: the top five known issues sit inline under the summary line, always visible; the system leads, the typical fix follows the arrow. */
.issues-top { flex-basis: 100%; margin-top: 6px; padding: 4px 0 0; border-top: 1px solid var(--line-soft); }
.issues-top li { padding: 7px 0; }
.issue-sys { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); margin-right: 2px; }
.issue-fix { color: var(--accent-text); font-weight: 600; white-space: nowrap; }
.issues-more { font-size: 12px; padding-top: 6px; }
.veh-issues .issues-wait { font-weight: 500; }
/* V1 (d) — the document's "This vehicle" card: the same strip + panel, plus "+ Recommend" / "Already on this quote" per item */
.this-vehicle { margin-top: 14px; }
/* VH2 — History & value under a vehicle (vehicle-history.js) */
.vh { margin-top: 8px; padding: 8px 0 0; border-top: 1px dashed var(--line-soft); font-size: 14px; }
.vh-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.vh-line .label { margin: 0; }
.vh-head { flex: 1 1 320px; min-width: 0; line-height: 1.45; }
.vh-tools { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.vh .btn.sm { min-height: 36px; }
.vh.running .vh-head { color: var(--muted); }
.vh-fail { margin-top: 6px; color: var(--bad-text); }
.vh-worth { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: var(--ok-bg); color: var(--ok-text); }
.vh-worth.warn { background: var(--hit-hover); color: var(--warn-text); }
.vh-worth.bad { background: var(--bad-bg); color: var(--bad-text); }
.vh-worth.hidden { display: none; }
.vh-details { margin-top: 8px; }
.vh-sub { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 0 2px; }
.vh-dl { margin: 0; }
.vh-dl > div { display: grid; grid-template-columns: 150px 1fr; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.vh-dl dt { color: var(--muted); } .vh-dl dd { margin: 0; }
.vh-market-head { font-size: 14px; margin: 2px 0 6px; }
.vh-market-wrap { overflow-x: auto; }
.vh-market { width: 100%; border-collapse: collapse; font-size: 13px; }
.vh-market th, .vh-market td { padding: 5px 8px; border-top: 1px solid var(--line-soft); text-align: left; white-space: nowrap; }
.vh-market th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.vh-market .num { text-align: right; }
.vh-market tr.vh-mine td { background: var(--ok-bg); }
@media (max-width: 700px) { .vh-dl > div { grid-template-columns: 1fr; } }
.this-vehicle .card-head { margin-bottom: 4px; }
.this-vehicle .veh-issues { margin-top: 4px; }
.this-vehicle .issues-panel { background: var(--paper); }
.issues-group li .rec { display: inline-block; margin-left: 8px; vertical-align: middle; }
.issues-group li .rec .btn.sm { padding: 0 10px; min-height: 32px; height: 32px; font-size: 13px; white-space: nowrap; }
.issues-group li .rec .sug { top: 38px; min-width: 460px; }
.issues-group li .rec-on { margin-left: 8px; }
/* V1 (e) — vehicle details: every attribute decoded from the VIN (customer page "Details" + the Add-vehicle form's readout) */
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.veh-details { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.veh-details-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.veh-details-head .label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); }
.veh-details-head .btn.sm { margin-left: auto; }
.veh-dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 20px; }
.veh-dl > div { display: grid; grid-template-columns: 112px 1fr; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.veh-dl dt { color: var(--muted); font-weight: 600; } .veh-dl dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.veh-dl.ai { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); grid-template-columns: 1fr; }
.veh-dl .pill { margin-left: 4px; vertical-align: 1px; }
/* F7 — the full decode, grouped Identity / Engine / Drivetrain / Body / Safety / Plant / More (customer Details + the Add-vehicle readout) */
.veh-dl-group { margin-top: 8px; }
.veh-dl-group-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--accent); padding: 4px 0 2px; }
.veh-dl-group .veh-dl > div { grid-template-columns: 150px 1fr; }
.veh-dl-group .veh-dl dd { white-space: pre-line; }
@media (max-width: 820px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .veh-dl { grid-template-columns: 1fr; } }
.veh:has(.veh-details) { align-items: start; } /* an open Details panel keeps Quote / History / Details at the top of the row */

/* ---------- Print view (F2, owner feedback 2026-10-26: the sample invoice in the presentation folder's language) ----------
   One letter sheet: black ink, one orange accent, hairline rules, letter-spaced small caps, script "Thank You". On screen the
   sheet sits on grey; in print it IS the page. The shell (bar, nav, version bar) is hidden on this route. */
body.print-view .topbar, body.print-view .sidenav, body.print-view .version-bar { display: none !important; }
body.print-view .content { background: #CFCAC2; padding: 20px; align-items: center; gap: 14px; }
.pv-tools { display: flex; align-items: center; gap: 14px; width: 8.5in; max-width: 100%; flex-wrap: wrap; }
.pv-tools-title { flex: 1 1 240px; font-size: 13px; color: var(--ink-2); }
.pv-sheet { width: 8.5in; max-width: 100%; min-height: 11in; box-sizing: border-box; background: #fff; color: #111; padding: .5in .55in .45in; box-shadow: 0 6px 24px rgba(0,0,0,.22); font-size: 11px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.pv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.pv-brand { display: flex; align-items: center; gap: 14px; }
.pv-mono { width: 96px; height: 44px; display: block; }
.pv-logo { height: 54px; width: auto; display: block; }
.pv-wordmark { font-size: 22px; font-weight: 300; letter-spacing: .32em; color: #4A4D52; text-transform: uppercase; line-height: 1.1; }
.pv-subline { font-size: 8.5px; letter-spacing: .22em; text-transform: uppercase; color: #6B6E73; margin-top: 4px; }
.pv-shop { text-align: right; font-size: 10px; color: #333; line-height: 1.45; }
.pv-shop strong { display: block; font-size: 12px; color: #111; letter-spacing: .02em; }
.pv-rule { height: 2px; background: linear-gradient(90deg, #111 0 70%, var(--accent) 70% 100%); margin: 14px 0 12px; }
.pv-title { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.pv-title h1 { font-size: 17px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; margin: 0; color: #111; }
.pv-title .pv-sep { color: var(--accent); font-weight: 400; margin: 0 6px; }
.pv-number { font-size: 15px; font-weight: 600; letter-spacing: .06em; }
.pv-stamp { display: inline-block; margin-left: 10px; padding: 1px 8px; border: 2px solid var(--accent); color: var(--accent); border-radius: 4px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; vertical-align: 2px; }
.pv-cols { display: grid; grid-template-columns: 1fr 1.25fr; gap: 28px; margin-top: 16px; }
.pv-h3 { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--accent-text); margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid #111; }
.pv-dl { margin: 0; display: grid; gap: 2px; }
.pv-dl > div { display: grid; grid-template-columns: 118px 1fr; gap: 8px; align-items: baseline; }
.pv-dl-wide > div { grid-template-columns: 80px 1fr; }
.pv-dl > div.pv-full { grid-template-columns: 1fr; }
.pv-dl dt { font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: #6B6E73; font-weight: 600; }
.pv-dl dd { margin: 0; color: #111; }
.pv-dl .pv-strong dd { font-weight: 600; font-size: 12.5px; }
.pv-note { margin: 6px 0 0; font-size: 8.5px; color: #6B6E73; font-style: italic; }
.pv-story { margin-top: 14px; padding: 8px 10px; border: 1px solid #DED9D1; border-radius: 4px; }
.pv-lines { width: 100%; border-collapse: collapse; margin-top: 16px; }
.pv-lines th { font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: #111; text-align: left; padding: 6px 6px; border-bottom: 1.5px solid #111; font-weight: 600; }
.pv-lines td { padding: 5px 6px; border-bottom: 1px solid #E6E2DB; vertical-align: top; }
.pv-lines td:first-child { color: #6B6E73; font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; width: 46px; }
.pv-lines td:nth-child(2) { width: 110px; white-space: nowrap; color: #333; }
.pv-lines .pv-band td { background: #111; color: #fff; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; padding: 5px 8px; border: 0; }
.pv-lines .pv-await { color: #FFC9A6; font-weight: 600; letter-spacing: .04em; margin-left: 10px; }
.pv-disc, .pv-notax { display: block; font-size: 8.5px; color: #6B6E73; font-style: italic; }
.pv-linenote { display: block; font-size: 9px; color: #33363A; } /* C2: the part's note (mileage, warranty) under its name */
.pv-num { text-align: right; white-space: nowrap; }
.pv-muted { color: #6B6E73; font-style: italic; }
.pv-bottom { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; margin-top: 18px; align-items: start; }
.pv-paytab { width: 100%; border-collapse: collapse; }
.pv-paytab td { padding: 3px 4px; border-bottom: 1px solid #E6E2DB; }
.pv-pay p { margin: 4px 0 0; }
.pv-totals { display: grid; gap: 2px; }
.pv-tot { display: flex; justify-content: space-between; gap: 12px; padding: 2px 6px; }
.pv-tot.pv-sub { border-top: 1px solid #111; margin-top: 3px; padding-top: 4px; font-weight: 600; }
.pv-tot.pv-due { margin-top: 6px; background: #111; color: #fff; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 7px 8px; font-size: 11px; }
.pv-tot.pv-due.pv-paid { background: var(--accent); }
.pv-foot { margin-top: 26px; border-top: 1px solid #111; padding-top: 12px; text-align: center; }
.pv-thanks { display: flex; flex-direction: column; align-items: center; gap: 0; }
.pv-script { font-family: "Great Vibes", "Brush Script MT", "Segoe Script", cursive; font-size: 34px; color: var(--accent); line-height: 1; }
.pv-caps { font-size: 8.5px; letter-spacing: .3em; text-transform: uppercase; color: #333; margin-top: 2px; }
.pv-closing { margin: 8px auto 0; max-width: 5.6in; font-size: 10px; color: #333; }
.pv-auth { margin: 14px 0 0; font-size: 9.5px; color: #333; text-align: left; }
.pv-sign { display: grid; grid-template-columns: 2.2fr 1fr; gap: 28px; margin-top: 26px; font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: #6B6E73; text-align: left; }
.pv-sign .pv-line { display: block; border-bottom: 1px solid #111; margin-bottom: 4px; }
.pv-strip { margin-top: 18px; padding-top: 8px; border-top: 1px solid #DED9D1; font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: #6B6E73; }
@page { size: letter portrait; margin: .45in .5in; }
@media print {
  body.print-view .content { background: #fff; padding: 0; display: block; }
  .pv-tools { display: none !important; }
  .pv-sheet { width: auto; max-width: none; min-height: 0; padding: 0; box-shadow: none; }
  .pv-lines .pv-band td, .pv-tot.pv-due { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pv-lines tr, .pv-story, .pv-sign, .pv-totals { break-inside: avoid; }
  .pv-lines thead { display: table-header-group; }
}

/* P7 — Stock › Count mode: the difference column reads like a movement (green up, red down), a counted row is tinted. */
#stk-count-table .stk-diff { font-weight: 600; }
#stk-count-table .stk-diff.up { color: var(--ok-text); }
#stk-count-table .stk-diff.down { color: var(--bad-text); }
#stk-count-table tr.counted td { background: var(--ok-bg); }
#stk-count-table .in { height: 44px; }

/* RW1/RW2 — the instrument cluster IS Home (owner 2026-11-08): its menu is the navigation, its readings are the counts.
   Sized to fit the screen: the artwork is 1672:941 plus its utilities row and footer, so the width follows the viewport height
   (no more "covering the whole page" on a wide monitor) and never passes 1320 px. */
.cluster-wrap { width: min(100%, calc((100vh - 320px) * 1672 / 941), 1320px); margin: 0 auto 20px; border-radius: 16px; overflow: hidden; background: #05080C; box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(0,0,0,.45); }
rpm-instrument-cluster { display: block; width: 100%; min-height: 200px; }
body.home-cluster .sidenav { display: none; }
body.home-cluster .page-head { max-width: 1320px; margin-left: auto; margin-right: auto; }
body.home-cluster #home-cols { max-width: 1320px; margin-left: auto; margin-right: auto; }
/* RW2 — the sign-in card is the cluster in its login mode; our form sits in its login slot (ids unchanged for app.js / the smoke). */
.signin-stage { width: min(100%, calc((100vh - 110px) * 1672 / 941), 1320px); display: flex; flex-direction: column; gap: 10px; }
.signin-stage rpm-instrument-cluster { border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(0,0,0,.45); }
#signin-cluster #signin-form { max-width: none; width: 100%; background: transparent; border: 0; box-shadow: none; padding: 0; gap: 10px; text-align: left; font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif; }
#signin-cluster #signin-form .field span { color: #DBE6F5; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; }
#signin-cluster #signin-form .field input { min-height: 40px; background: #0E141D; border-color: #2B3A4E; color: #F4F7FF; font-size: 15px; }
#signin-cluster #signin-form .field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,24,.28); }
#signin-cluster #signin-form #signin-status { font-size: 13px; margin: 0; color: #B8C9DE; }
#signin-cluster #signin-form #signin-status.error { color: var(--bad-text); }
#signin-cluster #signin-form .btn.primary { min-height: 40px; }
.signin-foot { margin: 0; color: var(--muted); display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.signin-foot .signin-link { padding: 0 4px; }
#signin:has(#recover-form:not(.hidden)) #signin-stage { display: none; }
.search-box:focus-within { border-color: var(--glow); box-shadow: 0 0 0 3px rgba(64,186,255,.18); }
/* RW3 — CUSTOMIZE: the cluster's picker (dial, two gauges, four lights), under the cluster */
.cluster-custom { max-width: 1320px; margin: -8px auto 20px; }
.cluster-custom .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.cluster-custom .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; margin-top: 12px; }
.cluster-custom .form-actions { margin-top: 14px; }
@media (max-width: 900px) { .cluster-custom .grid3, .cluster-custom .grid4 { grid-template-columns: 1fr 1fr; } }
/* PI1 — an invoice file or photo read into lines (Parts › Receiving › New receipt) */
.rcv-drop { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border: 2px dashed var(--line); border-radius: var(--r-card); background: var(--neutral-bg); color: var(--ink-2); cursor: pointer; margin-bottom: 12px; }
.rcv-drop > div:first-of-type { flex: 1 1 260px; min-width: 0; }
.rcv-drop.over, .rcv-drop:focus-visible { border-color: var(--accent); background: var(--accent-tint); outline: none; }
.rcv-drop svg { color: var(--accent-text); flex: 0 0 auto; }
.rcv-drop-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rcv-reading { display: flex; align-items: center; gap: 10px; padding: 12px 0; color: var(--ink-2); }
.rcv-readhead { padding: 6px 0 2px; font-size: 15px; }
.rcv-edit td { padding: 6px 8px; vertical-align: middle; }
.rcv-edit .in.sm { min-height: 36px; height: 36px; padding: 0 8px; font-size: 14px; width: 130px; }
.rcv-edit .in.sm.wide { width: 100%; min-width: 220px; }
.rcv-edit .in.sm.num { width: 90px; text-align: right; }
.rcv-edit tr.rcv-off td { opacity: .45; }
.rcv-edit tr.rcv-off td:first-child { opacity: 1; }
.rcv-notes { margin: 8px 0 0; padding-left: 18px; color: var(--warn-text); font-size: 13px; }
@media (max-width: 700px) { .rcv-drop { padding: 14px; } .rcv-drop-actions .btn { flex: 1 1 auto; } }
