/* Mr. Sharpe Dispatch — shop-ticket UI.
   Ink navy chrome (brand blue family), steel-grey workbench canvas, white tickets,
   one bold accent: "spark" yellow (sparks off the grinding wheel) for the current/active thing.
   Store identity: thick colored spine + labeled tag (Fresno purple / Signal Hill teal). */

:root {
  --ink: #12263d;          /* text + chrome */
  --brand: #1b3a5c;        /* deep Mr. Sharpe blue */
  --brand-2: #3e6d9c;      /* brand blue */
  --brand-3: #8aa5bf;      /* brand light blue */
  --spark: #ffc93c;        /* the one loud accent */
  --spark-ink: #5a3d00;
  --bench: #e9eef4;        /* canvas */
  --paper: #ffffff;
  --paper-2: #f5f8fb;
  --line: #cfd9e4;
  --line-2: #b4c3d3;
  --muted: #4b5d72;
  --faint: #6b7d91;

  --fresno: #7c3aed; --fresno-bg: #f1eaff; --fresno-ink: #4c1d95;
  --sh: #0d9488;     --sh-bg: #ddf6f2;     --sh-ink: #115e59;

  --ok: #157f3b; --ok-bg: #e2f6e8;
  --info: #1d5fb8; --info-bg: #e3eefc;
  --warn: #9a5b00; --warn-bg: #fff1d1;
  --bad: #b42318; --bad-bg: #fde6e3;
  --urgent: #c2410c; --urgent-bg: #ffedd5;

  --r-lg: 14px; --r: 10px; --r-sm: 7px;
  --shadow: 0 1px 0 rgba(18, 38, 61, .06), 0 1px 3px rgba(18, 38, 61, .08);
  --shadow-lift: 0 10px 30px rgba(18, 38, 61, .18);
  --font: "Avenir Next", "Avenir", "Segoe UI", "Helvetica Neue", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-num: "SF Mono", "Cascadia Mono", "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;
  --side-w: 236px;
  --tap: 44px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--ink); background: var(--bench); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
a { color: var(--brand-2); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 750; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 .6em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .875rem; }
.lead { font-size: 1.05rem; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-num); font-size: .92em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--spark); color: var(--ink); padding: 10px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }
.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }

/* ---------------------------------------------------------------- boot / loading */
.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--muted); gap: 12px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand-2); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; gap: 12px; align-items: center; color: var(--muted); padding: 28px 4px; }
.loading .spinner { width: 20px; height: 20px; margin: 0; }

/* ---------------------------------------------------------------- shell */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--side-w) 1fr; background: linear-gradient(to right, var(--brand) var(--side-w), transparent 0); }
.side { background: var(--brand); color: #e7eef6; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 12px; overflow-y: auto; }
.brandmark { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; color: #fff; text-decoration: none; }
.brandmark:hover { color: #fff; }
.logo-mark { width: 38px; height: 38px; flex: none; --brand: #2c5784; }
.brandmark b { font-size: 1.12rem; font-weight: 800; display: block; line-height: 1.1; letter-spacing: -.01em; }
.brandmark small { color: var(--brand-3); font-size: .78rem; display: block; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 8px 12px; border-radius: var(--r); color: #d7e3ef; text-decoration: none; font-weight: 600; position: relative; }
.nav a .ic { width: 20px; height: 20px; opacity: .9; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a[aria-current="page"] { background: #fff; color: var(--brand); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 5px; border-radius: 0 4px 4px 0; background: var(--spark); }
.nav .badge { margin-left: auto; }
.nav-sep { height: 1px; background: rgba(255,255,255,.12); margin: 10px 8px; }
.side-foot { margin-top: auto; padding: 14px 8px 4px; font-size: .86rem; color: var(--brand-3); }
.side-foot .who { color: #fff; font-weight: 700; display: block; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--bad); color: #fff; font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.badge.soft { background: var(--spark); color: var(--spark-ink); }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar .search { order: 2; }
.topbar .modepills { order: 3; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(233, 238, 244, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 10px 24px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.topbar .mobile-brand { display: none; }
.filters { display: flex; background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 12px; padding: 3px; gap: 2px; }
.filters button { border: 0; background: transparent; min-height: 40px; padding: 6px 14px; border-radius: 9px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.filters button:hover { color: var(--ink); background: var(--paper-2); }
.filters button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.filters button[data-f="fresno"][aria-pressed="true"] { background: var(--fresno); }
.filters button[data-f="signal_hill"][aria-pressed="true"] { background: var(--sh); }
.filters .fdot { width: 10px; height: 10px; border-radius: 50%; }
.filters [data-f="fresno"] .fdot { background: var(--fresno); }
.filters [data-f="signal_hill"] .fdot { background: var(--sh); }
.filters [aria-pressed="true"] .fdot { background: #fff; }
.search { position: relative; flex: 1 1 260px; max-width: 460px; margin-left: auto; }
.search input[type=search] { width: 100%; min-height: var(--tap); padding: 8px 12px 8px 40px; border: 1.5px solid var(--line-2); border-radius: 12px; font: inherit; background: var(--paper); color: var(--ink); }
.search > .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 18px; height: 18px; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-lift); max-height: 70vh; overflow: auto; z-index: 40; padding: 6px; }
.search-results h4 { font-size: .8rem; color: var(--faint); padding: 8px 10px 4px; font-weight: 700; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 8px; text-decoration: none; color: var(--ink); min-height: var(--tap); }
.search-results a:hover, .search-results a.active { background: var(--paper-2); }
.search-results .sub { color: var(--muted); font-size: .86rem; }
.modepills { display: flex; gap: 6px; }
.testpill { display: inline-flex; gap: 6px; align-items: center; background: var(--spark); color: var(--spark-ink); font-weight: 800; font-size: .8rem; padding: 6px 11px; border-radius: 99px; text-decoration: none; border: 2px dashed var(--spark-ink); white-space: nowrap; }
.testpill:hover { color: var(--spark-ink); filter: brightness(.97); }

main { padding: 22px 24px 60px; max-width: 1500px; width: 100%; }
.page-head { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bottomnav { display: none; }

.stale-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--spark); color: var(--spark-ink); padding: 10px 14px; border-radius: var(--r); font-weight: 700; margin-bottom: 14px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 8px 16px; border-radius: var(--r); border: 1.5px solid var(--line-2); background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.15; }
.btn:hover { border-color: var(--brand-2); color: var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #224a74; color: #fff; }
.btn.spark { background: var(--spark); border-color: #e6ae19; color: var(--spark-ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand-2); }
.btn.ghost:hover { background: rgba(62,109,156,.09); }
.btn.sm { min-height: 36px; padding: 5px 11px; font-size: .9rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn .ic { width: 18px; height: 18px; }
.icon-btn { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn .ic { width: 22px; height: 22px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span, .field-label { font-weight: 700; font-size: .9rem; color: var(--ink); }
.field .hint { font-weight: 400; color: var(--muted); font-size: .84rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=url], input[type=search], input:not([type]), select, textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-sm); min-height: var(--tap); padding: 8px 11px; width: 100%; }
textarea { min-height: 80px; resize: vertical; line-height: 1.45; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5d72' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 34px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(62,109,156,.35); border-color: var(--brand-2); outline-offset: 0; }
input:invalid:not(:placeholder-shown):not(:focus) { border-color: var(--bad); }
.check { display: flex; gap: 10px; align-items: center; min-height: var(--tap); cursor: pointer; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.form-error { background: var(--bad-bg); color: var(--bad); border-left: 4px solid var(--bad); padding: 10px 12px; border-radius: 6px; font-weight: 600; margin-top: 12px; }
fieldset { border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 0; }
legend { font-weight: 800; padding: 0 6px; }
.seg { display: inline-flex; border: 1.5px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.seg button, .seg label { border: 0; background: transparent; min-height: 40px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button + button, .seg label + label { border-left: 1.5px solid var(--line); }
.seg button[aria-pressed="true"], .seg input:checked + span { background: var(--brand); color: #fff; }
.seg label { padding: 0; }
.seg label span { padding: 8px 14px; display: block; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- tags, pills, flags, chips */
.store-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 6px; font-weight: 800; font-size: .82rem; white-space: nowrap; line-height: 1.6; }
.store-tag .store-dot { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); }
.store-fresno { background: var(--fresno-bg); color: var(--fresno-ink); box-shadow: inset 0 0 0 1.5px var(--fresno); }
.store-fresno .store-dot { background: var(--fresno); }
.store-signal_hill { background: var(--sh-bg); color: var(--sh-ink); box-shadow: inset 0 0 0 1.5px var(--sh); }
.store-signal_hill .store-dot { background: var(--sh); }
.store-tag.sm { font-size: .74rem; padding: 0 7px 0 6px; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .84rem; padding: 3px 10px; border-radius: 99px; white-space: nowrap; border: 1.5px solid; }
.pill .ic { width: 15px; height: 15px; }
.status-new { color: #334155; border-color: #94a3b8; background: #f1f5f9; }
.status-scheduled { color: #1d4ed8; border-color: #93b4f5; background: #eaf1ff; }
.status-in_progress { color: #8a4b00; border-color: #f0b85a; background: #fff4de; }
.status-ready { color: #0f6b4f; border-color: #6fcfa8; background: #e4f8ef; }
.status-completed { color: #fff; border-color: #157f3b; background: #157f3b; }
.status-canceled { color: #6b7280; border-color: #d1d5db; background: #f9fafb; text-decoration: line-through; }

.flag { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: .78rem; padding: 2px 8px; border-radius: 5px; white-space: nowrap; }
.flag .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.flag-urgent { background: var(--urgent); color: #fff; }
.flag-overdue { background: var(--bad-bg); color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }
.flag-blocked { background: #1f2937; color: #fff; background-image: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(255,255,255,.12) 6px 12px); }
.flag-review { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1.5px #e3a63b; }
.flag-test { background: var(--spark); color: var(--spark-ink); }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 650; padding: 2px 9px; border-radius: 6px; background: var(--paper-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip .ic { width: 14px; height: 14px; }
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: #a8dcb9; }
.chip.info { background: var(--info-bg); color: var(--info); border-color: #b4cdf1; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: #f0c87a; }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: #f2b0a8; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.kind-appt { display: inline-flex; gap: 5px; align-items: center; font-weight: 800; font-size: .76rem; color: var(--brand); }
.kind-deadline { display: inline-flex; gap: 5px; align-items: center; font-weight: 800; font-size: .76rem; color: var(--bad); border: 1.5px dashed var(--bad); padding: 0 6px; border-radius: 4px; }

/* ---------------------------------------------------------------- panels */
.panel { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); border: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { display: flex; align-items: center; gap: 9px; }
.panel-head .count { font-variant-numeric: tabular-nums; background: var(--bench); color: var(--ink); font-weight: 800; font-size: .85rem; padding: 1px 9px; border-radius: 99px; }
.panel-head .count.hot { background: var(--bad); color: #fff; }
.panel-head .count.warm { background: var(--spark); color: var(--spark-ink); }
.panel-head .tools { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.panel-body { padding: 14px 16px; }
.panel-body.flush { padding: 0; }
.panel + .panel, .stack > * + * { margin-top: 16px; }
.panel.tone-bad { border-top: 5px solid var(--bad); }
.panel.tone-warn { border-top: 5px solid var(--spark); }
.panel.tone-ok { border-top: 5px solid var(--ok); }
.panel.tone-info { border-top: 5px solid var(--brand-2); }
.panel.tone-ink { border-top: 5px solid var(--ink); }
.section-note { font-size: .88rem; color: var(--muted); padding: 10px 16px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-weight: 500; }
.alert > .ic { width: 20px; height: 20px; margin-top: 2px; }
.alert.bad { background: var(--bad-bg); color: #7a1a10; border-left: 5px solid var(--bad); }
.alert.warn { background: var(--warn-bg); color: #6b3f00; border-left: 5px solid #e3a63b; }
.alert.info { background: var(--info-bg); color: #163f7a; border-left: 5px solid var(--info); }
.alert.ok { background: var(--ok-bg); color: #0e5428; border-left: 5px solid var(--ok); }
.alert.test { background: #fff8e0; color: var(--spark-ink); border: 2px dashed #d39b0b; }
.empty { display: flex; gap: 10px; align-items: center; color: var(--faint); padding: 18px 16px; }
.empty .ic { color: var(--ok); width: 20px; height: 20px; }
.empty p { margin: 0; }

/* ---------------------------------------------------------------- ticket (job card) */
.ticket { position: relative; display: block; background: var(--paper); border: 1px solid var(--line); border-left: 7px solid var(--line-2); border-radius: var(--r); padding: 11px 13px 11px 13px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.ticket a.stretch { text-decoration: none; }
.ticket a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ticket .quick, .ticket .flags [title] { position: relative; z-index: 1; }
.ticket:focus-within { outline: 3px solid var(--brand-2); outline-offset: 1px; }
.ticket:hover { border-color: var(--line-2); color: var(--ink); box-shadow: 0 4px 14px rgba(18,38,61,.12); }
.ticket.store-fresno, .ticket.store-signal_hill { background: var(--paper); box-shadow: var(--shadow); }
.ticket.store-fresno { border-left-color: var(--fresno); }
.ticket.store-signal_hill { border-left-color: var(--sh); }
.ticket.is-blocked { background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(31,41,55,.035) 10px 20px); }
.ticket.is-overdue { box-shadow: inset 0 0 0 1.5px #f2b0a8, var(--shadow); }
.ticket-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.jobno { white-space: nowrap; font-family: var(--font-num); font-weight: 700; font-size: .86rem; color: var(--brand); letter-spacing: -.02em; }
.ticket-title { font-weight: 750; font-size: 1.02rem; margin: 5px 0 2px; line-height: 1.3; }
.ticket-meta { display: flex; gap: 4px 12px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; align-items: center; }
.ticket-meta > span { display: inline-flex; gap: 5px; align-items: center; }
.ticket .chips { margin-top: 8px; }
.ticket .chip { white-space: normal; max-width: 100%; }
.col-head .small { white-space: nowrap; }
.ticket .flags { display: flex; gap: 5px; flex-wrap: wrap; margin-left: auto; }
.assignee { display: inline-flex; gap: 5px; align-items: center; }
.assignee.none { color: var(--bad); font-weight: 700; }
.ticket-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; }

/* rows (dashboard / lists) */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: flex; gap: 12px; align-items: center; padding: 11px 16px; text-decoration: none; color: var(--ink); min-height: 56px; border-left: 5px solid transparent; }
a.row:hover { background: var(--paper-2); color: var(--ink); }
.row.store-fresno, .row.store-signal_hill { background: transparent; box-shadow: none; }
.row.store-fresno { border-left-color: var(--fresno); }
.row.store-signal_hill { border-left-color: var(--sh); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-sub { color: var(--muted); font-size: .88rem; display: flex; gap: 4px 12px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.row-side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row-when { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .chev { color: var(--faint); }

/* ---------------------------------------------------------------- dashboard */
.dash-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.tally { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 13px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; min-height: 76px; position: relative; overflow: hidden; }
.tally:hover { border-color: var(--brand-2); color: var(--ink); }
.tally b { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.05; }
.tally span { font-size: .85rem; color: var(--muted); font-weight: 600; line-height: 1.25; }
.tally.hot { background: var(--bad); border-color: var(--bad); color: #fff; }
.tally.hot span { color: #ffe0dc; }
.tally.warm { background: var(--spark); border-color: #e6ae19; color: var(--spark-ink); }
.tally.warm span { color: var(--spark-ink); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dash-grid .panel + .panel { margin-top: 0; }
.dash-grid .wide { grid-column: 1 / -1; }
.today-panel { border-top: 6px solid var(--spark); }
.more-link { display: block; text-align: center; padding: 10px; font-weight: 700; border-top: 1px solid var(--line); text-decoration: none; }

/* ---------------------------------------------------------------- ops board */
.board { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(205px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.col { background: #dfe6ee; border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 200px; }
.col-head { display: flex; gap: 8px; align-items: center; padding: 12px 14px 8px; font-weight: 800; position: sticky; top: 0; }
.col-head .count { margin-left: auto; background: var(--paper); border-radius: 99px; padding: 0 9px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.col .ticket-list { padding: 4px 10px 12px; flex: 1; min-height: 120px; }
.col.drop-ok { background: #fff3c8; outline: 3px dashed #d39b0b; outline-offset: -3px; }
.ticket[draggable="true"] { cursor: grab; }
.ticket.dragging { opacity: .45; }
.ticket .quick { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.ticket .quick input[type=date] { min-height: 38px; font-size: .88rem; padding: 4px 8px; }
.ticket .quick select { min-height: 38px; font-size: .88rem; padding: 4px 28px 4px 8px; width: 100%; min-width: 0; flex: 1 1 100%; }
.view-toggle { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.toolbar .field { min-width: 150px; }
.toolbar .field select, .toolbar .field input { min-height: 40px; }

/* tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; font-size: .82rem; color: var(--muted); font-weight: 750; padding: 10px 12px; border-bottom: 2px solid var(--line); background: var(--paper-2); white-space: nowrap; position: sticky; top: 0; }
.tbl th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.tbl th button:focus-visible { outline: 3px solid var(--brand-2); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.store-fresno td:first-child { box-shadow: inset 5px 0 0 var(--fresno); }
.tbl tr.store-signal_hill td:first-child { box-shadow: inset 5px 0 0 var(--sh); }
.tbl tr.store-fresno, .tbl tr.store-signal_hill { background: none; box-shadow: none; }
.tbl tbody tr:hover { background: var(--paper-2); }
.tbl td select { min-height: 36px; padding: 4px 30px 4px 8px; font-size: .9rem; }
.tbl .r { text-align: right; }
.tbl tr.over30 td { background: #fff1ef; }
.tbl tr.over30 td:first-child { box-shadow: inset 6px 0 0 var(--bad); }

/* ---------------------------------------------------------------- job detail */
.job-hero { background: var(--paper); border-radius: var(--r-lg); border: 1px solid var(--line); border-top: 8px solid var(--line-2); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.job-hero.store-fresno { border-top-color: var(--fresno); background: var(--paper); box-shadow: var(--shadow); }
.job-hero.store-signal_hill { border-top-color: var(--sh); background: var(--paper); box-shadow: var(--shadow); }
.job-hero .top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.job-hero .jobno { font-size: 1.05rem; }
.job-hero h1 { margin: 8px 0 4px; font-size: 1.45rem; }
.job-hero .sub { color: var(--muted); display: flex; gap: 6px 14px; flex-wrap: wrap; }
.job-hero .controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 14px; align-items: end; }
.stepper { display: flex; gap: 0; margin-top: 14px; overflow-x: auto; border-radius: var(--r); border: 1.5px solid var(--line-2); background: var(--paper-2); }
.stepper button { flex: 1 1 0; min-height: 50px; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 6px 10px; position: relative; white-space: nowrap; }
.stepper button + button { border-left: 1.5px solid var(--line); }
.stepper button:hover { background: #fff; color: var(--ink); }
.stepper button.past { color: var(--ok); }
.stepper button[aria-current="step"] { background: var(--brand); color: #fff; }
.stepper button[aria-current="step"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--spark); }
.stepper button.cancel { flex: 0 0 auto; color: var(--faint); }
.stepper button.cancel[aria-current="step"] { background: #6b7280; }

.blocked-bar { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 10px 14px; border-radius: var(--r); background: #1f2937; color: #fff; background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(255,255,255,.07) 10px 20px); flex-wrap: wrap; }
.blocked-bar strong { display: inline-flex; gap: 6px; align-items: center; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; font-size: .9rem; }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

.note-cust { background: #eef6ff; border: 1.5px solid #b4cdf1; border-radius: var(--r); padding: 12px 14px; }
.note-int { background: #fff8e0; border: 1.5px dashed #d39b0b; border-radius: var(--r); padding: 12px 14px; }
.note-head { display: flex; gap: 8px; align-items: center; font-weight: 800; margin-bottom: 6px; font-size: .92rem; }
.note-cust .note-head { color: var(--info); }
.note-int .note-head { color: var(--spark-ink); }
.note-body { white-space: pre-wrap; }
.note-body.emptyish { color: var(--faint); font-style: italic; }

/* knife lines */
.knives { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.knife { border: 1.5px solid var(--line); border-radius: var(--r); background: var(--paper); padding: 12px; }
.knife-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.knife-head .name { font-weight: 800; font-size: 1.02rem; }
.cat { font-size: .78rem; font-weight: 800; padding: 2px 8px; border-radius: 5px; border: 1.5px solid; }
.cat-regular_exchange { color: #1d4ed8; border-color: #93b4f5; background: #eef3ff; }
.cat-additional_exchange { color: #8a4b00; border-color: #f0b85a; background: #fff4de; }
.cat-sold { color: #0f6b4f; border-color: #6fcfa8; background: #e4f8ef; }
.cat-client_owned { color: #475569; border-color: #94a3b8; background: #f1f5f9; }
.cat-other { color: #6b7280; border-color: #d1d5db; }
.qty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 10px; }
.qty { display: flex; flex-direction: column; gap: 4px; }
.qty > span { font-size: .78rem; color: var(--muted); font-weight: 700; line-height: 1.2; min-height: 2.4em; display: flex; align-items: flex-end; }
.qty .stepbox { display: flex; align-items: stretch; border: 1.5px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--paper); }
.qty .stepbox button { width: 38px; border: 0; background: var(--paper-2); cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.qty .stepbox button:hover { background: #e3eaf2; }
.qty .stepbox input { border: 0; border-radius: 0; text-align: center; min-height: 42px; padding: 4px 2px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 0; -moz-appearance: textfield; }
.qty .stepbox input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty .readout { min-height: 46px; display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; border-radius: 8px; background: var(--paper-2); font-variant-numeric: tabular-nums; border: 1.5px solid var(--line); }
.qty .readout.hot { background: var(--warn-bg); color: var(--warn); border-color: #f0c87a; }
.qty .readout.ok { background: var(--ok-bg); color: var(--ok); border-color: #a8dcb9; }
.knife-foot { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.knife.dirty { border-color: var(--spark); box-shadow: 0 0 0 3px rgba(255,201,60,.35); }

.amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.amounts > div { padding: 12px 16px; }
.amounts > div + div { border-left: 1px solid var(--line); }
.amounts span { display: block; font-size: .82rem; color: var(--muted); font-weight: 700; }
.amounts b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.amounts .total b { color: var(--brand); }

.charge-group h4 { font-size: .9rem; margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }
.charge-group + .charge-group { margin-top: 14px; }
.charge { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r); flex-wrap: wrap; }
.charge + .charge { margin-top: 8px; }
.charge.proposed { border-style: dashed; border-color: #d39b0b; background: #fffbea; }
.charge.approved { border-color: #a8dcb9; background: #f3fbf6; }
.charge.waived { opacity: .75; background: var(--paper-2); }
.charge.waived .amt { text-decoration: line-through; }
.charge .amt { font-weight: 800; font-variant-numeric: tabular-nums; margin-left: auto; }

.timeline { list-style: none; margin: 0; padding: 6px 16px 14px; }
.timeline li { position: relative; padding: 8px 0 8px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--brand-3); }
.timeline .t-when { font-size: .8rem; color: var(--faint); }
.timeline .t-what { font-weight: 600; }

.issue { border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px; }
.issue + .issue { margin-top: 10px; }
.issue.open { border-color: #f2b0a8; background: #fffaf9; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; background: var(--paper-2); }

.split { display: grid; grid-template-columns: 1fr; gap: 16px; }
.split > .panel + .panel { margin-top: 0; }
.grid.sched { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.dir-head { display: flex; gap: 10px; align-items: center; }
.dir-head .dir-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.dir-out .dir-ic { background: var(--info-bg); color: var(--info); }
.dir-in .dir-ic { background: var(--warn-bg); color: var(--warn); }
.mini-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.panel-body:has(> .mini-table) { overflow-x: auto; }
@media (max-width: 600px) { .mini-table th, .mini-table td { padding: 6px 4px; } .mini-table th { font-size: .74rem; } }
.mini-table th { text-align: left; color: var(--muted); font-weight: 700; font-size: .8rem; padding: 6px 8px; border-bottom: 1.5px solid var(--line); }
.mini-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.mini-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.mini-table tr.hot td { background: var(--warn-bg); }

.receipt-preview { border: 2px solid var(--ink); border-radius: var(--r); padding: 14px 16px; background: #fff; }
.receipt-preview .not-invoice { display: inline-block; background: var(--ink); color: #fff; font-weight: 800; padding: 4px 10px; border-radius: 6px; margin-bottom: 8px; }

/* ---------------------------------------------------------------- calendar */
.cal-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.cal-toolbar .range { font-weight: 800; font-size: 1.1rem; min-width: 200px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); margin-bottom: 10px; align-items: center; }
.legend .sw { display: inline-block; width: 22px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; }
.legend .sw.appt { background: var(--brand-3); }
.legend .sw.dl { border: 2px dashed var(--bad); background: #fff; }
.legend .sw.ext { background: repeating-linear-gradient(-45deg, #d6dde5 0 4px, #eef2f6 4px 8px); }
.cal { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal-head { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(0, 1fr)); border-bottom: 2px solid var(--line); background: var(--paper-2); position: sticky; top: 0; z-index: 3; }
.cal-head > div { padding: 8px 6px; text-align: center; font-weight: 750; font-size: .9rem; }
.cal-head > div + div { border-left: 1px solid var(--line); }
.cal-head .today { background: var(--spark); color: var(--spark-ink); }
.cal-head .dnum { font-size: 1.15rem; display: block; font-weight: 800; }
.cal-dl-row { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(0, 1fr)); border-bottom: 2px solid var(--line); min-height: 34px; }
.cal-dl-row > div { padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-dl-row > div + div { border-left: 1px solid var(--line); }
.cal-dl-row .lbl { font-size: .72rem; color: var(--muted); font-weight: 700; justify-content: center; text-align: center; line-height: 1.1; }
.dl { display: block; border: 2px dashed var(--bad); background: #fff; border-radius: 6px; padding: 2px 6px; font-size: .78rem; font-weight: 700; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left-width: 6px; border-left-style: solid; }
.dl.store-fresno { border-left-color: var(--fresno); background: #fff; box-shadow: none; color: var(--ink); }
.dl.store-signal_hill { border-left-color: var(--sh); background: #fff; box-shadow: none; color: var(--ink); }
.dl .dlk { color: var(--bad); font-weight: 800; }
.cal-body { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(0, 1fr)); position: relative; }
.cal-hours > div { height: var(--hh); font-size: .74rem; color: var(--faint); text-align: right; padding: 0 6px; transform: translateY(-.6em); font-variant-numeric: tabular-nums; }
.cal-day { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hh)); }
.cal-day.today { background-color: #fffdf3; }
.cal-day .slot { position: absolute; left: 0; right: 0; height: calc(var(--hh) / 2); cursor: copy; }
.cal-day .slot:hover { background: rgba(62,109,156,.07); }
.cal-day.drop-ok { background-color: #fff3c8; }
.ev { position: absolute; left: 3px; right: 3px; border-radius: 7px; padding: 3px 7px; font-size: .8rem; overflow: hidden; text-decoration: none; color: #fff; z-index: 2; border: 1px solid rgba(0,0,0,.08); box-shadow: 0 1px 2px rgba(0,0,0,.15); line-height: 1.25; }
.ev:hover { color: #fff; z-index: 4; box-shadow: var(--shadow-lift); }
.ev.store-fresno { background: var(--fresno); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.ev.store-signal_hill { background: var(--sh); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.ev .ev-t { font-weight: 800; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.short .ev-s { display: none; }
.ev.short { padding: 1px 6px; }
.ev .ev-s { opacity: .92; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .ev-store { font-size: .68rem; font-weight: 800; background: rgba(255,255,255,.22); border-radius: 3px; padding: 0 4px; }
.ev[draggable="true"] { cursor: grab; }
.ev.is-done { opacity: .6; }
.ev.ext { background: repeating-linear-gradient(-45deg, #d6dde5 0 6px, #e8edf2 6px 12px); color: #3b4a5c; border: 1px solid #c3cdd8; box-shadow: none; z-index: 1; cursor: default; }
.ev .sync-dot { position: absolute; top: 3px; right: 4px; background: #fff; color: var(--bad); border-radius: 50%; width: 16px; height: 16px; display: grid; place-items: center; }
.ev .sync-dot .ic { width: 11px; height: 11px; stroke-width: 3; }
.now-line { position: absolute; left: 0; right: 0; height: 0; border-top: 2.5px solid var(--bad); z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; background: var(--bad); border-radius: 50%; }
.cal-allday { padding: 4px; }
.day-list { display: none; }

/* ---------------------------------------------------------------- kanban (sales) */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; }
.deal { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; box-shadow: var(--shadow); border-left: 5px solid var(--line-2); }
.deal.store-fresno { border-left-color: var(--fresno); background: var(--paper); box-shadow: var(--shadow); }
.deal.store-signal_hill { border-left-color: var(--sh); background: var(--paper); box-shadow: var(--shadow); }
.deal h4 { font-size: 1rem; margin: 4px 0; }
.deal .val { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button { border: 0; background: none; font: inherit; font-weight: 750; color: var(--muted); padding: 10px 14px; min-height: var(--tap); cursor: pointer; text-decoration: none; white-space: nowrap; border-bottom: 4px solid transparent; margin-bottom: -2px; display: inline-flex; gap: 7px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs [aria-selected="true"] { color: var(--ink); border-bottom-color: var(--spark); }

/* ---------------------------------------------------------------- modal & toast */
.modal-wrap { position: fixed; inset: 0; background: rgba(13, 27, 44, .55); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; animation: fadein .12s ease-out; }
.modal-wrap.out { opacity: 0; transition: opacity .15s; }
.modal { background: var(--paper); border-radius: var(--r-lg); width: 100%; max-width: 560px; box-shadow: 0 24px 60px rgba(0,0,0,.35); border-top: 6px solid var(--brand); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 6px; }
.modal-head h2 { font-size: 1.25rem; }
.modal-head p { margin: 4px 0 0; }
.modal-body { padding: 10px 18px 16px; }
.modal-body > * + * { margin-top: 12px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px 16px; border-top: 1px solid var(--line); background: var(--paper-2); border-radius: 0 0 var(--r-lg) var(--r-lg); flex-wrap: wrap; }
@keyframes fadein { from { opacity: 0; } }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: min(440px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; padding: 12px 12px 12px 14px; border-radius: var(--r); box-shadow: var(--shadow-lift); font-weight: 600; border-left: 6px solid var(--ok); animation: toastin .2s ease-out; }
.toast.bad { border-left-color: #ff6b5b; }
.toast.warn { border-left-color: var(--spark); }
.toast .toast-msg { flex: 1; }
.toast .toast-x { background: none; border: 0; color: #c9d6e3; cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; }
.toast .toast-act { color: var(--spark); }
.toast.out { opacity: 0; transform: translateY(6px); transition: .2s; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--paper); }
.auth-art { background: var(--brand); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .logo-mark { width: 64px; height: 64px; }
.auth-art h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.02; font-weight: 800; max-width: 12ch; letter-spacing: -.02em; }
.auth-art .tag { color: var(--brand-3); font-size: 1.05rem; max-width: 36ch; }
.auth-art .stores { display: flex; gap: 10px; flex-wrap: wrap; }
.auth-art .stores .store-tag { font-size: .95rem; padding: 4px 12px; }
.auth-art .sparks { position: absolute; right: -60px; bottom: -60px; width: 340px; height: 340px; opacity: .9; pointer-events: none; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-form form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.auth-form h2 { font-size: 1.5rem; }

/* ---------------------------------------------------------------- settings etc */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.settings-grid .panel + .panel { margin-top: 0; }
.health { display: flex; gap: 12px; align-items: center; }
.health .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--spark); } .dot.off { background: var(--line-2); }
.msg-body { white-space: pre-wrap; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; font-size: .94rem; max-height: 340px; overflow: auto; }
.loc-card { border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--paper); border-left: 7px solid var(--line-2); }
.loc-card.store-fresno { border-left-color: var(--fresno); background: var(--paper); box-shadow: none; }
.loc-card.store-signal_hill { border-left-color: var(--sh); background: var(--paper); box-shadow: none; }
.loc-card + .loc-card { margin-top: 14px; }
.contact { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.contact + .contact { margin-top: 8px; }
.contact .who { font-weight: 800; }
.contact .roles { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.pref-grid { display: grid; grid-template-columns: max-content repeat(4, minmax(0, auto)); gap: 4px 6px; align-items: center; font-size: .9rem; }
.pref-grid .h { font-weight: 700; color: var(--muted); font-size: .8rem; text-align: center; }
.pref-grid input { width: 20px; height: 20px; accent-color: var(--brand); justify-self: center; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .dash-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .side { display: none; }
  .topbar { padding: 8px 12px; gap: 8px; position: static; backdrop-filter: none; }
  .topbar .mobile-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); text-decoration: none; }
  .topbar .mobile-brand .logo-mark { width: 34px; height: 34px; --brand: #1b3a5c; }
  .search { order: 5; flex-basis: 100%; max-width: none; margin-left: 0; }
  .filters { order: 4; width: 100%; overflow-x: auto; }
  .filters button { flex: 1; padding: 6px 8px; justify-content: center; }
  .modepills { margin-left: auto; }
  .testpill .tp-long { display: none; }
  .testpill { padding: 4px 9px; font-size: .74rem; }
  .filters button { font-size: .88rem; min-height: 38px; gap: 5px; }
  .filters .ic { display: none; }
  main { padding: 14px 12px 100px; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--brand); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #cfdceb; text-decoration: none; font-size: .74rem; font-weight: 700; min-height: 52px; justify-content: center; border-radius: 10px; position: relative; background: none; border: 0; font-family: inherit; cursor: pointer; }
  .bottomnav .ic { width: 22px; height: 22px; }
  .bottomnav [aria-current="page"] { color: var(--brand); background: #fff; }
  .bottomnav .badge { position: absolute; top: 2px; right: 14%; min-width: 19px; height: 19px; font-size: .68rem; padding: 0 5px; }
  .dash-grid, .settings-grid, .split { grid-template-columns: minmax(0, 1fr); }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 22px; min-height: 0; gap: 18px; }
  .auth-art .sparks { width: 200px; height: 200px; right: -40px; bottom: -50px; }
  .board { grid-template-columns: 1fr; overflow: visible; }
  .col { min-height: 0; }
  .kanban { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  h1 { font-size: 1.35rem; }
  .dash-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .qty-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .amounts { grid-template-columns: 1fr; }
  .amounts > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .row { padding: 10px 12px; }
  .panel-head { padding: 12px; }
  .panel-body { padding: 12px; }
  .job-hero { padding: 14px; }
  .job-hero h1 { font-size: 1.25rem; }
  .stepper { display: grid; grid-template-columns: repeat(3, 1fr); }
  .stepper button { min-width: 0; font-size: .88rem; padding: 6px 4px; }
  .stepper button + button { border-left: 0; }
  .stepper button { border-right: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); }
  .stepper button.cancel { flex: none; }
  .modal-wrap { padding: 0; align-items: flex-end; }
  .modal { border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 94vh; display: flex; flex-direction: column; }
  .modal-form { display: flex; flex-direction: column; min-height: 0; max-height: 94vh; }
  .modal-body { overflow-y: auto; }
  .modal-foot { border-radius: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .toasts { left: 12px; right: 12px; bottom: 84px; max-width: none; }
  .tbl.stack-sm thead { display: none; }
  .tbl.stack-sm tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .tbl.stack-sm td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 12px; }
  .tbl.stack-sm td::before { content: attr(data-l); color: var(--muted); font-weight: 700; font-size: .84rem; }
  .tbl.stack-sm td.r { text-align: right; }
  .page-head .actions { width: 100%; }
  .toolbar { gap: 8px; }
  .toolbar .field { min-width: 0; flex: 1 1 calc(50% - 8px); max-width: none !important; }
  .page-head .actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .side, .topbar, .bottomnav, .toasts, .btn, .icon-btn { display: none !important; }
  body { background: #fff; }
  .shell { display: block; }
  .panel { box-shadow: none; break-inside: avoid; }
}

/* store picker (Shopify create-job) — big colored targets */
.store-pick { position: relative; cursor: pointer; flex: 1 1 160px; }
.store-pick input { position: absolute; opacity: 0; }
.store-pick > span { display: flex; align-items: center; justify-content: center; min-height: 56px; border-radius: var(--r); border: 2.5px solid var(--line-2); background: var(--paper); }
.store-pick > span .store-tag { font-size: 1rem; padding: 4px 12px; }
.store-pick.store-fresno, .store-pick.store-signal_hill { background: none; box-shadow: none; }
.store-pick.store-fresno input:checked + span { border-color: var(--fresno); background: var(--fresno-bg); box-shadow: 0 0 0 3px rgba(124,58,237,.25); }
.store-pick.store-signal_hill input:checked + span { border-color: var(--sh); background: var(--sh-bg); box-shadow: 0 0 0 3px rgba(13,148,136,.25); }
.store-pick input:focus-visible + span { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.store-pick input:checked + span::before { content: "✓"; font-weight: 900; margin-right: 8px; }
