/* ============================================================
   MoveClerk Futuristic — logged-in app shell (2026-10-03)
   Dark theme for the app behind #app / #modal / #toast.

   Approach: styles.css is a light theme with ~60% of rules driven by
   semantic vars (--bg/--card/--ink/--muted/--brand/--line/--danger/--ok)
   and the rest hard-coded light colors. This file remaps the semantic
   vars to the --ft-* tokens INSIDE the app scope only (never touching
   the login screen, which its own stylesheet owns), then re-tints the
   hard-coded leftovers one component at a time.

   Rules of the road:
   - No orange. No external fonts/CDN/frameworks. System stack only.
   - Touch targets stay 48px+. Focus rings stay visible (futuristic.css).
   - Text contrast: body >= 4.5:1, secondary no dimmer than --ft-muted.
   - The job card's "mission brief" structure is NEVER restructured
     here — only re-tinted through its existing vars/classes.
   ============================================================ */

/* ---------- 1. Theme foundation ---------- */

/* Page backdrop: ambient deep-space mesh over --ft-bg, fixed so it
   doesn't scroll with content. (Login screen covers this itself.) */
body {
  background: var(--ft-mesh), var(--ft-bg);
  background-attachment: fixed;
  color: var(--ft-ink);
}
/* iOS Safari ignores background-attachment: fixed — scroll instead on touch. */
@media (hover: none), (pointer: coarse) {
  body { background-attachment: scroll; }
}

/* Semantic var remap, scoped to the logged-in app only. Everything
   var-driven in styles.css (cards, rows, tables, muted text, brand
   accents, hairlines) flips to dark with zero per-component work. */
#app, #modal, #toast {
  color-scheme: dark; /* native controls (date pickers, scrollbars) go dark */
  --bg:    #060a14;                       /* page */
  --card:  #101a33;                       /* surfaces */
  --ink:   #ffffff;                       /* primary text */
  --muted: #c7d2e8;                       /* secondary text (sunlight-safe) */
  --brand: #4f8cff;                       /* accents */
  --brand-dark: #8ab4ff;                  /* brand text on dark surfaces */
  --navy:  #a8c4ff;
  --danger: #f87171;
  --line:  rgba(148, 178, 255, 0.14);     /* hairlines */
  --ok:    #34d399;
  --radius: 18px;
  --brand-soft: rgba(79, 140, 255, 0.14);
  --grad-brand: linear-gradient(160deg, #0a142e 0%, #16295c 100%);
  --grad-btn: var(--ft-grad);
  --shadow-card: 0 10px 34px rgba(2, 6, 18, 0.55);
  --ease-tap: 0.15s ease;
  /* styles.css features use these three vars with light fallbacks but
     never defines them — define them here so they go dark too. */
  --border: rgba(148, 178, 255, 0.14);
  --bg-soft: rgba(148, 178, 255, 0.05);
  --primary: #4f8cff;
  /* Smart Forms alt-surface (recent forms + prefilled templates cards). */
  --card-alt: rgba(148, 178, 255, 0.07);
}

/* ---------- 2. App header: dark glass, brand presence ---------- */

#app .topbar {
  background: linear-gradient(180deg, rgba(13, 22, 48, 0.88), rgba(6, 10, 20, 0.78));
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
  border-bottom: 1px solid var(--ft-line);
  box-shadow: 0 4px 24px rgba(2, 6, 18, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--ft-ink);
}
#app #brand {
  color: var(--ft-ink);
  text-shadow: 0 0 18px rgba(79, 140, 255, 0.35);
}
#app .user-badge {
  color: var(--ft-ink);
  background: rgba(148, 178, 255, 0.1);
  border: 1px solid var(--ft-line);
}
#app .bell-btn { color: var(--ft-ink); }
#app .bell-btn:active { background: rgba(148, 178, 255, 0.14); }
#app .theme-cycle-btn { color: var(--ft-ink); }
#app .theme-cycle-btn:active { background: rgba(148, 178, 255, 0.14); }
#app .badge {
  background: var(--ft-danger);
  color: #060a14; /* dark text on coral: ~7:1, readable at tiny sizes */
  box-shadow: 0 0 0 2px #0a142e;
}

/* ---------- 3. Tab bar: dark glass, glowing active tab ---------- */

#app .tabbar {
  background: rgba(6, 10, 20, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border-top: 1px solid var(--ft-line);
  box-shadow: 0 -8px 28px rgba(2, 6, 18, 0.5);
}
#app .tab-btn { color: var(--ft-muted); }
#app .tab-btn .tab-ic { filter: drop-shadow(0 0 6px transparent); }
#app .tab-btn.active {
  color: var(--ft-cyan);
  background: linear-gradient(180deg, rgba(56, 225, 255, 0.14), rgba(79, 140, 255, 0.07));
  box-shadow: inset 0 2px 0 var(--ft-cyan), 0 0 18px rgba(56, 225, 255, 0.14);
  text-shadow: 0 0 12px rgba(56, 225, 255, 0.45);
}
#app .tab-btn.active .tab-ic { filter: drop-shadow(0 0 6px rgba(56, 225, 255, 0.6)); }

/* ---------- 4. Buttons ---------- */

#app .btn {
  background: rgba(148, 178, 255, 0.07);
  border: 2px solid var(--ft-line);
  color: var(--ft-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
#app .btn:not(.primary):not(.danger):not(:disabled):active {
  background: rgba(148, 178, 255, 0.14);
  transform: scale(0.98);
}
#app .btn.primary {
  background: var(--ft-grad);
  border-color: transparent;
  color: var(--ft-ink-on-grad); /* Bug sweep #24: white on the brand gradient fails AA (3.22:1 blue / 1.57:1 cyan) */
  box-shadow: var(--ft-glow-btn), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  text-shadow: 0 1px 2px rgba(6, 10, 20, 0.35);
}
#app .btn.primary:active { filter: brightness(1.08); transform: scale(0.98); }
#app .btn.danger {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
} /* white on #dc2626 ~4.8:1, on #b91c1c ~5.9:1 — AA pass (2026-10-03) */
#app .link-btn, #app .btn-link { color: var(--ft-cyan); }
#app .btn:disabled { opacity: 0.45; }

/* The modal lives OUTSIDE #app, so the dark #app .btn rules never reach it —
 * without these, a plain .btn falls back to styles.css (white background +
 * near-white --ink text = unreadable, reported 2026-10-04). Mirror the dark
 * button treatment for every modal button. */
#modal .btn {
  background: rgba(148, 178, 255, 0.07);
  border: 2px solid var(--ft-line);
  color: var(--ft-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
#modal .btn:not(.primary):not(.danger):not(:disabled):active {
  background: rgba(148, 178, 255, 0.14);
  transform: scale(0.98);
}
#modal .btn.primary {
  background: var(--ft-grad);
  border-color: transparent;
  color: var(--ft-ink-on-grad);
  box-shadow: var(--ft-glow-btn), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  text-shadow: 0 1px 2px rgba(6, 10, 20, 0.35);
}
#modal .btn.primary:active { filter: brightness(1.08); transform: scale(0.98); }
#modal .btn.danger {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
#modal .link-btn, #modal .btn-link { color: var(--ft-cyan); }
#modal .btn:disabled { opacity: 0.45; }

/* ---------- 5. Cards & lists ---------- */

#app .card, #app .lead-card {
  background: var(--ft-card);
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  box-shadow: var(--ft-hi), 0 10px 34px rgba(2, 6, 18, 0.5);
}
#app .card h3, #app .lead-card h3 { color: var(--ft-ink); }
#app .more-list { border-radius: var(--ft-radius); }
#app .more-row .chev, #app .attn-row .chev { color: var(--ft-cyan); }
#app .more-section-label {
  color: var(--ft-cyan);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
}
#app button.home-card::after { color: var(--ft-cyan); }

/* Tab titles: cyan gradient underline */
#app .tab h2::after { background: var(--ft-grad); }

/* Empty states: dark dashed cards, calm */
#app .empty-note {
  border: 2px dashed rgba(148, 178, 255, 0.28);
  background: rgba(16, 26, 51, 0.55);
  color: var(--ft-muted);
}
#app .empty-note::before { color: var(--ft-faint); }

/* "At a glance" snapshot tiles */
#app .snapshot-row div {
  background: rgba(148, 178, 255, 0.06);
  border: 1px solid var(--ft-line);
}
#app .snapshot-row strong { color: var(--ft-ink); }
#app .snapshot-row span { color: var(--ft-muted); }

/* Home dashboard (2026-10-09): operational at-a-glance widgets */
/* Restyle (2026-10-11, Brian: "all the outlines, it's all done bad"):
   dash cards carry themselves on soft shadow + surface lift — the 1px
   outline border is gone entirely. The 3px accent edges stay: they are
   brand accents, not outlines. */
#app .dash-card {
  text-align: left; width: 100%; margin-bottom: 10px;
  border: 0;
  box-shadow: 0 12px 30px rgba(15, 35, 80, 0.10), 0 2px 6px rgba(15, 35, 80, 0.05);
}
#app .dash-hero { border-left: 3px solid var(--ft-cyan); }
#app .dash-warn { border-left: 3px solid #f59e0b; }
/* Hero: the dot texture read as a broken dotted bar on phones — removed.
   Clean gradient, crisp text. */
#app .home-hero::before { display: none; }
/* The fixed help + assistant buttons sit bottom-right over content — keep
   the last dashboard row readable instead of sliding under them. */
#app #tab-home { padding-bottom: 150px; }
#app .dash-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ft-muted); margin-bottom: 4px;
}
#app .dash-big {
  font-size: 28px; font-weight: 800; color: var(--ft-ink);
  line-height: 1.1; margin-bottom: 4px;
}
#app .dash-list { margin-top: 6px; }
#app .dash-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 3px 0; font-size: 14px;
}
#app .dash-row2, #app .dash-row3 {
  display: grid; gap: 10px; margin-bottom: 0;
}
#app .dash-row2 { grid-template-columns: 1fr 1fr; }
#app .dash-row3 { grid-template-columns: 1fr 1fr 1fr; }
#app .dash-row2 .dash-card, #app .dash-row3 .dash-card { margin-bottom: 10px; }
#app .dash-row3 .dash-big { font-size: 22px; }
#app button.dash-tap { cursor: pointer; }
#app button.dash-tap:active { transform: scale(0.99); }
/* Office home (2026-10-10, A2): header-only tap targets inside div cards,
   and the phone-lookup shipper result blocks. */
#app .dash-headtap {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit;
  background: none; border: none; padding: 0; cursor: pointer;
}
#app .dash-headtap .dash-label, #app .dash-headtap .dash-big { display: block; }
#app .office-shipper {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit;
  margin-top: 8px; padding: 10px 12px; cursor: pointer;
  background: rgba(148, 178, 255, 0.06);
  border: 1px solid var(--ft-line); border-radius: 10px;
}
#app .office-shipper:active { transform: scale(0.99); }

/* Pills, tags, badges */
#app .lead-tag { background: rgba(79, 140, 255, 0.18); color: #a8c4ff; }
#app .sample-badge { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }
#app .count { background: rgba(148, 178, 255, 0.1); color: var(--ft-muted); }
#app .inbox-job-chip { background: var(--brand-soft); color: #8ab4ff; }
#app .inbox-unread { background: var(--ft-cyan); box-shadow: 0 0 8px rgba(56, 225, 255, 0.7); }
#app .notif-card.unread {
  background: rgba(79, 140, 255, 0.12);
  border: 1.5px solid rgba(79, 140, 255, 0.45);
}

/* Home hero + slideshow: keep the navy drama, sharpen with ft tokens */
#app .home-hero {
  background:
    radial-gradient(420px 200px at 88% 0%, rgba(56, 225, 255, 0.16), transparent 60%),
    radial-gradient(320px 320px at 4% 100%, rgba(79, 140, 255, 0.35), transparent 65%),
    linear-gradient(155deg, #0a142e 0%, #1a3a8f 100%);
  border: 1px solid var(--ft-line);
  box-shadow: var(--ft-hi), 0 14px 34px rgba(2, 6, 18, 0.5);
}
#app .home-eyebrow { color: var(--ft-cyan); }
#app .slideshow { border: 1px solid var(--ft-line); }
#app button.slide {
  background:
    radial-gradient(480px 220px at 85% 0%, rgba(56, 225, 255, 0.14), transparent 60%),
    linear-gradient(160deg, #0a142e 0%, #1a3a8f 100%);
}

/* Manual sections, quote rows, calculator display */
#app .manual-sec { border-top: 1px solid var(--ft-line); }
#app .q-row { border-bottom: 1px solid var(--ft-line); }
#app .calc-display {
  background: var(--ft-bg);
  border: 1px solid var(--ft-line);
  color: var(--ft-ink);
}

/* Feature-2/3 status chips (job card interiors) */
#app .f2-chip.f2-ok { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }
#app .f2-chip.f2-pending { background: rgba(148, 178, 255, 0.1); color: var(--ft-muted); }
#app .label-pill.before { background: rgba(79, 140, 255, 0.18); color: #a8c4ff; }
#app .label-pill.doc-type-pill { background: rgba(167, 139, 250, 0.16); color: #c4b5fd; }
#app .f2-casual-line { color: var(--ft-muted); }
#app .f3-fulfilled { color: var(--ft-ok); }
#app .label-pill.after { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }

/* ---------- 6. JOB CARD — re-tint only. Structure untouched. ----------
   The mission-brief markup (ribbon, journey timeline, zones, menu rows)
   stays exactly as built; these rules only adapt its colors for dark. */

#app .job-card {
  background: var(--ft-card);
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  box-shadow: var(--ft-hi), 0 10px 34px rgba(2, 6, 18, 0.5);
}
/* Status accents, brightened for dark (amber replaces orange) */
#app .job-st-scheduled  { --job-accent: #6ea8ff; }
#app .job-st-en_route   { --job-accent: #38e1ff; }
#app .job-st-in_progress { --job-accent: #fbbf24; }
#app .job-st-done        { --job-accent: #34d399; }
#app .job-st-cancelled   { --job-accent: #8a94ad; }
/* Journey dots: pending stages sit on a dark disk; done/current
   stages glow in the status accent. */
#app .j-dot {
  background: var(--ft-bg-2);
  border-color: var(--ft-line);
  color: var(--ft-muted);
}
/* Completed stages carry a bright ✓ — dark glyphs on the brightened
   accents keep the mark readable (~7-13:1). */
#app .j-stage.j-done .j-dot { color: #060a14; }
/* Zone toggles + menu rows: quiet cyan press states */
#app .job-zone { border-top: 1px solid var(--ft-line); }
#app .job-zone-toggle:active { background: rgba(56, 225, 255, 0.07); }
#app .zone-row { border-bottom: 1px solid var(--ft-line-soft); }
#app .zone-row:active { background: rgba(56, 225, 255, 0.07); }
#app .zone-row-chev { color: var(--ft-muted); }
#app .zone-row.primary .zone-row-chev { color: var(--ft-cyan); }
#app .job-card .job-sec { border-bottom: 1px solid var(--ft-line-soft); }
/* Primary money button: brand gradient + glow */
#app .job-go .btn {
  background: var(--ft-grad);
  color: var(--ft-ink-on-grad); /* Bug sweep #24: near-white on the gradient fails AA */
  box-shadow: var(--ft-glow-btn), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  text-shadow: 0 1px 2px rgba(6, 10, 20, 0.35);
}
#app .job-go .btn:active { filter: brightness(1.08); }

/* ---------- 7. Calendar (dark-adapted capacity colors) ---------- */

#app .cal-day.cap-open    { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; }
#app .cal-day.cap-filling { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }
#app .cal-day.cap-full    { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
#app .cal-day.today {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.45);
} /* white on #2563eb ~5.2:1, on #1d4ed8 ~6.3:1 — AA pass (2026-10-03) */
#app .cal-day.today.cap-open    { box-shadow: inset 0 0 0 3px #34d399; }
#app .cal-day.today.cap-filling { box-shadow: inset 0 0 0 3px #fbbf24; }
#app .cal-day.today.cap-full    { box-shadow: inset 0 0 0 3px #f87171; }
#app .cal-day.other { color: var(--ft-faint); }
#app .cal-day .dot { background: var(--ft-cyan); }
#app .cal-legend .sw.cap-open    { background: rgba(52, 211, 153, 0.2);  border: 1px solid #34d399; }
#app .cal-legend .sw.cap-filling { background: rgba(251, 191, 36, 0.2);  border: 1px solid #fbbf24; }
#app .cal-legend .sw.cap-full    { background: rgba(248, 113, 113, 0.2); border: 1px solid #f87171; }

/* ---------- 8. Modals, toasts, overlays ---------- */

#modal { background: rgba(3, 6, 14, 0.68); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#modal .modal-card {
  /* Conformance (2026-11-15): the modal card wears the wrap token,
     as the approved markup's expense-form face draws it. */
  background: #0b1226;
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid var(--ft-line);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--ft-hi), 0 24px 70px rgba(0, 0, 0, 0.6);
}
@media (min-width: 640px) {
  #modal .modal-card { border-radius: 20px; }
}
#toast {
  background: #0b1226;
  color: var(--ft-ink);
  border: 1px solid var(--ft-line);
  border-left: 3px solid var(--ft-cyan);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 18px rgba(56, 225, 255, 0.12);
}

/* ---------- 9. Forms & inputs ---------- */

#app input, #app select, #app textarea,
#modal input, #modal select, #modal textarea {
  background: var(--ft-bg-2);
  border: 1.5px solid var(--ft-line);
  color: var(--ft-ink);
}
#app input:hover, #app select:hover, #app textarea:hover,
#modal input:hover, #modal select:hover, #modal textarea:hover {
  border-color: rgba(148, 178, 255, 0.38);
}
#app input:focus, #app select:focus, #app textarea:focus,
#modal input:focus, #modal select:focus, #modal textarea:focus {
  border-color: var(--ft-cyan);
  box-shadow: 0 0 0 3px rgba(56, 225, 255, 0.18), 0 0 14px rgba(56, 225, 255, 0.1);
}
#app ::placeholder, #modal ::placeholder { color: var(--ft-muted); opacity: 1; }
#app .req, #modal .req { color: var(--ft-danger); }
#app .error, #modal .error { color: var(--ft-danger); }
#app .notice, #modal .notice { color: var(--ft-ok); }
#app .pw-toggle, #modal .pw-toggle { color: var(--ft-cyan); }
#app input[type="range"], #modal input[type="range"] { accent-color: var(--ft-cyan); }

/* Signature pad stays paper-white: dark ink must read on it. */
#modal .sig-pad { background: #fff; }

/* Docs tab filter pills */
#app .photo-label-btn.selected {
  border-color: var(--ft-cyan);
  background: rgba(56, 225, 255, 0.12);
  color: var(--ft-ink);
  box-shadow: 0 0 12px rgba(56, 225, 255, 0.15);
}

/* Email address cards */
#app .f9-addr {
  background: var(--ft-bg);
  border: 1px dashed var(--ft-line);
  color: var(--ft-ink);
}
#app .er-cat td { background: rgba(148, 178, 255, 0.06); }

/* ---------- 10. AI assistant panel ---------- */

#app .assistant-fab {
  background: var(--ft-grad);
  color: var(--ft-ink-on-grad); /* Bug sweep #24: glyph on the gradient needs dark ink for AA */
  box-shadow: var(--ft-glow-btn), 0 6px 20px rgba(6, 10, 20, 0.5);
}
#app .assistant-panel {
  background: var(--ft-glass-hi);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--ft-line);
  box-shadow: var(--ft-hi), 0 18px 54px rgba(0, 0, 0, 0.6);
}
#app .assistant-head {
  background: linear-gradient(135deg, #0a142e, #16295c);
  border-bottom: 1px solid var(--ft-line);
  color: var(--ft-ink);
}
/* Keep the panel's close button chromeless (its own rule loses to
   #app .btn on specificity), just re-tinted for dark. */
#app .assistant-head .btn.icon {
  background: transparent; border: none; box-shadow: none; color: var(--ft-ink);
}
#app .assistant-head .btn.icon:active { background: rgba(148, 178, 255, 0.14); }
#app .assistant-sub { color: var(--ft-muted); opacity: 1; }
#app .assistant-messages { background: rgba(6, 10, 20, 0.35); }
#app .assistant-msg.from-user {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
} /* AA pass, matches calendar today (2026-10-03) */
#app .assistant-msg.from-ai {
  background: var(--ft-bg-2);
  border: 1px solid var(--ft-line);
  color: var(--ft-ink);
}
#app .assistant-input-row, #app .assistant-chips, #app .assistant-boundary {
  background: rgba(6, 10, 20, 0.35);
  border-top: 1px solid var(--ft-line);
}
#app .assistant-chip {
  background: rgba(148, 178, 255, 0.07);
  border: 1px solid var(--ft-line);
  color: var(--ft-ink);
}
#app .assistant-boundary a { color: var(--ft-cyan); }
#app .assistant-mic-listening { outline: 2px solid var(--ft-cyan); }
#app .assistant-doc-sheet {
  background: var(--ft-glass-hi);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--ft-line);
}

/* ---------- 11. Banners ---------- */

#app .offline-banner {
  background: rgba(251, 191, 36, 0.1);
  border-bottom: 2px solid var(--ft-warn);
  color: var(--ft-ink);
}
#app .offline-queue-panel { border-top: 1px solid var(--ft-line); }
#demo-banner {
  background: linear-gradient(180deg, #0a142e, #060a14);
  border-bottom: 1px solid var(--ft-line);
  color: var(--ft-ink);
}
#demo-banner .demo-cta {
  background: var(--ft-grad);
  color: var(--ft-ink-on-grad); /* Bug sweep #24: light ink on the gradient fails AA */
  box-shadow: var(--ft-glow-btn);
}

/* ---------- Demo guided tour overlay (2026-10-09) ---------- */
#demo-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 8, 18, 0.72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px 32px;
}
.demo-tour-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #0d1830, #080d1a);
  border: 1px solid var(--ft-line);
  border-radius: 16px;
  padding: 24px 20px 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}
.demo-tour-card h2 {
  margin: 0 0 8px;
  font-size: 19px;
  color: var(--ft-ink);
}
.demo-tour-card p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ft-muted);
}
.demo-tour-x {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--ft-muted);
  font-size: 18px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
.demo-tour-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.demo-tour-nav .btn { min-height: 48px; }
.demo-tour-dots { display: flex; gap: 6px; }
.demo-tour-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 178, 255, 0.25);
}
.demo-tour-dots i.on { background: var(--ft-cyan); }
.demo-tour-skip {
  display: block;
  margin: 12px auto 0;
  background: none;
  border: none;
  color: var(--ft-muted);
  font-size: 14px;
  text-decoration: underline;
  min-height: 44px;
  cursor: pointer;
}
/* Spotlight ring on the highlighted home card */
.demo-tour-spot {
  position: relative;
  z-index: 10000;
  outline: 3px solid var(--ft-cyan) !important;
  outline-offset: 4px;
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(56, 225, 255, 0.45) !important;
}

/* ---------- 12. Desktop hover polish (mouse only) ---------- */

@media (hover: hover) {
  #app .btn.primary:hover { filter: brightness(1.07); }
  #app .btn:not(.primary):not(.danger):not(:disabled):hover {
    background: rgba(148, 178, 255, 0.12);
    border-color: rgba(148, 178, 255, 0.35);
  }
  #app .tab-btn:hover { color: var(--ft-cyan); background: rgba(56, 225, 255, 0.06); }
  #app button.home-card:hover {
    border-color: rgba(56, 225, 255, 0.35);
    box-shadow: var(--ft-hi), 0 14px 40px rgba(2, 6, 18, 0.55), 0 0 20px rgba(79, 140, 255, 0.12);
  }
  #app .more-row:hover, #app .attn-row:hover { background: rgba(148, 178, 255, 0.05); }
  #app .zone-row:hover { background: rgba(148, 178, 255, 0.04); }
}

/* ---------- 13. Print: reports must stay black on white ----------
   The existing print rules in styles.css hide chrome and force report
   tables to #000 on #fff; this resets my dark vars so no dark surface
   leaks into a printed timesheet or expense report. */
@media print {
  /* Bug sweep #63: components are styled with the --ft-* tokens, so the
     print reset must target THOSE names — the --card/--ink reset below never
     reached .card (var(--ft-card)) or body (var(--ft-mesh), var(--ft-bg)),
     and with background graphics enabled a printed report came out black
     text on dark navy. */
  :root {
    --ft-bg: #fff; --ft-bg-2: #fff; --ft-card: #fff;
    --ft-glass: #fff; --ft-glass-hi: #fff;
    --ft-ink: #000; --ft-muted: #333; --ft-faint: #555;
    --ft-line: #000; --ft-line-soft: #ccc;
  }
  body { background: #fff !important; }
  #app, #modal, #toast {
    --bg: #fff; --card: #fff; --ink: #000; --muted: #333;
    --brand: #1d4ed8; --brand-dark: #1e40af; --navy: #0c1f44;
    --danger: #dc2626; --line: #000; --ok: #15803d;
    --border: #000; --bg-soft: #fff; --primary: #1d4ed8;
  }
  #app .btn.primary, #app .job-go .btn, #demo-banner .demo-cta,
  #app .cal-day.today, #app .assistant-fab {
    background: #fff !important; color: #000 !important;
    box-shadow: none !important; text-shadow: none !important;
    border: 1px solid #000 !important;
  }
  #app input, #app select, #app textarea { background: #fff !important; color: #000 !important; }
  #app .home-hero, #app .slideshow, #app .assistant-fab, #app .assistant-panel {
    display: none !important;
  }
  #app .cal-day.cap-open, #app .cal-day.cap-filling, #app .cal-day.cap-full {
    background: #fff !important; color: #000 !important;
  }
}

/* ---------- Splash screen: animated logo on app load (2026-10-08) ---------- */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; background: #0c2f5e;
  transition: opacity 0.45s ease;
}
#splash.done { opacity: 0; pointer-events: none; }
#splash .splash-logo {
  width: 104px; height: 104px; border-radius: 28px;
  position: relative; overflow: hidden;
  box-shadow: 0 0 60px rgba(120, 170, 255, 0.5), 0 18px 50px rgba(0, 0, 0, 0.4);
  opacity: 0;
  animation: splash-reveal 3.2s ease both, splash-flash 3.2s ease 0.3s 1;
}
@keyframes splash-reveal {
  0% { opacity: 0; transform: scale(0.92); }
  25% { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}
#splash .splash-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
#splash .splash-logo::after,
#splash .splash-logo .trail {
  content: ""; position: absolute; top: -25%; bottom: -25%; left: -30%;
  width: 12px; transform: skewX(-16deg); opacity: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(140, 225, 255, 0.55) 28%, #eafcff 50%, rgba(140, 225, 255, 0.55) 72%, transparent 100%);
  filter: blur(5px); mix-blend-mode: screen;
}
#splash .splash-logo .t1 { animation: splash-trail 1.2s cubic-bezier(0.5, 0, 0.3, 1) 0.3s 2 both; }
#splash .splash-logo .t2 { width: 7px; animation: splash-trail 1.4s cubic-bezier(0.5, 0, 0.3, 1) 0.7s 2 both; }
#splash .splash-logo .t3 { width: 18px; animation: splash-trail 1.1s cubic-bezier(0.5, 0, 0.3, 1) 1.1s 2 both; }
#splash .splash-logo { animation: splash-reveal 3.2s ease both, splash-flash 3.2s ease 0.3s 1; }
@keyframes splash-trail {
  0% { left: -30%; opacity: 0; }
  18% { opacity: 1; }
  72% { opacity: 1; }
  100% { left: 115%; opacity: 0; }
}
@keyframes splash-flash {
  0%, 100% { filter: brightness(1); }
  20%, 65% { filter: brightness(1.35) drop-shadow(0 0 22px rgba(120, 210, 255, 0.8)); }
}
#splash .splash-name {
  color: #fff; font-size: 30px; font-weight: 800; letter-spacing: -0.5px;
  animation: splash-rise 0.7s ease 0.25s both;
}
#splash .splash-name span {
  background: linear-gradient(90deg, #4f8cff, #38e1ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
#splash .splash-tag {
  color: rgba(255, 255, 255, 0.65); font-size: 14px;
  animation: splash-rise 0.7s ease 0.4s both;
}
@keyframes splash-rise {
  0% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #splash .splash-logo, #splash .splash-logo .trail, #splash .splash-name, #splash .splash-tag { animation: none; }
  #splash .splash-logo { opacity: 1; }
  #splash { transition: none; }
}

/* Sunlight readability scale (2026-10-09): app.js sets --sun 0..1 from the
   phone's ambient light sensor. Bright sun lightens the dark theme up —
   lifting surfaces and brightening text — so it stays readable in the field.
   Same selector as the base vars above, later in the file wins. */
#app, #modal, #toast {
  --ink: color-mix(in srgb, #ffffff calc((1 - var(--sun, 0)) * 100%), #fff);
  --bg: color-mix(in srgb, #060a14 calc((1 - var(--sun, 0)) * 100%), #1b2740);
  --card: color-mix(in srgb, #101a33 calc((1 - var(--sun, 0)) * 100%), #27395c);
  --muted: color-mix(in srgb, #c7d2e8 calc((1 - var(--sun, 0)) * 100%), #e2e9f8);
  --line: color-mix(in srgb, rgba(148,178,255,.14) calc((1 - var(--sun, 0)) * 100%), rgba(190,208,245,.45));
}

/* ============================================================
   Home design integration (2026-10-18): the ratified Home design
   (frozen mock home-page-design-mock) fitted into the live Home
   tab. Family tokens are scoped to #tab-home ONLY — the live
   site's frame, tab system, and other tabs are untouched.
   ============================================================ */
#app #tab-home {
  --bg:#0b1226;
  --surface:#101a33;
  --surface-2:#14203e;
  --line:rgba(148,178,255,.14);
  --line-strong:#2e4a73;
  --teal:#38e1ff;
  --teal-soft:rgba(56,225,255,.12);
  --amber:#fbbf24;
  --red:#f87171;
  --green:#34d399;
  --radius:18px;
  color-scheme:dark;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
/* Home conformance (2026-11-15): the same family tokens now scope to
   every inside tab — Loads, load detail, Finance, Trucks, Documents
   and the papers face all render in Home's grammar (Revision 2
   palette: accent #38e1ff, surfaces/lines per the template tokens).
   Inbox (#tab-inbox) and Setup (#tab-more) keep their own blocks
   below, carrying the same values. */
#app #tab-loads, #app #tab-loaddetail, #app #tab-money, #app #tab-trucks, #app #tab-documents {
  --bg:#0b1226;
  --surface:#101a33;
  --surface-2:#14203e;
  --line:rgba(148,178,255,.14);
  --line-strong:#2e4a73;
  --teal:#38e1ff;
  --teal-soft:rgba(56,225,255,.12);
  --amber:#fbbf24;
  --red:#f87171;
  --green:#34d399;
  --radius:18px;
  color-scheme:dark;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
#app .hm-wrap { background:var(--bg); border:1px solid var(--line); border-radius:var(--radius); padding:16px 14px 18px; color:#eef3fb; }
#app .hm-wrap * { box-sizing:border-box; }
#app .hm-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; }
/* D1 (correction round): the frozen mock's Home geometry — the first two
   cards (Today's loads, Unpaid rate cons) and the Finance/Expenses cards
   run FULL WIDTH; only the middle four ride as tile PAIRS, at phone and
   tablet alike. The old 4-across tablet grid squeezed every tile until
   titles truncated and the still-owed figure wrapped mid-number. */
#app .hm-tile.hm-wide { grid-column:1 / -1; }
#app .hm-pair .hm-tile-top { flex-direction:column; align-items:flex-start; gap:6px; }
#app .hm-pair .hm-icon { width:30px; height:30px; border-radius:8px; font-size:15px; }
#app .hm-money-tile .hm-big { white-space:nowrap; overflow-wrap:normal; word-break:normal; }
#app .hm-tile {
  background:linear-gradient(180deg,var(--surface-2),var(--surface));
  border:1px solid var(--line); border-radius:var(--radius);
  padding:16px 14px 14px; min-height:148px; display:flex; flex-direction:column;
  text-align:left; width:100%; min-width:0; color:#eef3fb; font:inherit; cursor:pointer;
}
#app .hm-tile:hover, #app .hm-half:hover { border-color:var(--teal); }
#app .hm-tile-split { padding:0; flex-direction:row; overflow:hidden; position:relative; cursor:default; }
#app .hm-tile-split::after { content:""; position:absolute; left:50%; top:0; bottom:0; width:2px; margin-left:-1px; background:var(--teal); opacity:.55; pointer-events:none; }
#app .hm-half {
  flex:1; min-width:0; display:flex; flex-direction:column; text-align:left;
  padding:16px 12px 14px; background:transparent; border:0; color:#eef3fb; font:inherit; cursor:pointer;
}
#app .hm-half:hover { background:rgba(56,225,255,.06); }
#app .hm-half .hm-big { font-size:26px; }
#app .hm-tile-top { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
#app .hm-tile-label { font-size:12px; letter-spacing:.07em; text-transform:uppercase; font-weight:700; color:#a9b6d3; min-width:0; white-space:nowrap; overflow-wrap:normal; word-break:normal; }
#app .hm-icon { width:36px; height:36px; border-radius:10px; display:grid; place-items:center; background:var(--teal-soft); color:var(--teal); flex:none; font-size:17px; }
#app .hm-icon.amber { background:rgba(251,191,36,.12); color:var(--amber); }
/* Numbers rule (2026-11-15): the "green" icon chip is a badge, not a
   money number — it wears the accent cyan like every other chip. */
#app .hm-icon.green { background:var(--teal-soft); color:var(--teal); }
#app .hm-big { font-size:30px; line-height:1.05; font-weight:800; letter-spacing:-.03em; margin-top:12px; overflow-wrap:anywhere; }
#app .hm-big small { font-size:14px; font-weight:700; color:#a9b6d3; }
#app .hm-sub { margin-top:6px; color:#a9b6d3; font-size:13.5px; line-height:1.4; overflow-wrap:anywhere; }
#app .hm-sub b { color:#eef3fb; font-weight:650; }
#app .hm-open { margin-top:auto; padding-top:10px; font-size:12.5px; font-weight:700; color:var(--teal); }
#app .hm-money-row { display:flex; gap:14px; margin-top:12px; flex-wrap:wrap; }
#app .hm-money-row span { font-size:13px; color:#a9b6d3; min-width:0; }
#app .hm-money-row b { display:block; font-size:17px; color:#eef3fb; margin-top:2px; white-space:nowrap; }
#app .hm-money-row b.in { color:var(--green); }
#app .hm-money-row b.out { color:var(--red); }
#app .hm-dots { display:flex; gap:5px; margin-top:10px; flex-wrap:wrap; }
#app .hm-dots i { width:8px; height:8px; border-radius:999px; background:var(--teal); display:block; }
#app .hm-dots i.off { background:#2a3f61; }

/* Compliance Forms strip */
#app .hm-strip { margin-top:16px; background:var(--surface); border:1px solid var(--line-strong); border-radius:var(--radius); padding:14px 16px 16px; }
#app .hm-strip-head { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
#app .hm-strip-name { display:inline-flex; align-items:center; gap:10px; font-size:16.5px; font-weight:800; letter-spacing:-.01em; color:#eef3fb; background:none; border:0; padding:4px 0; cursor:pointer; font-family:inherit; text-align:left; }
#app .hm-strip-name:hover { color:var(--teal); }
#app .hm-strip-all { font-size:13px; font-weight:700; color:var(--teal); white-space:nowrap; padding:8px 14px; border:1px solid var(--line-strong); border-radius:999px; background:var(--surface-2); cursor:pointer; font-family:inherit; }
#app .hm-strip-all:hover { border-color:var(--teal); }
#app .hm-strip-sub { margin:4px 0 12px; color:#a9b6d3; font-size:13.5px; line-height:1.45; }
#app .hm-strip-chips { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
@media (min-width:760px) { #app .hm-strip-chips { grid-template-columns:repeat(3,minmax(0,1fr)); } }
#app .hm-fchip { display:flex; flex-direction:column; gap:2px; text-align:left; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:11px 13px; width:100%; min-width:0; color:#eef3fb; font:inherit; cursor:pointer; }
#app .hm-fchip:hover { border-color:var(--teal); }
#app .hm-fchip b { font-size:14px; line-height:1.3; overflow-wrap:anywhere; }
#app .hm-fchip span { color:#a9b6d3; font-size:12.5px; line-height:1.35; }
#app .hm-fchip .go { color:var(--teal); font-weight:700; font-size:12.5px; margin-top:5px; }

/* The line */
#app .hm-divider { border:0; height:2px; background:linear-gradient(90deg,transparent,var(--teal) 18%,var(--teal) 82%,transparent); margin:22px 0 6px; opacity:.95; }
#app .hm-divider-cap { display:flex; align-items:center; gap:10px; margin:0 0 14px; }
#app .hm-divider-cap::before, #app .hm-divider-cap::after { content:""; height:1px; background:var(--line); flex:1; }
#app .hm-divider-cap span { font-size:11px; letter-spacing:.12em; text-transform:uppercase; font-weight:800; color:var(--teal); }

/* Front office */
#app .hm-section-head { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin:6px 0 12px; flex-wrap:wrap; }
#app .hm-section-head h2 { margin:0; font-size:19px; letter-spacing:-.01em; color:#eef3fb; }
#app .hm-section-head p { margin:0; color:#6f84a3; font-size:13px; }
#app .hm-house { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:15px 16px; display:flex; gap:12px; align-items:flex-start; }
#app .hm-house-badge { width:38px; height:38px; border-radius:999px; background:var(--teal-soft); color:var(--teal); display:grid; place-items:center; flex:none; font-size:19px; }
#app .hm-house h3 { margin:1px 0 3px; font-size:16px; color:#eef3fb; }
#app .hm-house p { margin:0; color:#a9b6d3; font-size:13.5px; line-height:1.45; }
#app .hm-panel { margin-top:12px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; }
#app .hm-panel input {
  width:100%; margin-top:8px; padding:12px; border-radius:12px; min-height:48px;
  background:var(--surface-2); border:1px solid var(--line-strong); color:#eef3fb; font:inherit;
}
#app .hm-panel .hm-big { font-size:22px; margin-top:2px; }
#app .hm-needs { margin-top:12px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
#app .hm-needs-head { padding:14px 16px 10px; display:flex; justify-content:space-between; align-items:center; gap:10px; }
#app .hm-needs-head strong { font-size:15px; color:#eef3fb; }
#app .hm-needs-head span { font-size:12px; font-weight:700; color:#0b1226; background:var(--amber); padding:3px 8px; border-radius:999px; white-space:nowrap; }
#app .hm-needs-head span.teal { background:var(--teal); }
#app .hm-door { display:flex; gap:12px; align-items:center; width:100%; text-align:left; padding:13px 16px; border:0; border-top:1px solid var(--line); background:transparent; color:#eef3fb; font:inherit; cursor:pointer; }
#app .hm-door:hover { background:var(--surface-2); }
#app .hm-door-dot { width:9px; height:9px; border-radius:999px; background:var(--amber); flex:none; }
#app .hm-door-dot.teal { background:var(--teal); }
#app .hm-door-main { flex:1; min-width:0; }
#app .hm-door-main b { display:block; font-size:14.5px; line-height:1.3; overflow-wrap:anywhere; }
#app .hm-door-main span { display:block; color:#a9b6d3; font-size:13px; margin-top:2px; line-height:1.35; overflow-wrap:anywhere; }
#app .hm-door-open { font-size:12.5px; font-weight:700; color:var(--teal); white-space:nowrap; }
#app .hm-door-note { padding:10px 16px 13px; color:#6f84a3; font-size:12.5px; line-height:1.45; margin:0; }
#app .hm-doors-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; margin-top:12px; }
#app .hm-quick { background:var(--surface-2); border:1px solid var(--line-strong); border-radius:var(--radius); padding:16px; display:flex; gap:12px; align-items:center; text-align:left; width:100%; min-width:0; color:#eef3fb; font:inherit; cursor:pointer; }
#app .hm-quick:hover { border-color:var(--teal); }
#app .hm-quick b { display:block; font-size:15.5px; }
#app .hm-quick span span, #app .hm-quick > span:last-child span { display:block; color:#a9b6d3; font-size:13px; margin-top:2px; line-height:1.4; }
#app .hm-quick .hm-icon { width:42px; height:42px; border-radius:12px; }

/* Folds — collapse protocol */
#app .hm-fold { margin-top:12px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
#app .hm-fold-btn { width:100%; display:flex; align-items:center; gap:10px; padding:15px 16px; text-align:left; flex-wrap:wrap; background:none; border:0; color:#eef3fb; font:inherit; cursor:pointer; min-height:48px; }
#app .hm-fold-btn strong { flex:1; font-size:15px; min-width:0; }
#app .hm-fold-count { font-size:12px; font-weight:700; background:#1a2c4a; border:1px solid var(--line); padding:3px 8px; border-radius:999px; color:#a9b6d3; white-space:nowrap; }
#app .hm-chev { color:#a9b6d3; transition:transform .18s; }
#app .hm-fold.open .hm-chev { transform:rotate(180deg); }
#app .hm-fold-body { display:none; border-top:1px solid var(--line); padding:6px 16px 14px; }
#app .hm-fold.open .hm-fold-body { display:block; }
#app .hm-fold-row { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px dashed #1e3355; font-size:14px; flex-wrap:wrap; }
#app .hm-fold-row:last-child { border:0; }
#app .hm-fold-row span { color:#a9b6d3; text-align:right; overflow-wrap:anywhere; }
#app .hm-chip { display:inline-block; font-size:11.5px; font-weight:700; padding:3px 9px; border-radius:999px; white-space:normal; overflow-wrap:anywhere; }
/* Numbers rule: word chips ("Paid", "Paid in full", "This device")
   are badges, not numbers — cyan. Green/red live on money figures. */
#app .hm-chip.ok { background:var(--teal-soft); color:var(--teal); }
#app .hm-chip.info { background:var(--teal-soft); color:var(--teal); }
#app .hm-chip.warn { background:rgba(251,191,36,.12); color:var(--amber); }
#app .hm-chip.mut { background:#1a2c4a; color:var(--muted, #a9b6d3); border:1px solid var(--line); }
#app .hm-fold-link { color:#a9b6d3; font-size:13px; font-weight:600; overflow-wrap:anywhere; min-width:0; }

/* Booking fold */
#app .hm-book-peek { position:relative; max-height:150px; overflow:hidden; border-top:1px solid var(--line); cursor:pointer; background:var(--surface-2); }
#app .hm-fold.open .hm-book-peek { display:none; }
#app .hm-mini-book { padding:14px 16px 0; }
#app .hm-mini-head { display:flex; justify-content:space-between; align-items:baseline; gap:10px; flex-wrap:wrap; }
#app .hm-mini-head b { font-size:17px; letter-spacing:-.01em; }
#app .hm-mini-head span { color:var(--teal); font-weight:700; font-size:13.5px; }
#app .hm-peek-fade { position:absolute; left:0; right:0; bottom:0; height:72px; background:linear-gradient(180deg,rgba(20,32,62,0),#14203e 80%); display:flex; align-items:flex-end; justify-content:center; padding:0 12px 8px; }
#app .hm-peek-fade span { font-size:12px; color:var(--teal); font-weight:700; text-align:center; }
#app .hm-field { margin-top:12px; }
#app .hm-field label { display:block; font-size:11.5px; letter-spacing:.06em; text-transform:uppercase; font-weight:700; color:#6f84a3; margin-bottom:5px; }
#app .hm-field div { border:1px solid var(--line); background:var(--surface-2); border-radius:12px; padding:11px 12px; font-size:14.5px; color:#a9b6d3; }
#app .hm-book-note { margin:8px 0 10px; color:#a9b6d3; font-size:13.5px; line-height:1.45; }
#app .hm-book-link-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:10px 12px; }
#app .hm-book-link-row code { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:13.5px; color:var(--teal); overflow-wrap:anywhere; flex:1; min-width:0; }
#app .hm-book-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
#app .hm-mini-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:9px 15px; border:1px solid var(--line-strong); border-radius:999px; font-weight:700; font-size:13.5px; color:#eef3fb; background:var(--surface); cursor:pointer; font-family:inherit; min-height:44px; text-decoration:none; }
#app .hm-mini-btn:hover { border-color:var(--teal); }
/* Primary = the picture's gloss blue gradient + glow (Rev 2). */
#app .hm-mini-btn.primary { background:var(--ft-grad); color:#06121f; border-color:transparent; box-shadow:0 6px 22px rgba(79,140,255,.38); }
/* Danger in name only: the Log out pill wears the blue scheme (navy
   border, white text) — red lives on money numbers only. */
#app .hm-mini-btn.danger { border-color:var(--line-strong); color:#eef3fb; background:var(--surface); }
#app .hm-mini-btn.wide { width:100%; min-height:52px; font-size:15px; margin-top:12px; }
#app .hm-mini-btn:disabled { opacity:.5; }

/* Office information */
#app .hm-office { margin-top:26px; background:#0c172b; border-top:2px solid var(--line-strong); border-radius:0 0 var(--radius) var(--radius); padding:11px 4px 4px; }
#app .hm-office-top { display:flex; align-items:center; gap:6px 12px; flex-wrap:wrap; }
#app .hm-office h2 { margin:0; font-size:11.5px; letter-spacing:.09em; text-transform:uppercase; color:#a9b6d3; }
#app .hm-office-name { font-size:15.5px; font-weight:800; letter-spacing:-.01em; margin:0; color:#eef3fb; overflow-wrap:anywhere; }
#app .hm-office-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:6px 22px; margin-top:7px; }
#app .hm-office-item { min-width:0; }
#app .hm-office-item label { display:block; font-size:10px; letter-spacing:.07em; text-transform:uppercase; font-weight:700; color:#6f84a3; margin-bottom:2px; }
#app .hm-office-item p { margin:0; font-size:12.5px; line-height:1.4; color:#dbe6f5; overflow-wrap:anywhere; }
#app .hm-ci-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px 16px; margin-top:10px; }
@media (max-width:560px) { #app .hm-ci-grid { grid-template-columns:minmax(0,1fr); } }
#app .hm-ci-grid .wide { grid-column:1/-1; }
#app .hm-ci-grid label { display:block; font-size:11px; letter-spacing:.06em; text-transform:uppercase; font-weight:700; color:#a9b6d3; margin-bottom:4px; }
#app .hm-ci-grid input {
  width:100%; padding:11px 12px; border-radius:12px; min-height:48px;
  background:var(--surface-2); border:1px solid var(--line-strong); color:#eef3fb; font:inherit;
}
@media (max-width:560px) {
  #app .hm-big { font-size:24px; }
  #app .hm-half .hm-big { font-size:21px; }
  #app .hm-tile { padding:12px 11px 12px; min-height:138px; }
  #app .hm-half { padding:12px 9px 12px; }
  #app .hm-wrap { padding:12px 10px 14px; }
}

/* ============================================================
   Home conformance additions (2026-11-15): the shared grammar
   pieces the other tabs' faces use — fold-row anatomy (fr-main /
   fr-side), button rows, the segmented control, the Loads view
   switch, real hm-fields, the load state chain, and the truck
   mark's chair. Values are the approved markup's own.
   ============================================================ */
#app .hm-fold-row .fr-main { flex:1 1 200px; min-width:0; text-align:left; }
#app .hm-fold-row .fr-main b { display:block; font-size:14.5px; line-height:1.3; overflow-wrap:anywhere; color:#eef3fb; font-weight:700; }
#app .hm-fold-row .fr-main span { display:block; color:#a9b6d3; font-size:13px; margin-top:2px; line-height:1.4; overflow-wrap:anywhere; text-align:left; }
#app .hm-fold-row .fr-side { color:#a9b6d3; text-align:right; font-size:14px; flex:none; }
#app .hm-fold-row .fr-side b { color:#eef3fb; }
#app button.hm-fold-row { width:100%; background:none; border:0; border-bottom:1px dashed #1e3355; font:inherit; color:inherit; cursor:pointer; text-align:left; align-items:center; }
#app button.hm-fold-row:last-child { border-bottom:0; }
#app button.hm-fold-row:hover .fr-main b { color:var(--teal); }
#app .mc-paper-photo { display:block; width:100%; height:auto; border-radius:10px; }
#app .mc-paper-back { margin:0 0 12px; }
/* The scanner (2026-11-15): live auto-snap view, corner editor,
   filter row, and the scan thumbnail on the filing proposal. The
   frame black and the flash white are theme constants (a camera
   surface and a shutter flash), as is the dark ink on the teal chip
   (--teal itself is the same in every theme). */
#app .mc-scan-stage { margin:12px 0 4px; }
#app .mc-scan-frame { position:relative; border-radius:12px; overflow:hidden; background:#000; aspect-ratio:4 / 3; }
#app .mc-scan-video { width:100%; height:100%; object-fit:cover; display:block; }
#app .mc-scan-overlay { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
#app .mc-scan-flash { position:absolute; inset:0; background:#fff; opacity:0; pointer-events:none; }
#app .mc-scan-flash.go { animation:mc-scan-flash .18s ease-out; }
@keyframes mc-scan-flash { 0% { opacity:.85; } 100% { opacity:0; } }
#app .mc-scan-status { min-height:20px; margin:8px 0 4px; text-align:center; }
#app .mc-scan-actions { display:grid; gap:8px; margin-top:6px; }
#app .mc-scan-actions .hm-mini-btn { min-height:48px; }
#app .mc-scan-editwrap { border-radius:12px; overflow:hidden; }
#app .mc-scan-edit { width:100%; height:auto; display:block; touch-action:none; }
#app .mc-scan-preview { width:100%; height:auto; display:block; border-radius:12px; border:1px solid var(--line); }
#app .mc-scan-filters { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
#app .mc-scan-chip.on { background:var(--teal); color:#06222e; border-color:var(--teal); }
#app .mc-scan-note { margin-top:8px; }
#app .mc-snap-thumb { width:100%; height:auto; display:block; border-radius:10px; border:1px solid var(--line); margin:8px 0; }
#app .btn-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
#app .btn-row .hm-mini-btn { flex:1 1 auto; }
#app .seg-row { display:flex; align-items:center; gap:10px; margin:16px 0 4px; flex-wrap:wrap; }
#app .seg-row > span:first-child { font-size:12px; letter-spacing:.07em; text-transform:uppercase; font-weight:700; color:#a9b6d3; }
#app .hm-seg { display:inline-flex; background:var(--surface); border:1px solid var(--line); border-radius:999px; padding:4px; gap:4px; flex-wrap:wrap; }
#app .hm-seg button { padding:8px 16px; border:0; border-radius:999px; font-size:13.5px; font-weight:700; color:#a9b6d3; white-space:nowrap; min-height:44px; background:none; cursor:pointer; font-family:inherit; }
#app .hm-seg button.on { background:var(--ft-grad); color:#06121f; }
#app .view-switch { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
#app .hm-field input, #app .hm-field select, #app .hm-field textarea {
  width:100%; padding:12px; border-radius:12px; min-height:48px;
  background:var(--surface-2); border:1px solid var(--line-strong); color:#eef3fb; font:inherit;
}
#app .hm-field textarea { min-height:72px; resize:vertical; }
#app .hm-field .req { color:var(--amber); }
/* The load state chain (load detail): done dots are the picture's
   blue #4f8cff, the current step is the accent — never green. */
#app .ld-state-chain { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; font-size:13px; color:#a9b6d3; align-items:center; }
#app .ld-state-chain .st { display:inline-flex; align-items:center; gap:6px; }
#app .ld-state-chain .st i { width:8px; height:8px; border-radius:999px; background:#2a3f61; display:block; }
#app .ld-state-chain .st.done { color:#eef3fb; }
#app .ld-state-chain .st.done i { background:#4f8cff; }
#app .ld-state-chain .st.now { color:#eef3fb; font-weight:700; }
#app .ld-state-chain .st.now i { background:var(--teal); }
/* The truck mark: the template's own glyph in its rounded-square
   chair (36px top bar / 44px front-door face), replacing the M logo
   image. Glyph path data is byte-identical to the template mock's. */
.logo-mark { width:36px; height:36px; border-radius:10px; flex:none; background:linear-gradient(150deg,#16295c,#0a142e); border:1px solid rgba(148,178,255,.14); display:inline-flex; align-items:center; justify-content:center; box-shadow:0 0 18px rgba(79,140,255,.35); }
.logo-mark svg { width:22px; height:22px; display:block; }
.logo-mark img { width:27px; height:27px; object-fit:contain; display:block; }
.logo-mark.fd-mark { width:44px; height:44px; border-radius:12px; }
.logo-mark.fd-mark svg { width:28px; height:28px; }

/* ============================================================
   Today design integration (2026-10-18): the widened brief
   (frozen mock today-page-design-mock) fitted into the live
   Today tab. Family tokens are scoped to #td-brief ONLY — the
   crew My Day view in the same section and every other tab
   keep the live frame untouched.
   ============================================================ */
#app #td-brief {
  --bg:#0b1226;
  --surface:#101a33;
  --surface-2:#14203e;
  --line:rgba(148,178,255,.14);
  --line-strong:#2e4a73;
  --teal:#38e1ff;
  --teal-soft:rgba(56,225,255,.12);
  --amber:#fbbf24;
  --red:#f87171;
  --green:#34d399;
  --radius:18px;
  color-scheme:dark;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
#app .td-wrap { background:var(--bg); border:1px solid var(--line); border-radius:var(--radius); padding:22px 18px 24px; color:#eef3fb; }
#app .td-wrap * { box-sizing:border-box; }
#app .td-mast { margin-bottom:20px; }
#app .td-h { margin:0; font-size:32px; font-weight:800; letter-spacing:-.02em; line-height:1.05; color:#eef3fb; }
#app .td-dateline { margin-top:6px; font-size:15px; font-weight:600; color:var(--teal); }
#app .td-dayline { margin:10px 0 0; font-size:15px; line-height:1.5; color:#9db0cc; max-width:62ch; }
#app .td-dayline strong { color:#eef3fb; font-weight:700; }
#app .td-sec { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); margin-bottom:16px; overflow:hidden; }
#app .td-head { width:100%; display:flex; align-items:center; gap:12px; padding:16px 18px; background:none; border:0; cursor:pointer; text-align:left; color:inherit; font:inherit; min-height:52px; }
#app .td-head:focus-visible { outline:2px solid var(--teal); outline-offset:-2px; }
#app .td-title { font-size:13px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; min-width:0; overflow-wrap:anywhere; }
#app .td-count { margin-left:auto; font-size:13px; font-weight:700; color:var(--teal); background:var(--teal-soft); border-radius:999px; padding:4px 11px; white-space:nowrap; }
#app .td-count.warn { color:var(--red); background:rgba(248,113,113,.12); }
#app .td-chev { flex:none; width:10px; height:10px; border-right:2px solid #9db0cc; border-bottom:2px solid #9db0cc; transform:rotate(-45deg); transition:transform .18s ease; }
#app .td-sec.open .td-chev { transform:rotate(45deg); }
#app .td-body { display:none; border-top:1px solid var(--line); }
#app .td-sec.open .td-body { display:block; }
#app .td-row { display:flex; align-items:center; gap:14px; width:100%; padding:14px 18px; background:none; border:0; border-bottom:1px solid var(--line); cursor:pointer; text-align:left; color:inherit; font:inherit; text-decoration:none; min-height:52px; }
#app .td-row:last-child { border-bottom:0; }
#app button.td-row:hover { background:var(--surface-2); }
#app .td-row:focus-visible { outline:2px solid var(--teal); outline-offset:-2px; }
#app .td-row.static { cursor:default; }
#app .td-row.static:hover { background:none; }
#app .td-main { flex:1 1 auto; min-width:0; display:block; }
#app .td-top { display:block; font-size:16px; font-weight:700; line-height:1.3; overflow-wrap:anywhere; }
#app .td-sub { display:block; margin-top:2px; font-size:13.5px; color:#9db0cc; line-height:1.4; overflow-wrap:anywhere; }
#app .td-side { flex:none; text-align:right; display:block; }
#app .td-side.stack { display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
#app .td-arrow { flex:none; color:#9db0cc; font-size:18px; line-height:1; }
#app .td-pill { display:inline-block; font-size:11.5px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; border-radius:999px; padding:4px 10px; white-space:nowrap; }
#app .td-pill.onsite { color:var(--teal); background:var(--teal-soft); }
#app .td-pill.upcoming { color:#9db0cc; background:var(--surface-2); border:1px solid var(--line-strong); }
#app .td-pill.done { color:#9db0cc; background:var(--surface-2); }
#app .td-pill.duetoday { color:var(--amber); background:rgba(251,191,36,.12); }
#app .td-pill.overdue { color:var(--red); background:rgba(248,113,113,.12); }
#app .td-pill.sent { color:var(--teal); background:var(--teal-soft); }
#app .td-pill.signed { color:var(--green); background:rgba(52,211,153,.12); }
#app .td-pill.waiting { color:var(--amber); background:rgba(251,191,36,.12); }
#app .td-pill.need { color:var(--red); background:rgba(248,113,113,.12); }
#app .td-pill.ready { color:#9db0cc; background:var(--surface-2); border:1px solid var(--line-strong); }
#app .td-amount { display:block; font-size:16px; font-weight:800; }
#app .td-note { display:block; font-size:12.5px; color:#9db0cc; margin-top:2px; }
#app .td-glabel { padding:14px 18px 2px; font-size:11.5px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; color:#6f84a3; }
#app .td-justin { font-size:11.5px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--teal); background:var(--teal-soft); border-radius:999px; padding:4px 10px; white-space:nowrap; flex:none; }
#app .td-justin[hidden] { display:none; }
#app .td-dot { flex:none; width:11px; height:11px; border-radius:50%; background:var(--green); box-shadow:0 0 0 4px rgba(52,211,153,.22); }
#app .td-dot.off { background:var(--line-strong); box-shadow:none; }
#app .td-clock { display:block; font-size:17px; font-weight:800; font-variant-numeric:tabular-nums; color:var(--teal); white-space:nowrap; }
#app .td-note.clock-note { color:var(--green); font-weight:600; white-space:nowrap; }
#app .td-row.not-in .td-top { font-weight:600; color:#9db0cc; }
/* Crew Today clock controls (2026-10-21): one horizontal line inside the
   same .td-row — name block, both buttons side by side, status side.
   The row never wraps; the name ellipses and the status side may
   compress/wrap within itself, but the buttons never drop below. */
#app .td-crew-row { flex-wrap:nowrap; }
#app .td-crew-row .td-main { flex:1 1 0; }
#app .td-crew-row .td-top, #app .td-crew-row .td-sub { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#app .td-clock-btns { flex:none; display:flex; align-items:center; gap:8px; }
#app .td-clock-btn { min-height:48px; padding:10px 12px; font:inherit; font-size:13.5px; font-weight:700; line-height:1.2; white-space:nowrap; color:#eef3fb; background:var(--surface-2); border:1px solid var(--line-strong); border-radius:12px; cursor:pointer; }
#app .td-clock-btn:not(:disabled):hover { border-color:var(--teal); }
#app .td-clock-btn:not(:disabled):active { transform:scale(.98); }
#app .td-clock-btn:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
#app .td-clock-btn:disabled { opacity:.42; cursor:default; }
#app .td-crew-row .td-side { flex:0 1 auto; min-width:0; }
#app .td-crew-row .td-note { overflow-wrap:anywhere; }
#app .td-crew-row .td-note.clock-note { white-space:normal; }
@media (prefers-reduced-motion: reduce) { #app .td-chev { transition:none; } }
@media (max-width:560px) {
  #app .td-wrap { padding:18px 12px 20px; }
  #app .td-h { font-size:28px; }
  #app .td-row { padding:13px 14px; gap:10px; }
  #app .td-head { padding:14px; }
  #app .td-clock { font-size:15.5px; }
  #app .td-crew-row { padding:12px 10px; gap:8px; }
  #app .td-crew-row .td-clock-btns { gap:6px; }
  #app .td-clock-btn { padding:10px 8px; font-size:12.5px; }
  #app .td-crew-row .td-clock { font-size:14.5px; }
  #app .td-crew-row .td-note { font-size:11.5px; }
}
@media (max-width:400px) {
  /* Narrowest phones: the three groups still share one line — the
     status dot (duplicated by the status text itself) gives way, the
     buttons and clock compress, and the name keeps a visible,
     ellipsized slice instead of being squeezed out entirely. */
  #app .td-crew-row { padding:10px 8px; gap:6px; }
  #app .td-crew-row .td-dot { display:none; }
  #app .td-crew-row .td-main { min-width:40px; }
  #app .td-crew-row .td-top { font-size:14px; }
  #app .td-crew-row .td-sub { font-size:11.5px; }
  #app .td-crew-row .td-clock-btns { gap:4px; }
  #app .td-clock-btn { padding:10px 4px; font-size:11px; border-radius:10px; }
  #app .td-crew-row .td-clock { font-size:12.5px; }
}

/* ============================================================
   Dispatch board integration (2026-10-18): the frozen dispatch
   design fitted onto the live Feature 7 board inside Jobs.
   Family tokens are scoped to the board wrapper ONLY — the
   site's frame, tab system, and other tabs are untouched.
   ============================================================ */
#app #f7-board .dp-wrap {
  --bg:#0b1226;
  --surface:#101a33;
  --surface-2:#14203e;
  --line:rgba(148,178,255,.14);
  --line-strong:#2e4a73;
  --teal:#38e1ff;
  --teal-soft:rgba(56,225,255,.12);
  --amber:#fbbf24;
  --red:#f87171;
  --green:#34d399;
  --radius:18px;
  color-scheme:dark;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px 14px 18px;
  color:#eef3fb;
  margin-top:12px;
}
#app #f7-board .dp-wrap * { box-sizing:border-box; }
#app #f7-board .dp-wrap .card { background:var(--surface); border-color:var(--line); color:#eef3fb; }
/* Jobs fix round (2026-10-21): the board's own sticky header — the way
   back to Jobs stays visible while the board scrolls. Scoped to
   #f7-board (not .dp-wrap) because the loading/error states render
   outside .dp-wrap; token fallbacks carry those states. */
#app #f7-board .dp-board-head {
  box-sizing:border-box;
  position:sticky; top:0; z-index:30;
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  background:var(--bg, #0b1226);
  padding:10px 2px; margin-bottom:6px;
}
#app #f7-board .dp-board-title {
  margin:0; font-size:20px; font-weight:800; letter-spacing:-.01em; color:#eef3fb;
}
#app #f7-board .dp-home-door {
  box-sizing:border-box;
  display:inline-flex; align-items:center; gap:8px;
  min-height:44px; padding:9px 15px;
  border:1px solid var(--line-strong, #2e4a73); border-radius:999px;
  font:inherit; font-weight:700; font-size:13.5px; cursor:pointer;
  color:var(--teal, #38e1ff); background:var(--surface, #101a33);
}
#app #f7-board .dp-home-door:hover { border-color:var(--teal, #38e1ff); }
#app #f7-board .dp-daychips { display:flex; flex-wrap:wrap; gap:6px; }
#app #f7-board .dp-daychip {
  font:inherit; font-size:13px; font-weight:700; cursor:pointer;
  background:var(--surface-2); color:#9db0cc; border:1px solid var(--line);
  border-radius:999px; padding:7px 12px; min-height:40px;
}
#app #f7-board .dp-daychip.on { color:#04241f; background:var(--teal); border-color:var(--teal); }
#app #f7-board .dp-stats { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 4px; }
#app #f7-board .dp-stat {
  background:var(--surface); border:1px solid var(--line); border-radius:999px;
  padding:7px 14px; font-weight:700; font-size:14px; max-width:100%; min-width:0; overflow-wrap:anywhere;
}
#app #f7-board .dp-stat.warn { color:var(--amber); border-color:rgba(251,191,36,.45); background:rgba(251,191,36,.12); }
#app #f7-board .dp-stat.good { color:var(--teal); }
#app #f7-board .dp-fold { margin-top:18px; }
#app #f7-board .dp-fold-head {
  width:100%; display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  background:none; border:none; cursor:pointer; padding:6px 2px; min-height:48px;
  color:#eef3fb; text-align:left; font:inherit;
}
#app #f7-board .dp-fold-head h3 { font-size:20px; font-weight:800; letter-spacing:.02em; text-transform:uppercase; margin:0; min-width:0; }
#app #f7-board .dp-count {
  background:var(--surface-2); border:1px solid var(--line); color:#9db0cc;
  border-radius:999px; padding:2px 11px; font-size:13px; font-weight:700;
}
#app #f7-board .dp-count.warn { color:var(--amber); border-color:rgba(251,191,36,.45); background:rgba(251,191,36,.12); }
#app #f7-board .dp-chev { margin-left:auto; color:#7186a0; font-size:15px; transition:transform .18s ease; }
#app #f7-board .dp-fold.closed .dp-chev, #app #f7-board .dp-person.closed .dp-chev { transform:rotate(-90deg); }
#app #f7-board .dp-fold.closed .dp-fold-body { display:none; }
#app #f7-board .dp-needs { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
#app #f7-board .dp-need {
  display:flex; align-items:center; gap:8px 12px; flex-wrap:wrap; width:100%; text-align:left;
  background:rgba(251,191,36,.12); border:1.5px solid rgba(251,191,36,.45); border-radius:var(--radius);
  padding:13px 16px; cursor:pointer; font:inherit; color:#eef3fb; min-height:48px;
}
#app #f7-board .dp-need-who { font-weight:800; min-width:0; overflow-wrap:anywhere; }
#app #f7-board .dp-need-when { color:#9db0cc; font-weight:600; font-size:14px; flex:1 1 140px; min-width:0; overflow-wrap:anywhere; }
#app #f7-board .dp-need-go { margin-left:auto; color:var(--amber); font-weight:800; font-size:14px; white-space:nowrap; }
#app #f7-board .dp-flag {
  display:inline-block; font-size:12px; font-weight:800; letter-spacing:.05em; text-transform:uppercase;
  padding:3px 9px; border-radius:999px; white-space:nowrap;
}
#app #f7-board .dp-flag.need { background:var(--amber); color:#1c1206; }
#app #f7-board .dp-flag.done { background:var(--teal); color:#04241f; }
#app #f7-board .dp-clear {
  background:var(--teal-soft); border:1.5px solid var(--teal); border-radius:var(--radius);
  padding:13px 16px; font-weight:700; color:var(--teal);
}
#app #f7-board .dp-tools { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
#app #f7-board .dp-board { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; }
@media (max-width:760px) { #app #f7-board .dp-board { grid-template-columns:minmax(0,1fr); } }
#app #f7-board .dp-job {
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px 18px 14px; scroll-margin-top:16px; min-width:0;
}
#app #f7-board .dp-job.dp-flash { outline:3px solid var(--teal); outline-offset:2px; }
#app #f7-board .dp-job-top { display:flex; align-items:flex-start; gap:10px; }
#app #f7-board .dp-cust { font-size:19px; font-weight:800; line-height:1.2; min-width:0; overflow-wrap:anywhere; }
#app #f7-board .dp-job-top .dp-flag { margin-left:auto; margin-top:2px; flex:none; }
#app #f7-board .dp-route { color:#9db0cc; font-weight:600; margin-top:3px; font-size:15px; overflow-wrap:anywhere; }
#app #f7-board .dp-meta { display:flex; flex-wrap:wrap; gap:6px 16px; color:#7186a0; font-size:13.5px; font-weight:600; margin-top:6px; align-items:center; }
#app #f7-board .dp-assign { border-top:1px solid var(--line); margin-top:13px; padding-top:12px; display:grid; gap:10px; min-width:0; }
#app #f7-board .dp-row { display:grid; grid-template-columns:64px minmax(0,1fr); gap:10px; align-items:center; }
#app #f7-board .dp-lbl { font-size:12px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:#7186a0; }
#app #f7-board select.dp-pick {
  font:inherit; font-size:14.5px; font-weight:600;
  background:var(--surface-2); color:#eef3fb;
  border:1.5px solid var(--line); border-radius:9px; padding:8px 10px;
  width:100%; min-width:0; text-overflow:ellipsis; min-height:48px;
}
#app #f7-board select.dp-pick.unset { border-color:rgba(251,191,36,.45); background:rgba(251,191,36,.12); color:var(--amber); font-weight:700; }
#app #f7-board .dp-chips { display:flex; flex-wrap:wrap; gap:7px; min-width:0; }
#app #f7-board .dp-chip {
  display:inline-flex; align-items:center; gap:7px; flex-wrap:wrap;
  background:var(--surface-2); border:1px solid var(--line); border-radius:999px;
  padding:5px 8px 5px 11px; font-size:13.5px; font-weight:700; max-width:100%; min-width:0;
}
#app #f7-board .dp-dot { width:9px; height:9px; border-radius:50%; background:#7186a0; flex:none; }
#app #f7-board .dp-dot.in { background:var(--green); box-shadow:0 0 0 3px rgba(52,211,153,.18); }
#app #f7-board .dp-cstate { color:#7186a0; font-weight:600; font-size:12.5px; min-width:0; overflow-wrap:anywhere; }
#app #f7-board .dp-rm {
  font:inherit; font-size:13px; font-weight:800; line-height:1; cursor:pointer;
  background:none; border:1px solid var(--line-strong); color:#9db0cc;
  border-radius:50%; width:26px; height:26px; padding:0; flex:none;
}
#app #f7-board .dp-wants {
  display:inline-block; font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase;
  padding:2px 8px; border-radius:999px; background:var(--amber); color:#1c1206; white-space:nowrap;
}
#app #f7-board .dp-reinforce {
  font-size:13.5px; font-weight:700; color:var(--teal);
  background:var(--teal-soft); border:1px solid var(--line-strong); border-radius:9px; padding:7px 11px; overflow-wrap:anywhere;
}
#app #f7-board .dp-now { font-size:13.5px; color:#9db0cc; font-weight:600; overflow-wrap:anywhere; }
#app #f7-board .dp-addjob {
  background:var(--surface); border:1.5px dashed var(--line-strong); border-radius:var(--radius);
  padding:18px; margin-bottom:14px; display:none; min-width:0;
}
#app #f7-board .dp-addjob.open { display:block; }
#app #f7-board .dp-addjob h4 { margin:0 0 12px; font-size:18px; font-weight:800; }
#app #f7-board .dp-form-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; }
@media (max-width:620px) { #app #f7-board .dp-form-grid { grid-template-columns:minmax(0,1fr); } }
#app #f7-board .dp-field { min-width:0; }
#app #f7-board .dp-field label { display:block; font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:#7186a0; margin-bottom:5px; }
#app #f7-board .dp-field input, #app #f7-board .dp-field select {
  width:100%; font:inherit; font-size:15px; font-weight:600;
  background:var(--surface-2); color:#eef3fb;
  border:1.5px solid var(--line); border-radius:9px; padding:10px 12px; min-height:48px;
}
#app #f7-board .dp-checks { display:grid; gap:6px; }
#app #f7-board .dp-check { display:flex; gap:8px; align-items:flex-start; font-size:14px; font-weight:600; text-transform:none; letter-spacing:0; color:#eef3fb; }
#app #f7-board .dp-check input { width:22px; height:22px; flex:none; margin:0; min-height:0; padding:0; }
#app #f7-board .dp-err { color:var(--red); font-weight:700; font-size:14px; }
#app #f7-board .dp-form-actions { display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }
#app #f7-board .dp-trucks { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
@media (max-width:980px) { #app #f7-board .dp-trucks { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px) { #app #f7-board .dp-trucks { grid-template-columns:minmax(0,1fr); } }
#app #f7-board .dp-truck {
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px 18px 14px; display:flex; flex-direction:column; min-width:0;
}
#app #f7-board .dp-truck-head { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
#app #f7-board .dp-tname { font-size:20px; font-weight:800; letter-spacing:.02em; text-transform:uppercase; }
#app #f7-board .dp-tspec { color:#7186a0; font-weight:600; font-size:13.5px; }
#app #f7-board .dp-tjobs { margin-top:8px; display:grid; gap:7px; }
#app #f7-board .dp-tjob { background:var(--surface-2); border:1px solid var(--line); border-radius:9px; padding:8px 11px; font-size:14px; min-width:0; overflow-wrap:anywhere; }
#app #f7-board .dp-twho { font-weight:800; }
#app #f7-board .dp-tmeta { color:#9db0cc; font-weight:600; font-size:13px; }
#app #f7-board .dp-tjob.none { color:#7186a0; font-weight:600; background:none; border-style:dashed; }
#app #f7-board .dp-exp-head {
  margin-top:14px; padding-top:11px; border-top:1px solid var(--line);
  font-size:12px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:#7186a0;
  display:flex; justify-content:space-between; align-items:baseline; gap:10px;
}
#app #f7-board .dp-exp-total { color:#eef3fb; font-size:16px; letter-spacing:0; }
#app #f7-board .dp-exp-list { list-style:none; margin:8px 0 10px; padding:0; display:grid; gap:6px; }
#app #f7-board .dp-exp-list li { display:flex; justify-content:space-between; gap:12px; font-size:14.5px; font-weight:600; min-width:0; }
#app #f7-board .dp-exp-list li > span:first-child { min-width:0; overflow-wrap:anywhere; }
#app #f7-board .dp-amt { font-weight:700; flex:none; }
#app #f7-board .dp-none-row { color:#7186a0; }
#app #f7-board .dp-exp-add { margin-top:10px; display:none; gap:8px; flex-wrap:wrap; }
#app #f7-board .dp-exp-add.open { display:flex; }
#app #f7-board .dp-exp-add input {
  font:inherit; font-size:14px; font-weight:600;
  background:var(--surface-2); color:#eef3fb;
  border:1.5px solid var(--line); border-radius:9px; padding:8px 10px; min-height:44px;
}
#app #f7-board .dp-exp-what { flex:1 1 130px; min-width:0; }
#app #f7-board .dp-exp-amt { width:96px; max-width:100%; }
#app #f7-board .dp-note { color:#9db0cc; font-weight:600; font-size:14.5px; margin:0 2px 12px; }
#app #f7-board .dp-person {
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  margin-bottom:10px; overflow:hidden; min-width:0;
}
#app #f7-board .dp-person-head {
  width:100%; display:flex; align-items:center; gap:11px;
  background:none; border:none; cursor:pointer; font:inherit; color:#eef3fb;
  padding:14px 18px; text-align:left; flex-wrap:wrap; min-height:48px;
}
#app #f7-board .dp-pname { font-weight:800; font-size:16.5px; min-width:0; overflow-wrap:anywhere; }
#app #f7-board .dp-prole { color:#7186a0; font-weight:600; font-size:13.5px; }
#app #f7-board .dp-live { color:var(--green); font-weight:700; }
#app #f7-board .dp-ptotal { margin-left:auto; font-weight:800; white-space:nowrap; }
#app #f7-board .dp-per { color:#7186a0; font-weight:600; font-size:13px; }
#app #f7-board .dp-person-body { border-top:1px solid var(--line); padding:6px 18px 14px; }
#app #f7-board .dp-person.closed .dp-person-body { display:none; }
#app #f7-board .dp-entry {
  display:grid; grid-template-columns:108px minmax(0,1fr) auto auto; gap:6px 14px; align-items:baseline;
  padding:9px 0; border-bottom:1px solid var(--line); font-size:14.5px;
}
#app #f7-board .dp-entry:last-child { border-bottom:none; }
#app #f7-board .dp-eday { font-weight:800; }
#app #f7-board .dp-ejob { color:#9db0cc; font-weight:600; min-width:0; overflow-wrap:anywhere; }
#app #f7-board .dp-etime { color:#7186a0; font-weight:600; white-space:nowrap; }
#app #f7-board .dp-ehrs { font-weight:800; white-space:nowrap; }
#app #f7-board .dp-entry.live .dp-ehrs { color:var(--green); }
@media (max-width:620px) {
  #app #f7-board .dp-entry { grid-template-columns:88px minmax(0,1fr) auto; }
  #app #f7-board .dp-entry .dp-etime { grid-column:2; white-space:normal; }
  #app #f7-board .dp-entry .dp-ehrs { grid-column:3; grid-row:1; }
}
#app #f7-board .dp-today-line { padding:9px 0 2px; font-size:14px; font-weight:600; color:#9db0cc; }
#app #f7-board .dp-today-line b { color:#eef3fb; }
#app #f7-board .dp-wants-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:8px 0 4px; font-size:14px; font-weight:600; color:#9db0cc; }
#app #f7-board .dp-wants-toggle {
  font:inherit; font-size:13px; font-weight:800; cursor:pointer;
  border-radius:999px; padding:5px 12px; min-height:36px;
  border:1.5px solid var(--line-strong); background:var(--surface-2); color:#9db0cc;
}
#app #f7-board .dp-wants-toggle.on { background:rgba(251,191,36,.12); border-color:rgba(251,191,36,.45); color:var(--amber); }

/* ============================================================
   Crew design integration (2026-10-18): the ratified Crew design
   (frozen mock crew-tab-design-mock) fitted into the live Crew
   tab. Family tokens are scoped to #tab-crew ONLY — the live
   site's frame, tab system, and other tabs are untouched.
   ============================================================ */
#app #tab-crew {
  --bg:#0b1226;
  --surface:#101a33;
  --surface-2:#14203e;
  --line:rgba(148,178,255,.14);
  --line-strong:#2e4a73;
  --teal:#38e1ff;
  --teal-soft:rgba(56,225,255,.12);
  --amber:#fbbf24;
  --red:#f87171;
  --green:#34d399;
  --radius:18px;
  color-scheme:dark;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
#app #tab-crew .cw-wrap * { box-sizing:border-box; }
#app .cw-section {
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  margin-bottom:10px; overflow:hidden;
}
#app .cw-head {
  width:100%; display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:none; border:0; cursor:pointer; padding:14px 16px;
  color:#ffffff; text-align:left; font:inherit; min-height:48px;
}
#app .cw-head .cw-name { font-size:16px; font-weight:650; }
#app .cw-count {
  font-size:13px; font-weight:700; color:var(--teal); background:var(--teal-soft);
  border:1px solid rgba(56,225,255,.28); padding:1px 8px; border-radius:999px;
}
#app .cw-clockcount { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:700; color:var(--green); white-space:nowrap; }
#app .cw-clockcount .cw-dot { width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 0 3px rgba(52,211,153,.14); flex:none; }
#app .cw-hint { margin-left:auto; font-size:12.5px; color:#c7d2e8; }
#app .cw-chev { flex:none; width:10px; height:10px; border-right:2px solid #c7d2e8; border-bottom:2px solid #c7d2e8; transform:rotate(-45deg); transition:transform .25s ease; }
#app .cw-section.open .cw-chev { transform:rotate(45deg); }
#app .cw-body { padding:2px 12px 12px; border-top:1px solid var(--line); }
#app .cw-body[hidden] { display:none; }
#app .cw-person { display:flex; align-items:flex-start; gap:10px; flex-wrap:wrap; padding:10px 4px; min-width:0; border-bottom:1px solid rgba(34,54,87,.55); }
#app .cw-person:last-child { border-bottom:0; }
#app .cw-avatar { flex:none; width:36px; height:36px; border-radius:50%; background:var(--surface-2); border:1px solid var(--line); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:var(--teal); }
#app .cw-who { min-width:0; flex:1 1 180px; }
#app .cw-nm { font-size:15px; font-weight:600; overflow-wrap:anywhere; }
#app .cw-sub { font-size:12.5px; color:#c7d2e8; margin-top:1px; overflow-wrap:anywhere; }
#app .cw-clockline { display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin-top:4px; font-size:12.5px; line-height:1.3; color:#c7d2e8; }
#app .cw-clockline .cw-dot { width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 0 3px rgba(52,211,153,.14); flex:none; }
#app .cw-clockline .cw-dot.out { background:#c7d2e8; box-shadow:none; }
#app .cw-timer { font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace; font-size:13px; font-weight:700; letter-spacing:.4px; color:#ffffff; background:rgba(52,211,153,.10); border:1px solid rgba(52,211,153,.32); padding:1px 7px; border-radius:6px; font-variant-numeric:tabular-nums; }
#app .cw-clockline .cw-in-label { color:var(--green); font-weight:650; }
#app .cw-truckline { font-size:12.5px; color:#c7d2e8; margin-top:2px; overflow-wrap:anywhere; }
#app .cw-truckline.set { color:var(--teal); }
#app .cw-wants { display:inline-flex; font-size:11px; font-weight:700; padding:1px 7px; border-radius:999px; margin-left:6px; color:var(--amber); background:rgba(251,191,36,.10); border:1px solid rgba(251,191,36,.4); white-space:nowrap; }
#app .cw-wants:empty { display:none; }
#app .cw-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
#app .cw-picker { margin:8px 4px 10px; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; padding:10px; }
#app .cw-picker[hidden] { display:none; }
#app .cw-picker-title { font-size:13px; font-weight:650; color:#c7d2e8; margin:0 2px 8px; }
#app .cw-truckopt { display:flex; align-items:center; gap:8px; width:100%; font:inherit; font-size:14px; font-weight:600; color:#ffffff; background:rgba(56,225,255,.06); border:1px solid var(--line); padding:9px 11px; border-radius:9px; cursor:pointer; margin-bottom:6px; text-align:left; min-height:44px; }
#app .cw-truckopt .cw-holder { margin-left:auto; font-size:12.5px; font-weight:600; color:#c7d2e8; }
#app .cw-truckopt .cw-holder.here { color:var(--teal); }
#app .cw-login-state { flex:none; font-size:13px; color:#c7d2e8; overflow-wrap:anywhere; }
#app .cw-login-state code { font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace; font-size:12.5px; color:#ffffff; background:var(--surface-2); border:1px solid var(--line); padding:2px 7px; border-radius:6px; }
#app .cw-pinned { display:flex; gap:10px; margin:2px 0 12px; flex-wrap:wrap; }
#app .cw-pinned .btn { flex:1 1 160px; min-height:48px; }
#app .cw-panel { margin:8px 4px 12px; min-width:0; background:var(--surface-2); border:1px solid var(--line-strong); border-radius:12px; padding:12px; }
#app .cw-panel[hidden] { display:none; }
#app .cw-panel h3 { margin:0 0 4px; font-size:15px; font-weight:700; color:#ffffff; }
#app .cw-panel-note { margin:0 0 10px; font-size:12.5px; line-height:1.45; color:#c7d2e8; }
#app .cw-perm-list { display:grid; gap:6px; }
#app .cw-perm-toggle { display:flex; align-items:center; gap:10px; width:100%; min-width:0; font:inherit; font-size:14px; font-weight:600; color:#ffffff; text-align:left; background:var(--surface); border:1px solid var(--line); padding:9px 11px; border-radius:9px; cursor:pointer; min-height:44px; }
#app .cw-perm-toggle .cw-perm-sub { display:block; font-size:12px; font-weight:500; color:#c7d2e8; margin-top:1px; }
#app .cw-perm-toggle .cw-switch { flex:none; margin-left:auto; width:38px; height:22px; border-radius:999px; background:var(--surface-2); border:1px solid var(--line-strong); position:relative; }
#app .cw-perm-toggle .cw-switch::after { content:""; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#c7d2e8; transition:left .18s ease, background .18s ease; }
#app .cw-perm-toggle[aria-checked="true"] .cw-switch { background:var(--teal-soft); border-color:var(--teal); }
#app .cw-perm-toggle[aria-checked="true"] .cw-switch::after { left:18px; background:var(--teal); }
#app .cw-perm-locked { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:14px; font-weight:600; color:#c7d2e8; background:rgba(248,113,113,.05); border:1px dashed rgba(248,113,113,.4); padding:9px 11px; border-radius:9px; cursor:pointer; width:100%; font:inherit; text-align:left; min-height:44px; }
#app .cw-perm-locked .cw-lock-note { margin-left:auto; font-size:12px; font-weight:700; color:var(--red); white-space:nowrap; }
#app .cw-perm-grouplabel { margin:12px 0 6px; font-size:12px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; color:#c7d2e8; }
@media (max-width:430px) {
  #app .cw-head { gap:7px; padding-left:12px; padding-right:12px; }
  #app .cw-head .cw-hint { display:none; }
}

/* ============================================================
   Back Office room integration (BO-1, 2026-10-18): the frozen
   Back Office design's calm room fitted into the live tab system.
   Family tokens are scoped to #tab-backoffice ONLY — the live
   site's frame, tab system, and other tabs are untouched.
   ============================================================ */
#app #tab-backoffice {
  --bg:#0b1226;
  --surface:#101a33;
  --surface-2:#14203e;
  --line:rgba(148,178,255,.14);
  --line-strong:#2e4a73;
  --teal:#38e1ff;
  --teal-soft:rgba(56,225,255,.12);
  --amber:#fbbf24;
  --red:#f87171;
  --green:#34d399;
  --radius:18px;
  color-scheme:dark;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
#app .bo-wrap { background:var(--bg); border:1px solid var(--line); border-radius:var(--radius); padding:22px 18px 24px; color:#eef3fb; }
#app .bo-wrap * { box-sizing:border-box; }
#app .bo-mast { margin-bottom:14px; }
#app .bo-h { margin:0; font-size:32px; font-weight:800; letter-spacing:-.02em; line-height:1.05; color:#eef3fb; }
#app .bo-dateline { margin-top:6px; font-size:15px; font-weight:600; color:var(--teal); }
#app .bo-subline { margin:8px 0 0; font-size:14.5px; line-height:1.5; color:#9db0cc; max-width:62ch; }
#app .bo-house { margin:0 0 18px; font-size:15.5px; line-height:1.55; color:#9db0cc; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:14px 18px; }
#app .bo-house strong { color:#eef3fb; font-weight:700; }
#app .bo-needs { margin-bottom:16px; }
#app .bo-needs-h { margin:0 0 10px; font-size:13px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; color:#eef3fb; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
#app .bo-needs-count { font-size:12px; font-weight:800; letter-spacing:.05em; color:var(--amber); background:rgba(251,191,36,.12); border-radius:999px; padding:3px 10px; white-space:nowrap; }
#app .bo-watch { margin-bottom:16px; }
#app .bo-watch-h { margin:0 0 10px; font-size:13px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; color:#eef3fb; }
#app .bo-sec { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); margin-bottom:12px; overflow:hidden; }
#app .bo-head { width:100%; display:flex; align-items:center; gap:12px; padding:16px 18px; background:none; border:0; cursor:pointer; text-align:left; color:inherit; font:inherit; min-height:52px; }
#app .bo-head:focus-visible { outline:2px solid var(--teal); outline-offset:-2px; }
#app .bo-title { font-size:16px; font-weight:700; min-width:0; overflow-wrap:anywhere; }
#app .bo-face { margin-left:auto; font-size:13px; font-weight:700; color:var(--teal); background:var(--teal-soft); border-radius:999px; padding:4px 11px; white-space:nowrap; max-width:55%; overflow:hidden; text-overflow:ellipsis; }

/* The bank faces carry a sentence, not a label (fix-all F8): the
   pill grammar above clipped the sub-line at phone and tablet
   widths. A face holding a bank face wraps and takes the row. */
#app .bo-face:has(.fd-bank-face){ white-space:normal; overflow:visible; text-overflow:clip; max-width:100%; flex:1 1 auto; min-width:0; }
#app .fd-bank-face{ min-width:0; }
#app .fd-bank-face-sub{ white-space:normal; }
#app .bo-chev { flex:none; width:10px; height:10px; border-right:2px solid #9db0cc; border-bottom:2px solid #9db0cc; transform:rotate(-45deg); transition:transform .18s ease; }
#app .bo-sec.open .bo-chev { transform:rotate(45deg); }
#app .bo-body { display:none; border-top:1px solid var(--line); }
#app .bo-sec.open .bo-body { display:block; }
#app .bo-row { display:flex; align-items:center; gap:14px; width:100%; padding:14px 18px; background:none; border:0; border-bottom:1px solid var(--line); cursor:pointer; text-align:left; color:inherit; font:inherit; text-decoration:none; min-height:52px; }
#app .bo-row:last-child { border-bottom:0; }
#app .bo-needs .bo-row, #app .bo-watch .bo-row { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); margin-bottom:8px; }
#app button.bo-row:hover { background:var(--surface-2); }
#app .bo-row:focus-visible { outline:2px solid var(--teal); outline-offset:-2px; }
#app .bo-row.static { cursor:default; }
#app .bo-row.static:hover { background:none; }
#app .bo-main { flex:1 1 auto; min-width:0; display:block; }
#app .bo-top { display:block; font-size:16px; font-weight:700; line-height:1.3; overflow-wrap:anywhere; }
#app .bo-sub { display:block; margin-top:2px; font-size:13.5px; color:#9db0cc; line-height:1.4; overflow-wrap:anywhere; }
#app .bo-side { flex:none; text-align:right; display:block; }
#app .bo-arrow { flex:none; color:#9db0cc; font-size:18px; line-height:1; }
#app .bo-pill { display:inline-block; font-size:11.5px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; border-radius:999px; padding:4px 10px; white-space:nowrap; }
#app .bo-pill.sent { color:var(--teal); background:var(--teal-soft); }
#app .bo-pill.signed { color:var(--green); background:rgba(52,211,153,.12); }
#app .bo-pill.waiting { color:var(--amber); background:rgba(251,191,36,.12); }
#app .bo-pill.overdue { color:var(--red); background:rgba(248,113,113,.12); }
#app .bo-pill.need { color:var(--red); background:rgba(248,113,113,.12); }
/* Settings wave (2026-10-19): RULES kind pills + mail-identity card + Home nudge. */
#app .bo-pill.enforced { color:var(--teal); background:var(--teal-soft); }
#app .bo-pill.watched { color:var(--amber); background:rgba(251,191,36,.12); }
#app .mi-pad { padding:16px 18px; }
#app .mi-nested { padding:0 18px 6px; }
#app .mi-preview { margin:12px 0; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); }
#app .mi-preview-label { display:block; font-size:11.5px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:#9db0cc; margin-bottom:5px; }
#app .mi-preview b { font-size:15px; overflow-wrap:anywhere; }
#app .mi-saved { color:var(--teal); font-size:13.5px; min-height:1.2em; margin:8px 0 0; }
#app .hm-nudge { position:relative; }
#app .hm-nudge-x { flex:none; background:none; border:0; color:#9db0cc; font:inherit; font-size:14px; line-height:1; cursor:pointer; padding:8px; border-radius:8px; }
#app .hm-nudge-x:hover { color:#eef3fb; background:var(--surface); }
/* BO-4: the file cabinet + the riding files, inside the room. */
#app .bo-cab-why { margin:0; padding:14px 18px 4px; font-size:14px; line-height:1.55; color:#9db0cc; }
#app .bo-cab-why strong { color:var(--ink, #e8eef7); }
#app .bo-cab-search { padding:12px 18px 4px; }
#app .bo-cab-search label { display:block; font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:#9db0cc; margin-bottom:7px; }
#app .bo-cab-search input { width:100%; box-sizing:border-box; background:var(--surface-2); border:1px solid var(--line-strong); border-radius:12px; color:inherit; font:inherit; font-size:15.5px; padding:12px 14px; min-height:48px; }
#app .bo-cab-search input:focus-visible { outline:2px solid var(--teal); outline-offset:1px; }
#app .bo-cab-hint { margin:8px 0 0; font-size:12.5px; line-height:1.45; color:#9db0cc; }
#app .bo-cab-tools { display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:12px 18px 6px; }
#app .bo-seg { display:inline-flex; background:var(--surface-2); border:1px solid var(--line); border-radius:999px; padding:3px; }
#app .bo-seg button { border:0; background:none; color:#9db0cc; font:inherit; font-size:13.5px; font-weight:700; padding:8px 16px; border-radius:999px; cursor:pointer; min-height:40px; }
#app .bo-seg button[aria-pressed="true"] { background:var(--teal-soft); color:var(--teal); }
#app .bo-cab-flipnote { font-size:13px; color:#9db0cc; line-height:1.45; }
#app .bo-cab-note { margin:0; padding:10px 18px 2px; font-size:13px; color:var(--amber); line-height:1.45; }
#app .bo-cab-cust { border-top:1px solid var(--line); }
#app .bo-cab-chead { width:100%; display:flex; align-items:center; gap:12px; padding:14px 18px; background:none; border:0; cursor:pointer; text-align:left; color:inherit; font:inherit; min-height:52px; }
#app .bo-cab-chead:hover { background:var(--surface-2); }
#app .bo-cab-chead .bo-chev { margin-left:auto; }
#app .bo-cab-cust.open .bo-cab-chead .bo-chev { transform:rotate(45deg); }
#app .bo-cab-cbody { border-top:1px solid var(--line); background:rgba(255,255,255,.015); }
#app .bo-cab-jhead { padding:12px 18px 6px; font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:#9db0cc; overflow-wrap:anywhere; }
#app .bo-cab-khead { display:flex; align-items:center; gap:10px; padding:14px 18px 6px; font-size:14px; font-weight:800; color:inherit; }
#app .bo-cab-kcount { font-size:12px; font-weight:800; color:var(--teal); background:var(--teal-soft); border-radius:999px; padding:2px 9px; }
#app .bo-cab-ride { border-top:1px solid var(--line); margin-top:6px; }
#app .bo-cab-rideh { margin:0; padding:14px 18px 4px; font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:#9db0cc; }
#app .bo-file { border-bottom:1px solid var(--line); }
#app .bo-file:last-child { border-bottom:0; }
#app .bo-paper-row { min-height:48px; padding-top:10px; padding-bottom:10px; }
#app .bo-mini { border:1px solid var(--line-strong); background:var(--surface-2); color:inherit; font:inherit; font-size:13px; font-weight:700; border-radius:10px; padding:8px 13px; cursor:pointer; min-height:40px; white-space:nowrap; }
#app .bo-mini:hover { border-color:var(--teal); color:var(--teal); }
#app .bo-file-act { display:inline-flex; align-items:center; gap:8px; }
#app .bo-file-act input[type="date"], #app .bo-addform input, #app .bo-addform select { background:var(--surface-2); border:1px solid var(--line); border-radius:10px; color:inherit; font:inherit; font-size:13.5px; padding:8px 10px; min-height:40px; box-sizing:border-box; }
#app .bo-addform { display:flex; flex-wrap:wrap; gap:8px; padding:14px 18px; align-items:center; }
#app .bo-addform input[type="text"] { flex:1 1 180px; }
/* BO-5: your logs (derived tables) + the claims fold's clocks/actions. */
#app .bo-log { border-bottom:1px solid var(--line); padding-bottom:10px; }
#app .bo-log:last-child { border-bottom:0; }
#app .bo-log-h { margin:0; padding:14px 18px 0; font-size:14px; font-weight:800; color:inherit; }
#app .bo-log-note { margin:3px 0 6px; padding:0 18px; font-size:12.5px; line-height:1.45; color:#9db0cc; }
#app .bo-log-t { padding:2px 18px 6px; }
#app .bo-logrow { display:grid; gap:8px 14px; align-items:center; padding:8px 0; border-top:1px solid var(--line); font-size:13.5px; line-height:1.4; overflow-wrap:anywhere; }
#app .bo-logrow:first-child { border-top:0; }
#app .bo-log-head { font-size:11.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:#9db0cc; }
#app .bo-log-claims { grid-template-columns:1.25fr .8fr .8fr .62fr; }
#app .bo-log-certs { grid-template-columns:1.1fr .62fr .78fr 1fr; }
#app .bo-log-storage { grid-template-columns:1.3fr .62fr .62fr .55fr .62fr; }
#app .bo-log-drivers { grid-template-columns:1fr .42fr 1.05fr .9fr; }
#app .bo-clockside { display:inline-flex; align-items:center; gap:10px; }
#app .bo-clockbar { display:inline-block; width:110px; height:8px; border-radius:99px; background:var(--surface-2); border:1px solid var(--line); overflow:hidden; vertical-align:middle; }
#app .bo-clockbar > span { display:block; height:100%; background:var(--teal); border-radius:99px; }
#app .bo-clockbar.overdue > span { background:var(--red); }
#app .bo-side.bo-claim-acts { flex:1 1 auto; min-width:0; display:flex; flex-wrap:wrap; gap:8px; text-align:left; }
#app .bo-claim-form input[type="text"] { flex:1 1 220px; }
/* BO-6: the makers — sheets, documents, and form copies, inside the room. */
#app .bo-mk-block { padding:6px 0 12px; border-bottom:1px solid var(--line); }
#app .bo-mk-block:last-child { border-bottom:0; }
#app .bo-mk-h { margin:0; padding:14px 18px 0; font-size:14px; font-weight:800; color:inherit; }
#app .bo-mk-why { margin:3px 0 6px; padding:0 18px; font-size:12.5px; line-height:1.45; color:#9db0cc; }
#app .bo-mk-note { margin:8px 0 2px; padding:0 18px; font-size:12.5px; line-height:1.5; color:#9db0cc; }
#app .bo-mk-note strong { color:#eef3fb; }
#app .bo-mk-row .bo-mk-open { flex:1 1 auto; min-width:0; display:block; background:none; border:0; padding:0; cursor:pointer; text-align:left; color:inherit; font:inherit; }
#app .bo-mk-side { display:inline-flex; align-items:center; gap:8px; flex-wrap:wrap; }
#app .bo-mk-addrow { padding:10px 18px 2px; }
#app .bo-mk-add { background:var(--teal-soft); color:var(--teal); border:1px solid var(--line-strong); border-radius:999px; padding:7px 14px; font:inherit; font-size:13px; font-weight:700; cursor:pointer; min-height:38px; }
#app .bo-mk-add:hover { border-color:var(--teal); }
#app .bo-mk-tool { padding:14px 18px 16px; }
#app .bo-mk-back { background:none; border:0; color:var(--teal); font:inherit; font-size:13.5px; font-weight:700; cursor:pointer; padding:4px 0 10px; }
#app .bo-mk-title { display:block; width:100%; box-sizing:border-box; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; color:inherit; font:inherit; font-size:16px; font-weight:700; padding:10px 12px; margin-bottom:10px; }
#app .bo-mk-title:focus, #app .bo-mk-grid input:focus, #app .bo-mk-body:focus, #app .bo-mk-search:focus, #app .bo-mk-rename:focus { outline:2px solid var(--teal); outline-offset:-1px; }
#app .bo-mk-hint { margin:0 0 10px; font-size:12.5px; line-height:1.5; color:#9db0cc; }
#app .bo-mk-hint strong { color:#eef3fb; }
#app .bo-mk-gridwrap { overflow-x:auto; border:1px solid var(--line); border-radius:10px; }
#app .bo-mk-grid { border-collapse:collapse; width:100%; table-layout:fixed; }
#app .bo-mk-grid th, #app .bo-mk-grid td { border-bottom:1px solid var(--line); border-right:1px solid var(--line); padding:0; }
#app .bo-mk-grid th:last-child, #app .bo-mk-grid td:last-child { border-right:0; }
#app .bo-mk-grid tbody tr:last-child td { border-bottom:0; }
#app .bo-mk-grid input { width:100%; box-sizing:border-box; background:none; border:0; color:inherit; font:inherit; font-size:13.5px; padding:9px 10px; min-height:40px; }
#app .bo-mk-grid thead input { font-weight:700; background:var(--surface-2); }
#app .bo-mk-grid tfoot td { padding:9px 10px; font-size:13.5px; font-weight:800; color:var(--teal); background:var(--surface-2); }
#app .bo-mk-cellwrap { display:flex; align-items:stretch; }
#app .bo-mk-cellwrap input { flex:1 1 auto; min-width:0; }
#app .bo-mk-x { flex:none; background:none; border:0; color:#9db0cc; font-size:11px; cursor:pointer; padding:0 7px; }
#app .bo-mk-x:hover { color:var(--red); }
#app .bo-mk-grid .bo-mk-rowx { width:30px; text-align:center; background:none; }
#app .bo-mk-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:12px; }
#app .bo-mk-spacer { flex:1 1 auto; }
#app .bo-mk-save { background:var(--teal); color:#06121f; border:0; border-radius:999px; padding:8px 16px; font:inherit; font-size:13.5px; font-weight:800; cursor:pointer; min-height:40px; }
#app .bo-mk-saved { margin:10px 0 0; font-size:12.5px; font-weight:700; color:var(--green); }
#app .bo-mk-body { display:block; width:100%; box-sizing:border-box; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; color:inherit; font:inherit; font-size:14.5px; line-height:1.55; padding:12px; resize:vertical; }
#app .bo-mk-search { display:block; width:100%; box-sizing:border-box; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; color:inherit; font:inherit; font-size:14px; padding:10px 12px; margin-bottom:8px; }
#app .bo-mk-group { margin:12px 0 4px; padding:0 2px; font-size:11.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:#9db0cc; }
#app .bo-mk-pick { border:1px solid var(--line); border-radius:10px; margin-bottom:8px; background:var(--surface-2); }
#app .bo-mk-rename { width:100%; box-sizing:border-box; background:var(--surface-2); border:1px solid var(--line); border-radius:8px; color:inherit; font:inherit; font-size:14px; padding:8px 10px; }
@media (max-width:560px) {
  #app .bo-mk-tool { padding:12px; }
  #app .bo-mk-grid input { font-size:12.5px; padding:8px 6px; }
}
@media (prefers-reduced-motion: reduce) { #app .bo-chev { transition:none; } }
@media (max-width:560px) {
  #app .bo-wrap { padding:18px 12px 20px; }
  #app .bo-h { font-size:28px; }
  #app .bo-row { padding:13px 14px; gap:10px; }
  #app .bo-head { padding:14px; }
  #app .bo-face { max-width:48%; }
}
@media (max-width:560px) {
  #app .bo-log-claims, #app .bo-log-certs, #app .bo-log-storage, #app .bo-log-drivers { grid-template-columns:1fr 1fr; }
  #app .bo-clockbar { width:70px; }
}

/* === JOBS WAVE (2026-10-19) — the Jobs tab rebuilt to the approved mock:
   quiet header, lookup, dispatch door, calendar fold, status-group folds
   with derived faces, rows as doors, and the job detail view. Scoped to
   #tab-jobs; the tokens are the room tokens every wave shares. === */
#app #tab-jobs .jw-head-line { font-size:15px; font-weight:700; color:var(--ink); margin:2px 0 4px; }
#app #tab-jobs .jw-head-gloss { font-size:13px; color:var(--muted); margin:0 0 14px; line-height:1.45; }
#app #tab-jobs .jw-note { font-size:13px; color:var(--muted); margin:-4px 0 10px; }
#app #tab-jobs .jw-note-inline { font-size:13px; color:var(--muted); }
#app #tab-jobs .jw-door { display:flex; align-items:center; gap:12px; width:100%; padding:14px 18px; margin-bottom:12px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); cursor:pointer; text-align:left; color:inherit; font:inherit; min-height:52px; }
#app #tab-jobs .jw-door:hover { background:var(--surface-2); }
#app #tab-jobs .jw-door:focus-visible, #app #tab-jobs .jw-face:focus-visible, #app #tab-jobs .jw-row:focus-visible { outline:2px solid var(--teal); outline-offset:-2px; }
#app #tab-jobs .jw-door-main { flex:1 1 auto; min-width:0; display:block; }
#app #tab-jobs .jw-door-main strong { display:block; font-size:16px; font-weight:700; line-height:1.3; }
#app #tab-jobs .jw-door-main span { display:block; font-size:13px; color:var(--muted); margin-top:2px; }
#app #tab-jobs .jw-fold { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); margin-bottom:12px; overflow:hidden; }
#app #tab-jobs .jw-face { width:100%; display:flex; align-items:center; gap:12px; padding:16px 18px; background:none; border:0; cursor:pointer; text-align:left; color:inherit; font:inherit; min-height:52px; }
#app #tab-jobs .jw-face-main { flex:1 1 auto; min-width:0; display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
#app #tab-jobs .jw-face-main strong { font-size:16px; font-weight:700; }
#app #tab-jobs .jw-agg { font-size:13px; font-weight:600; color:var(--teal); }
#app #tab-jobs .jw-chev { flex:none; width:10px; height:10px; border-right:2px solid #9db0cc; border-bottom:2px solid #9db0cc; transform:rotate(-45deg); transition:transform .18s ease; }
#app #tab-jobs .jw-fold.open .jw-chev, #app #tab-jobs #jobs-cal-fold.open .jw-chev { transform:rotate(45deg); }
#app #tab-jobs .jw-body { border-top:1px solid var(--line); }
#app #tab-jobs .jw-body[hidden] { display:none; }
#app #tab-jobs #jobs-cal-body { padding:12px; }
#app #tab-jobs #jobs-cal-body .calendar { margin:0; }
#app #tab-jobs .jw-row { display:flex; align-items:flex-start; gap:14px; width:100%; padding:14px 18px; background:none; border:0; border-bottom:1px solid var(--line); cursor:pointer; text-align:left; color:inherit; font:inherit; min-height:52px; }
#app #tab-jobs .jw-row:last-child { border-bottom:0; }
#app #tab-jobs .jw-row:hover { background:var(--surface-2); }
#app #tab-jobs .jw-time { flex:none; width:62px; text-align:center; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; padding:7px 2px 5px; }
#app #tab-jobs .jw-rt { display:block; font-size:15px; font-weight:800; line-height:1.1; }
#app #tab-jobs .jw-rt.none { color:var(--muted); }
#app #tab-jobs .jw-rap { display:block; font-size:10px; font-weight:700; letter-spacing:.08em; color:var(--muted); margin-top:2px; }
#app #tab-jobs .jw-rmain { flex:1 1 auto; min-width:0; display:block; }
#app #tab-jobs .jw-rname { display:block; font-size:16px; font-weight:700; line-height:1.3; overflow-wrap:anywhere; }
#app #tab-jobs .jw-rline { display:block; font-size:13px; color:var(--muted); margin-top:2px; overflow-wrap:anywhere; }
#app #tab-jobs .jw-rchips { flex:none; display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
#app #tab-jobs .jw-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
#app #tab-jobs .jw-chip { font-size:11.5px; font-weight:700; border-radius:999px; padding:3px 9px; white-space:nowrap; background:var(--surface-2); border:1px solid var(--line); color:var(--muted); }
#app #tab-jobs .jw-chip.warn { background:rgba(251,191,36,.14); border-color:rgba(251,191,36,.45); color:var(--amber); }
#app #tab-jobs .jw-chip.good { background:rgba(56,225,255,.12); border-color:rgba(56,225,255,.4); color:var(--teal); }
#app #tab-jobs .jw-empty { padding:14px 18px; color:var(--muted); font-size:14px; margin:0; }
#app #tab-jobs .jw-quiet-doors { display:flex; flex-direction:column; gap:8px; margin:10px 0 14px; }
#app #tab-jobs .jw-qdoor { display:flex; align-items:center; gap:12px; width:100%; padding:12px 18px; background:none; border:1px solid var(--line); border-radius:var(--radius); cursor:pointer; text-align:left; color:inherit; font:inherit; text-decoration:none; min-height:52px; box-sizing:border-box; }
#app #tab-jobs .jw-qdoor:hover { background:var(--surface-2); }
#app #tab-jobs .jw-qdoor-main { flex:1 1 auto; min-width:0; display:block; }
#app #tab-jobs .jw-qdoor-main strong { font-size:15px; font-weight:700; }
#app #tab-jobs .jw-qdoor-main span { display:block; font-size:13px; color:var(--muted); margin-top:1px; }
#app #tab-jobs .jw-back { display:inline-flex; align-items:center; gap:6px; padding:10px 14px; margin-bottom:12px; background:var(--surface); border:1px solid var(--line); border-radius:999px; cursor:pointer; color:inherit; font:inherit; font-weight:700; min-height:44px; }
#app #tab-jobs .jw-back:hover { background:var(--surface-2); }
#app #tab-jobs .jw-detail-card { padding:18px; margin-bottom:12px; }
#app #tab-jobs .jw-dtitle { font-size:21px; font-weight:800; margin:0 0 4px; overflow-wrap:anywhere; }
#app #tab-jobs .jw-dsub { font-size:13.5px; color:var(--muted); margin:0 0 12px; }
#app #tab-jobs .jw-advance { margin:4px 0 14px; }
#app #tab-jobs .jw-advance .btn { min-height:48px; padding:10px 20px; font-size:15px; }
#app #tab-jobs .jw-facts { border-top:1px solid var(--line); }
#app #tab-jobs .jw-fact { display:flex; gap:14px; padding:9px 0; border-bottom:1px solid var(--line); font-size:14px; }
#app #tab-jobs .jw-fact:last-child { border-bottom:0; }
#app #tab-jobs .jw-fact-k { flex:none; width:92px; color:var(--muted); }
#app #tab-jobs .jw-fact-v { flex:1 1 auto; min-width:0; overflow-wrap:anywhere; }
#app #tab-jobs .jw-assign { padding:18px; margin-bottom:12px; }
#app #tab-jobs .jw-block-h { font-size:16px; font-weight:700; margin:0 0 10px; }
#app #tab-jobs .jw-lab { display:block; font-size:12px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); margin:12px 0 6px; }
#app #tab-jobs .jw-assign select { width:100%; box-sizing:border-box; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; color:inherit; font:inherit; font-size:15px; padding:11px 12px; min-height:48px; }
#app #tab-jobs .jw-helpers { display:flex; flex-wrap:wrap; gap:8px; }
#app #tab-jobs .jw-hchip { padding:9px 14px; border-radius:999px; border:1px solid var(--line); background:var(--surface-2); color:inherit; font:inherit; font-size:14px; font-weight:600; cursor:pointer; min-height:44px; }
#app #tab-jobs .jw-hchip.on { background:rgba(56,225,255,.14); border-color:var(--teal); color:var(--teal); }
#app #tab-jobs .jw-pw { padding:14px 18px; }
#app #tab-jobs .jw-pw-h { font-size:14px; font-weight:700; margin:0 0 8px; }
#app #tab-jobs .jw-pwrow { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--line); font-size:14px; }
#app #tab-jobs .jw-pwrow:last-of-type { border-bottom:0; }
#app #tab-jobs .jw-pw-note { font-size:13px; color:var(--muted); line-height:1.5; margin:10px 0; }
#app #tab-jobs .jw-pw-doors { display:flex; flex-wrap:wrap; gap:8px; }
#app #tab-jobs .jw-manage { display:flex; flex-wrap:wrap; gap:8px; padding:14px 18px; }
#app #tab-jobs .jw-body .zone-list, #app #tab-jobs .jw-body .job-sec { padding:0 18px; }
@media (prefers-reduced-motion: reduce) { #app #tab-jobs .jw-chev { transition:none; } }
@media (max-width:560px) {
  #app #tab-jobs .jw-face { padding:14px; }
  #app #tab-jobs .jw-row { padding:13px 14px; gap:10px; }
  #app #tab-jobs .jw-rchips { align-items:flex-start; }
  #app #tab-jobs .jw-row { flex-wrap:wrap; }
  #app #tab-jobs .jw-detail-card, #app #tab-jobs .jw-assign { padding:14px; }
  #app #tab-jobs .jw-fact-k { width:76px; }
}

/* Financial Department (FD-1): the sum strip on top of the room, the
   scroll doors under it, and the federal over-collect guard's flag.
   Tokens only — the room stays in the one dark family. */
#app .fd-sum { margin-bottom:12px; }
#app .fd-sum-row { display:flex; flex-wrap:wrap; gap:10px 28px; font-size:14px; color:var(--muted, #9db4d4); }
#app .fd-sum-row b { display:block; font-size:20px; color:var(--text, #e8f0fc); margin-top:2px; }
#app .fd-doors { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
#app .fd-guard-over { color:var(--red); font-weight:600; }
/* D-1 hand-placement (office seat): the in-fold target picker on a
   proposal-less needs-placing entry. Only painted for office. */
#app .fd-place-controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
#app .fd-place-target { min-height:40px; max-width:230px; border:1px solid var(--line-strong); border-radius:10px; background:var(--surface-2); color:inherit; font:inherit; font-size:13px; padding:8px 10px; }
#app .fd-place-target:focus-visible { outline:2px solid var(--teal); outline-offset:1px; }
@media (max-width:560px) {
  #app .fd-place-row { flex-wrap:wrap; }
  #app .fd-place-controls { flex:1 1 100%; justify-content:flex-start; }
  #app .fd-place-target { flex:1 1 auto; max-width:none; }
}

/* Finance (FD-2): the bank feed's rows inside the room's folds. The
   fold faces carry the chip row; the recorded rows carry the amount
   on the side and the proof line under them. Tokens only. */
#app .fd-bank-face { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
#app .fd-bank-face-sub { color:var(--muted, #9db4d4); font-size:13px; }
#app .fd-bank-note { margin:0; padding:10px 18px 2px; font-size:13.5px; color:var(--muted, #9db4d4); line-height:1.5; }
#app .fd-stmt { border-top:1px solid var(--line); padding:6px 0 10px; }
#app .fd-bank-rec { margin:8px 18px 0; padding:12px 14px; border:1px solid var(--line); border-radius:12px; font-size:13.5px; line-height:1.55; color:var(--text, #e8f0fc); background:var(--surface-2); }
#app .fd-bank-rec b { color:var(--teal); }
#app .fd-bank-src { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 18px; font-size:14px; border-bottom:1px solid var(--line); }
#app .fd-bank-coverage { display:block; padding:10px 18px 4px; font-size:13px; color:var(--muted, #9db4d4); line-height:1.5; }
#app .fd-bank-actions { display:flex; gap:8px; flex-wrap:wrap; padding:10px 18px 4px; }
#app .fd-bank-state { margin:0; padding:8px 18px 4px; font-size:13.5px; color:var(--teal); line-height:1.5; }
#app .fd-bank-rule { margin:0; padding:12px 18px 0; font-size:15px; font-weight:700; color:var(--text, #e8f0fc); }
#app .fd-bank-safety-row { display:flex; gap:10px; padding:10px 18px 0; font-size:13.5px; line-height:1.5; }
#app .fd-bank-safety-row b { display:block; color:var(--text, #e8f0fc); }
#app .fd-bank-safety-row span { color:var(--muted, #9db4d4); }
#app .fd-bank-tick { color:var(--teal); font-weight:800; }
#app .fd-bank-row { align-items:flex-start; }
#app .fd-bank-amt { font-weight:800; font-size:15px; }
#app .fd-bank-amt.in { color:var(--green); }
#app .fd-bank-proof { padding:2px 18px 0; font-size:12.5px; color:var(--muted, #9db4d4); }
#app .fd-bank-row-actions { display:flex; gap:8px; padding:8px 18px 10px; }

/* ============================================================
   Crew seat v2 (2026-10-20): Brian's approved four-room crew seat
   (Home · Dispatch · Inbox · Settings) fitted into the live app.
   Tokens scoped to the crew rooms' tabs under body.crew-mode ONLY —
   office/owner renders of the same tabs are untouched. The room
   surfaces reuse the hm-fold family; .cs-* carries the seat's own
   pieces (tiles, job rows, crew clocks, paperwork gate, notes).
   ============================================================ */
body.crew-mode #app #tab-today,
body.crew-mode #app #tab-jobs,
body.crew-mode #app #tab-inbox,
body.crew-mode #app #tab-more {
  --bg:#0b1226;
  --surface:#101a33;
  --surface-2:#14203e;
  --line:rgba(148,178,255,.14);
  --line-strong:#2e4a73;
  --teal:#38e1ff;
  --teal-soft:rgba(56,225,255,.12);
  --amber:#fbbf24;
  --red:#f87171;
  --green:#34d399;
  --radius:18px;
  color-scheme:dark;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
#app .cs-wrap { background:var(--bg); border:1px solid var(--line); border-radius:var(--radius); padding:16px 14px 18px; color:#eef3fb; }
#app .cs-wrap * { box-sizing:border-box; }
#app .cs-wrap .card { background:var(--surface-2); border-color:var(--line); color:#eef3fb; }
#app .cs-wrap .muted { color:#9db0cc; }
#app .cs-h { font-size:22px; margin:2px 0 4px; color:#eef3fb; }
#app .cs-sub { color:#9db0cc; font-size:13.5px; line-height:1.45; margin:0 0 6px; }
#app .cs-head { margin-bottom:4px; }
#app .cs-tiles { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; margin-top:12px; }
@media (min-width:760px) { #app .cs-tiles { grid-template-columns:repeat(4,minmax(0,1fr)); } }
#app .cs-tile {
  background:linear-gradient(180deg,var(--surface-2),var(--surface));
  border:1px solid var(--line); border-radius:var(--radius);
  padding:16px 14px 14px; min-height:132px; display:flex; flex-direction:column; gap:4px;
  text-align:left; width:100%; min-width:0; color:#eef3fb; font:inherit;
}
button.cs-tile { cursor:pointer; }
button.cs-tile:hover { border-color:var(--teal); }
#app .cs-tile-label { font-size:12px; font-weight:700; letter-spacing:.4px; text-transform:uppercase; color:#9db0cc; }
#app .cs-tile-big { font-size:19px; font-weight:800; line-height:1.25; overflow-wrap:anywhere; }
#app .cs-tile-sub { font-size:12.5px; color:#9db0cc; overflow-wrap:anywhere; }
#app .cs-tile-open { margin-top:auto; color:var(--teal); font-weight:700; font-size:13px; }
#app .cs-fold-h { font-size:13px; font-weight:700; color:#9db0cc; margin:14px 0 6px; }
#app .cs-pay-rate { font-size:17px; font-weight:800; margin:8px 0; }
#app .cs-jobrow { width:100%; display:flex; align-items:center; gap:10px; padding:12px 2px; background:none; border:0; border-bottom:1px dashed #1e3355; color:#eef3fb; font:inherit; text-align:left; cursor:pointer; min-height:48px; min-width:0; }
#app .cs-jobrow:last-child { border-bottom:0; }
#app .cs-jobrow-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
#app .cs-jobrow-main b { overflow-wrap:anywhere; }
#app .cs-jobrow-main span { color:#9db0cc; font-size:12.5px; overflow-wrap:anywhere; }
#app .cs-chev { color:#9db0cc; font-size:20px; flex:none; }
#app .cs-back { background:none; border:0; color:var(--teal); font:inherit; font-weight:700; padding:10px 0; cursor:pointer; min-height:48px; }
#app .cs-crewrow { padding:10px 0; border-bottom:1px dashed #1e3355; }
#app .cs-crewrow:last-child { border-bottom:0; }
#app .cs-crewname { font-size:15px; }
#app .cs-you { background:var(--teal-soft); color:var(--teal); border:1px solid var(--line); padding:1px 7px; border-radius:999px; font-size:11px; font-weight:700; vertical-align:2px; }
#app .cs-actions { display:flex; gap:8px; flex-wrap:wrap; padding:12px 0 4px; }
#app .cs-gate { background:rgba(251,191,36,.10); border:1px solid rgba(251,191,36,.35); color:#f5d9a8; padding:10px 12px; border-radius:12px; font-size:13.5px; line-height:1.45; margin:8px 0; }
#app .cs-gate.ok { background:rgba(52,211,153,.10); border-color:rgba(52,211,153,.35); color:#b9f0d2; }
#app .cs-paper-sub { color:#9db0cc; font-size:12.5px; font-weight:700; margin:14px 0 4px; }
#app .cs-wrap .sf-jobform-row { background:var(--surface-2); border-color:var(--line); color:#eef3fb; width:100%; margin-top:6px; }
#app .cs-note { padding:8px 0; border-bottom:1px dashed #1e3355; font-size:14px; overflow-wrap:anywhere; }
#app .cs-note-send { display:flex; gap:8px; margin-top:12px; align-items:flex-start; }
#app .cs-note-send textarea { flex:1; min-width:0; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; color:#eef3fb; padding:10px; font:inherit; }
#app .cs-wrap .crew-msg-chip { background:var(--surface-2); border-color:var(--line-strong); color:#eef3fb; }
#app .cs-lab { display:block; margin:12px 0 4px; font-size:13px; color:#9db0cc; font-weight:600; }
#app #cs-settings .input, #app .cs-wrap .input { background:var(--surface-2); border:1px solid var(--line); color:#eef3fb; }
#app .cs-honesty { margin-top:12px; color:#9db0cc; font-size:13.5px; line-height:1.55; }
#app .cs-honesty b { color:#eef3fb; }
/* The office board's chrome never renders in the crew seat: Dispatch is
   his jobs only — no lookup, no dispatch door, no new-job button, no
   company calendar. (The .can-operate pieces are also class-hidden by
   applyRoleUI; this covers the static header pieces.) */
body.crew-mode #app #jobs-home > h2,
body.crew-mode #app #jobs-head-line,
body.crew-mode #app #jobs-head-gloss,
body.crew-mode #app #jobs-cal-fold { display:none; }

/* ============================================================
   Inbox + Setup (2026-11-15 conformance): the private .ib-* and
   .st-* copies of Home's shell are RETIRED — both tabs now render
   in the shared hm grammar above. Only the per-tab token blocks
   and a few structural hooks remain here.
   ============================================================ */
#app #tab-inbox {
  --bg:#0b1226;
  --surface:#101a33;
  --surface-2:#14203e;
  --line:rgba(148,178,255,.14);
  --line-strong:#2e4a73;
  --teal:#38e1ff;
  --teal-soft:rgba(56,225,255,.12);
  --amber:#fbbf24;
  --red:#f87171;
  --green:#34d399;
  --radius:18px;
  color-scheme:dark;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
#app #tab-more {
  --bg:#0b1226;
  --surface:#101a33;
  --surface-2:#14203e;
  --line:rgba(148,178,255,.14);
  --line-strong:#2e4a73;
  --teal:#38e1ff;
  --teal-soft:rgba(56,225,255,.12);
  --amber:#fbbf24;
  --red:#f87171;
  --green:#34d399;
  --radius:18px;
  color-scheme:dark;
}
/* Inbox thread rows: the unread dot + its read/unread toggle. */
#app .ib-unread-dot { width:9px; height:9px; border-radius:999px; background:var(--red); display:inline-block; flex:none; }
#app .ib-unread-dot.ghost { background:#2a3f61; }
#app .ib-dotbtn { width:38px; height:38px; border-radius:999px; border:1px solid var(--line-strong); background:var(--surface); display:inline-grid; place-items:center; cursor:pointer; flex:none; }
#app .ib-dotbtn:hover { border-color:var(--teal); }
/* Setup shell hooks: the derived headline line, the tail slot and
   the quiet foot line inside the one wrap. */
#app .st-head { padding:2px 2px 0; }
#app .st-sub { margin:0; color:#a9b6d3; font-size:14.5px; line-height:1.45; }
#app .st-tail { margin-top:14px; }
#app .st-foot { color:#6f84a3; font-size:12.5px; line-height:1.5; margin:14px 2px 0; }
/* Cards the Setup shell moves into fold bodies take panel geometry. */
#app #tab-more .hm-fold-body .card { background:var(--surface); border:1px solid var(--line); border-radius:18px; box-shadow:none; color:#eef3fb; margin:10px 0; }
#app #tab-more .hm-fold-body .muted { color:#a9b6d3; }
/* While the settings search runs, a matching fold's body shows. */
#app #more-home.searching .hm-fold .hm-fold-body { display:block; }

/* Wave D: the re-rate prompt (comparator tier i) — an explicit three-door
   question when a job date moves. Dark tokens only. */
.mc-rerate-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;z-index:1200;padding:16px}
.mc-rerate-card{background:var(--panel,#16181d);color:var(--text,#e8e9eb);border:1px solid var(--line,#2c2f36);border-radius:14px;max-width:440px;width:100%;padding:20px}
.mc-rerate-card h3{margin:0 0 8px}
.mc-rerate-doors{display:flex;flex-direction:column;gap:8px;margin:14px 0}

/* Wave D (ML-72): the shelf note — which form a job needs, in plain words. */
#app .sf-tpl-note{display:block;font-size:12.5px;color:var(--muted,#9db0cc);line-height:1.45;margin-top:4px}
/* Wave D (ML-71): a legacy list kept on file renders as text, never an input. */
#app .sf-legacy-note{border:1px dashed var(--line,#2c2f36);border-radius:10px;padding:10px 12px}
#app .sf-legacy-text{white-space:pre-wrap}

/* =====================================================================
 * Jobs simplification (2026-10-25) — the frozen drawing's shapes on the
 * Jobs surface: plain-figure calendar cells, the day list + fold scroll
 * boxes, the date-first creation flow, whole-row form doors (pass-8
 * geometry), the form + quote panels, and the dispatch board's editor.
 * Every scroll box uses the plain visible scrollbar — and NO
 * overscroll-behavior:contain anywhere (the touch dead-zone bug).
 * ===================================================================== */
#app .nj-scroll,
#app #f7-board .dp-needs,
#app #f7-board .dp-trucks {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
#app .nj-scroll::-webkit-scrollbar,
#app #f7-board .dp-needs::-webkit-scrollbar,
#app #f7-board .dp-trucks::-webkit-scrollbar { width: 8px; }
#app .nj-scroll::-webkit-scrollbar-thumb,
#app #f7-board .dp-needs::-webkit-scrollbar-thumb,
#app #f7-board .dp-trucks::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
#app .nj-scroll::-webkit-scrollbar-track,
#app #f7-board .dp-needs::-webkit-scrollbar-track,
#app #f7-board .dp-trucks::-webkit-scrollbar-track { background: transparent; }

/* --- face + board calendar cells --- */
#app #tab-jobs .jw-cal-day {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  width: 100%; min-height: 58px; padding: 6px 7px;
  font: inherit; color: inherit; text-align: left;
  background: none; border: 0; border-radius: 10px; cursor: pointer;
}
#app #tab-jobs .jw-cal-day .cd-num { font-weight: 700; font-size: 14px; }
#app #tab-jobs .jw-cal-day .cd-count { font-size: 11.5px; color: var(--muted); }
#app #tab-jobs .jw-cal-day .cd-needs { font-size: 11px; font-weight: 700; color: var(--amber); }
#app #tab-jobs .jw-cal-day .cd-needs .nd-short { display: none; }
@media (max-width: 640px) {
  #app #tab-jobs .jw-cal-day .cd-needs .nd-full { display: none; }
  #app #tab-jobs .jw-cal-day .cd-needs .nd-short { display: inline; }
}
#app #tab-jobs .jw-cal-day .cd-note { font-size: 11px; font-weight: 700; color: var(--teal); }
#app #tab-jobs .jw-cal-day.sel { background: rgba(56,225,255,.13); box-shadow: inset 0 0 0 2px var(--teal); }
#app #tab-jobs .jw-cal-day:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }

/* --- the day list + summary line + fold scroll boxes --- */
#app #tab-jobs .jw-day-title { margin: 18px 0 8px; }
#app #tab-jobs .jw-day-list {
  height: 400px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
#app #tab-jobs .jw-fold-list { max-height: 400px; overflow-y: auto; }
#app #tab-jobs .jw-sum-line { color: var(--muted); font-weight: 600; margin: 10px 0 2px; }
#app #tab-jobs .jw-chip.info { background: rgba(96,165,250,.13); border-color: rgba(96,165,250,.4); color: #93c5fd; }

/* --- creation flow + panels --- */
#app #tab-jobs .nj-sec-h { margin: 22px 0 4px; }
#app .nj-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { #app .nj-grid2 { grid-template-columns: 1fr; } }
#app .nj-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 16px; flex-wrap: wrap; }
#app #tab-jobs .form-err { color: var(--danger); font-weight: 600; }
#app #nj-form-list { max-height: 208px; overflow-y: auto; }
#app .nj-scrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(4,10,20,.66);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 18px 10px;
}
#app .nj-scrim.hidden { display: none; }
#app #nj-form-scrim { z-index: 80; }
#app .nj-sheet {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); width: min(680px, 100%);
}
#app .nj-sheet-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
#app .nj-sheet-head strong { flex: 1; }
#app .nj-sheet-body { padding: 14px; }
#app .nj-storage { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px 12px; margin: 6px 0; }
#app .nj-storage.hidden { display: none; }

/* --- whole-row form doors (pass-8 geometry) --- */
#app #tab-jobs .njf-row {
  display: flex; align-items: stretch; gap: 0; padding: 0;
  border-bottom: 1px solid var(--line); min-height: 64px;
}
#app #tab-jobs .njf-open {
  flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 10px 6px 10px 14px; align-self: stretch;
  background: none; border: 0; color: inherit; font: inherit;
  cursor: pointer; text-align: left;
}
#app #tab-jobs .njf-static { cursor: default; }
#app #tab-jobs .njf-name { flex: 1; font-weight: 600; }
#app #tab-jobs .njf-go { color: var(--teal); font-weight: 700; white-space: nowrap; }
#app #tab-jobs .njf-row .st { display: flex; align-items: center; padding-right: 10px; }
#app #tab-jobs .jw-form-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); min-height: 56px; }

/* --- pick lists (booking flow + board editor share the rows) --- */
#app .dp-pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 174px; overflow-y: auto; padding: 2px; margin-bottom: 10px; }
#app .dp-pick-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 48px; padding: 8px 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  color: inherit; font: inherit; cursor: pointer; text-align: left;
}
#app .dp-pick-row.on { border-color: var(--teal); background: rgba(56,225,255,.12); }
#app .dp-pick-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#app .dp-pick-name { font-weight: 700; }
#app .dp-pick-sub { font-size: 12.5px; color: var(--muted); }
#app .dp-pick-state { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
#app .dp-pick-row.on .dp-pick-state { color: var(--teal); }
#app .dp-warnbox {
  background: rgba(251,191,36,.13); border: 1px solid rgba(251,191,36,.5);
  color: var(--amber); border-radius: 12px; padding: 10px 12px;
  font-weight: 600; margin: 10px 0;
}
#app .dp-warnbox.hidden { display: none; }

/* --- dispatch board: calendar, note, editor, scroll caps --- */
#app #f7-board .dp-board-head .btn { margin-left: auto; }
#app #f7-board .dp-calcard { margin-bottom: 12px; }
#app #f7-board .dp-sumline { font-weight: 600; color: var(--muted); margin: 8px 2px; }
#app #f7-board .dp-availrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
#app #f7-board .dp-avail-lbl { font-weight: 700; }
#app #f7-board .dp-needs { max-height: 400px; overflow-y: auto; }
#app #f7-board .dp-board { max-height: 400px; overflow-y: auto; }
#app #f7-board .dp-trucks { max-height: 200px; overflow-y: auto; }
#app #f7-board .dp-hours-box { max-height: 160px; overflow-y: auto; }
#app #f7-board .dp-note-sec { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
#app #f7-board .dp-note-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
#app #f7-board .dp-note-jobs { max-height: 200px; overflow-y: auto; display: grid; gap: 8px; margin-bottom: 10px; }
#app #f7-board .dp-editor {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 14px; margin: 6px 0 12px; background: var(--surface);
}
#app #f7-board .dp-ed-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }

/* =====================================================================
 * SCROLL LAW + DRAWN BAR (2026-10-30, Brian's ruling; outline frame
 * withdrawn by Brian 2026-10-31).
 *
 * The Scroll Law: a box grows with its list up to its cap; under the
 * cap there is NO scroll bar, no fixed empty box, no feature for
 * nothing — and a drag moving the page on a fitting list is fine.
 * Past the cap the box stops growing, the PAGE NEVER GETS LONGER,
 * the list scrolls inside the box and the bar appears with the
 * scroll. NO overscroll-behavior:contain anywhere in this build
 * (the Oct 22 touch dead zone stays out).
 *
 * There is NO added outline/frame. Non-scroll boxes retain exactly
 * their baseline border/outline styling. On scroll boxes only,
 * scroll-box.js syncs a 12px hatched thumb inside the box's right
 * edge to the box's NATIVE scroll (display layer only — if that
 * script fails, native scrolling is untouched and the native bar
 * stays, because the native bar is hidden only on boxes the script
 * enhanced). The gray is the site's existing space gray #6b7686.
 * ===================================================================== */
#app {
  --mc-bar-w: 12px; /* fix round 3 (Brian 2026-10-31): bar 24px -> 12px */
  --mc-thumb-base: var(--line-strong, #6b7686);
  --mc-thumb-line: rgba(199, 210, 232, 0.55); /* --ft-muted as grip lines */
}

/* --- Piece 1: cap-and-scroll on the diagnosis census containers.
   400px = the Jobs family's primary-list cap. Arrangement only:
   no content or feature is removed; boxes grow with their list up
   to the cap, then scroll inside themselves. --- */
/* Home conformance (2026-11-15): the conformed tabs' lists leave
   the cap — content flows inside the one wrap and the page scrolls,
   as on Home. Only the Inbox conversations list keeps a cap (with
   the drawn bar), per the approved markup; the non-conformed
   surfaces below keep theirs. */
#app .td-body,
#app #crew-list,
#app #payroll-list,
#app #quote-list,
#app .bo-body,
#app #docs-list,
#app #notif-list,
#app #lead-forms-list,
#app .sf-sendlist,
#app #ib-conv-list,
#app [data-hm-needs-rows] {
  max-height: 400px; overflow-y: auto;
}

/* --- Slice One: Loads board (operator accounts) — conformed to
   Home's grammar 2026-11-15: rows are hm-fold-rows in hm-panels,
   chips are hm-chips, actions are hm-mini-btns. What remains here
   is the board's working furniture (drafts, forms, settle lines)
   in the family tokens. --- */
#app .ld-ex-main { flex: 1 1 220px; min-width: 0; }
#app .ld-ex-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 1; min-width: 0; max-width: 100%; }
#app .ld-flag, #app .ld-det, #app .ld-verdict { margin-top: 6px; }
#app .ld-settle-line { margin-top: 6px; font-size: 14px; }
#app .ld-settle-stmt { padding: 10px 0; border-top: 1px solid var(--line); }
#app .ld-settle-line-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 4px 0; }
#app .ld-settle-match { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#app .ld-settle-match input, #app .ld-qform input, #app .ld-settings input, #app .ld-draft-subject, #app .ld-draft-body {
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 12px;
  color: #eef3fb; font: inherit; padding: 10px 12px; min-height: 44px;
}
#app .ld-verdict { padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 12px; }
#app .ld-row-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 10px; flex-wrap: wrap; }
#app .ld-paper-zone { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
#app .ld-paper-zone-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #a9b6d3; margin-bottom: 2px; }
#app .ld-addr { font-size: 18px; }
/* The intake address is one long unbroken string; at phone widths it
   wraps, never pushes the page sideways (fit law — found by the
   fix-all width sweep at 320px on Loads; pre-existing on the base). */
#app .ld-addr strong, #app .ld-intake-line strong { overflow-wrap: anywhere; }
#app .ld-qform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#app .ld-settings { display: grid; gap: 10px; }
#app .ld-settings label { display: grid; gap: 4px; font-size: 13px; color: #a9b6d3; }
#app .ld-draft { margin-top: 10px; display: grid; gap: 8px; }
#app .ld-draft-body, #app .ld-draft-subject { width: 100%; box-sizing: border-box; }
#app .ld-draft-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#app .ld-detail { margin-top: 8px; display: grid; gap: 6px; }
/* --- Slice Four: the dock box + the Detention book --- */
#app .ld-det-box {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-top: 8px;
  background: var(--surface-2);
}
#app .ld-det-label { font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.8; }
#app .ld-det-clock { font-size: 34px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
#app .ld-det-box p { margin: 4px 0 8px; }
#app .ld-claim-row {
  display: flex; gap: 10px; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; padding: 10px 0; border-bottom: 1px dashed #1e3355;
}
#app .ld-claim-row:last-child { border-bottom: 0; }
#app .ld-claim-actions { display: flex; gap: 6px; flex-wrap: wrap; }
#app .ld-hand-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-top: 8px; }
#app .ld-hand-form label { display: grid; gap: 4px; font-size: 13px; }

/* --- The drawn bar (scroll-box.js): native bar hidden ONLY on
   enhanced boxes (.mc-sb-on is added by the script at enhance time,
   so a script failure leaves every native bar exactly as it was). --- */
#app .mc-sb-on { scrollbar-width: none; }
#app .mc-sb-on::-webkit-scrollbar { width: 0; height: 0; display: none; }
.mc-sb-wrap { position: relative; }
.mc-sb-band {
  position: absolute; top: 0; bottom: 0;
  right: 0;
  width: var(--mc-bar-w, 12px);
  z-index: 6; touch-action: none; cursor: pointer;
}
.mc-sb-thumb {
  position: absolute; left: 3px; right: 3px; top: 0; height: 100%;
  border-radius: 6px;
  background:
    /* 6px period (was 8px) so the diagonal grip lines stay legible
       on the 12px bar (fix round 3). */
    repeating-linear-gradient(45deg, var(--mc-thumb-line, rgba(199, 210, 232, 0.55)) 0 2px, transparent 2px 6px),
    var(--mc-thumb-base, #6b7686);
  will-change: transform;
}

/* Setup doors + search (2026-11-15 conformance): the doors list is
   an hm-panel of fold-row doors; the search row is the wrap's first
   panel with an hm-field-grade input. */
#app #tab-more .more-list { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:6px 16px; box-shadow:none; }
#app #tab-more .more-row { display:flex; align-items:center; gap:12px; width:100%; padding:12px 0; border:0; border-bottom:1px dashed #1e3355; background:none; color:#eef3fb; font:inherit; font-size:14.5px; font-weight:600; text-align:left; cursor:pointer; min-height:48px; box-shadow:none; }
#app #tab-more .more-row:last-child { border-bottom:0; }
#app #tab-more .more-row .more-open-word { margin-left:auto; font-size:12.5px; font-weight:700; color:var(--teal); white-space:nowrap; }
#app #tab-more .more-search-row { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:14px 16px; display:flex; gap:8px; align-items:center; margin-top:12px; }
#app #tab-more .more-search-row input { flex:1; min-width:0; background:var(--surface-2); border:1px solid var(--line-strong); border-radius:12px; color:#eef3fb; font:inherit; padding:11px 12px; min-height:48px; }

/* Inbox conversation door (2026-11-15): the fold row's main tap
   area is its own button so the read/unread toggle stays a
   separate door beside it. */
#app .ib-row-door { display:flex; gap:10px; align-items:center; flex:1 1 auto; min-width:0; background:none; border:0; color:inherit; font:inherit; text-align:left; cursor:pointer; padding:0; }
#app .ib-row-door:hover .fr-main b { color:var(--teal); }
#app #tab-inbox .hm-fold-row .fr-side { display:inline-flex; align-items:center; gap:8px; }

/* Board load rows (2026-11-15): a fold-row door line on top, the
   row's working lines below, dashed-separated inside the panel. */
#app .ld-rowbox { padding:12px 0; border-bottom:1px dashed #1e3355; }
#app .ld-rowbox:last-child { border-bottom:0; }
#app .ld-rowbox .hm-fold-row { border-bottom:0; padding:0; }
#app .ld-rowbox .fr-side { display:inline-flex; align-items:center; gap:8px; flex-wrap:wrap; }

/* Long derived aggregates (Setup faces, Inbox conversations) wrap
   inside their count pill on narrow screens instead of clipping at
   the fold's edge — the pill text is a live sentence, not a label. */
#app #tab-more .hm-fold-count, #app #tab-inbox .hm-fold-count { white-space:normal; overflow-wrap:anywhere; }

/* The needs-panel sub-line (Inbox "answers and callbacks"): the
   .hm-needs panel pads through its children; the sub carries the
   same inset as the head. */
#app .hm-needs-sub { margin:0; padding:0 16px 12px; font-size:13px; color:var(--muted); }
