/* RT Driver phone app — dark "cab mode": map on top, sheet below, big amber/green buttons. */
:root {
    --bg: #0b0d10; --card: #14161b; --card-2: #1c1f26; --line: #2a2e37; --fill: #1f2937;
    --text: #f3f4f6; --text-2: #9ca3af; --text-3: #6b7280;
    --amber: #fbbf24; --green: #22c55e; --red: #f87171; --blue: #2563eb; --purple: #a78bfa;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
    --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
    --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
    --left: env(safe-area-inset-left, 0px); --right: env(safe-area-inset-right, 0px);   /* the notch side when the phone is held sideways */
    --tabs-h: calc(58px + var(--bottom));
    color-scheme: dark;   /* native pickers, scrollbars and autofill follow the app's dark colors (audit Minor 10) */
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--amber); text-decoration: none; }
[hidden] { display: none !important; }

/* map layer (home screen only) */
#map-layer { position: fixed; inset: 0 0 auto 0; height: 58vh; z-index: 1; background: #e8eaed; }
#map { position: absolute; inset: 0; }
#map-fallback { position: absolute; inset: 0; background: #14161b; display: grid; place-items: center; color: var(--text-2); font-size: 15px; text-align: center; padding: 20px; }
.map-chips { position: fixed; top: calc(var(--top) + 8px); left: calc(var(--left) + 12px); right: calc(var(--right) + 12px); z-index: 3; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.map-chips button { flex-shrink: 0; min-height: 44px; border: 0; border-radius: 12px; padding: 0 12px; background: #fff; color: #111; font-size: 13px; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.map-chips button.on { background: #111; color: #fff; }
.map-btns { position: fixed; top: calc(46vh - 104px); right: calc(var(--right) + 12px); z-index: 3; display: flex; flex-direction: column; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.18); overflow: hidden; }
.map-btns button { width: 44px; height: 44px; border: 0; background: #fff; color: #333; font-size: 18px; }
.map-btns button + button { border-top: 1px solid #eee; }

/* the sheet (home) */
.sheet-panel { position: fixed; left: 0; right: 0; bottom: var(--tabs-h); top: var(--low-top, 46vh); z-index: 2; background: #0f1115; border-radius: 22px 22px 0 0;
    box-shadow: 0 -6px 20px rgba(0,0,0,.3); display: flex; flex-direction: column; transition: top .25s ease; }
.sheet-panel.high { top: calc(var(--top) + 64px); }
.sheet-panel.dragging { transition: none; }
.sheet-grab { flex-shrink: 0; min-height: 44px; padding: 8px 0 10px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.sheet-grab::before { content: ""; width: 40px; height: 5px; border-radius: 5px; background: #374151; }
.sheet-body { flex: 1; overflow-y: auto; padding: 0 calc(var(--right) + 12px) 24px calc(var(--left) + 12px); -webkit-overflow-scrolling: touch; }

/* plain screens (trips, me, stop) */
.screen { max-width: 640px; margin: 0 auto; padding: calc(var(--top) + 10px) calc(var(--right) + 12px) calc(var(--tabs-h) + 28px) calc(var(--left) + 12px); }
.title { font-size: 28px; font-weight: 800; margin: 6px 4px 4px; letter-spacing: -.01em; }
.sub { color: var(--text-2); font-size: 14px; margin: 0 4px 12px; }
.back { appearance: none; border: 0; background: none; color: var(--amber); font-size: 16px; font-weight: 700; min-height: 44px; padding: 0 4px; display: inline-flex; align-items: center; gap: 4px; }

/* progress + next-stop card */
.progress9 { display: flex; gap: 3px; margin: 0 4px; }
.progress9 i { flex: 1; height: 6px; border-radius: 4px; background: var(--fill); }
.progress9 i.d { background: var(--green); } .progress9 i.n { background: var(--amber); } .progress9 i.m { background: var(--red); }
.pg { display: flex; justify-content: space-between; margin: 7px 4px 12px; font-size: 13px; color: var(--text-2); }
.hero { background: linear-gradient(160deg, #1c1f26, #14161b); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.hero-k { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--amber); text-transform: uppercase; }
.hero-k.ok { color: var(--green); }
.hero-where { font-size: 22px; font-weight: 800; line-height: 1.15; margin: 6px 0 3px; }
.hero-city { font-size: 14px; color: var(--text-2); line-height: 1.35; }
.facts { display: flex; gap: 6px; margin-top: 12px; }
.facts div { flex: 1; min-width: 0; background: var(--bg); border-radius: 12px; padding: 8px 10px; }
.facts small { display: block; font-size: 10.5px; color: var(--text-3); font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.facts .sub { display: block; margin: 0; font-size: 11px; color: var(--text-3); font-weight: 700; line-height: 1.2; }
.facts b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.eta-line { margin-top: 10px; font-size: 14px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.eta-line b { color: var(--text); }
.eta-ok { color: var(--green); font-weight: 800; } .eta-tight { color: var(--amber); font-weight: 800; } .eta-late { color: var(--red); font-weight: 800; }
.eta-mark.ok { color: var(--green); } .eta-mark.tight { color: var(--amber); font-weight: 800; } .eta-mark.late { color: var(--red); font-weight: 800; }
.big { display: grid; place-items: center; width: 100%; min-height: 58px; margin-top: 12px; border: 0; border-radius: 16px; font-size: 17px; font-weight: 800; letter-spacing: .02em;
    background: var(--amber); color: #111; text-transform: uppercase; }
.big.green { background: var(--green); color: #052e16; }
.big:active { transform: scale(.98); }
.big:disabled { opacity: .5; }
.sm-row { display: flex; gap: 6px; margin-top: 8px; }
.sm-row > * { flex: 1; min-height: 46px; border: 0; border-radius: 12px; background: var(--fill); color: var(--text); font-size: 14px; font-weight: 700; display: grid; place-items: center; }

/* lists */
.lbl { margin: 18px 4px 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--text-3); text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.li { width: 100%; text-align: left; border: 0; color: var(--text); padding: 11px 12px; min-height: 56px; border-radius: 14px; background: var(--card); display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.li.nx { outline: 2px solid var(--amber); }
.li.ok .li-n { color: var(--text-2); }
.num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #374151; color: #e5e7eb; flex-shrink: 0; }
.li.ok .num { background: var(--green); color: #052e16; } .li.nx .num { background: var(--amber); color: #111; } .li.miss .num { background: var(--red); color: #111; }
.li-main { flex: 1; min-width: 0; }
.li-n { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-s { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.tag { flex-shrink: 0; font-size: 11px; font-weight: 800; border-radius: 7px; padding: 4px 7px; background: var(--fill); color: var(--text-2); }
.tag.dv { background: #422006; color: #fcd34d; } .tag.pu { background: #1e3a8a; color: #bfdbfe; } .tag.ok { background: #052e16; color: #86efac; } .tag.miss { background: #450a0a; color: #fca5a5; }

/* stop screen */
.pro { background: var(--card); border-radius: 14px; padding: 11px 12px; margin-bottom: 6px; }
.pro-top { display: flex; align-items: center; gap: 10px; }
.pro-n { font-family: var(--mono); font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.pro-s { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.pro-btns { margin-left: auto; display: flex; gap: 8px; }
.cam, .chk { width: 46px; height: 46px; border-radius: 12px; border: 2px solid #374151; background: var(--fill); display: grid; place-items: center; font-size: 18px; color: var(--text); }
.chk.on { background: var(--green); border-color: var(--green); color: #052e16; }
.chk-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.chk-wrap small { font-size: 10px; line-height: 1; color: var(--text-2); white-space: nowrap; }
.chk.miss { background: var(--red); border-color: var(--red); color: #111; }
.cam.have { border-color: var(--green); }
.note { margin: 8px 4px 0; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.notice { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card-2); font-size: 14px; line-height: 1.4; }
.notice b { display: block; margin-bottom: 3px; }
.notice.red { background: #2a0f0f; color: #fecaca; } .notice.amber { background: #2a1d05; color: #fde68a; } .notice.green { background: #052e16; color: #bbf7d0; }

/* tab bar */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; height: var(--tabs-h); padding: 0 var(--right) var(--bottom) var(--left); background: var(--bg); border-top: 1px solid var(--fill); display: flex; }
#tabs button { flex: 1; border: 0; background: none; color: var(--text-3); font-size: 11px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; }
#tabs button svg { width: 24px; height: 24px; }
#tabs button.on { color: var(--amber); }

/* modal pop-up (ETA) and bottom sheets */
.modal-wrap { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.55); display: grid; place-items: end center; padding: 12px calc(var(--right) + 12px) calc(var(--bottom) + 12px) calc(var(--left) + 12px); }
.modal { width: 100%; max-width: 520px; background: var(--card-2); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.sheet-wrap { position: fixed; inset: 0; z-index: 20; }
.sheet-back { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.sheet { position: absolute; left: var(--left); right: var(--right); bottom: var(--kb, 0px); max-height: 88vh; overflow-y: auto; background: var(--card-2); border-radius: 20px 20px 0 0; padding: 8px 16px calc(var(--bottom) + 18px); }
.sheet h3 { margin: 8px 0 4px; font-size: 19px; } .sheet p { color: var(--text-2); margin: 0 0 12px; font-size: 14px; }
.btn { width: 100%; min-height: 50px; border: 0; border-radius: 14px; background: var(--fill); color: var(--text); font-size: 16px; font-weight: 700; margin-top: 8px; }
.btn.amber { background: var(--amber); color: #111; } .btn.green { background: var(--green); color: #052e16; } .btn.red { background: #450a0a; color: #fca5a5; } .btn.plain { background: none; color: var(--text-2); }
.field { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px; padding: 0 12px; min-height: 52px; margin-bottom: 6px; }
.field label { flex: 0 0 96px; color: var(--text-2); font-size: 14px; }
.field input, .field textarea { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 17px; padding: 12px 0; color: var(--text); }
.field select { border: 0; outline: none; background: var(--fill); color: var(--text); font-size: 16px; padding: 10px 4px; border-radius: 10px; min-height: 44px; }
.field .date-sel { flex: 1 1 auto; min-width: 118px; }
.field label.short { flex: 0 0 34px; }
.field b { color: var(--text-2); }
.choice { width: 100%; border: 0; color: var(--text); text-align: left; font-size: 16px; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 12px; background: var(--card); border-radius: 12px; margin-bottom: 6px; }

/* misc carried over from the live app (same class names, dark colors) */
.sync-bar { margin: 0 4px 10px; padding: 10px 12px; border-radius: 12px; background: #2a1d05; color: #fde68a; font-size: 13px; }
.sync-bar.err { display: flex; align-items: center; gap: 8px; background: #2a0f0f; color: #fecaca; }
.sync-bar.err span { flex: 1; }
.sync-b { flex-shrink: 0; min-height: 44px; padding: 0 12px; border: 1px solid #fecaca; border-radius: 10px; background: none; color: inherit; font-size: 13px; font-weight: 600; }
.sync-x { flex-shrink: 0; min-width: 44px; min-height: 44px; margin: -8px -6px -8px 0; border: 0; background: none; color: inherit; font-size: 18px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.thumb { flex-shrink: 0; border: 0; padding: 0; background: none; color: var(--text-2); font-size: 11px; text-align: center; }
.thumb img { width: 64px; height: 84px; object-fit: cover; border-radius: 8px; background: var(--card-2); display: block; }
.thumb.waiting img { opacity: .5; }
.spinner { width: 28px; height: 28px; margin: 60px auto; border-radius: 50%; border: 3px solid var(--fill); border-top-color: var(--amber); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--text-2); padding: 40px 20px; }
#toast { pointer-events: none; position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 14px); transform: translate(-50%, 20px); opacity: 0; z-index: 40; background: #f3f4f6; color: #111; padding: 12px 16px; border-radius: 14px; font-size: 15px; font-weight: 600; transition: .2s; max-width: 90vw; text-align: center; }
#toast.in { opacity: 1; transform: translate(-50%, 0); } #toast.err { background: #fecaca; color: #450a0a; }
.viewer { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; padding: calc(var(--top) + 8px) calc(var(--right) + 12px) 8px calc(var(--left) + 12px); color: #fff; }
.viewer-bar button { border: 0; background: none; color: var(--amber); font-size: 17px; font-weight: 700; min-height: 44px; padding: 0 8px; }
.viewer-img { flex: 1; overflow: auto; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
.viewer-img.zoom { touch-action: auto; }
.viewer-bar-pad { min-width: 60px; }
.viewer-nav { display: flex; gap: 10px; padding: 10px calc(var(--right) + 12px) calc(var(--bottom) + 12px) calc(var(--left) + 12px); background: #000; }
.viewer-nav button { flex: 1; min-height: 56px; border: 0; border-radius: 14px; background: var(--fill); color: var(--text); font-size: 17px; font-weight: 800; }
.viewer-nav button:disabled { opacity: .35; }
.viewer-img img { max-width: 100%; max-height: 100%; } .viewer-img.zoom img { max-width: none; max-height: none; }
.login { max-width: 420px; margin: 0 auto; padding: calc(var(--top) + 60px) 20px 40px; text-align: center; }
.login h1 { font-size: 30px; margin: 14px 0 4px; } .login .lead { color: var(--text-2); margin: 0 0 26px; }
.login-logo { width: 72px; height: 72px; border-radius: 18px; }
.login .error { color: var(--red); min-height: 22px; margin: 8px 0; font-size: 14px; }
.small-link { border: 0; background: none; color: var(--amber); font-size: 15px; font-weight: 600; min-height: 44px; margin-top: 6px; }
.code-input { text-align: center; letter-spacing: .4em; font-size: 26px !important; }
.choice input[type=radio] { width: 22px; height: 22px; accent-color: var(--amber); flex-shrink: 0; }
.choice span { flex: 1; }
.field textarea { resize: none; }
.sheet .sheet-grab { min-height: 20px; padding: 6px 0 4px; cursor: default; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.lbl + .field, .lbl + .choice { margin-top: 0; }
.sheet input[type=datetime-local] { color-scheme: dark; }

.note.flags { color: var(--amber); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
#map .gm-err-container { display: none; }   /* Google's own error box; the app shows its own message instead */

/* PRO screen, OS&D, document-type chooser */
.tag.osd { background: #431407; color: #fb923c; }
.pro { cursor: pointer; }
.pro-main { flex: 1; min-width: 0; }
.pro-n .tag { font-family: var(--font); font-size: 11px; vertical-align: middle; margin-left: 4px; }
.chev { flex-shrink: 0; color: var(--text-3); font-size: 26px; line-height: 1; padding: 0 2px 0 4px; }
.osd-line { color: #fb923c; font-weight: 700; }
.notice.osd { background: #431407; color: #fdba74; }
.pro-big { font-family: var(--mono); font-size: 34px; font-weight: 800; letter-spacing: .01em; margin: 6px 0 4px; word-break: break-all; line-height: 1.1; }
.pro-big .tag { font-family: var(--font); font-size: 13px; vertical-align: middle; margin-left: 6px; padding: 5px 9px; }
.pro-status { font-size: 16px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.kv { display: flex; gap: 10px; margin-top: 8px; font-size: 16px; line-height: 1.3; }
.kv small { flex: 0 0 52px; color: var(--text-3); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding-top: 3px; }
.kv span { flex: 1; min-width: 0; }
.pro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.pbtn { min-height: 64px; border: 0; border-radius: 16px; background: var(--fill); color: var(--text); font-size: 16px; font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; line-height: 1.15; text-align: center; }
.pbtn .ic { font-size: 22px; line-height: 1; }
.pbtn.osd { background: #431407; color: #fb923c; }
.pbtn.red { background: #450a0a; color: #fca5a5; }
.pbtn:active { transform: scale(.98); }
.choice small { color: var(--text-2); font-size: 13px; }
.doc-choice { min-height: 58px; font-size: 18px; }
.doc-choice span { flex: 0 1 auto; color: var(--text-2); font-size: 13px; }
.doc-choice b { flex: 0 0 90px; }
.confirm-line { margin: 0 0 10px; font-weight: 700; }
.sticky-actions { position: sticky; bottom: calc(-1 * (var(--bottom) + 18px)); margin: 8px -16px calc(-1 * (var(--bottom) + 18px)); padding: 6px 16px calc(var(--bottom) + 12px); background: var(--card-2); box-shadow: 0 -8px 12px var(--card-2); }
.sticky-actions .btn { margin-top: 4px; }
.sticky-actions.pair { display: flex; gap: 8px; } .sticky-actions.pair .btn { flex: 1; min-width: 0; }
/* M8: keyboard open (app.js keyboardFit): the sheet sits on the keyboard and fits what is still visible */
html.kb-up .sheet { max-height: calc(var(--vvh, 100vh) - 8px); padding-bottom: 12px; }
html.kb-up .sheet .sticky-actions { bottom: -12px; margin-bottom: -12px; padding-bottom: 8px; }
.sheet input, .sheet textarea { scroll-margin-bottom: 84px; }
.choice input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--amber); flex-shrink: 0; }
.field label[for="osd-pcs"] { flex: 0 0 150px; font-size: 16px; color: var(--text); font-weight: 700; }
#osd-pcs { font-size: 24px; font-weight: 800; text-align: right; }
body.has-sheet #toast { bottom: auto; top: calc(var(--top) + 14px); }   /* never over a sheet's buttons (class set by app.js, M7: old iPhones have no has-selector) */

/* review fixes */
.big:disabled { background: #2a2e37; color: #6b7280; opacity: 1; }
.pro-pod { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.pro-pod.need { color: var(--red); } .pro-pod.ok { color: var(--green); }
.pbtn:disabled { opacity: .55; }
.osd-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.osd-photos .pbtn { min-height: 58px; }
/* photo source sheet: Take photo / Choose from phone (every photo button) */
.src-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.src-grid .pbtn { min-height: 76px; }
/* PDF files (lumper receipts): a tile instead of a picture */
.thumb .pdf-tile { width: 64px; height: 84px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text); font-size: 13px; font-weight: 800; }
.thumb .pdf-tile .pdf-ic { font-size: 24px; line-height: 1; }
.thumb.pdf.waiting .pdf-tile, .thumb.photo.waiting .pdf-tile { opacity: .5; }
.viewer-pdf .pdf-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; color: #fff; text-align: center; max-width: 320px; }
.viewer-pdf .pdf-ic { font-size: 20px; font-weight: 900; background: #b91c1c; color: #fff; border-radius: 10px; padding: 22px 18px; letter-spacing: .05em; }
.viewer-pdf .btn { min-width: 220px; }
/* a new app version is ready (shown while a sheet / viewer is open or a field is being typed in) */
#update-bar { position: fixed; left: calc(var(--left) + 12px); right: calc(var(--right) + 12px); top: calc(var(--top) + 8px); z-index: 60; border: 0; border-radius: 14px; min-height: 52px; padding: 0 14px; background: var(--amber); color: #111; font-size: 16px; font-weight: 800; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
#app-version { margin-top: 18px; text-align: center; }
.viewer-pdf a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
/* Steven's round 10/15/26: POD = delivered; Scan form; Navigation app */
.field select.wide { flex: 1; min-width: 0; -webkit-appearance: none; appearance: none; padding: 10px 34px 10px 12px; text-overflow: ellipsis;
    background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239ca3af' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center / 12px 8px; }
.field label[for="nav-app"] { flex: 0 0 112px; }
.pod-done { color: var(--green); font-size: 14px; font-weight: 800; margin-top: 4px; }
.pod-delivered { color: var(--green); font-size: 20px; font-weight: 800; text-align: center; padding: 14px 0 0; }
.undo-link { display: block; margin: 0 auto; color: var(--text-2); }

/* Lumper receipt by pasted text or link: the paste button, the paste box, the text tile and the full text */
.src-grid .pbtn.span2, .pro-grid .pbtn.span2 { grid-column: 1 / -1; min-height: 52px; flex-direction: row; gap: 8px; }
.paste-field textarea, #paste-box { font-size: 16px; min-height: 140px; }
.text-doc { border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); margin: 6px 0; overflow: hidden; }
.text-doc.waiting { opacity: .7; }
.text-doc-open { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px 6px; color: var(--text); }
.text-doc-open b { display: block; font-size: 13px; margin-bottom: 3px; }
.text-doc-open b small { font-weight: 400; color: var(--text-2); }
.text-doc-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; color: var(--text-2); }
.text-doc-links { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 10px; }
.text-doc-links a { font-size: 14px; overflow-wrap: anywhere; text-decoration: underline; }
.sheet .text-doc-links { padding: 8px 0 0; }
pre.text-full { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 16px; line-height: 1.4; margin: 8px 0 0; padding: 12px; border-radius: 10px;
    background: var(--card-2); max-height: 50vh; overflow: auto; -webkit-user-select: text; user-select: text; }

/* stop updates from the office (WhatsApp): banner on the trip, NEW tag on an added stop */
.tag.new { background: #1d4ed8; color: #fff; }
.notice.su-alert { position: relative; padding-right: 44px; cursor: pointer; }
.notice.su-alert .su-x { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 0; border-radius: 10px; background: rgba(255,255,255,.08); color: inherit; font-size: 15px; }
.notice.a2hs { position: relative; padding-right: 48px; border: 1px solid #374151; }   /* M5 Add to Home Screen */
.notice.a2hs .su-x { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 0; border-radius: 10px; background: rgba(255,255,255,.08); color: inherit; font-size: 15px; }
.notice b.in { display: inline; margin: 0; }
.notice.a2hs .btn { margin-top: 10px; }
.notice.oa-ask { cursor: pointer; }
.notice.oa-ask-card .sm-row { margin-top: 8px; }

/* the driver's stop order (Task R): big ▲ ▼ buttons, no drag (gloves, one hand); stops already done shown gray above */
.ord-row, .ord-fixed { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 6px 8px 6px 12px; min-height: 66px; margin-bottom: 6px; }
.ord-fixed { opacity: .55; min-height: 52px; }
.ord-row .li-n, .ord-fixed .li-n { display: block; } .ord-row .li-s, .ord-fixed .li-s { display: block; }
.ord-btn { flex: 0 0 56px; width: 56px; height: 56px; border: 0; border-radius: 12px; background: var(--fill); color: var(--text); font-size: 22px; font-weight: 800; }
.ord-btn:disabled { opacity: .3; }
.ord-btn:active { transform: scale(.95); }
/* "Already done": the time boxes and the lines */
.field.ad-time input { font-size: 16px; min-height: 44px; }
.field.ad-time input + input { flex: 0 0 84px; }
.ad-line { background: var(--card); border-radius: 12px; padding: 4px 8px 8px; margin-bottom: 6px; }
.ad-line .choice { background: none; margin: 0; padding: 0 4px; }
.ad-line.ad-fixed { padding: 10px 12px; opacity: .7; }
.ad-line.ad-fixed .li-n, .ad-line.ad-fixed .li-s { display: block; }

/* "See as" (Task S): an office user seeing the app as a driver. A fixed orange bar on top; everything below moves down
   by its height (--top is the top inset every screen already uses). */
html.seeas { --top: var(--seeas-h, calc(env(safe-area-inset-top, 0px) + 40px)); }   /* --seeas-h: the bar's real height (app.js) */
#seeas-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 70; min-height: calc(env(safe-area-inset-top, 0px) + 40px);
    padding: calc(env(safe-area-inset-top, 0px) + 6px) 12px 6px; background: #ea580c; color: #fff; font-size: 13px; line-height: 1.3; font-weight: 600;
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
#seeas-bar b { font-weight: 800; }
#seeas-bar button { appearance: none; border: 0; background: #fff; color: #9a3412; font-weight: 800; font-size: 14px; border-radius: 8px; min-height: 28px; padding: 0 12px; }
html.seeas #map-layer { top: var(--top); }

/* A4: the number of this line is not confirmed yet (number_check): a small amber note, never blocking */
.note.num-check { color: var(--amber); font-weight: 700; }

/* Mobile audit I1 (10/17/26): the office's messages one line each above the next-stop card (two or more fold into one
   line "📨 3 office messages"), and the stop name at most two lines on the Trip screen (all of it on the Stop
   screen), so the big Arrived / Depart button shows without scrolling. The sheet's height comes from app.js (fitSheet). */
.office-strip .notice { margin: 0 0 8px; padding: 12px 52px 12px 14px; min-height: 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.office-strip .notice b { display: inline; margin: 0 6px 0 0; }
.office-strip .notice.oa-ask { padding-right: 14px; }
.office-strip .office-more { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; text-align: left; font: inherit; color: #fde68a; padding-right: 14px; }
.office-strip .office-more b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.office-strip .office-more span { flex-shrink: 0; font-weight: 800; text-decoration: underline; }
.office-strip:not(.open) .office-more ~ .notice { display: none; }
.sheet-panel .hero-where { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* Mobile audit I2: a phone held sideways (truck mount): the map on the left, the sheet on the right at full height,
   a slimmer tab bar, the notch side kept clear (--left / --right), and bottom sheets centered and taller. */
@media (orientation: landscape) and (max-height: 500px) {
    :root { --tabs-h: calc(48px + var(--bottom)); }
    #tabs button { min-height: 48px; flex-direction: row; gap: 6px; font-size: 13px; }
    #tabs button svg { width: 22px; height: 22px; }
    #map-layer { right: auto; width: 46vw; height: auto; bottom: var(--tabs-h); }
    .map-chips { right: calc(54vw + 12px); }
    .map-btns { top: auto; bottom: calc(var(--tabs-h) + 12px); right: calc(54vw + 12px); }
    .sheet-panel, .sheet-panel.high { top: var(--top); left: 46vw; border-radius: 0; box-shadow: -6px 0 20px rgba(0,0,0,.3); }
    .sheet-panel .sheet-grab { display: none; }
    .sheet-panel .sheet-body { padding-top: 10px; padding-left: 12px; display: flex; flex-direction: column; }
    .sheet-panel .sheet-body > * { order: 3; flex-shrink: 0; }
    .sheet-panel .sheet-body > #sync-bar, .sheet-panel .sheet-body > .progress9, .sheet-panel .sheet-body > .pg, .sheet-panel .sheet-body > .hero { order: 1; }
    .sheet-panel .sheet-body > .office-strip { order: 2; margin-top: 10px; }
    .sheet-panel .sheet-body > .spinner, .sheet-panel .sheet-body > .empty { order: 1; }
    .sheet-panel .hero { padding: 12px; }
    .sheet-panel .hero-where { font-size: 20px; margin: 4px 0 2px; }
    .sheet-panel .facts { margin-top: 8px; }
    .sheet-panel .facts div { padding: 6px 10px; }
    .sheet-panel .hero-city { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sheet-panel .big { min-height: 52px; margin-top: 8px; }
    .sheet-panel .pg { margin: 6px 4px 8px; }
    .sheet { left: max(var(--left), calc(50vw - 330px)); right: max(var(--right), calc(50vw - 330px)); max-height: calc(100vh - var(--top) - 6px); border-radius: 20px 20px 0 0; }
    .modal-wrap { place-items: center; }
    .modal { max-height: calc(100vh - 24px); overflow-y: auto; }
}

/* My pay week (plan 2026-10-17-driver-pay T7) */
.mp-job { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card-2); border-left: 4px solid var(--fill); }
.mp-job[data-state="READY"], .mp-job[data-state="PAID"] { border-left-color: var(--green); }
.mp-job[data-state="NEEDS_DECISION"], .mp-job[data-state="NOT_CLOSED"], .mp-job[data-state="NEEDS_DAY_CONFIRM"] { border-left-color: var(--amber); }
.mp-job[data-state="HELD"] { border-left-color: #f87171; }
.mp-day { font-size: 13px; color: var(--text-2); }
.mp-title { font-weight: 700; margin-top: 2px; overflow-wrap: anywhere; }
.mp-state { margin-top: 4px; font-weight: 800; }
.mp-navs { display: flex; gap: 8px; } .mp-navs .btn { flex: 1; min-width: 0; }
/* My pay week: the office's added amounts / charges (Dan 10/17/26), shown once the week is approved */
.mp-adj { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card-2); border-left: 4px solid var(--green); }
.mp-adj > div { min-width: 0; }
.mp-adj b { white-space: nowrap; }
.mp-adj.charge { border-left-color: #f87171; }
.mp-adj.charge b { color: #f87171; }

/* My pay week: paid (plan 2026-10-17-driver-pay-page P5) */
.mp-paid b { font-size: 16px; }
