/* Update 23: Stride Drive brand - Archivo (logo + headings) and Inter (text), served from Stride itself */
@font-face { font-family: "Archivo"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/archivo-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #14202e;
  --ink-2: #4a5868;
  --ink-3: #7b8796;
  --line: #d9dee5;
  --line-2: #e9ecf0;
  --bg: #eef1f4;
  --card: #ffffff;
  --navy: #0f2a44;
  --navy-2: #173a5c;
  --amber: #f26b1d;           /* Stride orange */
  --amber-2: #d9570e;
  --amber-soft: #fff1e8;
  --orange: #f26b1d;
  --red: #c4372b;
  --red-soft: #fdecea;
  --green: #1d7a46;
  --green-soft: #e5f4ea;
  --blue-soft: #e8f0f8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 42, 68, .06), 0 2px 8px rgba(15, 42, 68, .05);
  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.45; color: var(--ink); background: var(--bg); }
a { color: var(--navy-2); }
h1, h2, h3 { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.right { text-align: right; }
.hint { color: var(--ink-3); font-size: 13px; margin: 6px 0 0; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.h-display { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.05; letter-spacing: .005em; }
.h-section { font-family: var(--display); font-weight: 600; font-size: 20px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.count { font-family: var(--body); font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--ink-2); border-radius: 99px; padding: 1px 8px; }

/* ---------------------------------------------------------- top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 8px 20px; background: var(--navy); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: var(--amber); color: #fff; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: .04em; }
.brand-badge { width: 38px; height: 38px; display: block; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--display); font-size: 19px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.brand-text small { font-size: 12px; opacity: .75; }
.mainnav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.mainnav a { color: #c9d6e3; text-decoration: none; font-weight: 600; padding: 9px 12px; border-radius: 7px; white-space: nowrap; }
.mainnav a:hover { background: var(--navy-2); color: #fff; }
.mainnav a.on { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 -3px 0 var(--amber); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.dealer-switch select { background: var(--navy-2); color: #fff; border: 1px solid rgba(255, 255, 255, .2); padding: 7px 8px; border-radius: 7px; max-width: 200px; font: inherit; font-size: 14px; }
.who { color: #fff; font-weight: 600; text-decoration: none; font-size: 14px; }
.linkbtn { background: none; border: 0; color: #c9d6e3; font: inherit; font-size: 14px; cursor: pointer; padding: 0; }
.linkbtn:hover { color: #fff; text-decoration: underline; }

/* ---------------------------------------------------------- layout */
.wrap { max-width: 1280px; margin: 0 auto; padding: 22px 20px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.narrow { max-width: 520px; }
.form-card { max-width: 900px; }
.table-card { padding: 6px 0 4px; overflow-x: auto; }
.table-card .h-section { padding: 12px 18px 0; }
.table-card .hint { padding: 0 18px 10px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 4px 0 0; }
.drive-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.quote-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.users-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.side-col { display: flex; flex-direction: column; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; }
.stack .h-section { margin: 10px 0 -2px; }

/* ---------------------------------------------------------- forms */
.field-label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field-label.inline { flex-direction: row; align-items: center; gap: 6px; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #c4ccd6; border-radius: 8px; padding: 10px 12px; width: 100%; min-height: 44px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(23, 58, 92, .15); }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--navy-2); }
.check-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; display: inline-block; width: 14px; color: var(--ink-3); transition: transform .15s; }
details[open] > summary::before { transform: rotate(90deg); }

/* ---------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; border-radius: 8px; padding: 10px 16px; min-height: 44px; cursor: pointer; border: 1px solid transparent; transition: background .12s, border-color .12s; white-space: nowrap; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--amber); color: #fff; }
.btn-primary:hover { background: var(--amber-2); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-ghost { background: #fff; color: var(--navy); border-color: #c4ccd6; }
.btn-ghost:hover { border-color: var(--navy-2); background: var(--blue-soft); }
.btn-sold { background: var(--green); color: #fff; }
.btn-sold:hover { filter: brightness(1.08); }
.btn-small { padding: 6px 12px; min-height: 36px; font-size: 14px; }
.btn-xl { width: 100%; min-height: 58px; font-size: 19px; margin-top: 18px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------- pills & flashes */
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill-lg { font-size: 14px; padding: 5px 14px; }
.pill-open { background: var(--blue-soft); color: var(--navy-2); }
.pill-presented { background: var(--amber-soft); color: #9a5a06; }
.pill-sold { background: var(--green-soft); color: var(--green); }
.pill-declined { background: var(--line-2); color: var(--ink-3); }
.pill-hot { background: var(--amber); color: #fff; }
.flashes { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 11px 14px; border-radius: 8px; font-weight: 600; }
.flash-ok { background: var(--green-soft); color: var(--green); }
.flash-error { background: var(--red-soft); color: var(--red); }

/* ---------------------------------------------------------- start menu */
.start-card { padding: 24px 26px 26px; }
.start-card .h-display { margin-bottom: 16px; }
.start-card .field-label { margin-top: 14px; }
.vin-row { display: flex; gap: 8px; }
.vin-input { font-family: var(--mono); font-size: 24px; letter-spacing: .12em; text-transform: uppercase; min-height: 58px; padding: 10px 14px; }
.scan-btn { min-height: 58px; }
.vin-meta { display: flex; gap: 12px; font-size: 13px; color: var(--ink-3); margin-top: 6px; min-height: 20px; }
.vin-msg.err { color: var(--red); font-weight: 600; }
.vin-msg.warn { color: #9a5a06; font-weight: 600; }
.vin-msg.ok { color: var(--green); font-weight: 600; }
.mileage-input { font-size: 24px; font-weight: 600; min-height: 58px; max-width: 260px; }
.vehicle-card { margin-top: 16px; padding: 14px 16px 16px; background: #f6f8fa; border: 1px solid var(--line); border-left: 4px solid var(--navy-2); border-radius: 8px; }
.vehicle-card .field-label { margin-top: 10px; }
.vehicle-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.vehicle-title > span:first-child { font-family: var(--display); font-weight: 700; font-size: 24px; }
.prior-note { margin-top: 8px; background: var(--amber-soft); color: #7a4705; border-radius: 6px; padding: 8px 10px; font-size: 14px; }
.customer-details { margin-top: 18px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.customer-details summary { font-weight: 700; color: var(--ink-2); }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { border-top: 1px solid var(--line-2); }
.mini-list li:first-child { border-top: 0; }
.mini-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 2px; color: var(--ink); text-decoration: none; }
.mini-list a:hover { background: #f7f9fb; }
.alert-card { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }

.scan-dialog { border: 0; border-radius: 14px; padding: 16px; width: min(560px, 94vw); background: var(--navy); color: #fff; }
.scan-dialog::backdrop { background: rgba(8, 18, 30, .7); }
.scan-wrap { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.scan-wrap video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; left: 6%; right: 6%; top: 38%; bottom: 38%; border: 3px solid var(--amber); border-radius: 8px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
.scan-hint { margin: 12px 0; font-size: 15px; }

/* ---------------------------------------------------------- advisor quote view */
.quote-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.quote-head .h-display { font-size: 36px; margin: 2px 0 4px; }
.action-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.action-bar form { margin: 0; }
.sent-flags { margin-left: 4px; }
.choice-banner { background: var(--amber); color: #fff; border-radius: 8px; padding: 12px 16px; margin-bottom: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; font-size: 17px; animation: pop .4s ease; }
.choice-banner .muted { color: rgba(255, 255, 255, .85); }
@keyframes pop { from { transform: scale(.98); opacity: .4; } to { transform: none; opacity: 1; } }
.pkg-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 16px; }
.pkg-mini { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.pkg-mini.featured { border-color: var(--amber); }
.pkg-mini.chosen { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.pkg-mini-name { font-family: var(--display); font-weight: 600; font-size: 18px; }
.pkg-mini-total { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; }
.pkg-mini form { margin-top: 8px; }
.pkg-mini .pill { align-self: flex-start; }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.line:first-child { border-top: 0; }
.line-name { font-weight: 700; font-size: 16px; }
.line-reason { font-size: 13px; color: var(--ink-2); }
.line-due .line-reason { color: var(--red); font-weight: 600; }
.line-upcoming .line-reason { color: #9a5a06; font-weight: 600; }
.line-verify { font-size: 13px; color: #7a4705; background: var(--amber-soft); border-radius: 5px; padding: 3px 8px; margin-top: 5px; display: inline-block; }
.line-price { font-family: var(--display); font-weight: 600; font-size: 20px; text-align: right; }
.line-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; min-width: 190px; }
.line.is-sold { background: linear-gradient(90deg, var(--green-soft), transparent 70%); }
.line.is-declined .line-name, .line.is-declined .line-price { color: var(--ink-3); text-decoration: line-through; }
.tier { font-family: var(--body); font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; vertical-align: 2px; margin-left: 4px; }
.tier-1 { background: var(--blue-soft); color: var(--navy-2); }
.tier-2 { background: var(--amber-soft); color: #9a5a06; }
.tier-3 { background: #efe9f7; color: #5b3a8c; }
.notdue-card summary { margin-bottom: 0; }
.notdue-card[open] summary { margin-bottom: 10px; }
.totals-card .stat { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; }
.totals-card .stat span { color: var(--ink-2); font-weight: 600; }
.totals-card .stat strong { font-family: var(--display); font-size: 28px; }
.totals-card .stat-sold strong { color: var(--green); }
.totals-actions { margin-top: 10px; }

/* ---------------------------------------------------------- tables & reports */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table a { color: var(--ink); text-decoration: none; }
.rowlink { cursor: pointer; }
.rowlink:hover td { background: #f7f9fb; }
.row-off td { opacity: .5; }
.money-in { width: 104px; text-align: right; min-height: 38px; padding: 6px 10px; font-size: 15px; }
.small-in { min-height: 36px; padding: 6px 10px; font-size: 14px; width: 150px; }
.table select { min-height: 36px; padding: 6px 8px; font-size: 14px; width: auto; }
.form-foot { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-foot .hint { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { width: auto; min-height: 40px; padding: 7px 10px; font-size: 15px; }
.filters input[name=q] { width: 260px; }
.quick-ranges { display: flex; gap: 14px; margin: -6px 0 14px; font-size: 14px; font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.kpi strong { font-family: var(--display); font-size: 30px; font-weight: 700; }
.bar-cell { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.bar-cell .bar { display: inline-block; height: 8px; border-radius: 4px; background: var(--amber); max-width: 90px; min-width: 2px; }
.seg { display: inline-flex; border: 1px solid #c4ccd6; border-radius: 8px; overflow: hidden; }
.seg a { padding: 8px 14px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink-2); background: #fff; }
.seg a.on { background: var(--navy); color: #fff; }

/* ---------------------------------------------------------- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); }
.login-card { width: min(400px, 100%); background: #fff; border-radius: 14px; padding: 28px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.login-card .brand { color: var(--ink); margin-bottom: 22px; }
.login-card .brand-text small { opacity: .7; }
.login-card .muted { text-align: center; margin: 16px 0 0; }
.login-wrap .flashes { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); }

/* ---------------------------------------------------------- customer menu */
body.customer-menu { background: #e9edf1; }
.presenter-bar { max-width: 1040px; margin: 0 auto; padding: 12px 20px 0; display: flex; gap: 8px; }
.menu-sheet { max-width: 1040px; margin: 14px auto 40px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 30px 34px 26px; }
.menu-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 3px solid var(--navy); }
.menu-dealer { font-family: var(--display); font-weight: 700; font-size: 28px; color: var(--navy); line-height: 1.1; }
.menu-dealer-sub { color: var(--ink-2); font-size: 14px; }
.menu-date { text-align: right; color: var(--ink-2); font-size: 14px; }
.menu-vehicle { padding: 20px 0 6px; }
.menu-vehicle h1 { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1.05; margin: 2px 0 6px; }
.menu-vehicle-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-2); font-weight: 600; }
.menu-vehicle-meta span:last-child { font-family: var(--mono); font-weight: 400; font-size: 14px; }
.choice-confirm { background: var(--green-soft); color: var(--green); border-radius: 8px; padding: 12px 16px; margin: 12px 0 0; font-weight: 600; }
.customer-menu .flash { margin: 12px 0 0; }
.pkg-grid { display: grid; gap: 16px; margin: 22px 0 8px; align-items: stretch; }
.pkg-count-1 { grid-template-columns: minmax(0, 420px); }
.pkg-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pkg-count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pkg { position: relative; display: flex; flex-direction: column; border: 2px solid var(--line); border-radius: 12px; padding: 22px 20px 20px; background: #fff; }
.pkg.featured { border-color: var(--amber); box-shadow: 0 8px 24px rgba(232, 137, 12, .16); }
.pkg.chosen { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.pkg-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--amber); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 12px; border-radius: 99px; white-space: nowrap; }
.pkg-name { font-family: var(--display); font-weight: 600; font-size: 22px; text-align: center; color: var(--navy); }
.pkg-price { font-family: var(--display); font-weight: 700; font-size: 46px; text-align: center; line-height: 1.05; margin-top: 4px; }
.pkg-sub { text-align: center; min-height: 22px; font-size: 14px; }
.save { color: var(--green); font-weight: 700; }
.pkg-items { list-style: none; margin: 14px 0 12px; padding: 14px 0 0; border-top: 1px solid var(--line-2); flex: 1; }
.pkg-items li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; font-size: 15px; font-weight: 500; }
.check { color: var(--green); font-weight: 700; }
.soon { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #9a5a06; background: var(--amber-soft); padding: 1px 6px; border-radius: 4px; margin-left: auto; white-space: nowrap; }
.pkg-tax { text-align: center; font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.pkg form { margin-top: auto; }
.uptodate { text-align: center; padding: 30px 10px; }
.uptodate h2 { font-family: var(--display); font-size: 30px; color: var(--green); }
.explain { margin-top: 24px; }
.explain dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.explain-row { padding: 10px 0; border-top: 1px solid var(--line-2); break-inside: avoid; }
.explain dt { font-weight: 700; display: flex; justify-content: space-between; gap: 10px; }
.explain-price { font-weight: 600; color: var(--ink-2); }
.explain dd { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.explain-why { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.call-me { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.menu-foot { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12px; }
.menu-foot p { margin: 4px 0; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mainnav a { padding: 9px 9px; }
}
@media (max-width: 900px) {
  .drive-grid, .quote-grid, .users-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar { flex-wrap: wrap; gap: 8px 14px; padding: 8px 14px; }
  .mainnav { order: 3; flex-basis: 100%; }
  .topbar-right { margin-left: auto; }
  .pkg-count-3, .pkg-count-2 { grid-template-columns: minmax(0, 1fr); }
  .pkg-grid { gap: 22px; }
  .explain dl { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding: 16px 14px 50px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-display { font-size: 28px; }
  .quote-head .h-display { font-size: 28px; }
  .line { grid-template-columns: minmax(0, 1fr) auto; }
  .line-actions { grid-column: 1 / -1; justify-content: flex-start; min-width: 0; }
  .brand-text small, .who { display: none; }
  .vin-input { font-size: 19px; letter-spacing: .06em; }
  .menu-sheet { margin: 0; border-radius: 0; padding: 20px 16px; }
  .menu-head { flex-direction: column; }
  .menu-date { text-align: left; }
  .menu-vehicle h1 { font-size: 32px; }
  .call-me { grid-template-columns: minmax(0, 1fr); }
  .filters input[name=q] { width: 100%; }
}

/* ---------------------------------------------------------- print */
@media print {
  @page { size: letter; margin: .45in; }
  body, body.customer-menu { background: #fff; font-size: 12px; }
  .no-print, .topbar, .presenter-bar { display: none !important; }
  .menu-sheet { box-shadow: none; margin: 0; padding: 0; max-width: none; border-radius: 0; }
  .pkg-count-3 { grid-template-columns: repeat(3, 1fr); }
  .pkg-count-2 { grid-template-columns: repeat(2, 1fr); }
  .pkg-grid { gap: 12px; margin-top: 14px; }
  .pkg { padding: 16px 12px 12px; break-inside: avoid; }
  .pkg.featured { box-shadow: none; }
  .pkg-price { font-size: 34px; }
  .pkg-items li { font-size: 12px; padding: 2px 0; }
  .menu-vehicle h1 { font-size: 30px; }
  .explain dl { grid-template-columns: 1fr 1fr; }
  .explain dd { font-size: 11px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------------------------------------------------------- v2: visit type, menu setup, schedule */
.visit-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid #c4ccd6; border-radius: 10px; overflow: hidden; margin-bottom: 4px; }
.visit-opt { position: relative; cursor: pointer; }
.visit-opt input { position: absolute; opacity: 0; pointer-events: none; }
.visit-opt span { display: block; text-align: center; padding: 13px 10px; font-weight: 700; color: var(--ink-2); background: #fff; }
.visit-opt + .visit-opt span { border-left: 1px solid #c4ccd6; }
.visit-opt input:checked + span { background: var(--navy); color: #fff; box-shadow: inset 0 -3px 0 var(--amber); }
.visit-opt input:focus-visible + span { outline: 3px solid rgba(23, 58, 92, .35); outline-offset: -3px; }
.pkg-mini-items { color: var(--ink-2); margin-top: 2px; }
.pkg-item-desc { display: block; font-size: 13px; font-weight: 400; color: var(--ink-2); line-height: 1.35; margin-top: 2px; }
.miles-in { width: 98px; text-align: right; min-height: 38px; padding: 6px 10px; font-size: 15px; }
.mo-in { width: 58px; text-align: right; min-height: 38px; padding: 6px 8px; font-size: 15px; }
.tier-select { min-width: 150px; }
.row-changed td { background: #fffaf1; }
.linkbtn-dark { background: none; border: 0; padding: 0; font: inherit; color: var(--navy-2); text-decoration: underline; cursor: pointer; }
.sched-table td { vertical-align: top; }
.sched-table td:first-child { white-space: nowrap; }
.sched-empty td { color: var(--ink-3); }
.sched-heavy td { background: #fff6e8; }
.chip { display: inline-flex; align-items: baseline; gap: 5px; font-size: 13px; font-weight: 600; padding: 3px 9px; margin: 2px 4px 2px 0; border-radius: 6px; background: var(--blue-soft); color: var(--navy-2); }
.chip em { font-style: normal; font-weight: 500; font-size: 11px; opacity: .75; }
.chip-2 { background: var(--amber-soft); color: #8a5005; }
.chip-3 { background: #efe9f7; color: #5b3a8c; }
.sched-bar-col { width: 160px; }
.sched-bar { display: block; height: 10px; border-radius: 5px; background: var(--amber); margin-top: 6px; min-width: 0; }
@media (max-width: 640px) { .sched-bar-col { display: none; } }
.pricing-table td:nth-child(2) { min-width: 230px; }
.page-head .filters select { min-height: 40px; }

/* ---------------------------------------------------------- Update 5: Dispatch */
.wrap-wide { max-width: none; margin: 0; padding: 22px 20px 40px; }
.btn-clock-out { background: var(--red); color: #fff; }
.btn-clock-out:hover { filter: brightness(1.08); }
.inline-form { margin: 0; }
.inline-form select { width: auto; min-height: 44px; }

/* bell + toast */
.bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; color: #c9d6e3; }
.bell:hover { background: var(--navy-2); color: #fff; }
.bell.has { color: #fff; }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; max-width: 380px; background: var(--navy); color: #fff; border-left: 5px solid var(--amber); border-radius: 10px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: pop .3s ease; }
.toast a { color: #fff; text-decoration: none; font-weight: 600; }

/* board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.board-col { background: #e3e8ee; border-radius: 12px; padding: 8px; min-height: 140px; }
.board-col-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--navy); border-top: 4px solid var(--line); margin: -8px -8px 6px; padding-top: 12px; padding-left: 14px; padding-right: 14px; border-radius: 12px 12px 0 0; }
.col-checked_in .board-col-head { border-top-color: #7b8796; }
.col-dispatched .board-col-head { border-top-color: #4a7bb5; }
.col-in_progress .board-col-head { border-top-color: var(--green); }
.col-waiting_parts .board-col-head { border-top-color: var(--amber); }
.col-waiting_approval .board-col-head { border-top-color: #8e5bc4; }
.col-work_complete .board-col-head { border-top-color: #1b8f8a; }
.col-ready .board-col-head { border-top-color: var(--navy); }
.board-cards { display: flex; flex-direction: column; gap: 8px; }
.board-empty { text-align: center; color: var(--ink-3); margin: 18px 0; }
.ro-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.ro-card:hover { border-color: var(--navy-2); }
.ro-card.is-overdue { border-left: 5px solid var(--red); }
.ro-card.has-unread { box-shadow: 0 0 0 2px var(--amber); }
.ro-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ro-num { font-weight: 700; color: var(--navy); text-decoration: none; }
.ro-num:hover { text-decoration: underline; }
.tag-chip { font-size: 12px; font-weight: 700; background: var(--line-2); border-radius: 5px; padding: 1px 6px; }
.unread-dot { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--amber); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.ro-veh { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.1; }
.ro-meta { color: var(--ink-2); }
.ro-meta .late { color: var(--red); font-weight: 700; }
.ro-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.flag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; }
.flag-clock { background: var(--green-soft); color: var(--green); }
.flag-parts { background: var(--amber-soft); color: #8a5005; }
.flag-rec { background: #efe9f7; color: #5b3a8c; }
.ro-people { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.ro-people label { display: flex; flex-direction: column; gap: 2px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.ro-people select, .ro-stage select { min-height: 32px; padding: 3px 6px; font-size: 13px; border-radius: 6px; }
.ro-stage select { margin-top: 2px; background: #f6f8fa; }
.person { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy-2); color: #fff; font-size: 11px; font-weight: 700; flex: none; }
.avatar-tech { background: var(--green); }
.avatar-parts { background: var(--amber); }
body.tv .topbar, body.tv .page-head .filters label, body.tv .hint { display: none; }
body.tv .wrap-wide { padding: 10px; }
body.tv .ro-veh { font-size: 21px; }
body.tv .ro-people, body.tv .ro-stage { display: none; }

/* stage pills */
.stage-checked_in { background: #e6e9ee; color: #4a5868; }
.stage-dispatched { background: #e2ecf7; color: #2c5d94; }
.stage-in_progress { background: var(--green-soft); color: var(--green); }
.stage-waiting_parts { background: var(--amber-soft); color: #8a5005; }
.stage-waiting_approval { background: #efe9f7; color: #5b3a8c; }
.stage-work_complete { background: #dff3f2; color: #13706c; }
.stage-ready { background: var(--navy); color: #fff; }
.stage-closed { background: var(--line-2); color: var(--ink-3); }
.ro-stage-box { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.waiter-text { color: var(--amber-2); }

/* jobs */
.jobs { list-style: none; margin: 0; padding: 0; }
.job { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.job:first-child { border-top: 0; }
.job-title { font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.job-notes { margin-top: 4px; color: var(--ink-2); background: #f6f8fa; border-radius: 6px; padding: 6px 8px; }
.job-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.job-actions form { margin: 0; }
.job-complete .job-title { color: var(--ink-3); }
.job-declined .job-title { color: var(--ink-3); text-decoration: line-through; }
.job-pill-recommended { background: #efe9f7; color: #5b3a8c; }
.job-pill-approved { background: var(--blue-soft); color: var(--navy-2); }
.job-pill-in_progress { background: var(--green-soft); color: var(--green); }
.job-pill-complete { background: #dff3f2; color: #13706c; }
.job-pill-declined { background: var(--line-2); color: var(--ink-3); }
.on-clock { color: var(--green); font-weight: 700; }
.job-totals { display: flex; gap: 18px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-weight: 600; color: var(--ink-2); }
.add-job { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.add-job summary { font-weight: 700; color: var(--navy-2); margin-bottom: 10px; }
.jobs.compact .job { padding: 9px 0; }
.ro-new-jobs { list-style: none; padding: 0; margin: 0; }
.ro-new-jobs li { padding: 5px 0; font-weight: 600; }
.waiter-check { align-self: end; padding-bottom: 10px; }

/* clock */
.clock-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; background: var(--amber-soft); color: #7a4705; font-weight: 600; }
.clock-banner.here { background: var(--green-soft); color: var(--green); }
.clock-banner.off { background: #fff; border: 1px dashed var(--line); color: var(--ink-2); font-weight: 500; }
.clock-banner.big { padding: 16px 20px; justify-content: space-between; }
.clock-banner.big > div { flex: 1; }
.clock-banner a { color: inherit; }
.timer-big { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1.1; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; flex: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* messages */
.msgs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.msg { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.msg.mine { background: #f5f8fc; }
.msg-parts_request { border-color: var(--amber); background: #fffaf1; }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-body { margin-top: 6px; white-space: pre-wrap; }
.big-body { font-size: 17px; background: #f6f8fa; border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.msg-reply { margin: 10px 0 0 22px; padding: 8px 10px; border-left: 3px solid var(--green); background: var(--green-soft); border-radius: 0 8px 8px 0; }
.reply-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.reply-form textarea { flex: 1; min-height: 44px; }
.composer textarea { width: 100%; }
.notify-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.notify-row .btn { margin-left: auto; }
.chip-check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; background: #fff; cursor: pointer; }
.chip-check input { width: 16px; height: 16px; }
.parts-card { border-color: var(--amber); }
.activity-list { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; }
.activity-list li { display: flex; flex-direction: column; padding: 7px 0; border-top: 1px solid var(--line-2); }

/* my work / parts / alerts */
.work-card.is-waiter { border-left: 5px solid var(--amber); }
.work-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 6px; }
.work-head .ro-num { font-size: 18px; }
.parts-req.is-old { border-left: 5px solid var(--red); }
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { border-top: 1px solid var(--line-2); }
.alert-list li:first-child { border-top: 0; }
.alert-list a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px; color: var(--ink); text-decoration: none; }
.alert-list li.unread a { font-weight: 700; }
.alert-list li.unread a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); margin-top: 7px; flex: none; }
.alert-list a > span:first-child { flex: 1; }

@media (max-width: 640px) {
  .board { grid-auto-columns: 86vw; }
  .job { grid-template-columns: minmax(0, 1fr); }
  .job-actions { justify-content: flex-start; }
  .reply-form { flex-direction: column; align-items: stretch; }
  .clock-banner.big { flex-direction: column; align-items: flex-start; }
}

/* Update 5.1: view as */
.viewas-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 8px 16px; background: var(--amber); color: #fff; font-size: 15px; }
.viewas-bar .btn { background: #fff; color: var(--navy); min-height: 34px; }
.viewas-bar + .topbar { top: 50px; }
.user-actions { display: flex; gap: 6px; }
.user-actions form { margin: 0; }

/* ---------------------------------------------------------- Update 6: scanner + walkaround */
.vin-row .scan-btn { flex: none; cursor: pointer; }
.vin-photo-note { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--green); font-weight: 600; }
.vin-photo-note img { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.skip-walk { margin-top: 8px; }
.storage-box { margin: 14px 0; padding: 12px 14px; border-radius: 8px; font-size: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.storage-box.ok { background: var(--green-soft); color: var(--green); }
.storage-box.warn { background: var(--amber-soft); color: #7a4705; }

.walk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.walk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.walk-stage { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.walk-diagram { text-align: center; }
.walk-diagram svg { width: 100%; max-width: 220px; }
.car-body { fill: #e3e8ee; stroke: #9aa6b4; stroke-width: 2; }
.car-glass { fill: #c9d3de; }
.car-label { font: 700 11px var(--body); fill: var(--ink-3); text-anchor: middle; letter-spacing: .1em; }
.marks circle { fill: #fff; stroke: #9aa6b4; stroke-width: 2; cursor: pointer; }
.marks circle.done { fill: var(--green); stroke: var(--green); }
.marks circle.cur { fill: var(--amber); stroke: var(--amber-2); stroke-width: 3; }
.marks text { font: 700 11px var(--body); text-anchor: middle; pointer-events: none; fill: var(--ink); }
.walk-step { display: flex; flex-direction: column; gap: 12px; }
.walk-title { font-family: var(--display); font-size: 30px; font-weight: 700; }
.walk-help { margin: -6px 0 0; color: var(--ink-2); }
.walk-preview { position: relative; aspect-ratio: 4 / 3; background: #f1f4f7; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; overflow: hidden; }
.walk-preview img { width: 100%; height: 100%; object-fit: cover; }
.walk-preview .btn { position: absolute; bottom: 10px; right: 10px; }
.walk-badge { position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(15, 42, 68, .8); color: #fff; }
.walk-badge-done { background: var(--green); }
.walk-badge-failed { background: var(--red); }
.walk-shoot { margin-top: 0; cursor: pointer; }
.walk-nav { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; }
.vin-check { padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; background: var(--blue-soft); color: var(--navy-2); }
.vin-check.ok { background: var(--green-soft); color: var(--green); }
.vin-check.warn { background: var(--amber-soft); color: #7a4705; }
.vin-check.bad { background: var(--red-soft); color: var(--red); }
.walk-thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.walk-thumb { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 0 6px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; font: inherit; overflow: hidden; }
.walk-thumb.cur { border-color: var(--amber); }
.walk-thumb.done { border-color: var(--green); }
.walk-thumb.failed { border-color: var(--red); }
.walk-thumb-img { display: block; aspect-ratio: 4 / 3; background: #eef1f4 center / cover no-repeat; }
.walk-thumb-label { font-size: 12px; font-weight: 700; padding: 0 8px; color: var(--ink-2); }
.walk-thumb-state { position: absolute; top: 6px; right: 6px; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--green); }
.walk-thumb-state:empty { display: none; }
.walk-thumb.failed .walk-thumb-state { background: var(--red); }
.walk-extras { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.walk-extra { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 4px 10px; align-items: center; }
.walk-extra img { grid-row: span 3; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.walk-extra input { min-height: 36px; padding: 6px 8px; font-size: 14px; }
#videos video, .gallery-video video { width: 100%; border-radius: 10px; background: #000; margin-bottom: 8px; }
.upload-bar { height: 10px; border-radius: 5px; background: var(--line-2); overflow: hidden; margin: 8px 0; }
.upload-bar span { display: block; height: 100%; width: 0; background: var(--amber); transition: width .2s; }

.gallery-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gallery-head .h-section { margin-bottom: 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-bottom: 8px; }
.gallery-item { position: relative; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gallery-label { font-size: 12px; font-weight: 700; padding: 5px 8px 2px; }
.gallery-note { font-size: 11px; padding: 0 8px 6px; color: var(--red); font-weight: 600; }
.gallery-video { grid-column: span 2; }

@media (max-width: 900px) {
  .walk-grid { grid-template-columns: minmax(0, 1fr); }
  .walk-stage { grid-template-columns: minmax(0, 1fr); }
  .walk-diagram svg { max-width: 150px; }
  .walk-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .walk-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .walk-thumb-label { font-size: 10px; padding: 0 4px; }
  .walk-title { font-size: 26px; }
  .walk-diagram { display: none; }
}

@media (max-width: 640px) {
  .vin-row { flex-wrap: wrap; }
  .vin-row .vin-input { flex: 1 1 100%; }
  .vin-row .scan-btn { flex: 1 1 0; }
}

/* ---------------------------------------------------------- Update 7: parts quotes, print menu */
.pl-table { border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; margin: 6px 0 10px; background: #fff; }
.pl-head, .pl-row { display: grid; grid-template-columns: 110px minmax(150px, 1fr) 56px 84px 84px 190px 80px; gap: 6px; align-items: center; padding: 6px 8px; min-width: 820px; }
.pl-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.pl-row { border-bottom: 1px solid var(--line-2); }
.pl-row input, .pl-row select { min-height: 36px; padding: 5px 8px; font-size: 14px; }
.pl-avail { display: grid; grid-template-columns: 1fr 64px; gap: 4px; }
.pl-sell { font-weight: 700; text-align: right; }
.pl-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px; min-width: 820px; }
.pl-total strong { font-size: 17px; margin-left: 6px; }
.parts-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.parts-form select[name=job_id] { max-width: 420px; }
.reply-details summary { font-weight: 700; color: var(--navy-2); margin-top: 8px; }
.parts-lines { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: 13px; }
.parts-lines th { text-align: left; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.parts-lines td { padding: 5px 6px; border-bottom: 1px solid var(--line-2); }
.parts-lines .num { text-align: right; }
.job-breakdown { margin-top: 6px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.job-price { color: var(--ink); }
.job-edit { margin-top: 6px; }
.job-edit summary { font-size: 13px; font-weight: 700; color: var(--navy-2); }
.grid-edit { display: grid; grid-template-columns: minmax(0, 2fr) 110px 120px; gap: 8px; margin-top: 8px; }
.grid-edit .span-all { grid-column: 1 / -1; }
.job { grid-template-columns: minmax(0, 1fr) auto; }
.matrix-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.matrix-head, .matrix-row { display: grid; grid-template-columns: 170px 110px 1fr; gap: 10px; align-items: center; }
.matrix-head { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.matrix-row input { min-height: 38px; padding: 6px 10px; }
.print-menu { position: relative; }
.print-menu > summary { list-style: none; }
.print-menu > summary::before { display: none; }
.print-menu-list { position: absolute; z-index: 15; top: calc(100% + 6px); left: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 42, 68, .15); min-width: 260px; padding: 6px; display: flex; flex-direction: column; }
.print-menu-list a { display: flex; flex-direction: column; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 700; }
.print-menu-list a span { font-weight: 400; font-size: 12px; color: var(--ink-3); }
.print-menu-list a:hover { background: var(--blue-soft); }
@media (max-width: 640px) { .grid-edit { grid-template-columns: 1fr 1fr; } .grid-edit label:first-of-type { grid-column: 1 / -1; } }
/* tech time report */
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 760px; }
.tt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px 0; }
.tt-head .h-section { padding: 0; margin: 0; }
.tt-stats { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--ink-2); }
.eff-good { color: var(--green); }
.eff-low { color: var(--red); }
.tt-table td { padding: 7px 14px; }
.tt-day td { background: #f6f8fa; font-weight: 600; color: var(--ink-2); }
.tt-open td { background: var(--green-soft); }
.tt-long td { background: var(--red-soft); }
.tt-flagged { padding: 4px 18px 12px; }
.tt-flagged summary { font-weight: 700; color: var(--navy-2); margin-bottom: 4px; }
.print-only { display: none; }
@media print {
  .print-only { display: block; }
  .tt-print-head { font-size: 15px; margin-bottom: 10px; }
  .tt-tech { box-shadow: none; border: 1px solid #999; }
  .tt-tech + .tt-tech { break-before: page; }
  .tt-table td, .tt-table th { padding: 3px 8px; font-size: 11px; }
  .tt-table tr { break-inside: avoid; }
  .kpis-3 { margin-bottom: 10px; }
  .kpis-3 .kpi strong { font-size: 22px; }
  .tt-sign { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 24px; padding: 30px 18px 12px; }
  .tt-sign span { border-top: 1px solid #111; font-size: 10px; padding-top: 3px; }
  .kpis-3 .kpi { box-shadow: none; }
  .wrap { padding: 0; }
  .tt-table a { color: #111; text-decoration: none; }
  .viewas-bar { display: none !important; }
}

/* ---------------------------------------------------------- Update 8: dealer data imports + lookups */
.data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.data-card-head { display: flex; justify-content: space-between; align-items: baseline; }
.data-count { font-size: 15px; color: var(--ink-2); }
.data-count strong { font-family: var(--display); font-size: 28px; color: var(--ink); }
.upload-form { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.file-drop { display: block; border: 2px dashed var(--line); border-radius: 10px; padding: 16px; text-align: center; cursor: pointer; background: #f8fafb; }
.file-drop:hover { border-color: var(--navy-2); }
.file-drop input { min-height: 0; border: 0; padding: 0; background: none; width: 100%; margin-bottom: 8px; }
.file-drop-label { font-weight: 600; }
.data-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.right-gap { justify-content: flex-end; }
.map-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.req { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--amber-2); margin-left: 4px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.preview-table td { font-size: 13px; padding: 6px 10px; }
.map-mode { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
.map-mode .check-label { align-items: flex-start; font-weight: 400; }
.map-mode input { margin-top: 2px; }
/* type-ahead */
.lookup-pop { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 42, 68, .18); max-height: 320px; overflow-y: auto; min-width: 320px; }
.lookup-item { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: baseline; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.lookup-item:last-child { border-bottom: 0; }
.lookup-item.on, .lookup-item:hover { background: var(--blue-soft); }
.lookup-code { font-family: var(--mono); font-weight: 700; font-size: 13px; }
.lookup-desc { font-size: 14px; }
.lookup-meta { font-size: 12px; color: var(--ink-3); text-align: right; white-space: nowrap; }
.lookup-empty { padding: 10px 12px; color: var(--ink-3); font-size: 13px; }
.stock-out { color: var(--red); font-weight: 700; }
.stock-ok { color: var(--green); font-weight: 700; }
.pl-info { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); margin-top: -2px; }
.pl-info:empty { display: none; }
.op-chip { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; background: var(--line-2); border-radius: 4px; padding: 1px 6px; margin-right: 4px; vertical-align: 1px; }
@media (max-width: 900px) { .data-grid, .map-grid { grid-template-columns: minmax(0, 1fr); } }

/* ===================================================================== Update 9: inspection, customer approval */
.mpi-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--line); flex: none; }
.mpi-dot.r { background: var(--red); } .mpi-dot.y { background: #e0a100; } .mpi-dot.g { background: var(--green); }
.mpi-progress { position: sticky; top: 0; z-index: 5; padding: 12px 16px; }
.mpi-progress-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mpi-counts { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.mpi-counts .mpi-dot { margin-left: 6px; }
.mpi-bar { height: 6px; background: var(--line-2); border-radius: 99px; margin: 8px 0; overflow: hidden; }
.mpi-bar span { display: block; height: 100%; background: var(--green); transition: width .2s; }
.mpi-jump { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.mpi-jump a { white-space: nowrap; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--blue-soft); text-decoration: none; }
.mpi-done-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 8px; }
.mpi-section { padding: 14px 14px 6px; }
.mpi-item { border-top: 1px solid var(--line-2); padding: 10px 0 10px 10px; border-left: 4px solid transparent; transition: background .2s; }
.mpi-item.st-g { border-left-color: var(--green); } .mpi-item.st-y { border-left-color: #e0a100; background: #fffaf0; }
.mpi-item.st-r { border-left-color: var(--red); background: #fff6f5; } .mpi-item.st-na { border-left-color: var(--line); }
.mpi-item.saving { opacity: .75; } .mpi-item.saved { box-shadow: inset 0 0 0 2px var(--green-soft); } .mpi-item.save-failed { box-shadow: inset 0 0 0 2px var(--red); }
.mpi-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mpi-label { font-weight: 600; flex: 1 1 180px; }
.mpi-btns { display: inline-flex; border: 1px solid #c4ccd6; border-radius: 9px; overflow: hidden; flex: none; }
.st-btn { font: inherit; font-weight: 700; font-size: 14px; min-width: 56px; min-height: 44px; padding: 0 10px; border: 0; border-left: 1px solid #c4ccd6; background: #fff; color: var(--ink-2); cursor: pointer; }
.st-btn:first-child { border-left: 0; }
.st-btn.st-g.on { background: var(--green); color: #fff; } .st-btn.st-y.on { background: #e0a100; color: #fff; }
.st-btn.st-r.on { background: var(--red); color: #fff; } .st-btn.st-na.on { background: var(--ink-3); color: #fff; }
.st-btn:disabled { cursor: default; }
.mpi-measure { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.mpi-measure label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.mpi-measure input { width: 64px; min-height: 40px; text-align: center; font-size: 16px; }
.mpi-extra { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.mpi-extra textarea { width: 100%; }
.mpi-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.mpi-thumb { position: relative; display: inline-flex; width: 72px; height: 72px; border-radius: 6px; overflow: hidden; background: var(--line-2); align-items: center; justify-content: center; }
.mpi-thumb img { width: 72px; height: 72px; object-fit: cover; display: block; }
.mpi-thumb button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-weight: 700; cursor: pointer; line-height: 1; }
.mpi-tools { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.mpi-cam { cursor: pointer; }
.mpi-videos { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.mpi-video { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 360px; }
.mpi-video video { width: 100%; border-radius: 8px; background: #000; max-height: 240px; }
.mpi-preview { columns: 2 260px; column-gap: 24px; }
.mpi-preview > div { break-inside: avoid; margin-bottom: 14px; }
.mpi-preview ul { margin: 6px 0 0; padding-left: 18px; }
.mpi-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.cs-chip { font-size: 13px; padding: 3px 10px; border-radius: 99px; font-weight: 600; }
.cs-chip.r { background: var(--red-soft); color: var(--red); } .cs-chip.y { background: var(--amber-soft); color: #8a5a00; } .cs-chip.g { background: var(--green-soft); color: var(--green); }
.mpi-flagged { list-style: none; margin: 0; padding: 0; }
.mpi-flagged li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line-2); }
.mpi-flagged li > div { flex: 1; }
.mpi-flagged .mpi-dot { margin-top: 5px; }
.mpi-flagged .mpi-thumb, .mpi-flagged .mpi-thumb img { width: 56px; height: 56px; }
.next-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--navy-2); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.next-text { display: flex; flex-direction: column; gap: 2px; }
.next-text strong { font-size: 17px; }
.stage-edge-in_progress { border-left-color: var(--green); } .stage-edge-waiting_parts, .stage-edge-waiting_approval { border-left-color: var(--amber); }
.stage-edge-work_complete, .stage-edge-ready { border-left-color: var(--green); } .stage-edge-closed { border-left-color: var(--ink-3); }
.send-card { border-top: 4px solid var(--amber); }
.send-status { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.send-row { margin: 8px 0; }
.send-form { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.warn-text { color: #9a5a06; }
.approvals { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; }

/* customer page */
.cust { background: #eef1f4; }
.cust-preview-bar { background: var(--navy); color: #fff; padding: 10px 16px; font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; position: sticky; top: 0; z-index: 10; }
.cust-preview-bar a { color: #ffd59a; }
.cust-wrap { max-width: 720px; margin: 0 auto; padding: 14px 16px 40px; }
.cust-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0 14px; border-bottom: 3px solid var(--navy); margin-bottom: 14px; }
.cust-dealer { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; }
.cust-dealer-sub { color: var(--ink-3); font-size: 13px; }
.cust-hero { margin-bottom: 14px; }
.cust-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.cs { border-radius: 10px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; }
.cs strong { font-family: var(--display); font-size: 34px; line-height: 1; }
.cs span { font-size: 13px; font-weight: 600; }
.cs-r { background: var(--red-soft); color: var(--red); } .cs-y { background: var(--amber-soft); color: #8a5a00; } .cs-g { background: var(--green-soft); color: var(--green); }
.cust-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.cust-card > summary { cursor: pointer; margin: 0; }
.cust-video { width: 100%; border-radius: 10px; background: #000; max-height: 420px; margin-top: 4px; }
.cust-item { padding: 12px 0; border-top: 1px solid var(--line-2); }
.cust-item:first-of-type { border-top: 0; }
.cust-item-head { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.cust-badge { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; flex: none; }
.cust-badge-r { background: var(--red); color: #fff; } .cust-badge-y { background: #e0a100; color: #fff; } .cust-badge-g { background: var(--green); color: #fff; }
.cust-measure { font-size: 14px; color: var(--ink-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.cust-note { margin: 6px 0 0; }
.cust-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.cust-photos img { width: 104px; height: 104px; object-fit: cover; border-radius: 8px; display: block; }
.cust-good { list-style: none; padding: 0; margin: 8px 0 0; columns: 2 220px; }
.cust-good li { padding: 3px 0; break-inside: avoid; }
.cust-job { border: 2px solid var(--line); border-radius: 10px; padding: 12px; transition: border-color .15s, background .15s; }
.cust-job.chosen-yes { border-color: var(--green); background: #f4fbf6; } .cust-job.chosen-no { border-color: var(--line); background: #f7f8fa; }
.cust-job-top { display: flex; justify-content: space-between; gap: 12px; }
.cust-job-top strong { font-size: 17px; margin-right: 6px; }
.cust-price { font-family: var(--display); font-weight: 700; font-size: 22px; white-space: nowrap; }
.cust-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cust-choice label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid #c4ccd6; border-radius: 8px; font-weight: 700; cursor: pointer; background: #fff; }
.cust-choice input { width: 20px; height: 20px; accent-color: var(--green); }
.cust-yes:has(input:checked) { background: var(--green); color: #fff; border-color: var(--green); }
.cust-no:has(input:checked) { background: var(--ink-3); color: #fff; border-color: var(--ink-3); }
.cust-total { border-top: 2px solid var(--navy); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.cust-total > div { display: flex; justify-content: space-between; }
.cust-total .grand { font-family: var(--display); font-weight: 700; font-size: 24px; }
.sig-pad { display: block; width: 100%; height: 140px; border: 1px dashed #9aa6b4; border-radius: 8px; background: #fbfcfd; touch-action: none; margin-top: 4px; }
.cust-agree { align-items: flex-start; font-size: 14px; }
.cust-list { list-style: none; padding: 0; margin: 0; }
.cust-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.cust-list li:first-child { border-top: 0; }
.cust-thanks { text-align: center; font-weight: 600; color: var(--green); }
.cust-foot { text-align: center; color: var(--ink-2); font-size: 14px; margin-top: 24px; }
@media (max-width: 560px) {
  .mpi-btns { width: 100%; } .st-btn { flex: 1; min-width: 0; }
  .next-card { flex-direction: column; align-items: stretch; } .next-actions .btn, .next-actions form, .next-actions form .btn { width: 100%; }
  .cust-dealer { font-size: 20px; } .cs strong { font-size: 28px; }
}
@media print { .cust-preview-bar, .sig-pad, #sigClear { display: none; } }

/* Update 9: customers approve menus online */
.pkg-pick { cursor: pointer; position: relative; }
.pkg-pick:hover { border-color: var(--navy-2); }
.pkg.chosen { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.pkg-radio { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; min-height: 46px; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 700; }
.pkg-radio input { width: 20px; height: 20px; accent-color: var(--green); }
.pkg.chosen .pkg-radio { background: var(--green); }
.pkg-approved { margin-top: 12px; text-align: center; font-weight: 800; color: var(--green); background: var(--green-soft); border-radius: 8px; padding: 10px; }
.pkg-clear { text-align: center; margin: 4px 0 0; }
.explain-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.explain-check input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.explain-row.picked { background: var(--green-soft); border-radius: 8px; }
.in-pkg { color: var(--green); font-weight: 700; margin-left: 8px; }
.menu-approve { margin-top: 18px; padding: 16px; border: 2px solid var(--navy); border-radius: 12px; display: flex; flex-direction: column; gap: 12px; }
.menu-approve-total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-size: 22px; font-weight: 700; }
.approved-box { margin: 14px 0; padding: 14px 16px; border-radius: 12px; background: var(--green-soft); }
.approved-box ul { list-style: none; margin: 0; padding: 0; }
.approved-box li { display: flex; justify-content: space-between; padding: 4px 0; font-weight: 600; }
.approved-save { color: var(--green); font-weight: 700; text-align: right; }
.pkg.chosen .pkg-radio input { accent-color: #fff; }
.cust-greens.with-photos .cust-good { columns: 1; }

/* ===================================================================== Update 10: onboarding & settings permissions */
.lock-badge { display: inline-block; font-family: var(--body); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); vertical-align: middle; }
.lock-badge.open { background: var(--green-soft); color: var(--green); }
.lock-note { font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
fieldset.set-group { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
fieldset.set-group[disabled] { opacity: .62; }
fieldset.set-group[disabled] .lock-badge { opacity: 1; }
.hrs-in { width: 64px; text-align: right; }
.changed-in { background: var(--amber-soft); }
.sugg-diff { color: #b25f00 !important; font-weight: 700; }
.bulk-card summary { cursor: pointer; margin: 0; }
.bulk-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; margin-top: 10px; }
.setup-meter { display: inline-block; width: 70px; height: 7px; border-radius: 99px; background: var(--line-2); overflow: hidden; vertical-align: middle; }
.setup-meter span { display: block; height: 100%; background: var(--green); }
.setup-progress-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.setup-steps { list-style: none; margin: 0; padding: 0; }
.setup-step { display: flex; gap: 14px; }
.setup-step.done { background: #fbfdfb; }
.setup-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.setup-step.done .setup-num { background: var(--green); }
.setup-body { flex: 1; min-width: 0; }
.setup-explain { margin: 0 0 10px; color: var(--ink-2); max-width: 780px; }
.setup-actions { align-items: center; }
.lock-summary { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 4px; }
.lock-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.lock-row input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--green); }
.setup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.setup-grid .card { margin: 0; }
.set-list { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 8px; font-size: 14px; }
.set-list dt { color: var(--ink-3); font-weight: 600; }
.set-list dd { margin: 0; font-weight: 600; }
.set-why { font-size: 13px; color: var(--ink-2); margin: 6px 0 0; }
.seg-wrap { flex-wrap: wrap; margin-bottom: 12px; }
.change-table td { vertical-align: top; }
.pricing-table input:disabled, .pricing-table select:disabled, fieldset.set-group[disabled] input, fieldset.set-group[disabled] select, fieldset.set-group[disabled] textarea { background: var(--line-2); color: var(--ink-3); border-color: transparent; cursor: not-allowed; }
.lock-badge { white-space: nowrap; }
.lock-badge.owner { background: var(--blue-soft); color: var(--navy-2); }
.request-card { margin-top: 16px; }
.form-card input:disabled, .form-card select:disabled, .form-card textarea:disabled { background: var(--line-2); color: var(--ink-3); border-color: transparent; cursor: not-allowed; }

/* ---- Update 11: spiff report */
.kpis-spiff { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.spiff-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.spiff-head .h-section { margin: 0; }
.pay-bar { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px; border-radius: 8px; background: var(--blue-soft); }
.pay-bar .pay-fields { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.pay-bar input[type=date], .pay-bar input[name=pay_period] { width: auto; min-height: 36px; padding: 5px 8px; font-size: 14px; }
.pay-bar input[name=pay_period] { width: 220px; }
.check-inline { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 14px; }
.pick-col { width: 34px; }
.spiff-table .row-paid td { color: var(--ink-3); }
.sort-th { cursor: pointer; user-select: none; white-space: nowrap; }
.sort-th::after { content: " ↕"; opacity: .35; font-size: 11px; }
.sort-th.asc::after { content: " ↑"; opacity: 1; }
.sort-th.desc::after { content: " ↓"; opacity: 1; }
.pill-role-advisor { background: var(--blue-soft); color: var(--navy-2); }
.pill-role-tech { background: #efe9f7; color: #5b3a8c; }
.spiff-group { margin-bottom: 18px; }
.spiff-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 2px solid var(--line-2); }
.spiff-group-head h3 { margin: 0; font-size: 17px; }
.spiff-found-head { margin-top: 22px; }
.spiff-search { margin-top: 16px; }
.spiff-search .filters input[name=q] { width: 360px; max-width: 100%; }
@media (max-width: 900px) { .kpis-spiff { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pay-bar .pay-fields { margin-left: 0; } }
@media print { .kpis-spiff .kpi { box-shadow: none; } }
.spiff-filters + .quick-ranges { margin-top: 10px; }
.spiff-group-head { padding-left: 18px; padding-right: 18px; }
.card-note { padding: 0 18px; }

/* ---- Update 12: appointments */
.appt-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 16px; }
.appt-nav .filters { margin-right: auto; }
.appt-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi small { font-size: 60%; color: var(--ink-3); font-weight: 600; }
.kpi-warn { box-shadow: inset 0 0 0 2px var(--amber); }
.appt-day { padding: 0; }
.appt-slot { display: grid; grid-template-columns: 116px 1fr; border-top: 1px solid var(--line-2); min-height: 48px; }
.appt-slot:first-child { border-top: 0; }
.appt-slot.is-past { background: #f7f8fa; }
.appt-slot.is-past .appt-time strong { color: var(--ink-3); }
.appt-time { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line-2); }
.appt-time strong { font-family: var(--display); font-size: 19px; letter-spacing: .01em; }
.slot-meter { display: inline-flex; gap: 3px; }
.slot-meter i { width: 10px; height: 6px; border-radius: 2px; background: var(--line); }
.slot-meter i.on { background: var(--navy-2); }
.appt-slot.is-full .slot-meter i.on { background: var(--amber); }
.appt-list { padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.appt-card { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--navy-2); border-radius: 8px; background: #fff; }
.appt-card.st-confirmed { border-left-color: var(--green); }
.appt-card.st-arrived { border-left-color: var(--amber); background: var(--amber-soft); }
.appt-card.st-no_show, .appt-card.st-cancelled { border-left-color: var(--line); opacity: .6; }
.appt-card.st-cancelled .appt-line1 strong { text-decoration: line-through; }
.appt-main { flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.appt-main:hover strong { text-decoration: underline; }
.appt-line1 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.appt-line2 { font-size: 14px; color: var(--ink-2); }
.appt-concern { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.appt-side { display: flex; gap: 10px; align-items: flex-start; flex: none; }
.appt-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.appt-more { display: flex; gap: 12px; font-size: 13px; }
.appt-add { align-self: flex-start; font-size: 14px; font-weight: 600; text-decoration: none; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 8px; color: var(--navy-2); }
.appt-add:hover { border-color: var(--navy-2); background: var(--blue-soft); }
.appt-empty { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.pill-tr-waiter { background: #fde8e6; color: var(--red); }
.pill-tr-loaner, .pill-tr-rental { background: #efe9f7; color: #5b3a8c; }
.pill-tr-shuttle { background: var(--blue-soft); color: var(--navy-2); }
.pill-st-confirmed { background: var(--green-soft); color: var(--green); }
.pill-st-arrived { background: var(--amber); color: #fff; }
.pill-st-no_show, .pill-st-cancelled { background: var(--line-2); color: var(--ink-3); }
.plain-list { list-style: none; margin: 0; padding: 0 18px 12px; display: flex; flex-direction: column; gap: 6px; }
.appt-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.appt-wday { padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 220px; }
.appt-wday.is-today { box-shadow: inset 0 0 0 2px var(--amber); }
.appt-wday.is-closed { background: #f5f6f8; }
.wday-head { display: flex; justify-content: space-between; align-items: baseline; text-decoration: none; color: var(--ink); }
.wday-name { font-family: var(--display); font-size: 20px; font-weight: 700; }
.wday-date { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.wday-load { display: flex; flex-direction: column; gap: 4px; }
.wday-bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.wday-bar i { display: block; height: 100%; background: var(--navy-2); }
.wday-bar i.warm { background: var(--amber); }
.wday-bar i.hot { background: var(--red); }
.wday-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.wday-list a { text-decoration: none; color: var(--ink); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wday-list a:hover { text-decoration: underline; }
.wday-list .t { font-weight: 700; color: var(--ink-2); }
.wday-list .st-confirmed a::before { content: "✓ "; color: var(--green); }
.wday-list .st-no_show a { color: var(--ink-3); text-decoration: line-through; }
.appt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.appt-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.appt-when { position: sticky; top: 12px; }
.slot-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 340px; overflow-y: auto; }
.slot-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); }
.slot-btn strong { font-size: 14px; }
.slot-btn span { font-size: 11px; color: var(--green); font-weight: 600; }
.slot-btn.full span { color: var(--red); }
.slot-btn.full, .slot-btn.past { background: #f5f6f8; color: var(--ink-3); }
.slot-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.slot-btn.on span { color: #cfe0f1; }
.chip-radio { display: flex; flex-wrap: wrap; gap: 6px; font-weight: 500; }
.chip-radio label { cursor: pointer; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; background: #fff; }
.chip-radio input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip-radio input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.warn-box { padding: 12px 14px; border-radius: 8px; background: var(--amber-soft); color: #7a4705; display: flex; flex-direction: column; gap: 6px; }
.warn-box ul { margin: 0; padding-left: 18px; }
.appt-status-row { margin-top: 14px; }
.btn-danger-ghost { background: #fff; border: 1px solid var(--line); color: var(--red); }
.appt-banner { padding: 10px 12px; margin-bottom: 12px; border-radius: 8px; background: var(--amber-soft); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.hours-table input[type=time] { width: auto; min-height: 38px; }
.appt-setup .card + .card { margin-top: 16px; }
.import-card { max-width: 640px; }
@media (max-width: 1100px) { .appt-week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .appt-grid { grid-template-columns: 1fr; }
  .appt-when { position: static; order: -1; }
  .appt-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .appt-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .appt-slot { grid-template-columns: 1fr; }
  .appt-time { flex-direction: row; justify-content: space-between; align-items: center; border-right: 0; padding: 10px 12px 0; }
  .appt-card { flex-direction: column; }
  .appt-side { width: 100%; justify-content: space-between; }
  .appt-actions { align-items: flex-start; }
  .appt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appt-week { grid-template-columns: 1fr; }
  .appt-wday { min-height: 0; }
}
.over-note { font-size: 11px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 1500px) and (min-width: 901px) { .mainnav a { padding: 9px 8px; } }

/* ---- Update 14: presell queue */
.h-sub { font-size: .55em; font-weight: 600; letter-spacing: 0; }
.presell-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi-good strong { color: var(--green); }
.presell-row { display: grid; grid-template-columns: 112px minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .95fr); gap: 18px; padding: 16px 18px; margin-bottom: 10px; border-left: 5px solid var(--line); scroll-margin-top: 80px; }
.presell-row.ps-presold { border-left-color: var(--green); }
.presell-row.ps-left_message { border-left-color: var(--amber); }
.presell-row.ps-declined, .presell-row.ps-nothing_due { border-left-color: var(--ink-3); }
.presell-row.is-done { opacity: .62; }
.presell-row:target { box-shadow: 0 0 0 3px var(--amber); }
.ps-when { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ps-when strong { font-family: var(--display); font-size: 21px; }
.ps-who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ps-name { font-size: 17px; font-weight: 700; color: var(--ink); text-decoration: none; }
.ps-name:hover { text-decoration: underline; }
.ps-phone { font-weight: 600; font-size: 15px; }
.ps-veh, .ps-miles { font-size: 14px; color: var(--ink-2); }
.ps-label { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-right: 4px; }
.ps-concern { font-size: 14px; margin-top: 4px; }
.ps-prev { font-size: 14px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.ps-declined { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; font-size: 13px; }
.ps-declined span { padding: 2px 8px; border-radius: 99px; background: #fde8e6; color: #8a2a1f; }
.ps-menu { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ps-menu-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ps-sold { padding: 6px 10px; border-radius: 8px; background: var(--green-soft); color: var(--green); font-size: 15px; }
.ps-due { list-style: none; margin: 0; padding: 0; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.ps-due li { display: flex; justify-content: space-between; gap: 10px; }
.ps-due li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-build { display: flex; flex-direction: column; gap: 8px; }
.ps-build input { min-height: 38px; padding: 6px 10px; font-size: 15px; }
.ps-build-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-status { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ps-status-form { display: flex; flex-direction: column; gap: 8px; }
.ps-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ps-chip { font: inherit; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.ps-chip:hover { border-color: var(--navy-2); }
.ps-chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.ps-presold .ps-chip.on { background: var(--green); border-color: var(--green); }
.ps-left_message .ps-chip.on { background: var(--amber); border-color: var(--amber); }
.ps-status-form input[name=note] { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.pill-est { background: var(--amber-soft); color: #7a4705; }
.pill-ps-presold { background: var(--green-soft); color: var(--green); }
.pill-ps-left_message { background: var(--amber-soft); color: #7a4705; }
.pill-ps-declined, .pill-ps-nothing_due { background: var(--line-2); color: var(--ink-3); }
.presell-banner { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; padding: 12px 16px; margin-bottom: 16px; border-radius: 10px; background: var(--blue-soft); }
.presell-banner.is-est { background: var(--amber-soft); }
.presell-miles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.presell-miles input { width: 140px; min-height: 36px; padding: 5px 10px; }
@media (max-width: 1100px) {
  .presell-row { grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr); }
  .ps-status { grid-column: 2 / -1; }
  .presell-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .presell-row { grid-template-columns: 1fr; gap: 12px; }
  .ps-when { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .ps-status { grid-column: auto; }
  .presell-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===================================================================== Update 15: time clock, pay, gross profit */
.nav-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c4ccd6; margin-left: 6px; vertical-align: middle; }
.nav-dot.is-on { background: var(--green); box-shadow: 0 0 0 3px rgba(22, 128, 61, .18); }
.tc-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; }
.tc-card.tc-on { background: var(--green-soft); border-color: transparent; }
.tc-status { display: flex; align-items: center; gap: 14px; }
.tc-label { font-family: var(--display); font-size: 28px; font-weight: 700; }
.tc-on .tc-label { color: var(--green); }
.tc-sub { color: var(--ink-2); font-weight: 500; }
.tc-btn { min-width: 200px; min-height: 64px; font-size: 22px; font-family: var(--display); }
.tc-grid, .tm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tm-grid { grid-template-columns: minmax(0, 1fr) 320px; }
.tc-today td { font-weight: 700; }
.tm-table input[type=datetime-local] { min-height: 36px; padding: 4px 8px; font-size: 14px; }
.tm-table .small-in { width: 170px; }
.tm-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.shift-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }
.shift-strip.is-on { background: #fff; border: 1px solid var(--line); }
.shift-strip.is-off { background: var(--amber-soft); color: #7a4705; }
.pay-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pay-form select, .pay-form input[type=date] { min-height: 36px; padding: 4px 8px; font-size: 14px; }
.pay-form .pay-rate { width: 90px; }
.pay-hist { margin: 6px 0 0; padding-left: 16px; }
form.inline { display: inline; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.table-scroll { overflow-x: auto; }
.gp-table th, .gp-table td { white-space: nowrap; }
.gp-sum td:first-child { width: 46%; }
.gp-sub td { color: var(--ink-3); font-size: 13px; padding-top: 0; border-top: 0; }
.gp-total td { border-top: 2px solid var(--line); }
.gp-good { color: var(--green); }
.gp-low { color: #b45309; }
.gp-neg { color: var(--red); }
.kpi-hero { border-color: var(--navy); }
.gp-warn { margin-bottom: 10px; }
.gp-notes p { margin: 6px 0; }
.pad { padding: 0 18px 14px; }
@media (max-width: 900px) {
  .tc-grid, .tm-grid { grid-template-columns: minmax(0, 1fr); }
  .tc-card { flex-direction: column; align-items: stretch; }
  .tc-btn { width: 100%; }
}
@media print { .gp-table th, .gp-table td { font-size: 10px; padding: 3px 4px; } .table-scroll { overflow: visible; } }
.tc-on .tc-status { color: var(--green); }
.kpi strong span { display: inline; font-size: inherit; font-weight: inherit; letter-spacing: 0; text-transform: none; color: inherit; }
.kpi strong span.gp-good { color: var(--green); }
.kpi strong span.gp-low { color: #b45309; }
.kpi strong span.gp-neg { color: var(--red); }

/* ===================================================================== Update 16: factory schedule */
.oem-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e8eef7; color: var(--navy-2); white-space: nowrap; }
.oem-card .h-section { margin-bottom: 6px; }
.oem-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin: 14px 0 6px; }
.oem-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.oem-list .pill { min-width: 44px; text-align: center; }
.oem-picks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.oem-map input[name=keywords] { width: 100%; }

/* Update 17: plan page */
.plan-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; }
.plan-opt input { margin-top: 4px; flex: none; width: auto; }
.plan-opt span { display: flex; flex-direction: column; gap: 2px; }
.plan-opt:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: var(--blue-soft); }
.plan-live .pill { margin: 2px 2px 2px 0; }

/* Update 18: service video button, PetraLife badge and their popups */
.svc-extras { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.svc-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--navy); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.svc-btn:hover { border-color: var(--navy); }
.svc-play { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 9px; padding-left: 2px; }
.pl-badge { background: var(--navy); color: #fff; border-color: var(--navy); letter-spacing: .02em; }
.pl-badge sup { font-size: 8px; }
.pkg-items .svc-extras { margin-left: 22px; }
.pl-print { display: none; }
.svc-dialog { border: 0; border-radius: 14px; padding: 0; width: min(720px, 94vw); max-height: 92vh; background: #fff; color: var(--ink); box-shadow: 0 20px 60px rgba(8, 18, 30, .35); }
.svc-dialog::backdrop { background: rgba(8, 18, 30, .7); }
.svc-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--navy); color: #fff; font-size: 16px; }
.svc-dialog-head sup { font-size: 9px; }
.svc-close { border: 0; background: transparent; color: #fff; font-size: 20px; line-height: 1; min-width: 40px; min-height: 40px; cursor: pointer; }
.svc-dialog-video { width: min(960px, 96vw); background: #000; }
.svc-dialog-video video { display: block; width: 100%; max-height: 78vh; background: #000; }
.svc-dialog-pl { width: min(560px, 94vw); }
.pl-body { padding: 16px 18px 4px; }
.pl-body h3 { margin: 0 0 8px; font-size: 20px; }
.pl-level { margin: 0 0 12px; font-size: 15px; line-height: 1.45; }
.pl-chip { display: inline-block; margin-right: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #e8eef7; color: var(--navy); }
.pl-chip.pl-gold { background: #f6ecc8; color: #6b5200; }
.pl-body dl { margin: 0; }
.pl-body dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-top: 10px; }
.pl-body dd { margin: 2px 0 0; font-size: 14px; line-height: 1.45; }
.pl-fine { margin: 14px 18px 16px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.svc-video-preview { display: block; width: min(480px, 100%); border-radius: 10px; background: #000; margin-bottom: 6px; }
.svc-video-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.svc-video-progress .bar { flex: 1; max-width: 320px; height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.svc-video-progress .bar span { display: block; height: 100%; width: 0; background: var(--navy); transition: width .2s; }
.svc-video-progress .err { color: #b3261e; font-weight: 600; }
@media print { .pl-print { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid #333; border-radius: 999px; font-size: 10px; font-weight: 700; } }

/* Update 19: several videos per service */
.svc-video-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; background: #0b1622; color: #fff; font-size: 14px; }
.svc-nav-btn { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.svc-nav-btn:disabled { opacity: .35; cursor: default; }
.svc-video-row { display: flex; flex-wrap: wrap; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.svc-video-row .svc-video-preview { width: min(300px, 100%); margin: 0; aspect-ratio: 16 / 9; }
.svc-video-meta { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 8px; }
.svc-video-title { display: flex; gap: 8px; align-items: flex-end; }
.svc-video-title label { flex: 1; }

/* Update 20: DMS Connect (DealerVault) */
.dms-warn { background: var(--amber-soft); border-color: var(--amber); margin-bottom: 14px; }
.dms-kpis .kpi-small { font-size: 22px; }
.dms-cov td { vertical-align: top; }
.dms-hist select { width: auto; min-width: 120px; }
.dms-unmatched td { background: #fff8ec; }
.dms-lines-row td { border-top: 0; padding-top: 0; }
.dms-line { font-size: 14px; line-height: 1.4; padding: 2px 0; }
.dms-line .mono { display: inline-block; min-width: 64px; color: var(--ink-2); font-weight: 600; }
.dms-line .pill { margin-left: 4px; }
.dms-line.is-rec { color: #9a5a06; }
.dms-history .dms-visit { padding: 10px 0; border-top: 1px solid var(--line-2); }
.dms-history .dms-visit:first-of-type { border-top: 0; }
.dms-visit-head { font-size: 14px; margin-bottom: 4px; }
.dms-visit-head .pill { margin-left: 6px; }

/* Update 20: build-a-demo form on Dealers */
.demo-build { position: relative; }
.demo-build > summary { list-style: none; cursor: pointer; }
.demo-build > summary::-webkit-details-marker { display: none; }
.demo-build-card { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; z-index: 30; box-shadow: 0 12px 32px rgba(15, 28, 46, .18); }

/* Update 21: Help / How-to guides */
.help-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.55); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; margin-right: 6px; }
.help-btn:hover, .help-btn.on { background: #fff; color: var(--navy, #12233d); }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.help-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: #fff; border: 1px solid var(--line-2, #e3e7ee);
  border-radius: 12px; text-decoration: none; color: inherit; }
.help-card:hover { border-color: var(--orange, #e8890c); box-shadow: 0 4px 14px rgba(15, 28, 46, .08); }
.help-card strong { font-size: 16px; }
.help-meta { font-size: 13px; color: var(--ink-2, #4a5568); }
.help-group { margin: 22px 0; }
.help-here { margin-bottom: 8px; }
.help-list { margin: 0; padding-left: 0; list-style: none; counter-reset: hstep; }
.help-list li { counter-increment: hstep; position: relative; padding: 4px 0 18px 52px; }
.help-list li::before { content: counter(hstep); position: absolute; left: 0; top: 2px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy, #12233d); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.help-list li + li { border-top: 1px solid var(--line-2, #e3e7ee); padding-top: 16px; }
.help-list li + li::before { top: 14px; }
.help-step-title { font-size: 18px; margin: 4px 0 6px; }
.help-list p { margin: 0; line-height: 1.55; max-width: 78ch; }
.help-go { display: inline-block; margin-left: 4px; font-weight: 600; white-space: nowrap; }
.setup-actions .help-go { margin-left: 8px; }
.help-tips ul { margin: 0; padding-left: 20px; line-height: 1.55; }
.help-print-foot { display: none; }
@media print {
  .help-steps, .help-tips { box-shadow: none; border: 0; padding: 0; }
  .help-go { display: none; }
  .help-list li::before { background: #000; }
  .help-print-foot { display: block; margin-top: 18px; }
}

/* Update 22: dealer's own address */
.site-input { display: flex; align-items: center; gap: 6px; }
.site-input input { max-width: 240px; }

/* Update 23: Stride Drive brand */
.login-logo { display: block; width: 260px; max-width: 100%; height: auto; margin: 0 0 22px; }
.login-dealer { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-dealer strong { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.1; display: block; }
.powered { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); text-decoration: none; }
.powered img { width: 16px; height: 16px; }
.powered b { font-family: var(--display); font-weight: 800; letter-spacing: .08em; color: var(--navy); }
/* Update 23: menu bar - the links get their own row on laptop-size screens instead of scrolling off */
.mainnav a { font-size: 15px; }
@media (max-width: 1440px) and (min-width: 901px) {
  .topbar { flex-wrap: wrap; row-gap: 4px; padding-bottom: 4px; }
  .mainnav { order: 3; flex-basis: 100%; margin: 0 -8px; }
  .topbar-right { margin-left: auto; }
}
