/* I+O RMS — styled to match the I+O Portal (portal.i-o.nz): dark brand nav,
   slate neutrals, Space Grotesk, white cards, 6px radii. No build step. */

:root {
  --brand: #303030;
  --font: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --bg: #f8fafc;          /* slate-50 */
  --card: #ffffff;
  --ink: #0f172a;         /* slate-900 */
  --ink-2: #334155;       /* slate-700 */
  --muted: #64748b;       /* slate-500 */
  --faint: #94a3b8;       /* slate-400 */
  --line: #e2e8f0;        /* slate-200 */
  --line-2: #cbd5e1;      /* slate-300 */
  --hover: #f1f5f9;       /* slate-100 */

  --ok: #15803d;   --ok-bg: #dcfce7;
  --warn: #b45309; --warn-bg: #fef3c7;
  --bad: #b91c1c;  --bad-bg: #fee2e2;
  --info: #1d4ed8; --info-bg: #dbeafe;
  --violet: #6d28d9; --violet-bg: #ede9fe;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06);

  --nav: var(--brand);
  --on-brand: #fff;
  --bg-2: #e9edf2;
  --subtle: #fbfcfd;
  --line-soft: #eef2f6;
  --weekend: #f4f6f9;
  --warn-tint: #fffbeb;
  --bad-tint: #fef2f2;
  --pic-a: #f8fafc; --pic-b: #eef2f6;
  --ok-line: #bbf7d0;  --ok-ink: #14532d;
  --bad-line: #fecaca; --bad-ink: #7f1d1d;
  --warn-line: #fde68a; --warn-ink: #78350f;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); }
a { color: inherit; text-decoration: none; }
a.link, .link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
a.link:hover { text-decoration-color: var(--ink); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 600; }
p { margin: 0; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- Top nav (same as Portal .brand-nav / .nav-link) ---------- */
.brand-nav { background: var(--nav); color: #fff; position: sticky; top: 0; z-index: 40; }
.brand-nav .inner { max-width: 1400px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.wordmark { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.wordmark .tag { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.16); }
.nav-links { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: .4rem .75rem; border-radius: 999px; font-size: .875rem; color: rgba(255,255,255,.85); transition: background-color .12s, color .12s; }
.nav-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-link-active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.nav-count { font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 999px; background: #fbbf24; color: #1f2937; font-weight: 700; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-search { width: 220px; border: 0; border-radius: 999px; padding: 7px 12px 7px 32px; font: inherit; font-size: 13px; color: #fff;
  background: rgba(255,255,255,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ffffffaa'%3E%3Cpath fill-rule='evenodd' d='M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat 11px center / 14px; }
.nav-search::placeholder { color: rgba(255,255,255,.6); }
.nav-search:focus { outline: 2px solid rgba(255,255,255,.4); background-color: rgba(255,255,255,.18); }
.avatar { width: 30px; height: 30px; border-radius: 999px; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(15,23,42,.15); min-width: 200px; padding: 6px; z-index: 50; }
.menu-panel a, .menu-panel button { display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: var(--radius); font: inherit; font-size: 13px; background: none; border: 0; color: inherit; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--hover); }
.menu-panel .sep { height: 1px; background: var(--line); margin: 6px 0; }

/* ---------- Page ---------- */
.page { max-width: 1400px; margin: 0 auto; padding: 22px 16px 120px; }
.page-narrow { max-width: 880px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 3px; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.crumbs a:hover { color: var(--ink); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.grid { display: grid; gap: 16px; }
.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)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.split-r { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split, .split-r { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); } .nav-search { width: 140px; } }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.card-body { padding: 16px; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--line); background: var(--subtle); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.stat { padding: 14px 16px; }
.stat .label { font-size: 12px; color: var(--muted); }
.stat .value { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); }

/* ---------- Buttons & forms (Portal: .btn-brand, slate-300 borders) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 13px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--bg); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-brand:hover { background: var(--brand); filter: brightness(1.15); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--hover); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius); border: 1px solid transparent; color: var(--muted); background: transparent; cursor: pointer; font-size: 15px; line-height: 1; }
.icon-btn:hover { background: var(--hover); color: var(--ink); border-color: var(--line); }
label.lbl, .lbl { display: block; font-size: 12.5px; font-weight: 500; margin-bottom: 4px; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--card); font: inherit; font-size: 13.5px; color: var(--ink); box-shadow: var(--shadow); }
.input:focus { outline: 2px solid var(--faint); outline-offset: 0; border-color: var(--faint); }
textarea.input { min-height: 80px; resize: vertical; }
.input-sm { padding: 4px 7px; font-size: 13px; }
.field + .field { margin-top: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.error-text { font-size: 12px; color: var(--bad); margin-top: 4px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.search-pill { appearance: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 12px 7px 32px; font: inherit; font-size: 13px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat 11px center / 14px; min-width: 240px; }

/* ---------- Flash ---------- */
.flash { border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; border: 1px solid; }
.flash-ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.flash-bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-ink); }
.flash-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }

/* ---------- Pills & badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--hover); color: var(--ink-2); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 99px; background: currentColor; opacity: .7; }
.pill.no-dot::before { display: none; }
.st-draft { background: var(--hover); color: var(--ink-2); }
.st-pending { background: var(--warn-bg); color: var(--warn); }
.st-confirmed { background: var(--ok-bg); color: var(--ok); }
.st-on_site { background: var(--info-bg); color: var(--info); }
.st-returned { background: var(--violet-bg); color: var(--violet); }
.st-cancelled { background: var(--hover); color: var(--faint); text-decoration: line-through; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.b-info { background: var(--info-bg); color: var(--info); }
.b-mute { background: var(--hover); color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--subtle); white-space: nowrap; }
table.t td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: var(--subtle); }
table.t tr.clickable { cursor: pointer; }
table.t td.actions { text-align: right; white-space: nowrap; width: 1%; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 8px 12px; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.seg a, .seg button { padding: 5px 11px; font: inherit; font-size: 12.5px; border: 0; background: transparent; cursor: pointer; color: var(--ink-2); border-right: 1px solid var(--line); }
.seg a:last-child, .seg button:last-child { border-right: 0; }
.seg .on { background: var(--brand); color: var(--on-brand); }

/* ---------- Folder tree ---------- */
.tree { font-size: 13px; padding: 6px; }
.tree a { display: flex; justify-content: space-between; gap: 6px; padding: 5px 8px; border-radius: var(--radius); color: var(--ink-2); }
.tree a:hover { background: var(--hover); }
.tree a.on { background: var(--brand); color: var(--on-brand); }
.tree a .count { color: var(--faint); font-size: 12px; }
.tree a.on .count { color: rgba(255,255,255,.7); }
.tree .children { margin-left: 12px; border-left: 1px solid var(--line); padding-left: 4px; }

/* ---------- Availability strip ---------- */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(30px, 1fr); gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.strip .d { text-align: center; border-radius: 5px; padding: 5px 0 6px; background: var(--ok-bg); color: var(--ok); }
.strip .d .dow { font-size: 10px; opacity: .8; }
.strip .d .dn { font-size: 10px; opacity: .8; }
.strip .d .n { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.strip .d.low { background: var(--warn-bg); color: var(--warn); }
.strip .d.none { background: var(--bad-bg); color: var(--bad); }
.strip .d.today { outline: 2px solid var(--brand); outline-offset: 1px; }
.strip .d.we { filter: saturate(.7); }

/* ---------- Quote builder ---------- */
.q-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.q-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.q-meta .k { font-size: 11.5px; color: var(--muted); }
.q-group { margin-bottom: 16px; }
.q-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--subtle); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.q-group-head .name { font-weight: 600; }
.q-group-head .gtotal { font-variant-numeric: tabular-nums; font-weight: 600; }
table.q { width: 100%; border-collapse: collapse; font-size: 13px; }
table.q th { font-weight: 500; font-size: 11.5px; color: var(--muted); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.q td { padding: 4px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.q tr.acc td { color: var(--muted); font-size: 12.5px; }
table.q tr.acc td.name { padding-left: 26px; }
table.q tr.short td { background: var(--warn-tint); }
table.q tr.hard td { background: var(--bad-tint); }
table.q .cell-in { width: 64px; padding: 3px 6px; border: 1px solid transparent; border-radius: 5px; background: transparent; font: inherit; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
table.q .cell-in.w80 { width: 84px; }
table.q .cell-in:hover { border-color: var(--line-2); background: var(--card); }
table.q .cell-in:focus { border-color: var(--faint); background: var(--card); outline: none; box-shadow: 0 0 0 2px var(--line); }
table.q .code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
table.q td.sell { font-weight: 600; }
table.q .cost-col { color: var(--muted); }
.cost-off .cost-col { display: none; }
.factor-manual { color: var(--violet); font-weight: 600; }
.avail-chip { font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.avail-ok { color: var(--ok); background: var(--ok-bg); }
.avail-short { color: var(--warn); background: var(--warn-bg); }
.avail-hard { color: var(--bad); background: var(--bad-bg); }
.add-row { position: relative; padding: 8px 10px; display: flex; gap: 8px; align-items: center; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.add-row .input { max-width: 440px; }
.picker { position: absolute; left: 10px; top: calc(100% - 4px); width: min(560px, calc(100vw - 40px)); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(15,23,42,.16); z-index: 30; max-height: 340px; overflow-y: auto; }
.picker .opt { display: grid; grid-template-columns: 110px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 10px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--line-soft); }
.picker .opt:last-child { border-bottom: 0; }
.picker .opt.on, .picker .opt:hover { background: var(--hover); }
.picker .opt .code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.picker .none { padding: 12px; color: var(--muted); font-size: 13px; }
.kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); background: var(--card); }

/* Totals bar (sticky, like Cue's) */
.totals-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15,23,42,.06); }
.totals-bar .inner { max-width: 1400px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 22px; align-items: center; overflow-x: auto; }
.totals-bar .t { white-space: nowrap; }
.totals-bar .t .k { font-size: 11px; color: var(--muted); }
.totals-bar .t .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.totals-bar .t.big .v { font-size: 19px; }
.totals-bar .div { width: 1px; align-self: stretch; background: var(--line); }
.margin-good { color: var(--ok); }
.margin-mid { color: var(--warn); }
.margin-low { color: var(--bad); }

/* ---------- Misc ---------- */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { padding: 7px 0; border-bottom: 1px solid var(--line-soft); display: flex; gap: 10px; }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--faint); white-space: nowrap; font-size: 12px; min-width: 110px; }
.day-col { border-top: 1px solid var(--line); padding: 10px 0; }
.day-col:first-child { border-top: 0; }
.job-line { display: flex; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.bar { height: 8px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.dialog { border: 0; border-radius: var(--radius-lg); padding: 0; box-shadow: 0 20px 50px rgba(15,23,42,.3); width: min(520px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(0,0,0,.45); }
.dialog .card-head { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.login-bg { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--bg-2); }
.login-card { width: 100%; max-width: 380px; background: rgba(255,255,255,.95); border-radius: 16px; box-shadow: 0 10px 30px rgba(15,23,42,.12); padding: 30px 26px; }
.version { text-align: center; font-size: 10.5px; color: var(--faint); padding: 0 16px 90px; margin-top: -90px; }
.cmdk-list a { display: flex; gap: 10px; justify-content: space-between; padding: 8px 12px; border-radius: var(--radius); font-size: 13.5px; }
.cmdk-list a:hover, .cmdk-list a.on { background: var(--hover); }
@media print { .brand-nav, .totals-bar, .no-print { display: none !important; } .page { padding: 0; } }

/* ---------- Gear browser ---------- */
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.gear-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: border-color .12s, box-shadow .12s; }
.gear-card:hover { border-color: var(--line-2); box-shadow: 0 4px 14px rgba(15,23,42,.08); }
.gear-card.picked { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.gear-pic { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: linear-gradient(180deg, var(--pic-a), var(--pic-b)); }
.gear-pic img { width: 100%; height: 100%; object-fit: contain; padding: 10px; mix-blend-mode: multiply; }
.gear-icon { width: 54%; height: 54%; color: #64748b; }
.gear-avail { position: absolute; top: 8px; right: 8px; font-size: 12.5px; line-height: 1.2; padding: 4px 9px; border-radius: 999px; color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); white-space: nowrap; }
.gear-avail strong { font-size: 14px; }
.ga-ok { background: #15803d; } .ga-warn { background: #b45309; } .ga-bad { background: #b91c1c; } .ga-mute { background: rgba(30,30,30,.75); }
.gear-body { padding: 9px 11px 10px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.gear-name { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.gear-meta { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gear-tags { font-size: 11.5px; color: var(--muted); margin-top: auto; padding-top: 4px; }
.gear-pick { padding: 0 11px 11px; }
.gear-pick .input { text-align: center; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-size: 12.5px; color: var(--ink-2); cursor: pointer; font-family: inherit; }
.chip:hover { background: var(--hover); }
.chip.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.dialog.wide { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 40px); }
.dialog.wide .card-body { max-height: calc(100vh - 220px); overflow: auto; }

/* ---------- Planner ---------- */
.planner { overflow-x: auto; }
.pl-grid { display: grid; min-width: max-content; }
.pl-head { position: sticky; top: 0; z-index: 2; background: var(--subtle); }
.pl-cell-day { text-align: center; font-size: 10.5px; color: var(--muted); padding: 5px 0 6px; border-left: 1px solid var(--line-soft); line-height: 1.25; }
.pl-cell-day .dn { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pl-cell-day.we { background: var(--weekend); }
.pl-cell-day.today { background: var(--brand); color: var(--on-brand); }
.pl-cell-day.today .dn { color: var(--on-brand); }
.pl-label { position: sticky; left: 0; z-index: 1; background: var(--card); padding: 7px 12px; border-right: 1px solid var(--line); border-top: 1px solid var(--line-soft); font-size: 13px; min-width: 0; overflow: hidden; }
.pl-label .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-label .s { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-row-bg { border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.pl-row-bg.we { background: var(--subtle); }
.pl-row-bg.today { background: rgba(48,48,48,.05); }
.pl-bar { align-self: center; margin: 0 2px; height: 28px; border-radius: 6px; display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; z-index: 1; border: 1px solid transparent; }
.pl-bar.st-confirmed { background: #dcfce7; color: #14532d; border-color: #86efac; }
.pl-bar.st-on_site { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
.pl-bar.st-pending { background: #fef3c7; color: #78350f; border-color: #fcd34d; }
.pl-bar.st-draft { background: #f1f5f9; color: #475569; border-color: #cbd5e1; border-style: dashed; }
.pl-bar.st-returned { background: #ede9fe; color: #4c1d95; border-color: #c4b5fd; }
.pl-bar.dry { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 6px, transparent 6px 12px); }
.pl-bar .tag { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: rgba(0,0,0,.1); }
.pl-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.pl-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; border: 1px solid; }

/* ---------- Availability grid ---------- */
.av-wrap { overflow-x: auto; }
table.av { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: max-content; }
table.av th, table.av td { border-bottom: 1px solid var(--line-soft); }
table.av thead th { position: sticky; top: 0; background: var(--subtle); z-index: 2; font-weight: 500; color: var(--muted); font-size: 11px; padding: 6px 2px; text-align: center; }
table.av thead th.we { background: var(--weekend); }
table.av thead th.today { background: var(--brand); color: var(--on-brand); }
table.av .name { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 240px; max-width: 280px; padding: 6px 12px; border-right: 1px solid var(--line); text-align: left; }
table.av .name .s { font-size: 11px; color: var(--muted); }
table.av td.c { width: 58px; min-width: 58px; text-align: center; padding: 4px 2px; cursor: pointer; border-left: 1px solid var(--line-soft); }
table.av td.c:hover { outline: 2px solid var(--line-2); outline-offset: -2px; }
table.av td.c .n { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
table.av td.c .b { display: flex; justify-content: center; gap: 3px; font-size: 10px; font-weight: 600; margin-top: 1px; font-variant-numeric: tabular-nums; }
table.av td.c .b span { padding: 0 3px; border-radius: 3px; }
table.av td.c.ok .n { color: var(--ok); }
table.av td.c.low { background: var(--warn-tint); }
table.av td.c.low .n { color: var(--warn); }
table.av td.c.none { background: var(--bad-tint); }
table.av td.c.none .n { color: var(--bad); }
table.av td.c.we { background-color: var(--subtle); }
.k-c { background: var(--ok-bg); color: var(--ok); }
.k-q { background: var(--warn-bg); color: var(--warn); }
.k-d { background: var(--hover); color: var(--ink-2); }
.k-r { background: var(--bad-bg); color: var(--bad); }
.popover { position: absolute; z-index: 60; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(15,23,42,.18); width: 340px; padding: 10px 12px; font-size: 13px; }
.popover .job-line { padding: 4px 0; }

/* ---------- Prep ---------- */
.prep-bar { height: 8px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.prep-bar > span { display: block; height: 100%; background: var(--brand); }
table.prep td.qty { width: 60px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
table.prep tr.done td.name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
table.prep tr.acc td.name { padding-left: 34px; }
table.prep .tick { width: 22px; height: 22px; accent-color: var(--brand); cursor: pointer; }

/* Inventory list: picture + small code */
.inv-pic-h, .inv-pic-cell { width: 56px; padding-right: 0 !important; }
.inv-pic { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: linear-gradient(180deg, var(--pic-a), var(--pic-b)); border: 1px solid var(--line); }
.inv-pic img { width: 100%; height: 100%; object-fit: contain; padding: 3px; mix-blend-mode: multiply; }
.inv-pic .gear-icon { width: 60%; height: 60%; }
td.inv-code { font-family: var(--mono); font-size: 11px; color: var(--muted); max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- In-page dialogs ---------- */
dialog.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
dialog.modal::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(1px); }
.modal-body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-msg { color: var(--ink-2); font-size: 13.5px; }
.modal-actions { display: flex; flex-direction: row-reverse; justify-content: flex-start; gap: 8px; margin-top: 4px; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }

/* ---------- Group deal price ---------- */
.b-violet { background: var(--violet-bg); color: var(--violet); }
.gtotal-edit { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.q-group-head .gtotal-in { width: 96px; font-weight: 600; font-size: 13.5px; padding: 3px 6px; border: 1px solid transparent; border-radius: 5px; background: transparent; font-family: inherit; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.q-group-head .gtotal-in:hover { border-color: var(--line-2); background: var(--card); }
.q-group-head .gtotal-in:focus { border-color: var(--faint); background: var(--card); outline: none; box-shadow: 0 0 0 2px var(--line); }
.q-group-head .gtotal-in.is-deal { color: var(--violet); }

/* ---------- Theme switch ---------- */
.theme-btn { width: 30px; height: 30px; border-radius: 999px; border: 0; background: rgba(255,255,255,.12); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.theme-btn:hover { background: rgba(255,255,255,.2); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .i-sun { display: none; }
[data-theme="dark"] .theme-btn .i-sun { display: block; }
[data-theme="dark"] .theme-btn .i-moon { display: none; }

/* ---------- Dark mode ---------- */
[data-theme="dark"] {
  color-scheme: dark;
  --nav: #1c1c1c;
  --brand: #e5e5e5;
  --on-brand: #111111;
  --bg: #121212;
  --bg-2: #0d0d0d;
  --card: #1c1c1c;
  --subtle: #202020;
  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --muted: #94a3b8;
  --faint: #64748b;
  --line: #2c2c2c;
  --line-2: #3d3d3d;
  --line-soft: #262626;
  --hover: #262626;
  --weekend: #181818;
  --warn-tint: rgba(245, 158, 11, .08);
  --bad-tint: rgba(239, 68, 68, .08);
  --pic-a: #e2e8f0; --pic-b: #cbd5e1;
  --ok: #4ade80;   --ok-bg: rgba(34, 197, 94, .16);   --ok-line: rgba(34, 197, 94, .35);  --ok-ink: #bbf7d0;
  --warn: #fbbf24; --warn-bg: rgba(245, 158, 11, .16); --warn-line: rgba(245, 158, 11, .35); --warn-ink: #fde68a;
  --bad: #f87171;  --bad-bg: rgba(239, 68, 68, .16);  --bad-line: rgba(239, 68, 68, .35);  --bad-ink: #fecaca;
  --info: #60a5fa; --info-bg: rgba(59, 130, 246, .18);
  --violet: #a78bfa; --violet-bg: rgba(139, 92, 246, .18);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
[data-theme="dark"] .brand-nav { border-bottom: 1px solid var(--line); }
[data-theme="dark"] .input, [data-theme="dark"] select.input, [data-theme="dark"] textarea.input { background: #161616; color: var(--ink); }
[data-theme="dark"] .btn { background: var(--card); color: var(--ink); }
[data-theme="dark"] .btn-brand { background: var(--brand); color: var(--on-brand); }
[data-theme="dark"] .btn-danger { background: var(--bad); color: #111; }
[data-theme="dark"] .pl-bar.st-confirmed { background: rgba(34,197,94,.18); color: #bbf7d0; border-color: rgba(34,197,94,.45); }
[data-theme="dark"] .pl-bar.st-on_site { background: rgba(59,130,246,.2); color: #bfdbfe; border-color: rgba(59,130,246,.5); }
[data-theme="dark"] .pl-bar.st-pending { background: rgba(245,158,11,.18); color: #fde68a; border-color: rgba(245,158,11,.45); }
[data-theme="dark"] .pl-bar.st-draft { background: #262626; color: #cbd5e1; border-color: #4b4b4b; }
[data-theme="dark"] .pl-bar.st-returned { background: rgba(139,92,246,.2); color: #ddd6fe; border-color: rgba(139,92,246,.45); }
[data-theme="dark"] .gear-pic img, [data-theme="dark"] .inv-pic img { mix-blend-mode: multiply; }
[data-theme="dark"] .gear-icon { color: #475569; }
[data-theme="dark"] .login-bg { background: var(--bg-2); }
[data-theme="dark"] img.logo-dark-invert { filter: invert(1); }

.logo-for-dark { display: none; }
[data-theme="dark"] .logo-for-light { display: none; }
[data-theme="dark"] .logo-for-dark { display: inline; }
[data-theme="dark"] .pl-bar.dry { background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.28) 0 6px, transparent 6px 12px); }
table.q td.code, table.q .code { font-size: 11px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* job view: codes hidden unless switched on; text items; crew day/hour switch */
.codes-off .code-col { display: none; }
table.q .text-desc { width: min(100%, 360px); text-align: left; font-weight: 600; }
.cell-sel { font: inherit; font-size: 11.5px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 5px; padding: 2px 2px; cursor: pointer; }
.cell-sel:hover { border-color: var(--line-2); }
/* picker: text item option */
.picker .opt.text-opt { grid-template-columns: minmax(0, 1fr); color: var(--ink-2); }
.picker .opt.text-opt b { color: var(--ink); }
/* form dialogs */
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-grid .full { grid-column: 1 / -1; }
.modal-grid label > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.modal-extra { display: none; }
.modal-extra.on { display: contents; }

/* sub-groups */
.q-group-head .group-name { width: auto; min-width: 160px; text-align: left; font-weight: 600; font-size: 14px; border: 1px solid transparent; padding: 2px 6px; border-radius: 5px; background: transparent; font-family: inherit; color: var(--ink); }
.q-group-head .group-name:hover { border-color: var(--line-2); }
.q-sub { border-left: 3px solid var(--line-2); }
.q-sub .q-group-head { background: var(--card); }
.q-sub .group-name { font-size: 13.5px; }
.btn-xs { padding: 2px 8px; font-size: 11.5px; border-radius: 5px; }
.q-group-head .cell-sel { max-width: 170px; }

/* accessories hidden by default on jobs (short ones still show) */
.acc-off table.q tr.acc:not(.short):not(.hard):not(.acc-open) { display: none; }
.acc-count { display: none; margin-left: 6px; font: inherit; font-size: 11.5px; color: var(--muted); background: var(--hover); border: 0; border-radius: 999px; padding: 1px 8px; cursor: pointer; }
.acc-off .acc-count { display: inline-block; }
.acc-count:hover { color: var(--ink); }

/* item info in the right half of the window (desktop) */
.embed .brand-nav, .embed .version { display: none; }
.embed .page { padding-top: 16px; }
.side-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 50vw; z-index: 55; background: var(--bg); border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(0,0,0,.12); display: flex; flex-direction: column; }
.side-panel header { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.side-panel header .t { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-panel iframe { flex: 1; border: 0; width: 100%; background: var(--bg); }
body.side-open .page { margin-right: 50vw; max-width: none; }
body.side-open .totals-bar { right: 50vw; }

/* item availability grid: free / quoted / total per day */
.ag { display: grid; grid-template-columns: 132px repeat(var(--ag-days), minmax(32px, 1fr)); gap: 3px 3px; overflow-x: auto; padding-bottom: 4px; align-items: stretch; }
.ag-l { position: sticky; left: 0; background: var(--card); z-index: 1; font-size: 12px; color: var(--muted); display: flex; align-items: center; padding-right: 8px; }
.ag-l.ag-total { color: var(--ink); font-weight: 600; flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.15; }
.ag-l.ag-total span { font-weight: 400; font-size: 10.5px; color: var(--faint); }
.ag-h { text-align: center; font-size: 10px; color: var(--muted); line-height: 1.2; padding: 2px 0 3px; border-radius: 5px; display: flex; flex-direction: column; }
.ag-h b { font-size: 13px; color: var(--ink); font-weight: 600; }
.ag-h.today { background: var(--brand); color: var(--on-brand); }
.ag-h.today b { color: var(--on-brand); }
.ag-c { text-align: center; border-radius: 5px; padding: 5px 0; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ag-c.ok { background: var(--ok-bg); color: var(--ok); }
.ag-c.low { background: var(--warn-bg); color: var(--warn); }
.ag-c.none { background: var(--bad-bg); color: var(--bad); }
.ag-c.q { background: var(--hover); color: var(--ink-2); font-weight: 500; font-size: 12.5px; }
.ag-c.ag-total { border-top: 2px solid var(--line-2); }
.ag-c.we:not(.ok):not(.low):not(.none) { background: var(--weekend); }

.embed .crumbs { display: none; }
.embed .page { padding: 14px 18px 24px; max-width: none; }
.acc-count.on { color: var(--ink); background: var(--line); }

/* crew shifts */
table.q tr.shift-row td { background: var(--subtle); border-top: 1px solid var(--line); font-weight: 600; padding-top: 7px; padding-bottom: 7px; }
table.q .shift-name { width: 180px; text-align: left; font-weight: 600; }
table.q td.in-shift { padding-left: 22px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; cursor: pointer; }
.link-btn:hover { text-decoration-color: var(--ink); }

/* ---------- Charts (single series: one hue, recessive axes) ---------- */
:root { --chart: #475569; --chart-hover: #1e293b; }
[data-theme="dark"] { --chart: #94a3b8; --chart-hover: #e2e8f0; }
.chart-cols { margin: 0; }
.cc-plot { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 180px; border-bottom: 1px solid var(--line-2); padding-top: 18px; }
.cc-max { position: absolute; top: 0; left: 0; font-size: 11px; color: var(--faint); border-bottom: 1px dashed var(--line); right: 0; padding-bottom: 2px; pointer-events: none; }
.cc-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; outline: none; }
.cc-bar { display: block; width: 100%; max-width: 46px; margin: 0 auto; background: var(--chart); border-radius: 4px 4px 0 0; transition: background .1s; }
.cc-col:hover .cc-bar, .cc-col:focus .cc-bar { background: var(--chart-hover); }
.cc-tip { display: none; position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 12px; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.12); z-index: 3; }
.cc-tip b { display: block; font-weight: 600; color: var(--muted); font-size: 11px; }
.cc-col:hover .cc-tip, .cc-col:focus .cc-tip { display: block; }
.cc-axis { display: flex; gap: 2px; margin-top: 4px; }
.cc-axis span { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.cc-table { margin-top: 8px; color: var(--muted); }
.cc-table table { margin-top: 6px; }
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hb-row { display: grid; grid-template-columns: minmax(120px, 2fr) 3fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hb-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 10px; background: var(--hover); border-radius: 0 4px 4px 0; overflow: hidden; }
.hb-track span { display: block; height: 100%; background: var(--chart); border-radius: 0 4px 4px 0; }
.hb-row:hover .hb-track span { background: var(--chart-hover); }
.hb-val { font-variant-numeric: tabular-nums; text-align: right; min-width: 84px; font-weight: 600; }
.stat .trend { font-size: 12px; font-weight: 600; }
.trend.up { color: var(--ok); } .trend.down { color: var(--bad); }
.period-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.util { display: inline-block; width: 70px; height: 8px; background: var(--hover); border-radius: 0 4px 4px 0; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.util span { display: block; height: 100%; background: var(--chart); }

/* ---------- Invoices (v0.4.0) ---------- */
.inv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .inv-layout { grid-template-columns: minmax(0, 1fr); } }
.paper-wrap { background: #fff; border-radius: var(--radius-lg); box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 28px rgba(15,23,42,.10); overflow: hidden; border: 1px solid var(--line); }
.paper { display: block; width: 100%; min-height: 1000px; border: 0; background: #fff; }
.inv-owed { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.15; }
.kv-tight { grid-template-columns: 90px 1fr; font-size: 13px; gap: 5px 10px; }
.inv-money { width: 100%; margin-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.inv-money td { padding: 5px 0; }
.ladder { list-style: none; margin: 0; padding: 0; }
.ladder li { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.ladder li:last-child { border-bottom: 0; }
.ladder .dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--faint); }
.ladder .state { color: var(--muted); font-size: 12.5px; text-align: right; }
.ladder .acts { grid-column: 2 / -1; display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.ladder .acts-note { justify-content: space-between; align-items: center; gap: 8px; }
.ladder .acts form, .ladder .undo { display: inline; }
.ladder .undo { grid-column: 3; text-align: right; }
.ladder li.st-sent .dot { background: var(--ok); border-color: var(--ok); }
.ladder li.st-sent .state { color: var(--ok); }
.ladder li.st-due .dot { background: var(--warn); border-color: var(--warn); }
.ladder li.st-due .name, .ladder li.st-due .state { color: var(--warn); font-weight: 600; }
.ladder li.is-next:not(.st-due) .dot { border-color: var(--warn); }
.ladder li.is-next:not(.st-due) .name { color: var(--warn); font-weight: 600; }
.ladder li.st-skipped .name, .ladder li.st-closed .name, .ladder li.st-later .name { color: var(--muted); }
.ladder li.st-skipped .state { text-decoration: line-through; }
.aged-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13px; padding: 5px 0; }
.aged-bar { grid-column: 1 / -1; height: 6px; background: var(--hover); border-radius: 3px; overflow: hidden; }
.aged-bar span { display: block; height: 100%; background: var(--chart); border-radius: 3px; }
.aged-bar span.late { background: var(--bad); }
details.fold > summary { list-style: none; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2::after { content: ' ▾'; color: var(--faint); font-weight: 400; }
details.fold:not([open]) > summary { border-bottom: 0; }
.menu-panel .menu-2 { display: flex; flex-direction: column; gap: 1px; }
.menu-panel .menu-2 small { font-size: 11.5px; color: var(--muted); }
.menu-panel button[disabled] { opacity: .5; cursor: not-allowed; }
.menu-panel button[disabled]:hover { background: none; }
.dialog-mail { width: min(640px, calc(100vw - 32px)); }
.dialog-mail textarea { min-height: 220px; font-size: 13.5px; line-height: 1.45; }
.brand-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; border: 1px solid var(--line); }
.brand-logo-sm { max-height: 28px; max-width: 120px; vertical-align: middle; background: #fff; border-radius: 3px; padding: 2px; }
.tpl-fields { font-size: 12px; color: var(--muted); line-height: 1.7; }
.tpl-fields code { background: var(--hover); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.chip .faint { margin-left: 5px; }
/* Phones: logo and buttons on one row, the sections in a sideways-scrolling strip under it. */
@media (max-width: 760px) {
  .brand-nav .inner { flex-wrap: wrap; row-gap: 6px; }
  .brand-nav .nav-links { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 12px 2px; }
  .brand-nav .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { white-space: nowrap; }
  .nav-right { margin-left: auto; }
  .nav-search { width: 110px; }
  .version { position: static; text-align: center; padding: 10px; }
}
@media (max-width: 760px) { .q-head { flex-wrap: wrap; } .q-head > .row, .page-head > .row { flex-wrap: wrap; } }
@media (max-width: 760px) { .q-group-head { flex-wrap: wrap; } .q-group-head > .row { flex-wrap: wrap; } }
@media (max-width: 760px) { #quote-root .card { overflow-x: auto; min-width: 0; } #quote-root .grid > * { min-width: 0; } }
@media (max-width: 760px) { .totals-bar .inner { overflow-x: auto; } }

/* ---------- Crew on calls (v0.5.0) ---------- */
.when-cell .link-btn { text-align: left; white-space: normal; line-height: 1.3; }
tr.people-row td { padding: 0 8px 8px 8px; border-top: 0; }
tr.people-row td.in-shift { padding-left: 22px; }
.people-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 2px; border-radius: 999px; font-size: 12.5px; border: 1px solid var(--line-2); background: var(--card); }
.pchip-booked { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: var(--ok-bg); }
.pchip-pencilled { border-style: dashed; border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.pav { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--hover); color: var(--ink-2); font-size: 10.5px; font-weight: 700; flex: none; }
.pchip-booked .pav { background: var(--ok); color: #fff; }
.pchip-act { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 3px; font-size: 12px; line-height: 1; }
.pchip-act:hover { color: var(--ink); }
.pchip-add { border: 1px dashed var(--line-2); background: none; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; font-family: inherit; }
.pchip-add:hover { color: var(--ink); border-color: var(--muted); background: var(--hover); }
.people-line .route { margin-left: 6px; }
.book-dialog { width: min(640px, calc(100vw - 32px)); }
.book-list { max-height: min(60vh, 520px); overflow: auto; border-top: 1px solid var(--line); }
.book-row { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line-soft); }
.book-row .pav { width: 30px; height: 30px; font-size: 12px; }
.book-state { text-align: right; min-width: 130px; }
.book-state .small { max-width: 220px; margin-left: auto; }
.week-day { border-bottom: 1px solid var(--line); }
.week-day > .head { display: flex; align-items: center; justify-content: space-between; padding: 9px 16px; background: var(--hover); font-weight: 600; font-size: 13.5px; }
.week-day.today > .head { box-shadow: inset 3px 0 0 var(--brand); }
.call-line { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 4px 14px; padding: 9px 16px; border-top: 1px solid var(--line-soft); font-size: 13.5px; align-items: start; }
.call-line .t { color: var(--muted); font-size: 12.5px; }
.avail-grid td.cell { text-align: center; font-size: 11.5px; padding: 6px 4px; min-width: 86px; }
.avail-grid .c-booked { background: var(--bad-bg); color: var(--bad); }
.avail-grid .c-pencilled { background: var(--warn-bg); color: var(--warn); }
.avail-grid .c-away { background: var(--hover); color: var(--muted); }
.avail-grid .c-free { color: var(--ok); }
.avail-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.avail-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.avail-legend .l-booked::before { background: var(--bad); } .avail-legend .l-pencilled::before { background: var(--warn); } .avail-legend .l-away::before { background: var(--faint); } .avail-legend .l-free::before { background: var(--ok); }
@media (max-width: 760px) { .call-line { grid-template-columns: minmax(0, 1fr); } }
/* crew & transport gets the full width (it has the most columns); costs sit under it */
.crew-costs { display: flex; flex-direction: column-reverse; gap: 16px; margin-top: 16px; }
@media (min-width: 761px) and (max-width: 1560px) {
  .brand-nav .inner { gap: 10px; }
  .nav-link { padding: .4rem .55rem; font-size: .84rem; }
  .nav-search { width: 150px; }
}
.add-label { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 70px; }
.pav svg { display: block; }

/* ---------- Job page: header, tabs, overview (v0.6.0) ---------- */
.job-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.job-sub { margin-top: 4px; color: var(--ink-2); font-size: 14px; display: flex; flex-wrap: wrap; gap: 2px 0; align-items: baseline; }
.job-sub .dot { color: var(--faint); margin: 0 8px; }
.job-tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; background: var(--bg); flex-wrap: wrap; }
@media (min-width: 761px) { .job-tabs { position: sticky; top: 55px; z-index: 30; } }
@media (max-width: 760px) { .job-tabs { flex-wrap: nowrap; overflow-x: auto; } .job-tabs .grow, .job-tabs .job-view { display: none !important; } }
.job-tabs a[data-tab] { padding: 10px 12px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.job-tabs a[data-tab]:hover { color: var(--ink); }
.job-tabs a[data-tab].on { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.tab-n { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: var(--hover); color: var(--muted); }
.tab-n.bad { background: var(--bad-bg); color: var(--bad); }
.tab-n.ok { background: var(--ok-bg); color: var(--ok); }
.job-view { display: inline-flex; gap: 12px; align-items: center; padding: 4px 0; }
.job-view .seg button { padding: 4px 10px; }
/* only the chosen tab's parts show (hiding the rest keeps each part's own display) */
body[data-tab="overview"] [data-panel]:not([data-panel~="overview"]),
body[data-tab="equipment"] [data-panel]:not([data-panel~="equipment"]),
body[data-tab="crew"] [data-panel]:not([data-panel~="crew"]),
body[data-tab="costs"] [data-panel]:not([data-panel~="costs"]),
body[data-tab="invoices"] [data-panel]:not([data-panel~="invoices"]),
body[data-tab="activity"] [data-panel]:not([data-panel~="activity"]) { display: none !important; }
body[data-tab="crew"] .crew-costs, body[data-tab="costs"] .crew-costs { margin-top: 0; }
body[data-tab="overview"] .grid[data-panel~="overview"] { grid-template-columns: minmax(0, 1fr); }
@media print { body[data-tab] [data-panel]:not(.job-view) { display: block !important; } }
.overview .ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .overview .ov-grid { grid-template-columns: minmax(0, 1fr); } }
.steps { list-style: none; margin: 0; padding: 4px 0; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 14px; border-bottom: 1px solid var(--line-soft); }
.steps li:last-child { border-bottom: 0; }
.steps .tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: none; }
.steps li.done { color: var(--muted); }
.steps li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.now { background: var(--hover); font-weight: 600; }
.steps li.now .tick { border-color: var(--brand); }
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.glance a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); color: inherit; }
.glance a:hover { background: var(--hover); }
.glance .k { font-size: 12px; color: var(--muted); }
.glance .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.glance .h { font-size: 12px; color: var(--muted); }

/* several preppers on one job */
.preppers { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 13px; }
.prepper { display: inline-flex; align-items: center; gap: 7px; }
.prepper.me .pav { background: var(--brand); color: var(--on-brand); }
tr.prep-group td { background: var(--weekend); }
.prep-who { width: auto; min-width: 150px; }
.prep-who.free { color: var(--muted); border-style: dashed; }
/* warehouse */
.wh-row { display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-top: 1px solid var(--line-soft); }
.wh-time { width: 58px; flex: none; font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.wh-prep { width: 150px; flex: none; }
.prep-bar.sm { height: 5px; margin: 3px 0; }
.wh-day { padding: 8px 16px; background: var(--hover); font-size: 12.5px; font-weight: 600; color: var(--ink-2); border-top: 1px solid var(--line-soft); }
.wh-side { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-top: 1px solid var(--line-soft); color: inherit; }
.wh-side:hover { background: var(--hover); }
@media (max-width: 640px) { .wh-row { flex-wrap: wrap; } .wh-prep { width: 100%; } }

.wordmark-text { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .02em; }

/* v0.7: Xero */
.xero-steps li { margin-bottom: 4px; }
.xero-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* v0.7.2: logos card */
.logo-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1200px) { .logo-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .logo-slots { grid-template-columns: minmax(0, 1fr); } }
.logo-slot { display: flex; flex-direction: column; gap: 6px; }
.logo-preview { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); }
.logo-preview img { max-height: 44px; max-width: 100%; }
.logo-on-light { background: #fff; }
.logo-on-dark { background: #1f2328; border-color: #1f2328; }

/* v0.7.2: login */
.login-bg { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 60%), var(--bg-2); }
.login-card { width: 100%; max-width: 400px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .12); padding: 34px 30px 26px; }
[data-theme="dark"] .login-card { box-shadow: 0 20px 60px rgba(0, 0, 0, .55); }
.login-brand { display: flex; justify-content: center; align-items: center; margin-bottom: 22px; min-height: 40px; }
.login-brand img { width: auto; max-width: 100%; object-fit: contain; }
.login-chip { display: inline-flex; background: #fff; border-radius: 10px; padding: 10px 14px; }
.login-name { font-size: 24px; font-weight: 700; letter-spacing: .03em; text-align: center; }
.login-title { font-size: 20px; font-weight: 600; margin: 0; text-align: center; color: var(--ink); }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 2px 0 22px; }
.login-input { padding: 10px 12px; font-size: 15px; }
.login-remember { color: var(--ink-2); font-size: 13px; }
.login-btn { width: 100%; padding: 11px; font-size: 15px; font-weight: 600; }
.login-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 20px 0 0; }

/* v0.7.3: item picker, category manage */
.item-picker { position: relative; min-width: 200px; }
.item-picker .input { width: 100%; }
.picker-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 30px rgba(15, 23, 42, .16); max-height: 280px; overflow: auto; padding: 4px; }
.picker-row { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; color: var(--ink); padding: 7px 9px; border-radius: 6px; cursor: pointer; font: inherit; }
.picker-row:hover, .picker-row.on { background: var(--hover); }
.picker-name { font-size: 13px; font-weight: 500; }
.picker-meta { font-size: 11.5px; color: var(--muted); }
.picker-empty { padding: 9px; font-size: 13px; color: var(--muted); }
.picker-missing { border-color: var(--bad) !important; }
.cat-manage .input { width: 100%; }

/* v0.8: people, sections */
.section-label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 4px; }
.people-list { padding: 2px 16px; }
.person-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.person-row:last-child { border-bottom: 0; }
.person-row .badge { margin-left: 4px; vertical-align: 1px; }
.recipient-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.recipient-chips .chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.recipient-chips .chip:hover { background: var(--hover); }
.recipient-chips .chip.on { background: var(--brand-soft, var(--hover)); border-color: var(--brand, var(--line)); font-weight: 600; }
.recipient-chips .chip.on::before { content: '✓ '; }
/* v0.8.0: adding accessories to a line on the quote */
table.q tr.acc-add-row { display: none; }
table.q tr.acc-add-row.open { display: table-row; }
table.q tr.acc-add-row td { background: var(--hover); padding-top: 8px; padding-bottom: 8px; }
.acc-add-btn { margin-left: 6px; font: inherit; font-size: 11.5px; color: var(--muted); background: transparent; border: 1px dashed var(--line); border-radius: 999px; padding: 0 8px; cursor: pointer; opacity: 0; transition: opacity .12s; }
table.q tr:hover .acc-add-btn, .acc-add-btn.on, .acc-add-btn:focus-visible { opacity: 1; }
.acc-add-btn.has { opacity: 1; color: var(--ink); border-style: solid; }
.acc-add-btn:hover, .acc-add-btn.on { background: var(--hover); color: var(--ink); }
@media (hover: none) { .acc-add-btn { opacity: 1; } }
/* v0.11.0: product photo picker */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.photo-pick img { width: 100%; height: 110px; object-fit: contain; }
.photo-pick span { font-size: 11px; color: #6b717a; }
.photo-pick:hover { border-color: var(--brand); }
.photo-pick.busy { opacity: .5; pointer-events: none; }
.photo-pick.bad { border-color: var(--bad); }
.paste-zone { border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; outline: none; }
.paste-zone:focus, .paste-zone.over { border-color: var(--brand); background: var(--hover); }
.paste-hint { font-size: 13px; color: var(--muted); margin-top: 10px; }
.paste-state { margin-top: 8px; font-weight: 600; min-height: 1em; }
/* v0.11.1: ten menu items fit on one line on a laptop */
@media (min-width: 761px) and (max-width: 1320px) {
  .nav-link { padding: .35rem .45rem; font-size: .8rem; }
  .nav-search { width: 110px; }
  .brand-nav .wordmark .tag { display: none; }
}

/* two-step login setup */
.twofa-setup { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.twofa-setup img { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px 16px; margin-top: 8px; font-size: 14px; }

/* System page */
.error-row summary { cursor: pointer; font-size: 13.5px; line-height: 1.5; }
.error-detail { white-space: pre-wrap; word-break: break-word; font-size: 11.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 6px 0 4px; max-height: 260px; overflow: auto; }
a.card.stat { color: inherit; text-decoration: none; }

/* "changed since it was accepted" on a job */
.agreed-changed { margin-top: 8px; background: color-mix(in srgb, #f59e0b 12%, var(--card)); border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--line)); border-radius: 8px; padding: 7px 10px; font-size: 13.5px; max-width: 760px; }
.agreed-changed summary { cursor: pointer; }
.agreed-changed ul { margin: 6px 0; padding-left: 20px; }

/* labels */
.labels-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .labels-layout { grid-template-columns: minmax(0, 1fr); } }
.unit-grid { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.label-preview { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; margin-top: 6px; }
.scanned-photo { width: 92px; height: 92px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.scanned-job { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.scanned-job:last-child { border-bottom: 0; }


/* ---------- v0.16: simpler navigation ---------- */
.nav-links { flex: 1; flex-wrap: nowrap; }
.nav-link { font-size: .92rem; padding: .42rem .9rem; }
.subnav { background: var(--card); border-bottom: 1px solid var(--line); }
.subnav .inner { max-width: 1400px; margin: 0 auto; padding: 0 16px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav .inner::-webkit-scrollbar { display: none; }
.subnav a { padding: 10px 12px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav a:hover { color: var(--ink); }
.subnav a.on { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.nav-new-btn { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: .38rem .8rem; border-radius: 999px; font-size: .86rem; font-weight: 600; color: #fff; background: rgba(255,255,255,.14); }
.nav-new-btn::-webkit-details-marker { display: none; }
.nav-new-btn:hover { background: rgba(255,255,255,.22); }
.nav-new .menu-panel { right: 0; left: auto; }
@media (min-width: 761px) and (max-width: 1320px) { .nav-link { padding: .4rem .7rem; font-size: .88rem; } }

/* ---------- v0.16: phones ---------- */
@media (max-width: 760px) {
  .brand-nav .inner { padding: 8px 12px; gap: 8px; }
  .brand-nav .wordmark .tag { display: none; }
  .brand-nav .nav-links { margin: 0 -12px; padding: 0 8px 2px; justify-content: space-between; }
  .nav-link { padding: .45rem .7rem; font-size: .95rem; }
  .nav-search { width: 40px; padding-right: 0; color: transparent; }
  .nav-search::placeholder { color: transparent; }
  .nav-new-btn span { display: none; }
  .nav-new-btn { padding: .38rem .7rem; font-size: 1.05rem; }
  .theme-btn { display: none; }
  .page { padding: 14px 12px 120px; }
  .page-head h1, .job-head h1 { font-size: 22px; }
  .job-head { align-items: flex-start; }
  .job-head > .row { width: 100%; flex-wrap: wrap; }
  .job-head > .row .btn { flex: 1 1 auto; justify-content: center; }
  .card-head { flex-wrap: wrap; gap: 6px; }
  .table-wrap, .card > table.t { overflow-x: auto; display: block; }
  .card > table.t { width: 100%; }
  .t th, .t td { padding-left: 10px; padding-right: 10px; }
  .totals-bar .t:not(.big), .totals-bar .div { display: none; }
  .totals-bar .inner { justify-content: space-between; gap: 10px; padding: 8px 14px; }
  dialog.dialog { width: calc(100vw - 16px); max-width: none; margin: 8px auto; max-height: calc(100vh - 16px); }
  .flash { margin-left: 0; margin-right: 0; }
}

/* ---------- v0.16: job overview ---------- */
.overview .ov-grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .overview .ov-grid-2 { grid-template-columns: minmax(0, 1fr); } }
.progress-card { padding: 14px 16px 12px; margin-bottom: 16px; }
.track { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.track li { flex: 1 0 auto; min-width: 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 12px; color: var(--muted); text-align: center; }
.track li::before { content: ''; position: absolute; top: 10px; left: calc(-50% + 12px); right: calc(50% + 12px); height: 2px; background: var(--line-2); }
.track li:first-child::before { display: none; }
.track li.done::before, .track li.now::before { background: var(--ok); }
.track .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--card); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; position: relative; z-index: 1; }
.track li.done .dot { background: var(--ok); border-color: var(--ok); }
.track li.now { color: var(--ink); font-weight: 600; }
.track li.now .dot { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.progress-card .next { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 14px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.show-sm { display: none; }
@media (max-width: 760px) { .hide-sm { display: none !important; } .show-sm { display: block; } }
@media (max-width: 640px) {
  .grid-3:has(> .stat), .grid-4:has(> .stat), .grid-5:has(> .stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat .value { font-size: 19px; }
  .stat .hint { font-size: 11.5px; }
}
.settings-jump { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 16px; }
.settings-jump a { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.settings-jump a:hover { border-color: var(--line-2); }
[id] { scroll-margin-top: 70px; }

/* AI quote drafts */
.ai-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .ai-layout { grid-template-columns: minmax(0, 1fr); } }
.ai-side { position: sticky; top: 70px; }
.ai-brief { margin-bottom: 16px; border-left: 3px solid var(--brand); }
.ai-list { margin: 0; padding-left: 32px; line-height: 1.5; font-size: 14px; }
.ai-box textarea { min-height: 96px; font-size: 15px; }

/* v0.18.0: each section's pages drop down from the menu bar on hover (desktop) */
.nav-item { position: relative; display: flex; }
.nav-caret { width: 10px; height: 10px; margin-left: 1px; opacity: .65; transition: transform .15s; }
.nav-drop { display: none; position: absolute; left: 0; top: 100%; padding-top: 8px; z-index: 60; }
.nav-drop .menu-panel { position: static; min-width: 230px; animation: nav-drop-in .12s ease-out; }
.nav-drop-link { display: flex !important; flex-direction: column; gap: 1px; }
.nav-drop-link span { font-weight: 600; font-size: 13.5px; }
.nav-drop-link small { font-size: 12px; color: var(--muted); }
.nav-drop-link.on { background: var(--hover); box-shadow: inset 3px 0 0 var(--brand); }
@keyframes nav-drop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (hover: hover) and (min-width: 761px) {
  .nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop { display: block; }
  .nav-item:hover .nav-caret { transform: rotate(180deg); opacity: 1; }
}
@media (hover: none), (max-width: 760px) { .nav-caret { display: none; } }

/* v0.18.0: label designer */
.ld { display: grid; grid-template-columns: minmax(0, 1fr) 380px; overflow: hidden; }
.ld > .card-foot { grid-column: 1 / -1; }
.ld-stage { display: flex; flex-direction: column; min-width: 0; color: #e2e8f0;
  background: radial-gradient(circle at 1px 1px, rgba(255,255,255,.07) 1px, transparent 0) 0 0 / 14px 14px, #1f2430; }
.ld-stage-head, .ld-stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; }
.ld-stage-foot { font-size: 12px; color: #94a3b8; }
.ld-badge { font: 500 12px/1 'IBM Plex Mono', monospace; background: rgba(255,255,255,.1); padding: 6px 9px; border-radius: 999px; }
.ld-zoom { display: inline-flex; background: rgba(255,255,255,.08); border-radius: 8px; padding: 2px; }
.ld-zoom button { font: inherit; font-size: 12px; color: #cbd5e1; background: none; border: 0; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.ld-zoom button.on { background: rgba(255,255,255,.18); color: #fff; }
.ld-canvas { flex: 1; min-height: 240px; display: flex; align-items: center; justify-content: center; padding: 28px 40px 44px 28px; overflow-x: auto; }
.ld-label-wrap { position: relative; flex: none; }
.ld-frame { display: block; border: 0; background: #fff; border-radius: 3px; box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.2); transition: width .15s, height .15s; }
.ld-tape-edge { position: absolute; left: -18px; right: -18px; height: 6px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 6px, transparent 6px 10px); opacity: .5; }
.ld-tape-top { top: -10px; } .ld-tape-bottom { bottom: -10px; }
.ld-dim { position: absolute; font: 500 11px/1 'IBM Plex Mono', monospace; color: #94a3b8; }
.ld-dim-w { left: 0; right: 0; bottom: -30px; border-top: 1px solid #64748b; text-align: center; }
.ld-dim-w::before, .ld-dim-w::after { content: ''; position: absolute; top: -5px; width: 1px; height: 9px; background: #64748b; }
.ld-dim-w::before { left: 0; } .ld-dim-w::after { right: 0; }
.ld-dim-w span { position: relative; top: -6px; background: #1f2430; padding: 0 6px; }
.ld-dim-h { top: 0; bottom: 0; right: -30px; border-left: 1px solid #64748b; display: flex; align-items: center; }
.ld-dim-h::before, .ld-dim-h::after { content: ''; position: absolute; left: -5px; width: 9px; height: 1px; background: #64748b; }
.ld-dim-h::before { top: 0; } .ld-dim-h::after { bottom: 0; }
.ld-dim-h span { writing-mode: vertical-rl; background: #1f2430; padding: 6px 0; margin-left: -6px; }
.ld-controls { padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; border-left: 1px solid var(--line); max-height: 720px; overflow-y: auto; }
.ld-group { display: flex; flex-direction: column; }
.ld-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin-bottom: 7px; }
.ld-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.ld-choices-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ld-choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 6px 7px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--card); transition: border-color .12s, box-shadow .12s, background .12s; text-align: center; }
.ld-choice:hover { border-color: var(--ink-3, #94a3b8); }
.ld-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ld-choice b { font-size: 12px; font-weight: 500; }
.ld-choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.ld-choice:has(input:checked) b { font-weight: 700; }
.ld-choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.ld-diagram { width: 100%; max-width: 92px; height: auto; display: block; }
.ld-d-label { fill: #fff; stroke: #cbd5e1; }
.ld-d-ink { fill: #111827; }
.ld-d-faint { fill: #9ca3af; }
.ld-d-logo { fill: var(--brand); }
.ld-tape-swatch { height: 36px; width: 100%; display: flex; align-items: center; justify-content: center; }
.ld-tape-swatch i { display: block; width: 80%; background: #fff; border: 1px solid #cbd5e1; border-left: 0; border-right: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.02); background-image: linear-gradient(90deg, #111827 0 22%, transparent 22% 30%, #9ca3af 30% 80%, transparent 80%); background-size: 100% 30%; background-repeat: no-repeat; background-position: 0 50%; }
.ld-logo-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; }
.ld-logo-thumb { flex: none; width: 76px; height: 44px; border: 1px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #fff; padding: 4px; }
.ld-logo-thumb img { max-width: 100%; max-height: 100%; filter: grayscale(1) contrast(1.2); }
.ld-range { width: 100%; accent-color: var(--brand); }
.ld-foot { justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ld-is-dirty [data-ld-dirty] { color: var(--warn, #b45309); }
details.ld-group > summary { cursor: pointer; }
[data-theme="dark"] .ld-choice { background: var(--card); }
@media (max-width: 980px) {
  .ld { grid-template-columns: minmax(0, 1fr); }
  .ld-controls { border-left: 0; border-top: 1px solid var(--line); max-height: none; }
  .ld-canvas { min-height: 180px; padding: 22px 36px 40px 18px; }
}

.ld-size { margin-top: 9px; transition: opacity .15s; }
.ld-size .lbl { display: flex; justify-content: space-between; margin-bottom: 0; }
.ld-size.ld-off { opacity: .4; pointer-events: none; }

/* colour fields */
.colour-field { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.colour-field > .input { flex: 1; min-width: 110px; }
.colour-swatch { position: relative; flex: none; width: 38px; height: 38px; border-radius: 9px; background: var(--c, #3a3d42); border: 1px solid var(--line); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); cursor: pointer; overflow: hidden; }
.colour-swatch:hover { box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.colour-swatch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.colour-suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.colour-suggest[hidden] { display: none; }
.colour-chip { width: 24px; height: 24px; border-radius: 7px; border: 1px solid rgba(0,0,0,.15); cursor: pointer; padding: 0; transition: transform .1s; }
.colour-chip:hover { transform: scale(1.12); }
.input-bad { border-color: var(--bad, #dc2626) !important; }

.btn-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(255,255,255,.22); }

/* document designer (reuses the label designer's .ld-* parts) */
.dd .ld-stage-head { flex-wrap: wrap; }
.dd .ld-zoom { flex-wrap: wrap; }
.dd-canvas { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 8px 16px 18px; min-height: 420px; overflow: auto; }
.dd-frame { display: block; border: 0; background: #fff; border-radius: 2px; box-shadow: 0 12px 34px rgba(0,0,0,.5); }
.ld-choices-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dd-font { font-size: 22px; line-height: 36px; height: 36px; color: var(--ink); }
.ld-d-white { fill: #fff; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.dd .ld-controls { max-height: 980px; }

/* v0.20.0: goes-with suggestions, packages, swaps, budget */
.sugg-card { margin-top: 12px; border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
.sugg-card .card-head { gap: 10px; }
.sugg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.sugg { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-top: 1px solid var(--line); }
.sugg-main { flex: 1; min-width: 0; }
.sugg-main b { font-weight: 600; }
.pkg-card { margin-top: 12px; }
.swap-body { max-height: 70vh; overflow: auto; }
.swap-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.swap-opt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px dashed var(--line); }
.budget-out { min-height: 54px; }
.budget-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.budget-grid .k { font-size: 12px; color: var(--muted); }
.budget-grid .v { font-size: 18px; font-weight: 600; }
.budget-lines { display: flex; flex-direction: column; max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.budget-line { display: flex !important; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); margin: 0; }
.budget-line:last-child { border-bottom: 0; }
@media (max-width: 640px) { .sugg-list { grid-template-columns: minmax(0, 1fr); } .budget-grid { grid-template-columns: 1fr 1fr; } }
.pkg-card form { flex-wrap: nowrap; }
.subs-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.subs-table select.sub-status.b-ok { border-color: color-mix(in srgb, var(--ok, #16a34a) 50%, var(--line)); }
.subs-table select.sub-status.b-warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.sub-chip { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; background: var(--hover); color: var(--muted); }
.sub-chip.sub-confirmed, .sub-chip.sub-received { background: color-mix(in srgb, #16a34a 14%, transparent); color: #15803d; }
.sub-chip.sub-requested { background: var(--warn-bg); color: var(--warn); }
[data-theme="dark"] .sub-chip.sub-confirmed, [data-theme="dark"] .sub-chip.sub-received { color: #4ade80; }
.subs-table .cell-in { width: 60px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; text-align: right; }
.subs-table .cell-in.w80 { width: 86px; }
.subs-table select.input-sm { max-width: 190px; }
.refund-match { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.refund-match:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 22%, transparent); }
.refund-match input { margin-top: 3px; }

/* v0.22.3: status split button on the job, warehouse check-in */
.btn-split { display: inline-flex; align-items: stretch; }
.btn-split > form { display: flex; }
.btn-split > form > .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-split > .menu > summary.split-caret { height: 100%; border-top-left-radius: 0; border-bottom-left-radius: 0; padding: 0 10px; margin-left: 1px; display: inline-flex; align-items: center; }
.btn-split.split-solo > .menu > summary { border-radius: var(--radius); }
.status-menu .menu-panel { min-width: 250px; }
.menu-panel .menu-head { padding: 6px 10px 6px; font-size: 12px; color: var(--muted); }
.menu-panel .menu-head b { color: var(--ink); }
.ci-scan { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 14px; }
.ci-scan-field { flex: 1 1 320px; max-width: 460px; }
.ci-scan-job { flex: 0 1 300px; }
.ci-scan-help { flex: 1 1 100%; }
.ci-job { display: flex; align-items: flex-start; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.ci-job-main { flex: 1; min-width: 0; }
.ci-job-prog { width: 150px; flex: none; padding-top: 2px; }
.ci-job-actions { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.ci-left { margin-top: 6px; }
.ci-left summary { cursor: pointer; color: var(--muted); }
.ci-left ul { margin: 6px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 24px; font-size: 13px; }
.ci-left li { padding: 2px 0; break-inside: avoid; }
.ci-qty { display: inline-block; min-width: 34px; color: var(--muted); }
@media (max-width: 760px) {
  .ci-job { flex-wrap: wrap; }
  .ci-job-main { flex: 1 1 100%; }
  .ci-job-prog { width: auto; flex: 1 1 140px; }
  .ci-left ul { columns: 1; }
}

/* v0.23.0: sales */
.project-form[data-kind="sale"] .not-sale { display: none !important; }
.project-form:not([data-kind="sale"]) .only-sale { display: none; }
.item-form[data-kind="sale"] .only-hire { display: none !important; }
.item-form:not([data-kind="sale"]) .only-sale { display: none !important; }
.low-stock { color: var(--bad, #b42318); font-weight: 600; }

/* v0.24.0: job sheet, my jobs */
.sheet-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.my-call { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.my-call:hover { background: var(--hover); }
.my-date { width: 44px; flex: none; text-align: center; line-height: 1.1; }
.my-date b { display: block; font-size: 20px; }
.my-date span { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.role-grid th.rot { font-size: 11.5px; font-weight: 600; text-align: center; white-space: nowrap; }
.role-grid td.c { text-align: center; }

/* v0.25.0: notifications */
.nav-bell { position: relative; }
.nav-bell > summary { position: relative; display: inline-flex; align-items: center; justify-content: center; list-style: none; }
.nav-bell > summary::-webkit-details-marker { display: none; }
.bell-count { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: #e5484d; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.bell-panel { width: 340px; right: 0; max-height: 70vh; overflow: auto; }
.bell-item { display: flex !important; gap: 8px; align-items: flex-start; }
.bell-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.bell-item.unread, .note-row.unread { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.note-row { display: flex; gap: 10px; align-items: flex-start; padding: 11px 16px; border-top: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.note-row:hover { background: var(--hover); }
.note-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--muted); flex: none; margin-top: 6px; }
.note-accepted, .note-payment { background: #30a46c; }
.note-short { background: #f5a524; }
.note-system { background: #e5484d; }
.note-booked { background: #3e63dd; }
@media (max-width: 760px) { .bell-panel { position: fixed; left: 8px; right: 8px; width: auto; top: 56px; } }
.util-bar { display: inline-block; width: 60px; height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.util-bar > span { display: block; height: 100%; background: var(--brand); }
.cam-btn { display: inline-flex; align-items: center; gap: 5px; }
.cam-dialog { width: min(520px, calc(100vw - 24px)); padding: 0; }
.cam-wrap { position: relative; background: #000; aspect-ratio: 4 / 3; overflow: hidden; }
.cam-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-aim { position: absolute; inset: 18% 22%; border: 2px solid rgba(255,255,255,.85); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); pointer-events: none; }

/* v0.26.0: staging copy */
.staging-bar { background: repeating-linear-gradient(135deg, #f5a524, #f5a524 14px, #f0b84a 14px, #f0b84a 28px); color: #1c1c1c; font-size: 12.5px; font-weight: 700; text-align: center; padding: 5px 10px; letter-spacing: .02em; }

/* v0.27.0: AI on a job, riders, low stock notices */
.flash-info { background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 30%, transparent); color: var(--ink); }
.btn-ai { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 40%, var(--line-2)); }
.btn-ai:hover { background: var(--violet-bg); }
#ai-job-dialog { width: min(620px, calc(100vw - 32px)); }
#ai-job-dialog textarea { min-height: 110px; }
.ai-file { cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-file.has-file { border-color: var(--brand); color: var(--brand); }
.note-stock { background: #8e4ec6; }

/* v0.28.0: section dates */
.sec-dates { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; border: 1px dashed var(--line-2); background: none; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.sec-dates:hover { background: var(--hover); color: var(--ink); }
.sec-dates.on { border-style: solid; border-color: color-mix(in srgb, var(--info) 35%, transparent); background: var(--info-bg); color: var(--info); font-weight: 600; }
.sec-dates.sub { cursor: default; font-weight: 500; }
.run-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.run-tab { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); font-size: 13px; text-decoration: none; }
.run-tab.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.run-tab small { opacity: .75; margin-left: 4px; }
dialog[id^="gdates-"] { width: min(520px, calc(100vw - 32px)); }
dialog[id^="gdates-"] .form-grid { grid-template-columns: minmax(0, 1fr); }
dialog[id^="gdates-"] .form-grid input[type=date] { flex: 1; }

/* v0.29.0: standby copy */
.standby-bar { background: #1d4ed8; color: #fff; font-size: 12.5px; font-weight: 600; text-align: center; padding: 6px 16px; letter-spacing: .01em; }
.standby-bar a { color: #fff; text-decoration: underline; }
.standby-bar.stale { background: #b45309; }
.standby-bar.live { background: #b91c1c; }
.code-box { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--hover); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; word-break: break-all; user-select: all; }

/* v0.30.0: passkeys */
.margin-bad { color: var(--bad); }
.login-or { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--muted); font-size: 12px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-passkey { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.passkey-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.passkey-row:first-child { border-top: 0; }
.machine { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; }
.machine-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.machine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; }
.machine-grid .prep-bar { margin-top: 5px; }
.prep-bar.bad span { background: var(--bad); }

/* v0.32.0: crew the same for every option, or different for each */
.crew-opts { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); background: var(--bg-soft, transparent); }
.crew-opts .seg { flex-wrap: wrap; }
