/* Windows 11 / Fluent look. Printed tickets and labels below stay plain black and white. */
:root {
  color-scheme: light dark;
  --bg: #f3f3f3; --card: #ffffff; --card2: #fbfbfb; --ink: #1a1a1a; --muted: #5d5d5d; --line: #e5e5e5; --stroke: rgba(0,0,0,.0578);
  --ctl: #ffffff; --ctl-hover: #f9f9f9; --ctl-press: #f5f5f5; --ctl-line: rgba(0,0,0,.0578); --ctl-bottom: rgba(0,0,0,.1622); --subtle: rgba(0,0,0,.0373);
  --accent: #0067c0; --accent-hover: #1975c5; --accent-press: #3183ca; --on-accent: #fff; --accent-soft: #e6f0fa;
  --brand: var(--accent); --ok: #0f7b0f; --warn: #9d5d00; --bad: #c42b1c; --new: #0067c0;
  --radius: 8px; --radius-sm: 4px;
  --shadow: 0 2px 4px rgba(0,0,0,.04), 0 0 1px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 16px rgba(0,0,0,.14), 0 0 2px rgba(0,0,0,.12);
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --side: 280px; --titlebar: 48px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #202020; --card: #2b2b2b; --card2: #2d2d2d; --ink: #ffffff; --muted: #c5c5c5; --line: #3a3a3a; --stroke: rgba(255,255,255,.07);
    --ctl: rgba(255,255,255,.061); --ctl-hover: rgba(255,255,255,.084); --ctl-press: rgba(255,255,255,.033); --ctl-line: rgba(255,255,255,.07); --ctl-bottom: rgba(255,255,255,.14); --subtle: rgba(255,255,255,.06);
    --accent: #4cc2ff; --accent-hover: #47b1e8; --accent-press: #42a1d2; --on-accent: #000; --accent-soft: rgba(76,194,255,.14);
    --ok: #6ccb5f; --warn: #fce100; --bad: #ff99a4; --new: #4cc2ff;
    --shadow: 0 2px 4px rgba(0,0,0,.26), 0 0 1px rgba(0,0,0,.3);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font: 600 1.75rem/1.25 "Segoe UI Variable Display", var(--font); margin: .2rem 0 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; font-weight: 600; margin: 1.2rem 0 .5rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 1rem 0 .4rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.mono { font-family: "Cascadia Mono", Consolas, ui-monospace, SFMono-Regular, Menlo, monospace; }
main { max-width: 1120px; margin: 0 auto; padding: 16px 14px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-radius: var(--radius-sm); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Title bar */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--titlebar); display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border-bottom: 1px solid var(--stroke); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: .85rem; font-weight: 400; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 18px; height: 18px; stroke: var(--accent); stroke-width: 1.8; }

/* Left navigation pane (desktop), like Windows Settings */
.sidenav { display: none; }
.sidenav a, .bottomnav a { position: relative; color: var(--ink); }
.sidenav a:hover, .bottomnav a:hover { text-decoration: none; }
@media (min-width: 800px) {
  .sidenav { display: flex; flex-direction: column; gap: 4px; position: fixed; top: var(--titlebar); left: 0; bottom: 0; width: var(--side); padding: 12px 8px; overflow-y: auto; z-index: 20; }
  .sidenav[hidden] { display: none !important; }
  .sidenav a { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); font-size: .95rem; }
  .sidenav a:hover { background: var(--subtle); }
  .sidenav a.active { background: var(--subtle); font-weight: 600; }
  .sidenav a.active::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 16px; margin-top: -8px; border-radius: 3px; background: var(--accent); }
  .sidenav .pill { margin-left: auto; }
  body:has(#nav:not([hidden])) main { margin-left: var(--side); max-width: calc(1120px + var(--side)); padding: 20px 32px 40px; }
  .bottomnav { display: none !important; } body { padding-bottom: 0; }
}
.pill { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: .7rem; font-weight: 600; text-align: center; }

/* Bottom tab bar (phone) */
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(7, 1fr);
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid var(--stroke); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; color: var(--muted); font-size: .64rem; min-width: 0; }
.bottomnav a .ic { width: 22px; height: 22px; }
.bottomnav a.active { color: var(--accent); font-weight: 600; }
.bottomnav a.active::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 16px; height: 3px; margin-left: -8px; border-radius: 3px; background: var(--accent); }
.bottomnav .pill { position: absolute; top: 3px; left: 56%; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.card h2:first-child { margin-top: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 520px) { .grid2, .grid2.stack, .modal .grid2 { grid-template-columns: 1fr; } .grid4 { grid-template-columns: 1fr 1fr; } }

/* Inputs: Fluent text box with accent bottom line on focus */
label { display: block; font-size: .85rem; font-weight: 400; color: var(--ink); margin-bottom: 10px; }
label > input, label > select, label > textarea, label > .row { margin-top: 4px; }
input, select, textarea, button { font: inherit; }
input[type=text], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=email], input[type=date], input:not([type]), select, textarea {
  width: 100%; padding: 8px 11px; min-height: 40px; color: var(--ink); background: var(--ctl);
  border: 1px solid var(--ctl-line); border-bottom-color: var(--ctl-bottom); border-radius: var(--radius-sm); outline: none; transition: background .1s; }
input:hover, select:hover, textarea:hover { background: var(--ctl-hover); }
input:focus, select:focus, textarea:focus { background: var(--card); border-bottom: 2px solid var(--accent); padding-bottom: 7px; box-shadow: none; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
textarea { min-height: 80px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; flex: none; cursor: pointer; border-radius: var(--radius-sm);
  border: 1px solid var(--muted); background: var(--ctl); display: inline-grid; place-content: center; vertical-align: middle; }
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--on-accent); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
input[type=checkbox]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
input[type=checkbox].toggle { width: 40px; height: 20px; border-radius: 10px; place-content: center start; }
input[type=checkbox].toggle::after { content: ""; width: 12px; height: 12px; margin-left: 3px; border-radius: 50%; background: var(--muted); border: 0; transform: none; transition: margin .15s; }
input[type=checkbox].toggle:checked::after { margin-left: 23px; background: var(--on-accent); }
input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: .95rem; }
.check input { width: 20px; height: 20px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 5px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--ctl-line); border-bottom-color: var(--ctl-bottom); background: var(--ctl); color: var(--ink); text-decoration: none; cursor: pointer;
  font-weight: 400; font-size: .92rem; white-space: nowrap; box-shadow: 0 1px 0 rgba(0,0,0,.02); transition: background .1s; }
.btn:hover { background: var(--ctl-hover); text-decoration: none; }
.btn:active { background: var(--ctl-press); color: var(--muted); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.btn.primary { background: var(--accent); border-color: rgba(255,255,255,.08); border-bottom-color: rgba(0,0,0,.4); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.primary:active { background: var(--accent-press); color: var(--on-accent); }
.btn.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 30px; padding: 3px 10px; font-size: .85rem; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }
.btnbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
@media (max-width: 799px) { .btn { min-height: 40px; } .btn.small { min-height: 34px; } }

/* Badges */
.badge { display: inline-block; padding: 1px 8px; border-radius: var(--radius-sm); font-size: .72rem; font-weight: 600; border: 1px solid transparent; }
.badge.New { color: #003e92; background: #e0ecfa; }
.badge.Used { color: #6b4500; background: #fff4ce; }
.badge.sample { color: #5c2e91; background: #f1e8fb; }
.badge.pending { color: #8a5300; background: #fff4ce; }
.badge.sold { color: #0e6b0e; background: #dff6dd; }
.badge.cancelled { color: var(--muted); background: var(--subtle); }
.badge.out { color: #a4262c; background: #fde7e9; }
.badge.ebay { color: #00509e; background: #e6f0fa; }
.badge.mp { color: #1b4fa0; background: #e8eefb; }
@media (prefers-color-scheme: dark) {
  .badge.New, .badge.ebay, .badge.mp { color: #99d9ff; background: rgba(76,194,255,.16); }
  .badge.Used, .badge.pending { color: #fce100; background: rgba(252,225,0,.12); }
  .badge.sample { color: #d7b8ff; background: rgba(180,120,255,.16); }
  .badge.sold { color: #6ccb5f; background: rgba(108,203,95,.14); }
  .badge.out { color: #ff99a4; background: rgba(255,153,164,.14); }
}

.loc { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 600; padding: 3px 10px; border-radius: var(--radius-sm); font-size: .9rem; }
.loc::before { content: ""; width: 12px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Cpath d='M6 .5a5 5 0 0 1 5 5c0 3.5-5 8-5 8s-5-4.5-5-8a5 5 0 0 1 5-5zm0 3a2 2 0 1 0 0 4 2 2 0 0 0 0-4z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Cpath d='M6 .5a5 5 0 0 1 5 5c0 3.5-5 8-5 8s-5-4.5-5-8a5 5 0 0 1 5-5zm0 3a2 2 0 1 0 0 4 2 2 0 0 0 0-4z'/%3E%3C/svg%3E") center/contain no-repeat; }
.loc.none { background: var(--subtle); color: var(--muted); }

.searchbar { position: sticky; top: var(--titlebar); z-index: 10; background: var(--bg); padding: 4px 0 10px; }
.searchbar input[type=search] { font-size: 1rem; min-height: 44px; padding-left: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3Cpath d='M15 15l5 5' stroke='%23888' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 11px center; background-size: 18px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 8px; }
.filters select, .filters input { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }

.results { display: grid; gap: 8px; }
@media (min-width: 800px) { .results { grid-template-columns: 1fr 1fr; } }
.part { display: grid; grid-template-columns: 80px 1fr; gap: 14px; background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); position: relative; transition: background .1s; }
.part:hover { background: var(--card2); }
.part .thumb { width: 80px; height: 80px; border-radius: var(--radius-sm); object-fit: cover; background: var(--subtle); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.part .thumb .ic { width: 32px; height: 32px; stroke-width: 1.2; }
.part h3 { margin: 0 0 2px; font-size: .98rem; font-weight: 600; }
.part h3 a { color: inherit; }
.part .meta { font-size: .82rem; color: var(--muted); margin: 2px 0; }
.part .price { font-weight: 600; font-size: 1.05rem; }
.part .bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.part .sel { position: absolute; top: 10px; right: 10px; }

.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
.gallery img { height: 220px; max-width: 90%; border-radius: var(--radius); scroll-snap-align: start; object-fit: cover; background: var(--subtle); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; }
.kv dt { color: var(--muted); font-size: .88rem; } .kv dd { margin: 0; }
.photos-edit { display: flex; gap: 8px; flex-wrap: wrap; }
.photos-edit figure { margin: 0; position: relative; }
.photos-edit img { width: 92px; height: 92px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--stroke); }
.photos-edit button { position: absolute; top: 3px; right: 3px; border: 0; background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; }
.fitrow { display: grid; grid-template-columns: 76px 76px 1fr 1fr 40px; gap: 6px; margin-bottom: 6px; }
@media (max-width: 520px) { .fitrow { grid-template-columns: 1fr 1fr 40px; } }
details > summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.counter { font-size: .8rem; color: var(--muted); text-align: right; }
.counter.over { color: var(--bad); font-weight: 600; }

table.list { width: 100%; border-collapse: collapse; background: var(--card); }
table.list th, table.list td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .78rem; font-weight: 600; color: var(--muted); }
table.list tbody tr:hover { background: var(--subtle); }
.tablewrap { overflow-x: auto; border-radius: var(--radius-sm); }
.warn { background: #fff4ce; border: 1px solid rgba(0,0,0,.06); color: #3b2e00; border-radius: var(--radius); padding: 10px 14px; margin: 8px 0; }
.warn ul { margin: 4px 0 0 18px; padding: 0; }
.error { background: #fde7e9; border: 1px solid rgba(0,0,0,.06); color: #8c1c13; border-radius: var(--radius); padding: 10px 14px; margin: 8px 0; }
.sample-note { background: #f1e8fb; color: #5c2e91; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 10px; font-size: .9rem; }
@media (prefers-color-scheme: dark) {
  .warn { background: #433519; color: #fce8b2; } .error { background: #442726; color: #ffd6d6; } .sample-note { background: #3a2a4d; color: #e4d2ff; }
}
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--card); color: var(--ink); border: 1px solid var(--stroke); padding: 10px 18px; border-radius: var(--radius); z-index: 400; box-shadow: var(--shadow-lg); max-width: 90vw; }
body:has(.modal) .toast { top: calc(var(--titlebar, 66px) + 12px); bottom: auto; }
@media (min-width: 800px) { .toast { bottom: 24px; } }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff; padding: 16px; }
.overlay video { width: 100%; max-width: 520px; border-radius: var(--radius); }
.login { max-width: 380px; margin: 10vh auto; padding: 28px; box-shadow: var(--shadow-lg); }
iframe.desc { width: 100%; min-height: 260px; border: 1px solid var(--stroke); border-radius: var(--radius-sm); background: #fff; }
.savebar { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); padding: 10px 0; z-index: 5; }
@media (min-width: 800px) { .savebar { bottom: 0; } }
body.is-print { background: #fff; color: #000; }

/* ---------- printable pages ---------- */
.printpage { background: #fff; color: #000; max-width: 8.5in; margin: 0 auto; padding: .4in; font-size: 11pt; }
.ticket h1 { font-size: 18pt; margin: 0; }
.ticket .head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 10px; }
.ticket .head .right { text-align: right; }
.ticket .ordno { font-size: 16pt; font-weight: 800; }
.ticket table { width: 100%; border-collapse: collapse; }
.ticket th, .ticket td { border-bottom: 1px solid #999; padding: 6px 4px; text-align: left; vertical-align: middle; font-size: 10pt; }
.ticket th { border-bottom: 2px solid #000; font-size: 8.5pt; text-transform: uppercase; }
.ticket td.locc { font-weight: 800; font-size: 10.5pt; white-space: nowrap; }
.ticket td.num, .ticket th.num { text-align: right; white-space: nowrap; }
.ticket td.qr svg { width: 46px; height: 46px; display: block; }
.ticket .pick { width: 18px; height: 18px; border: 1.5px solid #000; display: inline-block; }
.ticket .totals { margin-top: 10px; display: flex; justify-content: flex-end; }
.ticket .totals table { width: auto; } .ticket .totals td { border: 0; font-size: 12pt; padding: 3px 8px; }
.ticket .sub { font-weight: 800; font-size: 13pt; }
.ticket .cust { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 30px; }
.ticket .cust div { border-bottom: 1px solid #000; padding-top: 18px; font-size: 9pt; }
.ticket .foot { margin-top: 20px; font-size: 8.5pt; color: #444; }
.label { width: 4in; height: 2in; border: 1px dashed #999; padding: .12in; display: grid; grid-template-columns: 1.3in 1fr; gap: .12in; margin: 0 auto .2in; page-break-inside: avoid; break-inside: avoid; color: #000; background: #fff; }
.label .qr svg { width: 1.3in; height: 1.3in; display: block; }
.label .sku { font: 800 13pt ui-monospace, monospace; margin-top: 2px; text-align: center; }
.label .nm { font-weight: 800; font-size: 11.5pt; line-height: 1.15; max-height: 2.4em; overflow: hidden; }
.label .fit { font-size: 8.5pt; margin-top: 2px; max-height: 2.3em; overflow: hidden; }
.label .pr { font-size: 20pt; font-weight: 900; margin-top: 3px; }
.label .lc { font-size: 10pt; font-weight: 800; border-top: 1.5px solid #000; margin-top: 4px; padding-top: 3px; }
.labels-sheet { display: grid; grid-template-columns: repeat(2, 4in); gap: 0.1in; justify-content: center; }

@media print {
  @page { size: letter; margin: 0.4in; }
  body { background: #fff; padding: 0; }
  .no-print, .topbar, .bottomnav, .sidenav, .toast { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; }
  body:has(#nav) main { margin: 0 !important; }
  main { max-width: none; padding: 0; }
  .printpage { padding: 0; max-width: none; }
  .label { border: 1px dotted #bbb; }
  .ticket tr { break-inside: avoid; }
}

/* ship-to */
.badge.ship { background: #e8f1fb; color: #0f5ea8; border-color: #b7d3f0; }
.ticket .shipto { border: 2px solid #000; color: #000; background: #fff; padding: 10px 14px; margin: 14px 0; max-width: 420px; break-inside: avoid; }
.ticket .shipto .lbl { font-weight: 800; letter-spacing: .08em; font-size: 1.05rem; margin-bottom: 4px; }
.ticket .shipto .addr { font-size: 1.15rem; line-height: 1.35; font-weight: 600; }
@media print { .ticket .shipto { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Searchable dropdown (vehicle Year / Make / Model / Trim / Engine), Windows 11 combo box look */
label > .combo { margin-top: 4px; }
.combo { position: relative; }
.combo > input { padding-right: 38px; }
.combo-btn { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 32px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; }
.combo-btn:hover { background: var(--subtle); }
.combo.open .combo-btn svg { transform: rotate(180deg); }
.combo-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); max-height: min(320px, 45vh); overflow-y: auto;
  margin: 0; padding: 4px; list-style: none; background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.combo-list li { position: relative; padding: 9px 12px; min-height: 40px; box-sizing: border-box; border-radius: var(--radius-sm); cursor: pointer;
  font-size: .95rem; color: var(--ink); line-height: 1.3; }
.combo-list li[role=option]:hover { background: var(--subtle); }
.combo-list li.active { background: var(--subtle); }
.combo-list li[aria-selected=true] { background: var(--accent-soft); }
.combo-list li[aria-selected=true]::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 16px; margin-top: -8px; border-radius: 3px; background: var(--accent); }
.combo-list li.combo-note { color: var(--muted); cursor: default; font-size: .85rem; }
@media (pointer: coarse) { .combo-list li { min-height: 44px; padding: 11px 12px; } }

/* Locations tab + picker */
.loclist { display: flex; flex-direction: column; gap: 8px; }
.locrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.locrow .grow { flex: 1 1 180px; min-width: 0; }
.locpick { display: flex; flex-direction: column; gap: 6px; }
.locpick select { width: 100%; }

/* v2.5.5: live invoice totals and separate completion/payment indicators. */
.invoice-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 20px; margin:12px 0; }
.invoice-overview > div,.invoice-overview > a { min-width:0; display:flex; flex-direction:column; gap:4px; }
.invoice-overview strong { font-size:1.35rem; overflow-wrap:anywhere; }
.invoice-overview p { grid-column:1/-1; margin:0; }
.badge.d-complete { background:var(--accent-soft); color:var(--ink); }
.badge.d-unpaid { background:#fff0c2; color:#6c4100; }
@media(max-width:480px) { .invoice-overview { grid-template-columns:1fr 1fr; gap:12px; } .invoice-overview > div:last-of-type { grid-column:1/-1; } }
