/* PrimeRun Logistics — dark slate theme (matches the owner's dashboard):
   near-#0B1220 page, #131C2E cards, subtle borders, 14px corners, soft shadow.
   Typography: compact professional scale — 14px base, system font stack,
   tabular numerals for money/figure columns. */
:root {
  --bg: #0b1220; --panel: #131c2e; --panel2: #1b2942; --line: #263650;
  --text: #e9eff8; --muted: #9fb0c9; --accent: #f5a623; --accent2: #2f81f7;
  --ok: #34c774; --bad: #f0564c; --warn: #e3b341; --info: #4da3ff;
  --shadow: 0 8px 24px rgba(2, 6, 16, .45);
  /* Sticky-bar offset (pf-deploy135): the layout script measures the
     app header and overwrites this on <html>; 54px is the no-JS
     fallback (slim sidebar topbar ≈53px, full header ≈55px). */
  --stickytop: 54px;
}
* { box-sizing: border-box; }
/* The hidden attribute must always win — component classes like .btn set
   their own display, which would otherwise resurrect hidden elements
   (the push-notification device controls on the Password page rely on
   this). */
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font-family: inherit; }
a { color: #6cb2ff; }
header { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  padding: 10px 16px; background: #0e1626; border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(2, 6, 16, .5); position: sticky; top: 0; z-index: 5; }
.brand { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.brand span { color: var(--accent); }
/* Login page brand block: the header .brand, centered and enlarged
   above the sign-in form (the login page has no header of its own). */
.loginbrand { text-align: center; margin-bottom: 18px; }
.loginbrand .brand { font-size: 30px; }
.loginbrand .brandsub { margin-top: 5px; font-size: 13px; }
nav { display: flex; flex-wrap: wrap; gap: 2px; }
nav a { color: var(--text); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; border-bottom: 3px solid transparent; }
nav a:hover { background: var(--panel2); }
/* The nav link for the section the user is in: no pill — full-strength
   text with a 3px orange underline in the brand accent (the same orange
   as "Logistics" in the header). Every nav link carries a transparent
   3px bottom border, so link heights never change when the active state
   moves, and on the flex-wrapped mobile rows the underline stays inside
   its own link instead of overlapping the row below. */
nav a.active { background: transparent; color: var(--text); border-bottom: 3px solid var(--accent); }
nav a.active:hover { background: transparent; border-bottom: 3px solid var(--accent); }
/* Grouped nav headers (office nav): a button styled like a nav link,
   with a dropdown panel of its group's pages. The panel uses the
   page's card colors (var(--panel)) so it reads as a floating card —
   including under the dark headers of the light themes. */
.navgroup { position: relative; display: inline-flex; }
.navgroup-btn { background: none; border: none; border-bottom: 3px solid transparent; color: var(--text);
  padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px; }
.navgroup-btn:hover { background: var(--panel2); }
.navgroup-btn.active { border-bottom: 3px solid var(--accent); }
.navgroup .caret { font-size: 15px; font-weight: 800; opacity: 1; line-height: 1; color: var(--accent); }
.navgroup .navmenu { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 6px; min-width: 180px; flex-direction: column; gap: 2px; }
.navgroup.open .navmenu { display: flex; }
/* Phones: the PrimeRun Logistics brand takes the full first header row,
   centered, with the nav wrapping underneath it. */
@media (max-width: 700px) {
  header .brand { flex: 1 1 100%; text-align: center; }
  /* Aligned phone header (Satender, 2026-11-22): every wrapped row
     centered with even gaps, and the bell / name / Log out row centered
     too (its desktop margin-left:auto would push it to the edge). */
  header { justify-content: center; }
  header nav { justify-content: center; column-gap: 8px; row-gap: 4px; }
  header .who { margin-left: 0; }
}
/* The last group (Admin) right-aligns its menu so it cannot spill off
   the right edge — desktop only: on a phone the group may wrap to the
   START of a row, where right-aligning would push the menu off the
   left edge instead. */
@media (min-width: 700px) {
  .navgroup:last-child .navmenu { left: auto; right: 0; }
}
.navgroup .navmenu a { display: block; color: var(--text); padding: 8px 10px; border-radius: 8px;
  border-bottom: none; white-space: nowrap; }
.navgroup .navmenu a:hover { background: var(--panel2); }
.navgroup .navmenu a.active { background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-bottom: none; color: var(--text); font-weight: 700; }
.who { margin-left: auto; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
main { max-width: 1180px; margin: 0 auto; padding: 16px 14px 32px; }
main.narrow { max-width: 460px; margin-top: 6vh; }
h1 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 4px 0 14px; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
h2.sec { margin: 20px 0 10px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
h3 { font-size: 14px; font-weight: 600; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.company h2 { margin-bottom: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.grid.loads { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; color: var(--muted); font-weight: 600; box-shadow: var(--shadow); }
.stat span { display: block; font-size: 20px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.ok { color: var(--ok) !important; } .bad { color: var(--bad) !important; }
.warn { color: var(--warn); font-weight: 600; } .err { color: var(--bad); font-weight: 600; }
/* Inline SVG icon spans (pf-deploy131): scale with the surrounding text. */
.ic { display: inline-flex; align-items: center; vertical-align: -0.18em; }
.ic svg { width: 1.12em; height: 1.12em; display: block; }
.ic.ok { color: var(--ok, #34c774); } .ic.warn { color: var(--warn, #e3b341); } .ic.bad { color: var(--bad, #f0564c); }
.muted { color: var(--muted); }
.sub { background: var(--panel2); border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.suggest { border: 1px solid var(--accent); }
.btn { display: inline-block; background: var(--accent2); color: #fff; border: none; text-decoration: none;
  padding: 7px 12px; min-height: 34px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn.small { padding: 5px 10px; min-height: 28px; font-size: 12px; }
.btn.big { width: 100%; padding: 10px; font-size: 14px; margin-top: 8px; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.danger { background: var(--bad); }
form.inline { display: inline; }
.form .fld { display: block; margin-bottom: 10px; }
.fld span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
input, select, textarea { width: 100%; padding: 8px 10px; font-size: 14px; color: var(--text);
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent2); }
input:disabled, select:disabled { opacity: .65; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent2); transform: scale(1.2); margin: 0 4px; }
.checkline { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 10px 0 4px; cursor: pointer; }
.inline-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin-top: 10px; }
.inline-form .fld { margin-bottom: 0; flex: 1 1 180px; }
.form.wide .cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 14px; }
.tblwrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl td.c, .tbl th.c { text-align: center; }
/* Sortable list headers (Find + Filter + Sort pattern): the header link
 * inherits the muted header style in every theme; the active column
 * carries a small typographic arrow marker. */
.tbl th a.sortlink { color: inherit; text-decoration: none; white-space: nowrap; }
.tbl th a.sortlink:hover { text-decoration: underline; }
.tbl th .sortarrow { font-size: 10px; }
.matrix td.c { text-align: center; }
.netrow td { font-size: 14px; font-weight: 700; border-top: 2px solid var(--line); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--panel2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.b-candidate { border-color: var(--accent2); color: #9ec5ff; }
.b-booked, .b-picked-up { border-color: var(--warn); color: #eac26a; }
.b-in-transit { border-color: var(--accent); color: var(--accent); }
.b-delivered, .b-ready, .b-available { border-color: var(--ok); color: var(--ok); }
.b-cancelled, .b-not-ready { border-color: var(--bad); color: var(--bad); }
.b-expired { border-color: var(--muted); color: var(--muted); }
/* Compliance item statuses (Overdue is computed from the due date, never stored) */
.b-not-started { border-color: var(--muted); color: var(--muted); }
.b-in-progress { border-color: var(--accent2); color: #9ec5ff; }
.b-done { border-color: var(--ok); color: var(--ok); }
.b-not-applicable { border-color: var(--line); color: var(--muted); }
.b-overdue { border-color: var(--bad); color: #ff8d85; background: rgba(240, 86, 76, .12); }
.card.due-soon { border-color: var(--warn); }
.card.is-overdue { border-color: var(--bad); }
/* Expense workflow statuses */
.b-pending { border-color: var(--warn); color: #eac26a; }
.b-approved { border-color: var(--accent2); color: #9ec5ff; }
.b-paid { border-color: var(--ok); color: var(--ok); }
/* Driver-pay settlement (My Pay trips + the load detail pay block):
   Cleared is the settled state, Pending reuses the amber above */
.b-cleared { border-color: var(--ok); color: var(--ok); background: rgba(52, 199, 116, .12); }
/* Verdict pills (always carry a text label — never color alone) */
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  border: 1px solid var(--line); white-space: nowrap; }
.v-excellent { border-color: #f5c542; color: #ffd75e; background: rgba(245, 197, 66, .14); }
.v-good { border-color: var(--ok); color: #5bd98a; background: rgba(52, 199, 116, .12); }
.v-average { border-color: var(--warn); color: #eac26a; background: rgba(227, 179, 65, .12); }
.v-loss { border-color: var(--bad); color: #ff8d85; background: rgba(240, 86, 76, .12); }
.v-call { border-color: #64748b; color: #a8bdd4; background: rgba(100, 116, 139, .15); }
/* Load cards */
.loadcard h3 { margin-bottom: 2px; font-size: 15px; }
.loadcard h3 a { color: var(--text); text-decoration: none; }
.loadcard h3 a:hover { color: #6cb2ff; }
.brokerline { color: var(--muted); margin: 0 0 6px; }
.figures { display: flex; gap: 28px; margin: 8px 0 2px; }
.fig span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.fig b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Stacked cost breakdown bar + legend */
.costbar { display: flex; align-items: stretch; height: 8px; border-radius: 4px; overflow: hidden; background: var(--panel2); margin: 10px 0 6px; }
.costbar .seg { display: block; flex: 0 0 auto; margin: 0; padding: 0; border: 0; border-radius: 0; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 14px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend .leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.legend .leg b { color: var(--text); }
/* The driver-pay item ("Driver pay $840.00 (30% of gross)") is the
   longest in the legend: it spans the full card width so it stays on
   one line in the two-column grid on laptop/desktop too. */
.legend .leg.wide { grid-column: 1 / -1; }

/* ---- Home-screen app: install bar + safe areas ----
   The bar is injected on app pages and the login page but only ever
   un-hidden by its script in a phone browser that can install the
   app (never in standalone mode, never after a dismissal). */
.installbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--panel); color: var(--text);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, .25);
  font-size: 14px;
}
.installbar[hidden] { display: none; }
.installbar .ib-text { flex: 1; line-height: 1.35; }
.installbar .ib-x {
  background: none; border: none; color: var(--muted);
  font-size: 15px; padding: 6px; cursor: pointer;
}
body.has-installbar main { padding-bottom: 84px; }
header { padding-top: env(safe-area-inset-top, 0px); }

/* ---- Left sidebar layout (office, desktop ≥1024px) ----
   ezLoads-style (Satender, 2026-11-22): a fixed dark sidebar carries
   the brand and the full navigation; the header shrinks to a slim
   topbar (hamburger + bell + user). Below 1024px the sidebar is gone
   and the header brand + grouped nav render exactly as before.
   Drivers never get the sidebar (no has-sidebar body class). The
   sidebar colors ride per-theme variables so all three themes keep
   their own dark bar: near-black (Dark), deep navy (Blue & White),
   charcoal (Green & White). The active item is a solid accent fill,
   like ezLoads. */
:root { --side-bg: #0e1626; --side-text: #e9eff8; --side-muted: #9fb0c9; --side-hover: rgba(255, 255, 255, .07); }
body.theme-alvys { --side-bg: #0a2540; --side-text: #eaf1fb; --side-muted: #a9bcd6; --side-hover: rgba(255, 255, 255, .13); }
body.theme-ezloads { --side-bg: #1e232c; --side-text: #eef2f6; --side-muted: #9aa7b4; --side-hover: rgba(255, 255, 255, .09); }
.sidebar { display: none; }
.side-toggle { display: none; }
@media (min-width: 1024px) {
  body.has-sidebar { padding-left: 224px; }
  body.has-sidebar.side-collapsed { padding-left: 60px; }
  .sidebar { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0;
    width: 224px; z-index: 40; background: var(--side-bg); color: var(--side-text);
    border-right: 1px solid var(--line); }
  body.side-collapsed .sidebar { width: 60px; }
  /* The fixed install bar spans the content area only — never the
   * sidebar (it used to cover the sidebar footer and the nav's last
   * rows on desktop). */
  body.has-sidebar .installbar { left: 224px; }
  body.has-sidebar.side-collapsed .installbar { left: 60px; }
  body.has-sidebar header .brand, body.has-sidebar header nav { display: none; }
  .side-toggle { display: inline-flex; align-items: center; justify-content: center;
    background: none; border: none; color: var(--text); font-size: 18px; line-height: 1;
    padding: 7px 9px; border-radius: 8px; cursor: pointer; }
  .side-toggle:hover { background: var(--panel2); }
  body.theme-alvys .side-toggle, body.theme-ezloads .side-toggle { color: #fff; }
  body.theme-alvys .side-toggle:hover, body.theme-ezloads .side-toggle:hover { background: rgba(255, 255, 255, .13); }
  .side-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700;
    letter-spacing: -.01em; padding: 14px 16px 12px; white-space: nowrap; overflow: hidden; }
  .side-brand .sb-text span { color: var(--accent); }
  body.theme-alvys .side-brand .sb-text span { color: #6cb2ff; }
  .sidebar .sidenav { display: block; flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 8px 12px; }
  .sidebar .sidenav a { display: flex; align-items: center; gap: 10px; color: var(--side-text);
    text-decoration: none; padding: 6.5px 10px; border-radius: 8px; font-size: 13.5px;
    font-weight: 600; border-bottom: none; margin-bottom: 2px; }
  .sidebar .sidenav a:hover { background: var(--side-hover); }
  .sidebar .sidenav a.active { background: var(--accent); color: #191104; border-bottom: none; }
  body.theme-alvys .sidebar .sidenav a.active { background: #1f6bff; color: #fff; }
  body.theme-ezloads .sidebar .sidenav a.active { background: #16b163; color: #fff; }
  .side-ico { width: 20px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
  .side-ico svg { width: 18px; height: 18px; display: block; }
  .sidebar .side-ico svg { color: #ffffff; }
  .side-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidegroup-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: none;
    border: none; color: var(--side-text); padding: 6.5px 10px; border-radius: 8px; font-size: 13.5px;
    font-weight: 600; cursor: pointer; font-family: inherit; margin-bottom: 2px; text-align: left; }
  .sidegroup-btn:hover { background: var(--side-hover); }
  /* ezLoads-style chevron: a clean stroked arrow in the muted sidebar
     tone, flipping up when the group is open. */
  .side-caret { color: var(--side-muted); display: inline-flex; align-items: center; line-height: 1; transition: transform .15s; }
  .sidegroup.open .side-caret { transform: rotate(180deg); }
  .sidegroup-items { display: none; }
  .sidegroup.open .sidegroup-items { display: block; }
  .sidegroup-items a { padding-left: 40px; }
  /* Sub-items are marked with a small dot and keep (almost) the full
     row width, so long labels like "Additions/Deductions" never
     truncate: no box, no big indent — just the dot. The group header
     itself stays tinted while it is open. */
  .sidegroup.open > .sidegroup-btn { background: var(--side-hover); }
  .sidegroup .sidegroup-items a { padding-left: 34px; font-size: 13px; position: relative; }
  .sidegroup .sidegroup-items a .side-ico { display: none; }
  .sidegroup .sidegroup-items a::before { content: ''; position: absolute; left: 16px; top: 50%;
    width: 5px; height: 5px; margin-top: -3px; border-radius: 50%; background: var(--side-muted); }
  .sidegroup .sidegroup-items a.active::before { background: currentColor; }
  .side-foot { padding: 8px 16px 10px; font-size: 11px; color: #fff; line-height: 1.5;
    border-top: 1px solid rgba(255, 255, 255, .08); white-space: nowrap; overflow: hidden; }
  .sidebar .side-foot a { color: #fff; }
  .sidebar .side-foot a:hover { color: #fff; }
  .side-social { margin-top: 0; display: flex; gap: 8px; }
  .side-site { margin-top: 6px; }
  .sidebar .side-social a { width: 30px; height: 30px; border: 1px solid rgba(255, 255, 255, .38); border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; color: #fff; }
  .sidebar .side-social a:hover { border-color: #fff; color: #fff; }
  .side-social svg { width: 15px; height: 15px; }
  .sidebar .side-social svg { color: #ffffff; }
  /* Arrange mode (per-user sidebar order): the button under the nav,
   * the save bar that replaces it while arranging, and the drag
   * affordances. The bar is [hidden] until Arrange is tapped. */
  .side-arrange-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; color: var(--side-text);
    border-radius: 8px; padding: 6.5px 10px; font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit; text-align: left; margin-bottom: 2px; }
  .side-arrange-btn:hover { background: var(--side-hover); }
  .side-arrangebar { padding: 10px 12px 4px; border-top: 1px solid rgba(255, 255, 255, .08); }
  .side-arrangebar .sab-note { display: block; font-size: 11px; color: var(--side-muted); line-height: 1.45; margin-bottom: 8px; }
  .side-arrangebar button { border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: inherit; margin: 0 6px 6px 0; }
  .side-arrangebar .sab-save { background: var(--accent); color: #191104; border: none; }
  body.theme-alvys .side-arrangebar .sab-save { background: #1f6bff; color: #fff; }
  body.theme-ezloads .side-arrangebar .sab-save { background: #16b163; color: #fff; }
  .side-arrangebar .sab-btn { background: none; border: 1px solid var(--side-muted); color: var(--side-text); }
  body.arranging .sidebar .sidenav a, body.arranging .sidebar .sidegroup { outline: 1px dashed var(--side-muted); outline-offset: -3px; cursor: grab; }
  body.arranging .sidebar .sidenav .dragging { opacity: .45; }
  body.arranging .side-caret { visibility: hidden; }
  body.side-collapsed .side-arrangebar { display: none; }
  /* Icon-rail mode: labels, carets, group items and the footer hide;
     icons center. Clicking a group icon un-collapses (see SIDEBAR_JS). */
  body.side-collapsed .sb-text, body.side-collapsed .side-label,
  body.side-collapsed .side-caret, body.side-collapsed .side-foot,
  body.side-collapsed .sidegroup-items { display: none; }
  body.side-collapsed .side-brand { justify-content: center; padding: 14px 0 12px; }
  body.side-collapsed .sidebar .sidenav a, body.side-collapsed .sidegroup-btn { justify-content: center; padding: 9px 0; }
  body.side-collapsed .sidebar .navbadge { display: none; }
}

/* Reports filter form: fields in two columns on wider screens. */
.formgrid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 700px) { .formgrid { grid-template-columns: 1fr 1fr; } }
/* Phones: the legend goes single-column so every cost item — label and
   amount together — fits on one line instead of the amount wrapping
   under a long label in a narrow grid cell. */
@media (max-width: 700px) {
  .legend { grid-template-columns: 1fr; }
  .legend .leg b { white-space: nowrap; }
}
/* Load triage: badges, toggle buttons, view tabs, pull status */
.tri-short { border-color: #f5c542; color: #ffd75e; background: rgba(245, 197, 66, .14); }
.tri-backup { border-color: #64748b; color: #a8bdd4; background: rgba(100, 116, 139, .15); }
.tri-disc { border-color: #7a4a45; color: #c98d86; background: rgba(240, 86, 76, .08); }
.triagerow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.btn.tri-on { background: var(--accent); color: #191204; }
.btn.pull { background: var(--accent); color: #191204; }
.loadsbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pullnote { margin: 2px 0 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.tab { color: var(--muted); text-decoration: none; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--panel); }
.tab:hover { color: var(--text); }
.tab.on { color: #fff; background: var(--accent2); border-color: var(--accent2); }
.tab .cnt { font-variant-numeric: tabular-nums; opacity: .75; }
/* Compliance quick actions + attached documents: a faded button is a
   spent quick action (status already set; Edit re-arms it), and the
   documents block groups an item's files by period, newest first. */
.btn.faded { opacity: .45; }
/* The compliance card's action row is a wrapping flex row: the 8px gap
   keeps even spacing between the buttons on one line AND puts air
   between the buttons and the Change Status pill when it wraps to the
   next line on a phone (as plain inline content they nearly touched). */
.cactions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* "Change Status to" pill: sits in the card's button row like the other
   small buttons, with a borderless dropdown inside it. */
.cstatuspick { display: inline-flex; align-items: center; gap: 6px; min-height: 28px;
  padding: 2px 4px 2px 10px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 12px; font-weight: 600; vertical-align: middle; white-space: nowrap; max-width: 100%; }
/* width: auto is essential: the global form rule sets select width to
   100%, which stretched the pill across the card and wrapped its label
   onto two lines on phones. */
.cstatuspick select { border: none; background: transparent; color: inherit; font: inherit; padding: 2px;
  width: auto; min-width: 0; flex: none;
  /* appearance: none is the real phone fix: iOS Safari sizes a native
     select by its own rules and pushed the value + chevron to the
     pill's right edge, leaving a gap after the label. Without the
     native appearance the select hugs its text like a normal box, and
     the chevron below replaces the native one. */
  -webkit-appearance: none; appearance: none; padding-right: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%239fb0c9' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 2px center; }
/* Status color coding — built on the per-theme --ok/--bad/--warn/--info/
   --muted variables, so the same colors read correctly in Dark, Blue &
   White and Green & White: green = Done, blue = In Progress, amber =
   Due soon, red = Overdue, gray = Not started. */
.btn.done { background: var(--ok); }
.btn.prog { background: var(--info); color: #fff; }
.cstatuspick.cs-done { border-color: var(--ok); color: var(--ok); }
.cstatuspick.cs-progress { border-color: var(--info); color: var(--info); }
.cstatuspick.cs-notstarted { border-color: var(--muted); color: var(--muted); }
.cstatuspick.cs-na { border-color: var(--line); color: var(--muted); }
.tabs .tab.t-all { color: var(--accent2); border-color: var(--accent2); background: color-mix(in srgb, var(--accent2) 8%, transparent); }
.tabs .tab.t-all.on { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.tabs .tab.t-overdue { color: var(--bad); border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.tabs .tab.t-overdue.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.tabs .tab.t-duesoon { color: var(--warn); border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.tabs .tab.t-duesoon.on { background: var(--warn); border-color: var(--warn); color: #fff; }
.tabs .tab.t-progress { color: var(--info); border-color: var(--info); background: color-mix(in srgb, var(--info) 10%, transparent); }
.tabs .tab.t-progress.on { background: var(--info); border-color: var(--info); color: #fff; }
.tabs .tab.t-notstarted { color: var(--muted); border-color: var(--muted); background: color-mix(in srgb, var(--muted) 10%, transparent); }
.tabs .tab.t-notstarted.on { background: var(--muted); border-color: var(--muted); color: #fff; }
.tabs .tab.t-done { color: var(--ok); border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.tabs .tab.t-done.on { background: var(--ok); border-color: var(--ok); color: #fff; }
/* Sticky tab/filter bars (pf-deploy135): on long list pages the
   category tabs + Find form pin directly under the app header so the
   categories stay reachable while scrolling (Satender, 2026-11-25).
   top is var(--stickytop) — the header's measured height, published
   by the layout script because the header wraps (slim topbar with
   the sidebar, brand + nav rows on phones), so no fixed pixel value
   is right on every screen. z-index 4 sits below the header
   (z-index 5, whose dropdown menus therefore still paint above the
   bar) and above page content. The background is var(--panel) — a
   solid, opaque surface color in all three themes (dark #131c2e,
   Alvys #ffffff, ezLoads #ffffff) — so rows scrolling underneath
   never show through; the soft bottom shadow reads as a frozen
   header. Bars that are already .card forms keep the card's own
   border, radius and padding; the :not(.card) variant (tab rows,
   wrapped tab+form pairs, lone inline forms) gets the panel-strip
   treatment so every bar looks the same. */
.stickybar { position: sticky; top: var(--stickytop, 54px); z-index: 4;
  margin-top: 0; background: var(--panel);
  box-shadow: 0 14px 20px -14px rgba(2, 6, 16, .55); }
.stickybar:not(.card) { border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 12px; }
.stickybar .tabs { margin: 0; }
.stickybar .tabs + .inline-form { margin-top: 8px; }
.cdocs { margin-top: 8px; }
.cdocs p { margin: 4px 0; }
.cdoc-body { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 6px; }
.docgroup-h { font-weight: 700; margin: 8px 0 2px; }
.cdoc-row { padding: 2px 0; overflow-wrap: anywhere; }
.cdoc-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.cdoc-form input[type="file"] { max-width: 100%; }
/* Return-load (backhaul) suggestions: ranked mini-rows on the dispatch
   board and the load detail page */
.retrow { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center;
  padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
.retrow:first-of-type { border-top: none; padding-top: 2px; }
.retlane a { color: var(--text); font-weight: 600; text-decoration: none; }
.retlane a:hover { color: #6cb2ff; }
/* Notifications: header bell + the /notifications list. The bell sits in
   the header for every role (drivers included); its badge is the same
   .navbadge pill the chat link uses, positioned over the bell icon. */
.bell { position: relative; display: inline-flex; align-items: center; text-decoration: none; font-size: 17px; line-height: 1;
  padding: 6px 4px; margin-left: auto; }
.bell svg { width: 19px; height: 19px; display: block; color: #F5A623; stroke: #F5A623; fill: none; }
.bell .navbadge { position: absolute; top: -2px; right: -10px; margin-left: 0; }
.bell + .who { margin-left: 0; }
.notiflist form { margin: 0 0 8px; }
.notifrow { display: block; width: 100%; text-align: left; font: inherit; cursor: pointer;
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.notifrow:hover { background: var(--panel2); }
.notifrow.unread { border-color: var(--accent); background: var(--panel2); }
.notiftitle { font-weight: 600; }
.notiftime { float: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.notifbody { color: var(--muted); }
.checkline { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
/* Team chat: conversation list, message thread, composer, voice notes */
.navbadge { display: inline-block; background: var(--bad); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; padding: 1px 7px; margin-left: 6px; vertical-align: 2px;
  font-variant-numeric: tabular-nums; }
.chatwrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 12px; align-items: start; }
/* Grid items default to min-width:auto, so a wide child (the composer row)
   can force the whole track — and the page — past the viewport. Let the
   panes shrink to their track instead. */
.chatwrap > * { min-width: 0; }
.convs { padding: 8px; }
.conv { display: block; padding: 9px 10px; border-radius: 10px; color: var(--text);
  text-decoration: none; border: 1px solid transparent; }
.conv:hover { background: var(--panel2); }
.conv.on { background: rgba(47, 129, 247, .16); border-color: var(--accent2); }
.conv .navbadge { float: right; margin-left: 8px; }
.convname { font-weight: 600; }
.convsub { display: block; color: var(--muted); font-size: 12px; }
.chatpane { display: flex; flex-direction: column; }
.chathead { margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 4px 2px 10px; }
.msg { max-width: 78%; align-self: flex-start; }
.msg.me { align-self: flex-end; }
.msgmeta { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.msg.me .msgmeta { text-align: right; }
.bubble { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 11px; overflow-wrap: anywhere; }
.msg.me .bubble { background: rgba(47, 129, 247, .18); border-color: var(--accent2); }
.bubble audio { display: block; margin-top: 4px; max-width: 100%; height: 36px; }
.composer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
/* The text box takes the flexible share of the row but may shrink to zero
   (an <input>'s automatic minimum is its ~20-character intrinsic size,
   which at driver-ui sizes is wider than a phone screen once the Voice
   and Send buttons are added — that pushed both buttons off-screen).
   With a 9rem basis the row wraps instead: input on its own line,
   buttons fully visible underneath. */
.composer input[type="text"] { flex: 1 1 9rem; min-width: 0; width: auto; }
.composer .btn { flex: 0 0 auto; }
#micBtn.rec { background: var(--bad); color: #fff; }
.recbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.recdot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: recpulse 1s infinite; }
@keyframes recpulse { 50% { opacity: .25; } }
.recbar audio { height: 32px; max-width: 100%; }
/* AI assistant page: the thread bubbles reuse the team-chat styles above;
   the pane is single-column and the clear-history action sits under it */
.assistantpane { max-width: 880px; }
.assistantpane .thread { max-height: 58vh; }
.bubble .listenbtn { margin-top: 6px; }
.clearhist { margin-top: 2px; max-width: 880px; text-align: right; }
/* Load form + live calculator panel */
.formcalc { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.calc { position: sticky; top: 86px; }
.calc-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.calc-net { font-size: 22px; font-weight: 700; line-height: 1.2; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.calc-sub { color: var(--muted); font-weight: 600; font-size: 13px; }
.calc-be { margin-top: 10px; font-weight: 700; }
footer { text-align: center; color: var(--muted); padding: 14px; font-size: 12px; }
/* Driver onboarding states + applicant pipeline statuses */
.b-expiring { border-color: #e07b39; color: #f2a65a; }
.b-new { border-color: var(--accent); color: var(--accent); }
.b-contacted { border-color: var(--accent2); color: #9ec5ff; }
.b-interview { border-color: #b58cff; color: #cdb2ff; }
.b-offer { border-color: var(--warn); color: #eac26a; }
.b-hired { border-color: var(--ok); color: var(--ok); }
.b-rejected { border-color: var(--bad); color: var(--bad); }
.flag { color: var(--bad); font-weight: 700; }
.missinglist { margin: 4px 0 8px; padding-left: 20px; }
.missinglist li { margin: 2px 0; }
.compliance a { font-weight: 700; }
/* Public driver application (/apply) */
.apply-tag { font-size: 16px; font-weight: 700; margin-top: 0; }
.apply-points { margin: 6px 0 2px; padding-left: 20px; font-size: 15px; }
.apply-points li { margin: 4px 0; }
.hp { display: none; }
/* Receipt scanner */
.scanbox input[type="file"] { margin-bottom: 4px; }
.lineitem { font-size: 12px; }
/* Truck photos: five fixed slots (Front / Left Side / Right Side /
   Inside / Back) in a responsive grid. A filled slot shows the WHOLE
   photo inside a uniform frame (object-fit: contain — nothing is
   cropped; the panel-tone background fills any letterbox bars, and
   clicking the photo opens it full-size); an empty one is a dashed
   placeholder in the panel tones, so the grid reads the same in the
   dark theme. */
.photogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.photoslot h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.photoslot a { display: block; }
.truckphoto { display: block; width: 100%; height: 180px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); }
.photoph { height: 180px; display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--line); border-radius: 10px; background: var(--panel2);
  color: var(--muted); font-weight: 600; }
.photometa { font-size: 12px; margin: 6px 0 0; }
.photoform { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.photoform .btn { align-self: flex-start; }
/* Trailer inspections: numbered checks with Good/Problem marks, a
   comment box, and per-check photo slots (camera-first on phones). All
   colors come from the theme variables, so every skin carries them. */
.inspnum { display: inline-block; font-size: 12px; font-weight: 800; color: var(--accent2);
  border: 1px solid var(--accent2); padding: 0 5px; border-radius: 6px; }
.dbtag { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--bad);
  border: 1px solid var(--bad); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.insphead { margin: 0 0 8px; }
.insppill { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.insppill.good { color: var(--ok); border-color: var(--ok); }
.insppill.avg { color: var(--warn); border-color: var(--warn); }
.insppill.bad { color: var(--bad); border-color: var(--bad); }
.inspmark { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inspmark input { flex: 1 1 150px; width: auto; }
.photostatus { color: var(--warn); font-size: .85em; margin: 2px 0 0; }
.btn.savedflash { background: var(--ok) !important; border-color: var(--ok) !important; color: #fff !important; }
.inspbtn:disabled { opacity: .55; }
/* Mark buttons always carry their own color (Satender's ask): Good
 * green, Average yellow, Problem red, Not available light gray.
 * The chosen mark gets a heavy inset ring + bold text so the
 * current state stays unmistakable next to the pill. */
.inspmark .inspbtn[value="good"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.inspmark .inspbtn[value="average"] { background: #f7c948; border-color: #f7c948; color: #1a1405; }
.inspmark .inspbtn[value="problem"] { background: var(--bad); border-color: var(--bad); color: #fff; }
.inspmark .inspbtn[value="na"] { background: #d9dee4; border-color: #c6cdd4; color: #23272e; }
.inspbtn.good-on, .inspbtn.avg-on, .inspbtn.bad-on, .inspbtn.na-on {
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.25); font-weight: 800; }
.inspthumb { display: block; width: 100%; max-width: 320px; height: 180px; object-fit: contain;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; margin: 6px 0; }
.inspthumb.report { height: 90px; max-width: 140px; margin: 0; }
.inspphotoforms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.inspphotoform { margin: 0; }
.inspphotoform label.btn { cursor: pointer; }
.inspsecrow td { background: var(--panel2); }
.inspsecbar { background: var(--panel2); border-radius: 8px; padding: 8px 10px; font-weight: 700; margin: 14px 0 2px; }
.inspsecbar:first-child { margin-top: 0; }
.inspreprow { padding: 10px 0; border-bottom: 1px solid var(--line); }
.inspreprow:last-child { border-bottom: none; }
.insprepline { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.insprepmain { flex: 1; min-width: 0; }
.insprepside { flex: none; }
.insprepcomment { color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.insprepphoto { margin-top: 6px; }
/* Bigger check cards + one-at-a-time step mode (yard use on phones) */
.card.inspitem { padding: 20px 18px; margin-bottom: 16px; }
.insphead { font-size: 17px; line-height: 1.4; margin-bottom: 12px; }
.inspnum { font-size: 13px; padding: 1px 7px; }
.insppill { font-size: 13px; padding: 3px 10px; }
.insppill.na { color: var(--text); border-color: var(--muted); background: var(--panel2); }
.inspmark { gap: 10px; }
.inspmark .btn { min-height: 54px; }
.inspmark .inspbtn { flex: 1 1 21%; font-size: 16px; border-radius: 12px; padding: 8px 6px; }
.inspmark input { flex: 1 1 170px; width: auto; min-height: 50px; font-size: 16px; padding: 10px 12px; }
/* (na-on selected ring is with the other mark states above.) */
.inspphotoforms { gap: 10px; margin-top: 12px; }
.inspphotoforms .btn { min-height: 50px; font-size: 15px; padding: 12px 16px; display: inline-flex; align-items: center; }
.photoform input { font-size: 16px; min-height: 46px; }
body.insp-step h2.sec, body.insp-step #extras { display: none; }
body.insp-step .inspitem { display: none; }
body.insp-step .inspitem.current { display: block; }
.inspprog { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 10px 0 0; }
.inspprog i { display: block; height: 100%; background: var(--accent2); width: 0; }
.inspstepbar { position: sticky; bottom: 10px; z-index: 40; display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-top: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.35); }
.inspstepbar .nav { min-height: 52px; min-width: 84px; font-size: 16px; }
.inspstepbar .nav:disabled { opacity: .45; }
.inspstepbar .pos { flex: 1; text-align: center; font-weight: 700; font-size: 15px; }
.inspstepbar .pos small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
/* Focus mode: while stepping through checks, the site header, page
   title, footer and the inspection details collapse away so the
   check card gets the whole screen. */
body.insp-step header, body.insp-step footer, body.insp-step main > h1 { display: none; }
body.insp-step #insp-head { padding: 10px 14px; }
body.insp-step #insp-head h3 { margin: 0 0 4px; font-size: 16px; }
body.insp-step #insp-head #insp-counts { margin: 0; }
body.insp-step #insp-head .inspmeta, body.insp-step #insp-head .inspactions,
body.insp-step #insp-head details, body.insp-step #insp-head form { display: none; }
/* Multiple photos per check: a strip of small tiles, each deletable */
.inspphotos { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; }
.inspphotos:empty { margin: 0; }
.inspphototile { position: relative; display: inline-block; }
.inspthumb.mini { width: 104px; height: 78px; max-width: none; margin: 0; }
.inspphototile form { position: absolute; top: 4px; right: 4px; margin: 0; }
.inspphototile .inspdel { min-height: 0; padding: 2px 8px; font-size: 12px; line-height: 1.4; border-radius: 8px; }
/* Voice dictation on check comments */
.inspmic.rec { background: var(--bad); color: #fff; }
/* Auto-save status note beside the comment mic */
.inspcstatus { font-size: 13px; color: var(--ok); min-width: 54px; }
/* Complete inspection block at the end of the checklist */
.inspcomplete { text-align: center; }
.inspcomplete form .btn { width: 100%; min-height: 56px; font-size: 17px; }
.inspcomplete .inspdone { font-size: 17px; margin: 4px 0 10px; }
/* Bigger check text — readable without glasses */
.inspitem .insphead { font-size: 20px; }
.inspmark .inspbtn { font-size: 17px; }
.inspmark input { font-size: 17px; }
.insppill { font-size: 14px; }
.inspstepbar .pos { font-size: 19px; }
.inspstepbar .pos small { font-size: 14px; }
#insp-head #insp-counts { font-size: 17px; }
/* Driver delivery heads-up form (driver home + driver load detail) */
.headsupform { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.headsupform h3 { margin-top: 0; }
/* Driver "Your pay" surfaces: the assigned driver's own trip pay on the
   driver load detail (highlighted block above the status controls) and
   as a compact line on the driver's loads list. Rendered only for the
   load's assigned driver; office views never contain them. */
.yourpay-block { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.yourpay-line { font-weight: 600; }
/* Per-truck compliance checklist (truck page card + save form) */
.tcomp td input[type="date"], .tcomp td input[type="text"], .tcomp td select { width: 100%; min-width: 120px; }
.tcomp tr.is-overdue td { background: rgba(240, 86, 76, .07); }
/* ------------------------- Driver view (driver-ui) -------------------------
   Drivers work from a cab, often one-handed, sometimes in gloves: the
   whole UI scales up — 19px base type, 56px touch targets, 52px+ form
   controls — and the home screen is one current load + four big tiles.
   Only the driver role gets this class (layout() adds it to <body>). */
.driver-ui { font-size: 19px; }
.driver-ui h1 { font-size: 26px; }
.driver-ui h2 { font-size: 21px; }
.driver-ui h3 { font-size: 18px; }
.driver-ui .brand { font-size: 20px; }
.driver-ui nav a { display: inline-flex; align-items: center; min-height: 52px; padding: 12px 14px; font-size: 17px; }
.driver-ui .btn { min-height: 56px; padding: 14px 20px; font-size: 18px; border-radius: 12px; }
.driver-ui .btn.small { min-height: 48px; padding: 10px 14px; font-size: 16px; }
.driver-ui input, .driver-ui select, .driver-ui textarea { font-size: 18px; min-height: 52px; padding: 12px 14px; }
.driver-ui input[type="checkbox"] { transform: scale(1.5); }
.driver-ui .fld span { font-size: 14px; }
.driver-ui .card { padding: 18px; }
.driver-ui .fig b { font-size: 26px; }
.driver-ui .loadcard h3 { font-size: 20px; }
.driver-ui .badge { font-size: 13px; padding: 4px 10px; }
.driver-ui .tbl { font-size: 16px; }
.driver-ui .bell { font-size: 22px; padding: 10px 6px; }
.driver-ui .bell svg { width: 24px; height: 24px; }
.driver-ui .notifrow { padding: 16px 14px; font-size: 17px; }
.driver-hello h2 { margin-bottom: 6px; }
.driver-route { font-size: 25px; font-weight: 700; line-height: 1.25; margin: 4px 0 8px; }
.driver-noload { font-size: 20px; font-weight: 600; }
.btn.driver-next { background: var(--ok); min-height: 64px; font-size: 20px; }
.drivernext { margin: 10px 0; }
.driver-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.driver-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 118px; padding: 18px 10px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); color: var(--text); text-decoration: none;
  font-size: 20px; font-weight: 700; text-align: center; }
.driver-tile:active { border-color: var(--accent); }
.driver-tile .tic { font-size: 34px; }
.driver-tile .tic svg { width: 34px; height: 34px; display: block; color: #F5A623; }
@media (max-width: 900px) {
  .formcalc { grid-template-columns: 1fr; }
  .calc { position: static; }
}
@media (max-width: 640px) {
  h1 { font-size: 18px; }
  .chatwrap { grid-template-columns: minmax(0, 1fr); }
  .msg { max-width: 88%; }
  .thread { max-height: 50vh; }
  .who { margin-left: 0; }
  .grid, .grid.loads { grid-template-columns: 1fr; }
  .photogrid { grid-template-columns: 1fr 1fr; }
  .truckphoto, .photoph { height: 128px; }
  .figures { gap: 20px; } .fig b { font-size: 18px; }
  .calc-net { font-size: 20px; }
  /* 16px form controls on small screens prevent iOS auto-zoom on focus */
  input, select, textarea { font-size: 16px; }
}

/* ----------------------- Alvys Light theme -------------------------
   Alternative per-user skin inspired by Alvys (chosen on the Themes
   page; layout() adds .theme-alvys to <body>): a light blue-gray
   workspace, white cards with soft shadows and 16px corners, a deep
   navy header bar, and a bright royal-blue primary. Only colors,
   corners and shadows change — layout, type scale and the driver-ui
   sizing are untouched, so every screen works in both themes. Data
   colors (the cost-bar segments, factoring violet) are NOT re-themed:
   they mean the same thing in both skins. */
body.theme-alvys {
  --bg: #f3f5f9; --panel: #ffffff; --panel2: #edf1f7; --line: #dbe2ec;
  --text: #10233c; --muted: #5d6f88; --accent: #1f6bff; --accent2: #1f6bff;
  --ok: #0e7a4f; --bad: #d92d20; --warn: #b54708; --info: #1f6bff;
  --shadow: 0 4px 16px rgba(16, 35, 60, .07);
}
body.theme-alvys a { color: #1f6bff; }
/* Anchor-components that carry their own text color in the base theme
   (buttons, tabs, chat rows, tiles, load titles) must keep it — the
   generic link blue above would otherwise beat their class rules and,
   for .btn, put blue text on the blue button. */
body.theme-alvys a.btn { color: #fff; }
body.theme-alvys a.btn.ghost { color: var(--text); }
body.theme-alvys a.tab { color: var(--muted); }
body.theme-alvys a.tab.on { color: #fff; }
body.theme-alvys a.conv { color: var(--text); }
body.theme-alvys a.driver-tile { color: var(--text); }
body.theme-alvys .loadcard h3 a { color: var(--text); }
/* The header becomes Alvys' deep navy bar over the light workspace. */
body.theme-alvys header { background: #0a2540; border-bottom-color: #0a2540;
  box-shadow: 0 2px 12px rgba(10, 37, 64, .28); }
body.theme-alvys .brand { color: #fff; }
body.theme-alvys .brand span { color: #6cb2ff; }
body.theme-alvys nav a { color: #cfdef2; }
body.theme-alvys nav a:hover { background: rgba(255, 255, 255, .13); }
body.theme-alvys nav a.active { color: #fff; border-bottom-color: #6cb2ff; }
body.theme-alvys nav a.active:hover { background: transparent; border-bottom-color: #6cb2ff; }
body.theme-alvys .navgroup-btn { color: #cfdef2; }
body.theme-alvys .navgroup-btn:hover { background: rgba(255, 255, 255, .13); }
body.theme-alvys .navgroup-btn.active { border-bottom-color: #6cb2ff; }
body.theme-alvys .navgroup .caret { color: #6cb2ff; }
body.theme-alvys .who { color: #a9bcd6; }
body.theme-alvys header .btn.ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
body.theme-alvys .card, body.theme-alvys .stat { border-radius: 16px; }
/* White inputs with a hairline border — the Alvys form look. */
body.theme-alvys input, body.theme-alvys select, body.theme-alvys textarea { background: #fff; }
/* Badges and verdict pills: the base colors are pale tints tuned for
   the dark theme; on white they need deeper text and soft tint fills. */
body.theme-alvys .b-candidate, body.theme-alvys .b-in-progress,
body.theme-alvys .b-approved, body.theme-alvys .b-contacted,
body.theme-alvys .b-in-transit, body.theme-alvys .b-new
  { border-color: #b9d2ff; color: #1f5fe0; background: #eef4ff; }
body.theme-alvys .b-booked, body.theme-alvys .b-picked-up,
body.theme-alvys .b-pending, body.theme-alvys .b-offer
  { border-color: #ecd28a; color: #8a6108; background: #fdf6e0; }
body.theme-alvys .b-delivered, body.theme-alvys .b-ready,
body.theme-alvys .b-available, body.theme-alvys .b-done,
body.theme-alvys .b-paid, body.theme-alvys .b-hired, body.theme-alvys .b-cleared
  { border-color: #a7e3c6; color: #0e7a4f; background: #e9f9f1; }
body.theme-alvys .b-cancelled, body.theme-alvys .b-not-ready,
body.theme-alvys .b-rejected, body.theme-alvys .b-overdue
  { border-color: #f3b3ae; color: #c02b20; background: #fdecea; }
body.theme-alvys .b-expired, body.theme-alvys .b-not-started,
body.theme-alvys .b-not-applicable
  { border-color: var(--line); color: var(--muted); background: var(--panel2); }
body.theme-alvys .b-expiring { border-color: #f0b27a; color: #a35a08; background: #fdf1e3; }
body.theme-alvys .b-interview { border-color: #d3b8ff; color: #6a3ec9; background: #f3edff; }
body.theme-alvys .v-excellent { border-color: #d9a406; color: #8a6108; background: #fbf0cd; }
body.theme-alvys .v-good { border-color: #a7e3c6; color: #0e7a4f; background: #e9f9f1; }
body.theme-alvys .v-average { border-color: #ecd28a; color: #8a6108; background: #fdf6e0; }
body.theme-alvys .v-loss { border-color: #f3b3ae; color: #c02b20; background: #fdecea; }
body.theme-alvys .v-call { border-color: #c3cedd; color: #5d6f88; background: #eef2f7; }
body.theme-alvys .tri-short { border-color: #d9a406; color: #8a6108; background: #fbf0cd; }
body.theme-alvys .tri-backup { border-color: #c3cedd; color: #5d6f88; background: #eef2f7; }
body.theme-alvys .tri-disc { border-color: #e0b3ae; color: #b0564c; background: #f9eeec; }
/* The triage/pull buttons sit on the (now blue) accent — white text. */
body.theme-alvys .btn.tri-on, body.theme-alvys .btn.pull { color: #fff; }
body.theme-alvys .conv.on { background: #eef4ff; border-color: #b9d2ff; }
body.theme-alvys .msg.me .bubble { background: #e3edff; border-color: #b9d2ff; }
body.theme-alvys .notifrow.unread { border-color: #1f6bff; background: #eef4ff; }
body.theme-alvys .tcomp tr.is-overdue td { background: #fdecea; }
body.theme-alvys .loadcard h3 a:hover, body.theme-alvys .retlane a:hover { color: #1f6bff; }

/* ----------------------- ezLoads theme -------------------------
   Third per-user skin, inspired by ezLoads (chosen on the Themes
   page; layout() adds .theme-ezloads to <body>): their app pairs a
   dark charcoal bar (#1e232c, from their dispatch-board sidebar)
   with a pale blue-gray board (#f0f3f7), white cards, brand green
   (#16b163) for primary actions and their crimson (#ec1849) for
   the big call-to-action buttons. Same rule as the other skins:
   only colors, corners and shadows change; data colors keep their
   meaning. */
body.theme-ezloads {
  --bg: #f0f3f7; --panel: #ffffff; --panel2: #f7f8fa; --line: #dde3ea;
  --text: #101828; --muted: #697586; --accent: #16b163; --accent2: #16b163;
  --ok: #0d7a43; --bad: #d91b46; --warn: #b54708; --info: #175cd3;
  --shadow: 0 4px 16px rgba(16, 24, 40, .07);
}
body.theme-ezloads a { color: #0d7a43; }
/* Anchor-components keep their own text color (same trap as the
   Alvys block: the generic link color must not beat .btn & friends). */
body.theme-ezloads a.btn { color: #fff; }
body.theme-ezloads a.btn.ghost { color: var(--text); }
body.theme-ezloads a.tab { color: var(--muted); }
body.theme-ezloads a.tab.on { color: #fff; }
body.theme-ezloads a.conv { color: var(--text); }
body.theme-ezloads a.driver-tile { color: var(--text); }
body.theme-ezloads .loadcard h3 a { color: var(--text); }
/* The header becomes ezLoads' charcoal bar over the light board. */
body.theme-ezloads header { background: #1e232c; border-bottom-color: #1e232c;
  box-shadow: 0 2px 12px rgba(12, 16, 19, .30); }
body.theme-ezloads .brand { color: #fff; }
body.theme-ezloads .brand span { color: #2acf59; }
body.theme-ezloads nav a { color: #c9d1dd; }
body.theme-ezloads nav a:hover { background: rgba(255, 255, 255, .08); }
body.theme-ezloads nav a.active { color: #fff; border-bottom-color: #16b163; }
body.theme-ezloads nav a.active:hover { background: transparent; border-bottom-color: #16b163; }
body.theme-ezloads .navgroup-btn { color: #c9d1dd; }
body.theme-ezloads .navgroup-btn:hover { background: rgba(255, 255, 255, .08); }
body.theme-ezloads .navgroup-btn.active { border-bottom-color: #16b163; }
body.theme-ezloads .navgroup .caret { color: #2acf59; }
body.theme-ezloads .who { color: #98a2b3; }
body.theme-ezloads header .btn.ghost { border-color: rgba(255, 255, 255, .40); color: #fff; }
body.theme-ezloads .card, body.theme-ezloads .stat { border-radius: 14px; }
body.theme-ezloads input, body.theme-ezloads select, body.theme-ezloads textarea { background: #fff; }
/* ezLoads' big CTA is crimson — the platform's big action buttons
   (call/book) take it, while ordinary primary buttons stay green. */
body.theme-ezloads .btn.big { background: #ec1849; border-color: #ec1849; color: #fff; }
/* Badges and verdict pills in ezLoads' own tints: pale green blocks,
   peach highlight rows, pale pink blocks. */
body.theme-ezloads .b-candidate, body.theme-ezloads .b-in-progress,
body.theme-ezloads .b-approved, body.theme-ezloads .b-contacted,
body.theme-ezloads .b-in-transit, body.theme-ezloads .b-new
  { border-color: #a7e3c6; color: #0d7a43; background: #e5f4e9; }
body.theme-ezloads .b-booked, body.theme-ezloads .b-picked-up,
body.theme-ezloads .b-pending, body.theme-ezloads .b-offer
  { border-color: #ecd28a; color: #8a6108; background: #fff0d9; }
body.theme-ezloads .b-delivered, body.theme-ezloads .b-ready,
body.theme-ezloads .b-available, body.theme-ezloads .b-done,
body.theme-ezloads .b-paid, body.theme-ezloads .b-hired, body.theme-ezloads .b-cleared
  { border-color: #a7e3c6; color: #0d7a43; background: #edfcf2; }
body.theme-ezloads .b-cancelled, body.theme-ezloads .b-not-ready,
body.theme-ezloads .b-rejected, body.theme-ezloads .b-overdue
  { border-color: #f6b8c6; color: #c21440; background: #fee4e9; }
body.theme-ezloads .b-expired, body.theme-ezloads .b-not-started,
body.theme-ezloads .b-not-applicable
  { border-color: var(--line); color: var(--muted); background: var(--panel2); }
body.theme-ezloads .b-expiring { border-color: #f0b27a; color: #a35a08; background: #fdf1e3; }
body.theme-ezloads .b-interview { border-color: #d3b8ff; color: #6a3ec9; background: #f3edff; }
body.theme-ezloads .v-excellent { border-color: #d9a406; color: #8a6108; background: #fbf0cd; }
body.theme-ezloads .v-good { border-color: #a7e3c6; color: #0d7a43; background: #edfcf2; }
body.theme-ezloads .v-average { border-color: #ecd28a; color: #8a6108; background: #fff6e6; }
body.theme-ezloads .v-loss { border-color: #f6b8c6; color: #c21440; background: #fee4e9; }
body.theme-ezloads .v-call { border-color: #c3cedd; color: #697586; background: #eef1f5; }
body.theme-ezloads .tri-short { border-color: #d9a406; color: #8a6108; background: #fbf0cd; }
body.theme-ezloads .tri-backup { border-color: #c3cedd; color: #697586; background: #eef1f5; }
body.theme-ezloads .tri-disc { border-color: #e0b3ae; color: #b0564c; background: #f9eeec; }
body.theme-ezloads .btn.tri-on, body.theme-ezloads .btn.pull { color: #fff; }
body.theme-ezloads .conv.on { background: #e5f4e9; border-color: #a7e3c6; }
body.theme-ezloads .msg.me .bubble { background: #e5f4e9; border-color: #a7e3c6; }
body.theme-ezloads .notifrow.unread { border-color: #16b163; background: #edfcf2; }
body.theme-ezloads .tcomp tr.is-overdue td { background: #fee4e9; }
body.theme-ezloads .loadcard h3 a:hover, body.theme-ezloads .retlane a:hover { color: #0d7a43; }

/* City autocomplete dropdown (load form, 2026-11-22) */
.acbox { position: absolute; left: 0; right: 0; top: 100%; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-height: 264px; overflow-y: auto; padding: 4px; }
.acitem { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text); padding: 8px 10px; border-radius: 7px; font-size: 14px; cursor: pointer; }
.acitem.on, .acitem:hover { background: var(--panel2); }

/* Dispatch Board readability (2026-11-22): tier-coloured chips, today
   column, weekend shading, sticky driver column, one-line controls. */
.db-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.db-jump { display: flex; gap: 8px; align-items: center; }
.db-jump label { color: var(--muted); font-size: 13px; }
.db-jump input[type="date"] { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 14px; }
table.db-board { min-width: 1060px; }
.db-board th, .db-board td { vertical-align: top; }
.db-board .db-dow { display: block; font-size: 12px; letter-spacing: .05em; }
.db-board .db-dnum { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 1px; }
.db-board th.db-today .db-dow { color: var(--accent); }
.db-today-tag { background: var(--accent); color: #14100a; border-radius: 6px; padding: 0 5px; font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.db-board td.db-today { background: rgba(128, 140, 160, .08); }
.db-board td.db-wknd { background: rgba(128, 140, 160, .03); }
.db-board td.db-driver, .db-board th.db-driver { position: sticky; left: 0; background: var(--panel); z-index: 2; min-width: 104px; box-shadow: 1px 0 0 var(--line); }
.db-board th.db-driver { z-index: 3; }
.db-chip { display: block; border: 1px solid var(--line); border-left: 3px solid #64748b; border-radius: 8px; padding: 5px 7px; margin: 0 0 5px; text-decoration: none; background: var(--panel2); }
.db-chip:hover { border-color: var(--accent); border-left-color: var(--accent); }
.db-chip.db-t0 { border-left-color: #f5c542; }
.db-chip.db-t1 { border-left-color: #34c774; }
.db-chip.db-t2 { border-left-color: #e3b341; }
.db-chip.db-t3 { border-left-color: #f0564c; }
.db-chip.db-t4 { border-left-color: #64748b; }
.db-chip .db-route { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
.db-chip .db-meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.db-chip.db-drop { border-style: dashed; background: transparent; }
.db-empty { display: block; text-align: center; color: var(--muted); opacity: .35; }
.db-notes { white-space: nowrap; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.db-notes b { color: var(--text); }
.db-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 10px; align-items: center; }
.db-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }

/* Compliance filing help (2026-11-22): collapsible per-item panel with
   the official portal button and the exact facts the filing asks for. */
.cfiling { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.cfiling summary { cursor: pointer; color: var(--accent); font-size: 13.5px; font-weight: 600; list-style: none; }
.cfiling summary::-webkit-details-marker { display: none; }
.cfiling-body { margin-top: 8px; }
.cfiling-body .tbl td:first-child { color: var(--muted); width: 38%; }

/* Login showcase banner (2026-11-22): two-panel login — a feature
   banner beside the sign-in form on desktop, stacked on phones. The
   login page is always the dark look, in every theme. */
body.loginpage { margin: 0; }
.login-wrap { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }
.login-banner { background: radial-gradient(1100px 600px at 15% -10%, rgba(31,107,255,.35), transparent 60%), radial-gradient(800px 500px at 110% 110%, rgba(245,166,35,.22), transparent 55%), linear-gradient(150deg, #0a2540 0%, #0b1220 55%, #0d1526 100%); color: #e8eef7; padding: 44px 48px; display: flex; flex-direction: column; gap: 20px; }
.lb-brand .brand { font-size: 30px; color: #fff; }
.lb-tag { color: #f5a623; font-weight: 600; letter-spacing: .4px; margin-top: 4px; }
.lb-head { font-size: 40px; line-height: 1.12; margin: 6px 0 0; color: #fff; }
.lb-sub { color: #aebdd2; font-size: 16px; max-width: 52ch; margin: 0; }
.lb-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin-top: 4px; }
.lb-feat { display: flex; gap: 10px; align-items: flex-start; }
.lb-ico { color: #F5A623; flex: none; margin-top: 1px; }
.lb-ico svg { width: 22px; height: 22px; display: block; }
.lb-feat b { display: block; color: #fff; font-size: 14.5px; }
.lb-feat span { color: #9fb0c9; font-size: 13px; line-height: 1.35; display: block; }
.lb-stats { display: flex; gap: 34px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 18px; margin-top: auto; }
.lb-stats b { font-size: 24px; color: #fff; display: block; }
.lb-stats span { color: #9fb0c9; font-size: 12.5px; }
.lb-foot { color: #7e90ab; font-size: 12.5px; margin-top: auto; border-top: 1px solid rgba(255,255,255,.14); padding-top: 16px; }
.lb-foot a { color: #9fc2ff; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { margin-top: 0; }
.lb-mbrand { display: none; }
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-banner { padding: 28px 22px; gap: 16px; }
  .lb-brand .brand { font-size: 25px; }
  .lb-head { font-size: 29px; }
  .lb-feats { grid-template-columns: 1fr; gap: 10px; }
  .lb-stats { margin-top: 2px; }
  .login-side { padding: 24px 16px 44px; order: -1; }
  .lb-mbrand { display: block; margin-bottom: 20px; text-align: center; }
  .lb-foot { text-align: center; }
  .lb-apply { text-align: center; }
  .lb-mbrand .brand { font-size: 24px; color: #fff; }
  .login-banner .lb-brand { display: none; }
}

/* Login banner feature headers in caps (2026-11-22, owner's call) —
   matches the platform's other headers (form labels, section titles). */
.lb-feat b { text-transform: uppercase; letter-spacing: .4px; font-size: 13.5px; }

/* Brand logo (2026-11-22): the owner's shield mark replaces the truck
   emoji in every brand spot (header, sidebar, login). One transparent
   asset, worn as a CSS mask so the shield takes each theme's accent
   color automatically — orange on Dark, royal blue on Blue & White,
   green on Green & White. */
/* Inline-SVG brand shield (2026-11-22): no image fetch, no mask —
 * the mark paints with the page's first frame in the theme accent. */
.brand-logo { display: inline-block; width: 1.12em; height: 1.12em; vertical-align: -0.16em; color: var(--accent); }
.brand-logo svg { display: block; width: 100%; height: 100%; fill: currentColor; }

/* ---- Compact phone header + auto-hide (pf-deploy198, 2026-11-28) ----
 * Phones (<=700px): the brand, bell and user chip share ONE slim row
 * (left-aligned, smaller type) instead of the brand taking a full
 * centered row of its own, and the nav drops to its own row under it.
 * The driver nav (flat links) becomes a single swipeable row instead
 * of wrapping to three rows; the office grouped nav keeps wrapping
 * (its dropdown menus cannot live inside a horizontal scroller) but
 * gets the same slim first row. While the user scrolls down, the
 * layout script adds body.hdr-hidden and the sticky header slides
 * away entirely; scrolling up brings it back. */
@media (max-width: 700px) {
  header { justify-content: flex-start; gap: 6px 10px; padding: 8px 12px; transition: transform .25s ease; }
  header .brand { order: 1; flex: 0 1 auto; text-align: left; font-size: 15px; }
  body.driver-ui header .brand { font-size: 17px; }
  header .bell { order: 2; margin-left: auto; }
  header .who { order: 3; margin-left: 0; font-size: 12px; gap: 6px; }
  body.driver-ui header .who { font-size: 13px; }
  header .who .btn { padding: 4px 9px; }
  header nav { order: 4; flex: 1 1 100%; }
  body.driver-ui header nav { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  body.driver-ui header nav::-webkit-scrollbar { display: none; }
  body.driver-ui header nav a { white-space: nowrap; }
  body.hdr-hidden header { transform: translateY(-100%); }
}
