/* manifest.css — Phase 2 design-system port for the Driver Manifest.
 *
 * Loaded globally via rx.App(stylesheets=[...]) but only the manifest
 * page actually applies these classes. All colors/spacing/type read
 * from tokens.css custom properties so existing Tailwind utility
 * classes elsewhere are untouched.
 *
 * Pattern: each row renders a compact clickable header at all times,
 * and the production action set (gate code, placement, contact, status
 * buttons, COMPLETE JOB, Pin location, Report Issue, checkbox) drops
 * into a conditional `.mp-row-expand` block when the row is open.
 */

/* Card container — overrides the production `bg-slate-900 border ... px-5 py-4`
   when the .mp-row class is also present. Padding now lives on the inner
   header / expand sections so the click target wraps just the header. */
.manifest-row.mp-row {
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 0;
  margin-bottom: 12px;
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
  overflow: hidden;
}
.manifest-row.mp-row.active {
  border-color: var(--accent-500);
  box-shadow: var(--shadow-glow-amber);
}
.manifest-row.mp-row.complete {
  opacity: 0.62;
}
.manifest-row.mp-row.expanded {
  background: var(--bg-card-2);
}

/* Compact header — clickable to toggle expansion */
.mp-row-header {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
}
.mp-row-header:hover { background: color-mix(in srgb, var(--bg-card-2) 60%, transparent); }
.manifest-row.mp-row.expanded .mp-row-header { background: transparent; }

/* Number / status badge */
.mp-row-badge {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: var(--fw-bold) 14px/1 var(--font-display);
  background: var(--bg-input);
  color: var(--fg-3);
  border: 1px solid var(--border-2);
  flex-shrink: 0;
}
.mp-row-badge.active {
  background: var(--accent-500);
  color: #0f172a;
  border-color: transparent;
}
.mp-row-badge.complete {
  background: var(--status-complete-fg);
  color: #0f172a;
  border-color: transparent;
}

/* Body — title, address, equipment line, optional pills */
.mp-row-body { flex: 1; min-width: 0; }
.mp-row-title {
  font: var(--fw-semi) var(--fs-h3)/1.25 var(--font-display);
  color: var(--fg-1);
  margin: 0;
}
.manifest-row.mp-row.complete .mp-row-title {
  color: var(--fg-3);
  text-decoration: line-through;
}
.mp-row-addr {
  font-size: var(--fs-sm);
  color: var(--fg-3);
  margin: 4px 0 0;
}
.mp-row-equip {
  font: var(--fw-medium) var(--fs-xs)/1.4 var(--font-mono);
  color: var(--fg-2);
  margin: 4px 0 0;
}
.mp-row-pills {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* Aside — status pill stacked over chevron */
.mp-row-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.mp-row-chev { color: var(--fg-4); transition: transform 120ms ease, color 120ms ease; }
.manifest-row.mp-row.expanded .mp-row-chev { color: var(--accent-400); }

/* Expanded section — opens below the header. Border-top keeps it
   visually attached to the header. */
.mp-row-expand {
  padding: 4px 16px 16px;
  border-top: 1px solid var(--border-1);
}
.mp-row-expand-inner {
  padding-top: 14px;
}
.mp-row-actions {
  margin-top: 14px;
}

/* Window-time pill (e.g. "8am–10am"): amber-tinted, like design's
   gate-code chip. Layered onto the existing .pill from tokens.css. */
.pill-window {
  background: var(--link-active-bg);
  color: var(--link-active-fg);
  border: 1px solid var(--link-active-bd);
}

/* Print: when paper output, force everything to expanded so the
   driver's printed manifest never has hidden details. */
@media print {
  .mp-row-expand { display: block !important; padding-top: 14px; }
  .manifest-row.mp-row {
    background: white !important;
    color: black !important;
    border-color: #999 !important;
    opacity: 1 !important;
    box-shadow: none !important;
  }
  .mp-row-chev { display: none; }
  .mp-row-header { cursor: default; }
  /* Phase-14: the driver-shell pb-32 (8rem bottom padding for the
     fixed bottom nav) leaves an empty band on paper. Reset on print. */
  .manifest-shell .pb-32 { padding-bottom: 1rem !important; }
}

/* ---- Clock-In gateway screen ---------------------------------------
 * Mobile-first: full viewport on phones, capped to a phone-shaped column
 * on desktop so a dispatcher smoke-testing the URL on a laptop sees the
 * same layout the driver does.
 */
.mp-clockin-root {
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--fg-1);
  display: flex;
  justify-content: center;
}
.mp-clockin-shell {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  padding: 32px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mp-clockin-error {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--status-issue-bg);
  border: 1px solid var(--status-issue-bd);
  border-radius: var(--r-md);
  color: var(--status-issue-fg);
  font: var(--fw-medium) var(--fs-sm)/1.4 var(--font-body);
}
.mp-clockin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 50px;
}
.mp-clockin-wordmark {
  font: var(--fw-bold) 18px/1 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--fg-1);
}
.mp-clockin-brand-accent { color: var(--accent-500); }

.mp-clockin-eyebrow {
  font: var(--fw-semi) 11px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-3);
  margin-bottom: 12px;
}
.mp-clockin-eyebrow.tight { margin-bottom: 8px; }

.mp-clockin-hero {
  margin: 0 0 32px;
  font: var(--fw-bold) 30px/1.05 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--fg-1);
}

.mp-clockin-card {
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
}
.mp-clockin-truck-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.mp-clockin-truck {
  font: var(--fw-bold) 22px/1 var(--font-display);
  color: var(--fg-1);
  white-space: nowrap;
}
.mp-clockin-stops {
  font: var(--fw-medium) 13px/1 var(--font-mono);
  color: var(--accent-300);
  white-space: nowrap;
}
.mp-clockin-truck-sub {
  font: var(--fw-regular) 12.5px/1.4 var(--font-body);
  color: var(--fg-3);
  margin-top: 8px;
}

.mp-clockin-spacer { flex: 1; min-height: 24px; }

.mp-clockin-cta {
  width: 100%;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--accent-500);
  color: #0f172a;
  font: var(--fw-bold) 14px/1 var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 0;
  box-shadow: var(--shadow-glow-amber);
  transition: background 120ms ease, transform 80ms ease;
}
.mp-clockin-cta:hover {
  background: var(--brand-cta-hover);
}
.mp-clockin-cta:active {
  transform: translateY(1px);
}
.mp-clockin-footnote {
  text-align: center;
  margin-top: 14px;
  font: var(--fw-regular) 12px/1.4 var(--font-body);
  color: var(--fg-3);
}
.mp-clockin-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--status-complete-bg);
  border: 1px solid var(--status-complete-bd);
  border-radius: var(--r-md);
  color: var(--status-complete-fg);
  align-self: flex-start;
}
.mp-clockin-status .icon {
  color: var(--status-complete-fg);
  flex-shrink: 0;
}
.mp-clockin-status-label {
  font: var(--fw-semi) 12px/1.4 var(--font-body);
}
/* Closed-shift variant — neutral grey, signaling "you're off-shift but
   the day is recoverable" rather than a green "you're working" cue. */
.mp-clockin-status.closed {
  background: var(--bg-input);
  border-color: var(--border-2);
  color: var(--fg-2);
}
.mp-clockin-status.closed .icon { color: var(--fg-3); }

/* ---- End-of-Day summary screen -------------------------------------
 * Same phone-shaped column shell as Clock-In so the bookend screens
 * read as a pair. The 2x2 stat grid is the visual anchor — uses the
 * same .mp-clockin-card chrome via .mp-eod-stat-card.
 */
.mp-eod-root {
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--fg-1);
  display: flex;
  justify-content: center;
}
.mp-eod-shell {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  padding: 32px 28px 40px;
  display: flex;
  flex-direction: column;
}
.mp-eod-error {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--status-issue-bg);
  border: 1px solid var(--status-issue-bd);
  border-radius: var(--r-md);
  color: var(--status-issue-fg);
  font: var(--fw-medium) var(--fs-sm)/1.4 var(--font-body);
}

.mp-eod-eyebrow {
  font: var(--fw-semi) 11px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-3);
  margin-bottom: 12px;
}
.mp-eod-hero {
  margin: 0 0 8px;
  font: var(--fw-bold) 26px/1.1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--fg-1);
}
.mp-eod-context {
  font: var(--fw-regular) 12.5px/1.4 var(--font-body);
  color: var(--fg-3);
  margin-bottom: 20px;
}
.mp-eod-meta { color: var(--fg-3); }

.mp-eod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.mp-eod-stat-card {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
}
.mp-eod-stat-label {
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
}
.mp-eod-stat-value {
  margin-top: 8px;
  font: var(--fw-bold) 22px/1 var(--font-display);
  letter-spacing: -0.015em;
  color: var(--fg-1);
}
.mp-eod-stat-value.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}
.mp-eod-stat-value.ok { color: var(--status-complete-fg); }
.mp-eod-stat-value.alert { color: var(--status-issue-fg); }

.mp-eod-issue-card {
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--status-issue-bg);
  border: 1px solid var(--status-issue-bd);
  border-radius: var(--r-lg);
}
.mp-eod-issue-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--status-issue-fg);
}
.mp-eod-issue-head .icon { color: var(--status-issue-fg); flex-shrink: 0; }
.mp-eod-issue-head-label {
  font: var(--fw-semi) 11px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.mp-eod-issue-row {
  font: var(--fw-regular) 13px/1.5 var(--font-body);
  color: var(--fg-1);
}
.mp-eod-issue-customer {
  font-weight: var(--fw-semi);
  color: var(--fg-1);
}
.mp-eod-issue-detail {
  color: var(--fg-2);
}

.mp-eod-spacer { flex: 1; min-height: 24px; }

.mp-eod-cta {
  width: 100%;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--accent-500);
  color: #0f172a;
  font: var(--fw-bold) 14px/1 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 0;
  box-shadow: var(--shadow-glow-amber);
  transition: background 120ms ease, transform 80ms ease;
}
.mp-eod-cta:hover { background: var(--brand-cta-hover); }
.mp-eod-cta:active { transform: translateY(1px); }
.mp-eod-footnote {
  text-align: center;
  margin-top: 14px;
  font: var(--fw-regular) 12px/1.4 var(--font-body);
  color: var(--fg-3);
}

/* ---- Driver-shell compact header (Phase 12) ------------------------
 * Hamburger tile + title block + icon button. Replaces the giant
 * "Daily Manifest" h1 + Print button block on the live driver view.
 * Paper output (`@media print`) bypasses this entirely — see the
 * print rule lower down for the printable header treatment.
 */
.mp-shell-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
}
.mp-shell-head-icon-tile {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--bg-input);
  display: grid;
  place-items: center;
  color: var(--fg-2);
  flex-shrink: 0;
  border: 1px solid var(--border-2);
}
.mp-shell-head-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mp-shell-head-eyebrow {
  font: var(--fw-semi) 11px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
}
.mp-shell-head-title {
  font: var(--fw-bold) 18px/1.15 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--fg-1);
  margin: 0;
}
.mp-shell-head-sub {
  font: var(--fw-medium) 12px/1.3 var(--font-mono);
  color: var(--fg-3);
}
.mp-shell-head-shift-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  align-self: flex-start;
  width: fit-content;
}
.mp-shell-head-shift-pill.open {
  background: var(--status-complete-bg);
  border: 1px solid var(--status-complete-bd);
  color: var(--status-complete-fg);
}
.mp-shell-head-shift-pill.closed {
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  color: var(--fg-3);
}
.mp-shell-head-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  display: grid;
  place-items: center;
  color: var(--fg-2);
  flex-shrink: 0;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.mp-shell-head-icon-btn:hover {
  background: var(--accent-500);
  color: #0f172a;
  border-color: transparent;
}
@media print {
  /* Paper-mode header: spell out the role explicitly so a printed
     manifest reads like a manifest, not a phone screen. */
  .mp-shell-head-icon-tile,
  .mp-shell-head-icon-btn { display: none !important; }
  .mp-shell-head { margin-bottom: 24px !important; }
  .mp-shell-head-eyebrow::before { content: "Daily Manifest · "; }
  .mp-shell-head-title { font-size: 28px !important; }
}

/* ---- End-of-Day Phase-16 sign-off section ------------------------- */
.mp-eod-form {
  display: flex;
  flex-direction: column;
}
.mp-eod-form-error {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: var(--status-issue-bg);
  border: 1px solid var(--status-issue-bd);
  border-radius: var(--r-md);
  color: var(--status-issue-fg);
  font: var(--fw-medium) 12.5px/1.4 var(--font-body);
}
.mp-eod-input-card {
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
}
.mp-eod-input-label {
  display: block;
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin-bottom: 8px;
}
.mp-eod-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  color: var(--fg-1);
  font: var(--fw-bold) 22px/1 var(--font-mono);
  letter-spacing: 0.02em;
}
.mp-eod-input:focus {
  outline: none;
  border-color: var(--accent-500);
}
.mp-eod-input-help {
  margin-top: 8px;
  font: var(--fw-regular) 11.5px/1.4 var(--font-body);
  color: var(--fg-3);
}

.mp-eod-signoff {
  padding: 14px;
  background: var(--status-complete-bg);
  border: 1px solid var(--status-complete-bd);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mp-eod-signoff-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--status-complete-fg);
}
.mp-eod-signoff-head .icon { color: var(--status-complete-fg); flex-shrink: 0; }
.mp-eod-signoff-label {
  font: var(--fw-semi) 13px/1 var(--font-body);
}
.mp-eod-signoff-meta {
  font: var(--fw-regular) 12.5px/1.4 var(--font-body);
  color: var(--fg-2);
}
.mp-eod-signoff-back {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  color: var(--fg-2);
  font: var(--fw-semi) 12.5px/1 var(--font-body);
  text-decoration: none;
  padding: 6px 0;
}
.mp-eod-signoff-back:hover { color: var(--fg-1); }

.mp-eod-no-shift {
  padding: 14px 16px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  color: var(--fg-3);
  font: var(--fw-medium) 13px/1.4 var(--font-body);
  margin-bottom: 8px;
  text-align: center;
}

/* ---- Driver-shell day progress card --------------------------------- */
.mp-progress-card {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mp-progress-label {
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
}
.mp-progress-track {
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.mp-progress-fill {
  height: 100%;
  background: var(--accent-500);
  border-radius: var(--r-pill);
  transition: width 300ms ease-out;
}

/* ---- Driver-shell bottom nav (4 tabs: Stops / Map / Equip / Me) ----
 * Fixed-position at viewport bottom. Tabs share the same shape; the
 * active tab tints amber and bolds. Coming-soon tabs read disabled
 * (pointer-events: none + opacity .45) so the bar visually feels
 * complete without pretending to navigate.
 */
.mp-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  border-top: 1px solid var(--border-1);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: stretch;
  z-index: 40;
  padding: 0 12px env(safe-area-inset-bottom);
}
.mp-nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--fg-3);
  text-decoration: none;
  font: var(--fw-semi) 11px/1 var(--font-body);
  cursor: pointer;
  transition: color 120ms ease;
  padding: 8px 4px;
  border-radius: var(--r-md);
}
.mp-nav-tab:hover { color: var(--fg-1); }
.mp-nav-tab.active {
  color: var(--accent-500);
}
.mp-nav-tab.active .mp-nav-icon {
  color: var(--accent-500);
}
.mp-nav-tab.active .mp-nav-label {
  color: var(--accent-500);
  font-weight: var(--fw-bold);
}
.mp-nav-tab.coming-soon {
  opacity: 0.45;
  pointer-events: none;
}
.mp-nav-icon {
  display: block;
}
.mp-nav-label {
  letter-spacing: 0.04em;
}

/* ---- GPS heartbeat repositioning (Phase-11 — clears bottom nav) ---- */
.mp-gps-pill {
  /* Was bottom-3; nudge up so the pill sits ABOVE the 72px bottom nav
     plus a 16px breathing-room gap. Safe-area inset on iOS keeps it
     clear of the home-indicator slug. */
  bottom: calc(88px + env(safe-area-inset-bottom));
}

/* ---- A2HS install button + iOS overlay (Phase 19) -----------------
 * Single CTA replaces the long iPhone/Android instruction lists.
 * assets/a2hs.js dispatches per-platform on click — Android gets the
 * native `beforeinstallprompt`; iOS gets a 3-step overlay since Apple
 * doesn't expose a programmatic install path.
 */
.mp-a2hs-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.mp-a2hs-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--accent-500);
  color: #0f172a;
  border: 0;
  border-radius: var(--r-md);
  font: var(--fw-bold) 13px/1 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-glow-amber);
  transition: background 120ms ease, transform 80ms ease;
  margin-top: 4px;
}
.mp-a2hs-btn:hover { background: var(--brand-cta-hover); }
.mp-a2hs-btn:active { transform: translateY(1px); }

/* `is-hidden` is a JS-toggled class that takes precedence over the
   default visibility of any A2HS element (button, wrap, etc). */
.mp-a2hs-wrap .is-hidden { display: none !important; }
#haulbase-a2hs-wrap.is-hidden { display: none !important; }

/* iOS inline 3-step instructions card. Hidden by default; the JS
   adds `.is-open` on iPhone Safari (or as a fallback when the
   browser doesn't expose `beforeinstallprompt`). */
.mp-a2hs-ios {
  display: none;
  margin-top: 8px;
  padding: 14px 16px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
}
.mp-a2hs-ios.is-open { display: block; }
.mp-a2hs-ios-body {
  margin: 0 0 12px;
  font: var(--fw-medium) 13px/1.5 var(--font-body);
  color: var(--fg-2);
}
.mp-a2hs-ios-steps {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font: var(--fw-regular) 13.5px/1.5 var(--font-body);
  color: var(--fg-1);
}
.mp-a2hs-ios-steps li::marker {
  color: var(--accent-300);
  font-weight: var(--fw-bold);
}
.mp-a2hs-ios-steps b {
  color: var(--accent-300);
  font-weight: var(--fw-semi);
}

/* ---- Driver Equip view (Phase 23) ----------------------------------
 * Today's truck details + active-job equipment breakdown + a
 * LocalStorage-backed pre-trip inspection checklist. Same phone-
 * shaped column shell as the Me / Map / Stop-detail screens.
 */
.mp-eq-root {
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--fg-1);
  display: flex;
  justify-content: center;
}
.mp-eq-shell {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  padding: 20px 20px calc(96px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.mp-eq-error {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--status-issue-bg);
  border: 1px solid var(--status-issue-bd);
  border-radius: var(--r-md);
  color: var(--status-issue-fg);
  font: var(--fw-medium) var(--fs-sm)/1.4 var(--font-body);
}
.mp-eq-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--accent-300);
  font: var(--fw-semi) 13px/1 var(--font-body);
  text-decoration: none;
}
.mp-eq-title {
  margin: 0 0 14px;
  font: var(--fw-bold) 22px/1.15 var(--font-display);
  letter-spacing: -0.015em;
  color: var(--fg-1);
}

.mp-eq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.mp-eq-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.mp-eq-section-eyebrow {
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin-bottom: 10px;
  display: block;
}
.mp-eq-section-head .mp-eq-section-eyebrow { margin-bottom: 0; }
.mp-eq-section-help {
  margin-top: -4px;
  margin-bottom: 12px;
  font: var(--fw-regular) 12px/1.4 var(--font-body);
  color: var(--fg-3);
}
.mp-eq-section-pill {
  margin-left: auto;
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  color: var(--fg-2);
}
/* Collapsible header bar — used by the pre-trip inspection card.
 * Same visual rhythm as a non-toggling section head, but the whole
 * row is the click target and a chevron rotates with state. */
.mp-eq-section-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.mp-eq-section-toggle .mp-eq-section-eyebrow {
  margin-bottom: 0;
}
.mp-eq-section-chev {
  color: var(--fg-3);
  flex-shrink: 0;
}
.mp-eq-section-toggle:hover .mp-eq-section-chev { color: var(--fg-1); }
.mp-eq-section-body {
  margin-top: 12px;
}
.mp-eq-section-body .mp-eq-section-help {
  margin-top: 0;
  margin-bottom: 12px;
}
.mp-eq-empty {
  font: var(--fw-regular) 13px/1.5 var(--font-body);
  color: var(--fg-3);
  font-style: italic;
}

.mp-eq-truck-name {
  font: var(--fw-bold) 18px/1.2 var(--font-display);
  color: var(--fg-1);
  margin-bottom: 12px;
}
.mp-eq-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mp-eq-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-1);
}
.mp-eq-meta-row:last-child { border-bottom: 0; }
.mp-eq-meta-label {
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  flex-shrink: 0;
}
.mp-eq-meta-value {
  font: var(--fw-medium) 13px/1.4 var(--font-body);
  color: var(--fg-1);
  text-align: right;
}
.mp-eq-meta-value.mono {
  font-family: var(--font-mono);
  color: var(--accent-300);
}

.mp-eq-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-1);
}
.mp-eq-row:last-child { border-bottom: 0; }
.mp-eq-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.mp-eq-row-label {
  font: var(--fw-semi) 14px/1.3 var(--font-body);
  color: var(--fg-1);
}
.mp-eq-row-count {
  font: var(--fw-bold) 14px/1 var(--font-mono);
  color: var(--accent-300);
}
.mp-eq-row-detail {
  margin-top: 4px;
  font: var(--fw-regular) 12px/1.4 var(--font-body);
  color: var(--fg-3);
}

.mp-eq-check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.mp-eq-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  text-align: left;
  width: 100%;
}
.mp-eq-check-row:hover { background: var(--bg-input); }
.mp-eq-check-box {
  width: 22px;
  height: 22px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border-2);
  background: var(--bg-card);
  display: grid;
  place-items: center;
  color: #0f172a;
  flex-shrink: 0;
  transition: background 120ms ease, border-color 120ms ease;
}
.mp-eq-check-box.checked {
  background: var(--accent-500);
  border-color: transparent;
}
.mp-eq-check-label {
  font: var(--fw-medium) 13px/1.4 var(--font-body);
  color: var(--fg-1);
  flex: 1;
}

/* ---- Driver Me view (Phase 18) ------------------------------------
 * Driver profile card stack: avatar + name + nickname + today's stats
 * + truck info + theme toggle + sign out. Same phone-shaped column
 * shell as Clock-In / End-of-Day so the gateway-screen + bottom-nav
 * screens read as a coherent set.
 */
.mp-me-root {
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--fg-1);
  display: flex;
  justify-content: center;
}
.mp-me-shell {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  /* Pad the bottom for the fixed nav (72px + safe-area inset). */
  padding: 24px 24px calc(96px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.mp-me-error {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--status-issue-bg);
  border: 1px solid var(--status-issue-bd);
  border-radius: var(--r-md);
  color: var(--status-issue-fg);
  font: var(--fw-medium) var(--fs-sm)/1.4 var(--font-body);
}
.mp-me-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--accent-300);
  font: var(--fw-semi) 13px/1 var(--font-body);
  text-decoration: none;
}
.mp-me-back:hover { text-decoration: underline; }

.mp-me-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 16px;
}
.mp-me-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--accent-500),
    color-mix(in srgb, var(--accent-500) 60%, var(--accent-300))
  );
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  box-shadow: var(--shadow-glow-amber);
}
.mp-me-avatar-initials {
  font: var(--fw-bold) 26px/1 var(--font-display);
  color: #0f172a;
  letter-spacing: 0.02em;
}
.mp-me-name {
  margin: 0;
  font: var(--fw-bold) 22px/1.15 var(--font-display);
  color: var(--fg-1);
  letter-spacing: -0.015em;
}
.mp-me-nickname {
  margin-top: 2px;
  font: var(--fw-medium) 13px/1 var(--font-mono);
  color: var(--fg-3);
  letter-spacing: 0.02em;
}
.mp-me-shift-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 5px 10px;
  border-radius: var(--r-sm);
}
.mp-me-shift-pill.open {
  background: var(--status-complete-bg);
  border: 1px solid var(--status-complete-bd);
  color: var(--status-complete-fg);
}
.mp-me-shift-pill.closed {
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  color: var(--fg-3);
}

.mp-me-card {
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.mp-me-section-eyebrow {
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin-bottom: 10px;
}
.mp-me-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mp-me-stat {
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.mp-me-stat-label {
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
}
.mp-me-stat-value {
  margin-top: 6px;
  font: var(--fw-bold) 22px/1 var(--font-mono);
  color: var(--fg-1);
  letter-spacing: 0.01em;
}
.mp-me-stat-value.ok { color: var(--status-complete-fg); }

.mp-me-truck {
  font: var(--fw-bold) 18px/1.2 var(--font-display);
  color: var(--fg-1);
}
.mp-me-truck-sub {
  margin-top: 6px;
  font: var(--fw-medium) 12px/1.4 var(--font-mono);
  color: var(--fg-3);
}

.mp-me-theme-row {
  display: flex;
  gap: 8px;
}
.mp-me-theme-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  color: var(--fg-2);
  font: var(--fw-semi) 12px/1 var(--font-body);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.mp-me-theme-btn:hover {
  background: var(--bg-card-2);
  color: var(--fg-1);
}
.mp-me-theme-btn.active {
  background: var(--accent-500);
  color: #0f172a;
  border-color: transparent;
}

.mp-me-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  color: var(--fg-1);
  text-decoration: none;
  font: var(--fw-semi) 13px/1 var(--font-body);
  margin-bottom: 8px;
  transition: background 120ms ease, color 120ms ease;
}
.mp-me-action:last-child { margin-bottom: 0; }
.mp-me-action:hover {
  background: var(--accent-500);
  color: #0f172a;
  border-color: transparent;
}

.mp-me-signout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--status-issue-bg);
  border: 1px solid var(--status-issue-bd);
  color: var(--status-issue-fg);
  font: var(--fw-semi) 13px/1 var(--font-body);
  cursor: pointer;
  margin-top: 16px;
  transition: filter 120ms ease;
}
.mp-me-signout:hover { filter: brightness(1.15); }
.mp-me-signout-help {
  margin-top: 8px;
  text-align: center;
  font: var(--fw-regular) 11.5px/1.4 var(--font-body);
  color: var(--fg-3);
}

/* ---- Driver Map view (Phase 17) -----------------------------------
 * Full-screen Leaflet canvas with a floating top sheet ("up next" stop)
 * + Open-in-Maps button + bottom nav. The map fills the viewport above
 * the 72px bottom nav; sheet + button float above the canvas via fixed
 * positioning.
 */
.mp-dm-root {
  background: var(--bg-page);
  color: var(--fg-1);
  min-height: 100vh;
  position: relative;
}
.mp-dm-shell {
  position: relative;
  width: 100%;
  height: 100vh;
  /* Trim the viewport by the bottom nav so the map canvas doesn't
     extend behind the nav (Leaflet doesn't deal gracefully with
     overflow-hidden parents that change height). */
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}
.mp-dm-shell.error {
  padding: 32px 24px;
}
.mp-dm-error {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--status-issue-bg);
  border: 1px solid var(--status-issue-bd);
  border-radius: var(--r-md);
  color: var(--status-issue-fg);
  font: var(--fw-medium) var(--fs-sm)/1.4 var(--font-body);
}
.mp-dm-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--accent-300);
  font: var(--fw-semi) var(--fs-sm)/1 var(--font-body);
  text-decoration: none;
}
.mp-dm-back-link:hover { text-decoration: underline; }

.mp-dm-canvas {
  width: 100%;
  height: 100%;
  background: var(--bg-card-2);
  /* Phase-35 fix: establish a NEW stacking context so Leaflet's
   * panes (tile=200, marker=600, control=1000) are scoped HERE
   * instead of leaking onto the global context. Without this,
   * Leaflet's tiles cover the floating chrome (z-index 30) during
   * pan, AND the map can overlay other tabs during SPA navigation
   * because iOS Safari briefly keeps both DOMs alive in transition.
   * `position: relative; z-index: 0` is the minimal way to get
   * stacking-context isolation without changing layout.
   */
  position: relative;
  z-index: 0;
}

.mp-dm-sheet {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  box-shadow: var(--shadow-pop, 0 8px 24px rgba(0,0,0,.25));
  text-decoration: none;
  z-index: 30;
}
.mp-dm-sheet:hover { background: color-mix(in srgb, var(--bg-card) 70%, var(--bg-input)); }
.mp-dm-sheet-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mp-dm-sheet-text {
  flex: 1;
  min-width: 0;
}
.mp-dm-sheet-eyebrow {
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
}
.mp-dm-sheet-title {
  margin: 4px 0 0;
  font: var(--fw-bold) 16px/1.2 var(--font-display);
  color: var(--fg-1);
  letter-spacing: -0.01em;
}

.mp-dm-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.mp-dm-empty-msg {
  font: var(--fw-medium) 14px/1.4 var(--font-body);
  color: var(--fg-3);
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin-bottom: 8px;
}

.mp-dm-mapsbtn {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--fg-1);
  font: var(--fw-semi) 13px/1 var(--font-display);
  text-decoration: none;
  box-shadow: var(--shadow-pop, 0 8px 24px rgba(0,0,0,.25));
  z-index: 30;
}
.mp-dm-mapsbtn:hover {
  background: var(--accent-500);
  color: #0f172a;
  border-color: transparent;
}
.mp-dm-mapsbtn-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

/* Phase-34 Recenter button — floating 44px circle at the right edge,
 * stacked above the Open-in-Maps button. Sits clear of both the
 * up-next sheet at the top and the bottom nav. Polled position
 * updates (Phase 33) DON'T auto-recenter — this button is the
 * explicit opt-in so a driver who zoomed in to inspect a stop isn't
 * whiplashed back to overview every 45s. */
.mp-dm-recenter {
  position: fixed;
  right: 12px;
  bottom: calc(150px + env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  color: var(--fg-1);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-pop, 0 4px 12px rgba(0, 0, 0, 0.2));
  z-index: 31;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.mp-dm-recenter:hover {
  background: var(--accent-500);
  color: #0f172a;
  border-color: transparent;
}
.mp-dm-recenter:active {
  transform: scale(0.95);
}

/* When the You-are-here chip ALSO sits at this height, the chip
 * floats left-anchored and the recenter button right-anchored — they
 * don't overlap on any reasonable phone width. Just keep both on the
 * same vertical band so they read as a pair. */

/* The "You are here" pin + freshness chip + 45s polling shipped in
 * Phases 24/33/34 were ripped out in Phase 37 — gps.js only fires
 * on the Stops tab (where #haulbase-gps-bus is rendered), so on the
 * Map tab the pin always showed a stale snapshot from whenever the
 * Stops tab was last open. Dispatchers monitor positions via the
 * dedicated /map page (15s ping cadence) — the Driver Map is for the
 * DRIVER's view, not for dispatcher monitoring. The associated
 * `.mp-dm-self-pin` / `.mp-dm-self-chip` classes were here; deleted. */

/* ---- Stop Detail screen (Phase 13) ---------------------------------
 * Phone-shaped column shell that mirrors the Clock-In + End-of-Day
 * gateway shells. Hero + mini-map + info-block + action row.
 */
.mp-sd-root {
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--fg-1);
  display: flex;
  justify-content: center;
}
.mp-sd-shell {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  padding: 16px 16px 32px;
  display: flex;
  flex-direction: column;
}
.mp-sd-error {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--status-issue-bg);
  border: 1px solid var(--status-issue-bd);
  border-radius: var(--r-md);
  color: var(--status-issue-fg);
  font: var(--fw-medium) var(--fs-sm)/1.4 var(--font-body);
}

.mp-sd-back {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 12px;
  color: var(--fg-2);
  font-weight: var(--fw-medium);
  text-decoration: none;
}
.mp-sd-back-icon { color: var(--fg-2); }
.mp-sd-back-label { font: var(--fw-medium) 13px/1 var(--font-body); color: var(--fg-3); }
.mp-sd-back:hover .mp-sd-back-label { color: var(--fg-1); }
.mp-sd-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--accent-300);
  font: var(--fw-semi) var(--fs-sm)/1 var(--font-body);
  text-decoration: none;
}
.mp-sd-back-link:hover { text-decoration: underline; }

.mp-sd-hero {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.mp-sd-hero-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--accent-500);
  color: #0f172a;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.mp-sd-hero-badge.complete {
  background: var(--status-complete-fg);
}
.mp-sd-hero-badge-num {
  font: var(--fw-bold) 16px/1 var(--font-display);
}
.mp-sd-hero-badge-icon { color: #0f172a; }
.mp-sd-hero-body { flex: 1; min-width: 0; }
.mp-sd-hero-title {
  margin: 0;
  font: var(--fw-bold) 22px/1.1 var(--font-display);
  letter-spacing: -0.015em;
  color: var(--fg-1);
}
.mp-sd-hero-addr-1 {
  font: var(--fw-regular) 13.5px/1.4 var(--font-body);
  color: var(--fg-2);
  margin-top: 6px;
}
.mp-sd-hero-addr-2 {
  font: var(--fw-regular) 12.5px/1.4 var(--font-body);
  color: var(--fg-3);
}
.mp-sd-hero-pills {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.mp-sd-map-wrap {
  position: relative;
  margin-bottom: 14px;
}
.mp-sd-map {
  height: 140px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-1);
  background: var(--bg-card-2);
  position: relative;
  overflow: hidden;
}
.mp-sd-map-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -100%) rotate(-45deg);
  background: var(--accent-500);
  border: 2px solid #0f172a;
  box-shadow: var(--shadow-pin);
}
/* Phase-15 fallback overlay — sits above the schematic SVG when the
 * address isn't geocoded. Tells the driver the pin is decorative
 * without making the empty rectangle look like a broken map. */
.mp-sd-map-fallback .mp-sd-map-nogeo {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 4px 6px;
}
/* Leaflet-mounted .mp-sd-map needs explicit height since Leaflet
 * inserts its own children rather than the schematic SVG. The base
 * .mp-sd-map rule above already sets height: 140px which Leaflet
 * inherits — no override needed. */
.mp-sd-map-cta {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 7px 10px;
  font: var(--fw-semi) 11px/1 var(--font-body);
  color: var(--fg-1);
  display: flex;
  gap: 6px;
  align-items: center;
  text-decoration: none;
}
.mp-sd-map-cta:hover {
  background: var(--accent-500);
  color: #0f172a;
  border-color: transparent;
}

.mp-sd-info {
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 4px 14px;
  margin-bottom: 14px;
}

/* Phase 2 — unit serial capture on the driver stop page. */
.mp-sd-serial {
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 14px;
  margin-bottom: 14px;
}
.mp-sd-serial-label {
  font: var(--fw-semi) 13px/1.2 var(--font-body);
  color: var(--fg-2);
  margin-bottom: 8px;
}
.mp-sd-serial-logged {
  font: var(--fw-semi) 12px/1.2 var(--font-body);
  color: var(--accent-500);
  margin-bottom: 8px;
}
.mp-sd-serial-row {
  display: flex;
  gap: 8px;
}
.mp-sd-serial-input {
  flex: 1;
  min-width: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 12px;
  color: var(--fg-1);
  font-size: 16px; /* 16px keeps iOS from zooming on focus */
}
.mp-sd-serial-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-500);
  color: #0a0f1c;
  border: 0;
  border-radius: var(--r-md);
  padding: 0 16px;
  font: var(--fw-bold) 13px/1 var(--font-body);
  cursor: pointer;
  white-space: nowrap;
}
.mp-sd-serial-error {
  margin-top: 8px;
  color: #fb7185;
  font-size: 12.5px;
}
.mp-sd-info-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-1);
}
.mp-sd-info-row:last-child { border-bottom: 0; }
.mp-sd-info-label {
  width: 90px;
  font: var(--fw-semi) 10px/1.2 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  padding-top: 2px;
  flex-shrink: 0;
}
.mp-sd-info-val {
  flex: 1;
  font: var(--fw-regular) 13px/1.4 var(--font-body);
  color: var(--fg-1);
}
.mp-sd-info-val.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-300);
}

.mp-sd-secondaries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.mp-sd-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  color: var(--fg-2);
  text-decoration: none;
  font: var(--fw-semi) 13px/1 var(--font-body);
}
.mp-sd-secondary:hover {
  background: var(--bg-input);
  color: var(--fg-1);
}
.mp-sd-secondary.alert {
  background: var(--status-issue-bg);
  color: var(--status-issue-fg);
  border-color: var(--status-issue-bd);
}
.mp-sd-secondary.alert:hover {
  filter: brightness(1.15);
}

.mp-sd-primary {
  width: 100%;
  padding: 16px;
  border-radius: var(--r-lg);
  font: var(--fw-bold) 14px/1 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 120ms ease, transform 80ms ease;
}
.mp-sd-primary.onsite {
  background: var(--accent-500);
  color: #0f172a;
  box-shadow: var(--shadow-glow-amber);
}
.mp-sd-primary.onsite:hover { background: var(--brand-cta-hover); }
.mp-sd-primary.scheduled {
  background: var(--bg-card);
  border-color: var(--accent-500);
  color: var(--accent-300);
}
.mp-sd-primary.scheduled:hover {
  background: var(--accent-500);
  color: #0f172a;
}
.mp-sd-primary.complete {
  background: var(--bg-card);
  border-color: var(--border-2);
  color: var(--fg-1);
  text-transform: none;
  letter-spacing: 0;
  font: var(--fw-semi) 13px/1 var(--font-display);
  padding: 14px;
}
.mp-sd-primary:active { transform: translateY(1px); }
