/* Hotshot Load Check: mobile-first. Base styles are for phones; wider screens get more room. */
:root {
  --bg: #f4f5f7; --card: #ffffff; --text: #16181d; --muted: #5d6470; --line: #dcdfe5; --input: #ffffff;
  --accent: #1f5fbf; --accent-text: #ffffff; --press: rgba(0, 0, 0, .05);
  --green: #1d7a3e; --green-bg: #e3f4e8; --yellow: #8a6100; --yellow-bg: #fdf3d6; --red: #b3261e; --red-bg: #fbe4e2;
  --orange: #b4530a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 2px 8px rgba(0, 0, 0, .04);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317; --card: #1b1e24; --text: #eceef2; --muted: #9aa1ad; --line: #2d323b; --input: #14171c;
    --accent: #5b93f5; --accent-text: #0b1220; --press: rgba(255, 255, 255, .06);
    --green: #6fd394; --green-bg: #15301f; --yellow: #f0c75e; --yellow-bg: #332a12; --red: #ff8a80; --red-bg: #3a1b19;
    --orange: #ffb36b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  padding-bottom: calc(96px + var(--safe-b));
}
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 4px;
  min-height: 56px; padding: env(safe-area-inset-top, 0px) 8px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
/* Up to two lines, so a load's title (route, days and miles, HOT-44) fits on a phone */
.topbar h1 {
  flex: 1; min-width: 0; margin: 0 8px; font-size: 1.2rem; font-weight: 700; line-height: 1.25; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: break-word;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 22px;
  background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:active { background: var(--press); }

main { max-width: 720px; margin: 0 auto; padding: 12px 16px 0; outline: none; }

/* ---------- floating "Check a load" ---------- */
.fab {
  position: fixed; z-index: 20; right: 16px; bottom: calc(16px + var(--safe-b));
  display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 22px 0 18px;
  border-radius: 28px; background: var(--accent); color: var(--accent-text); text-decoration: none;
  font-weight: 650; font-size: 1.02rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
}
.fab:active { transform: scale(.97); }
@media (min-width: 760px) { .fab { right: calc(50vw - 360px + 16px); } }

/* ---------- cards & common ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-size: 1.1rem; margin-bottom: 6px; }
.err { background: var(--red-bg); color: var(--red); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.spinner { width: 28px; height: 28px; margin: 40px auto; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } .fab:active { transform: none; } }

/* ---------- loads list ---------- */
.tip {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 4px 0 8px;
  border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); color: var(--text); text-decoration: none;
  font-size: .92rem; line-height: 1.4;
}
.tip svg { flex: none; color: var(--accent); margin-top: 1px; }
.tip strong { display: block; }
.tip u { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; overflow-wrap: anywhere; }
.tip:active { background: color-mix(in srgb, var(--accent) 16%, var(--card)); }
.list { list-style: none; margin: 0; padding: 0; }
.day { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 4px 8px; font-weight: 650; }
.day:first-child { margin-top: 4px; }
.load {
  display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 0 10px; align-items: stretch;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px;
  color: inherit; text-decoration: none; overflow: hidden; box-shadow: var(--shadow); min-height: 76px;
}
.load:active { background: color-mix(in srgb, var(--card) 92%, var(--text)); }
.load .bar { background: var(--muted); }
.load.green .bar { background: var(--green); } .load.yellow .bar { background: var(--yellow); } .load.red .bar { background: var(--red); }
.load .main { padding: 12px 0; min-width: 0; }
/* HOT-49: the route runs across the whole card; details and the money ladder sit side by side under it */
.load { grid-template-rows: auto 1fr; }
.load .bar { grid-row: 1 / span 2; }
.load .head { grid-column: 2 / 4; padding: 12px 14px 0 0; min-width: 0; }
.load .head + .main, .load .head ~ .side { padding-top: 4px; }
/* HOT-27: the driver's load number, the anchor that ties a trip to its expenses */
.load-no { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 6px; background: var(--text); color: var(--card);
  font-weight: 750; font-size: .85em; line-height: 1.5; letter-spacing: .02em; font-variant-numeric: tabular-nums; vertical-align: 1px; }
.exp-trip { display: block; margin-top: 2px; }
.load .route { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.load .meta { font-size: .85rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* HOT-37: whose load it is, on other drivers' loads in an admin's list */
.driver-tag { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: .82rem; font-weight: 650; color: var(--accent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.driver-tag svg { flex: none; width: 15px; height: 15px; }
.driver-tag span { overflow: hidden; text-overflow: ellipsis; }
.tip.view-only:active { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
/* HOT-29: the pickup → delivery range, in its own tinted band so it stands out and overlaps are easy to spot */
.load .dates { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 6px 0 4px; padding: 5px 9px;
  border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, var(--card)); color: var(--text);
  font-size: .9rem; font-variant-numeric: tabular-nums; width: fit-content; max-width: 100%; }
.load .dates svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.load .dates .range { min-width: 0; }
.load .dates strong { font-weight: 700; }
.load .dates em { font-style: normal; color: var(--muted); }
.load .dates .arrow { color: var(--accent); font-weight: 700; }
.load .dates .days { font-size: .78rem; font-weight: 650; color: var(--muted); white-space: nowrap; }
.load .dates.none { background: var(--bg); }
.load .side { padding: 12px 14px 12px 0; text-align: right; display: flex; flex-direction: column; justify-content: flex-start; gap: 1px; }
/* HOT-49/53: money ladder: load pays, −fees/fuel/tolls, trip profit, −truck costs, −road costs, take-home */
.ladder > span { display: block; white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.25; }
.ladder small { font-size: .66rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin-right: 6px; }
.ladder b { font-weight: 750; }
.ladder .top b { font-size: 1.1rem; color: var(--text); }
.ladder .off { font-size: .78rem; color: var(--muted); font-weight: 400; opacity: .85; }
.ladder .off small { font-weight: 500; letter-spacing: 0; }
.ladder .gross b { font-size: 1rem; }
.ladder .gross.pos b { color: var(--green); } .ladder .gross.neg b { color: var(--red); }
.load .ladder .net { font-size: 1.2rem; margin-top: 1px; }
.load .ladder .net small { display: inline; margin-top: 0; text-transform: none; letter-spacing: .02em; font-size: .66rem; }
/* Estimated profit is the headline number; the offer and deductions sit under it */
.load .net { font-size: 1.25rem; font-weight: 750; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.load .net small { display: block; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 1px; }
.load .offer { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.green .net, .tag.green { color: var(--green); } .yellow .net, .tag.yellow { color: var(--yellow); } .red .net, .tag.red { color: var(--red); }
.src { display: inline-flex; align-items: center; gap: 3px; }
.src svg { width: 14px; height: 14px; }
.more { display: block; width: 100%; margin: 8px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }

/* ---------- forms ---------- */
label { display: block; font-size: .85rem; color: var(--muted); margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zooming on focus */
  color: var(--text); background: var(--input); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  min-height: 48px;
}
textarea { min-height: 72px; resize: vertical; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg); padding: 4px; border-radius: 12px; }
.seg button { border: 0; background: transparent; color: var(--muted); min-height: 44px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.primary {
  display: block; width: 100%; margin-top: 16px; min-height: 54px; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 650; font-size: 1.05rem; cursor: pointer;
}
.primary:disabled { opacity: .6; }
.secondary { display: block; width: 100%; margin-top: 10px; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
details > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 1.3rem; }
details[open] > summary::after { content: "−"; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* ---------- result / detail ---------- */
/* Beta, routing comparison: a banner over each engine's result, and the side-by-side table */
.engine-head { margin: 22px 0 12px; padding: 12px 16px; border-radius: 14px; color: #fff; }
.engine-head.a { background: #1f5fbf; }
.engine-head.b { background: #6b3fa0; }
.engine-head .name { font-size: 1.35rem; font-weight: 750; line-height: 1.2; }
.engine-head .small { opacity: .9; }
.engine-end { border-top: 3px dashed var(--line); margin: 22px 0 16px; }
.table-wrap { overflow-x: auto; }
.cmp th, .cmp td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .9rem; }
.cmp thead th { font-size: .8rem; }
.cmp thead th.a { color: #1f5fbf; }
.cmp thead th.b { color: #6b3fa0; }
.cmp tbody th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.cmp .a, .cmp .b { padding-left: 8px; }
.cmp .a { background: #eaf1fc; }
.cmp .b { background: #f2ecf9; }
@media (prefers-color-scheme: dark) {
  .cmp thead th.a { color: #7fa9f0; }
  .cmp thead th.b { color: #b493e0; }
  .cmp .a { background: #18243a; }
  .cmp .b { background: #261d35; }
}
.rr td { font-size: .85rem; white-space: nowrap; }
.rr td:nth-child(2) { white-space: normal; min-width: 160px; }
.rr .rr-b { color: #6b3fa0; }
.rr tr.rr-flag td { background: var(--yellow-bg); }
.rr .neg { color: var(--red); }
@media (prefers-color-scheme: dark) { .rr .rr-b { color: #b493e0; } }
.verdict { border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.verdict.green { background: var(--green-bg); color: var(--green); }
.verdict.yellow { background: var(--yellow-bg); color: var(--yellow); }
.verdict.red { background: var(--red-bg); color: var(--red); }
.verdict .label { font-size: .75rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.verdict .big { font-size: 1.6rem; font-weight: 750; line-height: 1.2; }
.verdict .counter { margin-top: 4px; font-size: 1.05rem; }
.verdict ul { margin: 10px 0 0; padding-left: 20px; color: var(--text); }
.verdict li { margin: 2px 0; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.stat .k { font-size: .76rem; color: var(--muted); }
.stat .v { font-size: 1.15rem; font-weight: 680; font-variant-numeric: tabular-nums; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td:last-child { text-align: right; padding-left: 12px; }
tr:last-child td { border-bottom: 0; }
tr.total td { font-weight: 700; }
/* The numbers on a load: offer, deductions (red), estimated expenses (orange), est. profit or loss */
.numbers td:last-child { font-weight: 600; white-space: nowrap; }
.numbers tr.offer td { font-weight: 700; color: var(--text); }
.numbers tr.ded td:last-child { color: var(--red); }
.numbers tr.exp td:last-child { color: var(--orange); }
/* The estimated expenses read as one group under gross profit: no lines between them */
.numbers tr.exp td { border-bottom: 0; padding: 5px 0; }
.numbers tr.gross + tr.exp td { padding-top: 9px; }
/* HOT-38: fuel sits above gross profit (after deductions and fuel), which is green or red like the net line */
.numbers tr.ded + tr.exp.fuel td, .numbers tr.offer + tr.exp.fuel td { padding-top: 9px; }
.numbers tr.gross td { font-weight: 700; color: var(--text); border-top: 2px solid var(--line); }
.numbers tr.gross.pos td:last-child { color: var(--green); }
.numbers tr.gross.neg td:last-child { color: var(--red); }
.numbers tr.result td { font-weight: 750; font-size: 1.15rem; border-top: 2px solid var(--line); padding-top: 10px; }
.numbers tr.result.pos td { color: var(--green); }
.numbers tr.result.neg td { color: var(--red); }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
dt { color: var(--muted); font-size: .9rem; }
dd { margin: 0; overflow-wrap: anywhere; }
.tbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin: 2px 0 8px; background: var(--bg); }
.tbar span.easy { background: var(--green); } .tbar span.medium { background: var(--yellow); } .tbar span.difficult { background: var(--red); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.map { position: relative; aspect-ratio: 2 / 1; overflow: hidden; border-radius: 8px; background: #e8e6e1; margin: 2px 0 6px; }
.map img { position: absolute; max-width: none; user-select: none; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map polyline { fill: none; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.map polyline.ld { stroke: #1f5fbf; } .map polyline.dh { stroke: #6b7280; stroke-dasharray: 6 5; }
.map circle { stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.map .pickup, .maplegend .pickup { fill: #1d7a3e; background: #1d7a3e; } .map .delivery, .maplegend .delivery { fill: #b3261e; background: #b3261e; }
.map .stop, .maplegend .stop { fill: #b4530a; background: #b4530a; } .map .truck, .maplegend .truck { fill: #374151; background: #374151; }
.maplegend .dh { background: repeating-linear-gradient(90deg, #6b7280 0 4px, transparent 4px 7px); height: 3px !important; vertical-align: 2px !important; }
.maplegend i { border-radius: 50% !important; } .maplegend i.dh { border-radius: 0 !important; }
.map .credit { position: absolute; right: 0; bottom: 0; font-size: 10px; padding: 1px 5px; background: rgba(255, 255, 255, .8); color: #333; text-decoration: none; }
.legend .easy { background: var(--green); } .legend .medium { background: var(--yellow); } .legend .difficult { background: var(--red); }
.notes { margin: 0; padding-left: 20px; color: var(--muted); font-size: .9rem; }

/* ---------- settings ---------- */
.mpg { width: 100%; }
.mpg th { font-size: .78rem; color: var(--muted); font-weight: 600; text-align: center; padding: 0 4px 4px 0; }
.mpg td { padding: 4px 4px 4px 0; border: 0; text-align: left; }
.mpg td:first-child { font-size: .9rem; color: var(--muted); white-space: nowrap; padding-right: 8px; }
.mpg input { min-height: 44px; padding: 8px; text-align: center; }
.saved { color: var(--green); font-size: .85rem; min-height: 1.3em; margin-top: 8px; }

/* ---------- trips (HOT-9) ---------- */
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 650; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.pill.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.pill.done { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
/* HOT-23: the driver's decision is a solid pill (green accepted, red declined), told apart from the tinted
   "Suggested" chip; no decision yet is a dashed grey outline */
.pill.accepted { background: var(--green); color: var(--card); border-color: var(--green); }
.pill.declined { background: var(--red); color: var(--card); border-color: var(--red); }
.pill.undecided { border-style: dashed; font-weight: 600; }
.calls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 5px; }
/* The suggestion pill has its own class: it used to share .chip with the big tap-target buttons further down,
   whose height, padding and font size overrode it and made its text wrap inside. Each pill stays on one line. */
.calls .pill, .sugg { white-space: nowrap; line-height: 1.5; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sugg { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; border: 1px solid transparent; }
.sugg small { font-size: .65rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.sugg.green { background: var(--green-bg); color: var(--green); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.sugg.yellow { background: var(--yellow-bg); color: var(--yellow); border-color: color-mix(in srgb, var(--yellow) 30%, transparent); }
.sugg.red { background: var(--red-bg); color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.trip.live { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.trip .primary { margin-top: 12px; }
.trip-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 8px; }
.trip-head .pill { font-size: .85rem; padding: 3px 10px; }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-pair .primary, .btn-pair .secondary { margin-top: 12px; min-height: 54px; }
.link-btn { display: block; width: 100%; min-height: 44px; margin-top: 6px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .92rem; text-decoration: underline; cursor: pointer; }
table.vs th { font-size: .78rem; color: var(--muted); font-weight: 600; text-align: right; padding: 0 0 4px 12px; }
table.vs td:nth-child(2) { text-align: right; color: var(--muted); }
table.vs td:nth-child(3) { text-align: right; padding-left: 12px; font-weight: 650; white-space: nowrap; }
.pos { color: var(--green); } .neg { color: var(--red); }
.over, .under { font-weight: 500; } .over { color: var(--yellow); } .under { color: var(--green); }
.readings { list-style: none; margin: 4px 0 0; padding: 0; }
.readings li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.readings li:last-child { border-bottom: 0; }
.readings img, .nophoto { flex: none; width: 56px; height: 42px; border-radius: 6px; object-fit: cover; background: var(--bg); display: block; }
.photo-btn {
  display: grid; place-items: center; min-height: 120px; margin: 0 0 4px; border: 2px dashed var(--line); border-radius: 12px;
  background: var(--bg); color: var(--accent); font-weight: 650; font-size: 1rem; cursor: pointer; overflow: hidden;
}
.photo-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-btn #odo-preview { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.photo-btn svg { width: 36px; height: 36px; }
.photo-btn img { max-width: 100%; max-height: 220px; display: block; }
.active-trip {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin: 4px 0 8px; border-radius: 14px;
  background: var(--accent); color: var(--accent-text); text-decoration: none; box-shadow: var(--shadow);
}
.active-trip svg { flex: none; width: 28px; height: 28px; }
.active-trip strong { display: block; }
.active-trip .small { opacity: .9; }
/* HOT-46: mileage and fuel trackers */
.active-wrap { margin: 4px 0 12px; }
.active-wrap .active-trip { margin-bottom: 0; }
.active-wrap .quick .primary, .active-wrap .quick .secondary { margin-top: 8px; min-height: 48px; }
.tracker { margin: 4px 0 12px; }
.tracker h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; font-weight: 650; }
.tracker p { margin: 0 0 4px; }
.tracker .quick .primary, .tracker .quick .secondary { margin-top: 8px; min-height: 48px; }
.tracker .btn-pair > :only-child { grid-column: 1 / -1; }
.tip.bottom { margin-top: 18px; }
.miles-box { margin: 4px 0 6px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.miles-box h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 4px; font-weight: 650; }
.miles-box p { margin: 0; }
table.fuel-vs { width: 100%; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- sign-in, account, drivers (HOT-6) ---------- */
.signin { margin-top: 8px; }
.signin #si-code { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
label.check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: .95rem; margin: 16px 0 4px; min-height: 44px; }
label.check input { width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--accent); }
.drivers { list-style: none; margin: 0; padding: 0; }
.drivers li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.drivers li:first-child { border-top: 0; }
.drivers li > span { min-width: 0; overflow-wrap: anywhere; }
.drivers .link-btn { width: auto; flex: none; margin: 0; padding: 0 4px; }
.drivers .off > span { opacity: .55; }
.drivers .tag { display: inline-block; font-size: .7rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; vertical-align: 1px; }

/* ---------- brokers (HOT-8) ---------- */
.link-btn.danger { color: var(--red); }
.brokers .link-btn { color: var(--accent); text-decoration: none; font-weight: 600; }

/* ---------- onboarding (HOT-16) ---------- */
.onboard p { margin: 0 0 12px; line-height: 1.45; }
.onboard .primary { margin-top: 16px; }
.ob-progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.ob-progress span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .2s; }
.ob-field { margin-top: 14px; }
.ob-field label { margin-top: 0; color: var(--text); font-weight: 600; font-size: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.chip { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); color: var(--text); font: inherit; font-size: .95rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 650; }
.ob-input { display: flex; align-items: center; gap: 8px; }
.ob-input input { flex: 1; min-width: 0; }
.ob-input span { flex: none; min-width: 3.2em; }
.ob-summary { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ob-sum-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ob-sum-head .small { color: var(--accent); font-weight: 600; }

/* ---------- larger screens ---------- */
@media (min-width: 600px) {
  main { padding-top: 20px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Expenses (HOT-10) */
/* Offers, Trips, Expenses (HOT-22). HOT-31: sized for phones first, since the monospace font is wide; each label stays
   on one line (cut short with "…" only on very narrow screens) and the badge never squeezes the text. */
.tabs { margin: 0 0 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; }
.tabs a { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 44px; padding: 0 4px;
  border-radius: 9px; color: var(--muted); font-size: .84rem; font-weight: 600; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.tabs .tab-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tabs .badge { flex: none; min-width: 18px; padding: 0 5px; font-size: .7rem; letter-spacing: 0; }
.tabs a[aria-current="page"] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
@media (min-width: 420px) { .tabs { gap: 4px; padding: 4px; } .tabs a { gap: 6px; padding: 0 6px; font-size: .92rem; letter-spacing: 0; } }
@media (min-width: 600px) { .tabs a { font-size: 1rem; } }
.badge { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: .75rem; line-height: 1.4; text-align: center; }
.tip.warn { background: var(--yellow-bg); border-color: color-mix(in srgb, var(--yellow) 35%, var(--line)); }
.tip.warn svg { color: var(--yellow); }
.warn-text { color: var(--yellow); font-weight: 600; }
.exp-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; box-shadow: var(--shadow); }
.exp-item .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exp-item .main .pill { align-self: flex-start; }
.exp-item .main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-item .amt { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.chips.stack { flex-direction: column; }
.chips.stack .chip { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; padding: 8px 14px; border-radius: 12px; }
.chip small { font-size: .8rem; opacity: .8; font-weight: 400; }
.split { display: flex; flex-direction: column; gap: 8px; }
.split-row { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 400; }
.split-row span { flex: 1; min-width: 0; }
.split-row input { width: 110px; flex: none; }
.receipt { display: block; margin: 0 0 12px; text-align: center; text-decoration: none; }
.receipt .small { display: block; margin-top: 4px; }
.receipt img { display: block; max-width: 100%; max-height: 260px; margin: 0 auto; border-radius: 8px; border: 1px solid var(--line); object-fit: contain; }
.capture-pick .primary, .capture-pick .secondary { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.capture-pick .primary:first-child { margin-top: 0; }
.file-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.trip-exp { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.trip-exp h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; font-weight: 650; }
/* Plain rows on the trip card (no boxes), with a thin line between them */
.trip-exp .exp-item { box-shadow: none; border: 0; border-radius: 0; background: transparent; margin: 0; padding: 8px 0; }
.trip-exp li + li .exp-item { border-top: 1px solid var(--line); }
a.btn-link { display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* HOT-42 hours check */
.hrs-warn, .hrs-tight strong { color: var(--yellow); font-weight: 600; }
.hrs-late strong { color: var(--red); }
.hrs-ok strong { color: var(--green); font-weight: 600; }
/* HOT-49: next to the money ladder the details column is narrow on a phone: wrap instead of cutting off */
.load .main .meta { white-space: normal; }
.load .calls .pill, .load .sugg { white-space: normal; border-radius: 10px; }
/* HOT-48: readings to confirm before the verdict counts */
.checks { border: 2px solid var(--yellow); }
.checks .check + .check { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.checks .check-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.checks .check-picks button { width: auto; flex: 1 1 auto; min-width: 40%; font-weight: 700; }
.checks .check-other input { flex: 1; min-width: 0; }
.checks .check-other button { width: auto; }
.verdict.held { background: var(--yellow-bg); color: var(--yellow); border: 2px dashed var(--yellow); }
.verdict.held .big { color: var(--yellow); }
.sugg.held { background: var(--yellow-bg); color: var(--yellow); border-color: var(--yellow); }
/* HOT-51: odometer and fuel forms right on the trip card */
.quick .quick-row { display: flex; gap: 8px; align-items: center; }
.quick .quick-row input { flex: 1; min-width: 0; }
.quick .quick-row button { width: auto; flex: none; padding-left: 14px; padding-right: 14px; margin: 0; }
.quick .quick-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.quick .quick-grid input { width: 100%; }
.quick .fq-total { flex: 1; }
.fuel-quick { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.fuel-quick h3 { margin: 0 0 6px; }
.fills { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .8rem; font-variant-numeric: tabular-nums; }
.fills th { text-align: right; font-weight: 600; color: var(--muted); padding: 3px 4px; border-bottom: 1px solid var(--line); }
.fills td { text-align: right; padding: 4px; border-bottom: 1px solid var(--line); }
.fills th:first-child, .fills td:first-child { text-align: left; }
.fills td.mpg { font-weight: 750; }
.fills tr.total td { border-bottom: 0; font-weight: 650; }
.fills tr.total td:first-child { text-align: left; color: var(--muted); }
.miles-box .quick-row { flex-wrap: wrap; }
.miles-box .quick-row input { flex: 1 1 100%; }
.miles-box .quick-row button { flex: 1 1 0; }
.fills { font-size: .74rem; }
.fills td, .fills th { white-space: nowrap; padding: 4px 3px; }
/* HOT-52: on a phone the ladder beside the details squeezed them into one word a line. Below 560px the ladder moves
   under the details at full card width as a receipt, top to bottom: label left, amount right, deductions indented and
   light, a sum line above GROSS and NET. */
@media (max-width: 560px) {
  .load { grid-template-columns: 6px minmax(0, 1fr); grid-template-rows: auto 1fr auto; }
  .load .bar { grid-row: 1 / span 3; }
  .load .head { grid-column: 2; }
  .load .route { white-space: normal; overflow: visible; }
  .load .main { padding: 4px 14px 8px 0; }
  .load .side.ladder { grid-column: 2; grid-row: 3; gap: 0; text-align: left; margin-right: 14px; padding: 8px 0 12px;
    border-top: 1px solid var(--line); }
  .load .head ~ .side { padding-top: 8px; }
  .ladder > span { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; line-height: 1.45; }
  .ladder small, .load .ladder .net small { display: inline; margin: 0; font-size: .74rem; text-transform: none; letter-spacing: .01em; }
  .ladder .top small, .ladder .gross small, .load .ladder .net small { font-weight: 650; color: var(--text); opacity: .8; }
  .ladder .off { padding-left: 12px; font-size: .8rem; }
  .ladder .off small { font-size: .74rem; }
  .ladder .gross, .load .ladder .net { border-top: 1px solid var(--line); margin-top: 2px; padding-top: 2px; }
  .ladder .top b { font-size: 1rem; }
  .ladder .gross b { font-size: 1rem; }
  .load .ladder .net { font-size: 1.15rem; }
  .load .ladder .top + .net { border-top: 0; }
}
