/* NorthStar TMS desk (workspace: Specialized Transfer). Black and white; colour only on the one
   state word. Every size, colour, radius and timing below comes from the tokens on :root, so the
   product brand (public/brand/northstar/brand.json) retunes the whole desk from this one block. */
@font-face { font-family: 'Source Serif 4'; src: url('/static/fonts/source-serif-4.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/static/fonts/archivo.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:root {
  /* Type */
  --font: Archivo, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --t-xs: 12px; --t-s: 13px; --t-m: 14px; --t-b: 15px; --t-l: 17px; --t-xl: 20px; --t-2xl: 26px;
  /* Colour: ink on paper, a black bar, and four state colours used only on the state word */
  --ink: #0e0e10; --ink-2: #3f3f46; --mute: #67676f; --faint: #a1a1aa;
  --line: #e8e8eb; --line-2: #d4d4d8; --bg: #fff; --bg-2: #f6f6f7; --bg-3: #ececef;
  --bar: #0b0b0c; --bar-ink: #fafafa; --bar-mute: #a8a8b0; --bar-line: rgba(255, 255, 255, .13); --bar-hover: rgba(255, 255, 255, .08); --bar-field: rgba(255, 255, 255, .09);
  --ok: #137333; --warn: #a15c00; --go: #1a4fd6; --stop: #c5221f;
  /* Space, shape, depth, motion */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;
  --gutter: 28px; --control: 36px;
  --r-1: 6px; --r-2: 10px; --r-pill: 999px;
  --ring: 0 0 0 3px rgba(14, 14, 16, .14);
  --shadow-pop: 0 1px 2px rgba(0, 0, 0, .06), 0 14px 36px rgba(0, 0, 0, .16);
  --ease: cubic-bezier(.2, .8, .2, 1); --fast: 140ms; --med: 200ms;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 var(--t-b)/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
main { padding: var(--s-5) var(--gutter) 64px; max-width: 1360px; }
h1 { font: 650 var(--t-2xl)/1.15 var(--font); letter-spacing: -.015em; margin: var(--s-1) 0 var(--s-4); display: flex; gap: var(--s-3); align-items: baseline; flex-wrap: wrap; }
h1 .w { font-size: var(--t-b); letter-spacing: 0; }
h1 > a.small { font: 600 var(--t-s)/1 var(--font); letter-spacing: 0; text-decoration: none; border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 7px 12px; align-self: center; transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
h1 > a.small:hover { background: var(--bg-2); border-color: var(--faint); }
h2 { font: 650 var(--t-l)/1.25 var(--font); letter-spacing: -.01em; color: var(--ink); margin: 36px 0 var(--s-3); }
h3 { font: 600 var(--t-b)/1.25 var(--font); margin: 18px 0 var(--s-2); }
.muted { color: var(--mute); }
.small { font-size: var(--t-s); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* The bar: the product, the menu in groups, the command bar, who is signed in. */
.band { background: var(--bar); color: var(--bar-ink); display: flex; align-items: center; gap: 20px; padding: 0 var(--gutter); min-height: 60px; position: relative; z-index: 20; }
.home { color: inherit; text-decoration: none; flex: none; border-radius: var(--r-1); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { height: 28px; width: auto; display: block; }
.brand-text { display: grid; gap: 2px; }
.brand-name { font: 700 var(--t-b)/1.1 var(--font); letter-spacing: -.01em; white-space: nowrap; }
.workspace { font: 500 var(--t-xs)/1.15 var(--font); color: var(--bar-mute); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 2px; position: static; inset: auto; width: auto; height: auto; margin: 0; padding: 0; border: 0; overflow: visible; background: none; color: inherit; }
.nav-group { display: flex; align-items: center; gap: 2px; }
.nav-sep { width: 1px; height: 18px; background: var(--bar-line); margin: 0 8px; }
.nav a, .nav-more { display: inline-flex; align-items: center; gap: 2px; min-height: 0; padding: 8px 12px; border: 0; border-radius: var(--r-pill); background: none; color: var(--bar-mute); font: 500 var(--t-m)/1.1 var(--font); text-decoration: none; white-space: nowrap; transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.nav a:hover, .nav-more:hover, .nav-more:popover-open { color: var(--bar-ink); background: var(--bar-hover); }
.nav a.on, .nav-more.on { color: var(--bar); background: var(--bar-ink); font-weight: 600; }
.nav-more:active { transform: none; }
.nav-more .i-s { margin-right: -4px; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-s { width: 15px; height: 15px; }
/* Menus that open from the bar: More, the account, the command list. */
.pop[popover] { position: fixed; inset: 64px 16px auto auto; margin: 0; width: 240px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-pop); overflow: auto; }
.pop[popover]:popover-open { animation: pop-in var(--med) var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.985); } }
.nav .nav-pop a { display: flex; color: var(--ink); border-radius: var(--r-1); padding: 10px 10px; font-weight: 500; }
.nav .nav-pop a:hover { background: var(--bg-2); color: var(--ink); }
.nav .nav-pop a.on { background: var(--ink); color: #fff; }
.me { flex: none; width: 34px; height: 34px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: var(--bar-field); color: var(--bar-ink); font: 650 var(--t-xs)/1 var(--font); letter-spacing: .02em; }
.me:hover, .me:popover-open { background: rgba(255, 255, 255, .2); border: 0; }
.me-pop { padding: 12px !important; }
.me-pop:popover-open { display: grid; gap: 2px; }
.me-pop b { font-weight: 600; }
.me-pop .out { margin-top: 10px; }
.me-pop .out button { width: 100%; }
.menu-btn { display: none; flex: none; width: 38px; height: 38px; min-height: 0; padding: 0; border: 0; border-radius: var(--r-1); background: none; color: var(--bar-ink); }
.menu-btn:hover, .band:has(#nav:popover-open) .menu-btn { background: var(--bar-hover); border: 0; }
body.desk { -webkit-tap-highlight-color: transparent; }
/* The command bar. */
.cmd { position: relative; flex: 1 1 260px; max-width: 420px; margin-left: auto; display: flex; align-items: center; }
.cmd > .i { position: absolute; left: 11px; width: 17px; height: 17px; color: var(--bar-mute); pointer-events: none; transition: color var(--fast) var(--ease); }
.cmd input { width: 100%; height: 38px; padding: 0 56px 0 36px; border: 1px solid var(--bar-line); border-radius: var(--r-2); background: var(--bar-field); color: var(--bar-ink); font-size: var(--t-m); box-shadow: none; }
.cmd input::placeholder { color: var(--bar-mute); opacity: 1; }
.cmd input:hover { border-color: rgba(255, 255, 255, .26); }
.cmd input:focus { outline: none; background: var(--bg); color: var(--ink); border-color: var(--bg); box-shadow: 0 0 0 3px rgba(255, 255, 255, .22); }
.cmd input:focus::placeholder { color: var(--mute); }
.cmd:focus-within > .i { color: var(--ink); }
.cmd-key { position: absolute; right: 9px; font: 600 11px/1 var(--font); color: var(--bar-mute); border: 1px solid var(--bar-line); border-radius: 5px; padding: 4px 6px; pointer-events: none; }
.cmd:focus-within .cmd-key { display: none; }
.cmd-list { position: absolute; top: calc(100% + 8px); right: 0; width: max(100%, 480px); max-height: min(70vh, 520px); overflow: auto; z-index: 30; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-pop); animation: pop-in var(--med) var(--ease); }
.cmd-item { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; align-items: baseline; gap: 1px 10px; padding: 8px 10px; border-radius: var(--r-1); text-decoration: none; color: var(--ink); }
.cmd-item.on { background: var(--bg-3); }
.cmd-kind { grid-row: 1 / 3; font: 500 var(--t-xs)/1.5 var(--font); color: var(--mute); }
.cmd-label { font-weight: 600; font-size: var(--t-m); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-item .w { font-size: var(--t-xs); }
.cmd-sub { grid-column: 2 / -1; font-size: var(--t-s); color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* What a search matched: the field, then the text around it with the typed part marked. */
.cmd-hit { grid-column: 2 / -1; font-size: var(--t-s); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-f, .sr-f { color: var(--mute); }
mark { background: #fde68a; color: inherit; border-radius: 2px; padding: 0 1px; }
ul.sr-list { list-style: none; margin: 0 0 var(--s-3); padding: 0; border-top: 1px solid var(--line); }
ul.sr-list li { border-bottom: 1px solid var(--line); }
.sr { display: flex; flex-direction: column; gap: 3px; padding: 10px 6px; text-decoration: none; color: var(--ink); border-radius: var(--r-1); }
.sr:hover { background: var(--bg-2); }
.sr-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.sr-top .w { font-size: var(--t-xs); }
.sr-sub { color: var(--mute); font-size: var(--t-s); }
.sr-hit { font-size: var(--t-s); color: var(--ink-2); overflow-wrap: anywhere; }
.sr-group h2 { margin-top: 28px; }
/* Public pages keep the customer's own band: his name in white serif, like his card. */
.pubband { justify-content: space-between; padding: 0 18px; min-height: 54px; }
.pubband .brand { font: 600 21px/1 var(--font-serif); letter-spacing: .01em; white-space: nowrap; }
.pubband .mc { color: var(--bar-mute); font-size: var(--t-s); }

/* The MC check card opens under the bar on every desk screen. */
.quick { padding: 0 var(--gutter); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.quick:has(#qc-out:empty) { display: none; }
#qc-out:empty { display: none; }
#qc-out { padding: var(--s-4) 0; max-width: 1360px; }
.qc-line { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; font-size: var(--t-l); }
.qc-reasons { margin: 6px 0 4px; padding: 0; list-style: none; font-size: var(--t-m); }
.qc-reasons li { padding: 1px 0; }
.qc-reasons .r-stop::before { content: 'STOP  '; color: var(--stop); font-weight: 700; }
.qc-reasons .r-check::before { content: 'CHECK  '; color: var(--warn); font-weight: 700; }
.qc-reasons .r-ok, .qc-reasons .r-info { color: var(--mute); }
/* Why a carrier is or is not Set up, right under its name: "Insurance expired 6/30/2025. Ask for current insurance." */
.qc-why { margin: 4px 0 2px; font-size: var(--t-m); font-weight: 600; }
.qc-act { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.qc-card dl.facts { grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); gap: 3px 18px; margin: 8px 0 2px; max-width: 1000px; font-size: var(--t-m); }
@media (max-width: 760px) { .qc-card dl.facts { grid-template-columns: max-content minmax(0, 1fr); } }

/* The one coloured word. */
.w { font-weight: 650; white-space: nowrap; }
.w-ok { color: var(--ok); } .w-warn { color: var(--warn); } .w-go { color: var(--go); } .w-stop { color: var(--stop); } .w-muted { color: var(--mute); font-weight: 600; }

/* Flat lists. */
table.list { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--t-m); }
table.list th { text-align: left; font: 600 var(--t-xs)/1.3 var(--font); color: var(--mute); letter-spacing: .02em; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.list th.num { text-align: right; }
table.list td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; transition: background-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
table.list tr[data-href] { cursor: pointer; }
table.list tr[data-href]:hover td { background: var(--bg-2); }
table.list tr[data-href]:hover td:first-child { box-shadow: -10px 0 0 var(--bg-2); }
table.list td a { text-decoration: none; }
table.list td a:hover { text-decoration: underline; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 var(--s-4); font-size: var(--t-m); }
.tabs a { text-decoration: none; color: var(--ink-2); padding: 6px 12px; border-radius: var(--r-pill); transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease); white-space: nowrap; }
.tabs a:hover { background: var(--bg-3); }
.tabs a.on { color: #fff; background: var(--ink); font-weight: 600; }
.tabs a span { color: var(--mute); font-weight: 500; margin-left: 6px; font-variant-numeric: tabular-nums; }
.tabs a.on span { color: rgba(255, 255, 255, .72); }
.more { margin-top: 12px; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 7px 24px; margin: 0; font-size: var(--t-b); }
dl.facts dt { color: var(--mute); font-size: var(--t-s); padding-top: 2px; }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 10px 56px; }

/* Forms: labels of 1-3 words, quiet inputs, one black button. */
input, select, textarea { font: inherit; font-size: var(--t-b); color: inherit; min-height: var(--control); border: 1px solid var(--line-2); border-radius: var(--r-1); padding: 6px 10px; background: var(--bg); transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
input[type=checkbox], input[type=radio] { min-height: 0; accent-color: var(--ink); box-shadow: none; }
input[type=file] { padding: 6px 8px; font-size: var(--t-m); }
input[type=file]::file-selector-button { font: 600 var(--t-s)/1 var(--font); border: 1px solid var(--line-2); border-radius: var(--r-1); background: var(--bg-2); color: var(--ink); padding: 7px 10px; margin-right: 10px; cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { width: 100%; min-height: 70px; line-height: 1.45; }
select { max-width: 100%; appearance: none; -webkit-appearance: none; padding-right: 30px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5.5 8 4.5 4.5L14.5 8' fill='none' stroke='%2367676f' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 8px center / 16px; }
select[multiple] { background-image: none; padding-right: 10px; }
label { display: flex; flex-direction: column; gap: 5px; font: 500 var(--t-s)/1.3 var(--font); color: var(--ink-2); }
label > input, label > select, label > textarea { color: var(--ink); font-size: var(--t-b); font-weight: 400; }
label.check { flex-direction: row; align-items: flex-start; gap: 8px; color: var(--ink); font-size: var(--t-b); font-weight: 400; }
label.check input { width: 18px; height: 18px; flex: none; margin: 2px 0 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.row > label { flex: 1 1 140px; }
.row > label.w2 { flex: 2 1 260px; } .row > label.xs { flex: 0 1 90px; } .row > label.s { flex: 0 1 130px; }
button, a.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--control); padding: 7px 14px; font: 600 var(--t-m)/1.2 var(--font); color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-1); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease); }
button:hover, a.btn:hover { background: var(--bg-2); border-color: var(--faint); }
button:active, a.btn:active { transform: scale(.98); }
button.primary, a.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
button.primary:hover, a.btn.primary:hover { background: #2b2b30; border-color: #2b2b30; }
button.link { display: inline; min-height: 0; border: 0; background: none; padding: 0; font-weight: 500; color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; white-space: normal; }
button.link:hover { background: none; text-decoration-color: currentColor; }
button.link:active { transform: none; }
button.danger { border-color: #ecc1bf; color: var(--stop); }
button.danger:hover { background: #fdf4f3; border-color: var(--stop); }
button:disabled { opacity: .45; cursor: default; transform: none; }
form.inline { display: inline; }
.actions { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; margin: 4px 0 20px; }
.actions > a:not(.btn) { font-weight: 500; font-size: var(--t-m); text-decoration: underline; text-decoration-color: var(--line-2); }
.actions > a:not(.btn):hover { text-decoration-color: currentColor; }
.actions form.inline > button.link { font-size: var(--t-m); }
.offer { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; margin: -6px 0 20px; }
.pick-warn { color: var(--stop); font-size: var(--t-s); font-weight: 600; min-height: 0; }
.pick-warn:empty { display: none; }
ul.plain { margin: 4px 0 8px; padding-left: 18px; color: var(--mute); }
table.templates td { vertical-align: middle; }
.use-tpl input { width: 52px; padding: 5px 6px; }
label.inline { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; }
details.cols-pick { margin: -4px 0 12px; }
details.cols-pick .row { gap: 6px 16px; }
details.cols-pick label.check { font-size: var(--t-m); flex: 0 0 auto; }
summary { cursor: pointer; font-weight: 600; font-size: var(--t-m); }
summary::marker { color: var(--mute); }

/* The send screen: the document on the left, the email on the right. */
.send { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.send-doc iframe { width: 100%; height: 78vh; min-height: 520px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg-2); display: block; }
.send-mail { display: flex; flex-direction: column; gap: 10px; }
.send-mail table.rcpt { margin: 0; }
.send-mail table.rcpt td { vertical-align: middle; padding-top: 5px; padding-bottom: 5px; }
.send-mail table.rcpt td input[type=checkbox] { width: 18px; height: 18px; margin: 0; }
.send-mail table.rcpt td input:not([type]), .send-mail table.rcpt td input[type=email] { width: 100%; }
.send-mail textarea { min-height: 300px; font-size: var(--t-m); line-height: 1.5; }
label.inline-check { display: inline-flex; margin-left: 14px; font-size: var(--t-m); }
@media (max-width: 1000px) { .send { grid-template-columns: 1fr; } .send-doc iframe { height: 60vh; } }
.flash { color: var(--ok); font-weight: 600; margin: 0 0 var(--s-4); }
.err { color: var(--stop); font-weight: 600; }
.ferr { color: var(--stop); font-size: var(--t-s); }
.note { color: var(--mute); font-size: var(--t-s); margin: 2px 0 10px; }
.lines td input { width: 100%; }
.lines td.q input { width: 70px; } .lines td.r input { width: 110px; }
.stop-row { border-top: 1px solid var(--ink); padding: 12px 0 2px; }
.stop-row .stop-h { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; font-weight: 600; }
.stop-row textarea { min-height: 56px; resize: vertical; }
.ta { position: relative; }
.ta-list { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-pop); padding: 4px; max-height: 280px; overflow: auto; }
.ta-list div { padding: 8px 9px; cursor: pointer; font-size: var(--t-m); color: var(--ink); border-radius: var(--r-1); }
.ta-list div:hover, .ta-list div.on { background: var(--bg-3); }
.ta-list small { color: var(--mute); }
pre.body { white-space: pre-wrap; font: 13px/1.45 ui-monospace, Consolas, monospace; margin: 6px 0; }
.margin-line { font-size: var(--t-b); margin: 6px 0 0; }

/* Today: everything that needs him, most urgent first, the action on the line. */
ul.today { list-style: none; margin: 0 0 var(--s-2); padding: 0; border-top: 1px solid var(--line); }
ul.today li { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; align-items: center; gap: 4px 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
ul.today .what { min-width: 0; }
ul.today .what > a { font-weight: 600; text-decoration: none; }
ul.today .what > a:hover { text-decoration: underline; }
ul.today .sub { display: block; color: var(--mute); font-size: var(--t-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.today .do { display: flex; gap: 8px 14px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
ul.today .do input { width: 150px; }
ul.today .do form.book { display: flex; gap: 6px; align-items: center; }
ul.today li.more-line { display: block; padding: 10px 0; font-size: var(--t-s); color: var(--mute); }
.today-head { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 12px; }
.today-head h2 { margin: 0; }
.allclear { color: var(--mute); margin: 0 0 8px; }
/* Rarely used fields fold away: Edit carrier, Edit customer, More on Build a Load. */
details.fold { margin: 32px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.fold > summary { font-size: var(--t-l); font-weight: 650; padding: 14px 0; list-style-position: inside; }
details.fold > summary .muted { font-weight: 400; margin-left: 8px; }
details.fold[open] > summary { margin-bottom: 4px; }
details.fold > form { padding-bottom: 8px; }
details.more > summary .muted { font-weight: 400; margin-left: 6px; }
@media (max-width: 760px) {
  ul.today li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  ul.today .do { justify-content: flex-start; }
  ul.today .do .ta, ul.today .do form.book { flex: 1 1 100%; }
  ul.today .do input { width: 100%; flex: 1 1 auto; }
}

/* Phone pages (carrier, driver, shipper). */
body.pub main { padding: 16px 16px 40px; max-width: 760px; margin: 0 auto; }
body.pub h1 { font-size: 21px; }
body.pub label > input, body.pub label > select, body.pub label > textarea { font-size: 16px; padding: 10px; }
body.pub label > select { width: 100%; }
body.pub { -webkit-tap-highlight-color: transparent; }
body.pub .row > label { flex: 1 1 200px; }
.pubfoot { text-align: center; color: var(--mute); padding: 18px; font-size: 14px; border-top: 1px solid var(--line); }
.agreement { height: 320px; overflow: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 10px 2px; font: 14px/1.5 var(--font-serif); }
.agreement h3 { font: 700 14px/1.3 var(--font-serif); margin: 14px 0 6px; }
.agreement p { margin: 0 0 8px; }
.sigpad { width: 100%; height: 170px; border: 1px solid var(--ink); border-radius: var(--r-1); touch-action: none; background: #fff; display: block; }
.big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.big button { padding: 22px 10px; font-size: 19px; font-weight: 700; border-radius: var(--r-2); border-color: var(--ink); }
.big button.primary { background: var(--ink); color: #fff; }
.upload { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.upload label { border: 1px solid var(--ink); border-radius: var(--r-2); padding: 16px 10px; text-align: center; color: var(--ink); font-size: 17px; font-weight: 600; cursor: pointer; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.status-line { font-size: var(--t-b); margin: 8px 0; }
/* Sign in: the product, the workspace under it, two fields, one button. */
body.login { background: var(--bg-2); }
body.login main { max-width: 400px; padding: 12vh 16px 40px; }
body.login .signin-brand { display: block; margin: 0 0 22px; }
.brand-l { gap: 12px; }
.brand-l .brand-mark { height: 40px; }
.brand-l .brand-name { font-size: var(--t-2xl); letter-spacing: -.02em; }
.brand-l .workspace { font-size: var(--t-m); color: var(--mute); margin-top: 2px; }
body.login form { display: grid; gap: 14px; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-2); padding: 22px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
body.login form button.primary { min-height: 42px; margin-top: 4px; }
@media (max-width: 760px) {
  .big { grid-template-columns: 1fr 1fr; }
}

/* Ascend-order screens: section jump bar, sub-headings, totals, the right-click menu. */
nav.jump { display: flex; gap: 4px 6px; flex-wrap: wrap; font-size: var(--t-m); border-bottom: 1px solid var(--line); padding: 8px 0; margin: 0 0 6px; position: sticky; top: 0; background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); z-index: 3; }
nav.jump a { text-decoration: none; color: var(--ink-2); padding: 4px 10px; border-radius: var(--r-pill); transition: background-color var(--fast) var(--ease); }
nav.jump a:first-child { margin-left: -10px; }
nav.jump a:hover { color: var(--ink); background: var(--bg-3); }
.audit { margin: -8px 0 10px; }
.rowlabel { flex: 0 0 100%; font-size: 13px; }
.row > label.w3 { flex: 4 1 420px; }
.filters { margin-bottom: 8px; }
.savebar { margin-top: 24px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; position: sticky; bottom: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); padding: 12px 0; border-top: 1px solid var(--line); z-index: 4; }
table.list.loads td { font-size: 13.5px; }
table.list.loads td.lc { max-width: 260px; }
/* A flagged load: a small red dot before its number (the reason is the red word on the load). */
table.list tr.flagged td:first-child::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--stop); margin: 0 7px 1px 0; vertical-align: middle; }
table.list th[data-sort] { cursor: pointer; }
table.list th[data-sort]:hover { color: var(--ink); }
table.list tr.total td { border-top: 1px solid var(--ink); }
table.list td.c { text-align: center; }
table.users td { padding-right: 6px; }
table.users input[type=text], table.users input:not([type]), table.users input[type=password] { padding: 5px 6px; font-size: 13px; }
table.map td { vertical-align: middle; }
.ctx { position: fixed; z-index: 50; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-2); padding: 4px; min-width: 250px; box-shadow: var(--shadow-pop); font-size: var(--t-m); animation: pop-in var(--med) var(--ease); }
.ctx b { display: block; padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.ctx button { display: flex; justify-content: flex-start; width: 100%; min-height: 0; text-align: left; border: 0; border-radius: var(--r-1); padding: 8px 10px; background: none; font-weight: 500; }
.ctx button:hover, .ctx button:focus { background: var(--bg-3); outline: none; }
.ctx button:active { transform: none; }
/* The bar on a tablet or phone: the product and the menu button on top, the command bar under
   them, the menu opening as a sheet under the bar. */
@media (max-width: 1180px) {
  .band { gap: 14px; }
  .nav a, .nav-more { padding: 8px 9px; }
  .nav-sep { margin: 0 4px; }
  .cmd-key { display: none; }
  .cmd input { padding-right: 12px; }
}
@media (max-width: 960px) {
  :root { --gutter: 16px; }
  .band { flex-wrap: wrap; gap: 10px; padding: 10px var(--gutter) 12px; min-height: 0; }
  .home { order: 1; margin-right: auto; }
  .me { order: 2; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; order: 3; }
  .cmd { order: 4; flex: 1 1 100%; max-width: none; margin: 0; }
  .cmd input { height: 42px; font-size: 16px; }
  .cmd-list { left: 0; right: 0; width: auto; }
  .nav { display: none; }
  .nav:popover-open { display: block; position: fixed; inset: 0 0 auto 0; top: 110px; width: 100%; max-height: calc(100dvh - 110px); overflow: auto; margin: 0; padding: 8px var(--gutter) 24px; background: var(--bar); border-top: 1px solid var(--bar-line); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); animation: sheet-in var(--med) var(--ease); }
  .nav-group { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-sep { display: block; width: auto; height: 1px; margin: 8px 0; }
  .nav a { display: flex; padding: 13px 12px; font-size: var(--t-l); border-radius: var(--r-1); }
  .nav-rest::before { content: ''; display: block; height: 1px; background: var(--bar-line); margin: 8px 0; }
  .nav-more { display: none; }
  .nav .nav-pop { display: flex; flex-direction: column; position: static; inset: auto; width: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; animation: none; overflow: visible; }
  .nav .nav-pop a { color: var(--bar-mute); padding: 13px 12px; }
  .nav .nav-pop a:hover { color: var(--bar-ink); background: var(--bar-hover); }
  .nav .nav-pop a.on { color: var(--bar); background: var(--bar-ink); }
  main { padding: 18px var(--gutter) 56px; }
  h1 { font-size: 22px; }
  h2 { margin-top: 30px; }
  table.list.loads { display: block; overflow-x: auto; }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(-6px); } }
/* A phone never scrolls sideways: a wide list scrolls inside itself, everything else wraps. */
@media (max-width: 760px) {
  table.list:not(.stack) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  button, a.btn, .w { white-space: normal; text-align: center; }
  .w { text-align: left; }
  input, select, textarea { max-width: 100%; }
  dl.facts { grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 16px; }
  .row { gap: 10px; }
  .actions { gap: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } }
/* Carrier setup wizard (phone first). */
body.pub .lead { font-size: 17px; margin: 0 0 16px; }
button.wide { width: 100%; padding: 15px; font-size: 18px; font-weight: 600; }
form.start { display: grid; gap: 12px; margin-bottom: 14px; }
form.start input { font-size: 20px !important; padding: 13px !important; letter-spacing: .02em; }
ol.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 4px 0 14px; counter-reset: s; }
ol.steps li { flex: 1; font-size: 12px; color: var(--mute); border-top: 3px solid var(--line); padding-top: 6px; line-height: 1.25; }
ol.steps li.done { border-top-color: var(--ink); }
ol.steps li.on { border-top-color: var(--ink); color: var(--ink); font-weight: 700; }
ol.steps a { color: inherit; }
form.wiz section { margin: 0 0 6px; }
form.wiz h2 { margin-top: 22px; }
.who { border-left: 2px solid var(--ink); padding: 4px 0 4px 12px; font-size: 15px; line-height: 1.5; margin: 0 0 8px; }
details.more { margin: 6px 0 4px; }
details.more summary { font-size: 14px; padding: 6px 0; color: var(--ink); }
details.more[open] summary { margin-bottom: 8px; }
fieldset.choice { border: 0; padding: 0; margin: 0 0 10px; flex: 1 1 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.choice legend { font-size: 13px; color: var(--mute); padding: 0; margin-bottom: 6px; width: 100%; }
fieldset.choice.grid .opt { flex: 1 1 calc(50% - 8px); }
fieldset.choice .ferr { flex-basis: 100%; }
label.opt { position: relative; flex: 1 1 140px; flex-direction: row; color: var(--ink); font-size: 15px; }
label.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.opt span { display: block; width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-1); padding: 11px 12px; cursor: pointer; text-align: center; transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
label.opt input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; font-weight: 600; }
label.opt input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
fieldset.seg { max-width: 320px; }
.fw { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.fw.w3, .fw:has(> label.check) { flex-basis: 100%; }
.coi { flex: 1 1 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.coi label.btn { position: relative; border: 1px solid var(--ink); border-radius: var(--r-2); padding: 15px 8px; text-align: center; color: var(--ink); font-size: 16px; font-weight: 600; cursor: pointer; flex-direction: row; justify-content: center; }
.coi label.btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.coi .coi-name, .coi .ferr { grid-column: 1 / -1; margin: 0; }
.typed-sig { border-bottom: 1px solid var(--ink); padding: 10px 4px 6px; min-height: 58px; font: italic 34px/1.2 'Times New Roman', Times, Georgia, serif; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.verify { border: 1px solid var(--line); border-radius: var(--r-2); padding: 12px 14px; margin: 14px 0; }
.verify p { margin: 0 0 8px; }
form.codes { display: flex; flex-wrap: wrap; gap: 8px; }
.rv h3 { display: flex; gap: 12px; align-items: baseline; margin-top: 14px; }
.rv h3 a { font-weight: 400; font-size: 13px; }
.rv dl.facts { font-size: 14px; }
.next { display: grid; gap: 12px; justify-items: center; margin-top: 18px; }
.next a { font-size: 14px; color: var(--mute); }
@media (max-width: 480px) {
  body.pub dl.facts { grid-template-columns: 1fr; gap: 0; }
  body.pub dl.facts dd { margin-bottom: 6px; }
}

@media print { .band, .quick, nav.jump, .actions, form { display: none !important; } }
/* Secure upload link page (phone first). */
ol.plain-steps { padding-left: 22px; margin: 4px 0 14px; }
ol.plain-steps li { margin: 5px 0; line-height: 1.45; }
form.start input[type=file] { font-size: 16px !important; letter-spacing: 0; max-width: 100%; }
body.pub table.list td { overflow-wrap: anywhere; }
@media (max-width: 760px) { table.list.scrollx { display: block; overflow-x: auto; } }
/* Carriers: where each Add carrier value came from, the find actions, and lists that stack on a phone. */
.src { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ok); margin-left: 4px; }
.src.typed { color: var(--go); }
label > span .src { vertical-align: 1px; }
.row.equip { gap: 8px 16px; align-items: center; }
.row.equip label.check { flex: 0 0 auto; font-size: 14px; }
.rowacts { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; white-space: nowrap; }
.pager { display: flex; gap: 16px; align-items: center; margin: 14px 0; }
.add-fmcsa dl.facts { margin-top: 8px; }
form.filters .row { margin-bottom: 8px; }
@media (max-width: 760px) {
  table.list.stack thead { display: none; }
  table.list.stack, table.list.stack tbody, table.list.stack tr, table.list.stack td { display: block; width: auto; }
  table.list.stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.list.stack td { border: 0; padding: 2px 0; text-align: left; }
  table.list.stack td[data-empty] { display: none; }
  table.list.stack td[data-l]:not([data-l=""]):not(:first-child)::before { content: attr(data-l) "  "; color: var(--mute); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-right: 6px; }
  .rowacts { white-space: normal; }
}
/* Read off a carrier's W-9 or certificate: the mark under a field it filled in (setup), and what
   was read beside each document (the carrier page). */
.fromdoc { display: block; font-size: 12px; font-weight: 600; color: var(--warn); margin-top: 3px; }
label.check .fromdoc { flex-basis: 100%; margin: 0 0 0 26px; }
.coi.reading .coi-name { color: var(--mute); }
.docread h3 { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 15px; margin: 4px 0 8px; }
.docread dl.facts { font-size: 14px; }

/* Carrier page Files: the three papers, a line each, Upload / Replace under it, older ones folded. */
.papers { align-items: start; }
.paper { padding: 8px 0 10px; border-bottom: 1px solid var(--line); }
.paper:first-child { padding-top: 0; }
.paper-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.paper-line > b { min-width: 9.5em; }
.paper-up { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.paper-up input[type=file] { font-size: 14px; max-width: 100%; min-width: 0; }
.paper ul.versions { list-style: none; padding: 0; margin: 2px 0 0; color: var(--ink); font-size: 14px; }
.paper ul.versions li { padding: 3px 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.paper details.more { margin: 4px 0 0; }
@media (max-width: 760px) { .paper-up input[type=file] { font-size: 16px; flex: 1 1 100%; } .papers { gap: 14px; } }
/* Two columns of facts become one on a phone (380px tracks would push the page sideways). */
@media (max-width: 760px) { .cols { grid-template-columns: minmax(0, 1fr); } }
/* A facts list beside a taller one keeps its lines together at the top. */
dl.facts { align-content: start; }
.papers { margin-bottom: 22px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
/* Add carrier on a phone: the three buttons wrap to full rows at the end of the form. */
@media (max-width: 760px) {
  #addform .savebar { position: static; flex-wrap: wrap; gap: 8px 10px; }
  #addform .savebar button { flex: 1 1 auto; }
  #addform .savebar .small { flex: 1 1 100%; }
}
/* Loads: Load List / Build a Load sub-tabs. */
nav.subtabs { display: flex; gap: 24px; margin: 0 0 18px; border-bottom: 1px solid var(--line); font-size: var(--t-b); }
nav.subtabs a { text-decoration: none; color: var(--mute); font-weight: 500; padding: 0 0 9px; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
nav.subtabs a:hover { color: var(--ink); }
nav.subtabs a.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
/* Build a Load: the picked customer / carrier, their commodities, live financials. */
.pick-info:empty, .sugg:empty, .stop-info:empty { display: none; }
.pick-info { margin: 2px 0 12px; }
.pick-info dl.facts { grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); gap: 3px 18px; font-size: 14px; max-width: 1000px; }
.pick-info p { margin: 4px 0 0; }
.hold { margin: 0 0 4px; }
.sugg { margin: -4px 0 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.loss { color: var(--stop); }
dl.facts.fin { margin: 14px 0 0; max-width: 420px; font-size: 16px; }
dl.facts.fin dd { text-align: right; font-variant-numeric: tabular-nums; }
.stop-info { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: -2px 0 8px; color: var(--ink); }
.stop-info b { color: var(--mute); font-weight: 600; margin-right: 4px; }
/* Edit Stops: the stops, with the Locations panel beside them (above them on a phone). */
.stops-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 0 24px; align-items: start; }
.stops-wrap > .locpanel { order: 2; position: sticky; top: 36px; }
.stops-main { min-width: 0; }
.locpanel { border-left: 1px solid var(--line); padding-left: 14px; }
.locpanel summary { font-weight: 600; font-size: 14px; cursor: pointer; padding: 2px 0 8px; }
.locpanel input[type=search] { width: 100%; box-sizing: border-box; margin-bottom: 6px; }
.loc-list { max-height: 62vh; overflow-y: auto; }
.loc-item { padding: 7px 0; border-bottom: 1px solid var(--line); cursor: grab; display: grid; gap: 1px; font-size: 14px; }
.loc-item b { font-weight: 600; }
.loc-item small { color: var(--mute); font-size: 12.5px; }
.loc-acts { display: flex; gap: 14px; font-size: 13px; }
.stop-row.drop-on { outline: 2px dashed var(--ink); outline-offset: 2px; background: var(--bg-2); }
.stop-drop { border: 1px dashed var(--line); color: var(--mute); text-align: center; padding: 10px; margin: 8px 0; font-size: 13px; }
body.loc-dragging .stop-drop { border-color: var(--mute); }
.stop-drop.drop-on { border-color: var(--ink); color: var(--ink); background: var(--bg-2); }
/* + New customer dialog. */
dialog.dlg { border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-pop); padding: 20px 22px; max-width: 760px; width: calc(100% - 32px); box-sizing: border-box; }
dialog.dlg::backdrop { background: rgba(0, 0, 0, .35); }
dialog.dlg h2 { margin-top: 0; }
.dlg-acts { display: flex; gap: 12px; margin: 16px 0 0; }
/* Customer form: freight types. */
fieldset.ft { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
fieldset.ft legend { font-size: 13px; color: var(--mute); padding: 0; margin-bottom: 4px; width: 100%; }
h2 a.small { font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 8px; }
@media (max-width: 760px) {
  .stops-wrap { grid-template-columns: minmax(0, 1fr); }
  .stops-wrap > .locpanel { order: 0; position: static; border-left: 0; padding-left: 0; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
  .loc-list { max-height: 40vh; }
  .stop-drop { display: none; }
  .loc-acts button { padding: 4px 0; font-size: 15px; }
  .pick-info dl.facts { grid-template-columns: max-content minmax(0, 1fr); }
  table.list.lines { display: block; overflow-x: auto; }
  dl.facts.fin { max-width: none; }
}

/* Quotes: the price large, what to check under it, one black button. */
.big-price { font-size: 30px; margin: 0 0 8px; display: flex; gap: 12px; align-items: baseline; font-variant-numeric: tabular-nums; }
.big-price .w { font-size: 15px; }
ul.flags { margin: 0 0 14px; padding-left: 18px; color: var(--warn); font-size: 14px; }
form.approve { margin: 0 0 6px; }
form.approve .row { align-items: flex-end; }
form.approve button.primary { padding: 9px 22px; font-weight: 700; }
form.approve details { margin: 2px 0 8px; font-size: 14px; }
form.approve details textarea { min-height: 300px; font-size: 14px; line-height: 1.45; }
form.approve details label { display: block; margin: 8px 0; }
.wide { width: 100%; }
body.pub form.accept label { display: block; margin: 0 0 12px; }
body.pub form.accept button { padding: 16px; font-size: 18px; font-weight: 700; }
