/* linq-kit-server.css — Jinja-only layer that loads right AFTER linq-kit.css.

   linq-kit.css is a generated copy of frontend/src/styles/linq-kit.css (the
   React kit is the single source of the design tokens; run
   `python scripts/sync_linq_kit.py`, never edit linq-kit.css by hand).
   Everything the server-rendered pages need that the React kit does not
   carry lives here: the AI tone tokens, the --v2-* tokens the React kit
   reads (they are defined in linq-v2.css, which Jinja pages don't load),
   and the component/page rules (tech-mobile, dispatch, inbox, form
   sections ...) plus the Jinja versions of rules the two kits style
   differently. Do not redeclare a token that linq-kit.css already has. */

:root {
  --ai:            #0EA5B5;   --ai-soft:     rgba(14,165,181,0.12);  /* AI-answered (distinct from ocean) */

  /* --v2-* values copied from frontend/src/styles/linq-v2.css :root, only the
     ones linq-kit.css reads, so shared rules resolve on Jinja pages. */
  --v2-body: #52525b;
  --v2-border: rgba(24, 24, 27, 0.14);
  --v2-canvas: #eeeef0;
  --v2-cobalt: #18181b;
  --v2-cobalt-text: #18181b;
  --v2-cobalt-tint: #ececef;
  --v2-cta: #2e4be0;
  --v2-cta-hover: #2137b0;
  --v2-e-1: 0 1px 2px rgba(24, 24, 27, 0.07);
  --v2-e-2: 0 2px 4px rgba(24, 24, 27, 0.04), 0 12px 28px -8px rgba(24, 24, 27, 0.12);
  --v2-font-ui: 'Public Sans', system-ui, -apple-system, sans-serif;
  --v2-g-cobalt: linear-gradient(135deg, #18181b, #52525b);
  --v2-g-red: linear-gradient(135deg, #c4433f, #e08d8a);
  --v2-g-sage: linear-gradient(135deg, #166339, #7fd9a6);
  --v2-g-violet: linear-gradient(135deg, #6d51d6, #b9a8d6);
  --v2-g-zinc: linear-gradient(135deg, rgba(24, 24, 27, 0.16), rgba(24, 24, 27, 0.05));
  --v2-grain-film: url('/static/img/grain-96.png');
  --v2-muted: #65656f;
  --v2-on-dark-muted: rgba(250, 250, 250, 0.66);
  --v2-violet: #6d51d6;
}

/* ══════════════════════════════════════════════════════════════════
   APP SHELL
   ══════════════════════════════════════════════════════════════════ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.side-logo .edit-chip {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--on-dark-muted);
  border: 1px solid rgba(255,255,255,0.18); border-radius: var(--r-sm); padding: 3px 9px; cursor: pointer;
}
.side-search {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--r-pill); padding: 9px 14px; color: rgba(255,255,255,0.6);
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.02em;
}
.side-search .kbd { margin-left: auto; font-size: 0.7rem; border: 1px solid rgba(255,255,255,0.22); border-radius: 5px; padding: 1px 6px; }
.nav-label {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.40);
  padding: 14px 10px 6px;
}
.nav-item .badge {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.74rem;
  background: rgba(255,255,255,0.14); color: #fff; padding: 1px 8px;
  border-radius: var(--r-pill); letter-spacing: 0.02em;
}
.side-foot { display: flex; align-items: center; gap: 11px; padding: 12px 8px 2px; border-top: 1px solid rgba(255,255,255,0.12); }
.side-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,var(--signal),var(--violet)); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(255,255,255,0.22); }
.side-foot .who { line-height: 1.25; min-width: 0; }
.side-foot .who b { color: #fff; font-size: 0.86rem; font-weight: 600; display: block; }
.side-foot .who span { color: rgba(255,255,255,0.5); font-size: 0.74rem; font-family: var(--font-mono); }
.side-foot .bi-chevron-expand { margin-left: auto; color: rgba(255,255,255,0.4); }
/* ── Section breaks — user-inserted dividers between nav items ──
   Rendered when the sidebar prefs include a `breaks_before` URL for
   the following item. See settings.sidebar_prefs + nav_context. */
.nav-break {
  border: 0;
  height: 1px;
  background: rgba(255,255,255,0.12);
  margin: 10px 8px;
}
/* ── Platform collapsible section ────────────────────────────────
   Native <details>-based collapse. Summary is styled as a nav-label
   with a chevron; list wraps the actual nav items so the details
   toggle animates just that block. Desktop default = OPEN (browser
   default from `open` attribute). Mobile flips to closed via JS
   (see base_lq.html lqNavPlatform script). */
.nav-platform-group { list-style: none; }
.nav-platform-group > summary { list-style: none; cursor: pointer; user-select: none; }
.nav-platform-group > summary::-webkit-details-marker { display: none; }
.nav-platform-summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 10px 6px;
}
.nav-platform-chev {
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
  transition: transform .18s ease;
}
.nav-platform-group[open] .nav-platform-chev { transform: rotate(180deg); }
.nav-platform-list { display: flex; flex-direction: column; gap: 2px; }
/* ── Mobile-only footer rows: Settings + Help Center ─────────────
   Replaces the legacy `.side-brand` linq lockup on mobile. Hidden
   on desktop via the ≥1024px block below. */
.side-mobile-footer { display: none; }
.side-mobile-footer-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 13px 12px;
  margin: 0 0 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-md);
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  text-align: left;
}
.side-mobile-footer-row i {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.55);
  flex: none;
}
.side-mobile-footer-row:hover,
.side-mobile-footer-row:focus-visible {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.20);
  color: #fff;
  outline: none;
}
@media (max-width: 1023px) {
  .side-mobile-footer { display: block; margin-top: auto; padding-top: 8px; }
}
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 14px 36px; /* 16px: React's .topbar gap used to win by load order */
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
  background: rgba(238,238,240,0.82);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
}
.tb-search {
  flex: 1; max-width: 440px; display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 9px 16px; color: var(--text-faint); font-size: 0.88rem;
}
.tb-search .kbd { margin-left: auto; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }
.page { padding: 30px 36px 64px; max-width: 1380px; width: 100%; }
/* ══════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--font-display); font-size: 0.88rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  border-radius: var(--r-pill); padding: 9px 16px; transition: border-color .15s, background .15s, transform .1s;
  text-decoration: none; white-space: nowrap;
}
.btn.primary:hover { background: var(--cta-deep); border-color: var(--cta-deep); }
/* Label colour flips between the two signal steps, because the aurora ochre
   inverts the relationship the old v1.0 orange had (2026-08-26 migration):
     ink   on --signal      #A17A12 = 4.48:1  (best available on the base step)
     white on --signal      #A17A12 = 3.96:1
     ink   on --signal-deep #7A5D0D = 2.87:1  (fails badly)
     white on --signal-deep #7A5D0D = 6.18:1  (comfortable AA)
   So: ink on the base, white on the darker hover. The hover now uses the
   --signal-deep TOKEN rather than the old hardcoded #D65C24 orange, so this
   rule follows the kit instead of drifting from it.
   NOTE: 4.48:1 on the base step is 0.02 short of AA for normal-size text.
   Raising it means moving --signal itself, which would desync this fork from
   frontend/src/styles/linq-kit.css -- so it is recorded as a finding rather
   than fixed unilaterally here. */
.btn.signal { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.btn.signal:hover { background: var(--signal-deep); border-color: var(--signal-deep); color: #fff; }
/* ══════════════════════════════════════════════════════════════════
   EYEBROW + PAGE HEAD
   ══════════════════════════════════════════════════════════════════ */
.lq-eyebrow {
  display: inline-flex; align-items: center; font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--text-muted);
}
.lq-eyebrow::before { content:''; width: 6px; height: 6px; background: var(--signal); border-radius: 50%; margin-right: 0.7em; flex-shrink: 0; }
/* ══════════════════════════════════════════════════════════════════
   SEGMENTED CONTROL / FILTER TABS / VIEW + STATUS CHIPS
   ══════════════════════════════════════════════════════════════════ */
/* Porcelain segmented control: inset fill track, card-coloured active
   thumb (never a dark pill), soft-rect radii — full pills are reserved
   for avatars and tech chips. */
.seg { display: inline-flex; background: var(--fill); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button, .seg a {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; font-weight: 600;
  border: 0; background: transparent; color: var(--text-muted); padding: 7px 14px;
  border-radius: 8px; cursor: pointer; text-decoration: none;
}
.seg button.active, .seg a.active { background: var(--panel); color: var(--ink); box-shadow: var(--e-1); }
.filter-tab {
  font-size: 0.88rem; font-weight: 600; color: var(--text-muted); cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 8px 18px; transition: border-color .15s, color .15s, background .15s; text-decoration: none;
}
.filter-tab.active { background: var(--signal-soft); border-color: rgba(234,106,44,0.3); color: var(--signal-deep); }
.view-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.84rem; font-weight: 500;
  color: var(--text-muted); background: transparent; border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 7px 14px; cursor: pointer; text-decoration: none;
}
/* status filter chip (dot + label) */
.stat-chip {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono);
  font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
  color: var(--text-muted); cursor: pointer; padding: 5px 4px; background: none; border: 0;
}
/* technician avatar chip (replaces the rainbow chips) */
.tech-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 500;
  color: var(--text); background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 4px 12px 4px 4px; cursor: pointer; text-decoration: none;
}
/* ══════════════════════════════════════════════════════════════════
   PILLS (status)
   ══════════════════════════════════════════════════════════════════ */
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono);
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--r-pill); border: 1px solid transparent; white-space: nowrap;
}
.pill.signal { color: var(--signal-deep); background: var(--signal-soft); border-color: rgba(234,106,44,0.28); }
.pill.ghost  { color: var(--text-muted);  background: rgba(24,24,27,0.05);border-color: var(--border); }
.lq-card.dark .lq-eyebrow { color: var(--on-dark-muted); }
.lq-card.dark .card-head .link { color: var(--on-dark-muted); }
.kpi { background: var(--panel); padding: 20px 22px; display: flex; flex-direction: column; gap: 11px; }
.kpi .k-label { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.13em; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.kpi .k-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 2.5rem; font-weight: 500; letter-spacing: -0.02em; line-height: 0.95; }
.kpi .k-num .u { color: var(--text-faint); }
.kpi .k-foot { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); }
/* standalone stat card (reports top row) */
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.stat-card .s-label { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.13em; color: var(--text-muted); }
.stat-card .s-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 2.6rem; font-weight: 500; letter-spacing: -0.02em; line-height: 0.9; }
.lq-table thead th { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.13em; color: var(--text-muted); text-align: left; padding: 8px 14px 12px; border-bottom: 1px solid var(--border); }
.lq-table .id { font-family: var(--font-mono); color: var(--text-muted); font-size: 0.84rem; letter-spacing: 0.03em; }
/* brand-dot — tiny colored circle in the site's accent colour, used on jobs &
   inquiries list rows in place of a full text brand pill. The brand name lives
   on title= / aria-label= so hover + screen readers still get it. */
.brand-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--card-border, rgba(24,24,27,.15));
  vertical-align: middle;
  margin-left: 6px;
  flex-shrink: 0;
}
.tech.empty .av { background: rgba(24,24,27,0.08); color: var(--text-faint); }
.tab {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 600;
  color: var(--text-muted); background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 9px 16px; cursor: pointer; text-decoration: none; transition: border-color .15s, color .15s;
}
.tab.active i { color: var(--signal); opacity: 1; }
.switch .track { position: absolute; inset: 0; background: rgba(24,24,27,0.16); border-radius: var(--r-pill); transition: background .18s; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.03em; }
.legend span::before { content:''; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--ocean)); }
.grid.g2 { grid-template-columns: 1fr 1fr; }
.grid.g3 { grid-template-columns: repeat(3,1fr); }
.grid.g4 { grid-template-columns: repeat(4,1fr); }
.mini-note { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); letter-spacing: 0.04em; margin-top: 22px; }
@media (max-width: 1100px) {
  .grid.g4, .kpi-strip { grid-template-columns: repeat(2,1fr); }
  .grid.g3, .grid.g2, .grid.report-main { grid-template-columns: 1fr; }
}
/* ══════════════════════════════════════════════════════════════════
   SHARED PRIMITIVES (system-wide gaps from the redesign handoff)
   ══════════════════════════════════════════════════════════════════ */

/* ── KPI card with sparkline + delta (the canonical stat unit) ─── */
.kpi-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.kpi-card .kc-label { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.13em; color: var(--text-muted); display: inline-flex; align-items: center; gap: 8px; }
.kpi-card .kc-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 2.3rem; font-weight: 500; letter-spacing: -0.02em; line-height: 0.95; }
.kpi-card .kc-num .u { color: var(--text-faint); }
.kpi-card .kc-since { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); }
/* ── Loading skeleton ─────────────────────────────────────────── */
.sk { position: relative; overflow: hidden; background: rgba(24,24,27,0.06); border-radius: var(--r-sm); }
/* ── Sticky bulk-action bar ───────────────────────────────────── */
.bulk-bar { display: flex; align-items: center; gap: 14px; background: var(--surface-dark); color: var(--on-dark); border-radius: var(--r-pill); padding: 10px 12px 10px 20px; box-shadow: var(--e-3); }
.bulk-bar .bb-count b { color: var(--signal); }
.bulk-bar .bb-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 0.85rem; font-weight: 600; color: var(--on-dark); background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16); border-radius: var(--r-pill); padding: 7px 14px; cursor: pointer; }
.ctx-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); padding: 8px 11px 4px; }
.cmdk-input .kbd { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; }
.cmdk-sec { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); padding: 10px 12px 5px; }
.cmdk-item.active i, .cmdk-item:hover i { color: var(--signal); }
/* ── Progress bar (goals, capacity) ───────────────────────────── */
.lq-progress { height: 8px; border-radius: var(--r-pill); background: rgba(24,24,27,0.08); overflow: hidden; }
/* ── Responsive table → card-stack (below 720px) ──────────────── */
@media (max-width: 720px) {
  .lq-table.stackable thead { display: none; }
  .lq-table.stackable tbody tr { display: block; border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 12px; padding: 6px 0; }
  .lq-table.stackable tbody td { display: flex; justify-content: space-between; gap: 16px; border: 0; padding: 8px 16px; text-align: right; }
  .lq-table.stackable tbody td::before { content: attr(data-label); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); text-align: left; }
}
.topbar .tb-parent { font-family: var(--font-mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); line-height: 1; }
/* ══════════════════════════════════════════════════════════════════
   MULTI-SELECT — checkbox, selected row, fixed bulk bar
   ══════════════════════════════════════════════════════════════════ */
.lq-check { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-strong); background: var(--panel); cursor: pointer; position: relative; flex-shrink: 0; vertical-align: middle; margin: 0; }
.lq-table tbody tr.is-sel { background: var(--signal-soft); }
.list-card .list-row.is-sel { background: var(--signal-soft); }
.inbox-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.inbox-seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px; }
.inbox-seg button { flex: 1; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.04em; border: 0; background: transparent; color: var(--text-muted); padding: 6px 12px; border-radius: var(--r-pill); cursor: pointer; }
.inbox-seg button.active { background: var(--surface-dark); color: var(--on-dark); }
.conv { display: flex; gap: 11px; padding: 13px 16px; border-bottom: 1px dashed var(--border); cursor: pointer; }
.conv.active { background: var(--signal-soft); }
.conv .c-top { display: flex; align-items: baseline; gap: 8px; }
.conv .c-name { font-weight: 600; font-size: 0.9rem; }
.conv .c-time { margin-left: auto; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); }
.conv .c-prev { font-size: 0.84rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv .c-unread { width: 18px; height: 18px; border-radius: 50%; background: var(--ocean); color: #fff; font-family: var(--font-mono); font-size: 0.68rem; display: grid; place-items: center; flex-shrink: 0; align-self: center; }
.inbox-thread { display: flex; flex-direction: column; min-height: 0; }
.thread-head .th-meta { min-width: 0; }
 .thread-head .th-meta b { font-size: 0.96rem; }
 .thread-head .th-meta div { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-muted); }
.msg .m-time { display: block; font-family: var(--font-mono); font-size: 0.68rem; margin-top: 5px; opacity: 0.6; }
.msg.in { align-self: flex-start; background: var(--panel); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--surface-dark); color: var(--on-dark); border-bottom-right-radius: 4px; }
.thread-compose input { flex: 1; border: 1px solid var(--border); background: var(--bg); border-radius: var(--r-pill); padding: 11px 16px; font-family: var(--font-display); font-size: 0.92rem; outline: none; }
.cal-h .d { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.cal-ev { display: block; font-size: 0.76rem; font-weight: 600; padding: 4px 7px; border-radius: 6px; margin-bottom: 3px; border-left: 3px solid; line-height: 1.25; }
.section-label h2 { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.kb-col { background: var(--panel-soft); border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 120px; }
.kb-head .cnt { margin-left: auto; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 1px 9px; }
.swipe-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(24,24,27,.16); cursor: pointer; transition: width .2s, background .2s; }
.swipe-panel .sp-label { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
/* ══════════════════════════════════════════════════════════════════
   TABLET  (≤1023px)  — sidebar becomes an off-canvas drawer
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .app { grid-template-columns: 1fr; }
  /* Cover the hero: mobile drawer takes the full viewport width so no
     page content peeks in from the right. Overlay is opaque as a
     safety net during the slide-in animation. */
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 100vw; max-width: 100%; z-index: 90; transform: translateX(-100%); transition: transform .26s ease; box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .sidebar.open { transform: none; }
  .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgb(15,22,35); z-index: 85; opacity: 0; pointer-events: none; transition: opacity .26s; }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  /* Hide the linq brand mark row on the mobile drawer — replaced by
     the Settings + Help Center rows above (rendered in base_lq.html
     as `.side-mobile-footer`). Design ask 2026-06-30. */
  .sidebar .side-brand { display: none; }
  .topbar { padding: 11px 16px; gap: 12px; }
  .hamburger { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--panel); color: var(--text); cursor: pointer; font-size: 1.15rem; }
  .topbar .tb-title { font-size: 1.05rem; }
  .page { padding: 18px 18px 96px; }
  .map-layout, .job-summary, .grid.report-main { grid-template-columns: 1fr; }
  .mobile-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 62px; z-index: 80; background: var(--surface-dark); padding-bottom: env(safe-area-inset-bottom); }
  .mobile-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--on-dark-muted); text-decoration: none; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.04em; }
  .mobile-tabbar a i { font-size: 1.25rem; }
  .mobile-tabbar a.active { color: #fff; }
  .mobile-tabbar a.active i { color: var(--signal); }
  .mobile-tabbar a.mt-fab { justify-content: flex-end; padding-bottom: 8px; color: var(--on-dark-muted); }
  .mobile-tabbar a.mt-fab .circ { width: 56px; height: 56px; border-radius: 50%; background: var(--signal); color: #fff; display: grid; place-items: center; margin-top: -26px; margin-bottom: 3px; box-shadow: 0 6px 16px rgba(234,106,44,.45); border: 3px solid var(--surface-dark); }
  .mobile-tabbar a.mt-fab .circ i { font-size: 1.5rem; }
}
/* ══════════════════════════════════════════════════════════════════
   PHONE  (≤640px)  — card rails instead of long vertical stacks
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Header row was overflowing (title + actions + icons on one line forced
     the page wider than the viewport → sideways scroll). Let the topbar wrap
     and drop the head-actions onto their own full-width row BELOW the header:
     row 1 = hamburger · title · icons, row 2 = the page action buttons. */
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .topbar .tb-spacer { order: 1; }
  .topbar .tb-icon { order: 2; }
  .topbar .head-actions { order: 3; flex-basis: 100%; width: 100%; gap: 8px; }
  .topbar .head-actions .btn { flex: 1 1 auto; justify-content: center; }
  .topbar .head-actions .btn .bi-chevron-down { display: none; }
  .page-tabs { overflow-x: auto; max-width: 100%; }

  /* KPI / exception / 4-up grids → horizontal swipe rail with peek */
  .kpi-strip, .exc-grid, .grid.g4, .grid.g3, .team-strip {
    display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 12px;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    background: transparent; border: 0; padding: 2px 16px 8px; margin: 0 -16px;
  }
  .kpi-strip::-webkit-scrollbar, .exc-grid::-webkit-scrollbar, .grid.g4::-webkit-scrollbar,
  .grid.g3::-webkit-scrollbar, .team-strip::-webkit-scrollbar { display: none; }
  .kpi-strip > *, .exc-grid > *, .grid.g4 > *, .grid.g3 > * {
    flex: 0 0 80%; scroll-snap-align: start;
    border: 1px solid var(--border); border-radius: var(--r-lg);
  }
  .team-strip > * { flex: 0 0 auto; scroll-snap-align: start; }
  .swipe-hint { display: inline; }

  /* stacks */
  .grid.g2, .grid.report-main, .job-summary, .map-layout { grid-template-columns: 1fr; }
  .photo-zones { grid-template-columns: 1fr; }
  .kanban { grid-auto-columns: 82%; }
  .lq-inbox { grid-template-columns: 1fr; height: auto; }
  .lq-inbox .inbox-thread { display: none; }            /* list-first on phone */
  .lq-inbox.show-thread .inbox-list { display: none; }
  .lq-inbox.show-thread .inbox-thread { display: flex; min-height: 60vh; }
  .map-stage { min-height: 320px; }

  /* tighten page heads / cards */
  .dash-greeting { flex-direction: column; align-items: flex-start; gap: 14px; }
  .dash-greeting .row { width: 100%; }
  .dash-greeting .row .btn { flex: 1; justify-content: center; }
  .lq-card { padding: 18px; }
  .filter-tabs, .chip-row { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 4px; }
  .filter-tabs::-webkit-scrollbar, .chip-row::-webkit-scrollbar { display: none; }
  .tab-bar { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tab-bar::-webkit-scrollbar { display: none; }
}
/* ══════════════════════════════════════════════════════════════════
   DISPATCHER cockpit (promoted from page-local — first user is
   dashboard/dispatcher.html). Reuse on any operator surface that
   needs a pulse strip, an active-call card, a callback list, or
   an inline quick-book form. All tokens, no hardcoded hex.
   ══════════════════════════════════════════════════════════════════ */

/* live-status line that sits under the page tabs */
.disp-top   { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.disp-live  { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.live-clock { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em; color: var(--text-muted); display: inline-flex; align-items: center; gap: 8px; }
.live-clock .rec { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 0 rgba(31,157,85,.5); animation: lq-pulse-dot 2.2s infinite; }
.disp-tally { font-size: 0.9rem; color: var(--text-muted); }
.disp-tally b { color: var(--text); font-weight: 700; }
@keyframes lq-pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(31,157,85,.45); } 70% { box-shadow: 0 0 0 7px rgba(31,157,85,0); } 100% { box-shadow: 0 0 0 0 rgba(31,157,85,0); } }
@keyframes lq-ring-dot  { 0% { box-shadow: 0 0 0 0 rgba(31,157,85,.5); } 70% { box-shadow: 0 0 0 11px rgba(31,157,85,0); } 100% { box-shadow: 0 0 0 0 rgba(31,157,85,0); } }
/* pulse strip — N compact live counters with hairline dividers (cousin of .kpi-strip, half the chrome) */
.pulse-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.pulse { background: var(--panel); padding: 16px 18px; display: flex; flex-direction: column; gap: 9px; cursor: pointer; transition: background .14s; text-decoration: none; color: inherit; }
.pulse:hover { background: var(--panel-soft); }
.pulse .p-label { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.13em; color: var(--text-muted); display: flex; align-items: center; gap: 7px; }
.pulse .p-label i { color: var(--text-faint); font-size: 0.9rem; }
.pulse .p-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 2rem; font-weight: 500; letter-spacing: -0.02em; line-height: 0.95; }
.pulse .p-sub { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); }
.pulse.hot .p-num  { color: var(--signal); }
.pulse.live .p-label .ring { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); animation: lq-ring-dot 1.6s infinite; }
/* intake row + money row layouts (used by dispatcher; reusable on any 3-up / 2-up card row) */
.intake-grid { display: grid; grid-template-columns: 1.15fr 1fr 1.1fr; gap: 16px; }
.queue-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* mini head used inside .lq-card when the card holds a sub-section, not a full page section */
.card-mini-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-mini-head h3 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; }
.card-mini-head .tag { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-muted); }
.card-mini-head .link { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-muted); text-decoration: none; }
.card-mini-head .link:hover { color: var(--signal); }
/* active incoming-call card */
.call-card { border: 1px solid rgba(31,157,85,0.4); background: linear-gradient(180deg, rgba(31,157,85,0.05), transparent 60%), var(--panel); border-radius: var(--r-md); padding: 15px 16px; }
.call-card .cc-line { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage); margin-bottom: 11px; }
.call-card .cc-line .ring { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); animation: lq-ring-dot 1.4s infinite; }
.call-id { display: flex; align-items: center; gap: 12px; }
.call-id .av { width: 42px; height: 42px; font-size: 0.92rem; background: var(--ocean); }
.call-id .ci-name { font-weight: 700; font-size: 1.02rem; }
.call-id .ci-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); margin-top: 1px; }
.call-actions { display: flex; gap: 8px; margin-top: 14px; }
.call-actions .btn { flex: 1; justify-content: center; }
.btn.answer { background: var(--sage); border-color: var(--sage); color: #fff; }
.btn.answer:hover { background: #178045; border-color: #178045; color: #fff; }
/* callback / missed row */
.cb-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.cb-row:last-child { border-bottom: 0; }
.cb-row .av { width: 34px; height: 34px; font-size: 0.78rem; background: var(--violet); }
.cb-row .cb-body { min-width: 0; flex: 1; }
.cb-row .cb-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-row .cb-meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-muted); margin-top: 1px; }
.cb-row .btn    { flex-shrink: 0; white-space: nowrap; }
/* quick-book form */
.qbook  { display: flex; flex-direction: column; gap: 12px; }
.qfield label { display: block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.qfield input, .qfield select {
  width: 100%; appearance: none; font-family: var(--font-display); font-size: 0.92rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; outline: none;
}
.qfield select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230F162366'%3E%3Cpath d='M4.5 6l3.5 3.5L11.5 6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; background-size: 14px; padding-right: 36px; }
.qfield input:focus, .qfield select:focus { border-color: var(--ocean); }
.qfield input::placeholder { color: var(--text-faint); }
.qb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* board head — section title + view toggle (Board / List / Map) on the same row */
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 14px; }
.board-head .seg { flex-shrink: 0; }
/* money queue row — customer / svc · amount · action (or pill + amount) */
.q-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px dashed var(--border); }
.q-row:last-child { border-bottom: 0; }
.q-row .q-main { min-width: 0; }
.q-row .q-cust { font-weight: 600; font-size: 0.92rem; }
.q-row .q-svc  { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-muted); margin-top: 1px; }
.q-row .q-amt  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.96rem; }
.q-row .q-amt.muted { color: var(--text-faint); font-weight: 400; }
/* kanban-card bottom row (pill + timestamp) — used by .kb-card consumers that need a tech/status + time line */
.kb-card .kc-row  { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.kb-card .kc-time { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); }
@media (max-width: 1100px) {
  .pulse-strip { grid-template-columns: repeat(3, 1fr); }
  .intake-grid { grid-template-columns: 1fr; }
  .queue-grid  { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pulse-strip { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 12px; background: transparent; border: 0; padding: 2px 16px 8px; margin: 0 -16px; scroll-snap-type: x mandatory; }
  .pulse-strip::-webkit-scrollbar { display: none; }
  .pulse-strip > * { flex: 0 0 60%; scroll-snap-align: start; border: 1px solid var(--border); border-radius: var(--r-lg); }
  .disp-top { gap: 12px; }
  .qb-two   { grid-template-columns: 1fr; }
}
/* ══════════════════════════════════════════════════════════════════
   TECHNICIAN "My Day" — desktop cockpit + mobile 1B phone frame.
   Built for dashboard/tech.html. Two layouts in one template:
     .tech-desktop   shown ≥1024px (lives inside the shared shell)
     .tech-mobile    shown <1024px (full-bleed 1B phone frame; the
                     platform's mobile topbar + tab bar are hidden
                     for body.tech1b — see the 1B block further down)
   Desktop classes are unchanged; the 1B mobile classes are below.
   ══════════════════════════════════════════════════════════════════ */

/* The 1B phone frame IS the tech dashboard at every width ("show 1B on
   desktop too"): on desktop it's the same frame centered on a neutral
   backdrop; the old .tech-desktop cockpit is retired (kept in the template
   but never shown). */
.tech-desktop { display: none; }
.tech-mobile  { display: flex; flex-direction: column; gap: 0; }
@keyframes tech-pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(234, 106, 44, .5); }
  70%  { box-shadow: 0 0 0 9px rgba(234, 106, 44, 0); }
  100% { box-shadow: 0 0 0 0 rgba(234, 106, 44, 0); }
}
/* ──────────────────────────────────────────────────────────────
   DESKTOP — shift bar + 4-up stat strip + my-grid + nextjob hero
   + route map + side stack (msgs / parts / checklist)
   ────────────────────────────────────────────────────────────── */

.shift-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 14px 18px; margin-bottom: 20px; }
.shift-state { display: flex; align-items: center; gap: 11px; }
.shift-state .clk { width: 42px; height: 42px; border-radius: var(--r-md);
  background: var(--sage-soft); color: var(--sage); display: grid;
  place-items: center; font-size: 1.2rem; }
.shift-state .ss-lbl { font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.shift-state .ss-val { font-weight: 700; font-size: 1rem; }
.shift-state .ss-val em { font-style: normal; color: var(--sage); }
.shift-state .ss-val.off em { color: var(--text-faint); }
/* status segmented control (Available / En route / On site / Break) */
.status-seg { display: inline-flex; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 3px; gap: 2px; }
.status-seg button, .status-seg a { font-family: var(--font-mono); font-size: 0.76rem;
  letter-spacing: 0.04em; border: 0; background: transparent; color: var(--text-muted);
  padding: 7px 14px; border-radius: var(--r-pill); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.status-seg button .bd, .status-seg a .bd { width: 7px; height: 7px;
  border-radius: 50%; background: currentColor; }
.status-seg button.on.avail,   .status-seg a.on.avail   { background: var(--sage);   color: #fff; }
.status-seg button.on.enroute, .status-seg a.on.enroute { background: var(--violet); color: #fff; }
.status-seg button.on.onsite,  .status-seg a.on.onsite  { background: var(--signal); color: #fff; }
.status-seg button.on.brk,     .status-seg a.on.brk     { background: var(--amber);  color: #fff; }
/* day-stats strip (4-up like .kpi-strip but lighter type weight) */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; margin-bottom: 24px; }
.tstat { background: var(--panel); padding: 16px 20px; display: flex;
  flex-direction: column; gap: 8px; }
.tstat .ts-lbl { font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-muted);
  display: flex; align-items: center; gap: 7px; }
.tstat .ts-lbl i { color: var(--text-faint); }
.tstat .ts-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 1.9rem; font-weight: 500; line-height: 0.95; letter-spacing: -0.02em; }
.tstat .ts-num .u { color: var(--signal); font-size: 1.3rem; }
.tstat .ts-sub { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); }
/* main "My Day" grid — left column (hero + route), right column (side stack) */
.my-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px;
  align-items: start; }
.side-stack { display: flex; flex-direction: column; gap: 20px; }
/* nextjob hero — dark surface with signal-orange radial glow */
.nextjob { background: var(--surface-dark); color: var(--on-dark);
  border-radius: var(--r-lg); padding: 24px 26px; position: relative;
  overflow: hidden; margin-bottom: 20px; }
.nextjob::after { content: ''; position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(234,106,44,.16), transparent 68%);
  pointer-events: none; }
.nj-eyebrow { font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal);
  display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.nj-eyebrow .pulse-dot { width: 8px; height: 8px; border-radius: 50%;
  background: var(--signal); animation: tech-pulse-dot 1.6s infinite; }
.nj-top { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; }
.nj-cust { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.05; }
.nj-svc { font-family: var(--font-mono); font-size: 0.86rem;
  color: var(--on-dark-muted); margin-top: 5px; }
.nj-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 18px 0 4px; }
.nj-meta .m { display: flex; align-items: center; gap: 9px; font-size: 0.92rem; }
.nj-meta .m i { color: var(--signal); font-size: 1rem; }
.nj-meta .m b { font-weight: 700; }
.nj-meta .m span { color: var(--on-dark-muted); }
.nj-note { display: flex; gap: 10px; align-items: flex-start;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r-md); padding: 11px 14px; margin: 18px 0;
  font-size: 0.88rem; color: rgba(242,237,226,.86); }
.nj-note i { color: var(--amber); margin-top: 2px; }
.nj-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.nj-actions .btn, .nj-actions button { border: 0; }
.btn.nav { background: var(--signal); color: #fff; flex: 1;
  justify-content: center; min-width: 150px; }
.btn.nav:hover { background: var(--signal-deep); color: #fff; }
.btn.dk { background: rgba(255,255,255,.10); color: var(--on-dark); }
.btn.dk:hover { background: rgba(255,255,255,.18); color: var(--on-dark); }
.btn.nj-prog { background: rgba(255,255,255,.10); color: var(--on-dark);
  border: 1px solid rgba(255,255,255,.16); }
.btn.nj-prog:hover { background: rgba(255,255,255,.18); color: var(--on-dark); }
/* today's route — map placeholder + ordered stop list */
.route-map { height: 140px; border-radius: var(--r-md);
  border: 1px solid var(--border); margin-bottom: 6px; position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(24,24,27,.04) 0 2px, transparent 2px 11px),
    linear-gradient(180deg, #EAF0EA, #E7EAEF); }
.route-map .rm-lbl { position: absolute; left: 12px; bottom: 10px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-faint);
  background: rgba(255,255,255,.7); padding: 3px 8px; border-radius: 6px; }
.route-map .rm-go { position: absolute; right: 12px; top: 12px; }
.stop { display: grid; grid-template-columns: 54px 1fr auto; gap: 14px;
  align-items: center; padding: 13px 6px;
  border-bottom: 1px dashed var(--border); position: relative; }
.stop:last-child { border-bottom: 0; }
.stop .st-time { font-family: var(--font-mono); font-size: 0.82rem;
  color: var(--text-muted); text-align: right; }
.stop .st-node { position: relative; }
.stop .st-cust { font-weight: 600; font-size: 0.94rem; }
.stop .st-svc { font-family: var(--font-mono); font-size: 0.76rem;
  color: var(--text-muted); margin-top: 1px; }
.stop.done .st-cust { color: var(--text-muted); }
.stop.current { background: var(--signal-soft); border-radius: var(--r-md);
  border-bottom-color: transparent; }
.stop .st-dot { width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--panel); position: absolute; left: -20px; top: 4px;
  box-shadow: 0 0 0 1px var(--border); }
.stop.done .st-dot    { background: var(--sage); }
.stop.current .st-dot { background: var(--signal); }
.stop.next .st-dot    { background: rgba(24,24,27,.2); }
/* mini head for the side-stack cards (msgs / parts / checklist) */
.mini-head { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 13px; }
.mini-head h3 { font-size: 1rem; font-weight: 700; display: flex;
  align-items: center; gap: 9px; }
.mini-head .link { font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--text-muted); text-decoration: none; }
.mini-head .link:hover { color: var(--signal); }
/* dispatch messages */
.msg-row { display: flex; gap: 11px; padding: 10px 0;
  border-bottom: 1px dashed var(--border); }
.msg-row:last-child { border-bottom: 0; }
.msg-row .av { width: 32px; height: 32px; font-size: 0.72rem; background: var(--ocean); }
.msg-row .m-name { font-weight: 600; font-size: 0.86rem; }
.msg-row .m-name .t { font-family: var(--font-mono); font-weight: 400;
  font-size: 0.72rem; color: var(--text-faint); margin-left: 6px; }
.msg-row .m-text { font-size: 0.85rem; color: var(--text-muted); margin-top: 1px; }
/* on-my-truck parts */
.part-row { display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px dashed var(--border); }
.part-row:last-child { border-bottom: 0; }
.part-row .p-name { font-weight: 600; font-size: 0.88rem; flex: 1; }
.part-row .p-qty { font-family: var(--font-mono); font-size: 0.84rem; font-weight: 600; }
.part-row .p-qty.muted { color: var(--text-faint); font-weight: 400; }
/* my-checklist */
.chk-row { display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px dashed var(--border); cursor: pointer; }
.chk-row:last-child { border-bottom: 0; }
.chk-box { width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--border-strong); display: grid; place-items: center;
  flex-shrink: 0; color: transparent; transition: background .14s, border-color .14s; }
.chk-row.done .chk-box { background: var(--sage); border-color: var(--sage);
  color: #fff; font-size: 0.7rem; }
.chk-row .chk-lbl { font-size: 0.9rem; flex: 1; }
.chk-row.done .chk-lbl { color: var(--text-faint); text-decoration: line-through; }
@media (max-width: 1100px) {
  .my-grid    { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1023px) {
  .shift-bar  { gap: 12px; }
  .status-seg { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .status-seg::-webkit-scrollbar { display: none; }
  .nj-actions .btn { flex: 1 1 auto; }
}
/* ══════════════════════════════════════════════════════════════
   MOBILE 1B — "next-job-led" technician dashboard.
   Full-bleed phone frame (design_handoff_tech_dashboard/). Renders
   only <1024px; the platform's mobile topbar + tab bar are hidden
   for body.tech1b (bottom of this block). Two page-local dark
   tokens match the handoff's signature surfaces exactly; every
   other colour uses the kit's Porcelain tokens (the design's own
   values). No !important.
   ══════════════════════════════════════════════════════════════ */

.tech-mobile {
  --m-header: #1A1C22;   /* app header band */
  --m-card:   #1E2027;   /* the one dark emphasis card */
  --m-frame: 440px;      /* phone-frame width (centered on desktop) */
  background: var(--page);
  min-height: 100vh;
  max-width: var(--m-frame);
  margin-inline: auto;
  position: relative;
}
/* ── App header ───────────────────────────────────────────────── */
.tech-mobile .m-appbar { position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 9px;
  background: var(--m-header); color: #FBFBFC; padding: 10px 16px 12px; }
.tech-mobile .m-av { width: 34px; height: 34px; flex-shrink: 0; border-radius: 99px;
  background: rgba(251,251,252,.10); border: 1px solid rgba(251,251,252,.16);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: #FBFBFC; }
.tech-mobile .m-id { flex: 1; min-width: 0; }
.tech-mobile .m-name { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tech-mobile .m-shiftline { display: flex; align-items: center; gap: 6px; margin-top: 2px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .11em;
  color: #8B8D95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tech-mobile .m-pd { width: 6px; height: 6px; border-radius: 99px; flex-shrink: 0;
  background: #A1A1AA; }
.tech-mobile .m-pd.on { background: var(--sage); }
.tech-mobile .m-clockform { margin: 0; flex-shrink: 0; }
.tech-mobile .m-clock { border: 1px solid rgba(251,251,252,.20); background: transparent;
  color: #FBFBFC; font: 600 12px var(--font-display); padding: 6px 10px; border-radius: 9px;
  cursor: pointer; min-height: 34px; white-space: nowrap; transition: background .12s; }
.tech-mobile .m-clock:hover { background: rgba(251,251,252,.10); }
.tech-mobile .m-clock:active { transform: translateY(1px); }
.tech-mobile .m-notif { position: relative; width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 10px; border: 1px solid rgba(251,251,252,.16); background: transparent;
  color: #FBFBFC; display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; text-decoration: none; transition: background .12s; }
.tech-mobile .m-notif:hover { background: rgba(251,251,252,.08); color: #FBFBFC; }
.tech-mobile .m-badge { position: absolute; top: -4px; right: -4px; min-width: 16px;
  height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 99px;
  background: var(--signal); color: #fff; font-family: var(--font-mono); font-size: 9.5px;
  font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
/* ── Scroll region ────────────────────────────────────────────── */
.tech-mobile .m-scroll { padding: 16px 16px 92px; }
/* ── Bonus strip ──────────────────────────────────────────────── */
.tech-mobile .m-bonus { background: var(--card); border-bottom: 1px solid var(--line);
  padding: 11px 16px 12px; margin: -16px -16px 16px; }
.tech-mobile .mb-row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tech-mobile .mb-lab { font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .13em; color: var(--muted); }
.tech-mobile .mb-earned { font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: .04em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tech-mobile .mb-earned em { font-style: normal; color: var(--faint); font-weight: 600;
  letter-spacing: .1em; font-size: 10px; margin-left: 5px; }
.tech-mobile .mb-track { margin-top: 9px; height: 7px; border-radius: 99px;
  background: rgba(24,24,27,.09); overflow: hidden; display: flex; }
.tech-mobile .mb-fill { display: flex; gap: 2px; min-width: 0; transition: width .22s ease; }
.tech-mobile .mb-seg { background: var(--signal); border-radius: 99px; min-width: 2px; }
.tech-mobile .mb-row3 { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 7px; }
.tech-mobile .mb-sub { font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .1em; color: var(--faint); font-variant-numeric: tabular-nums; }
.tech-mobile .mb-go { font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .1em; color: var(--signal-deep); font-variant-numeric: tabular-nums; }
.tech-mobile .mb-go.met { color: var(--sage); }
/* ── Offline banner ───────────────────────────────────────────── */
.tech-mobile .m-offline { display: flex; align-items: center; gap: 10px;
  background: var(--amber-soft); border: 1px solid rgba(192,131,40,.24);
  border-radius: 12px; padding: 11px 12px; margin-bottom: 14px;
  font-size: 12.5px; font-weight: 500; line-height: 1.4; }
.tech-mobile .m-offline i { color: var(--amber); font-size: 15px; }
.tech-mobile .m-offline[hidden] { display: none; }
/* ── "Now" card ───────────────────────────────────────────────── */
.tech-mobile .mn-eye { display: block; font-family: var(--font-mono); font-size: 10.5px;
  font-weight: 600; letter-spacing: .14em; color: var(--muted); }
.tech-mobile .m-now { background: var(--m-card); color: #FBFBFC; border-radius: 18px;
  padding: 18px; margin-top: 9px; display: flex; flex-direction: column; gap: 12px; }
.tech-mobile .mn-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tech-mobile .mn-cat { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .12em; color: #8B8D95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tech-mobile .mn-title { font-size: 21px; font-weight: 800; letter-spacing: -.03em;
  line-height: 1.2; text-wrap: pretty; }
.tech-mobile .mn-sub { font-size: 13.5px; color: #B9BBC1; line-height: 1.5; margin-top: -6px; }
.tech-mobile .mn-strip { display: flex; align-items: center; gap: 14px; padding: 11px 0;
  border-top: 1px dashed rgba(251,251,252,.16); border-bottom: 1px dashed rgba(251,251,252,.16);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .09em; color: #B9BBC1; }
.tech-mobile .mn-strip span { display: inline-flex; align-items: center; font-variant-numeric: tabular-nums; }
.tech-mobile .mn-strip i { margin-right: 6px; }
.tech-mobile .mn-strip .mn-pay { margin-left: auto; }
.tech-mobile .mn-actions { display: flex; gap: 8px; }
.tech-mobile .mn-ic { width: 46px; min-height: 46px; flex-shrink: 0;
  border: 1px solid rgba(251,251,252,.20); background: transparent; color: #FBFBFC;
  border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; text-decoration: none; transition: background .12s; }
.tech-mobile .mn-ic:hover { background: rgba(251,251,252,.10); color: #FBFBFC; }
.tech-mobile .mn-ic:active { transform: translateY(1px); }
.tech-mobile .mn-ctaform { flex: 1; min-width: 0; margin: 0; display: flex; }
.tech-mobile .mn-cta { flex: 1; min-width: 0; min-height: 46px; border: 0; border-radius: 10px;
  color: #fff; font: 600 14px var(--font-display); display: inline-flex; align-items: center;
  justify-content: center; gap: 7px; white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: filter .12s; }
.tech-mobile .mn-cta.acc-ocean  { background: var(--ocean); }
.tech-mobile .mn-cta.acc-signal { background: var(--signal); }
.tech-mobile .mn-cta:hover { filter: brightness(.93); color: #fff; }
.tech-mobile .mn-cta:active { transform: translateY(1px); }
.tech-mobile .mn-declineform { margin: 0; display: flex; justify-content: center; }
.tech-mobile .mn-decline { border: 0; background: transparent; color: #8B8D95;
  font: 600 13px var(--font-display); cursor: pointer; min-height: 36px; }
.tech-mobile .mn-decline:hover { color: #E88A8A; }
/* ── Empty "Now" state ────────────────────────────────────────── */
.tech-mobile .m-empty { background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px 16px; text-align: center; margin-top: 9px; }
.tech-mobile .m-empty i { font-size: 1.6rem; color: var(--faint); display: block; margin-bottom: 8px; }
.tech-mobile .m-empty .me-h { font-weight: 700; }
.tech-mobile .m-empty .me-s { color: var(--muted); font-size: .88rem; margin-top: 4px; }
/* ── Rest of today ────────────────────────────────────────────── */
.tech-mobile .m-resthead { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 24px 0 8px; }
.tech-mobile .mr-h { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.tech-mobile .mr-lab { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; color: var(--ink); }
.tech-mobile .mr-count { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; color: var(--faint); font-variant-numeric: tabular-nums; }
.tech-mobile .m-route { display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--ink);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .11em;
  padding: 0 12px; border-radius: 10px; min-height: 40px; white-space: nowrap; flex-shrink: 0;
  text-decoration: none; transition: background .12s, color .12s, border-color .12s; }
.tech-mobile .m-route i { font-size: 12px; }
.tech-mobile .m-route:hover { background: var(--fill); color: var(--ink); }
.tech-mobile .m-route.opened { border-color: rgba(59,91,219,.3); background: var(--ocean-soft); color: var(--ocean); }
.tech-mobile .m-list { display: flex; flex-direction: column; }
.tech-mobile .m-jrow { display: flex; gap: 12px; align-items: center; padding: 13px 2px;
  border-bottom: 1px dashed rgba(24,24,27,.14); text-decoration: none; color: inherit; }
.tech-mobile .mj-time { width: 44px; flex-shrink: 0; }
.tech-mobile .mj-t { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--ink); }
.tech-mobile .mj-d { font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  color: var(--faint); margin-top: 2px; }
.tech-mobile .mj-main { flex: 1; min-width: 0; }
.tech-mobile .mj-ti { font-size: 14px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.tech-mobile .mj-s { font-size: 12.5px; color: var(--faint); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.tech-mobile .m-jrow.done .mj-t, .tech-mobile .m-jrow.decl .mj-t { color: var(--faint); }
.tech-mobile .m-jrow.done .mj-ti, .tech-mobile .m-jrow.decl .mj-ti { color: var(--muted); }
.tech-mobile .m-jrow.decl .mj-ti { text-decoration: line-through; }
/* ── Status tags (light rows + dark Now card) ─────────────────── */
.tech-mobile .m-tag { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .11em; padding: 3px 7px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; }
.tech-mobile .m-tag.st-new      { background: var(--red-soft);      color: var(--red); }
.tech-mobile .m-tag.st-accepted { background: rgba(24,24,27,.06);   color: var(--muted); }
.tech-mobile .m-tag.st-enroute  { background: rgba(24,24,27,.06);   color: var(--muted); }
.tech-mobile .m-tag.st-onsite   { background: rgba(234,106,44,.12); color: var(--signal-deep); }
.tech-mobile .m-tag.st-complete { background: var(--sage-soft);     color: var(--sage); }
.tech-mobile .m-tag.st-invoiced { background: rgba(24,24,27,.06);   color: var(--faint); }
.tech-mobile .m-tag.st-declined { background: rgba(24,24,27,.06);   color: var(--faint); }
.tech-mobile .m-tag.dark.st-new      { background: rgba(209,72,72,.2);    color: #F09393; }
.tech-mobile .m-tag.dark.st-accepted { background: rgba(251,251,252,.12); color: #B9BBC1; }
.tech-mobile .m-tag.dark.st-enroute  { background: rgba(251,251,252,.12); color: #B9BBC1; }
.tech-mobile .m-tag.dark.st-onsite   { background: rgba(234,106,44,.22);  color: #F0A47A; }
.tech-mobile .m-tag.dark.st-complete { background: rgba(31,157,85,.2);    color: #5FD69A; }
.tech-mobile .m-tag.dark.st-invoiced { background: rgba(251,251,252,.1);  color: #8B8D95; }
/* ── Low-stock heads-up ───────────────────────────────────────── */
.tech-mobile .m-lowstock { margin-top: 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px; display: flex; gap: 11px; align-items: center; }
.tech-mobile .ml-ico { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px;
  background: var(--amber-soft); color: var(--amber); display: inline-flex;
  align-items: center; justify-content: center; font-size: 15px; }
.tech-mobile .ml-txt { flex: 1; min-width: 0; }
.tech-mobile .ml-title { font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; }
.tech-mobile .ml-sub { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 1px; }
.tech-mobile .ml-form { margin: 0; flex-shrink: 0; }
.tech-mobile .ml-btn { border: 1px solid var(--border-strong); background: transparent; color: var(--ink);
  font: 600 12.5px var(--font-display); padding: 8px 11px; border-radius: 9px; cursor: pointer;
  min-height: 38px; white-space: nowrap; transition: background .12s; }
.tech-mobile .ml-btn:hover { background: var(--fill); }
.tech-mobile .ml-btn:active { transform: translateY(1px); }
/* ── Shift stats ──────────────────────────────────────────────── */
.tech-mobile .m-shift-sec { margin-top: 22px; }
.tech-mobile .m-shift-lab { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; color: var(--ink); }
.tech-mobile .m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.tech-mobile .m-tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; }
.tech-mobile .mt-l { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .13em; color: var(--faint); }
.tech-mobile .mt-v { font-size: 19px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px;
  font-variant-numeric: tabular-nums; }
.tech-mobile .mt-v .u { font-size: 12px; font-weight: 600; color: var(--faint); margin-left: 2px; }
/* ── Bottom tab bar ───────────────────────────────────────────── */
.tech-mobile .m-tabbar1b { position: fixed; left: 50%; right: auto; bottom: 0; z-index: 30;
  transform: translateX(-50%); width: 100%; max-width: var(--m-frame);
  height: 64px; padding-bottom: env(safe-area-inset-bottom);
  background: rgba(251,251,252,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.tech-mobile .m-tab { display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--faint); text-decoration: none; background: transparent; border: 0; cursor: pointer; font: inherit; }
.tech-mobile .m-tab i { font-size: 18px; line-height: 1; }
.tech-mobile .m-tab > span:last-of-type { font-family: var(--font-mono); font-size: 9.5px;
  font-weight: 600; letter-spacing: .1em; }
.tech-mobile .m-tab.active { color: var(--signal); }
.tech-mobile .m-tabic { position: relative; display: inline-flex; }
.tech-mobile .m-tbadge { position: absolute; top: -3px; right: -8px; min-width: 15px; height: 15px;
  padding: 0 3px; box-sizing: border-box; border-radius: 99px; background: var(--signal); color: #fff;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center; }
.tech-mobile .m-tbadge.amber { background: var(--amber); }
/* ── Floating messaging FAB (bottom-right, above the tab bar) ──── */
.tech-mobile .m-fab-msg { position: fixed; right: max(16px, calc(50% - 204px)); z-index: 40;
  bottom: calc(64px + env(safe-area-inset-bottom) + 16px);
  width: 56px; height: 56px; border-radius: 99px; border: 0; cursor: pointer;
  background: var(--ocean); color: #fff; font-size: 22px; display: inline-flex;
  align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(59,91,219,.4);
  transition: filter .12s, transform .12s; }
.tech-mobile .m-fab-msg:hover { filter: brightness(.95); }
.tech-mobile .m-fab-msg:active { transform: translateY(1px); }
.tech-mobile .m-fab-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px;
  padding: 0 5px; box-sizing: border-box; border-radius: 99px; background: var(--signal); color: #fff;
  border: 2px solid var(--page); font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
/* ── Messages sheet (Team | Customers tabs) ───────────────────── */
.tech-mobile .m-sheet { position: fixed; top: 0; bottom: 0; left: 50%; right: auto; z-index: 60;
  transform: translateX(-50%); width: 100%; max-width: var(--m-frame);
  display: flex; flex-direction: column; justify-content: flex-end; }
.tech-mobile .m-sheet[hidden] { display: none; }
.tech-mobile .m-sheet-bg { position: absolute; inset: 0; background: rgba(24,24,27,.42); }
.tech-mobile .m-sheet-card { position: relative; background: var(--card); border-radius: 20px 20px 0 0;
  max-height: 80%; display: flex; flex-direction: column; box-shadow: 0 -10px 30px rgba(24,24,27,.2); }
.tech-mobile .msh-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 16px 16px 12px; }
.tech-mobile .msh-eye { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; color: var(--faint); }
.tech-mobile .msh-title { font-size: 17px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.tech-mobile .msh-close { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--ink); cursor: pointer; font-size: 14px; }
.tech-mobile .msh-close:hover { background: var(--fill); }
.tech-mobile .msh-tabs { display: flex; gap: 6px; padding: 0 16px 10px; border-bottom: 1px solid var(--line); }
.tech-mobile .msh-tab { flex: 1; border: 1px solid var(--border-strong); background: transparent;
  color: var(--muted); font: 600 13px var(--font-display); padding: 9px 10px; border-radius: 10px;
  min-height: 40px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.tech-mobile .msh-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tech-mobile .msh-tct { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  background: rgba(24,24,27,.08); color: var(--muted); border-radius: 99px; padding: 1px 6px; }
.tech-mobile .msh-tab.active .msh-tct { background: rgba(255,255,255,.2); color: #fff; }
.tech-mobile .msh-pane { flex: 1; overflow-y: auto; padding: 6px 8px 8px; }
.tech-mobile .msh-pane[hidden] { display: none; }
.tech-mobile .msh-row { display: flex; align-items: center; gap: 11px; padding: 11px 8px;
  border-radius: 12px; text-decoration: none; color: inherit; }
.tech-mobile .msh-row:hover { background: var(--fill); }
.tech-mobile .msh-av { width: 38px; height: 38px; flex-shrink: 0; border-radius: 99px; background: var(--ocean);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.tech-mobile .msh-av.cust { background: var(--signal); font-size: 16px; }
.tech-mobile .msh-rmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tech-mobile .msh-rtop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tech-mobile .msh-rname { font-size: 14px; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tech-mobile .msh-rtime { font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .06em; color: var(--faint); flex-shrink: 0; }
.tech-mobile .msh-rbody { font-size: 13px; color: var(--muted); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tech-mobile .msh-rbody i { color: var(--faint); }
.tech-mobile .msh-unread { flex-shrink: 0; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 99px; background: var(--signal); color: #fff; font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tech-mobile .msh-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 28px 8px; }
.tech-mobile .msh-composer { display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 14px 16px 20px; border-top: 1px solid var(--line); color: var(--ocean);
  font: 600 14px var(--font-display); text-decoration: none; }
.tech-mobile .msh-composer:hover { color: var(--ocean-deep); }
/* ── Full-bleed phone frame at EVERY width: suppress the platform chrome
   (sidebar + overlay + topbar + mobile tab bar + page header) for this
   page, collapse the app grid, and center the frame. Specificity
   (body.tech1b .x = 0,2,0) beats the single-class base rules without
   !important; the sheet-open lock stops background scroll. */
body.tech1b .sidebar,
body.tech1b .sidebar-overlay,
body.tech1b .topbar,
body.tech1b .mobile-tabbar,
body.tech1b .lq-pagehead { display: none; }
body.tech1b .app { grid-template-columns: 1fr; }
body.tech1b .page { padding: 0; max-width: none; }
body.tech1b .page > .stack { max-width: var(--m-frame, 440px); margin-inline: auto; padding: 12px 12px 0; }
body.tech1b.m-sheet-open { overflow: hidden; }
/* Desktop: sit the phone frame on a neutral backdrop with a soft edge. */
@media (min-width: 1024px) {
  body.tech1b { background: var(--bg-warm); }
  body.tech1b .tech-mobile { box-shadow: 0 0 0 1px var(--line), var(--e-2); }
}
.tech-mobile .msg { display: flex; gap: 10px; padding: 9px 0;
  border-bottom: 1px dashed var(--border); }
.tech-mobile .msg:last-child { border-bottom: 0; }
.tech-mobile .msg .av { width: 30px; height: 30px; font-size: 0.7rem;
  background: var(--ocean); }
.tech-mobile .msg .n { font-weight: 600; font-size: 0.84rem; }
.tech-mobile .msg .n .t { font-family: var(--font-mono); font-weight: 400;
  font-size: 0.7rem; color: var(--text-faint); margin-left: 5px; }
.tech-mobile .msg .x { font-size: 0.83rem; color: var(--text-muted); margin-top: 1px; }
.tech-mobile .part { display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--border); }
.tech-mobile .part:last-child { border-bottom: 0; }
.tech-mobile .part .pn { flex: 1; font-weight: 600; font-size: 0.86rem; }
.tech-mobile .part .pq { font-family: var(--font-mono); font-weight: 600;
  font-size: 0.84rem; }
.tech-mobile .part .pq.muted { color: var(--text-faint); font-weight: 400; }
.lq-field > label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.field-hint { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); }
.form-actions.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding-bottom: 12px; z-index: 4; }
.entity-head .eh-id { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.kv-k { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); flex-shrink: 0; }
.line-items thead th { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); text-align: left; padding: 6px 12px 11px; border-bottom: 1px solid var(--border); }
.doc-head .dh-kind { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.doc-party .dp-lbl { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 7px; }
.record-tab.active { color: var(--ink); border-bottom-color: var(--signal); }
/* ── Rail card (promoted from page-local — recurs in every detail) ─ */
.rail-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; }
.rail-card .rc-head { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.rail-card .rc-head a { color: var(--ocean); text-decoration: none; font-size: 0.7rem; }
/* ── Chip-button (icon-only round button used in entity-head actions) ── */
.chip-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel); color: var(--text-muted); display: grid; place-items: center; cursor: pointer; text-decoration: none; transition: border-color .15s, color .15s; }
.chip-btn:hover { border-color: var(--border-strong); color: var(--text); }
/* ── Customer/tech line (avatar + name + sub used in rail cards) ── */
.cust-line { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cust-line:last-child { margin-bottom: 0; }
.cust-line .nm { font-weight: 700; font-size: 1rem; }
.cust-line .sub { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-muted); }
/* ── Tag pill (hashtag style used on jobs / customers) ── */
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-muted); background: rgba(24,24,27,.05); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px 11px; text-decoration: none; }
.tag:hover { color: var(--text); border-color: var(--border-strong); }
/* ── Table interactions (lq-table.js): sortable headers + row context menu ── */
.lq-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.lq-th-sort:hover { color: var(--text); }
.lq-sort-caret { display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle;
  border-left: 4px solid transparent; border-right: 4px solid transparent; opacity: 0; transition: opacity .12s; }
.lq-th-sort.is-asc  .lq-sort-caret { opacity: 1; border-bottom: 5px solid currentColor; }
.lq-th-sort.is-desc .lq-sort-caret { opacity: 1; border-top: 5px solid currentColor; }
.lq-th-sort:focus-visible { outline: 2px solid var(--ocean); outline-offset: 2px; }
.lq-ctx-scrim { position: fixed; inset: 0; z-index: 998; display: none; }
.lq-ctx-scrim.open { display: block; }
.lq-ctx { position: fixed; z-index: 999; min-width: 194px; display: none; flex-direction: column; padding: 6px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: 0 14px 34px -10px rgba(24,24,27,.30); }
.lq-ctx.open { display: flex; }
.lq-ctx .lq-ci-form { margin: 0; display: block; }
.lq-ctx .lq-ci { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 500; color: var(--text); text-decoration: none;
  background: none; border: 0; border-radius: var(--r-sm); padding: 8px 11px; cursor: pointer; }
.lq-ctx .lq-ci:hover { background: var(--panel-soft); }
.lq-ctx .lq-ci .bi { color: var(--text-muted); font-size: 0.95rem; }
/* ── Masteradmin legacy shim ──────────────────────────────────────────────
   Masteradmin pages keep their old inline-styled content but move onto the
   Porcelain shell (base_lq → sidebar + hero). Those pages reference tokens
   that only base.html used to define; re-declare them here, scoped to the
   `.ma-legacy` body class (set by masteradmin/_base_ma.html), so the content
   renders unchanged while the rest of the Porcelain app is untouched.
   Values are the originals from base.html's :root. ── */
.lq-body.ma-legacy {
  --card-bg: #FAF6EE;
  --card-border: rgba(15, 22, 35, 0.12);
  --bg-soft: #FAF6EE;
  --brand: #2E4BE0;
  --brand-light: #6D82F0;
  --brand-gradient: linear-gradient(135deg, #2E4BE0, #6D82F0);
  --brand-gradient-rev: linear-gradient(135deg, #6D82F0, #2E4BE0);
  --on-text: #F2EBDF;
}
/* ── Balance display (large dollar number used on invoice rail) ── */
.balance { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 2.4rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1; color: var(--signal-deep); }
/* ── Phone overflow guards ───────────────────────────────────────
   .mo-stack: inline multi-column grids that collapse to one column on
   phones. Children/fieldsets/form controls may shrink below content size. */
@media (max-width: 640px) {
  .mo-stack { grid-template-columns: minmax(0, 1fr) !important; }
  .mo-stack > * { min-width: 0; }
  .mo-stack select, .mo-stack input { max-width: 100%; min-width: 0; }
  .mo-stack select { width: 100%; }
  fieldset { min-width: 0; }
  /* tables sitting directly in a card scroll inside it */
  .lq-card { min-width: 0; max-width: 100%; }
  .lq-card > table.lq-table:not(.stackable) { display: block; overflow-x: auto; max-width: 100%; }
}
/* .mo-scroll: wide tables scroll inside their card instead of widening the page */
.mo-scroll { overflow-x: auto; max-width: 100%; }

/* ══════════════════════════════════════════════════════════════════
   D21 PARITY RESTORES — keep Jinja pages pixel-identical to the pre-D21
   look where a React-only rule (or a React shorthand) now reaches Jinja
   markup. This file loads after linq-kit.css, so equal specificity wins.
   ══════════════════════════════════════════════════════════════════ */

/* Inbox: React's tablet rule subtracts the tab bar and drops the floor to
   320px; the Jinja inbox kept calc(100vh - 200px) with a 520px floor. */
@media (max-width: 1023px) {
  .lq-inbox { height: calc(100vh - 200px); min-height: 520px; }
}
/* Inbox on phones: React makes it full-bleed (negative margins, no side
   borders, square corners). The Jinja inbox stays a rounded card. */
@media (max-width: 640px) {
  .lq-inbox, .lq-inbox.with-panel {
    height: auto; overflow: hidden; margin-inline: 0;
    border-inline: 1px solid var(--border); border-radius: var(--r-lg);
  }
}

/* React's `.lq-eyebrow { font: 500 13.5px/1.3 ... }` shorthand also sets
   line-height 1.3; the Jinja eyebrow inherited the body line-height. */
.lq-eyebrow { line-height: inherit; }

/* Public analytics (and the AI brains list) use .pa-card / .pa-empty with
   their own inline styles; the React card chrome must not reach them. */
.pa-card { background: none; border: 0; border-radius: 0; padding: 0; }
.pa-empty { font-size: inherit; }

/* Inbox pieces the React kit extended (truncation, clamps, flex sizing, sticky
   thread chrome). The Jinja inbox keeps the pre-D21 behaviour. */
.seg { border: 0; }
.topbar { min-height: auto; }
.lq-table .id { white-space: normal; }
.inbox-list, .inbox-thread { min-width: auto; }
.conv { align-items: normal; }
.conv .c-name { min-width: auto; overflow: visible; text-overflow: clip; white-space: normal; }
.conv .c-time { flex-shrink: 1; font-variant-numeric: normal; }
.conv .c-prev { flex: 0 1 auto; display: block; line-height: inherit; -webkit-line-clamp: none; -webkit-box-orient: horizontal; }
.conv .c-unread { min-width: auto; padding: 0; margin-top: 0; font-weight: 400; font-variant-numeric: normal; }
.thread-head .th-meta { flex: 0 1 auto; }
.thread-head .th-meta b { display: inline; overflow: visible; text-overflow: clip; white-space: normal; }
.thread-head .th-meta div { overflow: visible; text-overflow: clip; white-space: normal; }
.msg .m-time { color: inherit; }
@media (max-width: 640px) {
  .lq-inbox.show-thread { border-block: 1px solid var(--border); }
  .lq-inbox.show-thread .inbox-thread { height: auto; min-height: 60vh; }
  .lq-inbox.show-thread .thread-head { position: static; top: auto; z-index: auto; background: none; padding: 14px 20px; gap: 12px; }
  .lq-inbox.show-thread .thread-body { flex: 1; min-height: auto; overscroll-behavior: auto; padding: 22px 20px; gap: 14px; }
  .lq-inbox.show-thread .thread-body .msg { max-width: 72%; }
  .lq-inbox.show-thread .thread-compose { position: static; bottom: auto; z-index: auto; background: none; padding: 14px 16px; gap: 10px; }
  .page:has(.lq-inbox.show-thread) { padding-top: 18px; padding-bottom: 96px; }
}

/* A14: a control switched off until LINQ_ALLOW_MAINTENANCE is set. Beats inline backgrounds. */
[data-needs-maint]{opacity:.45 !important;cursor:not-allowed !important;filter:saturate(.3)}
