:root {
  /* Legacy brand vars now ALIAS the Entermodal token system (theme.css, loaded first).
     Keeps ~20 existing --bj-* usages working while the refined palette flows through.
     New code should read the semantic tokens (--brand-primary, --surface-*) directly. */
  --bj-red: var(--brand-primary);
  --bj-red-dark: var(--brand-primary-hover);
  --bj-black: var(--surface-chrome);
  --bj-bg: var(--surface-page);
}
* { box-sizing: border-box; }
html, body {
  /* never let the page itself widen to fit a table — keep everything at full
     1:1 size and let wide tables scroll inside their own frame instead */
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* board cells stay at full readable size regardless of screen width */
#load-table th { font-size: 13px; }
#load-table td { font-size: 14px; }
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.error { color: var(--status-danger); }
button, .button {
  font: inherit;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
}
button:hover, .button:hover { background: var(--surface-sunken); }
button.primary { background: var(--bj-red); border-color: var(--bj-red); color: var(--brand-on-primary); }
button.primary:hover { background: var(--bj-red-dark); border-color: var(--bj-red-dark); }
button.ghost { border-color: transparent; background: transparent; }
button.ghost:hover { background: var(--surface-sunken); }
input, select, textarea {
  font: inherit;
  padding: 5px 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-ring); border-color: var(--bj-red); }

/* ===== Login — Blackjack card-table (design handoff: LoginAnim) ===== */
#login-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: #0a0608;
  font-family: 'Oswald', sans-serif;
}
/* the table: radial felt + fine diagonal weave */
#login-screen::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.018) 0 2px, transparent 2px 9px),
    radial-gradient(120% 90% at 50% 38%, #2a0409 0%, #14060a 46%, #060305 100%);
}
/* inset vignette */
#login-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 18vmin rgba(0,0,0,.7);
}

/* floating suit watermarks */
.bj-bg { position: absolute; inset: 0; pointer-events: none; }
.bj-suit { position: absolute; line-height: 1; }
.bj-suit-1 { top: 8%;  left: 7%;   font-size: 13vmin; color: rgba(214,0,28,.07);   transform: rotate(-12deg); }
.bj-suit-2 { bottom: 9%; right: 8%; font-size: 11vmin; color: rgba(255,255,255,.035); transform: rotate(10deg); }
.bj-suit-3 { top: 14%; right: 13%;  font-size: 7vmin;  color: rgba(214,0,28,.06); }

/* centered stack: deck + hero card share one footprint */
.bj-stack { position: relative; width: min(86%, 440px); z-index: 1; }

/* the face-down deck behind the login card */
.bj-deck {
  position: absolute; inset: 0; z-index: 1; border-radius: 18px;
  background: repeating-linear-gradient(45deg, #b00018 0 9px, #8c0012 9px 18px);
  border: 3px solid #fbf7f0;
  box-shadow: 0 20px 44px rgba(0,0,0,.55);
  transform: translate(var(--dx,0), var(--dy,0)) rotate(var(--dr,0));
}
.bj-deck::before {
  content: ""; position: absolute; inset: 18% 14%;
  border: 2px solid rgba(255,255,255,.55); border-radius: 9px;
}
.bj-deck-glyph {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 34px; color: rgba(255,255,255,.7);
}
.bj-deck-back  { --dx: 14px; --dy: 18px; --dr: 2.4deg; }
.bj-deck-front { --dx: 7px;  --dy: 9px;  --dr: 1.2deg; }

/* the hero login card */
.bj-hero {
  position: relative; z-index: 2; transform-origin: center bottom;
  background: linear-gradient(180deg, #fffdf8, #f4ede1);
  border-radius: 18px; border: 1px solid #e7dccb;
  box-shadow: 0 26px 60px rgba(0,0,0,.6), inset 0 0 0 2px #fff, inset 0 0 0 4px #d6001c;
  overflow: hidden; padding: 22px 24px 24px;
}
.bj-pip {
  position: absolute; font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: 17px; line-height: .85; color: #111;
}
.bj-pip-suit { display: block; font-size: 13px; }
.bj-pip-tl { top: 9px; left: 12px; }
.bj-pip-br { bottom: 9px; right: 12px; transform: rotate(180deg); }

/* logo + one-time shine sweep */
.bj-logo-wrap { position: relative; overflow: hidden; border-radius: 8px; }
.bj-logo { display: block; width: 100%; height: auto; }
.bj-shine {
  position: absolute; top: -20%; left: 0; width: 40%; height: 140%; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent);
  pointer-events: none;
}

.bj-divider {
  height: 2px; margin: 14px 0 18px; transform-origin: center;
  background: linear-gradient(90deg, transparent, #d6001c 18%, #d6001c 82%, transparent);
}

.bj-form { display: flex; flex-direction: column; gap: 13px; }
.bj-field { display: flex; flex-direction: column; }
.bj-field label {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 600;
  letter-spacing: .14em; font-size: 12px; color: #7a7066;
  text-transform: uppercase; margin-bottom: 5px;
}
.bj-field input {
  height: 42px; border: 1.5px solid #1a1410; border-radius: 8px;
  background: var(--surface-card); padding: 0 13px;
  font-family: 'Oswald', sans-serif; font-size: 16px; color: #1a1410; letter-spacing: .04em;
}
.bj-field input:focus {
  outline: none; border-color: #d6001c; box-shadow: 0 0 0 3px rgba(214,0,28,.12);
}

.bj-submit {
  margin-top: 5px; height: 48px; padding: 0; border: none; border-radius: 9px;
  background: linear-gradient(180deg, #e30420, #b00018); color: #fff;
  font-family: 'Oswald', sans-serif; font-weight: 700; letter-spacing: .16em;
  font-size: 16px; text-transform: uppercase; cursor: pointer;
  box-shadow: 0 6px 22px rgba(214,0,28,.45);
}
.bj-submit:hover { background: linear-gradient(180deg, #ef1a35, #c4001a); }
.bj-submit:disabled { opacity: .65; cursor: default; }

.bj-error {
  margin: 0; text-align: center; color: #d6001c;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: .04em;
}
.bj-footer {
  text-align: center; text-transform: uppercase; color: #b8ad9f;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: .28em;
}

/* entrance choreography — only when the operator hasn't asked for less motion */
@media (prefers-reduced-motion: no-preference) {
  #login-screen::before { animation: bjTable .5s ease both; }
  .bj-deck-back  { animation: bjDeckIn .5s ease-out .12s both; }
  .bj-deck-front { animation: bjDeckIn .5s ease-out .22s both; }
  .bj-hero       { animation: bjPop .85s cubic-bezier(.2,.85,.25,1) .55s both; }
  .bj-logo       { animation: bjFloat 5s ease-in-out 1.8s infinite; }
  .bj-shine      { animation: bjShine 1.1s ease-out 1.5s both; }
  .bj-divider    { animation: bjRule .5s ease-out 1.9s both; }
  .bj-field:nth-of-type(1) { animation: bjRise .5s ease-out 2.1s both; }
  .bj-field:nth-of-type(2) { animation: bjRise .5s ease-out 2.28s both; }
  .bj-submit     { animation: bjRise .5s ease-out 2.46s both, bjPulse 2.4s ease-in-out 3.1s infinite; }
  .bj-footer     { animation: bjFadeIn .6s ease 2.7s both; }
  .bj-suit-1     { animation: bjFloat 6s ease-in-out infinite; }
  .bj-suit-2     { animation: bjFloat 7s ease-in-out infinite .8s; }
  .bj-suit-3     { animation: bjFloat 5.5s ease-in-out infinite 1.4s; }
}

@keyframes bjTable { from { opacity: 0; } to { opacity: 1; } }
@keyframes bjPop {
  0%   { transform: translateY(34px) scale(.84) rotate(-3deg); opacity: 0; }
  38%  { opacity: 1; }
  66%  { transform: translateY(-12px) scale(1.025) rotate(1deg); }
  84%  { transform: translateY(3px) scale(.997) rotate(-.4deg); }
  100% { transform: translateY(0) scale(1) rotate(0); opacity: 1; }
}
@keyframes bjDeckIn {
  from { opacity: 0; transform: translate(var(--dx,0), calc(var(--dy,0px) + 22px)) rotate(var(--dr,0deg)); }
  to   { opacity: 1; transform: translate(var(--dx,0), var(--dy,0px)) rotate(var(--dr,0deg)); }
}
@keyframes bjShine { 0% { transform: translateX(-130%) rotate(12deg); opacity: 0; } 22% { opacity: .85; } 100% { transform: translateX(260%) rotate(12deg); opacity: 0; } }
@keyframes bjRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bjRule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bjPulse { 0%,100% { box-shadow: 0 6px 22px rgba(214,0,28,.45), 0 0 0 0 rgba(214,0,28,.55); } 50% { box-shadow: 0 6px 22px rgba(214,0,28,.55), 0 0 0 12px rgba(214,0,28,0); } }
@keyframes bjFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes bjFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== command-center shell (v89): dark command rail + macro tiles + dark left nav ===== */
header { background: var(--bj-black); border-bottom: 3px solid var(--bj-red); position: sticky; top: 0; z-index: 30; }
.topbar { display: flex; align-items: stretch; min-height: 58px; }
.topbar-left { display: flex; align-items: center; gap: 10px; padding: 0 14px; }
/* logo sits on a white plaque so the black/red logo stays visible on the dark rail */
.brand { display: flex; align-items: center; cursor: pointer; line-height: 0; background: #fff; border-radius: 8px; padding: 5px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.brand-logo { height: 34px; width: auto; max-width: 100%; display: block; }
.topbar-right { display: flex; align-items: stretch; }
/* macro-status tiles — the single-glance state of the floor */
.macro { display: flex; align-items: stretch; margin-left: auto; }
.macro-tile { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 7px 15px; min-width: 92px; border-left: 1px solid var(--border-chrome); cursor: pointer; position: relative; }
.macro-tile:hover { background: var(--surface-chrome-2); }
.macro-tile .k { font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-on-chrome-muted); }
.macro-tile .v { font-size: 20px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--text-on-chrome); }
.macro-tile .d { font-size: 10px; color: var(--text-on-chrome-muted); }
/* macro numerals keep light-on-dark status accents (tuned for the onyx rail) */
.macro-tile.fire .v { color: #ff6a6a; }
.macro-tile.fire::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand-primary); }
.macro-tile.warn .v { color: #ffc24a; } .macro-tile.ok .v { color: #5fd39a; } .macro-tile.cool .v { color: #6fb6f0; }
/* clock + profile on the dark rail */
.rail-clock { display: flex; flex-direction: column; justify-content: center; padding: 0 15px; border-left: 1px solid var(--border-chrome); line-height: 1.05; }
.rail-clock .t { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-on-chrome); }
.rail-clock .l { font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-on-chrome-muted); }
header .user-area { display: flex; align-items: stretch; border-left: 1px solid var(--border-chrome); }
header .user-btn { color: var(--text-on-chrome); border-radius: 0; padding: 0 14px; }
header .user-btn:hover, header .user-btn[aria-expanded="true"] { background: var(--surface-chrome-2); border-color: transparent; }
header .user-btn .user-caret { color: var(--text-on-chrome-muted); }
header .user-avatar { background: var(--bj-red); }

/* app body = dark left nav + content column */
.shell { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; }
#main-nav { position: sticky; top: 58px; align-self: start; height: calc(100vh - 58px); overflow-y: auto;
  background: var(--surface-chrome); padding: 6px 8px 24px; display: flex; flex-direction: column; gap: 1px; z-index: 9; }
.nav-grp { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-on-chrome-muted); padding: 13px 10px 5px; }
.nav-grp:first-child { padding-top: 6px; }
#main-nav button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: none; background: transparent; color: var(--text-on-chrome-muted); padding: 8px 10px; border-radius: var(--radius-sm);
  font: inherit; font-size: 13px; cursor: pointer; }
#main-nav button i { font-size: 17px; line-height: 1; color: var(--text-on-chrome-muted); width: 19px; text-align: center; flex: none; }
#main-nav button:hover { background: var(--surface-chrome-2); color: var(--text-on-chrome); }
#main-nav button:hover i { color: var(--text-on-chrome); }
#main-nav button.active { background: var(--bj-red); color: var(--brand-on-primary); font-weight: 600; }
#main-nav button.active i { color: var(--brand-on-primary); }
#main-nav button .nav-badge { margin-left: auto; }
#main-nav button.active .nav-badge { background: rgba(255,255,255,.25); }
/* vendor stamp — pinned to the bottom of the rail (the growth loop, inside the app too) */
.nav-powered-by { margin-top: auto; padding: 16px 10px 8px; line-height: 1.35;
  color: var(--text-on-chrome-muted); }
.nav-powered-by .pb-label { display: block; font-size: 9px; letter-spacing: .09em;
  text-transform: uppercase; opacity: .55; margin-bottom: 6px; }
.nav-powered-by .pb-logo { display: block; width: 122px; height: auto; }
.nav-powered-by .pb-endorse { display: block; font-size: 9px; opacity: .65;
  letter-spacing: .02em; margin-top: 6px; }
/* hamburger — hidden on desktop, shown under 900px */
.nav-toggle { display: none; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-card); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle:hover { background: var(--surface-sunken); }
.nav-toggle-bars { position: relative; display: block; width: 18px; height: 2px; background: var(--bj-black); border-radius: 2px; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--bj-black); border-radius: 2px; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
/* ---------- profile / account menu (top-right) ---------- */
.user-area { position: relative; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid transparent; border-radius: var(--radius-pill); padding: 4px 10px 4px 4px; color: var(--text-primary); cursor: pointer; }
.user-btn:hover, .user-btn[aria-expanded="true"] { background: var(--surface-sunken); border-color: var(--border); }
.user-btn #who { font-weight: 600; }
.user-caret { color: var(--text-muted); font-size: 11px; }
.user-avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bj-black); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .5px; flex: none; }
.user-avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.user-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 290px; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 14px; z-index: 30; }
.user-menu-head { display: flex; align-items: center; gap: 12px; }
.user-menu-name { font-weight: 700; font-size: 15px; }
.small { font-size: 12px; }
.user-menu-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.role-badge { display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; background: var(--surface-chrome); color: var(--text-on-chrome); }
.role-badge.finance { background: var(--status-success); }
.user-menu-fields { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.user-menu-fields label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-secondary); }
.user-menu-fields input { font-size: 13px; }
.user-menu-save-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.user-menu-actions { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; }
.user-menu-actions .ghost { text-align: left; padding: 7px 8px; border-radius: 6px; }
.user-menu-actions .ghost:hover { background: var(--surface-sunken); }

/* ---------- connectivity (Admin) ---------- */
.conn-card { background: var(--surface-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; max-width: 640px; }
.conn-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--border); }
.conn-row:first-child { border-top: none; }
.conn-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.conn-name { font-weight: 600; }
.conn-status { margin-left: auto; font-size: 11.5px; white-space: nowrap; }

/* ---------- report tables (cost per load, margin lanes, LFD) ---------- */
.rep-cost-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rep-cost-table th { font-size: 12px; color: var(--text-muted); text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rep-cost-table td { padding: 7px 12px; border-top: 1px solid var(--border); white-space: nowrap; }
.rep-cost-table tfoot td { border-top: 2px solid var(--border-strong); }
.rep-cost-table tbody tr[data-open] { cursor: pointer; }
.rep-cost-table tbody tr[data-open]:hover td { background: var(--status-info-soft); }

/* ---------- dashboard LFD cards + popup list ---------- */
.lfd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lfd-card { cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.lfd-card:hover { border-color: var(--border-strong); box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.modal.wide { width: 780px; max-width: 94vw; }
/* the booking "already exists" prompt — wider than a plain modal so the details-on-file
   table (terminal, ERD/cut-off, bill rates) is easy to read at a glance */
.modal.bk-modal { width: 540px; max-width: 94vw; }
/* "＋ More like this" duplicate-orders modal — wider so the 3 ID inputs per row are fully
   visible without scrolling sideways (own class so the shared bk-modal stays 540px) */
.modal.dup-modal { width: 720px; max-width: 94vw; }
/* duplicate-orders grid: a small number column + 3 ID inputs per row. minmax(0,1fr) lets the
   columns shrink below the inputs' default width so the grid never overflows the modal */
.dup-grid-head, .dup-row { display: grid; grid-template-columns: 24px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr); gap: 6px; align-items: center; }
.dup-grid-head { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.dup-row { margin-bottom: 6px; }
.dup-row .dup-n { font-size: 12px; color: var(--text-muted); text-align: center; }
.dup-row input { padding: 5px 8px; width: 100%; min-width: 0; }
/* "Dispatch Drivers" — the big red primary action at the top of the Dispatch tab, and its modal */
.btn-dispatch { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 16px; border: none; border-radius: 9px; cursor: pointer;
  background: var(--brand-primary); color: var(--brand-on-primary);
  font-size: 16px; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.btn-dispatch:hover { background: var(--brand-primary-hover); }
.btn-dispatch:active { background: var(--brand-primary-active); }
.btn-dispatch:disabled { opacity: .6; cursor: default; }
.btn-dispatch.tiny { width: auto; padding: 9px 16px; font-size: 14px; }
.modal.disp-modal { width: 640px; max-width: 94vw; }
.disp-day-badge { font-size: 12px; font-weight: 700; color: var(--brand-soft-text);
  background: var(--brand-soft); border: 1px solid var(--brand-soft-border); border-radius: 7px;
  padding: 6px 9px; white-space: nowrap; align-self: flex-end; }
.disp-day-badge.missing { color: var(--status-warning); background: var(--status-warning-soft);
  border-color: var(--status-warning-border); white-space: normal; }
.disp-row { padding: 10px 0; border-top: 1px solid var(--border); }
.disp-row:first-child { border-top: none; }
.disp-row-main { display: grid; grid-template-columns: 40px minmax(0,1fr) minmax(0,170px); gap: 10px; align-items: center; }
.disp-check { text-align: center; }
.disp-check input { width: 18px; height: 18px; }
.disp-move { font-weight: 600; font-size: 13px; }
.disp-sent { font-size: 11px; font-weight: 700; color: var(--status-success); margin-left: 4px; }
.disp-drivername { font-size: 13px; font-weight: 600; color: var(--text-primary); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disp-row.nodrv { opacity: .6; }
.disp-row-detail { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0 50px; }
.disp-f { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
.disp-f.grow { flex: 1; min-width: 180px; }
.disp-f input { padding: 6px 8px; font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0;
  border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface-card); color: var(--text-primary); }
.disp-f.grow input { width: 100%; }
.disp-appt-time { width: 84px; }
/* rate con matching several loads (one tender, multiple containers) — checklist of matches */
.rc-multi-list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.rc-multi-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.rc-multi-row input[type="checkbox"] { width: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.modal-head h2 { margin: 0; }
.modal-scroll { max-height: 62vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }

main { padding: 16px 22px 60px; min-width: 0; max-width: 1700px; }

.board-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.board-bar h2 { margin: 0; font-size: 18px; }
.search-wrap { flex: 1; min-width: 220px; position: relative; display: flex; }
#search-box { width: 100%; padding-right: 30px; }
#search-box::-webkit-search-cancel-button { display: none; }  /* use our own X */
.search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: var(--text-muted); cursor: pointer;
  font-size: 14px; line-height: 1; padding: 4px 6px; border-radius: 50%;
}
.search-clear:hover { color: var(--text-primary); background: var(--surface-sunken); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { border: none; background: transparent; color: var(--text-secondary); padding: 7px 12px; }
.tabs button.active { background: var(--surface-chrome); color: var(--text-on-chrome); }
.tabs button .count { opacity: .65; margin-left: 4px; font-size: 12px; }

/* lifecycle tabs row (primary board axis: Future / Active / Completed / Archived) */
.life-tabs { border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 12px; align-items: center; gap: 6px; }
.life-tabs button { border-radius: 8px 8px 0 0; font-weight: 600; font-size: 14px; padding: 8px 16px; }
.life-tabs button.active { background: var(--bj-black); color: #fff; }
.life-tabs button .count {
  display: inline-block; min-width: 18px; text-align: center; margin-left: 6px;
  padding: 1px 6px; border-radius: 10px; background: var(--surface-sunken); color: var(--text-secondary); font-weight: 600; opacity: 1;
}
.life-tabs button.active .count { background: rgba(255,255,255,.25); color: #fff; }

/* Port vs Rail freight tag (board rows) */
.mode-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 1px 6px; border-radius: 8px; vertical-align: middle; text-transform: uppercase; }
.mode-port { background: var(--status-info-soft); color: var(--status-info); }
.mode-rail { background: #f3e4cf; color: #8a5a00; }

/* compact load flags by the container number */
.flag-badge { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .04em;
  padding: 1px 4px; border-radius: 4px; vertical-align: middle; }
.flag-haz { background: #b3261e; color: #fff; }       /* hazmat */
.flag-ow { background: #8a5a00; color: #fff; }         /* overweight */
.flag-bill { background: var(--status-success); color: #fff; }       /* billable to customer */
.elig-warn { display: inline-block; font-size: 11px; font-weight: 600; color: var(--status-warning);
  background: var(--status-warning-soft); border: 1px solid var(--status-warning-border); border-radius: 6px; padding: 0 6px; margin-left: 6px; }
/* driver credential expiry highlight */
input.exp-soon { background: var(--status-warning-soft); border-color: var(--status-warning-border); }
input.exp-past { background: var(--status-danger-soft); border-color: var(--status-danger-border); color: var(--status-danger); }
/* ineligible driver picked on a move (warning-only) */
select.leg-warn { border-color: var(--status-danger-border); background: var(--status-danger-soft); }
.leg-elig-list { margin: 8px 0 0; font-size: 12px; color: var(--status-danger); }
.leg-elig-list div { margin: 2px 0; }

/* optional filter row under the board bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: -4px 0 14px;
  padding: 10px 12px; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 8px; }
.filter-bar label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-secondary); }
.filter-bar select, .filter-bar input { min-width: 130px; }
.board-bar #filters-toggle.active { background: var(--surface-chrome); color: var(--text-on-chrome); }

/* Port Houston enrichment panel (load drawer) */
.ph-panel { margin: 14px 0; padding: 12px; border: 1px solid var(--status-info-border); border-radius: 8px; background: var(--status-info-soft); }
.ph-panel:empty { display: none; }   /* rail loads: the empty port panel collapses so the tracking box sits at the top */
.ph-head { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.ph-head .tiny { margin-left: auto; padding: 3px 10px; font-size: 12px; }
.ph-result { font-size: 13px; }
.ph-badges { margin-bottom: 6px; }
.ph-badge { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.ph-ok { background: var(--status-success); color: #fff; }
.ph-hold { background: var(--status-danger); color: #fff; }
.ph-wait { background: var(--status-warning); color: #fff; }
.ph-err { color: var(--status-danger); }
.ph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
.ph-grid > div { font-size: 13px; }
.ph-checked { margin-top: 6px; font-size: 11px; color: var(--text-muted); }
/* gate appointment block */
.appt-head { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px;
  margin: 12px 0 6px; padding-top: 10px; border-top: 1px solid var(--status-info-border); }
.appt-head .tiny { margin-left: auto; }
.appt-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 6px 0; }
.appt-form label { display: block; font-size: 11px; color: var(--text-secondary); margin-bottom: 2px; }
.appt-form input, .appt-form select { width: 100%; }
.appt-checks { grid-column: 1 / -1; display: flex; gap: 18px; font-size: 13px; }
.appt-checks label { display: flex; align-items: center; gap: 5px; color: var(--text-primary); }
.appt-actions { display: flex; gap: 8px; margin-top: 8px; }
.appt-actions .danger { color: var(--status-danger); }
.appt-actions .danger:hover { background: var(--status-danger-soft); }
/* per-move gate-appointment box in the dispatch tab (one per gate-crossing leg) */
/* inline dispatch-grid gate-appointment cell: a compact "Create" button, or the booked PIN chip */
.appt-cell { align-self: start; margin-top: 1px; padding: 5px 8px; font-size: 11.5px; line-height: 1.2;
  border: 1px solid var(--brand-primary); color: var(--brand-primary); background: var(--brand-soft, #fff);
  border-radius: 7px; cursor: pointer; white-space: nowrap; }
.appt-cell:hover { background: var(--brand-soft, #f3f8fd); }
.appt-cell.booked { border-color: var(--status-success); color: #fff; background: var(--status-success, #15784c);
  font-weight: 700; font-variant-numeric: tabular-nums; }
.appt-modal { max-width: 640px; }
.appt-modal .appt-form { grid-template-columns: 1fr 1fr; }
/* dashboard: live Port Houston change feed */
.ph-changes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ph-change { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: center;
  padding: 8px 12px; background: var(--status-info-soft); border: 1px solid var(--status-info-border); border-radius: 6px; cursor: pointer; font-size: 13px; }
.ph-change:hover { background: var(--status-info-soft); }
.ph-change-note { font-weight: 600; }

/* week tabs row */
.wk-tabs { border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 12px; align-items: center; }
.wk-tabs button { border-radius: 8px 8px 0 0; font-weight: 500; }
.wk-tabs button.active { background: var(--status-info); color: #fff; }
.wk-tabs button.wk-finished { color: var(--text-muted); }
.wk-tabs button.wk-finished.active { background: var(--status-neutral); color: #fff; }
.wk-tabs .wk-add { color: var(--status-info); font-weight: 600; }
.wk-tabs .wk-add:hover { background: var(--status-info-soft); }
.wk-tabs .wk-arch { color: var(--text-muted); margin-left: 6px; }
.wk-tabs .wk-arch.active { background: var(--surface-sunken); color: var(--text-primary); }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.metric {
  background: var(--surface-card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
}
.metric .label { font-size: 12px; color: var(--text-muted); }
.metric .value { font-size: 22px; font-weight: 600; }
.metric.danger .value { color: var(--status-danger); }
.metric.warn .value { color: var(--status-warning); }
/* thin risk-accent metric tiles (v85 redesign) */
.metric { border-left: 3px solid var(--border); }
.metric.fire { border-left-color: var(--status-danger); } .metric.fire .value { color: var(--status-danger); }
.metric.warn { border-left-color: var(--status-warning); }
.metric.ok   { border-left-color: var(--status-success); }
.metric.cool { border-left-color: var(--status-info); }

/* ===== redesigned board: risk-rail, high-density, no frozen spreadsheet (v85) ===== */
table.nb-board { width: 100%; min-width: 100%; }
.nb-board td { vertical-align: middle; }
.nb-board th.c, .nb-board td.c { text-align: center; }
.nb-board th.r, .nb-board td.r { text-align: right; }
.nb-rail-th { width: 5px; padding: 0 !important; }
.nb-board td.nb-rail { width: 5px; padding: 0 !important; }
.nb-board td.nb-rail span { display: block; width: 5px; height: 100%; min-height: 34px; }
.nb-board tr.r-fire td.nb-rail span { background: var(--status-danger); }
.nb-board tr.r-warn td.nb-rail span { background: var(--status-warning); }
.nb-board tr.r-ok   td.nb-rail span { background: var(--status-success); }
.nb-board tr.r-cool td.nb-rail span { background: var(--status-info); }
.nb-board tr.r-idle td.nb-rail span { background: var(--border-strong); }
.nb-board tr.r-fire > td { background: #fff8f7; }
.nb-cont { font-weight: 700; font-size: 13px; }
.nb-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.nb-route { font-size: 12.5px; }
.nb-appt { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.nb-drv { font-size: 13px; }
.nb-none { color: var(--status-danger); font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.nb-rev { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--status-success); }
/* mockup-exact board cells (v89) */
.nb-board .pill { font-size: 10.5px; padding: 1px 8px; font-weight: 600; }
.nb-cont { font-weight: 700; font-size: 12.5px; }
.nb-sub { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }
.nb-board .tag { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .03em; padding: 1px 4px; border-radius: 4px; vertical-align: middle; margin-left: 3px; }
.tag-haz { background: #b3261e; color: #fff; } .tag-ow { background: #8a5a00; color: #fff; }
.tag-rail { background: #f3e4cf; color: #8a5a00; } .tag-port { background: var(--status-info-soft); color: var(--status-info); }
.tag-st { background: #d8ebe2; color: var(--status-success); cursor: pointer; }      /* street-turn link */
.tag-st.maybe { background: #eef0e0; color: #6b6a2e; }                  /* likely (not yet confirmed) */
/* rail-bill: loaded info is in but not yet emailed — flashes so dispatch acts on it */
.tag-railbill { background: var(--brand-primary, #D71319); color: #fff; animation: tag-railbill-flash 1.1s ease-in-out infinite; }
@keyframes tag-railbill-flash {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(215, 19, 25, .55); }
  50% { opacity: .55; box-shadow: 0 0 0 3px rgba(215, 19, 25, 0); }
}
.bd-lfd { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.bd-lfd.fire { color: var(--status-danger); } .bd-lfd.warn { color: var(--status-warning); } .bd-lfd.ok { color: var(--text-secondary); font-weight: 600; }
.bd-lfd .bd-lfd-n { min-width: 30px; }
.bd-lfd .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.bd-lfd.fire .dot { background: var(--status-danger); animation: bdpulse 1.4s infinite; }
.bd-lfd.warn .dot { background: var(--status-warning); }
/* return clock (empty turn-in) — a ↩ marker, and an ok-state return reads teal not grey
   so an in-window turn-in is visibly its own thing, not a quiet at-port LFD */
.bd-lfd-rtn { font-size: 12px; opacity: .8; }
.bd-lfd.rtn.ok { color: var(--status-success); font-weight: 700; }
@keyframes bdpulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.bd-legs { letter-spacing: 2px; font-size: 13px; white-space: nowrap; }
.bd-legs .d { color: var(--status-success); } .bd-legs .t { color: var(--border-strong); }
.nb-appt b { font-variant-numeric: tabular-nums; }

/* polish pass (v87): master-data + admin tables match the board's density.
   Scoped to these containers so the global th/td (board, reports, payroll) is untouched. */
#drivers-table thead th, #chassis-table thead th, #locations-table thead th,
#customers-table thead th, #users-table thead th {
  background: var(--surface-sunken); color: var(--text-secondary); font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 7px 10px;
}
#drivers-table tbody td, #chassis-table tbody td, #locations-table tbody td,
#customers-table tbody td, #users-table tbody td { padding: 6px 10px; font-size: 13px; }
#drivers-table tbody tr[data-open]:hover td, #chassis-table tbody tr[data-open]:hover td,
#users-table tbody tr[data-open]:hover td { background: var(--status-info-soft); }

#load-table { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; }
/* board zoom-out — shrink the table to fit more columns/rows on screen (esp. phones) */
#board-zoom { display: inline-flex; align-items: center; gap: 5px; }
#board-zoom i { font-size: 16px; }
#load-table.bz85 .board-table { zoom: 0.85; }
#load-table.bz70 .board-table { zoom: 0.70; }
#load-table.bz55 .board-table { zoom: 0.55; }
table { width: 100%; border-collapse: collapse; }
/* keep cells on one line so the board stays full-size and scrolls sideways
   only when it can't fit, instead of cramming columns smaller */
#load-table th, #load-table td { white-space: nowrap; }
th {
  text-align: left; font-size: 12px; color: var(--text-muted); font-weight: 600;
  padding: 9px 10px; border-bottom: 1px solid var(--border); background: var(--surface-sunken);
}
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr.load-row { cursor: pointer; }
tr.load-row:hover td { background: var(--surface-sunken); }
td.mono, .mono { font-family: var(--font-mono); font-size: 13px; }
.empty-note { padding: 30px; text-align: center; color: var(--text-muted); }

.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; white-space: nowrap;
}
.pill.s-AVAILABLE { background: #cdeedd; color: var(--status-success); }
.pill.s-DISPATCHED { background: #f6e79b; color: #6b5600; }       /* yellow  */
.pill.s-PRE-PULLED { background: #ddd6f6; color: #3c3489; }
.pill.s-DROPPED { background: #f5cfa3; color: #7a3f08; }          /* orange  */
.pill.s-DROPPED-READY { background: #46c2a8; color: #06382f; box-shadow: inset 0 0 0 1.5px #1f8f78; font-weight: 700; }  /* teal – dropped & released for pickup; dispatch a driver */
.pill.s-PENDING-DELIVERY { background: #f6e7c2; color: #6b4e16; }   /* amber – out, pending delivery */
.pill.s-DELIVERED { background: #cfe3c0; color: #3f5a23; }         /* sage – dropped at customer */
.pill.s-EMPTY-PICKED-UP { background: #bfe6f4; color: #0f5a72; }    /* light blue – empty in hand, needs return */
.pill.s-CONTAINER-EMPTY { background: #bfe6f4; color: #0f5a72; }    /* legacy alias */
.pill.s-ON-HOLD { background: #e3dac1; color: #5a4a1e; }
.pill.s-ISSUES { background: #f8cbdd; color: #8a1f4a; }           /* pink    */
.pill.s-COMPLETED { background: #c9eca7; color: #27500a; }        /* bright green */
.pill.s-MISSING-RATECON { background: #1f3864; color: #fff; }     /* blue    */
.pill.s-MISSING-PPW { background: #e1c9f0; color: #5a2d77; }      /* mauve   */
.pill.s-CANCELLED { background: #f1efe8; color: var(--text-muted); text-decoration: line-through; }
.pill.lfd-urgent { background: #fcebeb; color: #791f1f; font-weight: 600; }
.pill.lfd-warn { background: #faeeda; color: #633806; }
.pill.lfd-ok { background: #f1efe8; color: var(--text-secondary); }
.legdots { letter-spacing: 3px; font-size: 13px; white-space: nowrap; }
.legdots .done { color: var(--status-success); }
.legdots .todo { color: var(--border-strong); }

/* ---------- spreadsheet board ----------
   The board behaves like the team's spreadsheet: lots of columns scrolling
   sideways, with the Container# and Order# columns FROZEN on the left so you
   never lose track of which load a row belongs to. Works the same on phone and
   computer — the two frozen columns stay put while everything else scrolls. */
.board-table { min-width: max-content; }            /* let columns keep full width and scroll, never squish */
.board-table th, .board-table td { padding: 7px 10px; }

/* frozen (sticky) left columns — Container# then Order# */
.board-table .fz { position: sticky; z-index: 2; }
.board-table .fz1 { left: 0; width: 96px; min-width: 96px; }
.board-table .fz2 { left: 96px; width: 108px; min-width: 108px; }
.board-table .fz3 { left: 204px; width: 108px; min-width: 108px; border-right: 2px solid var(--border-strong); }
.board-table tbody td.fz { background: var(--surface-card); }       /* default backing so scrolling cells don't show through */
.board-table thead th.fz { background: var(--surface-sunken); z-index: 5; }

/* grouped header (Pull / Deliver / Empty / Ingate ...) */
.board-table thead tr.grp th {
  text-align: center; font-size: 11px; letter-spacing: .03em; text-transform: uppercase;
  color: var(--text-secondary); background: var(--surface-sunken); border-bottom: 1px solid var(--border);
}
.board-table thead tr.grp th.grp-leg { border-left: 2px solid var(--border-strong); }
/* sortable column headers */
.board-table thead th[data-sk] { cursor: pointer; user-select: none; }
.board-table thead th[data-sk]:hover { background: var(--border); }
.board-table thead th.fz[data-sk]:hover { background: var(--border); }
.sort-ar { font-size: 9px; margin-left: 3px; color: var(--status-info); }
.board-table thead tr.cols th.grp-start { border-left: 2px solid var(--border-strong); }
.board-table td.grp-start { border-left: 2px solid var(--surface-sunken); }
.board-table td.dt, .board-table td.dvr { font-size: 13px; }
.board-table td.ppw { text-align: center; }
.ppw-ok { color: var(--status-success); font-weight: 700; }
.ppw-no { color: var(--status-danger); font-weight: 700; }
/* row attention flags (rate con / paperwork) — small badges at the end of the row,
   separate from the status pill which now only says where the container is */
.rowflag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .3px;
  padding: 1px 5px; border-radius: 4px; vertical-align: middle; }
.rowflag-rc { background: #1f3864; color: #fff; }       /* rate con missing */
.rowflag-ppw { background: #e1c9f0; color: #5a2d77; }    /* paperwork missing */
.rowflag-hold { background: var(--status-danger); color: #fff; }      /* terminal hold (PH) */
.rowflag-disp { background: var(--status-success); color: #fff; }      /* all moves dispatched */
.rowflag-disp-part { background: var(--status-warning); color: #fff; } /* some moves still to dispatch */
/* street-turn record banner (load drawer + billing worksheet) */
.st-note { margin: 8px 14px; padding: 7px 11px; border-radius: 7px; font-size: 12.5px;
  background: var(--status-info-soft); color: var(--text-primary); border: 1px solid var(--status-info-border); }
.st-note .lnk { cursor: pointer; color: var(--status-info); text-decoration: underline; }
.st-note .lnk:hover { color: var(--brand-primary); }
.st-note .st-maybe { color: var(--status-warning); font-style: italic; }
.st-note .st-confirm { color: var(--status-success); font-style: normal; }
.rc-yes { color: var(--status-success); font-weight: 600; }
.rc-no  { color: var(--status-danger); font-weight: 600; }

/* ---- row colour-coding by status (mirrors the spreadsheet's colours) ---- */
.board-table tbody tr.row-DISPATCHED td        { background: #fcf3cf; }   /* yellow  – dispatched   */
.board-table tbody tr.row-DROPPED td           { background: #fae0c6; }   /* orange  – dropped      */
.board-table tbody tr.row-PRE-PULLED td        { background: #ece7fb; }   /* lavender– pre-pulled   */
.board-table tbody tr.row-AVAILABLE td         { background: #e6f4ec; }   /* green   – available    */
.board-table tbody tr.row-PENDING-DELIVERY td  { background: #fbeed2; }   /* amber – delivered, in transit */
.board-table tbody tr.row-CONTAINER-EMPTY td   { background: #d3eef8; }   /* light blue – emptied, needs empty pickup */
.board-table tbody tr.row-ON-HOLD td           { background: #efe9da; }   /* tan     – on hold      */
.board-table tbody tr.row-ISSUES td            { background: #fcdde9; }   /* pink    – check later  */
.board-table tbody tr.row-MISSING-RATECON td   { background: #bcd3f0; }   /* blue (deeper, distinct from light-blue) – no rate con */
.board-table tbody tr.row-MISSING-PPW td       { background: #eadcf4; }   /* mauve   – missing ppw  */
.board-table tbody tr.row-COMPLETED td         { background: #dcf0cb; }   /* bright green – done    */
.board-table tbody tr.row-CANCELLED td         { background: #f8d7d7; }   /* red     – cancelled    */
/* hover stays readable and beats the row tint, including on frozen cells */
.board-table tbody tr.load-row:hover td        { background: var(--status-info-soft); }

#drawer-backdrop {
  /* above the sticky header (z-index 30) so the modal fully covers it — otherwise the
     command rail paints over the drawer's title/tabs and you can't scroll up to them */
  position: fixed; inset: 0; background: var(--surface-overlay); z-index: 40;
}
#drawer {
  /* top-anchored (not vertically centered) so switching tabs never moves the tab bar — the
     content grows / scrolls below a fixed top. */
  position: fixed; top: 4vh; left: 50%; transform: translateX(-50%);
  width: min(1080px, 96vw); max-height: 92vh; font-size: 13px;
  background: var(--surface-card); z-index: 41; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 20px 24px 28px;
}
.drawer-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.drawer-head h2 { margin: 0; font-size: 18px; flex: 1; }
.drawer-head .multi-cont { background: var(--status-info-soft); color: var(--status-info); border: 1px solid var(--status-info-border); border-radius: var(--radius-lg); padding: 2px 9px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
/* load detail tabs — same sleek red style as the customer profile tabs (.ctab) */
.drawer-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.drawer-tab { border: none; background: transparent; color: var(--text-secondary); padding: 8px 12px; font-weight: 400;
  font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.drawer-tab.active { color: var(--text-primary); border-bottom-color: var(--brand-primary); font-weight: 600; }
.drawer-tab:hover { color: var(--text-primary); }

/* ===== load Overview read-view (Stage 6, variant B) ===== */
.ovr-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
/* "Email Rail Bill" flash — once pieces/weight/seal are in on a rail load, this pulses
   until the info has been emailed to the customer. */
.railbill-flash { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 6px 0 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--brand-soft-border); background: var(--brand-soft);
  animation: railbill-pulse 1.3s ease-in-out infinite; }
.railbill-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 800;
  font-size: 12px; letter-spacing: .03em; text-transform: uppercase;
  color: #fff; background: var(--brand-primary, #D71319); border-radius: 999px; padding: 4px 10px; }
.railbill-msg { font-size: 12px; color: var(--text-secondary); }
.railbill-flash .btn { margin-left: auto; }
@keyframes railbill-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(215, 19, 25, 0); }
  50% { box-shadow: 0 0 0 4px rgba(215, 19, 25, .18); }
}
.railbill-note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 6px 0 10px; font-size: 12px; color: var(--status-success, #2e7d32); }
.railbill-note .btn { margin-left: 6px; }
.ovr-edit { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  color: var(--brand-primary); background: var(--brand-soft); border: 1px solid var(--brand-soft-border);
  border-radius: var(--radius-sm); padding: 5px 11px; cursor: pointer; }
.ovr-edit:hover { background: var(--brand-soft-border); }
.ovr-route { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.ovr-route i { color: var(--text-muted); font-size: 14px; }
.ovr-route b { color: var(--text-primary); font-weight: 600; }
.ovr-empty { color: var(--text-muted); }
.ovr-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 16px 0 9px; }
.ovr-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
@media (max-width: 560px) { .ovr-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.ovr-fld { background: var(--surface-sunken); border-radius: 9px; padding: 8px 10px; }
.ovr-fld .ovr-l { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
.ovr-fld .ovr-v { font-size: 14px; font-weight: 500; margin-top: 2px; }
.ovr-fld.mono .ovr-v { font-family: var(--font-mono); }
.ovr-moves { display: flex; flex-direction: column; }
.ovr-leg { display: flex; align-items: flex-start; gap: 11px; padding: 9px 0; position: relative; }
.ovr-leg:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: -9px; width: 2px; background: var(--border); }
.ovr-node { width: 28px; height: 28px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 15px; z-index: 1; }
.ovr-node.done { background: var(--status-success-soft); color: var(--status-success); }
.ovr-node.now { background: var(--brand-primary); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.ovr-node.next { background: var(--surface-sunken); color: var(--text-muted); }
.ovr-legbody { min-width: 0; }
.ovr-lt { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.ovr-lroute { font-size: 12.5px; color: var(--text-secondary); margin-top: 1px; }
.ovr-lroute .ti { font-size: 11px; color: var(--brand-primary); vertical-align: middle; }
.ovr-lw { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.ovr-ltimes { font-size: 11.5px; color: var(--text-secondary); margin-top: 1px; }
.ovr-nowpill { font-size: 10px; font-weight: 700; color: var(--status-warning); background: var(--status-warning-soft); padding: 1px 6px; border-radius: 5px; }
.ovr-ld { margin-left: auto; font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* "awaiting Samsara" notice over the dashboard Fleet · live hours widget */
.fleet-pending-note { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--status-warning);
  background: var(--status-warning-soft); border: 1px solid var(--status-warning-border);
  border-radius: var(--radius-sm); padding: 6px 10px; margin: 0 0 8px; }
.fleet-pending-note b { font-weight: 700; }
.fleet-pending-note .ti { font-size: 14px; flex: none; }

/* Overview two-column: details+moves (left) | Port Houston (right). Wider drawer → left
   stays 3-up; the port facts go 1-up in their column. */
.ov-grid { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; }
.ov-grid #ph-panel { margin: 0; }
.ov-grid #ph-panel .field-grid.ph-details { grid-template-columns: 1fr; }
/* narrow windows: stack back to top-to-bottom, and the left grids fall to 2-up */
@media (max-width: 760px) { .ov-grid { grid-template-columns: 1fr; } }
/* Port Houston detail fields: label + value on ONE row (compact — less scrolling) */
#ph-panel .field-grid.ph-details > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 1px 0; }
#ph-panel .field-grid.ph-details label { font-size: 11px; color: var(--text-muted); margin: 0; white-space: nowrap; }
#ph-panel .field-grid.ph-details .ro-val { padding: 0; font-size: 12.5px; min-height: 0; text-align: right; font-weight: 600; }

/* drawer scrollbar: transparent track + rounded inset thumb so it stops painting a
   square over the popup's rounded corner */
#drawer { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
#drawer::-webkit-scrollbar { width: 13px; }
#drawer::-webkit-scrollbar-track { background: transparent; }
#drawer::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px;
  border: 3px solid var(--surface-card); background-clip: padding-box; }
#drawer::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.elig-note { background: var(--status-warning-soft); border: 1px solid var(--status-warning-border); border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 13px; margin-bottom: 12px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px 12px; }
/* denser 3-up grid for the overview move/container sections — fits more, less scrolling */
.field-grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.field-grid .span-2 { grid-column: span 2; }
.field-grid label, .field label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.field-grid input, .field-grid select, .field-grid textarea { width: 100%; }
/* Overview: short fields put their label INLINE (label · input on one row) instead of stacking,
   so the form isn't so tall. Targets any cell with a direct <label> child (handles both plain
   cells and the wrapped export-only cells). Locations stay stacked — they show an address line
   beneath — so .loc-field is excluded. */
.ov-section .field-grid div:has(> label):not(.loc-field) {
  display: grid; grid-template-columns: minmax(0,auto) minmax(0,1fr); align-items: center; column-gap: 8px;
}
.ov-section .field-grid div:has(> label):not(.loc-field) > label {
  margin-bottom: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* One-way loads go pickup → final destination (no middle delivery/customer stop) */
.flow-one_way .ov-delivery { display: none; }
@media (max-width: 720px) { .field-grid.cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.loc-field .loc-info { font-size: 11.5px; margin-top: 2px; min-height: 14px; display: flex; align-items: center; gap: 6px; }
.loc-addr { color: var(--status-success); }
.loc-add { color: var(--status-info); text-decoration: none; }
.loc-add:hover { text-decoration: underline; }
/* red "terminal mismatch" alert next to a pickup (board route cell + drawer pickup label):
   Port Houston reports the box came in at a different terminal than the desk entered */
.terminal-alert { color: var(--status-danger); font-weight: 700; font-size: 11px; white-space: nowrap; }
.terminal-alert .ti { vertical-align: -2px; font-size: 14px; }
.nb-route .terminal-alert { font-size: 13px; }
.nb-route .terminal-alert .ti { font-size: 15px; }
.loc-addr-input { flex: 1; padding: 4px 7px; font-size: 12px; }
.field { margin-top: 9px; }
.field textarea { width: 100%; min-height: 60px; }
.drawer h3 { font-size: 14px; margin: 22px 0 8px; border-top: 1px solid var(--border); padding-top: 16px; }
#drawer h3:first-of-type { border-top: none; padding-top: 0; }
.leg-grid { display: grid; grid-template-columns: 130px 1fr 120px 110px 70px; gap: 6px 8px; align-items: center; font-size: 13px; }
/* Move info (Leg) sizes to its content (label + route, no wrap); driver, day and chassis are
   compact fixed columns. justify-content:start packs the columns together (free space to the
   right) instead of the Leg column stretching to fill the wide drawer. Keep 4 columns — the rows
   have exactly 5 cells (Leg, Driver, Day, Chassis, Gate appt). */
.leg-grid.dispatch-grid { grid-template-columns: 280px 146px 118px 192px 150px;
  justify-content: start; align-items: start; column-gap: 12px; }
.leg-grid.dispatch-grid > .leg-label { padding-top: 4px; }
/* the "use same chassis as above" control is a compact icon so the chassis number has room */
.leg-grid.dispatch-grid .chassis-same { flex: 0 0 auto; padding: 6px 8px; font-size: 13px; line-height: 1; font-weight: 700; }
/* narrower screens: let the move-info flex (route may wrap) and tighten the input columns so
   nothing clips off the right edge of the drawer. */
@media (max-width: 1000px) {
  .leg-grid.dispatch-grid { grid-template-columns: minmax(120px, 1fr) 118px 106px 170px 128px; column-gap: 8px; }
}
.leg-grid.moves-grid { grid-template-columns: 130px 1fr 1.1fr 130px 70px; }
.leg-grid .leg-label { font-weight: 600; font-size: 12.5px; }
.leg-grid .leg-route { display: block; font-weight: 400; font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
.leg-grid .leg-route .ti { font-size: 10px; color: var(--brand-primary); vertical-align: middle; }
.leg-grid input, .leg-grid select { width: 100%; padding: 5px 7px; }
.leg-grid .moves-ro { font-size: 13px; padding: 5px 2px; color: var(--text-primary); }
.leg-grid .moves-ro.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
/* Editable move builder (Moves tab): position · type · container# · chassis# · date · ppw · driver · delete */
.move-builder { display: grid; grid-template-columns: 20px minmax(90px,1fr) 70px 70px 90px 84px 84px 54px minmax(44px,0.65fr) 18px; gap: 6px 6px; align-items: center; font-size: 13px; }
.move-builder .mv-t { font-size: 12px; color: var(--text-secondary); text-align: center; white-space: nowrap; }
.move-builder .mv-t.muted { color: var(--text-muted); }
.move-builder .mv-t.port { color: var(--brand-primary); font-weight: 600; }
.move-builder .mv-t.inferred { font-weight: 500; font-style: italic; opacity: .85; cursor: help; }
.move-builder .mv-ted { display: block; min-width: 0; }
.move-builder .mv-time-in { width: 100%; font-size: 11px; padding: 4px 2px; }
.move-builder .move-row { display: contents; }
.move-builder .move-row > * { min-width: 0; }
.move-builder .move-row.head > span { font-size: 11px; color: var(--text-muted); }
.move-builder input, .move-builder select { width: 100%; padding: 5px 6px; box-sizing: border-box; }
.move-builder select { padding-right: 18px; text-overflow: ellipsis; }
.move-builder .move-pos { text-align: center; color: var(--text-muted); font-size: 12px; }
.move-builder .move-box { font-family: var(--font-mono); text-transform: uppercase; }
.move-builder .move-driver { font-size: 12.5px; color: var(--text-secondary); padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move-builder .move-del { border: none; background: none; color: var(--status-danger); cursor: pointer; font-size: 14px; padding: 2px; border-radius: var(--radius-sm); }
.move-builder .move-del:hover { background: var(--status-danger-soft); }
.move-builder .move-row.ghost { opacity: .8; }
.move-builder .move-row.addrow { border-top: 1px dashed var(--border); padding-top: 6px; margin-top: 4px; }
.move-builder .move-row.addrow .move-pos { color: var(--status-success); font-weight: 700; }
.move-builder .move-row.addrow select { width: auto; }
.charge-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.charge-row input { padding: 5px 7px; }

/* ---------- pay & revenue (load drawer bottom) ---------- */
.pay-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface-sunken); }
.pay-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pay-line label { font-size: 13px; color: var(--text-secondary); }
.pay-line input { width: 130px; padding: 5px 8px; text-align: right; }
.pay-sub { font-size: 12px; color: var(--text-muted); margin: 8px 0 3px; }
/* inline label + narrow input on ONE line (e.g. "Linehaul billed $ [____]"), wrapping as
   needed — short money/day fields shouldn't each eat a whole stacked row */
.pay-lump { display: flex; flex-wrap: wrap; gap: 7px 18px; align-items: center; }
.pay-lump label { flex: 0 0 auto; font-size: 12px; color: var(--text-secondary); display: inline-flex; flex-direction: row; align-items: center; gap: 6px; }
.pay-lump input { padding: 5px 8px; text-align: right; width: 90px; }
.pay-lump select { padding: 5px 8px; }
.pay-lump input[data-field="chassis_days"] { width: 58px; }
.pay-lump input[data-field="fsc_billed_pct"] { width: 56px; }
/* Customer Billing: uniform invoice-style line items — [label column] [fields] per row */
.bill-rows { display: flex; flex-direction: column; gap: 7px; margin: 8px 0 2px; }
.bill-row { display: grid; grid-template-columns: 132px 1fr; align-items: center; gap: 10px; }
.bill-row .bl-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.bill-row .bl-vals { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bill-row .bl-cur { color: var(--text-muted); font-size: 12px; }
.bill-row .bl-op { color: var(--text-muted); font-size: 13px; }
.bill-row .bl-unit { color: var(--text-muted); font-size: 11px; margin-left: -4px; }
.bill-row .payin { width: 92px; text-align: right; padding: 5px 8px; }
.bill-row .bl-days { width: 56px; }
.bill-row .bl-pct { display: inline-flex; align-items: center; gap: 3px; }
.bill-row .bl-pct input { width: 50px; }
@media (max-width: 560px) { .bill-row { grid-template-columns: 1fr; gap: 3px; } }
.leg-pay-grid { display: grid; grid-template-columns: 110px 1fr 110px 110px; gap: 5px 8px; align-items: center; font-size: 13px; }
.leg-pay-grid input { padding: 5px 7px; text-align: right; width: 100%; }
.leg-pay-grid .leg-label { font-weight: 600; font-size: 12.5px; }
.driver-pay-grid { display: grid; grid-template-columns: 1fr 120px 120px; gap: 6px 8px; align-items: center; font-size: 13px; }
.driver-pay-grid input { padding: 5px 7px; text-align: right; width: 100%; }
.driver-pay-grid .dp-driver { font-weight: 600; font-size: 12.5px; }
.driver-pay-grid .dp-h { font-size: 11px; }
.driver-pay-grid .dp-h-num { text-align: right; }   /* numeric column headers sit over their right-aligned inputs */
/* match the "Total billed" total line exactly: plain right-aligned, label normal, amount green */
.pay-totals { margin-top: 8px; font-size: 13px; text-align: right; }
.pay-totals b { color: var(--status-success); }

/* D3 Pay & Revenue: billing vs pay sections + line items + P&L summary */
.bill-section, .pay-section { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.bill-section { background: var(--status-info-soft); }
.pay-section { background: var(--surface-sunken); }
.bill-section h3, .pay-section h3 { margin: 0 0 7px; font-size: 14px; }
.chg-list { display: flex; flex-direction: column; gap: 5px; }
.chg-line { display: grid; grid-template-columns: 130px 1fr 70px 70px 80px 1fr 24px; gap: 5px; align-items: center; }
.chg-line.pay { grid-template-columns: 130px 1fr 90px 130px 1fr 24px; }
/* vendor pay line: vendor · what-for · amount · notes · delete */
.chg-line.pay.vendor { grid-template-columns: 160px 1fr 90px 1fr 24px; }
.chg-line.pay.deduction { grid-template-columns: 130px 1fr 55px 65px 80px 110px 1fr 24px;
  background: var(--status-danger-soft); border: 1px solid var(--status-danger-border);
  border-radius: var(--radius-sm); padding: 3px 5px; }
.chg-line.deduction .chg-amt { color: var(--status-danger); font-weight: 700; }
.chg-line input, .chg-line select { padding: 4px 6px; width: 100%; font-size: 12.5px; }
.chg-line .chg-num { text-align: right; }
.chg-line .chg-del { color: var(--status-danger); padding: 2px 6px; }
.deduction-btn { color: var(--status-danger); border-color: var(--status-danger-border); margin-left: 6px; }
.section-total { margin-top: 8px; font-size: 13px; text-align: right; }
.section-total b { color: var(--status-success); }
.bill-warn-note { background: var(--status-warning-soft); border: 1px solid var(--status-warning-border); border-radius: 8px; padding: 6px 10px; font-size: 12px; margin-top: 6px; }
.fin-summary { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: var(--surface-card); }
.fin-title { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.fin-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.fin-row .fin-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.fin-row.neg .fin-num { color: var(--status-danger); }
.fin-row.sub { border-top: 1px solid var(--border); font-weight: 600; }
.fin-row.tot { border-top: 2px solid #1f3864; font-weight: 700; font-size: 16px; color: var(--status-success); margin-top: 2px; }
.fin-row.fin-note { padding: 0 0 4px; font-size: 11px; }
.fin-override { margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.fin-override label { display: flex; align-items: center; gap: 6px; }
.fin-override input { width: 80px; padding: 5px 7px; text-align: right; }
/* billing worksheet — copy/paste for Tailored TSM (D2a) */
.billing-ws { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface-sunken); margin-top: 14px; }
.ws-head { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.ws-alert { background: var(--status-warning-soft); border: 1px solid var(--status-warning-border); color: var(--status-warning); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; margin-bottom: 10px; }
.ws-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ws-col-h { font-weight: 600; font-size: 13px; margin-bottom: 5px; display: flex; justify-content: space-between; align-items: baseline; }
.ws-col-h .ws-total { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--status-success); }
.ws-tbl { font-size: 12.5px; }
.ws-tbl th, .ws-tbl td { padding: 4px 7px; }
/* keep every line item (incl. chassis) on a single row, not wrapping to two */
.ws-tbl td:first-child, .ws-tbl th:first-child { white-space: nowrap; }
.ws-tbl td.r, .ws-tbl th.r { white-space: nowrap; width: 1%; }
.ws-col .ws-copy { margin-top: 8px; }
@media (max-width: 760px) { .ws-grid { grid-template-columns: 1fr; } }
/* duplicate-loads groups (D4) */
main .dup-grp { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: var(--surface-card); }
main .dup-grp.dup-likely { border-color: var(--status-danger-border); background: var(--status-danger-soft); }
main .dup-grp-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; }
main .dup-grp .tbl { font-size: 12.5px; }
main .dup-grp .tbl tbody tr { cursor: pointer; }
/* suggested (not-yet-accepted) driver pay value */
input.pay-suggested { color: var(--text-muted); font-style: italic; background: var(--surface-sunken); }
.activity-list { font-size: 12.5px; color: var(--text-secondary); }
.activity-list div { padding: 3px 0; border-bottom: 1px dotted var(--border); }
.activity-list .tl-h { font-weight: 700; color: var(--text-primary); border-bottom: none; padding: 2px 0 4px; }
.activity-list .tl-row { display: grid; grid-template-columns: 18px auto minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dotted var(--border); }
.activity-list .tl-row .ti { color: var(--brand-primary); font-size: 14px; }
.activity-list .tl-when { font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.activity-list .tl-txt { color: var(--text-secondary); }
.activity-list .tl-date { font-size: 11px; text-align: right; white-space: nowrap; }
.checks { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.checks label { font-size: 13px; color: var(--text-secondary); display: flex; gap: 6px; align-items: center; }

/* ---------- overview: import/export sections ---------- */
.ov-dir { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ov-dir label { font-size: 13px; color: var(--text-secondary); }
.ov-dir select { padding: 4px 8px; font-weight: 600; }
.ov-section { border: 1px solid var(--surface-sunken); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: var(--surface-card); }
.ov-section-head { font-weight: 600; font-size: 13px; margin-bottom: 7px; color: var(--text-primary);
  text-transform: uppercase; letter-spacing: .03em; }
.ov-specialties { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 9px;
  padding-top: 10px; border-top: 1px solid var(--border); }
.ov-specialties-label { font-size: 12px; color: var(--text-muted); }
.ov-specialties label { font-size: 13px; color: var(--text-secondary); display: flex; gap: 6px; align-items: center; }
.ov-ready-pu { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 11px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  background: #eafaf6; border: 1px solid #9bd8cb; border-radius: 7px; }
.ov-ready-pu input { margin-top: 2px; }
/* show only the fields for the chosen direction */
.dir-import .ov-only-export, .dir-export .ov-only-import { display: none; }
/* read-only auto-populated value */
.ro-val { padding: 6px 2px; font-size: 14px; min-height: 18px; }
.ph-details { margin: 4px 0 6px; }
.ph-details-head { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.ph-details .ro-val { color: var(--text-primary); font-weight: 500; }

/* billing readiness (Pay & Revenue) */
.closeout-section .closeout-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.closeout-section label { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.billable-yes { font-weight: 700; color: var(--status-success); }
/* billed FSC: hide the percent box unless "% of Linehaul" mode is chosen */
.fsc-mode-flat .fsc-pct-only { display: none; }
/* drawer Save button: stands out while there are unsaved edits */
#drawer-save { margin-left: auto; }
#drawer-save.dirty { box-shadow: 0 0 0 3px rgba(47,111,237,.25); }
#drawer-save:disabled { opacity: .55; }
.drawer-head #delete-load { margin-left: 8px; }

.payroll-driver { background: var(--surface-card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.payroll-driver .head {
  display: flex; justify-content: space-between; padding: 10px 14px;
  background: var(--surface-sunken); border-bottom: 1px solid var(--border); font-weight: 600;
}
.payroll-driver input.pay { width: 90px; padding: 4px 7px; text-align: right; }
.suggest { color: var(--status-info); cursor: pointer; font-size: 12px; white-space: nowrap; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--surface-chrome); color: #fff; padding: 9px 18px; border-radius: 999px;
  font-size: 13px; z-index: 50; opacity: 0; transition: opacity .2s;
}
.toast.show { opacity: 1; }

/* ---------- nav badge ---------- */
.nav-badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  background: var(--status-danger); color: #fff; border-radius: 999px;
  font-size: 11px; line-height: 18px; text-align: center; vertical-align: middle;
}

/* ---------- suggestion panel ---------- */
.suggest-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.suggest-btn {
  border-color: var(--status-info); color: var(--status-info); background: var(--status-info-soft); font-size: 13px;
}
.suggest-btn:hover { background: var(--status-info-soft); }
.suggest-head { font-size: 13px; margin: 10px 0 8px; }
.suggest-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-card);
}
.suggest-card.top { border-color: var(--status-info); background: var(--status-info-soft); }
.suggest-score {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; color: #fff;
}
.score-hi { background: var(--status-success); }
.score-mid { background: var(--status-warning); }
.score-lo { background: var(--status-neutral); }
.suggest-info { flex: 1; min-width: 0; }
.suggest-name { font-weight: 600; margin-bottom: 3px; }
.best-tag {
  font-size: 11px; font-weight: 500; color: var(--status-info);
  background: var(--status-info-soft); padding: 1px 7px; border-radius: 999px; margin-left: 6px;
}
.suggest-reasons { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.suggest-reasons span {
  font-size: 12px; color: var(--text-secondary); background: var(--surface-sunken);
  padding: 2px 8px; border-radius: 999px;
}
.offer-btn { flex: 0 0 auto; }
.offer-sent {
  padding: 12px; border-radius: 10px; background: var(--status-success-soft); color: var(--status-success); font-size: 13px;
}

/* ---------- offers view ---------- */
.offer-card {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-card);
}
.offer-main { flex: 1; min-width: 0; }
.offer-driver { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.offer-phone { font-weight: 400; font-size: 13px; margin-left: 8px; }
.offer-detail { font-size: 13px; margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.offer-actions { display: flex; gap: 8px; flex: 0 0 auto; }

/* ---------- manual dispatch board ---------- */
.db-wrap {
  display: grid; grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 16px; align-items: start;
}
.db-col-head { font-weight: 600; font-size: 14px; margin: 0 2px 8px; }
.db-pending, .db-drivers { min-width: 0; }
.db-empty { padding: 18px; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface-card); }
.db-col-head .muted { font-weight: 400; font-size: 12px; }
.db-section { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 8px; }
.db-section-head {
  display: block; width: 100%; text-align: left; background: none; border: none;
  cursor: pointer; font: inherit; color: var(--text-secondary); padding: 6px 2px;
}
.db-section-head .db-caret { display: inline-block; width: 1em; }
.db-section-head .muted { font-size: 12px; margin-left: 6px; }
.db-section.hidden-body .db-section-body { display: none; }

.db-load {
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-card);
  padding: 10px 12px; margin-bottom: 10px; cursor: pointer;
}
.db-load:hover { border-color: var(--border-strong); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.db-load-top { display: flex; align-items: center; gap: 8px; }
.db-load-top .mono { font-weight: 600; }
.db-h { margin-left: auto; font-size: 12px; }
.db-load-sub { color: var(--text-secondary); font-size: 12px; margin: 3px 0 7px; }
.db-legs { display: flex; flex-wrap: wrap; gap: 6px; }
.db-leg {
  font-size: 12px; padding: 3px 8px; border-radius: 999px; border: 1px solid transparent;
}
.chip-open {
  background: var(--status-info-soft); border-color: var(--status-info-border); color: var(--status-info); cursor: grab;
}
.chip-open:active { cursor: grabbing; }
.chip-assigned { background: var(--surface-sunken); color: var(--text-secondary); }

.db-drivers {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; align-items: start;
}
.db-drivers .db-col-head { grid-column: 1 / -1; }
.db-driver {
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-card); overflow: hidden;
  transition: box-shadow .12s, border-color .12s;
}
.db-driver.drop-hot { border-color: var(--status-info); box-shadow: 0 0 0 2px var(--status-info-border) inset; }
.db-driver-head {
  padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--surface-sunken);
}
.db-driver-name { font-weight: 600; font-size: 14px; display: block; margin-bottom: 4px; }
.db-driver-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 44px; }
.db-driver-empty { padding: 8px 4px; font-size: 12px; }
.db-chip {
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface-sunken); padding: 6px 8px;
  display: flex; align-items: center; gap: 8px; cursor: grab; font-size: 12px;
}
.db-chip:active { cursor: grabbing; }
.db-chip .mono { font-weight: 600; }
.db-chip-leg { color: var(--status-info); }
.db-chip-dest { color: var(--text-secondary); margin-left: auto; }
.dragging { opacity: .45; }

.assign-menu {
  position: fixed; z-index: 1000; width: 240px; background: var(--surface-card);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18);
  padding: 10px;
}
.assign-menu .am-head { font-weight: 600; margin-bottom: 8px; }
.assign-menu .am-row { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.assign-menu .am-row select { padding: 6px; border: 1px solid var(--border); border-radius: 6px; }
.assign-menu .am-legs-label { font-size: 12px; color: var(--text-secondary); margin: 10px 0 4px; }
.assign-menu .am-legs { display: flex; flex-direction: column; gap: 4px; max-height: 160px; overflow: auto; }
.assign-menu .am-leg { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.assign-menu .am-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ---------- dispatch board: two independently-scrolling panes (loads / drivers) ---------- */
/* compact stat strip (replaces the tall metric cards on the dispatch board) */
.metrics.dbx-statbar { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; align-items: baseline; }
.dbx-stat { font-size: 10px; color: var(--text-secondary); white-space: nowrap; }
.dbx-stat b { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-right: 3px; }
.dbx-stat.danger b { color: var(--status-danger); }
.dbx { display: flex; flex-direction: column; gap: 0; height: calc(100vh - 182px); min-height: 420px; }
.dbx-block { min-width: 0; display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
/* draggable divider sets how the two panes split; loads-block takes --dbx-split, drivers takes the rest */
.dbx-loads-block { flex: 0 0 var(--dbx-split, 50%); min-height: 90px; }
.dbx-drivers-block { flex: 1 1 0; min-height: 90px; }
.dbx-splitter { flex: 0 0 12px; display: flex; align-items: center; justify-content: center; cursor: row-resize; touch-action: none; }
.dbx-splitter-grip { width: 48px; height: 4px; border-radius: 3px; background: var(--border-strong); transition: background .12s; }
.dbx-splitter:hover .dbx-splitter-grip, body.dbx-splitting .dbx-splitter-grip { background: var(--status-info); }
body.dbx-splitting { cursor: row-resize; user-select: none; }
.dbx-cols-ctrl { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.dbx-cols-ctrl button { font-size: 11px; font-weight: 600; padding: 2px 8px; border: none; background: var(--surface-card); color: var(--text-secondary); cursor: pointer; }
.dbx-cols-ctrl button + button { border-left: 1px solid var(--border); }
.dbx-cols-ctrl button.active { background: var(--status-info-soft); color: var(--status-info); }
.dbx-col-head { font-weight: 600; font-size: 11px; margin: 0 2px 6px; flex: 0 0 auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 8px; }
.dbx-col-head .muted { font-weight: 400; font-size: 9.5px; }
.dbx-undo-btn {
  margin-left: auto; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 6px;
  border: 1px solid #f59e0b; background: rgba(245,158,11,.14); color: #d97706; cursor: pointer;
}
.dbx-undo-btn:hover:not(:disabled) { background: rgba(245,158,11,.24); }
.dbx-undo-btn:disabled { border-color: var(--border); background: var(--surface-card); color: var(--text-secondary); opacity: .5; cursor: default; }
.dbx-head-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.dbx-head-actions .dbx-undo-btn { margin-left: 0; }
.dbx-send-btn {
  font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 6px;
  border: 1px solid var(--status-info); background: var(--status-info-soft); color: var(--status-info); cursor: pointer;
}
.dbx-send-btn:hover:not(:disabled) { background: var(--status-info); color: #fff; }
.dbx-send-btn:disabled { border-color: var(--border); background: var(--surface-card); color: var(--text-secondary); opacity: .5; cursor: default; }
/* day-defer strip — drag a load onto a day to plan it there */
.dbx-daybar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 2px 6px; font-size: 11px; flex: 0 0 auto; }
.dbx-daybar-lbl { color: var(--text-secondary); font-weight: 600; }
.dbx-day-target {
  font-size: 11px; padding: 2px 9px; border-radius: 6px; border: 1px dashed var(--border-strong);
  background: var(--surface-sunken); color: var(--text-secondary); white-space: nowrap;
}
.dbx-day-target b { color: var(--text-primary); }
.dbx-day-target.drop-hot { border-style: solid; border-color: var(--status-info); background: var(--status-info-soft); color: var(--status-info); }
.dbx-day-clear { border-color: var(--border); }
.dbx-planday { color: #0891b2; border-color: rgba(8,145,178,.4); background: rgba(8,145,178,.14); font-size: 8px; padding: 1px 5px; }
/* send-dispatches review modal */
.dbx-send { max-width: 540px; width: 92vw; padding: 18px 20px; }
.dbx-send-head { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.dbx-send-list { display: flex; flex-direction: column; gap: 4px; max-height: 46vh; overflow: auto; margin-bottom: 14px; }
.dbx-send-row { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; min-width: 0; }
.dbx-send-row:hover { border-color: var(--border-strong); }
.dbx-send-drv { font-weight: 700; white-space: nowrap; }
.dbx-send-moves { color: var(--text-secondary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbx-send-actions { display: flex; justify-content: flex-end; gap: 8px; }
/* warn-before-move confirm */
.dbx-confirm { max-width: 460px; width: 92vw; padding: 18px 20px; }
.dbx-confirm-title { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.dbx-confirm-body { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.dbx-warn-row {
  font-size: 13px; line-height: 1.35; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--status-warning-border, var(--border)); background: var(--status-warning-soft, var(--surface-sunken)); color: var(--text-primary);
}
.dbx-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dbx-scroll { flex: 1 1 0; min-height: 0; overflow-y: auto; padding-right: 3px; }
.dbx-loads-pane.drop-hot { outline: 2px dashed var(--status-info); outline-offset: -3px; border-radius: 10px; }
.dbx-drivers {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-auto-rows: min-content; gap: 8px; align-content: start;
  flex: 1 1 0; min-height: 0; overflow-y: auto; padding-right: 3px;
}
.dbx-driver { border: 1px solid var(--border); border-radius: 8px; background: var(--surface-card); overflow: hidden; }
.dbx-driver.drop-hot { border-color: var(--status-info); box-shadow: 0 0 0 2px var(--status-info-border) inset; }
.dbx-driver-full { opacity: .72; }
.dbx-driver-full .dbx-driver-head { background: var(--surface-sunken); }
.dbx-full-tag {
  font-size: 7.5px; font-weight: 700; letter-spacing: .04em; color: var(--status-danger);
  border: 1px solid var(--status-danger-border); background: var(--status-danger-soft);
  border-radius: 4px; padding: 0 4px; margin-left: 5px;
}
.dbx-driver-head {
  padding: 4px 7px; border-bottom: 1px solid var(--border); background: var(--surface-sunken);
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  cursor: grab; touch-action: none;
}
.dbx-driver-head:active { cursor: grabbing; }
.dbx-driver-id-wrap { display: flex; align-items: center; gap: 4px; min-width: 0; }
.dbx-drag-grip { flex: 0 0 auto; color: var(--text-secondary); font-size: 11px; line-height: 1; opacity: .55; }
.dbx-driver-head:hover .dbx-drag-grip { opacity: 1; color: var(--status-info); }
.dbx-driver-name { font-weight: 700; font-size: 9px; letter-spacing: .01em; min-width: 0; overflow-wrap: anywhere; }
.dbx-driver-hours { flex: 0 0 auto; }
.dbx-driver-body { padding: 4px; display: flex; flex-direction: column; gap: 3px; min-height: 26px; }
.dbx-driver-empty { padding: 5px 4px; font-size: 7.5px; color: var(--text-secondary); }
.dbx-item {
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface-sunken); padding: 3px 5px;
  display: flex; flex-direction: column; gap: 1px; cursor: grab; font-size: 7px; touch-action: none;
}
.dbx-item:active { cursor: grabbing; }
.dbx-item-top { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.dbx-item-top .mono { font-size: 8px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dbx-item-sub { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.dbx-item-leg { color: var(--status-info); font-weight: 500; white-space: nowrap; flex: 0 0 auto; }
.dbx-item-dest { color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.dbx-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 1px; }
.dbx-item-lfd { font-size: 8.5px; color: var(--status-danger); font-weight: 700; white-space: nowrap; }
.dbx-item.reorder-before { box-shadow: 0 -2px 0 0 var(--status-info); }
.dbx-item.reorder-after { box-shadow: 0 2px 0 0 var(--status-info); }
/* a container this driver runs back-to-back, in order — grouped as one box (continuity) */
.dbx-loadbox {
  border: 1px solid var(--status-info-border); border-radius: 6px; background: var(--status-info-soft);
  padding: 3px; display: flex; flex-direction: column; gap: 2px;
}
.dbx-loadbox-head { display: flex; align-items: baseline; gap: 5px; padding: 1px 4px 0; }
.dbx-loadbox-head .mono { font-weight: 700; font-size: 8px; }
.dbx-loadbox-head .muted { font-size: 6.5px; }
.dbx-item.in-box { background: var(--surface-card); }
/* 2 columns of compact 2-line cards: container + deadlines on top, move chips (right under
   the container) + route on the bottom — keeps each load's legs next to its container */
.dbx-loads { display: grid; grid-template-columns: repeat(var(--dbx-cols, 2), minmax(0, 1fr)); gap: 5px; align-content: start; }
@media (max-width: 700px) { .dbx-loads { grid-template-columns: 1fr; } }
.dbx-loads.drop-hot { outline: 2px dashed var(--status-info); outline-offset: 4px; border-radius: 10px; }
.dbx-row {
  display: flex; flex-direction: column; gap: 2px; overflow: hidden;
  border: 1px solid var(--border); border-left: 3px solid var(--border);
  border-radius: 7px; background: var(--surface-card); padding: 4px 8px;
  cursor: grab; touch-action: none; font-size: 9.5px;
}
.dbx-row:hover { border-color: var(--border-strong); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.dbx-row:active { cursor: grabbing; }
.dbx-row.dbx-src { outline: 2px solid var(--status-info); outline-offset: 1px; }   /* pulling a leg off this load */
.dbx-row.mode-port { border-left-color: #2f7fd1; }
.dbx-row.mode-rail { border-left-color: #c07a12; }
.dbx-row-top, .dbx-row-bot { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dbx-row-top > * { flex: 0 0 auto; }
.dbx-row-cont { font-size: 11px; font-weight: 700; letter-spacing: .01em; }
/* route + customer: the flexible, ellipsizing element on the info line (never squeezed out by legs) */
.dbx-row-mid { flex: 1 1 40px; min-width: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--text-secondary); }
.dbx-row-h { font-size: 8px; white-space: nowrap; }
.dbx-row-legs { display: flex; flex-wrap: wrap; gap: 4px; }
.dbx-row .dbx-leg { white-space: nowrap; }
.dbx-load {
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-card);
  padding: 9px 11px; cursor: grab; touch-action: none;
}
.dbx-load:hover { border-color: var(--border-strong); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.dbx-load:active { cursor: grabbing; }
.dbx-load-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; row-gap: 3px; }
.dbx-load-top .mono { font-size: 16px; font-weight: 700; letter-spacing: .01em; color: var(--text-primary); }
.dbx-h { margin-left: auto; font-size: 11px; font-weight: 500; white-space: nowrap; color: var(--text-secondary); }
.dbx-load-sub2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 3px 0 5px; }
.dbx-load-sub { color: var(--text-secondary); font-size: 12px; margin: 3px 0 7px; }
/* rail vs port = a color on the card's left edge + a dot */
.dbx-load { border-left: 3px solid var(--border); }
.dbx-load.mode-port { border-left-color: #2f7fd1; }
.dbx-load.mode-rail { border-left-color: #c07a12; }
.dbx-mode-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; background: var(--border-strong); }
.dbx-load.mode-port .dbx-mode-dot { background: #2f7fd1; }
.dbx-load.mode-rail .dbx-mode-dot { background: #c07a12; }
.dbx-item.mode-rail { border-left: 3px solid #c07a12; }
.dbx-item.mode-port { border-left: 3px solid #2f7fd1; }
.dbx-load-route { font-size: 13px; font-weight: 600; color: var(--text-primary); margin: 2px 0 7px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.dbx-arrow { color: var(--text-secondary); font-weight: 400; }
.dbx-load-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 7px; }
.dbx-tag { font-size: 8.5px; font-weight: 700; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--border); white-space: nowrap; }
.dbx-lfd { color: var(--status-danger); border-color: var(--status-danger-border); background: var(--status-danger-soft); font-size: 8px; padding: 1px 5px; }
.dbx-appt { color: #8b5cf6; border-color: rgba(139,92,246,.42); background: rgba(139,92,246,.14); font-size: 8px; padding: 1px 5px; }
.dbx-cust { font-size: 8px; }
.dbx-leg-h { margin-left: 4px; font-weight: 600; opacity: .8; }
.dbx-leg-appt { margin-left: 4px; font-size: 7.5px; color: #8b5cf6; font-weight: 600; white-space: nowrap; }
.dbx-item-h { margin-left: auto; font-weight: 600; font-size: 7.5px; color: var(--text-secondary); flex: 0 0 auto; }
.dbx-item-appt { font-size: 8.5px; color: #8b5cf6; font-weight: 700; white-space: nowrap; }
.dbx-legs { display: flex; flex-wrap: wrap; gap: 6px; }
.dbx-leg { font-size: 8px; padding: 1px 6px; border-radius: 999px; border: 1px solid transparent; touch-action: none; }
.dbx-leg.chip-open { background: var(--status-info-soft); border-color: var(--status-info-border); color: var(--status-info); cursor: grab; }
.dbx-leg.chip-open:active { cursor: grabbing; }
.dbx-leg.chip-assigned { background: var(--surface-sunken); color: var(--text-secondary); }
.dbx-dragging { opacity: .4; }
body.dbx-drag-active { cursor: grabbing; user-select: none; }
.dbx-ghost {
  position: fixed; z-index: 3000; pointer-events: none; left: 0; top: 0;
  padding: 7px 11px; border-radius: 9px; background: var(--surface-card);
  border: 1px solid var(--border); border-left: 4px solid var(--status-info);
  box-shadow: 0 10px 26px rgba(0,0,0,.28); opacity: .98; max-width: 300px;
}
.dbx-ghost-cont { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 13px; }
.dbx-ghost-sub { font-size: 11px; font-weight: 700; margin-top: 2px; }
.dbx-ghost-legs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.dbx-ghost-legs span { font-size: 10px; padding: 1px 6px; border-radius: 999px; background: var(--status-info-soft); color: var(--status-info); border: 1px solid var(--status-info-border); }
/* whole load (blue) vs a single move (amber) — so you know exactly what you're dropping */
.dbx-ghost.ghost-load { border-left-color: #2f7fd1; }
.dbx-ghost.ghost-load .dbx-ghost-sub { color: #2f7fd1; }
.dbx-ghost.ghost-move { border-left-color: #f59e0b; }
.dbx-ghost.ghost-move .dbx-ghost-sub { color: #d97706; }
.dbx-ghost.ghost-driver { border-left-color: var(--text-secondary); }
.dbx-ghost.ghost-driver .dbx-ghost-sub { color: var(--text-secondary); }
.dbx-prompt { max-width: 380px; padding: 18px 20px; }
.dbx-prompt-title { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.dbx-prompt-sub { color: var(--text-secondary); font-size: 13px; margin-bottom: 16px; }
.dbx-prompt-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- master plan ---------- */
.plan-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px; align-items: start;
}
.plan-driver {
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-card); overflow: hidden;
}
.plan-driver.idle { opacity: .8; }
.plan-driver-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; background: var(--surface-sunken); border-bottom: 1px solid var(--surface-sunken);
}
.plan-driver-name { font-weight: 600; font-size: 15px; }
.plan-hours-edit { display: flex; align-items: center; gap: 8px; }
.hbar { width: 90px; height: 7px; background: var(--surface-sunken); border-radius: 999px; overflow: hidden; }
.hbar-fill { height: 100%; }
.hb-ok { background: var(--status-success); }
.hb-high { background: var(--status-warning); }
.hb-full { background: var(--status-danger); }
.hbar-txt { font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
.db-hours-live, .db-hours-set {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 1px 5px; border-radius: 8px; margin-left: 6px; vertical-align: middle;
}
.db-hours-live { background: var(--status-success-soft); color: var(--status-success); }   /* live Samsara HOS */
.db-hours-set  { background: var(--surface-sunken); color: var(--text-secondary); }   /* dispatcher-set */
.avail-input { width: 58px; padding: 4px 6px; font-size: 12px; }
.plan-item { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.plan-item:last-child { border-bottom: none; }
.plan-item.locked { background: var(--status-info-soft); }
.plan-item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.plan-score {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.plan-lock { width: 26px; text-align: center; }
.plan-dest { font-size: 13px; color: var(--text-primary); }
.plan-h { margin-left: auto; font-size: 12px; white-space: nowrap; }
.plan-item-bot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.mini-reason { font-size: 11px; color: var(--text-secondary); background: var(--surface-sunken); padding: 1px 7px; border-radius: 999px; }
button.tiny { padding: 3px 10px; font-size: 12px; }
.plan-offer { margin-left: auto; }
.plan-unplaced {
  border: 1px solid var(--status-danger-border); background: var(--status-danger-soft); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px;
}
.plan-unplaced-head { font-weight: 600; color: var(--status-danger); margin-bottom: 8px; font-size: 13px; }
.unplaced-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 13px; padding: 5px 0; border-top: 1px solid var(--status-danger-border);
}
.lane-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.lane-table th { text-align: left; font-size: 12px; color: var(--text-muted); padding: 6px 8px; }
.lane-table td { padding: 5px 8px; border-top: 1px solid var(--border); }

/* ---------- plan day/week toggle ---------- */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.seg-btn { border: none; border-radius: 0; padding: 6px 14px; background: var(--surface-card); }
.seg-btn.active { background: var(--bj-black); color: #fff; }
.seg-btn:hover:not(.active) { background: var(--surface-sunken); }

/* ---------- weekly plan grid ---------- */
.week-grid {
  display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 8px; overflow-x: auto;
}
.week-day { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-card); min-width: 150px; }
.week-day.empty { background: var(--surface-sunken); }
.week-day-head {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  padding: 8px 10px; border-bottom: 1px solid var(--surface-sunken); font-weight: 600; font-size: 13px;
  cursor: pointer; background: var(--surface-sunken); border-radius: 10px 10px 0 0;
}
.week-day-head:hover { background: var(--status-info-soft); }
.week-day-body { padding: 6px; display: flex; flex-direction: column; gap: 8px; }
.week-driver { border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.week-driver:last-child { border-bottom: none; }
.week-driver-name { font-size: 12px; font-weight: 600; margin-bottom: 3px; display: flex; justify-content: space-between; }
.week-chip {
  display: flex; flex-direction: column; line-height: 1.25;
  background: var(--surface-sunken); border-radius: 6px; padding: 3px 7px; margin-bottom: 3px; font-size: 11px;
}
.week-chip.locked { background: var(--status-info-soft); }
.week-chip-dest { color: var(--text-secondary); }
.week-empty-note { text-align: center; padding: 10px 0; }

/* ---------- document intake ---------- */
.intake-upload {
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-card);
  padding: 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px;
}
.intake-drop {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px dashed var(--border); border-radius: 10px; padding: 12px 14px;
  transition: background .12s, border-color .12s;
}
.intake-drop.dragover { border-color: var(--status-success); background: var(--status-success-soft); }
.intake-or { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

/* load Documents: per-doc type dropdown + paperwork checklist / BINGO */
.doc-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.doc-badge { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 10px; white-space: nowrap; }
.doc-badge.pending { color: var(--status-warning); background: var(--status-warning-soft); border: 1px solid var(--status-warning-border); }
.doc-badge.rejected { color: var(--status-danger); background: var(--status-danger-soft); border: 1px solid var(--status-danger-border); }
.doc-row .doc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-row .doc-type-sel { font-size: 12px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-card); }
.doc-row .doc-meta { font-size: 11px; }
.paperwork { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; background: var(--surface-sunken); }
.paperwork.done { border-color: var(--status-success-border); background: var(--status-success-soft); }
.pw-head { font-size: 13px; margin-bottom: 8px; }
.pw-head.pw-bingo { color: var(--status-success); font-weight: 700; }
.pw-head.pw-todo { color: var(--status-warning); }
.pw-items { display: flex; flex-wrap: wrap; gap: 6px; }
.pw-item { font-size: 11.5px; padding: 3px 8px; border-radius: 20px; border: 1px solid transparent; }
.pw-item.pw-have { color: var(--status-success); background: var(--status-success-soft); border-color: var(--status-success-border); }
.pw-item.pw-missing { color: var(--status-warning); background: var(--status-warning-soft); border-color: var(--status-warning-border); }
.ppw-tiles { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.ppw-tiles .tile { flex: 1; min-width: 150px; }
.ppw-actions { white-space: nowrap; }
.ppw-actions .btn + .btn { margin-left: 6px; }
.ppw-tabs { display: flex; gap: 6px; margin: 0 0 14px; border-bottom: 1px solid var(--border); }
.ppw-tab { background: none; border: none; padding: 8px 14px; font-size: 13.5px; color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ppw-tab:hover { color: var(--text-primary); }
.ppw-tab.active { color: var(--brand-primary); font-weight: 700; border-bottom-color: var(--brand-primary); }
.ppw-tab-n { display: inline-block; min-width: 18px; text-align: center; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 10px; background: var(--surface-sunken); color: var(--text-secondary); margin-left: 3px; }
.ppw-tab.active .ppw-tab-n { background: var(--status-danger-soft); color: var(--status-danger); }

/* driver onboarding Kanban */
.kanban { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; align-items: stretch; }
.kan-col { flex: 1 1 0; min-width: 138px; background: var(--surface-sunken); border-radius: 10px; padding: 8px; }
.kan-col h4 { margin: 2px 4px 10px; font-size: 12.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.kan-n { font-size: 11px; font-weight: 700; background: var(--surface-sunken); color: var(--text-secondary); border-radius: 10px; padding: 1px 7px; }
.kan-card { background: var(--surface-card); border: 1px solid var(--border); border-radius: 9px; padding: 9px 10px; margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); cursor: pointer; }
.kan-card:hover { border-color: var(--border-strong); }
.kc-name { font-weight: 700; font-size: 13.5px; }
.kc-sub { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.kc-meta { font-size: 11px; color: var(--text-muted); margin-top: 5px; line-height: 1.35; }
.kc-move { display: flex; gap: 5px; align-items: stretch; margin-top: 8px; }
.kc-back { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface-card);
  color: var(--text-muted); font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; }
.kc-back:hover { background: var(--surface-sunken); color: var(--text-secondary); }
.kc-next { flex: 1; padding: 6px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--status-info-soft); color: var(--status-info); font-size: 12px; font-weight: 600; cursor: pointer; }
.kc-next:hover { background: var(--status-info-soft); }
.kc-ready { flex: 1; text-align: center; align-self: center; font-size: 12px; font-weight: 700; color: var(--status-success); }
.kan-empty { color: var(--text-muted); font-size: 13px; text-align: center; padding: 6px; }
.modal.onb-modal { width: 780px; max-width: 94vw; display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.onb-modal .modal-head { flex: 0 0 auto; }
.onb-body { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
.onb-modal .onb-actions { flex: 0 0 auto; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.onb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.onb-f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-secondary); min-width: 0; }
.onb-f.full { grid-column: 1 / -1; }
.onb-f input, .onb-f select, .onb-f textarea { width: 100%; box-sizing: border-box; padding: 8px;
  border: 1px solid var(--border); border-radius: 7px; font-family: inherit; font-size: 13.5px; color: var(--text-primary); }
.onb-sec { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 16px 0 8px; }
.onb-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px 14px; }
@media (max-width: 640px) { .onb-grid, .onb-checks { grid-template-columns: 1fr 1fr; } }
.onb-chk { font-size: 13px; display: flex; align-items: center; gap: 7px; cursor: pointer; }
.onb-chk input[type="checkbox"] { flex: 0 0 auto; display: inline-block; width: auto; margin: 0; }
.onb-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.onb-intake { margin: 0 0 12px; }
.onb-intake #onb-intake-body { background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px 12px; margin-top: 8px; }

/* clickable report line items (drill into the contributing loads) */
.tbl tr.drill-row { cursor: pointer; }
.tbl tr.drill-row:hover { background: var(--surface-sunken); }
#report-drill .tbl tbody tr:hover { background: var(--surface-sunken); }

/* "reading…" loader: the brand truck driving down a road (used inside the read overlay) */
.truck-loader { display: flex; align-items: center; justify-content: center; }
.truck-loader .road {
  position: relative; width: 300px; height: 34px; border-radius: 9px;
  background: var(--surface-chrome); overflow: hidden; box-shadow: inset 0 -2px 0 rgba(0,0,0,.3);
}
.truck-loader .road::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, #f3c218 0 14px, transparent 14px 30px);
  animation: road-scroll .45s linear infinite;
}
.truck-loader .fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, rgba(196,22,28,.35), rgba(196,22,28,0));
  animation: truck-fill 2s ease-in-out infinite;
}
.truck-loader .truck {
  position: absolute; top: 50%; left: 0; width: 50px; height: auto;
  transform: translateY(-50%);
  animation: truck-drive 2s ease-in-out infinite;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,.4));
}
@keyframes road-scroll { to { background-position: -30px 0; } }
@keyframes truck-drive { 0% { left: -16%; } 100% { left: 82%; } }
@keyframes truck-fill { 0% { width: 0; } 100% { width: 100%; } }

/* full-screen overlay shown while the AI reads — greys the screen + blocks clicks */
.read-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(26,24,22,.5);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
}
.read-card {
  background: var(--surface-card); border-radius: 16px; padding: 28px 34px;
  box-shadow: 0 20px 55px rgba(0,0,0,.4);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  animation: read-pop .18s ease-out;
}
.read-title { font-weight: 700; font-size: 16px; color: var(--text-primary); }
.read-sub { font-size: 12.5px; color: var(--text-muted); margin-top: -8px; }
@keyframes read-pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .truck-loader .road::after, .truck-loader .fill, .truck-loader .truck, .read-card { animation: none; }
}
#intake-text { min-height: 90px; resize: vertical; font: inherit; }
#intake-read { align-self: flex-start; }
.intake-card {
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-card);
  padding: 14px 16px; margin-bottom: 12px;
}
.intake-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.conf {
  flex: 0 0 auto; padding: 2px 9px; border-radius: 999px; color: #fff;
  font-size: 12px; font-weight: 600;
}
.conf.notorder { background: var(--status-danger-soft); color: var(--status-danger); border: 1px solid var(--status-danger-border); }
.modeltag {
  flex: 0 0 auto; font-size: 10.5px; color: var(--text-muted); font-weight: 600;
  text-transform: capitalize; letter-spacing: .2px;
}
main .icard.notorder-card { background: var(--status-danger-soft); border-color: var(--status-danger-border); }
.dup-hint {
  font-size: 12.5px; color: var(--status-warning); background: var(--status-warning-soft);
  border: 1px solid var(--status-warning-border); border-radius: 8px; padding: 7px 10px; margin-bottom: 10px;
}
.intake-note {
  font-size: 12.5px; color: var(--status-warning); background: var(--status-warning-soft);
  border-radius: 8px; padding: 7px 10px; margin-bottom: 10px;
}
.intake-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px 12px; margin-bottom: 10px;
}
.intake-field { display: flex; flex-direction: column; gap: 2px; }
.intake-field span { font-size: 11px; color: var(--text-muted); }
.intake-field input { padding: 5px 8px; font-size: 13px; }
.intake-charges { font-size: 12.5px; margin-bottom: 10px; }
.intake-actions { display: flex; gap: 8px; }

/* ---------- change password modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center; z-index: 60;
}
.modal {
  background: var(--surface-card); border-radius: 14px; padding: 22px 24px;
  width: 340px; max-width: 90vw; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  /* never let a tall modal run off the top/bottom of the screen — scroll inside instead
     (this is why the booking "multiple containers" details used to get cut off) */
  max-height: calc(100vh - 32px); overflow-y: auto;
}
/* the big tabbed modals (customer / location profiles, onboarding) anchor near the top instead
   of vertically centering, so switching tabs doesn't shift the tab bar up/down on screen */
.modal.wide, .modal.onb-modal { align-self: flex-start; margin-top: 4vh; }
.modal h2 { margin: 0 0 14px; font-size: 18px; }
.modal label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 9px; }
.modal label input, .modal label select { display: block; width: 100%; margin-top: 3px; }
/* checkboxes/radios must stay their natural size — the width:100% above is for text inputs only */
.modal label input[type="checkbox"], .modal label input[type="radio"] { display: inline-block; width: auto; margin-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ---------- command center dashboard ---------- */
.dash-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 14px; }
#dash-greeting { margin: 0; font-size: 20px; }
/* denser, risk-accented tiles to match the board redesign (v85) */
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.dash-card { background: var(--surface-card); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 10px; padding: 11px 14px; transition: box-shadow .12s, border-color .12s; }
.dash-card-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 5px; }
.dash-card-big { font-size: 25px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.dash-card-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }
.dash-card.risk.hot { border-color: var(--status-danger-border); border-left-color: var(--status-danger); background: var(--status-danger-soft); }
.dash-card.risk.hot .dash-card-big { color: var(--status-danger); }
.dash-card[style*="pointer"]:hover { border-color: var(--border-strong); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.trend { font-size: 14px; font-weight: 500; }
.trend.up { color: var(--status-success); } .trend.down { color: var(--status-danger); }
.dash-h3 { font-size: 12px; margin: 20px 0 9px; display: flex; align-items: center; gap: 6px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; font-weight: 800; }
.dash-h3 .ti { color: var(--text-muted); font-size: 15px; }
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-card); font-size: 14px; }
.alert .ti { font-size: 19px; flex: 0 0 auto; }
.alert span:nth-child(2) { flex: 1; }
.alert[data-jump] { cursor: pointer; }
.alert[data-jump]:hover { background: var(--surface-sunken); }
.alert-go { font-size: 12.5px; color: var(--status-info); white-space: nowrap; }
.alert-danger { border-color: var(--status-danger-border); background: var(--status-danger-soft); } .alert-danger .ti { color: var(--status-danger); }
.alert-warn { border-color: var(--status-warning-border); background: var(--status-warning-soft); } .alert-warn .ti { color: var(--status-warning); }
.alert-info { border-color: var(--status-info-border); background: var(--status-info-soft); } .alert-info .ti { color: var(--status-info); }
.alert-ok { border-color: var(--status-success-border); background: var(--status-success-soft); } .alert-ok .ti { color: var(--status-success); }
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.barlist { display: flex; flex-direction: column; gap: 7px; }
.barrow { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.barlabel { width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-secondary); }
.bartrack { flex: 1; height: 16px; background: var(--surface-sunken); border-radius: 6px; overflow: hidden; }
.barfill { display: block; height: 100%; background: var(--status-info); border-radius: 6px; }
.barval { width: 28px; text-align: right; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.dash-h4 { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.dash-h4 .ti { color: var(--text-muted); }
/* compact list under a dashboard card (loads needing a driver, appointments, paperwork) */
.dash-sub-block { margin: 2px 0 8px; }
.dash-minilist { display: flex; flex-direction: column; background: var(--surface-card); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; }
.dash-minirow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 13px;
  border-top: 1px solid var(--border); cursor: pointer; }
.dash-minirow:first-child { border-top: none; }
.dash-minirow:hover { background: var(--surface-sunken); }
.dash-minirow .mono { font-weight: 500; min-width: 96px; }
.dash-mini-cust { flex: 1; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* expiring driver files (clerk dashboard) */
.comp-list { display: flex; flex-direction: column; background: var(--surface-card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; }
.comp-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-size: 14px;
  border-top: 1px solid var(--border); cursor: pointer; }
.comp-row:first-child { border-top: none; }
.comp-row:hover { background: var(--surface-sunken); }
.comp-driver { font-weight: 500; min-width: 150px; }
.comp-cred { flex: 1; color: var(--text-secondary); }
.comp-date { color: var(--text-muted); font-size: 13px; }
/* customize-dashboard panel */
.dash-cust-list { display: flex; flex-direction: column; gap: 2px; }
.dash-cust-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  font-size: 14px; cursor: pointer; }
.dash-cust-row:hover { background: var(--surface-sunken); }
.dash-cust-row input { width: 16px; height: 16px; }
/* ---------- tablet / phone: collapse nav into a hamburger ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .topbar { min-height: 50px; }
  .topbar-left { padding: 0 12px; }
  .brand { padding: 4px 9px; }
  .brand-logo { height: 26px; }
  .macro { display: none; }
  .rail-clock { display: none; }
  /* left nav slides in as an off-canvas drawer, opened by the hamburger */
  .shell { grid-template-columns: 1fr; }
  #main-nav {
    position: fixed; top: 0; left: 0; bottom: 0; width: 244px; height: 100vh;
    transform: translateX(-100%); transition: transform .18s ease;
    box-shadow: 8px 0 30px rgba(0,0,0,.32); z-index: 40;
  }
  #main-nav.open { transform: translateX(0); }
  /* profile collapses to just the avatar in the corner */
  .user-btn { padding: 3px; gap: 0; }
  .user-btn #who, .user-caret { display: none; }
  .user-menu { width: min(290px, calc(100vw - 24px)); }
}

@media (max-width: 760px) {
  .dash-grid, .dash-cols { grid-template-columns: 1fr; }
  main { padding: 12px 10px 50px; }
  .dash-cols { gap: 16px; }
  /* denser board so more rows + columns fit on a phone */
  .board-table th, .board-table td { padding: 4px 7px; }
  #load-table td { font-size: 12px; }
  #load-table th { font-size: 11px; }
  .board-table td.dt, .board-table td.dvr { font-size: 11px; }
  .board-table .fz1 { width: 88px; min-width: 88px; }
  .board-table .fz2 { left: 88px; width: 96px; min-width: 96px; }
  .board-table .fz3 { left: 184px; width: 96px; min-width: 96px; }
  /* tighter metric cards (2-up) */
  .metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric { padding: 9px 11px; }
  .metric .value { font-size: 18px; }
  .metric .label { font-size: 11px; }
  /* tighter lifecycle tabs */
  .life-tabs { gap: 3px; padding-bottom: 6px; margin-bottom: 10px; }
  .life-tabs button { padding: 6px 10px; font-size: 13px; }
}

/* ---------- reports / financial waterfall ---------- */
.rep-waterfall { background:var(--surface-card); border:1px solid var(--border); border-radius:12px; padding:16px 18px; margin-bottom:16px; max-width:560px; }
.rep-wf-title { font-size:13px; color:var(--text-muted); margin-bottom:10px; }
.rep-wf-row { display:flex; justify-content:space-between; align-items:center; padding:7px 0; font-size:15px; }
.rep-wf-row.neg { color:var(--status-danger); }
.rep-wf-row.sub { border-top:1px solid var(--border); font-weight:600; }
.rep-wf-row.tot { border-top:2px solid #1f3864; font-weight:600; font-size:18px; color:var(--status-success); margin-top:2px; }
.rep-num { font-variant-numeric:tabular-nums; font-weight:600; }
.rep-wf-note { font-size:12px; margin-top:10px; }

/* ============================================================================
   GLOBAL RE-SKIN to the command-center mockup (v90)
   Visual only, scoped to `main` so the login screen + dark rail + dark nav are
   untouched. Brings every page's existing components into the mockup's design
   language: tighter type, flat 10px cards, compact uppercase table headers,
   small buttons/inputs, mockup section headers.
   ============================================================================ */
main { font-size: 13px; color: var(--text-primary); }

/* buttons → small, flat, 7px radius */
main button, main .button { font-size: 12px; padding: 6px 12px; border-radius: 7px; }
main button.tiny, main .button.tiny, main .tiny { padding: 3px 9px; font-size: 11.5px; }

/* inputs */
main input, main select, main textarea { font-size: 13px; padding: 6px 9px; border-radius: 7px; }

/* segmented controls */
main .seg { border-radius: 7px; }
main .seg-btn { font-size: 12px; padding: 5px 12px; }

/* page headers */
main .board-bar { margin-bottom: 14px; gap: 9px; }
main .board-bar h2 { font-size: 17px; }

/* tables → compact uppercase headers like the mockup (board/reports keep their own,
   higher-specificity rules; this lifts the plain tables: payroll, etc.) */
main table th { background: var(--surface-sunken); color: var(--text-secondary); font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 7px 10px; }
main table td { padding: 6px 10px; }
main #load-table td { font-size: 13px; }

/* every panel/card → flat 10px radius, mockup border */
main .card, .dash-card, .metric, .payroll-driver, .plan-driver, .offer-card, .conn-card,
.intake-card, .intake-upload, .suggest-card, .db-load, .db-driver, .week-day, .pay-box,
.bill-section, .pay-section, .fin-summary, .rep-waterfall, .ph-panel, .plan-unplaced,
.minilist, .dash-minilist, .comp-list, #load-table {
  border-radius: 10px; border-color: var(--border);
}

/* dashboard section headers → uppercase, tight (matches the board's .nb section feel) */
main .dash-h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800;
  color: var(--text-secondary); margin: 18px 0 9px; }
main .dash-h3 .ti { font-size: 15px; color: var(--text-muted); }
main .dash-h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }

/* dashboard list rows + alerts → mockup minilist density */
main .dash-minirow, main .comp-row { padding: 7px 11px; font-size: 12px; }
main .alert { border-radius: 8px; padding: 9px 12px; font-size: 12.5px; }
main .alert .ti { font-size: 17px; }

/* offers / plan / payroll cards → tighter heads */
main .offer-driver { font-size: 14px; }
main .plan-driver-name, main .payroll-driver .head { font-size: 13px; }

/* ===== command-center dashboard components (mockup) ===== */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; margin-bottom: 16px; }
.tile { background: var(--surface-card); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 10px; padding: 9px 12px; cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.tile .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.tile .v { font-size: 21px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .d { font-size: 11px; color: var(--text-muted); }
.tile.fire { border-left-color: var(--status-danger); } .tile.fire .v { color: var(--status-danger); }
.tile.warn { border-left-color: var(--status-warning); } .tile.warn .v { color: var(--status-warning); }
.tile.ok { border-left-color: var(--status-success); } .tile.cool { border-left-color: var(--status-info); }
.tile:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
/* money-at-risk alarm — make the tile YELL when dollars are exposed */
.tile.tile-alarm { border: 1px solid var(--status-danger-border); border-left: 3px solid var(--status-danger); background: var(--status-danger-soft); }
.tile.tile-alarm .k, .tile.tile-alarm .v { color: var(--status-danger); }
.alarm-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--status-danger); vertical-align: middle; margin-right: 3px; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes marAlarm { 0%, 100% { box-shadow: 0 0 0 0 rgba(196,22,28,0); } 50% { box-shadow: 0 0 0 5px rgba(196,22,28,.30); } }
  .tile.tile-alarm { animation: marAlarm 1.25s ease-in-out infinite; }
  .alarm-dot { animation: bdpulse 1s infinite; }
}
.cols2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.sect-h { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); margin: 16px 0 8px; }
.sect-h:first-child { margin-top: 0; }
.sect-h .i { font-size: 15px; color: var(--text-muted); }
.sect-h .ct { margin-left: auto; background: var(--surface-chrome); color: var(--text-on-chrome); border-radius: var(--radius-pill); font-size: 10px; font-weight: 700; padding: 0 7px; line-height: 17px; }
.sect-h.fire .ct { background: var(--status-danger); }
.now { display: flex; flex-direction: column; gap: 5px; }
.nrow { display: grid; grid-template-columns: 5px 1fr auto; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-card); cursor: pointer; }
.nrow:hover { border-color: var(--border-strong); box-shadow: 0 1px 5px rgba(0,0,0,.06); }
.nrow.fire .nr-rail { background: var(--status-danger); } .nrow.warn .nr-rail { background: var(--status-warning); } .nrow.cool .nr-rail { background: var(--status-info); }
.nr-body { padding: 7px 9px; min-width: 0; }
.nr-top { display: flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; }
.nr-top .ti { color: var(--text-muted); }
.nr-top .mono { font-weight: 700; }
.nr-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-act { display: flex; align-items: center; padding: 0 11px; font-size: 11px; font-weight: 700; color: var(--status-info); border-left: 1px solid var(--border); white-space: nowrap; }
.nrow.fire .nr-act { color: var(--status-danger); }
.minilist { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-card); }
.mini { display: flex; align-items: center; gap: 10px; padding: 7px 11px; border-top: 1px solid var(--border); font-size: 12px; cursor: pointer; }
.mini:first-child { border-top: none; }
.mini:hover { background: var(--surface-sunken); }
.mini .mono { font-weight: 600; min-width: 104px; }
.mini .grow { flex: 1; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .cols2 { grid-template-columns: 1fr; } }
main .admin-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { main .admin-cols { grid-template-columns: 1fr; } }
main .conn-card { max-width: none; }
/* Admin → Rates editor */
main .rate-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
main .rate-f { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); margin-bottom: 9px; flex-wrap: wrap; }
main .rate-f input { width: 80px; padding: 4px 7px; }
main .rate-line { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: var(--surface-sunken); }
main .rate-line-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 12.5px; }
main .rate-tier { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
main .rate-tier input { padding: 4px 7px; }
/* contractual override rows */
main .ov-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: var(--surface-sunken); }
main .ov-row input, main .ov-row select { padding: 4px 7px; font-size: 12px; }
main .ov-row .ov-cust { width: 170px; }
main .ov-row .ov-lane { width: 130px; }
main .ov-row .ov-detfree, main .ov-row .ov-detrate, main .ov-row .ov-chassis { width: 70px; }
main .ov-row .ov-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
main .ov-row .ov-del { margin-left: auto; }
@media (max-width: 900px) { main .rate-grid { grid-template-columns: 1fr; } }

/* ===== mockup component library — used by the rebuilt page views (scoped to main) ===== */
main .pg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
main .pg-head h2 { font-size: 17px; margin: 0; }
main .pg-head .sub { color: var(--text-muted); font-size: 12px; }
main .pushr { margin-left: auto; }
main .btn { border: 1px solid var(--border); background: var(--surface-card); border-radius: 7px; padding: 5px 11px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
main .btn:hover { background: var(--surface-sunken); }
main .btn.primary { background: var(--bj-red); border-color: var(--bj-red); color: #fff; font-weight: 600; }
main .btn.primary:hover { background: var(--bj-red-dark); }
main .btn.ghost { border-color: transparent; background: transparent; }
main .search { position: relative; display: flex; align-items: center; flex: 1; min-width: 180px; }
main .search > i { position: absolute; left: 9px; color: var(--text-muted); font-size: 15px; }
main .search input { width: 100%; padding: 6px 10px 6px 30px; border: 1px solid var(--border); border-radius: 7px; font: inherit; background: var(--surface-card); }
main .tbl { width: 100%; border-collapse: collapse; background: var(--surface-card); }
main .tbl thead th { position: sticky; top: 0; background: var(--surface-sunken); color: var(--text-secondary); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--border); white-space: nowrap; }
main .tbl tbody td { padding: 6px 9px; border-bottom: 1px solid var(--border); white-space: nowrap; }
main .tbl tbody tr { cursor: pointer; } main .tbl tbody tr:hover td { background: var(--status-info-soft); }
main .tbl th.r, main .tbl td.r { text-align: right; } main .tbl th.c, main .tbl td.c { text-align: center; }
main .tblwrap { border: 1px solid var(--border); border-radius: 10px; overflow: auto; }
main .grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; align-items: start; }
main .dcard { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-card); overflow: hidden; }
main .dcard-h { display: flex; align-items: center; gap: 8px; padding: 8px 11px; background: var(--surface-sunken); border-bottom: 1px solid var(--border); }
main .dcard-h .nm { font-weight: 700; font-size: 13px; } main .dcard-b { padding: 4px 0; }
main .pitem { display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-top: 1px solid var(--border); font-size: 12px; }
main .pitem:first-child { border-top: none; }
main .pscore { width: 24px; height: 24px; border-radius: 6px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: none; }
main .s-hi { background: var(--status-success); } main .s-mid { background: var(--status-warning); } main .s-lo { background: var(--status-neutral); }
main .chiprow { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
main .rchip { font-size: 10.5px; color: var(--text-secondary); background: var(--surface-sunken); padding: 1px 7px; border-radius: 999px; }
main .offer { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-card); margin-bottom: 10px; }
main .offer .grow { flex: 1; min-width: 0; } main .offer .od { font-weight: 700; font-size: 14px; } main .offer .os { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
main .wf { background: var(--surface-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; max-width: 520px; }
main .wf-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; } main .wf-row.neg { color: var(--status-danger); }
main .wf-row.sub { border-top: 1px solid var(--border); font-weight: 600; } main .wf-row.tot { border-top: 2px solid #1f3864; font-weight: 700; font-size: 16px; color: var(--status-success); }
main .wf-num { font-variant-numeric: tabular-nums; font-weight: 600; }
main .icard { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-card); padding: 12px 14px; margin-bottom: 12px; }
main .icard-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } main .conf { padding: 1px 9px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 700; }
main .igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; margin-bottom: 10px; }
main .ifield { display: flex; flex-direction: column; gap: 2px; } main .ifield span { font-size: 10.5px; color: var(--text-muted); } main .ifield b { font-size: 13px; }
main .ifield input { width: 100%; padding: 4px 5px; font-size: 13px; font-weight: 600; border: 1px solid transparent; border-radius: 6px; background: transparent; }
main .ifield input:hover { border-color: var(--border); }
main .ifield input:focus { border-color: var(--bj-red); background: var(--surface-card); outline: none; }
/* Plan day-cards → match the mockup's .dcard / .pitem / .pscore proportions */
main .plan-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
main .plan-driver-head { background: var(--surface-sunken); padding: 8px 11px; }
main .plan-driver-name { font-size: 13px; font-weight: 700; }
main .plan-item { padding: 8px 11px; }
main .plan-score { width: 24px; height: 24px; border-radius: 6px; font-size: 11px; }
main .mini-reason { background: var(--surface-sunken); color: var(--text-secondary); }
main .drop { border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-card); padding: 18px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
main .fleet { display: flex; flex-direction: column; gap: 4px; }
main .frow { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-card); }
main .frow .fnm { font-size: 12px; font-weight: 600; min-width: 78px; } main .frow .fbar { flex: 1; height: 7px; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; } main .frow .fbar i { display: block; height: 100%; }
main .frow .fhrs { font-size: 11px; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; color: var(--text-secondary); }
main .fst { font-size: 9px; font-weight: 800; text-transform: uppercase; padding: 1px 5px; border-radius: 5px; } main .fst.roll { background: var(--status-success-soft); color: var(--status-success); } main .fst.yard { background: var(--surface-sunken); color: var(--text-secondary); } main .fst.off { background: var(--surface-sunken); color: var(--text-muted); }
main .hos { width: 36px; height: 5px; border-radius: 3px; background: var(--surface-sunken); overflow: hidden; display: inline-block; vertical-align: middle; } main .hos i { display: block; height: 100%; }
main .live { font-size: 8.5px; font-weight: 800; color: var(--status-success); background: var(--status-success-soft); padding: 0 3px; border-radius: 4px; text-transform: uppercase; }

/* signed-rate-sheet accessorial suggestions in the Customer Billing section */
.sheet-acc-suggest { margin: 8px 0 2px; }
.sheet-acc-suggest:empty { margin: 0; }
.acc-suggest-head { font-size: 11px; margin-bottom: 5px; }
.acc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 14px; border: 1px solid var(--status-success-border); background: var(--status-success-soft); color: var(--status-success); cursor: pointer; line-height: 1.3; }
.acc-chip.add:hover { background: var(--status-success); color: #fff; border-color: var(--status-success); }
.acc-chip.add:disabled { opacity: .55; cursor: default; }
.acc-chip.on { background: var(--surface-sunken); color: var(--text-secondary); border-color: var(--border); cursor: default; }

/* e-signature audit record in the rate sheet editor */
.esign-record { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--status-success-border); border-radius: 8px; background: var(--status-success-soft); font-size: 12px; line-height: 1.5; color: var(--text-primary); }
.esign-record-h { font-weight: 700; color: var(--status-success); margin-bottom: 4px; }
.esign-record .muted { font-size: 11px; }

/* expandable customer profile: sub-accounts + nested rate sheets */
.cust-exp { border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--text-secondary); padding: 0 4px; }
.cust-detail-row > td { background: var(--surface-sunken); padding: 0; }
.cust-detail { padding: 12px 16px; }
.cust-sect { margin-bottom: 14px; }
/* tabbed customer profile (Details / Load history / Rate sheets / Locations / Onboarding) */
.cust-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.cust-tabs .ctab { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 12px; font-size: 13px; color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.cust-tabs .ctab:hover { color: var(--text-primary); }
.cust-tabs .ctab.active { color: var(--text-primary); border-bottom-color: var(--brand-primary); font-weight: 600; }
.ctab-panel.hidden { display: none; }
.cust-sect-h { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.cust-sub { border: 1px solid var(--border); border-radius: 8px; background: var(--surface-card); padding: 8px 10px; margin-bottom: 6px; }
.cust-sub-h { display: flex; align-items: center; gap: 8px; }
.cust-sub-rs { margin-top: 8px; }
.rs-card { border: 1px solid var(--border); border-radius: 8px; background: var(--surface-card); padding: 8px 10px; margin-bottom: 8px; }
.rs-card-h { display: flex; align-items: center; gap: 8px; }
table.tbl.mini { font-size: 11.5px; margin: 4px 0 0; }
table.tbl.mini th, table.tbl.mini td { padding: 3px 7px; }

/* customer onboarding / credit+safety approval card */
.cust-onboard { border: 1px solid var(--border); border-radius: 8px; background: var(--surface-card); padding: 10px 12px; }
.onboard-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; font-size: 12px; }
.onboard-grid input { width: 100%; padding: 5px 8px; border: 1px solid var(--border-strong); border-radius: 5px; font-size: 13px; }
.onboard-approve { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.onboard-approve input[type=checkbox] { width: 17px; height: 17px; }

/* ---------- Settlements (weekly settlement reconciliation) ---------- */
.settle-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-card); padding: 14px 16px; margin: 12px 0; }
.settle-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.settle-head h3 { margin: 0; font-size: 15px; }
.settle-chip { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; }
.settle-chip.catching_up { background: var(--status-warning-soft); color: var(--status-warning); border-color: var(--status-warning-border); }
.settle-chip.reconciled  { background: var(--status-success-soft); color: var(--status-success); border-color: var(--status-success-border); }
.settle-chip.review      { background: var(--status-danger-soft);  color: var(--status-danger);  border-color: var(--status-danger-border); }
.settle-chip.partial     { background: var(--status-info-soft);    color: var(--status-info);     border-color: var(--status-info-border); }
.settle-chip.src         { background: transparent; color: var(--text-muted); border-color: var(--border); font-weight: 600; }
.settle-prio { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 12px; }
.settle-metric { border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
.settle-metric .k { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.settle-metric .row { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.settle-metric .big { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.settle-bar { height: 7px; border-radius: 4px; background: var(--border); overflow: hidden; min-width: 80px; flex: 1; }
.settle-bar > i { display: block; height: 100%; background: var(--status-success); }
.settle-bar.low > i { background: var(--status-warning); }
.settle-gap { font-size: 12px; font-weight: 600; white-space: nowrap; }
.settle-gap.short  { color: var(--status-warning); }
.settle-gap.review { color: var(--status-danger); }
.settle-gap.ok     { color: var(--status-success); }
.settle-detail { width: 100%; }
.settle-detail td, .settle-detail th { padding: 3px 8px; }
.settle-detail .num { text-align: right; font-variant-numeric: tabular-nums; }
