/* RMS styles. No build step. (v0.35.0: back on the system font after trying National Park.) */

: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; }
/* v0.88.0: folding categories */
.tree .trow { display: flex; align-items: center; gap: 2px; }
.tree .trow > a { flex: 1; min-width: 0; }
.tree .trow > a span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree .tfold, .tree .tfold-sp { flex: none; width: 20px; height: 24px; }
.tree .tfold { display: grid; place-items: center; border: 0; background: none; color: var(--faint); cursor: pointer; border-radius: var(--radius); padding: 0; }
.tree .tfold:hover { background: var(--hover); color: var(--ink); }
.tree .tfold svg { transition: transform .15s; }
.tree .tfold[aria-expanded="true"] svg { transform: rotate(90deg); }
.tree .children { margin-left: 18px; }
.tree-tools { display: flex; flex-direction: column; gap: 4px; padding: 2px 2px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.tree mark { background: color-mix(in srgb, var(--brand) 14%, transparent); color: inherit; border-radius: 2px; }
.tree a.on mark { background: rgba(255,255,255,.25); }
/* v0.88.0: the searchable category picker (select[data-combo]) */
.combo { position: relative; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; max-height: 300px; overflow: auto; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(15,23,42,.15); padding: 4px; }
.combo-opt { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; background: none; border-radius: var(--radius); font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.combo-opt .trail { color: var(--faint); }
.combo-opt.active, .combo-opt:hover { background: var(--hover); }
.combo-opt.sel { font-weight: 600; }
.combo-opt mark { background: color-mix(in srgb, var(--brand) 16%, transparent); color: inherit; border-radius: 2px; }
.combo-opt.new { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 9px; color: var(--ink-2); }
.combo-empty { padding: 8px 10px; color: var(--faint); font-size: 13px; }
.combo-input { padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }

/* ---------- 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; }
/* v0.96.1: the prep / check-in tick, drawn (the browser's own drew a tiny tick in a black box) */
table.prep .tick { -webkit-appearance: none; appearance: none; margin: 0; width: 26px; height: 26px; border: 1.5px solid var(--line-2); border-radius: 8px; background: var(--card); display: inline-grid; place-content: center; vertical-align: middle; cursor: pointer; transition: background .12s, border-color .12s, box-shadow .12s; }
table.prep .tick::after { content: ''; width: 15px; height: 15px; background: #fff; transform: scale(0); transition: transform .14s cubic-bezier(.2,.9,.3,1.4);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%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 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
table.prep .tick:hover { border-color: #16a34a; box-shadow: 0 0 0 3px color-mix(in srgb, #16a34a 14%, transparent); }
table.prep .tick:checked { background: #16a34a; border-color: #16a34a; }
table.prep .tick:checked::after { transform: scale(1); }
table.prep .tick:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
table.prep .tick:disabled { opacity: .4; cursor: default; box-shadow: none; }
body.tablet #prep-root table.prep .tick { width: 34px; height: 34px; border-radius: 10px; }
body.tablet #prep-root table.prep .tick::after { width: 20px; height: 20px; }

/* 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; border-collapse: collapse; }
/* v0.52.1: a paid invoice's headline, and its payments */
.inv-paid { color: var(--ok); }
.inv-tick { font-size: 18px; vertical-align: 4px; }
.pay-list { list-style: none; margin: 4px 0 0; padding: 0; }
.pay-list li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.pay-list li:last-child { border-bottom: 0; }
.pay-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.pay-acts { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.pay-acts form { margin: 0; }
.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: 10px; 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"]),
body[data-tab="warehouse"] [data-panel]:not([data-panel~="warehouse"]),
body[data-tab="hs"] [data-panel]:not([data-panel~="hs"]),
body[data-tab="files"] [data-panel]:not([data-panel~="files"]) { 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); }
/* v0.51.0: set up, but the job isn't confirmed yet */
.track li.ready .dot { border-style: dashed; border-color: color-mix(in srgb, var(--ok) 70%, transparent); color: var(--ok); font-size: 18px; line-height: 1; }
.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.support { background: #0F1115; }   /* v0.104.0: INSITES support is signed in */
.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; }
.login-google { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; text-decoration: none; }   /* v0.65.0 */
.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; }

/* v0.33.0: drag a line to another section */
.drag-h { touch-action: none; cursor: grab; border: 0; background: transparent; color: var(--ink-3, #8a9099); font-size: 13px; line-height: 1; padding: 2px 4px 2px 0; margin-right: 2px; opacity: .45; vertical-align: middle; }
tr:hover > td .drag-h, .drag-h:focus-visible { opacity: 1; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }
tr.dragging > td { opacity: .35; }
.q-group.drop-on { box-shadow: 0 0 0 2px var(--brand); }
.drop-mark { position: fixed; height: 3px; border-radius: 2px; background: var(--brand); pointer-events: none; z-index: 60; }
.drag-ghost { position: fixed; z-index: 61; pointer-events: none; padding: 5px 10px; border-radius: 6px; background: var(--card); color: var(--ink); border: 1px solid var(--line-2); box-shadow: 0 6px 18px rgba(0,0,0,.25); font-size: 12.5px; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.move-menu { position: absolute; right: auto; top: auto; z-index: 62; min-width: 220px; max-height: 320px; overflow: auto; display: block; }
.move-menu button { display: block; width: 100%; text-align: left; }
.move-menu button[disabled] { opacity: .5; }
@media (hover: none) { .drag-h { opacity: .8; } }

/* ---------- v0.34.0: fewer generic details ----------
   No dot separators (a gap instead), squared-off badges and chips, no emoji, and small text a
   touch bigger and darker so it can be read. */
.sep { display: inline-block; width: .9em; }
.i-clip { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5 12.5 20a5.5 5.5 0 0 1-7.8-7.8l8.5-8.5a3.7 3.7 0 0 1 5.2 5.2l-8.5 8.5a1.8 1.8 0 0 1-2.6-2.6l7.8-7.8'/%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 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5 12.5 20a5.5 5.5 0 0 1-7.8-7.8l8.5-8.5a3.7 3.7 0 0 1 5.2 5.2l-8.5 8.5a1.8 1.8 0 0 1-2.6-2.6l7.8-7.8'/%3E%3C/svg%3E") center / contain no-repeat; }

/* badges and chips: squared off, no dot */
.pill { border-radius: 4px; padding: 2px 8px; font-weight: 600; }
.pill::before { display: none; }
.wordmark .tag, .nav-link, .nav-count, .nav-search, .search-pill, .gear-avail, .chip, .acc-count, .pchip, .pchip-add, .tab-n,
.recipient-chips .chip, .acc-add-btn, .nav-new-btn, .settings-jump a, .ld-badge, .btn-badge, .sub-chip, .sec-dates, .run-tab { border-radius: 5px; }
.nav-link { border-radius: 6px; }

/* small text that can be read */
.small { font-size: 12.5px; }
.help { font-size: 12.5px; }
.badge { font-size: 12px; }
.tab-n { font-size: 11.5px; }
table.q th { font-size: 12px; }
.totals-bar .t .k { font-size: 12px; }
.stat .label, .stat .hint { font-size: 12.5px; }
:root { --faint: #7b8794; }
[data-theme="dark"] { --faint: #8a93a0; }
/* the keyboard tips under "Add gear" only while typing there */
.add-row .add-tips { display: none; }
.add-row:focus-within .add-tips { display: inline; }

/* even-width figures in tables and totals */
table, .stat .value, .totals-bar { font-variant-numeric: tabular-nums; }

/* ---------- v0.35.0: Settings in sections, with a search ---------- */
.set-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-side { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 90px); overflow: auto; padding-bottom: 12px; }
.set-search { width: 100%; }
.set-nav { display: flex; flex-direction: column; gap: 2px; }
/* v0.40.0: groups stand out (icon, capitals, a rule above); each section says what it's for */
.set-group { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink); margin: 14px 0 4px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.set-group:first-child { margin-top: 0; padding-top: 2px; border-top: 0; }
.set-group svg { color: var(--brand); flex: none; }
.set-link { display: block; padding: 7px 10px 7px 34px; border-radius: var(--radius); color: var(--ink-2); line-height: 1.25; border: 1px solid transparent; }
.set-link .t { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.set-link .d { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.set-link:hover { background: var(--hover); }
.set-link.on { background: var(--card); border-color: var(--line); box-shadow: inset 3px 0 0 var(--brand); }
.set-link.on .t { font-weight: 650; }
.set-out .t { color: var(--ink-2); }
.set-main > .stack > .card.set-off { display: none !important; }
.set-layout:not(.set-ready) .set-main > .stack > .card:not(#company) { display: none; }
.set-results { margin-bottom: 14px; }
.set-else { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.set-else-link { padding: 6px 11px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--card); font-size: 13px; }
.set-else-link:hover { border-color: var(--ink); }
.set-hit { background: var(--warn-bg); box-shadow: 0 0 0 3px var(--warn-bg); border-radius: 2px; }
@media (max-width: 860px) {
  .set-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .set-side { position: static; max-height: none; overflow: visible; }
  .set-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; scrollbar-width: none; }
  .set-nav::-webkit-scrollbar { display: none; }
  .set-group { display: none; }
  .set-link { white-space: nowrap; border: 1px solid var(--line); background: var(--card); padding: 6px 10px; }
  .set-link .d { display: none; }
  .set-link.on { box-shadow: none; border-color: var(--ink); }
}

/* ---------- v0.35.0: Backup Instance guide ---------- */
.bg-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.bg-answers { position: sticky; top: 72px; }
.bg-answers label.check { display: flex; margin: 4px 0; }
.bg-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.bg-step[hidden] { display: none; }
.bg-step .card-head h2 { display: flex; align-items: center; gap: 10px; font-size: 15.5px; }
.bg-step .card-head h2::before { content: var(--n); display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: none; border-radius: 6px; background: var(--hover); color: var(--ink); font-size: 13px; font-weight: 700; }
.bg-step.is-done .card-head h2::before { content: '✓'; background: var(--ok-bg); color: var(--ok); }
.bg-step.is-done .card-body { opacity: .6; }
.bg-step .card-head label.check { font: inherit; display: block; }
.bg-step .card-head label.check input { margin: 0 10px 0 0; vertical-align: -2px; }
.bg-step p { margin: 0; }
.bg-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.bg-cmd { display: flex; gap: 8px; align-items: stretch; }
.bg-cmd code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; background: var(--hover); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 11px; overflow-x: auto; white-space: nowrap; user-select: all; }
.code-inline { font-family: var(--mono); font-size: 12.5px; background: var(--hover); padding: 1px 5px; border-radius: 4px; }
.bg-table { border-collapse: collapse; font-size: 13.5px; }
.bg-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 5px 16px 5px 0; vertical-align: top; white-space: nowrap; }
.bg-table td { padding: 5px 0; }
@media (max-width: 860px) { .bg-layout { grid-template-columns: minmax(0, 1fr); } .bg-answers { position: static; } .bg-table th { white-space: normal; } }

/* v0.37.0: product families and quoting by m² */
.panel-pick { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; }
.panel-pick label { display: inline-block; }
.fam-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--line-soft); color: var(--ink-2, inherit); text-decoration: none; border: 1px solid var(--line); }
.fam-chip:hover { border-color: var(--muted); }
/* v0.37.0: item codes hidden everywhere unless Settings → Show item codes */
.no-codes .code-col, .no-codes .inv-code, .no-codes .item-code, .no-codes .picker .opt .code, .no-codes [data-codes-toggle] { display: none !important; }
.no-codes .picker .opt:not(.text-opt) { grid-template-columns: 1fr auto auto; }
.picker .opt.text-opt { display: block; }

/* v0.38.0: stocktake (phone first) */
.st-open { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.st-open + .st-open { border-top: 1px solid var(--line); }
.st-pick { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.st-pick label { position: relative; cursor: pointer; }
.st-pick input { position: absolute; opacity: 0; pointer-events: none; }
.st-pick span { display: block; padding: 7px 14px; font-size: 13px; border-right: 1px solid var(--line); }
.st-pick label:last-child span { border-right: 0; }
.st-pick input:checked + span { background: var(--brand); color: var(--on-brand); }
.st-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.st-folders { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; margin-top: 8px; display: grid; gap: 2px; }
.st-bar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0 10px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.st-scan { display: flex; gap: 8px; align-items: center; }
.st-scan .input { font-size: 16px; }
.st-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.st-tools .input { flex: 1 1 180px; min-width: 0; font-size: 16px; }
.st-group { margin-bottom: 10px; }
.st-group-head { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 2px 6px; font-weight: 600; }
.st-row { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin-bottom: 6px; cursor: pointer; min-height: 56px; }
.st-row:hover { border-color: var(--line-2); }
.st-row.open { border-color: var(--brand); border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 0; }
.st-row.done .st-count { background: var(--ok-bg); color: var(--ok); }
.st-img { width: 40px; height: 40px; border-radius: 6px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; }
.st-noimg { background: var(--hover); }
.st-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.st-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.st-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.st-added { color: var(--warn); }
.st-count { flex: none; min-width: 52px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: var(--hover); font-size: 18px; font-weight: 700; padding: 0 8px; }
.st-editor { background: var(--card); border: 1px solid var(--brand); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 10px; margin-bottom: 8px; display: grid; gap: 8px; }
.st-stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; }
.st-step { height: 52px; font-size: 26px; padding: 0; justify-content: center; }
.st-qty { height: 52px; font-size: 24px; text-align: center; font-weight: 700; }
.st-empty { padding: 30px 10px; }
.flash-row { animation: st-flash 1s ease-out; }
@keyframes st-flash { from { box-shadow: 0 0 0 3px var(--ok); } to { box-shadow: 0 0 0 0 transparent; } }
.st-review td { vertical-align: top; }
@media (max-width: 640px) { .st .page-head { margin-bottom: 4px; } .st .page-head .sub { display: none; } }
@media (max-width: 640px) {
    .st-review th, .st-review td { padding-left: 6px; padding-right: 6px; }
    .st-review th.num { font-size: 11px; }
    .st-review td.st-name { min-width: 9.5em; }
}

/* v0.40.0: Store → Design */
.sd-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.sd-preview { position: sticky; top: 72px; }
.sd-frame-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sd-frame-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; height: calc(100vh - 150px); min-height: 520px; }
.sd-frame-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.sd-frame-wrap.phone { width: 390px; margin: 0 auto; }
.sd-sections { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sd-sections li { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.sd-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 12px; max-height: 280px; overflow: auto; }
.sd-save { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; }
.seg-row { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; }
.seg-opt span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 13px; cursor: pointer; background: var(--card); }
.seg-opt input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--card); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 1100px) { .sd-layout { grid-template-columns: minmax(0, 1fr); } .sd-preview { position: static; } .sd-frame-wrap { height: 640px; } }
.site-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.site-opt { position: relative; }
.site-opt input { position: absolute; opacity: 0; }
.site-opt > span { display: block; height: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: var(--card); }
.site-opt > span b { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.site-opt > span b::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.site-opt.live > span b::before { background: var(--ok, #12805c); }
.site-opt.maintenance > span b::before { background: var(--warn, #b26b00); }
.site-opt input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.site-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 760px) { .site-status { grid-template-columns: minmax(0, 1fr); } }
.bulk-menu > summary { display: inline-flex; align-items: center; gap: 4px; }
.bulk-menu .bulk-count { opacity: .8; font-weight: 500; }

/* v0.48.0: the job page: the next step in the header, which job it is in the sticky tabs, the Warehouse tab */
.next-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 13px; white-space: nowrap; max-width: 100%; }
.next-chip .link, .next-chip button.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--brand, var(--ink)); }
.next-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--warn, #d97706); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn, #d97706) 20%, transparent); }
.job-mini { display: none; align-items: center; gap: 8px; padding: 0 14px 0 2px; margin-right: 6px; border-right: 1px solid var(--line); font-size: 13px; white-space: nowrap; max-width: 380px; overflow: hidden; }
.job-mini .mono { color: var(--muted); font-size: 12px; }
.job-tabs.stuck { box-shadow: 0 6px 12px -10px rgba(0,0,0,.35); }
.job-tabs.stuck .job-mini { display: inline-flex; }
@media (max-width: 1100px) { .job-tabs.stuck .job-mini { display: none; } }
.wh-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.wh-step { padding: 16px 18px; border-right: 1px solid var(--line-soft, var(--line)); display: grid; gap: 8px; }
.wh-step:last-child { border-right: 0; }
.wh-step .k { color: var(--muted); font-size: 13px; }
.wh-step .v { font-size: 22px; font-weight: 600; }
.wh-bar { height: 8px; border-radius: 4px; background: var(--subtle); overflow: hidden; }
.wh-bar span { display: block; height: 100%; background: var(--brand, #333); border-radius: 4px; }
.wh-step.done .wh-bar span { background: var(--ok, #15803d); }
@media (max-width: 760px) { .wh-steps { grid-template-columns: 1fr; } .wh-step { border-right: 0; border-bottom: 1px solid var(--line-soft, var(--line)); } }

/* v0.48.0: ⌘K, find or do anything */
dialog.cmdk { width: min(680px, calc(100vw - 32px)); }
.cmdk-input { font-size: 16px; padding: 12px 14px; }
.cmdk-list { margin-top: 8px; max-height: 56vh; overflow: auto; }
.cmdk-group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; }
.cmdk-list a .badge { min-width: 54px; justify-content: center; }
table.keys td { padding: 6px 8px; }
table.keys td:first-child { white-space: nowrap; width: 40%; }
/* the stuck bar stays on one line: the view switches wait at the top, and long names are cut short */
.job-tabs.stuck .job-view { display: none !important; }
.job-tabs.stuck .job-mini b { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
body[data-tab="warehouse"] .grid[data-panel~="warehouse"] { grid-template-columns: minmax(0, 1fr); }

/* v0.49.0: the planner: drag to move, drag the end to resize; red for jobs that are short */
.pl-bar { position: relative; }
.pl-bar.movable { cursor: grab; touch-action: none; user-select: none; }
.pl-bar.dragging { cursor: grabbing; z-index: 5; box-shadow: 0 6px 16px rgba(0,0,0,.18); opacity: .92; }
.pl-bar.resizing { z-index: 5; margin-right: calc(2px - var(--grow, 0px)); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.pl-grip { position: absolute; right: 0; top: 0; bottom: 0; width: 9px; cursor: ew-resize; border-radius: 0 6px 6px 0; }
.pl-bar.movable:hover .pl-grip { background: rgba(0,0,0,.12); }
.pl-bar.is-short { box-shadow: inset 0 0 0 2px #dc2626; }
.pl-bar .short-tag { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: #dc2626; color: #fff; }

/* v0.49.0: warehouse tablet mode: big targets, readable at arm's length, the scan box always on top */
.tablet-btn.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
body.tablet { font-size: 17px; }
body.tablet main { max-width: none; }
body.tablet #scan-form { position: sticky; top: 56px; z-index: 35; box-shadow: 0 8px 18px -12px rgba(0,0,0,.4); }
body.tablet #scan { font-size: 22px; min-height: 56px; }
body.tablet #scan-form .btn { min-height: 52px; padding: 0 20px; font-size: 16px; }
body.tablet #prep-root td, body.tablet #prep-root th { padding-top: 14px; padding-bottom: 14px; font-size: 16px; }
body.tablet #prep-root input[type=checkbox] { width: 30px; height: 30px; }
body.tablet #prep-root .btn, body.tablet .page-head .btn { min-height: 46px; font-size: 15px; }
body.tablet #prep-root select { min-height: 44px; font-size: 15px; }
.scan-flash { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.scan-flash.show { display: flex; animation: sf-in .12s ease-out; }
.scan-flash.ok { background: rgba(21,128,61,.88); }
.scan-flash.bad { background: rgba(185,28,28,.9); }
.scan-flash .sf-mark { font-size: 120px; line-height: 1; color: #fff; font-weight: 700; }
.scan-flash .sf-text { font-size: 30px; color: #fff; font-weight: 600; max-width: 80vw; margin-top: 12px; }
@keyframes sf-in { from { opacity: 0; } to { opacity: 1; } }
.scan-queue { margin: -6px 0 14px; padding: 10px 14px; border-radius: var(--radius); background: #fef3c7; color: #78350f; font-size: 14px; font-weight: 500; }

/* v0.54.0: crew and vehicles in the I+O Portal */
.pc-shift { padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.pc-shift:first-child { border-top: 0; }
.pc-shift-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.pc-role { padding: 6px 0 6px 12px; border-left: 2px solid var(--line); margin: 6px 0; }
.pc-role-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pc-people, .pc-vehicles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.pc-person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.pc-person form { display: inline; margin: 0; }
.pc-add { gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.pc-add form, form.pc-add { margin: 0; }
form.pc-add { display: flex; align-items: center; }
.pc-add .input { width: auto; flex: 0 1 auto; }
.pc-add input[name=name] { min-width: 180px; }

/* v0.58.0: a note under a gear line */
table.q textarea.line-note { display: block; width: min(100%, 520px); margin-top: 4px; text-align: left; font-size: 12.5px; color: var(--muted); resize: none; overflow: hidden; min-height: 26px; line-height: 1.4; font-weight: normal; field-sizing: content; }
table.q textarea.line-note[hidden] { display: none; }
table.q .line-note-add { margin-left: 6px; }
@media (hover: hover) { table.q tr:not(:hover) .line-note-add { visibility: hidden; } }
/* v0.59.0: searchable selects */
.search-select { display: inline-block; vertical-align: middle; }
.search-select .input { width: 100%; }
.search-select-list { position: fixed; right: auto; z-index: 200; }
/* v0.60.0: prep notes and consumables under gear on the prep list */
.prep-x { color: var(--ink); font-weight: normal; margin-top: 2px; padding-left: 6px; border-left: 2px solid var(--brand, #2563eb); }
/* v0.61.0: name search under the prep scan box */
.scan-search { position: absolute; right: auto; z-index: 80; }
/* v0.61.1: a "Delete…" item in a ••• menu reads as a menu item (red words), not a solid red button */
.menu-panel .btn-danger, [data-theme="dark"] .menu-panel .btn-danger { background: none; border-color: transparent; color: var(--bad); }
.menu-panel .btn-danger:hover, [data-theme="dark"] .menu-panel .btn-danger:hover { background: var(--bad-bg); }
.menu-panel .btn-danger small { color: var(--muted); }

/* v0.61.2: light mode with more contrast: a greyer page, firmer card edges and a lift, and
   card headings on a faint tint, so each section stands out from the page */
:root:not([data-theme="dark"]) {
  --bg: #eceff3;
  --line: #d7dde5;
  --line-soft: #e5e9ef;
  --subtle: #f6f8fa;
  --hover: #eef2f6;
  --shadow: 0 1px 2px rgba(15, 23, 42, .07), 0 2px 6px rgba(15, 23, 42, .04);
}
:root:not([data-theme="dark"]) .card-head { background: #fafbfc; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
:root:not([data-theme="dark"]) .card-head h2 { font-weight: 600; }
:root:not([data-theme="dark"]) table.t th { background: #f3f5f8; color: #556274; }
/* v0.61.4: a badge that's a button (accessory auto ⇄ suggested) */
button.badge-btn { border: 0; cursor: pointer; font-family: inherit; line-height: inherit; }
button.badge-btn:hover { filter: brightness(.95); outline: 1px solid currentColor; }
/* v0.62.0: warehouse notes on a gear line */
table.q .wnote-wrap { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; }
table.q .wnote-wrap[hidden] { display: none; }
table.q .wnote-wrap .badge { margin-top: 6px; font-size: 10px; }
table.q textarea.wnote { margin-top: 0; }
.wnote-line { margin-top: 2px; padding: 2px 6px; border-radius: 4px; background: var(--warn-bg); color: var(--warn-ink, var(--ink)); font-weight: normal; white-space: pre-line; }
/* v0.63.0: a region being refreshed (live search, in-place saves) */
[aria-busy="true"] { opacity: .6; transition: opacity .15s; }
/* v0.63.0: the item page's Prep and consumables card */
.pc-notes { display: grid; gap: 10px; }
.pc-note { display: grid; gap: 4px; }
.pc-note-lbl { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.pc-note-lbl .faint { font-weight: normal; }
.pc-note textarea { min-height: 52px; resize: vertical; font-size: 13px; }
.pc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pc-dot.out { background: var(--brand, #2563eb); }
.pc-dot.back { background: var(--ok, #16a34a); }
.pc-cons { border-top: 1px solid var(--line-soft, var(--line)); padding: 10px 16px 4px; }
.pc-cons-head { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.pc-con { padding: 8px 10px; border: 1px solid var(--line-soft, var(--line)); border-radius: 8px; margin-bottom: 8px; background: var(--subtle, transparent); }
.pc-con-name { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.pc-con-name .icon-btn { margin: -4px -6px 0 0; }
.pc-con-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pc-con-ctl select { width: auto; }
.pc-qty { width: 52px; text-align: center; }
.pc-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.pc-empty { padding: 2px 0 8px; }
.pc-add { display: grid; gap: 8px; }
.pc-add .item-picker { width: 100%; }
/* v0.63.0: prep: finish bar and the review */
.prep-finish { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg, 10px); box-shadow: var(--shadow); }
.pr-review section h3 { font-size: 13px; margin: 6px 0 4px; }
.pr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.pr-q { display: inline-block; min-width: 28px; text-align: right; font-weight: 600; margin-right: 6px; font-variant-numeric: tabular-nums; }
dialog.modal.modal-wide { width: min(640px, 94vw); }
/* v0.63.0: crew lines: drop marker while dragging, the copy menu */
tr.fn-drop > td { padding: 0 !important; height: 3px; background: var(--brand); border: 0; }
.fn-acts { white-space: nowrap; }
.fn-acts .fn-copy { display: inline-block; position: relative; }
.fn-acts .fn-copy > summary { list-style: none; }
.fn-acts .fn-copy > summary::-webkit-details-marker { display: none; }
.fn-acts .menu-panel button { display: block; width: 100%; text-align: left; }
.pc-con-ctl .pc-qty, .pc-con-ctl .input.pc-qty { width: 52px; flex: none; }
.pc-add .item-picker .input { width: 100%; }
/* v0.64.0: repairs board and tickets */
.rp-board { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.rp-col { background: var(--subtle); border: 1px solid var(--line-soft, var(--line)); border-radius: 10px; min-height: 120px; display: flex; flex-direction: column; }
.rp-col > header { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; font-weight: 600; font-size: 13px; }
.rp-n { font-size: 11.5px; color: var(--muted); background: var(--card); border: 1px solid var(--line-soft, var(--line)); border-radius: 999px; padding: 0 7px; }
.rp-cards { display: grid; gap: 8px; padding: 0 8px 10px; min-height: 60px; }
.rp-col.drop-on { outline: 2px dashed var(--brand); outline-offset: -2px; }
.rp-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; color: inherit; text-decoration: none; box-shadow: var(--shadow); cursor: grab; border-left: 3px solid transparent; }
.rp-card:hover { border-color: var(--ink-3, #9aa3ad); }
.rp-card.pri-urgent { border-left-color: var(--bad); } .rp-card.pri-high { border-left-color: var(--warn, #d97706); }
.rp-card.done { opacity: .75; cursor: pointer; }
.rp-card.dragging { opacity: .4; }
.rp-top { display: flex; gap: 6px; align-items: center; margin-bottom: 3px; }
.rp-item { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.rp-fault { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.rp-foot { display: flex; gap: 8px; align-items: center; margin-top: 7px; flex-wrap: wrap; }
.rp-foot .pav, .rp-note .pav { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-bg, #e0e7ff); color: var(--brand-ink, var(--brand)); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rp-empty { padding: 6px 4px; }
.rp-steps { display: flex; padding: 6px; gap: 4px; overflow-x: auto; }
.rp-steps form { flex: 1; }
.rp-step { width: 100%; border: 0; background: transparent; padding: 9px 8px; border-radius: 6px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.rp-step:hover { background: var(--hover); color: var(--ink); }
.rp-step.on { background: var(--brand); color: #fff; font-weight: 600; cursor: default; }
.rp-thread { display: grid; }
.rp-note { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft, var(--line)); }
.rp-note.event { padding-top: 6px; padding-bottom: 6px; }
.rp-note.event .pav { transform: scale(.8); opacity: .7; }
.rp-body { white-space: pre-line; font-size: 13.5px; margin-top: 3px; }
.rp-photo { max-width: 260px; max-height: 200px; border-radius: 8px; margin-top: 6px; border: 1px solid var(--line); display: block; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-2-1 { grid-template-columns: 1fr; } .rp-board { grid-template-columns: repeat(6, 82vw); } }

/* v0.65.0: a job's Health & safety and Files tabs, Settings → Health & safety */
.hs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .hs-grid { grid-template-columns: minmax(0, 1fr); } }
.hs-checks { list-style: none; margin: 0; padding: 4px 0; }
.hs-checks li { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 7px 16px; border-bottom: 1px solid var(--line-soft, var(--line)); }
.hs-checks li:last-child { border-bottom: 0; }
.hs-checks li .check { align-items: flex-start; }
.hs-checks li .check input { margin-top: 3px; }
.hs-checks li.done .hs-check-label { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.hs-checks .hs-who { display: block; }
.hs-docs { list-style: none; margin: 0; padding: 0; }
.hs-docs > li { padding: 10px 16px; border-bottom: 1px solid var(--line-soft, var(--line)); }
.hs-docs > li:last-child { border-bottom: 0; }
.hs-docs .badge { margin-right: 4px; }
.hs-email[hidden] { display: none; }
.hs-email { display: grid; gap: 6px; margin-top: 8px; padding: 10px; background: var(--bg-2); border-radius: var(--radius); }
.hs-ask { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; }
.hs-ask .check { align-items: flex-start; }
.hs-ask .check input { margin-top: 3px; }
.hs-extra { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 8px; margin: 0; background: var(--bg-2); }
.hs-expiring { color: var(--warn-ink, var(--warn)); }
details.hs-lib > summary { cursor: pointer; list-style: none; }
details.hs-lib > summary::-webkit-details-marker { display: none; }
details.hs-lib[open] > summary { background: var(--bg-2); }
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.files-cat { transition: box-shadow .12s, border-color .12s; }
.files-cat.drop-on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.files-list { list-style: none; margin: 0; padding: 0; }
.files-list li { border-bottom: 1px solid var(--line-soft, var(--line)); }
.files-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 16px; }
.files-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files-rename { display: flex; gap: 6px; padding: 6px; }
.files-rename .input { flex: 1; min-width: 0; }
/* v0.72.4: a form in a ⋯ menu (New folder, Rename): its button stays a button, not a menu line stretched across */
.menu-panel .files-rename { align-items: center; }
.menu-panel .files-rename .input { min-width: 160px; }
.menu-panel .files-rename .btn { display: inline-flex; width: auto; flex: 0 0 auto; text-align: center; padding: 5px 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); }
.menu-panel .files-rename .btn-brand, .menu-panel .files-rename .btn-brand:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.menu-panel .files-rename .btn-brand:hover { filter: brightness(1.15); }
.files-drop { margin: 0; padding: 10px 12px 12px; }
.files-zone { display: block; text-align: center; padding: 12px; border: 1.5px dashed var(--line); border-radius: var(--radius); cursor: pointer; }
.files-zone:hover { background: var(--hover); border-color: var(--line-2, var(--line)); }
[aria-busy="true"] .files-zone { opacity: .6; }

/* v0.66.0: Accommodation */
.acc-wrap { overflow-x: auto; }
.acc-grid { display: grid; grid-template-columns: minmax(260px, 1fr) 138px 138px 52px 92px 104px 112px 84px 92px 30px; gap: 6px; align-items: center; min-width: 1100px; }
.acc-headrow { padding: 8px 16px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; border-bottom: 1px solid var(--line); }
.acc-hotel { padding: 10px 16px 6px; gap: 8px; flex-wrap: wrap; background: var(--bg-2); border-bottom: 1px solid var(--line-soft, var(--line)); min-width: 1100px; }
.acc-room { padding: 6px 16px 4px; border-bottom: 1px solid var(--line-soft, var(--line)); min-width: 1100px; }
.acc-room .cell-in, .acc-room .cell-sel { width: 100%; text-align: left; }
.acc-room .cell-in.num { text-align: right; }
.acc-who { display: flex; flex-wrap: wrap; gap: 4px; }
.acc-who .cell-in { flex: 1 1 110px; width: auto; }
.acc-who .acc-hotel-in { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.acc-who .acc-plus { color: var(--muted); }
.acc-note { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.acc-note .cell-in { width: 100%; text-align: left; color: var(--muted); }
.acc-cancelled { opacity: .55; }
.acc-cancelled input:not([name=status]) { text-decoration: line-through; }
.acc-status.s-booked { color: var(--ok); font-weight: 600; }
.acc-status.s-requested { color: var(--warn-ink, var(--warn)); }
.acc-status.s-needed { color: var(--bad); }

/* v0.66.0: LED wall and stage builders */
.builder { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .builder { grid-template-columns: minmax(0, 1fr); } }
.builder .seg { align-self: flex-start; }
.led-draw { overflow-x: auto; }
.led-draw svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.led-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.led-stat { padding: 12px 14px; }
.led-big { font-size: 20px; font-weight: 700; margin: 2px 0 4px; letter-spacing: -.01em; }
.kit-over { background: var(--warn-bg); }
.kit-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kit-row .item-picker { flex: 1 1 220px; min-width: 180px; }
.st-sides table td, .st-sides table th { padding: 4px 6px; }
.builder [hidden] { display: none !important; }
.acc-note form { flex: 1; min-width: 0; }

/* v0.67.0: Files: folders and previews */
.files-head { flex-wrap: wrap; gap: 8px; }
.files-trail { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; min-width: 0; }
.files-trail .link-btn { font-size: 14px; }
.files-table td { vertical-align: middle; }
.files-namecell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.files-open { text-align: left; font-weight: 500; color: var(--ink); word-break: break-word; }
.files-open:hover { text-decoration: underline; }
.files-card.drop-on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.files-dropnote { padding: 8px 16px 12px; border-top: 1px dashed var(--line); }
.files-empty { padding: 28px 16px; text-align: center; }
.ficon { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 3px; background: var(--muted); -webkit-mask: var(--fi) center / contain no-repeat; mask: var(--fi) center / contain no-repeat;
  --fi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h8l5 5v15H6z'/%3E%3C/svg%3E"); }
.ficon-folder { background: #f2b33d; --fi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 6.5A1.5 1.5 0 0 1 3.5 5H9l2 2h9.5A1.5 1.5 0 0 1 22 8.5v10a1.5 1.5 0 0 1-1.5 1.5h-17A1.5 1.5 0 0 1 2 18.5z'/%3E%3C/svg%3E"); }
.ficon-pdf { background: #d93025; } .ficon-image { background: #9334e6; } .ficon-video { background: #e8710a; } .ficon-audio { background: #12a4af; }
.ficon-sheet { background: #188038; } .ficon-slides { background: #f9ab00; } .ficon-doc { background: #1a73e8; }
dialog.file-preview { width: min(1200px, calc(100vw - 24px)); height: calc(100vh - 32px); max-height: none; padding: 0; display: none; flex-direction: column; overflow: hidden; }
dialog.file-preview[open] { display: flex; }
dialog.file-preview iframe { flex: 1; width: 100%; border: 0; background: var(--bg-2); }

/* v0.67.0: Airbnb and Booking.com stays */
[data-acc-form][data-src="hotel"] [data-when-source="online"], [data-acc-form]:not([data-src="hotel"]) [data-when-source="hotel"] { display: none; }
.acc-where label { margin: 0; }
.acc-where label span { display: inline-block; padding: 5px 12px; font-size: 13px; cursor: pointer; border-right: 1px solid var(--line); }
.acc-where label:last-child span { border-right: 0; }
.acc-where input:checked + span { background: var(--brand); color: var(--on-brand); }
.acc-paste textarea { width: 100%; font-family: var(--mono); font-size: 12px; }
.acc-src { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; color: #fff; margin-right: 4px; vertical-align: 1px; }
.acc-src-airbnb { background: #ff385c; } .acc-src-booking { background: #003580; } .acc-src-other { background: var(--muted); }
.acc-price { display: flex; flex-direction: column; gap: 2px; }
.acc-price .cell-sel { font-size: 11.5px; padding: 0 2px; color: var(--muted); }
.acc-more { flex: 0 0 auto; }
.acc-more[open] { flex: 1 1 100%; order: 3; }
.acc-note { flex-wrap: wrap; }
.acc-more-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 12px; padding: 8px 0 6px; }
.acc-more-form label { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--muted); }
.acc-more-form label.wide { grid-column: 1 / -1; }
.acc-more-form .cell-in, .acc-more-form .cell-sel { width: 100%; text-align: left; color: var(--ink); font-size: 13px; }

/* v0.68.0: pipe and drape */
.drape-run { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; }
.drape-f { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.drape-f .input { width: 66px; }
.drape-run:not([data-type="booths"]):not([data-type="l"]):not([data-type="u"]):not([data-type="box"]) [data-depth] { display: none; }
.drape-svg { display: block; max-width: 100%; height: auto; }
.drape-run { flex-wrap: wrap; }
.drape-run .input { width: auto; flex: 0 0 auto; }
.drape-run select.input { max-width: 290px; }
.drape-run .drape-f .input { width: 64px; }
.drape-svg { margin: 0 auto; }
/* v0.68.1: suggested accessories, one a line */
.acc-sugg { max-width: 640px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card, var(--bg)); }
.acc-sugg-head { padding: 4px 6px 4px 10px; border-bottom: 1px solid var(--line); min-height: 30px; }
.acc-sugg-row { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 10px; border-bottom: 1px solid var(--line-soft, var(--line)); }
.acc-sugg-row:last-child { border-bottom: 0; }
.acc-sugg-qty { min-width: 32px; color: var(--muted); }
/* v0.69.0: Flights */
.fl-grid { display: grid; grid-template-columns: 84px 150px 136px 112px 128px minmax(240px, 1fr) 100px 100px 84px 84px 30px; gap: 6px; align-items: center; min-width: 1300px; }
.fl-row { min-width: 1300px; }
.fl-row .acc-who .cell-in { width: auto; flex: 1 1 104px; min-width: 0; }
.fl-row .acc-who .acc-plus { flex: 0 1 96px; }
.fl-route { display: flex; align-items: center; gap: 4px; }
.fl-route .cell-in { width: 62px; text-transform: uppercase; }
.fl-no .cell-in { width: 100%; text-transform: uppercase; font-weight: 600; }
.fl-lands { display: flex; align-items: center; gap: 2px; }
.fl-plus { font-size: 11px; font-weight: 700; color: var(--warn-ink, var(--warn)); }
.fl-facts { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%; display: flex; align-items: center; gap: 4px; }
.fl-extra { display: flex; gap: 6px; }
.fl-extra .cell-in[name=bags] { flex: 0 0 200px; }
.fl-extra .cell-in[name=bag_cost] { flex: 0 0 96px; }
.fl-extra .cell-in[name=notes] { flex: 1 1 auto; }
.fl-leg { display: grid; grid-template-columns: 96px 140px 58px 74px 74px 100px 100px 30px; gap: 6px; align-items: center; margin-bottom: 6px; }
.fl-leg-head { margin-bottom: 2px; }
.fl-leg .mono { text-transform: uppercase; }
.fl-leg-say { grid-column: 1 / -1; margin-top: -2px; color: var(--muted); }
.fl-leg-say:empty { display: none; }
.fl-leg-say.ok { color: var(--ok); }
.fl-leg-say.warn { color: var(--warn-ink, var(--warn)); }
.fl-leg-say .btn { margin: 2px 2px 0 0; }
@media (max-width: 760px) { .fl-leg { grid-template-columns: 1fr 1fr 58px; } .fl-leg-head { display: none; } }
/* v0.69.2: a builder's group on the Equipment tab, and what's already on the job at the top of a builder */
.q-built { display: inline-flex; gap: 4px; align-items: center; }
.on-job-current td { background: var(--hover); }
/* v0.71.0: a short item's availability is a button (swap or sub-hire it) */
button.avail-chip.avail-fix { font: inherit; font-size: inherit; cursor: pointer; border: 0; }
button.avail-chip.avail-fix:hover { outline: 2px solid currentColor; outline-offset: 1px; }
.prep-sub { margin-top: 2px; color: var(--muted); }
.swap-item[hidden], .subhire-all[hidden] { display: none !important; }
/* v0.71.1: your name at the top of the user menu, as the link to your account */
.menu-panel a.menu-me { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
/* v0.71.1: the supplier search */
.sup-picker { min-width: 0; }
.sup-picker .picker-row b { font-weight: 700; color: var(--ink); }
.sup-new { color: var(--brand-ink, var(--ink)); font-weight: 600; }
.modal .sup-picker .picker-list { z-index: 100; }
.portal-only { border-top: 1px solid var(--line); margin-top: 4px; }
/* v0.72.0: ⓘ explanations on hover, so pages stay tidy */
.info-tip { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); cursor: help; vertical-align: -2px; margin-left: 6px; font-size: 12.5px; font-weight: 400; text-transform: none; letter-spacing: 0; border-radius: 999px; outline: none; }
.info-tip:hover, .info-tip:focus-visible, .info-tip.on { color: var(--ink); }
.info-tip:focus-visible { box-shadow: 0 0 0 2px var(--line); }
.info-tip-label { margin-left: 0; }
.info-tip-text { text-decoration: underline dotted; text-underline-offset: 2px; }
h1 .info-tip, h2 .info-tip, h3 .info-tip { margin-left: 6px; }
.info-float { position: fixed; z-index: 1000; max-width: min(340px, calc(100vw - 24px)); background: var(--tip-bg, #1f2328); color: #f3f4f6; font-size: 12.5px; line-height: 1.5; padding: 8px 11px; border-radius: 7px; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); pointer-events: none; white-space: normal; font-weight: 400; text-align: left; }
.info-float a { color: #fff; text-decoration: underline; }
.info-float b, .info-float strong { color: #fff; }
:root[data-theme="dark"] .info-float { background: #f3f4f6; color: #1f2328; }
:root[data-theme="dark"] .info-float a, :root[data-theme="dark"] .info-float b { color: #111; }
@media print { .info-tip { display: none !important; } }

/* v0.74.0: People → Crewing */
.crewing-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .crewing-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pchip.crew-confirmed { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: var(--ok-bg); }
.pchip.crew-confirmed .pav { background: var(--ok); color: #fff; }
.pchip.crew-pencilled { border-style: dashed; border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.pchip.crew-asked { border-color: color-mix(in srgb, var(--info, #2563eb) 45%, transparent); }
.pchip.crew-asked .pav { background: color-mix(in srgb, var(--info, #2563eb) 18%, transparent); }
.pchip.crew-proposed { border-style: dashed; color: var(--muted); }
.pchip.crew-declined { opacity: .55; text-decoration: line-through; }
.pchip.crew-empty { border-style: dashed; border-color: color-mix(in srgb, var(--bad) 55%, transparent); color: var(--bad); padding: 3px 9px; background: none; }
.crewing-gaps td { vertical-align: top; }
.crew-legend { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.crew-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--hover); }
.crew-legend .crew-confirmed::before { background: var(--ok); }
.crew-legend .crew-pencilled::before { background: var(--warn); }
.crew-legend .crew-asked::before { background: var(--info, #2563eb); }
.crew-legend .crew-away::before { background: var(--line-2); }
.crew-legend .crew-clash::before { background: none; box-shadow: inset 0 0 0 2px var(--bad); }
.crew-board th, .crew-board td { text-align: center; padding: 5px 4px; min-width: 58px; font-size: 11.5px; vertical-align: top; }
.crew-board th.today { color: var(--ink); background: var(--hover); }
.crew-board th.wknd { color: var(--faint, var(--muted)); }
.crew-board .who { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 150px; font-size: 13px; }
.crew-board td.away { background: var(--hover); }
.crew-board td.clash { box-shadow: inset 0 0 0 2px var(--bad); }
.crew-item { display: block; border-radius: 4px; padding: 2px 3px; margin: 1px 0; font-weight: 600; text-decoration: none; color: var(--ink); background: var(--hover); white-space: nowrap; }
.crew-item.crew-confirmed { background: var(--ok-bg); color: var(--ok); }
.crew-item.crew-pencilled { background: var(--warn-bg); color: var(--warn); }
.crew-item.crew-asked, .crew-item.crew-proposed { background: color-mix(in srgb, var(--info, #2563eb) 12%, transparent); color: var(--info, #2563eb); }
.crew-item:hover { filter: brightness(.95); }
.crew-away-tag { color: var(--muted); font-size: 10.5px; }
#crew-fill-dialog { width: min(560px, calc(100vw - 32px)); padding: 0; }
.crew-fill-list { max-height: 55vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.crew-fill-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); }
.crew-fill-row:first-child { border-top: 0; }
.crew-fill-row.busy .strong { color: var(--muted); }
.crew-fill-row[hidden] { display: none !important; }
/* v0.74.0: an item's description on its page */
.item-desc-text { white-space: pre-line; line-height: 1.5; max-width: 90ch; }
/* v0.75.0: Crewing Manager → Planner: the Portal's crew planner, embedded */
.crew-planner { overflow: hidden; }
.crew-planner-frame { display: block; width: 100%; height: calc(100vh - 150px); min-height: 620px; border: 0; background: #fff; }
/* v0.75.0: Accommodation and Flights stay tucked away on a job until it has some (a "+" opens them) */
[data-unrevealed] { display: none !important; }

/* v0.76.0: Crewing Manager → Planner, drawn here (the same planner as the Portal's) */
.pl-root.pl-loading .pl-scroll { opacity: .55; transition: opacity .15s; }
.pl-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 12px; }
.pl-controls label { display: flex; flex-direction: column; gap: 3px; }
.pl-controls label > span { font-size: 11.5px; color: var(--muted); }
.pl-controls .input { width: auto; }
.pl-main { display: flex; gap: 14px; align-items: flex-start; }
.pl-side { width: 290px; flex: 0 0 290px; overflow: hidden; position: sticky; top: 64px; }
.pl-side-head { padding: 10px 14px; font-weight: 600; font-size: 13.5px; border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: center; }
.pl-side-list { max-height: calc(100vh - 220px); overflow-y: auto; }
.pl-side-foot { padding: 8px 14px; border-top: 1px solid var(--line); }
.pl-unfilled { padding: 10px 12px 10px 11px; border-bottom: 1px solid var(--line); border-left: 4px solid #E31D4D; cursor: grab; }
.pl-unfilled:last-child { border-bottom: 0; }
.pl-unfilled:active { cursor: grabbing; }
.pl-u-job { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-u-role, .pl-u-need { color: #E31D4D; font-weight: 600; }
.pl-u-role { font-size: 12px; }
.pl-u-acts { display: flex; gap: 10px; margin-top: 3px; font-size: 12px; }
.pl-suggest { margin-top: 4px; }
.pl-suggest-pick { display: block; width: 100%; text-align: left; font-size: 12px; padding: 4px 6px; border: 0; background: none; border-radius: 5px; cursor: pointer; color: var(--ink); font-family: inherit; }
.pl-suggest-pick:hover { background: var(--hover); }
.pl-scroll { flex: 1; min-width: 0; overflow: auto; max-height: calc(100vh - 180px); }
.pl-table { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.pl-table th, .pl-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pl-table thead th { position: sticky; top: 0; z-index: 3; background: var(--card); }
.pl-table thead tr.pl-band th { top: 33px; z-index: 2; }
.pl-corner { position: sticky; left: 0; z-index: 4 !important; text-align: left; padding: 8px 10px; min-width: 190px; width: 190px; background: var(--card); font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pl-date { min-width: 128px; padding: 8px 6px; font-weight: 600; font-size: 12px; text-align: left; white-space: nowrap; }
.pl-today { background: color-mix(in srgb, var(--info) 7%, var(--card)) !important; }
.pl-date.pl-today { color: var(--info); }
.pl-wknd { color: var(--muted); }
.pl-band-name { text-transform: none; letter-spacing: 0; }
.pl-row-toggle { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink-2, var(--ink)); cursor: pointer; font-size: 12px; }
.pl-row-toggle::before { content: '▾ '; color: var(--muted); }
.pl-band.pl-collapsed .pl-row-toggle::before { content: '▸ '; }
.pl-band.pl-collapsed [data-pl-rowbody] { display: none; }
.pl-bandcell { padding: 4px; vertical-align: top; font-weight: 400; text-align: left; background: var(--pl-band) !important; border-bottom: 2px solid var(--pl-band-line) !important; }
/* v0.76.2: the Portal planner's band colours; only Shows on is pinned (Workshop, Dry hires scroll) */
:root { --pl-band: #eef1f5; --pl-band-line: #cbd5e1; }
[data-theme="dark"] { --pl-band: #262626; --pl-band-line: #4d4d4d; }
.pl-band .pl-corner { background: var(--pl-band) !important; border-bottom: 2px solid var(--pl-band-line) !important; }
.pl-table tbody tr.pl-band-scroll th { position: sticky; left: 0; top: auto; }
.pl-bandcell.pl-today { background: color-mix(in srgb, var(--info) 9%, var(--pl-band)) !important; }
.pl-dryhire { background: color-mix(in srgb, #0ea5e9 16%, var(--card)); color: var(--ink); }
.pl-wait { padding: 48px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.pl-wait-bad { color: var(--bad, #E31D4D); }
.pl-spin { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border: 2px solid var(--line); border-top-color: var(--info); border-radius: 50%; animation: pl-spin .8s linear infinite; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
.pl-showchip { display: block; border-radius: 4px; padding: 2px 5px; margin-bottom: 2px; text-decoration: none; font-size: 11px; line-height: 1.25; overflow: hidden; }
.pl-showchip-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-showchip-venue { display: block; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-none { color: var(--faint, var(--muted)); }
.pl-name { position: sticky; left: 0; z-index: 1; background: var(--card); text-align: left; padding: 7px 10px; vertical-align: top; font-weight: 400; min-width: 190px; width: 190px; }
.pl-person { font-weight: 600; font-size: 13px; color: var(--ink); text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.pl-person:hover { text-decoration: underline; }
.pl-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-hours { font-size: 10.5px; font-style: italic; color: var(--faint, var(--muted)); }
.pl-cell { vertical-align: top; padding: 3px; min-width: 128px; max-width: 170px; height: 46px; background: var(--card); }
.pl-cell:focus { outline: 2px solid var(--info); outline-offset: -2px; }
.pl-chip { display: block; border-radius: 5px; padding: 3px 5px; margin-bottom: 2px; text-decoration: none; line-height: 1.25; font-size: 11px; overflow: hidden; }
.pl-chip-title { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-chip-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.pl-chip-overlap { box-shadow: inset 0 0 0 2px #E31D4D; }
.pl-chip-cont { opacity: .75; }
.pl-chip-pencil { outline: 1.5px dashed currentColor; outline-offset: -2px; }
.pl-chip-declined { opacity: .5; text-decoration: line-through; }
.pl-away { border-radius: 4px; padding: 2px 5px; margin-bottom: 2px; color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-away-pending { opacity: .7; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 5px, transparent 5px 10px) !important; }
.pl-note { font-size: 10.5px; color: var(--muted); background: var(--hover); border-radius: 4px; padding: 2px 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-meeting, .pl-duty { font-size: 11px; border: 1px dashed var(--line-2); border-radius: 4px; padding: 2px 5px; margin-bottom: 2px; overflow: hidden; }
.pl-external .pl-cell { background: var(--bg-2, var(--card)); }
.pl-dragging .pl-cell, .pl-dragging .pl-name[data-name-drop] { cursor: copy; }
.pl-drop { background: color-mix(in srgb, var(--info) 18%, var(--card)) !important; box-shadow: inset 0 0 0 2px var(--info); }
.pl-menu { position: fixed; z-index: 60; width: 280px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.2); padding: 4px 0; font-size: 13px; max-height: 70vh; overflow-y: auto; }
.pl-menu-head { padding: 7px 12px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.pl-menu-label { padding: 7px 12px 3px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pl-menu-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 12px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.pl-menu-item:hover { background: var(--hover); }
.pl-menu-danger { color: var(--bad); }
.pl-menu-none { padding: 4px 12px 6px; font-size: 12px; color: var(--faint, var(--muted)); }
.pl-menu-note { padding: 4px 12px 8px; display: flex; flex-direction: column; gap: 4px; }
.pl-toast { position: fixed; right: 16px; bottom: 16px; z-index: 70; max-width: 360px; background: #3A66FF; color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.pl-toast.bad { background: #E31D4D; }
@media (max-width: 900px) { .pl-main { flex-direction: column; } .pl-side { width: 100%; flex: none; position: static; } }

/* v0.76.2: consumables under a quote line: one row of small chips */
.cons-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 3px; }
.cons-lbl { font-size: 11px; color: var(--faint, var(--muted)); margin-right: 2px; }
.cons-chip { display: inline-flex; align-items: center; gap: 3px; font: inherit; font-size: 11px; line-height: 1.3; padding: 1px 7px; border-radius: 999px; border: 1px dashed var(--line); background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
button.cons-chip:hover { border-style: solid; border-color: var(--info); color: var(--info); }
.cons-chip.cons-on { border-style: solid; cursor: default; color: var(--ok, #16a34a); border-color: color-mix(in srgb, var(--ok, #16a34a) 40%, transparent); }

/* v0.77.0: Google address suggestions under an address field */
.places-host { position: relative; }
.places-list { position: absolute; left: 0; right: 0; z-index: 60; margin-top: 2px; background: var(--card, #fff); border: 1px solid var(--line, #d9dce1); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); overflow: hidden; max-height: 280px; overflow-y: auto; }
.places-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; font: inherit; font-size: 13px; color: var(--ink, inherit); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.places-item .muted { font-size: 12px; color: var(--muted, #6b7280); }
.places-item:hover, .places-item.on { background: var(--hover, rgba(0,0,0,.05)); }
.places-by { font-size: 10px; text-align: right; padding: 3px 10px 5px; color: var(--muted, #6b7280); }

/* v0.77.0: venue map and "leave the warehouse by" on the job sheet */
.venue-map { display: block; width: 100%; max-width: 420px; height: auto; margin-top: 8px; border-radius: 8px; border: 1px solid var(--line); }
.leave-by { color: var(--info); font-weight: 600; }
@media print { .venue-map { max-width: 100%; } .leave-by { color: inherit; } }

/* v0.78.0: how much of a crew call is charged */
.fn-charge { display: block; margin-top: 2px; }
.fn-charge > summary { list-style: none; cursor: pointer; }
.fn-charge > summary::-webkit-details-marker { display: none; }
.fn-charge-chip { display: inline-block; font-size: 10.5px; font-weight: 600; line-height: 1.3; padding: 0 6px; border-radius: 999px; color: var(--muted); border: 1px solid transparent; white-space: nowrap; }
.fn-charge-chip:hover { border-color: var(--line); }
.fn-charge-chip.chg-part, .fn-charge-chip.chg-trim { color: var(--warn, #b45309); background: color-mix(in srgb, var(--warn, #b45309) 12%, transparent); }
.fn-charge-chip.chg-none { color: var(--info); background: color-mix(in srgb, var(--info) 12%, transparent); }
.fn-charge-panel { right: 0; left: auto; min-width: 270px; padding: 10px 12px; text-align: left; font-weight: 400; white-space: normal; }
.fn-charge-panel .check { display: flex; gap: 6px; align-items: center; padding: 3px 0; font-size: 13px; }
.fn-charge-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.fn-charge-sub { font-size: 12px; margin: 2px 0 4px 22px; }
.unbilled-line { color: var(--muted); }
.fn-charge-panel .cell-in { border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; background: var(--card); }

/* v0.81.0: holds on the planner: likely jobs, nothing booked */
.pl-bar.pl-hold { cursor: pointer; color: #115e59; border: 1px dashed #2dd4bf; background: repeating-linear-gradient(135deg, #ccfbf1 0 6px, #f0fdfa 6px 12px); }
.pl-bar.pl-hold.lk-possible { opacity: .55; }
.pl-bar.pl-hold.lk-likely { opacity: .8; }
.pl-bar.pl-hold:hover, .pl-bar.pl-hold:focus { opacity: 1; outline: none; box-shadow: 0 0 0 2px rgba(45,212,191,.35); }
.pl-hold-label { cursor: pointer; }
.hold-tag { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; padding: 0 5px; border-radius: 4px; color: #115e59; background: #ccfbf1; border: 1px dashed #2dd4bf; vertical-align: 1px; }
.legend i.hold-swatch, i.hold-swatch { background: repeating-linear-gradient(135deg, #ccfbf1 0 3px, #f0fdfa 3px 6px); border: 1px dashed #2dd4bf; }
[data-theme="dark"] .pl-bar.pl-hold { color: #99f6e4; border-color: rgba(45,212,191,.55); background: repeating-linear-gradient(135deg, rgba(20,184,166,.22) 0 6px, rgba(20,184,166,.08) 6px 12px); }
[data-theme="dark"] .hold-tag { color: #99f6e4; background: rgba(20,184,166,.18); border-color: rgba(45,212,191,.55); }
[data-theme="dark"] .legend i.hold-swatch, [data-theme="dark"] i.hold-swatch { background: repeating-linear-gradient(135deg, rgba(20,184,166,.3) 0 3px, transparent 3px 6px); border-color: rgba(45,212,191,.55); }
.pl-showchip.pl-holdchip { background: repeating-linear-gradient(135deg, #ccfbf1 0 5px, #f0fdfa 5px 10px) !important; color: #115e59 !important; border: 1px dashed #2dd4bf; }
[data-theme="dark"] .pl-showchip.pl-holdchip { background: repeating-linear-gradient(135deg, rgba(20,184,166,.22) 0 5px, rgba(20,184,166,.08) 5px 10px) !important; color: #99f6e4 !important; border-color: rgba(45,212,191,.55); }

/* v0.82.0: emails logged from Gmail */
.gm-list { display: flex; flex-direction: column; }
.gm-item { border-top: 1px solid var(--line-soft, var(--line)); }
.gm-item > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: baseline; padding: 9px 16px; }
.gm-item > summary::-webkit-details-marker { display: none; }
.gm-item > summary:hover { background: var(--hover); }
.gm-dir { font-weight: 700; color: var(--muted); }
.gm-dir.out { color: var(--info); }
.gm-sub { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.gm-body { white-space: pre-line; font-size: 13px; padding: 4px 16px 6px 44px; color: var(--ink-2, var(--ink)); max-height: 360px; overflow: auto; }
.gm-foot { padding: 0 16px 10px 44px; }

/* v0.83.0: the Gmail add-on's setup guide */
.gm-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.guide-md { line-height: 1.6; }
.guide-md h1 { font-size: 22px; margin: 0 0 12px; }
.guide-md h2 { font-size: 16px; margin: 26px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.guide-md p, .guide-md ul, .guide-md ol { margin: 0 0 10px; }
.guide-md ul, .guide-md ol { padding-left: 22px; }
.guide-md li { margin: 3px 0; }
.guide-md li > ul, .guide-md li > ol { margin: 4px 0; }
.guide-md code { font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; background: var(--hover); padding: 1px 5px; border-radius: 4px; }
.guide-md a { color: var(--info); }
.guide-md table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 8px 0 12px; }
.guide-md th, .guide-md td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.guide-md th { background: var(--hover); }

/* v0.84.2: the job's tabs on one line. The job's name gives way first, then the tabs' spacing;
   only a narrow window scrolls them sideways. */
@media (min-width: 761px) {
  .job-tabs { flex-wrap: nowrap; }
  .job-tabs a[data-tab], .job-tabs a.tab-page { flex: none; padding: 10px clamp(6px, .5vw, 12px); }
  .job-tabs .job-mini { flex: 0 1 auto; min-width: 0; max-width: none; }
  .job-tabs .job-mini b { min-width: 40px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
  .job-tabs .job-mini .status-pill, .job-tabs .job-mini .pill { flex: none; }
  .job-tabs .job-view { flex: none; }
  .job-tabs .grow { flex: 1 1 0; min-width: 0; }
}
/* v0.96.1: on a wide window the view switches go under the tabs (right) when there isn't room beside them,
   instead of running off the edge */
@media (min-width: 1241px) {
  .job-tabs { flex-wrap: wrap; }
  .job-tabs .job-view { margin-left: auto; }
}
@media (min-width: 761px) and (max-width: 1240px) {
  .job-tabs { overflow-x: auto; scrollbar-width: none; }
  .job-tabs::-webkit-scrollbar { display: none; }
}

/* v0.84.3: sub-hires on the job page, one block each */
.subs-list { display: flex; flex-direction: column; }
.subs-all { display: inline-flex; gap: 6px; align-items: center; padding: 8px 16px 4px; }
.sub-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px 10px; align-items: start; padding: 10px 16px; border-top: 1px solid var(--line-soft, var(--line)); }
.sub-row > input[type=checkbox] { margin-top: 3px; }
.sub-row.is-done { opacity: .6; }
.sub-what .strong { font-weight: 600; }
.sub-qty { display: inline-flex; align-items: center; gap: 6px; }
.sub-fields { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.sub-fields select.input-sm { width: auto; min-width: 0; max-width: 100%; flex: 1 1 150px; }
.sub-fields .sub-cost { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.subs-list .cell-in { width: 56px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; text-align: right; }
.subs-list .cell-in.w80 { width: 86px; }
.subs-list select.sub-status.b-ok { border-color: color-mix(in srgb, var(--ok, #16a34a) 50%, var(--line)); }
.subs-list select.sub-status.b-warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }

/* v0.85.0: background work on Settings → System */
.task-out > summary { cursor: pointer; display: inline; }
.task-out[open] > summary { display: block; margin-bottom: 4px; }

/* v0.85.0: the Activity filter */
.act-filter { gap: 4px; }
.act-filter .chip { font-size: 12px; padding: 3px 9px; }
.act-filter .chip[aria-pressed="false"] { opacity: .55; text-decoration: line-through; }
.act-filter .chip[aria-pressed="true"] { background: var(--hover); border-color: var(--line-2, var(--line)); }
[data-act-card] li[hidden], [data-act-card] [data-act-hint][hidden] { display: none !important; }

/* v0.95.0: the job total, with or without GST */
.gst-toggle { all: unset; cursor: pointer; white-space: nowrap; border-radius: 4px; padding: 0 2px; }
.gst-toggle:hover .faint { text-decoration: underline; text-decoration-style: dotted; }
.gst-toggle:focus-visible { outline: 2px solid var(--brand, #303030); }

/* v0.95.0: part prep */
.prep-cell { text-align: right; white-space: nowrap; }   /* v0.96.1: right, so the ticks line up */
/* v0.95.1: the prep counter, a pill: − 5 / 16 + */
.prep-n { display: inline-flex; align-items: center; height: 30px; margin-right: 10px; vertical-align: middle; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-variant-numeric: tabular-nums; transition: border-color .15s, background .15s; }
.prep-n:focus-within { border-color: var(--ink-2); }
.prep-n input { all: unset; width: 3ch; text-align: right; font-weight: 600; font-size: 14px; color: var(--ink); cursor: text; }
.prep-n input:focus { text-decoration: underline; text-underline-offset: 3px; }
.prep-n .prep-of { color: var(--muted); font-size: 13px; padding: 0 2px 0 4px; min-width: 3ch; }
.prep-step { all: unset; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; user-select: none; }
.prep-step:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.prep-step:disabled { opacity: .3; cursor: default; }
.prep-step:focus-visible { outline: 2px solid var(--ink-2); }
.prep-n.is-part { border-color: color-mix(in srgb, #f59e0b 55%, var(--line)); background: color-mix(in srgb, #f59e0b 10%, var(--card)); }
.prep-n.is-done { border-color: color-mix(in srgb, #16a34a 50%, var(--line)); background: color-mix(in srgb, #16a34a 10%, var(--card)); }
.prep-n.is-done .prep-of { color: color-mix(in srgb, #16a34a 75%, var(--ink)); }
body.tablet .prep-n { height: 40px; }
body.tablet .prep-step { width: 38px; height: 38px; font-size: 20px; }
.choice-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; white-space: normal; padding: 10px 12px; height: auto; }

/* v0.95.0: dragging sections */
.drag-group { margin-right: 2px; cursor: grab; }
.q-group.dragging { opacity: .45; }
.q-group.drop-into { outline: 2px dashed var(--brand, #303030); outline-offset: 2px; }
.q-group.drop-into .q-group-head { background: color-mix(in srgb, var(--brand, #303030) 8%, transparent); }
.q-group-head:hover .drag-h { opacity: 1; }

/* v0.95.0: problems reported with gear */
.issue-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line); }
.issue-row:first-child { border-top: 0; }
.issue-row.done { opacity: .6; }
.issue-note { margin: 4px 0 2px; white-space: pre-line; font-size: 14.5px; }
.issue-photo { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.issue-alert { border: 2px solid var(--warn, #b45309); background: color-mix(in srgb, var(--warn, #b45309) 9%, var(--card)); }
.issue-alert .card-head h2 { color: var(--warn, #b45309); }
.issue-kinds label { padding: 6px 14px; cursor: pointer; border-right: 1px solid var(--line); }
.issue-kinds label:last-child { border-right: 0; }
.issue-line { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--warn, #b45309) 14%, transparent); border-left: 4px solid var(--warn, #b45309); font-size: 14px; font-weight: 500; }

/* v0.95.0: Documents → Links to send */
.menu-panel .menu-sub > summary { list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 10px; border-radius: var(--radius); font-size: 13px; cursor: pointer; }
.menu-panel .menu-sub > summary::-webkit-details-marker { display: none; }
.menu-panel .menu-sub > summary::after { content: '▸'; color: var(--muted); }
.menu-panel .menu-sub[open] > summary::after { content: '▾'; }
.menu-panel .menu-sub > summary:hover { background: var(--hover); }
.menu-panel .sep { display: block; width: auto; }   /* not the inline gap .sep is elsewhere */
.menu-panel .menu-sub-list { padding-left: 10px; border-left: 2px solid var(--line); margin: 2px 0 4px 10px; }

/* v0.95.1: the job's header: title and actions on top; client, venue, dates and the total on one line under them, the full width */
@media (min-width: 761px) {
  .job-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: end; }
  .job-head > .grow { display: contents; }
  .job-head > .grow > * { grid-column: 1 / -1; }
  .job-head > .grow > .crumbs { grid-column: 1; grid-row: 1; }
  .job-head > .grow > .row { grid-column: 1; grid-row: 2; min-width: 0; flex-wrap: wrap; }
  .job-head > .row { grid-column: 2; grid-row: 1 / 3; align-self: end; flex-wrap: wrap; justify-content: flex-end; }
}

/* ===== v0.96.0: calmer, cleaner ===== */
/* the job's info line: visible separators */
.job-sub .dot { margin: 0 9px; }
.job-sub .dot .sep { display: none; }
.job-sub .dot::before { content: '·'; color: var(--faint); font-weight: 700; }
/* the warehouse pages, as tabs */
.job-tabs a.tab-page { padding: 10px 10px; }
.job-tabs a.tab-page { font-size: 14px; color: var(--muted); white-space: nowrap; display: inline-flex; gap: 5px; align-items: center; }
.job-tabs a.tab-page:hover { color: var(--ink); }
.job-tabs a.tab-page span { color: var(--faint); font-size: 12px; }
.next-chip-row .next-chip { padding: 5px 11px; margin-right: 6px; }
/* shortages: one quiet line */
.short-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-left: 3px solid var(--bad); border-radius: var(--radius); background: var(--card); font-size: 13.5px; }
.short-strip .short-ico { width: 18px; height: 18px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.short-strip .grow { min-width: 220px; }
table.q tr.short td, table.q tr.hard td { background: none; }
table.q tr.hard td.name { box-shadow: inset 3px 0 0 var(--bad); }
table.q tr.short td.name { box-shadow: inset 3px 0 0 var(--warn, #f59e0b); }
/* section heads: the extra controls show on hover (always on touch screens) */
.q-group-head .hover-ctl { opacity: 0; pointer-events: none; transition: opacity .12s; }
.q-group:hover .q-group-head .hover-ctl, .q-group-head:focus-within .hover-ctl { opacity: 1; pointer-events: auto; }
.q-group-head .drag-group { opacity: .35; }
.q-group:hover .q-group-head .drag-group { opacity: 1; }
@media (hover: none) { .q-group-head .hover-ctl, .q-group-head .drag-group { opacity: 1; pointer-events: auto; } }
/* + Add */
.add-panel { min-width: 260px; }
.add-panel form { margin: 0; }
.add-panel button b { font-weight: 600; display: block; }
.menu-hint { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
/* jobs list: weeks and progress */
table.t tr.week-row td { background: var(--subtle); font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); padding: 6px 12px; border-bottom: 1px solid var(--line); }
table.t tr.week-row:hover td { background: var(--subtle); }
.pg-row { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.pg { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pg i { position: absolute; z-index: -1; inset: 0 auto 0 0; width: var(--w); background: color-mix(in srgb, #f59e0b 16%, transparent); }
.pg.is-done i { background: color-mix(in srgb, #16a34a 16%, transparent); }
.pg.is-part { border-color: color-mix(in srgb, #f59e0b 45%, var(--line)); color: var(--ink-2); }
.pg.is-done { border-color: color-mix(in srgb, #16a34a 45%, var(--line)); color: color-mix(in srgb, #16a34a 70%, var(--ink)); }
.pg.is-done::before { content: '✓'; font-size: 10px; }
/* dashboard tiles */
.stat .value .value-sep { color: var(--faint); margin: 0 8px; font-weight: 400; }
.stat .value.faint-v { color: var(--muted); font-size: 20px; font-weight: 600; }
.stat.stat-alert { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); box-shadow: inset 3px 0 0 var(--bad); }
.stat .label .faint { font-weight: 400; }
/* tablet mode: the last scan stays in view; whole rows are tappable */
.scan-last { display: none; }
#scan-form { position: relative; }
body.tablet form#scan-form.card { position: sticky; flex-wrap: wrap; }   /* an inline position: relative was winning */
body.tablet .scan-last:not([hidden]) { display: flex; align-items: center; gap: 12px; flex-basis: 100%; padding: 10px 16px; border-radius: var(--radius-lg); font-size: 19px; font-weight: 600; color: #fff; }
body.tablet .scan-last.ok { background: #15803d; }
body.tablet .scan-last.bad { background: #b91c1c; }
body.tablet .scan-last b { font-size: 26px; }
body.tablet .scan-last span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.tablet .scan-last time { font-size: 14px; font-weight: 500; opacity: .85; }
body.tablet #prep-root tr:has(input.tick) { cursor: pointer; }
body.tablet #prep-root tr:has(input.tick):active td { background: var(--hover); }

@media (min-width: 761px) { .job-tabs a.tab-page { padding: 10px clamp(6px, .5vw, 12px); } }

/* v0.97.0: public holidays */
.hol-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-left: 3px solid var(--violet); border-radius: var(--radius); background: var(--card); font-size: 13.5px; }
.hol-strip .hol-ico { color: var(--violet); flex: none; }
.hol-strip .grow { min-width: 220px; }
.hol-chip { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; font-size: 10.5px; font-weight: 600; line-height: 1.35; padding: 0 7px; border-radius: 999px; color: var(--violet); background: var(--violet-bg); white-space: nowrap; vertical-align: 1px; }
.hol-chip .hol-x { font-weight: 700; opacity: .8; }
.hol-chip.hol-no { color: var(--muted); background: var(--subtle); }
.when-cell .hol-chip { margin-left: 0; margin-top: 2px; }
.when-cell .link-btn + .hol-chip { display: flex; width: max-content; }
.totals-bar .hol-line .v { color: var(--violet); }
.hol-hint { margin-top: 5px; font-size: 12px; color: var(--violet); line-height: 1.35; grid-column: 1 / -1; }
.pl-cell-day.hol { background: var(--violet-bg); color: var(--violet); }
.pl-row-bg.hol { background: color-mix(in srgb, var(--violet) 6%, transparent); }
table.av thead th.hol { background: var(--violet-bg); color: var(--violet); }
.pl-hol { color: var(--violet); }
.pl-hol .pl-hol-n { display: block; font-size: 10.5px; font-weight: 600; }
.hol-table tr.hol-off td { color: var(--faint); text-decoration: line-through; }
.hol-table tr.hol-off td:last-child, .hol-table tr.hol-off td:nth-child(3) { text-decoration: none; }
.hol-table tr.hol-past td { opacity: .6; }
.hol-soon { list-style: none; margin: 0; padding: 6px 16px 10px; }
.hol-soon li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.hol-soon li:last-child { border-bottom: 0; }

/* v0.99.0: timesheets */
.ts-table .ts-call td { background: var(--subtle); padding-top: 10px; }
.ts-over { display: inline-block; margin: 0 6px; font-size: 12px; font-weight: 600; color: var(--warn); }
.ts-edit summary { cursor: pointer; list-style: none; }
.ts-edit summary::-webkit-details-marker { display: none; }
.ts-edit[open] summary { display: none; }
.ts-form { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ts-form .input[type=time] { width: auto; }
.ts-form .input[name=note] { width: 140px; }
.ts-inner td { border: 0; padding: 2px 8px 2px 0; }

/* v0.101.0: the days crew are added on */
.crew-days { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 4px; }
.day-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; cursor: pointer; user-select: none; background: var(--card); }
.day-chip input { margin: 0; accent-color: var(--brand, var(--ink)); }
.day-chip:has(input:checked) { border-color: var(--ink); font-weight: 600; }
.day-chip.hol { border-style: dashed; }
.add-row:has(.crew-days) { flex-wrap: wrap; }
.crew-days { padding-left: 2px; }
/* v0.101.0: the person picker: tick several, then book, pencil or ask them together */
.book-row .book-tick { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ink); }
.book-row.picked { background: var(--subtle); }
.book-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.book-bar[hidden] { display: none; }

/* v1.1.0: Incidents */
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .dl { grid-template-columns: 1fr; gap: 2px; } .dl dd { margin-bottom: 8px; } }
.legal-links .link { color: inherit; }
