/* DoorTrack design system: clean and quiet, like the money apps contractors already know.
   The phone's own font. Sentence case everywhere; bold only for names and amounts. Tap targets 48px+.
   Each company's color (--accent) and top bar (--top) come from Company setup. */
:root {
  --ink: #16181D; --paper: #F5F6F8; --card: #FFFFFF; --line: #E7E8EC; --edge: #CDD0D6; --muted: #60646C; --faint: #8A8E96;
  --accent: #E8650A; --accent-soft: #FDEEE3; --on-accent: #FFFFFF; --accent-ink: #B4500A; --top: #FFFFFF; --on-top: #16181D; --top-muted: #60646C;
  --ok: #1E7F3C; --ok-soft: #E8F5EC; --warn: #9A5B00; --warn-soft: #FFF4E0;
  --bad: #C5221F; --bad-soft: #FCECEB; --blue: #1F6FB2; --purple: #7A4BB0;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --r: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.45 var(--font); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
a { color: var(--ink); }
svg.i { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Header: logo left, title in the middle, back on the left when there's somewhere to go back to. */
.top { background: var(--top); color: var(--on-top); padding: calc(10px + env(safe-area-inset-top)) 12px 10px; position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); }
.top-in { max-width: 720px; margin: 0 auto; display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px; min-height: 48px; }
.top-in > .back, .top-in > .brandlogo { grid-column: 1; grid-row: 1; justify-self: start; }
.top-in > div { grid-column: 2; grid-row: 1; text-align: center; min-width: 0; }
.eyebrow { display: block; font-size: 12px; font-weight: 500; color: var(--top-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h1 { margin: 0; font: 700 18px/1.2 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h2 { margin: 0; font: 700 18px/1.25 var(--font); }
.back { background: none; border: 0; color: var(--on-top); min-width: 44px; min-height: 44px; padding: 0; border-radius: 999px; font-size: 30px; font-weight: 400; line-height: 1; }

main { padding: 16px; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid3 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.muted { color: var(--muted); font-size: 14px; margin: 0; }
.small { font-size: 13px; }
.label { font-size: 14px; font-weight: 600; color: var(--muted); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
input, select, textarea { font: 400 17px var(--font); color: var(--ink); background: #FFFFFF; border: 1px solid var(--edge); border-radius: 10px; padding: 12px; min-height: 48px; width: 100%; }
textarea { min-height: 96px; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.missing { border-color: var(--accent); background: #FFFDFB; }

/* Buttons: sentence case, rounded. */
button, .btn { font: 600 16px var(--font); min-height: 48px; border-radius: 12px; padding: 0 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.primary { background: var(--ink); color: #FFFFFF; border: 0; }
.accent { background: var(--accent); color: var(--on-accent); border: 0; }
.ghost { background: #FFFFFF; color: var(--ink); border: 1px solid var(--edge); }
.wide { width: 100%; }
.big { min-height: 56px; font-size: 17px; }
button:disabled { opacity: .45; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; background: #FFFFFF; color: var(--ink); border: 1px solid var(--edge); font-weight: 500; border-radius: 999px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }

/* Lists: rows with hairlines, like an invoice list. */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: none; width: 100%; text-align: left; font: inherit; color: inherit; min-height: 56px; border-radius: 0; cursor: pointer; }
.list .item:first-child { border-top: 0; }
.item > span:first-child { min-width: 0; flex: 1 1 auto; }
.card > .label + .item, .card > .item:first-child { border-top: 0; }
.item strong { display: block; font-weight: 600; }
.item small { display: block; color: var(--muted); font-size: 13px; }
.when { flex: none; text-align: right; font-weight: 600; font-size: 14px; }

/* Pills */
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.p-service { background: #E7F0F9; color: var(--blue); } .p-install { background: var(--accent-soft); color: var(--accent-ink); }
.p-check { background: #F1EBF8; color: var(--purple); } .p-ok { background: var(--ok-soft); color: var(--ok); }
.p-warn { background: var(--warn-soft); color: var(--warn); } .p-bad { background: var(--bad-soft); color: var(--bad); }
.p-neutral { background: #EEEFF2; color: var(--muted); }

/* Calendar */
.cal-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 8px; align-items: center; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month .dow { font-size: 12px; font-weight: 500; color: var(--muted); text-align: center; }
.month button { min-height: 52px; padding: 4px 2px; flex-direction: column; gap: 2px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; font-weight: 500; }
.month button.other { color: #A0A09A; background: #FAFAF8; }
.month button.today { border: 2px solid var(--accent); }
.month button[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.dots { display: flex; gap: 2px; justify-content: center; min-height: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: block; }
.dots i.s { background: var(--blue); } .dots i.c { background: var(--purple); }
.dayhead { font-size: 14px; font-weight: 600; color: var(--muted); padding-top: 4px; }
.dayhead.is-today { color: var(--accent-ink); }

/* Bottom bar: icon over a short word, five at most. One round + for new work. */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: #FFFFFF; border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabs a { min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font: 500 11.5px var(--font); border-radius: 12px; margin: 0 2px; text-align: center; line-height: 1.1; }
.tabs a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); font-weight: 700; }
.fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 7; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 999px; width: 60px; height: 60px; min-height: 0; padding: 0; box-shadow: 0 6px 16px rgba(0,0,0,.22); }
.fab svg.i { width: 30px; height: 30px; stroke-width: 2.2; }
.sheet-bg { position: fixed; inset: 0; z-index: 30; background: rgba(22,24,29,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #FFFFFF; width: 100%; max-width: 560px; border-radius: 18px 18px 0 0; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--edge); margin: 2px auto 10px; }
.sheet a, .sheet button.item { display: flex; align-items: center; gap: 14px; min-height: 60px; text-decoration: none; color: var(--ink); font-size: 17px; font-weight: 500; border-top: 1px solid var(--line); justify-content: flex-start; }
.sheet a:first-of-type { border-top: 0; }
.sheet .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }

/* Money: Estimates, Invoices, Paid */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-bottom: 1px solid var(--line); margin: -16px -16px 0; background: var(--top); position: sticky; top: calc(69px + env(safe-area-inset-top)); z-index: 4; }
.seg a { text-align: center; padding: 12px 4px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; }
.seg a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.moneyrow { display: block; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.list .moneyrow:first-child { border-top: 0; }
.moneyrow .meta { font-size: 13px; color: var(--faint); }
.moneyrow .main { display: flex; justify-content: space-between; gap: 10px; font-size: 17px; font-weight: 600; margin: 2px 0; }
.moneyrow .main span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moneyrow .sub { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--muted); }
.st-bad { color: var(--bad); } .st-ok { color: var(--ok); } .st-warn { color: var(--warn); }
.sumline { color: var(--muted); font-size: 14px; margin: 0; }
.sumline strong { color: var(--ink); }

/* Menu: frequently used circles, then tiles. */
.freq { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 6px; -webkit-overflow-scrolling: touch; }
.freq a { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-size: 13px; text-align: center; line-height: 1.2; }
.freq .circ { width: 60px; height: 60px; border-radius: 50%; background: #FFFFFF; border: 1px solid var(--line); display: grid; place-items: center; }
.mtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mtile { background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px; padding: 16px; min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; text-decoration: none; color: var(--ink); font-size: 16px; font-weight: 600; text-align: left; }
.mtile .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #FFFFFF; display: grid; place-items: center; }
.mtile .ic svg.i { width: 22px; height: 22px; }
.mtile small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.mtile.wide2 { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; }

/* Home: quick numbers */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi strong { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Dispatch board (desktop): a row per person, jobs as blocks across the day. */
.disp { overflow-x: auto; }
.disp-grid { display: grid; grid-template-columns: 150px minmax(720px, 1fr); }
.disp-hours { display: grid; font-size: 12px; color: var(--faint); border-bottom: 1px solid var(--line); }
.disp-hours span { padding: 6px 4px; border-left: 1px solid var(--line); }
.disp-who { padding: 12px 10px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.disp-who i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #FFFFFF; font-style: normal; font-size: 12px; flex: none; }
.disp-lane { position: relative; border-top: 1px solid var(--line); min-height: 58px; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); }
.disp-job { position: absolute; top: 8px; bottom: 8px; border-radius: 8px; color: #FFFFFF; padding: 4px 8px; font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
.disp-job small { font-weight: 400; opacity: .9; font-size: 12px; }

/* Misc */
.error { color: var(--bad); font-weight: 600; font-size: 14px; margin: 0; }
.banner { background: var(--accent-soft); border: 0; border-radius: var(--r); padding: 12px 14px; font-size: 14px; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(160px + env(safe-area-inset-bottom)); z-index: 40; max-width: 560px; margin: 0 auto; background: var(--ink); color: #FFFFFF; padding: 14px 16px; border-radius: 12px; font-weight: 500; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.empty { text-align: center; padding: 24px 8px; color: var(--muted); }
.skeleton { height: 56px; border-radius: 8px; background: linear-gradient(90deg, #EDEDE9 25%, #F7F7F4 50%, #EDEDE9 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; } .kv dd { margin: 0; font-weight: 500; }
.feedback-btn { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 7; background: #FFFFFF; color: var(--ink); border: 1px solid var(--edge); min-height: 40px; font-size: 12px; }
dialog { border: 0; border-radius: 10px; padding: 20px; width: min(92vw, 480px); }
dialog::backdrop { background: rgba(17,17,17,.45); }
.stepper { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 6px; }
.stepper input { text-align: center; font-size: 22px; }
.result { background: var(--ink); color: #FFFFFF; border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.result .num { font: 700 64px/1 var(--font); }
.result .chip { background: transparent; color: #FFFFFF; border-color: #575752; }
.result .chip[aria-pressed="true"] { background: #FFFFFF; color: var(--ink); border-color: #FFFFFF; }
#ids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tool { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); min-height: 88px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.tool small { font-weight: 500; color: var(--muted); font-size: 12px; }

/* Service call */
.steps { display: flex; flex-wrap: wrap; gap: 6px; }
.steps span { font: 500 12px var(--font); padding: 6px 10px; border-radius: 999px; background: #EEEFF2; color: var(--muted); }
.steps span.now { background: var(--accent); color: var(--on-accent); }
.steps span.done { background: var(--ok-soft); color: var(--ok); }
.check-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.check-row .chip { min-width: 72px; }
.taps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tap { background: #FFFFFF; border: 1px solid var(--edge); border-radius: var(--r); min-height: 64px; padding: 10px; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; gap: 2px; }
.tap strong { font-size: 15px; font-weight: 600; } .tap small { color: var(--muted); font-weight: 400; font-size: 13px; }
.tap:active { background: var(--accent-soft); border-color: var(--accent); }
.qty { display: flex; align-items: center; gap: 8px; flex: none; } .qty button { min-width: 44px; padding: 0; font-size: 22px; } .qty b { min-width: 20px; text-align: center; }
.total { border-top: 1px solid var(--ink); padding-top: 10px; font-size: 18px; font-weight: 700; }
.warnbox { border: 2px solid var(--bad); background: var(--bad-soft); }
.sigpad { width: 100%; height: 180px; border: 2px dashed var(--edge); border-radius: 8px; background: #FFFFFF; touch-action: none; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 15px; } .check-line input { width: 24px; height: 24px; min-height: 0; flex: none; }
details summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.copybox { border: 2px solid var(--accent); border-radius: var(--r); padding: 14px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 10px; text-align: center; }
.copybox .label { color: var(--accent-ink); }
.copybox.copied { border-color: var(--ok); background: var(--ok-soft); }
.copybox.copied button { background: var(--ok); }
.copy-amt { font: 700 40px/1.05 var(--font); }
.copy-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; font: 500 12px var(--font); }
.copy-steps span { background: #FFFFFF; border-radius: 6px; padding: 6px 2px; }
.done-card { border: 2px solid var(--ok); }
.done-card h2 { color: var(--ok); }
.grid3e { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* Company setup */
.price-list { display: flex; flex-direction: column; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px 92px; gap: 8px; align-items: end; padding: 12px 0; border-top: 1px solid var(--line); }
.price-row:first-child { border-top: 0; }
.price-row .pr-name { grid-column: 1 / -1; display: flex; flex-direction: column; } .price-row .pr-name small { color: var(--muted); font-size: 13px; }
.price-row .pr-tog { min-height: 48px; }
.price-row.off { opacity: .6; }

/* Employees */
.sw-group { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 8px; }
.sw { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; font-weight: 500; }
.sw input { width: 52px; height: 30px; min-height: 0; flex: none; accent-color: var(--accent); }

.cando { background: var(--paper); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.cando ul { margin: 6px 0; padding-left: 20px; } .cando li { margin: 2px 0; }

.danger-zone { margin-top: 18px; }
.danger-zone summary { cursor: pointer; padding: 8px 0; }
button.danger { color: var(--bad, #B3261E); border-color: currentColor; }
.navbtn { background: #1F6FB2; color: #FFFFFF; border: 0; border-radius: 14px; font-size: 19px; min-height: 64px; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; box-shadow: 0 3px 10px rgba(31,111,178,.35); }
.navbtn span { font-size: 22px; }
#lockbar { position: fixed; left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 8; background: #C5221F; color: #FFFFFF; font-weight: 600; font-size: 14px; padding: 10px 14px; text-decoration: none; text-align: center; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 64px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 40px; padding: 0 10px; background: none; border: 0; font-weight: 600; color: var(--muted); font-size: 14px; }

/* Dashboard */
.dash-head { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.dash-head > div { flex: 1 1 240px; }
.dash-head .btn { min-height: 48px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; min-height: 108px; }
.tile strong { font: 700 28px/1.1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tile span { font-weight: 500; font-size: 14px; color: var(--muted); }
.tile small { font-size: 13px; color: var(--muted); margin-top: auto; }
.tile.ok strong { color: var(--ok); } .tile.warn strong { color: var(--accent-ink); } .tile.bad strong { color: var(--bad); }
.dash-cols { display: grid; gap: 14px; }
@media (min-width: 900px) {
  main.wide { max-width: 1180px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dash-cols { grid-template-columns: 1fr 1.4fr; align-items: start; }
  .dash-cols > .card:only-child { grid-column: 1 / -1; }
}
/* Links that look like rows, chips and tiles: no underline. */
a.item, a.chip, a.tile { text-decoration: none; color: inherit; }
a.chip { padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.chips.scroll-x { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.chips.scroll-x .chip { flex: none; }
.search input { width: 100%; }

/* The company's own logo in the header (Company setup → Your colors and logo). */
.brandlogo { height: 40px; max-width: 48px; object-fit: contain; border-radius: 8px; background: #FFFFFF; flex: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; border: 3px solid #FFFFFF; box-shadow: 0 0 0 1px var(--edge); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); }
.brandprev { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.brandprev .bp-top { padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brandprev .bp-body { padding: 12px 14px; background: var(--paper); display: flex; gap: 8px; }
.brandprev .bp-btn { border-radius: 12px; padding: 10px 14px; font-weight: 600; }
@media (min-width: 900px) {
  .tabs { left: 50%; right: auto; transform: translateX(-50%); width: 620px; bottom: 12px; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 6px 20px rgba(0,0,0,.08); padding: 6px; }
  .fab { right: 32px; bottom: 28px; }
}
.sheet .ic svg.i { width: 28px; height: 28px; }
/* Address suggestions under the street box */
.addr-sug { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #FFFFFF; border: 1px solid var(--edge); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); margin-top: 4px; overflow: hidden; }
.addr-sug button { display: flex; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; min-height: 56px; padding: 8px 14px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: #FFFFFF; text-align: left; font-weight: 400; }
.addr-sug button:first-child { border-top: 0; }
.addr-sug button strong { font-weight: 600; color: var(--ink); } .addr-sug button small { color: var(--muted); font-size: 13px; }
.addr-by { display: block; text-align: right; font-size: 11px; color: var(--faint); padding: 4px 10px; }
.qty .qin { width: 56px; min-height: 44px; padding: 6px 4px; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.qty .qin::-webkit-outer-spin-button, .qty .qin::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* Sub pay sheet lines */
.sp-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 96px 80px; gap: 8px; align-items: end; border-top: 1px solid var(--line); padding-top: 10px; }
.sp-row:first-child { border-top: 0; padding-top: 0; }
.sp-row .sp-amt { text-align: right; font-weight: 600; padding-bottom: 12px; }
@media (max-width: 520px) { .sp-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 72px; } .sp-row > input[data-f="label"] { grid-column: 1 / -1; } }
/* HQ: door library review */
.lib-q { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.lib-q:first-child { border-top: 0; padding-top: 0; }
.lib-q img { width: 140px; height: 105px; object-fit: cover; border-radius: 10px; background: var(--paper); }
.tx-row { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tx-row:first-child { border-top: 0; padding-top: 0; }
code { font-size: 12px; word-break: break-all; background: var(--paper); padding: 1px 4px; border-radius: 4px; }
