/* ════════════════════════════════════════════════════════════════════
   linq Brand Kit — canonical stylesheet (single source of truth)
   One file. Tokens + chrome (sidebar/topbar/page) + .lq- components.
   No !important. No hardcoded hex outside :root. Drop into static/css/.
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Surfaces — Porcelain (neutral grey, 2026-07) ─────────────
     Moved OFF warm bone/cream to Porcelain's cool neutral greys so every
     base_lq page converges. Brand + semantic tokens below were already
     Porcelain's exact values, so this is a surface-only retune. */
  --bg:            #EEEEF0;   /* Porcelain — paper / page */
  --bg-warm:       #E7E7EA;   /* Porcelain-deep — strips */
  --panel:         #FBFBFC;   /* Panel — cards (near-white) */
  --panel-soft:    #F4F4F6;   /* alt rows / hover */

  /* ── Ink + text ───────────────────────────────────────────── */
  --ink:           #18181B;   /* primary text */
  --surface-dark:  #18181B;   /* dark chrome — neutral zinc (was navy #1A1C22) */
  --surface-dark-2:#232327;   /* lifted dark row + emphasis cards */
  /* Large dark surfaces (sidebar / heroes / bands): flat #18181B through the
     top so a header↔hero seam is continuous, with a subtle neutral lift below. */
  --dark-fill:     linear-gradient(180deg, #18181B 0%, #18181B 55%, #1F1F23 100%);
  --text:          #18181B;
  /* Carries forward the AA fix from the Lighthouse pass. Porcelain's own
     muted grey (#6E7076) is only 4.27:1 on the new --bg (#EEEEF0) — it
     would have silently undone that fix. #63656B keeps the Porcelain hue
     and clears AA on every surface: 5.04:1 on --bg, 4.73:1 on --bg-warm
     (#E7E7EA), 5.64:1 on --panel. Text-only token, no shadow/border uses,
     so darkening it globally is safe. */
  --text-muted:    #63656B;
  --text-faint:    #A1A1AA;   /* meta / placeholders only — never body copy */
  --on-dark:       #FAFAFA;   /* text on dark surfaces */
  --on-dark-muted: rgba(250,250,250,0.60);

  /* ── Brand ────────────────────────────────────────────────── */
  --ocean:         #3B5BDB;   /* primary action / brand */
  --ocean-deep:    #2C46B0;
  --ocean-soft:    rgba(59,91,219,0.10);
  --signal:        #EA6A2C;   /* accent — the dot */
  --signal-deep:   #C9551F;
  --signal-soft:   #FBE2D2;

  /* ── Semantic ─────────────────────────────────────────────── */
  --sage:          #1F9D55;   --sage-soft:   rgba(31,157,85,0.12);
  --amber:         #C08328;   --amber-soft:  rgba(192,131,40,0.14);
  --red:           #D14848;   --red-soft:    rgba(209,72,72,0.12);
  --violet:        #7C5CD6;   --violet-soft: rgba(124,92,214,0.12);
  --ai:            #0EA5B5;   --ai-soft:     rgba(14,165,181,0.12);  /* AI-answered (distinct from ocean) */

  /* ── Lines ────────────────────────────────────────────────── */
  --border:        rgba(24,24,27,0.10);
  --border-soft:   rgba(24,24,27,0.06);
  --border-strong: rgba(24,24,27,0.17);

  /* ── Radii ────────────────────────────────────────────────── */
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-pill: 999px;

  /* ── Type ─────────────────────────────────────────────────── */
  --font-display: 'Public Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Archivo Narrow', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ── Elevation (soft, neutral — never hard black drops) ─────
     SHARED-CHROME: keep in step with frontend/src/styles/linq-kit.css. */
  --e-1: 0 1px 2px rgba(24,24,27,.05);
  --e-2: 0 10px 30px -12px rgba(24,24,27,.14);
  --e-3: 0 32px 70px -28px rgba(24,24,27,.30);

  --sidebar-w: 252px;
  --sidebar-bg: var(--dark-fill);

  /* ── Porcelain aliases ────────────────────────────────────────
     The Porcelain design language names the same values differently.
     Aliasing (not duplicating) keeps one source of truth. */
  --page:    var(--bg);
  --card:    var(--panel);
  --fill:    rgba(24,24,27,.05);
  --line:    var(--border);
  --line-d:  var(--border-strong);
  --muted:   var(--text-muted);
  --faint:   var(--text-faint);
  --dark:    var(--surface-dark-2);
  --mono:    var(--font-mono);
  --shadow:  var(--e-2);
  --shadow-h:var(--e-3);

  /* ── Porcelain dark rail (sidebar chrome) ─────────────────────
     The redesign sidebar is a charcoal rail with white-alpha text.
     Values from the Porcelain Sidebar handoff example (source of
     truth for this surface). Consumed by porcelain-shell.css.

     SHARED-CHROME: these must stay identical to the SPA's copy in
     frontend/src/styles/linq-kit.css. A user crossing the strangler
     boundary (React -> a Jinja page not in _SPA_OWNED_PATTERNS) sees
     both rails in one session, so any drift reads as "two different
     apps". Was #2C2A3A/#38364A here and #18181B/#232327 there, which
     is why the Jinja fall-through pages looked plum next to the app.
     tests/test_design_token_parity.py guards this. */
  --side:      #18181B;              /* rail background */
  --side-2:    #232327;              /* lifted rail row */
  --side-line: rgba(255,255,255,.10);
  --s-txt:     rgba(255,255,255,.78);
  --s-muted:   rgba(255,255,255,.50);
  --s-faint:   rgba(255,255,255,.37);
  --sw:        262px;                /* expanded rail width (76px collapsed) */
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-display);
  color: var(--text);
  /* Porcelain: flat neutral surface — no warm washes, restraint over
     decoration. SHARED-CHROME: matches the SPA copy. The orange/blue
     radial washes that used to live here made every Jinja fall-through
     page read as a different product next to the flat React surface. */
  background: var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
a { color: inherit; }

/* ══════════════════════════════════════════════════════════════════
   APP SHELL
   ══════════════════════════════════════════════════════════════════ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  background: var(--sidebar-bg);
  color: var(--on-dark-muted);
  padding: 22px 16px;
  display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 0; height: 100vh;
}
.side-logo { display: flex; align-items: center; gap: 11px; padding: 4px 8px 0; text-decoration: none; }
.side-logo .wm { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; color: #fff; line-height: 1; }
.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-group { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; flex: 1; margin: 0 -4px; padding: 0 4px;
  scrollbar-width: thin; scrollbar-color: var(--signal) transparent;
  /* rtl moves the vertical scrollbar to the LEFT edge; children stay ltr. */
  direction: rtl; }
.nav-group > * { direction: ltr; }
.nav-group::-webkit-scrollbar { width: 6px; }
.nav-group::-webkit-scrollbar-track { background: transparent; }
.nav-group::-webkit-scrollbar-thumb { background: var(--signal); border-radius: 999px; }
.nav-group::-webkit-scrollbar-thumb:hover { background: var(--signal-deep); }
.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 {
  display: flex; align-items: center; gap: 12px; padding: 9px 11px;
  border-radius: var(--r-sm); color: rgba(255,255,255,0.78); text-decoration: none;
  font-size: 0.92rem; font-weight: 500; transition: background .15s, color .15s;
}
.nav-item i { font-size: 1.05rem; width: 20px; text-align: center; opacity: 0.9; }
.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;
}
.nav-item .dot-live { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px rgba(31,157,85,0.22); }
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: #fff; color: var(--ink); font-weight: 600; }
.nav-item.active i { opacity: 1; color: var(--ocean); }
.nav-item.active .badge { background: var(--signal); color: #fff; }

.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; }
}

/* ── Main + Topbar ───────────────────────────────────────────── */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 36px;
  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);
}
.crumb { display: flex; align-items: center; gap: 9px; font-size: 0.95rem; font-weight: 600; }
.crumb .muted { color: var(--text-faint); font-weight: 500; }
.crumb i { color: var(--text-faint); font-size: 0.8rem; }
.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 .lbl { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; color: var(--text-muted); }
.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; }
.tb-spacer { flex: 1; }
.tb-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--panel); color: var(--text-muted); cursor: pointer; position: relative; text-decoration: none; }
.tb-icon:hover { border-color: var(--border-strong); }
.tb-icon .ping { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; background: var(--signal); border-radius: 50%; border: 2px solid var(--panel); }
.tb-icon.live-dot::after { content:''; position:absolute; top:9px; right:10px; width:7px; height:7px; border-radius:50%; background:var(--sage); }

.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:hover { border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.btn.primary:hover { background: var(--ocean-deep); border-color: var(--ocean-deep); }
/* Ink label, not white. White on --signal (#EA6A2C) is 3.18:1 and fails AA;
   ink is 5.69:1, and this keeps the locked brand orange exactly as the v1.0
   palette specifies rather than inventing an off-palette orange.
   The hover deliberately does NOT use --signal-deep (#C9551F): ink on it is
   4.14:1 and white is 4.37:1, so neither label colour passes there. #D65C24
   is 4.67:1 with ink and still reads as a clear darkening on hover. The
   --signal-deep token itself is untouched for its other uses. */
.btn.signal { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.btn.signal:hover { background: #D65C24; border-color: #D65C24; }
.btn.dark { background: var(--surface-dark); border-color: var(--surface-dark); color: var(--on-dark); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: 0.82rem; }

/* ══════════════════════════════════════════════════════════════════
   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; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-head h1 { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 10px; line-height: 1.05; }
.page-head .count { font-family: var(--font-mono); color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }
.page-head .sub { color: var(--text-muted); font-size: 0.96rem; margin-top: 4px; }
.head-actions { display: flex; align-items: center; gap: 10px; }

/* ══════════════════════════════════════════════════════════════════
   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-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.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:hover { border-color: var(--border-strong); color: var(--text); }
.filter-tab.active { background: var(--signal-soft); border-color: rgba(234,106,44,0.3); color: var(--signal-deep); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.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;
}
.view-chip i { font-size: 0.9rem; opacity: 0.7; }
.view-chip:hover { border-color: var(--border-strong); color: var(--text); }
.view-chip.input { color: var(--text-faint); border-style: dashed; }

/* 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;
}
.stat-chip::before { content:''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stat-chip.s-submitted { color: var(--amber); }
.stat-chip.s-assigned  { color: var(--ocean); }
.stat-chip.s-enroute   { color: var(--violet); }
.stat-chip.s-progress  { color: var(--signal-deep); }
.stat-chip.s-done      { color: var(--sage); }
.stat-chip.s-invoiced  { color: var(--sage); }
.stat-chip.s-cancelled { color: var(--text-faint); }

/* 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;
}
.tech-chip:hover { border-color: var(--border-strong); }
.tech-chip .av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 0.7rem; font-weight: 700; font-family: var(--font-mono); flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════════
   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::before { content:''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ocean  { color: var(--ocean);       background: var(--ocean-soft);  border-color: rgba(59,91,219,0.22); }
.pill.signal { color: var(--signal-deep); background: var(--signal-soft); border-color: rgba(234,106,44,0.28); }
.pill.sage   { color: var(--sage);        background: var(--sage-soft);   border-color: rgba(31,157,85,0.22); }
.pill.amber  { color: var(--amber);       background: var(--amber-soft);  border-color: rgba(201,138,30,0.26); }
.pill.violet { color: var(--violet);      background: var(--violet-soft); border-color: rgba(124,92,214,0.24); }
.pill.red    { color: var(--red);         background: var(--red-soft);    border-color: rgba(209,72,72,0.22); }
.pill.ghost  { color: var(--text-muted);  background: rgba(24,24,27,0.05);border-color: var(--border); }

/* ══════════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════════ */
.lq-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 24px; display: flex; flex-direction: column; }
.lq-card.pad-lg { padding: 28px 30px; }
.lq-card.dark { background: var(--surface-dark); color: var(--on-dark); border-color: rgba(255,255,255,0.1); position: relative; }
.lq-card.dark .lq-eyebrow { color: var(--on-dark-muted); }
.lq-card.dark .card-head h2 { color: #fff; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.card-head .link { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.card-head .link:hover { color: var(--signal); }
.lq-card.dark .card-head .link { color: var(--on-dark-muted); }

/* ══════════════════════════════════════════════════════════════════
   KPI STRIP + REPORT STAT CARDS
   ══════════════════════════════════════════════════════════════════ */
.kpi-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; }
.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-label i { color: var(--text-faint); font-size: 0.95rem; }
.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); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.delta.up { color: var(--sage); } .delta.down { color: var(--red); }

/* 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; }
.s-num.ocean { color: var(--ocean); } .s-num.signal { color: var(--signal); } .s-num.sage { color: var(--sage); }

/* ══════════════════════════════════════════════════════════════════
   TABLES + LIST ROWS
   ══════════════════════════════════════════════════════════════════ */
.lq-table { width: 100%; border-collapse: collapse; }
.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 tbody td { padding: 14px; font-size: 0.92rem; border-bottom: 1px dashed var(--border); vertical-align: middle; }
.lq-table tbody tr:last-child td { border-bottom: 0; }
.lq-table tbody tr { transition: background .12s; cursor: pointer; }
.lq-table tbody tr:hover { background: var(--panel-soft); }
.lq-table .id { font-family: var(--font-mono); color: var(--text-muted); font-size: 0.84rem; letter-spacing: 0.03em; }
.lq-table .strong { font-weight: 600; }
.lq-table .strong small { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.78rem; }
.lq-table .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.lq-table .muted { color: var(--text-muted); }

/* job list row (card-style list, like the screenshot but cleaned up) */
.list-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.list-row { display: grid; grid-template-columns: 96px 1fr 1.1fr auto auto; align-items: center; gap: 18px; padding: 16px 22px; border-bottom: 1px dashed var(--border); cursor: pointer; transition: background .12s; text-decoration: none; color: inherit; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--panel-soft); }
.list-row .id { font-family: var(--font-mono); color: var(--text-muted); font-size: 0.86rem; letter-spacing: 0.03em; }
.list-row .title { font-weight: 600; font-size: 0.98rem; }
.list-row .loc { color: var(--text-muted); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 7px; }
.list-row .loc i { font-size: 0.85rem; color: var(--text-faint); }
.list-row .when { font-family: var(--font-mono); font-size: 0.84rem; color: var(--text-muted); white-space: nowrap; }

/* 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;
}

/* avatar */
.av { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-family: var(--font-mono); flex-shrink: 0; }
.av.sm { width: 26px; height: 26px; font-size: 0.72rem; }
.av.md { width: 34px; height: 34px; font-size: 0.8rem; }
.tech { display: inline-flex; align-items: center; gap: 8px; }
.tech.empty { color: var(--text-faint); }
.tech.empty .av { background: rgba(24,24,27,0.08); color: var(--text-faint); }

/* ══════════════════════════════════════════════════════════════════
   SETTINGS — toggle rows, tab bar
   ══════════════════════════════════════════════════════════════════ */
.tab-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.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 i { font-size: 0.95rem; opacity: 0.8; }
.tab:hover { border-color: var(--border-strong); color: var(--text); }
.tab.active { background: var(--surface-dark); border-color: var(--surface-dark); color: var(--on-dark); }
.tab.active i { color: var(--signal); opacity: 1; }

.setting-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.setting-section-head .ico { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--signal-soft); color: var(--signal-deep); display: grid; place-items: center; font-size: 1.05rem; flex-shrink: 0; }
.setting-section-head h2 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.setting-desc { color: var(--text-muted); font-size: 0.92rem; margin: 4px 0 0 46px; max-width: 64ch; }

.toggle-row { display: flex; align-items: center; gap: 16px; padding: 16px 4px; border-bottom: 1px dashed var(--border); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .t-label { font-weight: 600; font-size: 0.96rem; }
.toggle-row .t-sub { color: var(--text-muted); font-size: 0.84rem; margin-top: 2px; }
.toggle-row .grow { flex: 1; min-width: 0; }

.switch { position: relative; width: 46px; height: 27px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: rgba(24,24,27,0.16); border-radius: var(--r-pill); transition: background .18s; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.switch input:checked ~ .track { background: var(--ocean); }
.switch input:checked ~ .knob { transform: translateX(19px); }

/* select (settings) */
.lq-select { position: relative; }
.lq-select select {
  appearance: none; font-family: var(--font-display); font-size: 0.92rem; font-weight: 500; color: var(--text);
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 11px 40px 11px 15px; cursor: pointer; min-width: 200px;
}
.lq-select::after { content: '\F282'; font-family: 'bootstrap-icons'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; font-size: 0.8rem; }
.lq-select select:focus { outline: none; border-color: var(--ocean); }

/* ══════════════════════════════════════════════════════════════════
   CHART CHROME (reports)
   ══════════════════════════════════════════════════════════════════ */
.chart-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 26px; }
.chart-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.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)); }

.report-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: border-color .15s, transform .1s, box-shadow .15s; text-decoration: none; color: inherit; }
.report-card:hover { border-color: var(--border-strong); box-shadow: var(--e-2); transform: translateY(-2px); }
.report-card .r-ico { width: 42px; height: 42px; border-radius: var(--r-md); display: grid; place-items: center; font-size: 1.2rem; background: var(--ocean-soft); color: var(--ocean); }
.report-card h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.report-card p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; }

/* ══════════════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════════════ */
.grid { display: grid; gap: 22px; }
.grid.g2 { grid-template-columns: 1fr 1fr; }
.grid.g3 { grid-template-columns: repeat(3,1fr); }
.grid.g4 { grid-template-columns: repeat(4,1fr); }
.grid.report-main { grid-template-columns: 1.6fr 1fr; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.mb-l { margin-bottom: 26px; } .mb-m { margin-bottom: 18px; } .mb-s { margin-bottom: 12px; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.row { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }
.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-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.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-label i { color: var(--text-faint); font-size: 0.95rem; }
.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-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-card .kc-delta { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; }
.kpi-card .kc-delta.up { color: var(--sage); } .kpi-card .kc-delta.down { color: var(--red); } .kpi-card .kc-delta.flat { color: var(--text-muted); }
.kpi-card .kc-since { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); }
.lq-spark { width: 84px; height: 30px; display: block; flex-shrink: 0; }
.lq-spark polyline { fill: none; stroke: var(--ocean); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lq-spark .area { fill: var(--ocean-soft); stroke: none; }

/* ── Empty state ──────────────────────────────────────────────── */
.lq-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 32px; gap: 12px; }
.lq-empty .e-ico { width: 56px; height: 56px; border-radius: var(--r-md); background: var(--bg-warm); color: var(--text-faint); display: grid; place-items: center; font-size: 1.6rem; }
.lq-empty h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.lq-empty p { color: var(--text-muted); font-size: 0.9rem; max-width: 38ch; line-height: 1.5; }
.lq-empty .btn { margin-top: 4px; }

/* ── Loading skeleton ─────────────────────────────────────────── */
.sk { position: relative; overflow: hidden; background: rgba(24,24,27,0.06); border-radius: var(--r-sm); }
.sk::after { content:''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent); transform: translateX(-100%); animation: sk-shimmer 1.4s infinite; }
@keyframes sk-shimmer { 100% { transform: translateX(100%); } }
.sk.line { height: 12px; margin-bottom: 10px; } .sk.line.short { width: 55%; } .sk.line.med { width: 75%; }
.sk.title { height: 20px; width: 40%; margin-bottom: 16px; } .sk.circle { border-radius: 50%; } .sk.block { height: 120px; border-radius: var(--r-md); }

/* ── Toasts / inline alerts ───────────────────────────────────── */
.alert { display: flex; align-items: flex-start; gap: 11px; padding: 13px 16px; border-radius: var(--r-md); border: 1px solid; font-size: 0.9rem; font-weight: 500; }
.alert i { font-size: 1.05rem; margin-top: 1px; flex-shrink: 0; }
.alert.success { background: var(--sage-soft);  border-color: rgba(31,157,85,0.3);  color: #166534; }
.alert.error   { background: var(--red-soft);   border-color: rgba(209,72,72,0.32); color: #9a2a2a; }
.alert.warn    { background: var(--amber-soft); border-color: rgba(201,138,30,0.34);color: #8a5a12; }
.alert.info    { background: var(--ocean-soft); border-color: rgba(59,91,219,0.28); color: var(--ocean-deep); }

/* ── 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 { font-family: var(--font-mono); font-size: 0.84rem; letter-spacing: 0.04em; }
.bulk-bar .bb-count b { color: var(--signal); }
.bulk-bar .bb-sep { width: 1px; height: 22px; background: rgba(255,255,255,0.16); }
.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; }
.bulk-bar .bb-btn:hover { background: rgba(255,255,255,0.18); }
.bulk-bar .bb-btn.danger { color: #ffb4b4; }
.bulk-bar .bb-close { margin-left: 4px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--on-dark-muted); cursor: pointer; }
.bulk-bar .bb-close:hover { background: rgba(255,255,255,0.12); }

/* ── Context menu (right-click) ───────────────────────────────── */
.ctx-menu { width: 220px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--e-3); padding: 6px; }
.ctx-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--r-sm); font-size: 0.88rem; font-weight: 500; color: var(--text); cursor: pointer; }
.ctx-item i { font-size: 0.95rem; color: var(--text-muted); width: 18px; text-align: center; }
.ctx-item .sc { margin-left: auto; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); }
.ctx-item:hover { background: var(--panel-soft); }
.ctx-item.danger { color: var(--red); } .ctx-item.danger i { color: var(--red); }
.ctx-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.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; }

/* ── Drawer (slide-in panel) ──────────────────────────────────── */
.drawer { width: 380px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--e-3); display: flex; flex-direction: column; overflow: hidden; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.drawer-head .x { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text-muted); cursor: pointer; border: 1px solid var(--border); }
.drawer-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }

/* ── Command palette (Ctrl-K) ─────────────────────────────────── */
.cmdk { width: 560px; max-width: 92vw; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--e-3); overflow: hidden; }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.cmdk-input i { font-size: 1.1rem; color: var(--text-faint); }
.cmdk-input input { flex: 1; border: 0; background: transparent; font-family: var(--font-display); font-size: 1.02rem; color: var(--text); outline: none; }
.cmdk-input input::placeholder { color: var(--text-faint); }
.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-list { padding: 8px; max-height: 340px; overflow-y: auto; }
.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 { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 0.92rem; cursor: pointer; }
.cmdk-item i { width: 20px; text-align: center; color: var(--text-muted); }
.cmdk-item .meta { margin-left: auto; font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); }
.cmdk-item.active, .cmdk-item:hover { background: var(--surface-dark); color: var(--on-dark); }
.cmdk-item.active i, .cmdk-item:hover i { color: var(--signal); }
.cmdk-item.active .meta, .cmdk-item:hover .meta { color: var(--on-dark-muted); }

/* ── Progress bar (goals, capacity) ───────────────────────────── */
.lq-progress { height: 8px; border-radius: var(--r-pill); background: rgba(24,24,27,0.08); overflow: hidden; }
.lq-progress > span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--ocean); }
.lq-progress > span.signal { background: var(--signal); } .lq-progress > span.sage { background: var(--sage); }

/* ── 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 TITLE (single header — hoisted from .page-head)
   ══════════════════════════════════════════════════════════════════ */
.topbar { gap: 16px; }
.topbar .tb-titlewrap { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; min-width: 0; }
.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; }
.topbar .tb-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; white-space: nowrap; }
.topbar .tb-sub { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; align-self: center; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar .tb-spacer { flex: 1 1 auto; min-width: 8px; }
.topbar .head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar .head-actions .seg { flex-shrink: 0; }
.topbar .tb-icon { flex-shrink: 0; }
@media (max-width: 1200px) { .topbar .tb-sub { display: none; } }

/* dashboard greeting (kept in-page, not a duplicate of the topbar section) */
.dash-greeting { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.dash-greeting h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; margin-top: 8px; line-height: 1.05; }
.dash-greeting .count, .dash-greeting .sub { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }

/* ══════════════════════════════════════════════════════════════════
   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-check:hover { border-color: var(--ocean); }
.lq-check:checked { background: var(--ocean); border-color: var(--ocean); }
.lq-check:checked::after { content: ''; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.lq-table th.sel-col, .lq-table td.sel-col { width: 42px; padding-right: 0; text-align: center; }
.lq-table tbody tr.is-sel { background: var(--signal-soft); }
.list-card.selectable .list-row { grid-template-columns: 26px 96px 1fr 1.1fr auto auto; }
.list-card.selectable .list-row .lq-check { align-self: center; }
.list-card .list-row.is-sel { background: var(--signal-soft); }

.bulk-bar.is-fixed { position: fixed; left: 50%; bottom: 26px; z-index: 60; transform: translateX(-50%) translateY(18px); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.bulk-bar.is-fixed.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* ══════════════════════════════════════════════════════════════════
   INBOX (two-pane) — conversations + thread
   ══════════════════════════════════════════════════════════════════ */
.lq-inbox { display: grid; grid-template-columns: 340px 1fr; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; height: calc(100vh - 200px); min-height: 520px; }
.inbox-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.inbox-list-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.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); }
.inbox-convs { overflow-y: auto; flex: 1; min-height: 0; }
.conv { display: flex; gap: 11px; padding: 13px 16px; border-bottom: 1px dashed var(--border); cursor: pointer; }
.conv:hover { background: var(--panel-soft); }
.conv.active { background: var(--signal-soft); }
.conv .c-body { flex: 1; min-width: 0; }
.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 { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.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); }
.thread-body { flex: 1; overflow-y: auto; padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.msg { max-width: 72%; padding: 11px 15px; border-radius: var(--r-lg); font-size: 0.9rem; line-height: 1.45; }
.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 { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.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; }
.thread-compose input:focus { border-color: var(--ocean); }

/* ══════════════════════════════════════════════════════════════════
   CALENDAR (week grid)
   ══════════════════════════════════════════════════════════════════ */
.lq-cal { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: 56px repeat(7, 1fr); }
.cal-h { padding: 12px 10px; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border-soft); text-align: center; }
.cal-h:first-child { border-left: 0; }
.cal-h .d { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.cal-h .n { font-size: 1.15rem; font-weight: 700; margin-top: 2px; }
.cal-h.today .n { color: var(--signal); }
.cal-time { padding: 8px 8px 0; text-align: right; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); border-top: 1px solid var(--border-soft); }
.cal-cell { min-height: 58px; border-left: 1px solid var(--border-soft); border-top: 1px solid var(--border-soft); padding: 4px; position: relative; }
.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; }
.cal-ev .t { font-family: var(--font-mono); font-weight: 400; opacity: 0.7; font-size: 0.7rem; }
.cal-ev.ocean  { background: var(--ocean-soft);  border-color: var(--ocean);  color: var(--ocean-deep); }
.cal-ev.signal { background: var(--signal-soft); border-color: var(--signal); color: var(--signal-deep); }
.cal-ev.sage   { background: var(--sage-soft);   border-color: var(--sage);   color: #166534; }
.cal-ev.violet { background: var(--violet-soft); border-color: var(--violet); color: #5b3fa8; }

/* ══════════════════════════════════════════════════════════════════
   DASHBOARD — page tabs, exception tiles, dispatch kanban, team strip
   ══════════════════════════════════════════════════════════════════ */
.page-tabs { display: inline-flex; gap: 4px; margin-bottom: 22px; }
.page-tab { font-size: 0.92rem; font-weight: 600; color: var(--text-muted); padding: 8px 16px; border-radius: var(--r-sm); text-decoration: none; cursor: pointer; }
.page-tab:hover { background: var(--panel); color: var(--text); }
.page-tab.active { background: var(--surface-dark); color: var(--on-dark); }

.section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.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); }
.section-label .hint { font-size: 0.8rem; color: var(--text-faint); }

/* exception tiles */
.exc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.exc-tile { background: var(--panel); border: 1px solid var(--border); border-top: 3px solid var(--border-strong); border-radius: var(--r-lg); padding: 18px 20px; cursor: pointer; transition: box-shadow .15s, transform .1s; }
.exc-tile:hover { box-shadow: var(--e-2); transform: translateY(-2px); }
.exc-tile.alert { border-top-color: var(--red); }
.exc-tile.warn  { border-top-color: var(--amber); }
.exc-tile.info  { border-top-color: var(--ocean); }
.exc-tile.money { border-top-color: var(--signal); }
.exc-tile .et-label { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.exc-tile .et-label i { font-size: 1rem; color: var(--text-muted); }
.exc-tile .et-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; }
.exc-tile.alert .et-num { color: var(--red); } .exc-tile.money .et-num { color: var(--signal); }
.exc-tile .et-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }

/* dispatch kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.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 { display: flex; align-items: center; gap: 9px; padding: 13px 15px; }
.kb-head .dot { width: 8px; height: 8px; border-radius: 50%; }
.kb-head .lbl { font-weight: 700; font-size: 0.9rem; }
.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; }
.kb-body { display: flex; flex-direction: column; gap: 9px; padding: 0 11px 11px; }
.kb-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 13px; cursor: grab; box-shadow: var(--e-1); }
.kb-card:hover { border-color: var(--border-strong); }
.kb-card .kc-cust { font-weight: 600; font-size: 0.88rem; }
.kb-card .kc-svc { font-size: 0.8rem; color: var(--text-muted); margin: 2px 0 9px; }
.kb-more { text-align: center; font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-muted); padding: 9px; cursor: pointer; }
.kb-more:hover { color: var(--signal); }
.kb-empty { display: grid; place-items: center; color: var(--text-faint); font-size: 0.82rem; border: 1px dashed var(--border); border-radius: var(--r-md); margin: 0 11px 11px; padding: 22px; }
.pill.notech { color: var(--red); background: var(--red-soft); border-color: rgba(209,72,72,0.22); }

/* team availability strip */
.team-strip { display: flex; gap: 12px; flex-wrap: wrap; }
.team-card { display: flex; align-items: center; gap: 11px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 16px 10px 10px; }
.team-card .av { position: relative; }
.team-card .av .s { position: absolute; bottom: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--panel); }
.s.free { background: var(--sage); } .s.busy { background: var(--signal); } .s.off { background: var(--text-faint); }
.team-card .tc-name { font-weight: 600; font-size: 0.9rem; }
.team-card .tc-stat { font-family: var(--font-mono); font-size: 0.74rem; }
.tc-stat.free { color: var(--sage); } .tc-stat.busy { color: var(--signal-deep); } .tc-stat.off { color: var(--text-faint); }

@media (max-width: 1100px){ .exc-grid { grid-template-columns: repeat(2,1fr); } }

/* ══════════════════════════════════════════════════════════════════
   SWIPEABLE ANALYTICS CARD (flick between metrics — great on mobile)
   ══════════════════════════════════════════════════════════════════ */
.swipe-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.swipe-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 6px; }
.swipe-head h2 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.swipe-dots { display: flex; gap: 6px; }
.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-dots button.on { width: 20px; background: var(--ocean); }
.swipe-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.swipe-track::-webkit-scrollbar { display: none; }
.swipe-panel { flex: 0 0 100%; scroll-snap-align: start; padding: 12px 20px 22px; }
.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; }
.swipe-panel .sp-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 2.8rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1; margin: 12px 0 10px; }
.swipe-panel .sp-num .u { color: var(--signal); }
.swipe-panel .sp-foot { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted); }
.swipe-panel .sp-chart { margin-top: 16px; }
.swipe-hint { display: none; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); letter-spacing: 0.06em; }

/* ══════════════════════════════════════════════════════════════════
   MOBILE BACK BUTTON + helpers
   ══════════════════════════════════════════════════════════════════ */
.hamburger { display: none; }
.mobile-tabbar { display: none; }
.sidebar-overlay { display: none; }

/* ══════════════════════════════════════════════════════════════════
   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; }

  /* 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; }

/* ══════════════════════════════════════════════════════════════════
   RECORD FAMILY — forms, detail layout, entity header, timeline,
   key-value, line-items, document header. Shared by every
   detail / new / edit screen so the 15 sub-pages stay one system.
   Verbatim from design_handoff_record_family/linq-kit.css.
   ══════════════════════════════════════════════════════════════════ */

/* ── Forms ────────────────────────────────────────────────────── */
.lq-form { display: flex; flex-direction: column; gap: 20px; max-width: 940px; }
.form-section { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 26px; }
.form-section > .fs-head { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.form-section > .fs-head .ico { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--ocean-soft); color: var(--ocean); display: grid; place-items: center; font-size: 1rem; flex-shrink: 0; }
.form-section > .fs-head h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.form-section > .fs-head .fs-sub { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-faint); margin-left: auto; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.field-grid.g1 { grid-template-columns: 1fr; }
.field-grid.g3 { grid-template-columns: 1fr 1fr 1fr; }

.lq-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.lq-field.span-2 { grid-column: 1 / -1; }
.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; }
.lq-field > label .req { color: var(--signal); }
.lq-field > label .opt { color: var(--text-faint); letter-spacing: 0.06em; }
.lq-input, .lq-textarea, .lq-field > select {
  width: 100%; appearance: none; font-family: var(--font-display); font-size: 0.94rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.lq-field > 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; }
.lq-textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.lq-input::placeholder, .lq-textarea::placeholder { color: var(--text-faint); }
.lq-input:focus, .lq-textarea:focus, .lq-field > select:focus { border-color: var(--ocean); box-shadow: 0 0 0 3px var(--ocean-soft); }
.lq-input.with-pre { padding-left: 30px; }
.field-pre { position: relative; }
.field-pre > .pre { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); color: var(--text-faint); font-size: 0.92rem; pointer-events: none; }
.field-hint { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); }
.field-row { display: flex; gap: 10px; }

.form-actions { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 16px 0 4px; }
.form-actions .spacer { flex: 1; }
.form-actions.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding-bottom: 12px; z-index: 4; }

/* ── Detail layout + right rail ───────────────────────────────── */
.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 24px; align-items: start; }
.detail-rail { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 88px; }
.detail-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
@media (max-width: 1100px) { .detail-layout { grid-template-columns: 1fr; } .detail-rail { position: static; } }

/* ── Entity header (record hero) ──────────────────────────────── */
.entity-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.entity-head .eh-av { width: 60px; height: 60px; border-radius: var(--r-md); display: grid; place-items: center; color: #fff; font-weight: 700; font-family: var(--font-mono); font-size: 1.3rem; flex-shrink: 0; }
.entity-head .eh-id { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.entity-head h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: 3px 0 0; }
.entity-head .eh-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 9px; }
.entity-head .eh-meta .m { display: inline-flex; align-items: center; gap: 7px; font-size: 0.9rem; color: var(--text-muted); }
.entity-head .eh-meta .m i { color: var(--text-faint); font-size: 0.9rem; }
.entity-head .eh-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
@media (max-width: 680px) { .entity-head .eh-actions { margin-left: 0; width: 100%; } .entity-head { flex-wrap: wrap; } }

/* ── Key-value list (rail facts) ──────────────────────────────── */
.kv { display: flex; flex-direction: column; }
.kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.kv-row:last-child { border-bottom: 0; }
.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; }
.kv-v { font-weight: 600; font-size: 0.9rem; text-align: right; }
.kv-v.link { color: var(--ocean); cursor: pointer; }

/* ── Activity timeline ────────────────────────────────────────── */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 4px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .tl-dot { position: absolute; left: -22px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--border-strong); }
.tl-item .tl-dot.ocean { border-color: var(--ocean); background: var(--ocean); } .tl-item .tl-dot.sage { border-color: var(--sage); background: var(--sage); } .tl-item .tl-dot.signal { border-color: var(--signal); background: var(--signal); } .tl-item .tl-dot.violet { border-color: var(--violet); background: var(--violet); } .tl-item .tl-dot.amber { border-color: var(--amber); background: var(--amber); }
.tl-item .tl-time { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--text-faint); }
.tl-item .tl-title { font-weight: 600; font-size: 0.92rem; margin: 2px 0 1px; }
.tl-item .tl-body { font-size: 0.88rem; color: var(--text-muted); }

/* ── Line-items (invoice / estimate editor + view) ────────────── */
.line-items { width: 100%; border-collapse: collapse; }
.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); }
.line-items thead th.r, .line-items td.r { text-align: right; }
.line-items tbody td { padding: 12px; border-bottom: 1px dashed var(--border); font-size: 0.92rem; vertical-align: top; }
.line-items .li-desc b { font-weight: 600; } .line-items .li-desc small { display: block; color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }
.line-items .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.li-add { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--ocean); cursor: pointer; text-decoration: none; }
.doc-totals { display: flex; flex-direction: column; gap: 0; margin-left: auto; width: 300px; max-width: 100%; margin-top: 18px; }
.tot-row { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 0; font-size: 0.92rem; }
.tot-row .tk { color: var(--text-muted); } .tot-row .tv { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.tot-row.grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 14px; }
.tot-row.grand .tk { font-weight: 700; color: var(--ink); font-size: 1.02rem; } .tot-row.grand .tv { font-size: 1.5rem; font-weight: 700; }
.tot-row.due .tv { color: var(--signal-deep); }

/* ── Document header (invoice / estimate paper) ───────────────── */
.doc-paper { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 34px 38px; }
.doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 26px; border-bottom: 1px solid var(--border); margin-bottom: 26px; flex-wrap: wrap; }
.doc-head .dh-brand { display: flex; align-items: center; gap: 11px; }
.doc-head .dh-brand .wm { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; }
.doc-head .dh-right { text-align: right; }
.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-head .dh-no { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.doc-party { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px; }
.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; }
.doc-party .dp-name { font-weight: 700; font-size: 1.02rem; } .doc-party .dp-body { font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; margin-top: 3px; }

/* ── Tabs for record pages (reuse .page-tabs visual, scrollable) ─ */
.record-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.record-tabs::-webkit-scrollbar { display: none; }
.record-tab { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); padding: 11px 15px; border-bottom: 2px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; }
.record-tab:hover { color: var(--text); }
.record-tab.active { color: var(--ink); border-bottom-color: var(--signal); }
.record-tab .cnt { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-faint); margin-left: 5px; }

/* ── 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: #3B5BDB;
  --brand-light: #EA6A2C;
  --brand-gradient: linear-gradient(135deg, #3B5BDB, #EA6A2C);
  --brand-gradient-rev: linear-gradient(135deg, #EA6A2C, #3B5BDB);
  --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); }
