/* Driver PWA — served per-route from /route-css/driver-portal.css (sync-route-css + _app.js). */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
  html, body { background: var(--color-background); }
  .app { min-height: 100vh; background: var(--color-background); color: var(--color-foreground); font-family: var(--font-body); max-width: 430px; margin: 0 auto; display: flex; flex-direction: column; position: relative; }
  .header { padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
  /* Logo + driver chip keep mono — brand/ID elements */
  .logo { font-family: var(--font-mono); font-size: 12px; color: var(--color-text-secondary); letter-spacing: 0.08em; white-space: nowrap; }
  .driver-chip { font-family: var(--font-mono); font-size: 11px; color: var(--color-accent); background: #1f1900; border: 1px solid #3a3000; min-width: 44px; max-width: 108px; min-height: 44px; padding: 0 10px; border-radius: 999px; letter-spacing: 0.06em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; touch-action: manipulation; }
  .driver-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .driver-icon-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--color-border); background: var(--color-card); color: var(--color-text-secondary); cursor: pointer; touch-action: manipulation; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s; }
  .driver-icon-btn--info { border-color: var(--color-info-border); background: var(--color-info-bg); color: var(--color-info); }
  .driver-icon-btn:active { transform: scale(0.96); background: var(--color-card-pressed); color: var(--color-foreground); }
  .driver-icon-btn:focus-visible,
  .driver-chip:focus-visible,
  .notif-bell:focus-visible,
  .driver-quick-action:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
  .main-content { flex: 1; overflow-y: auto; padding-bottom: 80px; position: relative; }
  .ptr-indicator { display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; transition: height 0.2s ease; height: 0; }
  /* ptr-spinner: use CSS variable, not hardcoded dark amber */
  .ptr-spinner { width: 24px; height: 24px; border: 3px solid var(--color-border); border-top-color: var(--color-accent); border-radius: 50%; animation: ptrSpin 0.6s linear infinite; }
  .ptr-text { font-family: var(--font-body); font-size: 12px; color: var(--color-text-secondary); margin-top: 6px; }
  @keyframes ptrSpin { to { transform: rotate(360deg); } }
  .screen { padding: 24px 24px 16px; animation: fadeUp 0.25s ease both; }
  @keyframes fadeUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: none; } }
  /* Apple Large Title: 34px, -0.5px tracking */
  .screen-title { font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: -0.5px; margin-bottom: 4px; }
  .screen-sub { font-size: 14px; color: var(--color-text-secondary); margin-bottom: 24px; }
  /* Field labels: system font, sentence-case feel */
  .field-label { font-family: var(--font-body); font-size: 13px; color: var(--color-text-secondary); margin-bottom: 8px; display: block; }
  .field-group { margin-bottom: 18px; }
  select, input[type=text], input[type=number], input[type=date], input[type=tel], input[type=password], textarea {
    width: 100%; background: var(--color-input-bg); border: 1px solid #3a3a3a; color: var(--color-foreground);
    font-family: var(--font-body); font-size: 16px; padding: 13px 16px;
    border-radius: 10px; outline: none; appearance: none; -webkit-appearance: none; transition: border-color 0.2s;
  }
  select:focus, input:focus, textarea:focus { border-color: var(--color-accent); }
  select option { background: var(--color-input-bg); }
  textarea { resize: none; }
  .amount-wrap { position: relative; }
  .amount-prefix { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 600; color: var(--color-accent); }
  .amount-wrap input { padding-left: 32px; font-size: 26px; font-weight: 700; }
  .expense-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
  .expense-tile { background: var(--color-card); border: 1.5px solid var(--color-border); border-radius: 14px; padding: 18px 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: all 0.15s; user-select: none; box-shadow: none; width: 100%; font-family: inherit; color: var(--color-foreground); min-height: 44px; }
  .expense-tile:active { transform: scale(0.95); }
  .expense-tile.selected { border-color: var(--color-accent); background: #1f1900; box-shadow: none; }
  .expense-tile.selected .tile-label { color: var(--color-accent); }
  .tile-icon { font-size: 26px; transition: transform 0.15s; }
  .expense-tile.selected .tile-icon { transform: scale(1.1); }
  /* Tile labels: system font, not mono */
  .tile-label { font-family: var(--font-body); font-size: 11px; color: var(--color-text-secondary); transition: color 0.15s; }
  .photo-zone { border: 1.5px dashed #2a2a2a; border-radius: 14px; padding: 32px 20px; text-align: center; cursor: pointer; transition: all 0.2s; margin-bottom: 8px; background: var(--color-card); width: 100%; font-family: inherit; color: var(--color-foreground); display: block; }
  .photo-zone:active { transform: scale(0.98); }
  .photo-zone.has-photo { border-style: solid; border-color: var(--color-accent); padding: 0; overflow: hidden; box-shadow: none; }
  .photo-preview { width: 100%; border-radius: 12px; display: block; max-height: 220px; object-fit: cover; }
  .photo-icon { font-size: 36px; margin-bottom: 10px; }
  .photo-text { font-size: 14px; color: var(--color-text-tertiary); line-height: 1.5; }
  .photo-text strong { color: var(--color-text-secondary); display: block; font-size: 15px; margin-bottom: 4px; }
  .retake-btn { width: 100%; background: transparent; border: none; font-family: var(--font-body); font-size: 13px; color: var(--color-text-secondary); padding: 14px; cursor: pointer; min-height: 44px; }
  .retake-btn:active { color: var(--color-accent); }
  /* Primary button: 17px semibold, 14px radius — matches iOS CTA */
  .btn-primary { width: 100%; background: var(--color-accent); border: none; color: var(--color-background); font-family: var(--font-body); font-size: 17px; font-weight: 600; padding: 16px; border-radius: 14px; cursor: pointer; transition: all 0.15s; margin-top: 6px; box-shadow: none; touch-action: manipulation; }
  .btn-primary:active { transform: scale(0.98); background: #d4911a; }
  .btn-primary:disabled { background: var(--color-input-bg); color: var(--color-text-secondary); cursor: not-allowed; transform: none; box-shadow: none; }
  .btn-secondary { width: 100%; background: transparent; border: 1px solid #2a2a2a; color: #888; font-family: var(--font-body); font-size: 15px; padding: 14px; border-radius: 14px; cursor: pointer; transition: all 0.15s; margin-top: 10px; touch-action: manipulation; }
  /* Back button: system font */
  .btn-back { background: transparent; border: none; color: var(--color-text-secondary); font-family: var(--font-body); font-size: 13px; cursor: pointer; padding: 12px 14px; border-radius: 6px; transition: all 0.15s; min-height: 44px; }
  .btn-back:active { background: var(--color-input-bg); color: var(--color-accent); }
  .progress-wrap { padding: 20px 24px 0; }
  .progress-steps { display: flex; gap: 6px; margin-bottom: 10px; list-style: none; padding: 0; }
  .progress-step { flex: 1; height: 3px; border-radius: 2px; background: var(--color-border); transition: background 0.4s; }
  .progress-step.done { background: var(--color-accent); }
  .progress-step.current { background: linear-gradient(90deg, var(--color-accent), var(--color-border)); }
  .step-info { display: flex; align-items: center; justify-content: space-between; }
  /* Step labels: system font */
  .step-label { font-family: var(--font-body); font-size: 12px; color: var(--color-text-tertiary); }
  .review-card { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; margin-bottom: 18px; box-shadow: none; }
  .review-photo { width: 100%; height: 160px; object-fit: cover; display: block; }
  .review-no-photo { height: 80px; background: var(--color-input-bg); display: flex; align-items: center; justify-content: center; font-size: 28px; }
  .review-rows { padding: 4px 16px; }
  .review-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--color-input-bg); }
  .review-row:last-child { border-bottom: none; }
  /* Review keys: system font for iOS-style list rows */
  .review-key { font-family: var(--font-body); font-size: 13px; color: var(--color-text-secondary); }
  .review-val { font-size: 14px; font-weight: 500; }
  .review-amount { font-size: 24px; font-weight: 700; color: var(--color-accent); }
  .success-screen { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; text-align: center; animation: fadeUp 0.4s ease both; }
  /* Success icon: use CSS variables, not hardcoded dark hex; no box-shadow (too subtle to matter, avoids dark-green rgba leak in light mode) */
  .success-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--color-success-bg); border: 2px solid var(--color-success-border); display: flex; align-items: center; justify-content: center; font-size: 30px; margin-bottom: 24px; }
  .success-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
  .success-sub { font-size: 14px; color: var(--color-text-secondary); line-height: 1.6; max-width: 260px; margin: 0 auto 24px; }
  /* Ref code: keep mono — it IS a data string */
  .ref-code { font-family: var(--font-mono); font-size: 13px; background: var(--color-card); border: 1px solid var(--color-border); padding: 10px 20px; border-radius: 10px; color: var(--color-text-secondary); margin-bottom: 28px; letter-spacing: 0.1em; }
  .loads-header { padding: 24px 24px 0; }
  /* Apple Large Title */
  .loads-title { font-size: 34px; font-weight: 700; margin-bottom: 4px; line-height: 1.1; letter-spacing: -0.5px; }
  .loads-sub { font-size: 14px; color: var(--color-text-secondary); }
  .driver-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 24px 12px; }
  /* Quick action buttons: system font */
  .driver-quick-action { min-height: 44px; border-radius: 12px; border: 1px solid var(--color-border); background: var(--color-input-bg); color: var(--color-text-secondary); font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; touch-action: manipulation; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s; }
  .driver-quick-action--info { border-color: var(--color-info-border); background: var(--color-info-bg); color: var(--color-info); }
  .driver-quick-action:active { transform: scale(0.98); background: var(--color-card-pressed); color: var(--color-foreground); }
  .loads-filters { display: flex; gap: 8px; padding: 16px 24px 0; flex-wrap: wrap; }
  /* Filter pills: system font, no letter-spacing */
  .loads-pill { font-family: var(--font-body); font-size: 12px; font-weight: 500; padding: 8px 14px; border-radius: 20px; cursor: pointer; color: var(--color-text-secondary); background: var(--color-input-bg); border: 1px solid #3a3a3a; transition: all 0.15s; user-select: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
  .loads-pill:active { transform: scale(0.96); }
  .loads-pill.active { background: var(--color-primary); color: var(--color-card); border-color: var(--color-primary); }
  .loads-pill .pill-count { font-size: 10px; opacity: 0.7; }
  .loads-list { padding: 16px 24px; display: flex; flex-direction: column; gap: 14px; }
  .load-card { background: var(--color-card); border-radius: 14px; cursor: pointer; padding: 16px; position: relative; border-left: 3px solid var(--color-text-tertiary); box-shadow: none; transition: transform 0.12s, background 0.5s; }
  .load-card.load-flash { animation: loadFlash 1.5s ease-out; }
  @keyframes loadFlash { 0% { background: #2a2000; box-shadow: 0 0 12px rgba(232,160,32,0.3); } 100% { background: var(--color-card); box-shadow: none; } }
  .load-card:active { transform: scale(0.985); }
  .load-card.status-upcoming { border-left-color: var(--color-accent); border: 1px solid rgba(232,160,32,0.15); border-left: 3px solid var(--color-accent); }
  .load-card.status-active { border-left-color: var(--color-success); border: 1px solid rgba(93,212,95,0.15); border-left: 3px solid var(--color-success); }
  .load-card.status-in_transit { border-left-color: var(--color-info); border: 1px solid rgba(91,168,212,0.15); border-left: 3px solid var(--color-info); }
  .load-card.status-completed { border-left-color: var(--color-text-tertiary); border: 1px solid var(--color-border); border-left: 3px solid var(--color-text-tertiary); }
  .load-card.driver-paid { background: #0f2a10; border: 1px solid #2a6b18; border-left: 3px solid var(--color-success); }
  /* Paid badge: system font, no letter-spacing */
  .lc-paid-badge { font-family: var(--font-body); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: var(--color-success); color: #021; flex-shrink: 0; margin-left: 6px; }
  /* BOL-uploaded badge: outlined green so it reads as a checkmark without competing with the solid PAID badge */
  .lc-bol-badge { font-family: var(--font-body); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: var(--color-status-active-bg); color: var(--color-success); border: 1px solid var(--color-status-active-border); flex-shrink: 0; margin-left: 6px; display: inline-flex; align-items: center; gap: 4px; }
  .lc-row { display: flex; align-items: center; justify-content: space-between; }
  .lc-row + .lc-row { margin-top: 10px; }
  .lc-route { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
  .lc-city { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lc-arrow { font-size: 12px; color: var(--color-text-tertiary); flex-shrink: 0; }
  .lc-active-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-success); flex-shrink: 0; animation: pulse-gps 2s ease-in-out infinite; }
  /* Status badge: system font, no letter-spacing, semibold */
  .status-badge { font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: 0; padding: 3px 10px; border-radius: 20px; flex-shrink: 0; margin-left: 10px; }
  /* Load card detail row: system font for date/time */
  .lc-detail { font-family: var(--font-body); font-size: 13px; color: var(--color-text-secondary); display: flex; align-items: center; gap: 4px; }
  .lc-rate { font-size: 16px; font-weight: 700; color: var(--color-foreground); }
  /* Miles: keep mono — it's a data value */
  .lc-miles { font-family: var(--font-mono); font-size: 12px; color: var(--color-text-tertiary); }
  .empty-state { padding: 60px 24px; text-align: center; }
  .empty-icon { font-size: 40px; margin-bottom: 12px; }
  .empty-text { font-size: 15px; color: var(--color-text-tertiary); }
  .sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 20; animation: fadeIn 0.2s ease; }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .load-detail-overlay { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; max-height: 92vh; background: var(--color-background); z-index: 25; overflow-y: auto; animation: slideUp 0.3s cubic-bezier(.4,0,.2,1); border-radius: 20px 20px 0 0; padding-bottom: 40px; -webkit-overflow-scrolling: touch; }
  /* Sheet handle: 5px tall, rgba color adapts to both themes */
  .sheet-handle { width: 36px; height: 5px; border-radius: 2.5px; background: rgba(255,255,255,0.18); margin: 10px auto 0; }
  /* Detail header: frosted glass — Apple's iconic sticky header treatment */
  .detail-header { padding: 16px 24px 14px; display: flex; align-items: center; gap: 14px; border-bottom: 0.5px solid rgba(255,255,255,0.06); position: sticky; top: 0; background: rgba(15,15,15,0.88); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8); z-index: 2; border-radius: 20px 20px 0 0; }
  .detail-back { background: var(--color-input-bg); border: none; color: var(--color-foreground); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .detail-back:active { background: #252525; }
  .detail-title { font-size: 18px; font-weight: 700; }
  .detail-section { padding: 20px 24px 0; }
  /* Section labels: system font, uppercase OK for iOS grouped-list headers */
  .detail-section-label { font-family: var(--font-body); font-size: 11px; color: var(--color-text-tertiary); text-transform: uppercase; margin-bottom: 12px; }
  .detail-route { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 14px; padding: 16px; margin-bottom: 20px; }
  .detail-stop { margin-bottom: 14px; }
  .detail-stop:last-child { margin-bottom: 0; }
  .detail-stop-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
  /* Stop labels: system font, semibold, uppercase */
  .detail-stop-label { font-family: var(--font-body); font-size: 11px; font-weight: 600; text-transform: uppercase; }
  .detail-stop-label.pickup { color: var(--color-accent); }
  .detail-stop-label.delivery { color: var(--color-success); }
  .detail-city { font-size: 16px; font-weight: 700; }
  .detail-addr { font-size: 13px; color: #888; margin-top: 2px; line-height: 1.4; }
  /* Timestamps: keep mono — they are data values */
  .detail-time { font-family: var(--font-mono); font-size: 12px; color: #888; margin-top: 4px; }
  .detail-divider { height: 1px; background: var(--color-border); margin: 12px 0; }
  .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
  .detail-card { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 10px; padding: 12px 14px; }
  /* Card labels: system font, uppercase for iOS stat cards */
  .detail-card-label { font-family: var(--font-body); font-size: 11px; color: var(--color-text-tertiary); text-transform: uppercase; }
  .detail-card-val { font-size: 18px; font-weight: 700; margin-top: 4px; }
  .detail-card-val.amber { color: var(--color-accent); }
  .detail-card-val.sm { font-size: 13px; font-weight: 500; color: var(--color-foreground); line-height: 1.4; }
  .detail-card.full { grid-column: 1 / -1; }
  /* VIN strings in detail: keep mono — they are VIN codes */
  .vin-list { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
  .vin-item { font-family: var(--font-mono); font-size: 12px; color: #888; letter-spacing: 0.04em; background: var(--color-input-bg); padding: 6px 10px; border-radius: 6px; }
  /* Trip action buttons: 17px semibold matches iOS CTA style */
  .trip-action-btn { width: 100%; border: none; font-family: var(--font-body); font-size: 17px; font-weight: 600; padding: 16px; border-radius: 14px; cursor: pointer; margin-bottom: 12px; transition: all 0.15s; }
  .trip-action-btn:active { transform: scale(0.98); }
  .trip-action-btn.start { background: var(--color-accent); color: var(--color-background); }
  /* Semantic CSS variables (not hardcoded dark hex) so these adapt to the light theme. */
  .trip-action-btn.deliver { background: var(--color-success-bg); border: 1px solid var(--color-success-border); color: var(--color-success); }
  .trip-action-btn.navigate { background: var(--color-info-bg); border: 1px solid var(--color-info-border); color: var(--color-info); margin-bottom: 12px; }
  /* In-progress / completed banners: system font */
  .trip-in-progress { background: var(--color-success-bg); border: 1px solid var(--color-success-border); border-radius: 12px; padding: 12px 16px; font-family: var(--font-body); font-size: 13px; color: var(--color-success); margin-bottom: 12px; }
  .trip-completed { background: var(--color-input-bg); border: 1px solid var(--color-border); border-radius: 12px; padding: 12px 16px; text-align: center; font-family: var(--font-body); font-size: 13px; color: var(--color-text-secondary); margin-bottom: 24px; }
  .instructions-box { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; font-size: 14px; color: var(--color-foreground); line-height: 1.6; }
  .empty-state { padding: 60px 24px; text-align: center; }
  .empty-icon { font-size: 36px; color: #222; margin-bottom: 12px; }
  .empty-text { font-size: 15px; color: var(--color-text-tertiary); }
  /* Loading text: system font */
  .loading-text { padding: 40px 24px; text-align: center; font-family: var(--font-body); font-size: 13px; color: var(--color-text-tertiary); }
  .skeleton-card { background: var(--color-card); border-radius: 14px; padding: 16px; border-left: 3px solid var(--color-border); box-shadow: none; }
  .skeleton-line { height: 12px; background: linear-gradient(90deg, var(--color-input-bg) 0%, #222 50%, var(--color-input-bg) 100%); background-size: 200% 100%; border-radius: 4px; animation: skeletonShimmer 1.4s ease-in-out infinite; }
  .skeleton-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .skeleton-row + .skeleton-row { margin-top: 10px; }
  @keyframes skeletonShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
  .error-box { padding: 12px 16px; font-size: 13px; color: var(--color-error); background: var(--color-error-bg); border: 1px solid var(--color-error-border); border-radius: 10px; margin-bottom: 16px; }

  /* BOTTOM NAV — frosted glass: the single most recognisable iOS UI element */
  .bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; background: rgba(13,13,13,0.85); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8); border-top: 0.5px solid rgba(255,255,255,0.06); display: flex; padding: 12px 0 calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 10; }
  .nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; padding: 4px 0; min-height: 44px; justify-content: center; background: none; border: none; font-family: inherit; color: inherit; }
  .nav-icon { font-size: 22px; color: var(--color-text-secondary); transition: color 0.15s; }
  /* Nav labels: system font, 10px, Title Case (no uppercase), no letter-spacing */
  .nav-label { font-family: var(--font-body); font-size: 10px; font-weight: 400; color: var(--color-text-secondary); letter-spacing: 0; transition: color 0.15s; }
  /* Active tab: tint icon + label amber; label gets medium weight */
  .nav-item.active .nav-icon { color: var(--color-accent); }
  .nav-item.active .nav-label { color: var(--color-accent); font-weight: 500; }

  /* TOAST — system material blur, no amber branding */
  .toast { position: fixed; top: calc(20px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); max-width: 380px; width: calc(100% - 48px); z-index: 50; background: rgba(30,30,30,0.92); backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6); color: var(--color-foreground); font-family: var(--font-body); font-size: 14px; font-weight: 500; padding: 13px 18px; border-radius: 14px; border: none; text-align: center; letter-spacing: 0; box-shadow: 0 4px 20px rgba(0,0,0,0.4); animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards; pointer-events: none; }
  @keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
  @keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

  /* GPS TRACKING */
  .tracking-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-success); margin-left: 8px; flex-shrink: 0; animation: pulse-gps 2s ease-in-out infinite; }
  @keyframes pulse-gps { 0%, 100% { box-shadow: 0 0 0 0 rgba(93,212,95,0.5); } 50% { box-shadow: 0 0 0 6px rgba(93,212,95,0); } }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

  /* INFO TAB */
  .info-header { padding: 24px 24px 0; }
  .info-profile { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
  /* Avatar initials: keep mono — brand/identity mark */
  .info-avatar { width: 48px; height: 48px; border-radius: 50%; background: #1f1900; border: 2px solid #3a3000; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 16px; color: var(--color-accent); font-weight: 600; flex-shrink: 0; }
  .info-profile-text { flex: 1; }
  .info-profile-name { font-size: 18px; font-weight: 700; }
  /* Profile subtitle: system font */
  .info-profile-sub { font-family: var(--font-body); font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
  .info-section { margin: 0 24px 16px; }
  .info-section-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
  .info-section-icon { font-size: 16px; }
  /* Section label: system font, uppercase OK for iOS grouped-list header */
  .info-section-label { font-family: var(--font-body); font-size: 11px; color: var(--color-text-secondary); text-transform: uppercase; }
  .contact-card { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; box-shadow: none; }
  .contact-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--color-input-bg); text-decoration: none; cursor: pointer; transition: background 0.1s; }
  .contact-row:last-child { border-bottom: none; }
  .contact-row:active { background: var(--color-input-bg); }
  .contact-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex-shrink: 0; }
  /* Semantic CSS variables so contact-icon swatches adapt to the light theme. */
  .ci-red   { background: var(--color-error-bg);   color: var(--color-error); }
  .ci-blue  { background: var(--color-info-bg);    color: var(--color-info); }
  .ci-amber { background: var(--color-warning-bg); color: var(--color-warning); }
  .ci-green { background: var(--color-success-bg); color: var(--color-success); }
  .contact-info { flex: 1; }
  .contact-name { font-size: 14px; font-weight: 600; color: var(--color-foreground); }
  /* Phone number: keep mono — it's a data string */
  .contact-number { font-family: var(--font-mono); font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
  /* Call button: system font, semibold */
  .call-btn { background: var(--color-success-bg); border: 1px solid var(--color-success-border); color: var(--color-success); font-family: var(--font-body); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 10px; text-decoration: none; transition: all 0.15s; }
  .call-btn:active { background: var(--color-success-border); }
  .info-card { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 14px; padding: 4px 16px; box-shadow: none; }
  .info-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--color-input-bg); }
  .info-row:last-child { border-bottom: none; }
  /* Info row labels: system font — matches iOS Settings-style list */
  .info-label { font-family: var(--font-body); font-size: 13px; color: var(--color-text-secondary); }
  .info-val { font-size: 13px; font-weight: 500; color: var(--color-foreground); }
  .logout-btn { display: block; margin: 28px 24px 40px; width: calc(100% - 48px); background: var(--color-input-bg); border: 1px solid var(--color-border-strong); color: var(--color-text-secondary); font-family: var(--font-body); font-size: 14px; padding: 14px; border-radius: 14px; cursor: pointer; text-align: center; transition: all 0.15s; }
  .logout-btn:active { background: var(--color-error-bg); border-color: var(--color-error-border); color: var(--color-error); }

  /* FLEET */
  .fleet-card { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 14px; padding: 16px; margin: 0 24px 12px; box-shadow: none; }
  .fleet-unit { font-size: 18px; font-weight: 700; color: var(--color-accent); margin-bottom: 10px; }
  .fleet-edit-form { display: flex; flex-direction: column; gap: 6px; }
  /* Fleet edit labels: system font */
  .fleet-edit-label { font-family: var(--font-body); font-size: 11px; color: var(--color-text-secondary); text-transform: uppercase; margin-top: 2px; }
  .fleet-edit-row { display: flex; gap: 6px; }
  .fleet-edit-input { background: var(--color-background); border: 1px solid #252525; color: var(--color-foreground); font-family: var(--font-body); font-size: 13px; padding: 8px 10px; border-radius: 8px; outline: none; width: 100%; }
  .fleet-edit-input:focus { border-color: var(--color-accent); }
  .fleet-edit-input::placeholder { color: var(--color-text-tertiary); }
  .fleet-edit-actions { display: flex; gap: 8px; margin-top: 10px; }
  .fleet-btn-cancel { flex: 1; background: var(--color-input-bg); border: 1px solid #252525; color: #888; font-family: var(--font-body); font-size: 14px; padding: 10px; border-radius: 10px; cursor: pointer; }
  .fleet-btn-cancel:active { background: #252525; }
  .fleet-btn-save { flex: 1; background: var(--color-accent); border: none; color: var(--color-background); font-family: var(--font-body); font-size: 14px; font-weight: 700; padding: 10px; border-radius: 10px; cursor: pointer; }
  .fleet-btn-save:active { background: #d4911a; }
  .fleet-btn-save:disabled { background: var(--color-input-bg); color: var(--color-text-secondary); cursor: not-allowed; }

  /* Fleet list rows */
  .fleet-list-row { display: flex; align-items: center; gap: 12px; margin: 0 24px 2px; padding: 14px 16px; background: var(--color-card); border: 1px solid var(--color-border); border-radius: 12px; cursor: pointer; transition: background 0.12s; }
  .fleet-list-row:first-of-type { margin-top: 4px; }
  .fleet-list-row:active { background: var(--color-input-bg); }
  .fleet-list-unit { font-size: 15px; font-weight: 700; color: var(--color-accent); min-width: 70px; }
  .fleet-list-info { flex: 1; min-width: 0; }
  .fleet-list-driver { font-size: 13px; font-weight: 500; color: var(--color-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Phone + revenue: keep mono — they are data values */
  .fleet-list-phone { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-secondary); text-decoration: none; display: block; }
  .fleet-list-phone:active { color: var(--color-accent); }
  .fleet-list-rev { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--color-success); white-space: nowrap; padding: 3px 8px; background: rgba(93,212,95,0.1); border-radius: 6px; }

  /* Fleet detail modal */
  .fleet-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 300; display: flex; align-items: flex-end; justify-content: center; animation: fadeUp 0.15s ease; }
  .fleet-modal { background: var(--color-card); border-radius: 20px 20px 0 0; width: 100%; max-width: 430px; max-height: 85vh; overflow-y: auto; box-shadow: 0 -4px 24px rgba(15,15,15,0.12); animation: slideUp 0.2s ease; }
  .fleet-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 12px; border-bottom: 1px solid var(--color-border); }
  .fleet-modal-title { font-size: 22px; font-weight: 700; color: var(--color-accent); }
  .fleet-modal-close { background: none; border: none; color: var(--color-text-secondary); font-size: 18px; cursor: pointer; padding: 4px 8px; }
  .fleet-modal-close:active { color: var(--color-foreground); }
  .fleet-modal-body { padding: 0 20px; }
  .fleet-modal-section { padding: 16px 0; border-bottom: 1px solid var(--color-input-bg); }
  /* Fleet modal section labels: system font */
  .fleet-modal-label { font-family: var(--font-body); font-size: 11px; color: var(--color-text-secondary); text-transform: uppercase; margin-bottom: 10px; }
  .fleet-modal-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; }
  .fleet-modal-key { font-size: 13px; color: var(--color-text-secondary); }
  .fleet-modal-val { font-size: 13px; font-weight: 600; color: var(--color-foreground); text-align: right; max-width: 60%; word-break: break-all; }
  /* .mono modifier: keep mono for data values like VINs, IDs */
  .fleet-modal-val.mono { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--color-text-secondary); }
  .fleet-modal-link { font-family: var(--font-mono); font-size: 12px; color: var(--color-accent); text-decoration: none; }
  .fleet-modal-link:active { opacity: 0.7; }
  .fleet-modal-revenue { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: rgba(93,212,95,0.08); border-radius: 10px; margin-top: 6px; }
  /* Revenue value: keep mono — it's a dollar amount */
  .fleet-modal-rev-val { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: var(--color-success); }
  .fleet-modal-footer { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--color-border); }

  /* VIN SCANNING */
  .vin-header { padding: 24px 24px 0; }
  /* VIN count: system font */
  .vin-count { font-family: var(--font-body); font-size: 13px; color: var(--color-text-secondary); margin-top: 4px; }
  .vin-scan-btn { width: calc(100% - 48px); margin: 20px 24px 0; background: linear-gradient(135deg, var(--color-accent), #d4911a); border: none; color: var(--color-background); font-family: var(--font-body); font-size: 18px; font-weight: 700; padding: 20px; border-radius: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: none; transition: all 0.15s; }
  .vin-scan-btn:active { transform: scale(0.98); }
  .vin-scanning { padding: 40px 24px; text-align: center; }
  /* VIN scanner spinner: already uses var(--color-border) — correct */
  .vin-spinner { width: 40px; height: 40px; border: 3px solid var(--color-border); border-top-color: var(--color-accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
  @keyframes spin { to { transform: rotate(360deg); } }
  /* Scanning text: system font */
  .vin-scanning-text { font-family: var(--font-body); font-size: 13px; color: var(--color-text-secondary); }
  .vin-result { margin: 20px 24px 0; }
  .vin-result-photo { width: 100%; border-radius: 14px; max-height: 180px; object-fit: cover; margin-bottom: 16px; box-shadow: none; }
  .vin-detected { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 14px; padding: 16px; margin-bottom: 16px; box-shadow: none; }
  /* Detected VIN label: system font */
  .vin-detected-label { font-family: var(--font-body); font-size: 11px; color: var(--color-text-tertiary); text-transform: uppercase; margin-bottom: 8px; }
  /* VIN input field: keep mono — the VIN string itself is data */
  .vin-detected-input { width: 100%; background: var(--color-input-bg); border: 1px solid #3a3a3a; color: var(--color-accent); font-family: var(--font-mono); font-size: 18px; font-weight: 600; padding: 12px 14px; border-radius: 10px; outline: none; letter-spacing: 0.08em; text-transform: uppercase; }
  .vin-detected-input:focus { border-color: var(--color-accent); }
  /* Confidence: system font */
  .vin-confidence { font-family: var(--font-body); font-size: 12px; color: var(--color-text-secondary); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
  .vin-conf-dot { width: 6px; height: 6px; border-radius: 50%; }
  .vin-notes { font-size: 12px; color: var(--color-text-tertiary); margin-top: 6px; }
  .vin-actions { display: flex; gap: 10px; margin-top: 16px; }
  .vin-actions .btn-primary { flex: 1; margin-top: 0; }
  .vin-actions .btn-secondary { flex: 1; margin-top: 0; padding: 14px; }
  /* VIN list header: system font, uppercase for grouped-list header */
  .vin-list-header { font-family: var(--font-body); font-size: 11px; color: var(--color-text-tertiary); text-transform: uppercase; padding: 24px 24px 8px; }
  .vin-list { padding: 0 24px 20px; display: flex; flex-direction: column; gap: 10px; }
  .vin-item { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 12px; padding: 12px; display: flex; gap: 12px; align-items: center; box-shadow: none; }
  .vin-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--color-input-bg); }
  .vin-item-info { flex: 1; min-width: 0; }
  /* VIN code itself: keep mono — it's the data string */
  .vin-item-code { font-family: var(--font-mono); font-size: 13px; color: var(--color-foreground); letter-spacing: 0.04em; }
  /* Timestamp + confidence: system font */
  .vin-item-time { font-family: var(--font-body); font-size: 12px; color: var(--color-text-tertiary); margin-top: 2px; }
  .vin-item-conf { font-family: var(--font-body); font-size: 11px; color: var(--color-text-secondary); }

  /* NOTIFICATIONS */
  .notif-bell { position: relative; cursor: pointer; padding: 0; background: var(--color-card); border: 1px solid var(--color-border); border-radius: 12px; color: inherit; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation; }
  .notif-bell-icon { font-size: 20px; color: var(--color-text-secondary); }
  /* Notification badge: system font */
  .notif-badge { position: absolute; top: -4px; right: -6px; background: var(--color-accent); color: var(--color-background); font-family: var(--font-body); font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
  .notif-item { padding: 14px 24px; border-bottom: 1px solid var(--color-input-bg); }
  .notif-item.unread { background: #1f1900; }
  .notif-item-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
  /* Notification labels: system font */
  .notif-type { font-family: var(--font-body); font-size: 11px; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; }
  .notif-date { font-family: var(--font-body); font-size: 12px; color: var(--color-text-secondary); }
  .notif-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
  .notif-body { font-size: 13px; color: #888; line-height: 1.5; }

  /* PIN LOGIN */
  .login-screen { padding: 48px 24px; animation: fadeUp 0.3s ease both; }
  /* Apple Large Title */
  .login-title { font-size: 34px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.5px; }
  .login-sub { font-size: 15px; color: var(--color-text-secondary); margin-bottom: 32px; line-height: 1.6; }
  .pin-dots { display: flex; gap: 16px; justify-content: center; margin: 24px 0; }
  .pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #333; transition: all 0.15s; }
  .pin-dot.filled { background: var(--color-accent); border-color: var(--color-accent); }
  .pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
  .pin-key { background: var(--color-input-bg); border: 1px solid #3a3a3a; border-radius: 12px; padding: 18px; font-size: 22px; font-weight: 600; font-family: inherit; text-align: center; cursor: pointer; transition: all 0.1s; user-select: none; color: var(--color-foreground); width: 100%; min-height: 44px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .pin-key:active { background: #2a2a2a; transform: scale(0.95); }
  .pin-key.delete { font-size: 16px; color: var(--color-text-secondary); }
  .pin-key.empty { background: transparent; border-color: transparent; cursor: default; }

  /* INSTALL */
  .install-screen { padding: 0; animation: fadeUp 0.3s ease both; }
  .install-hero { background: var(--color-card); border-bottom: 1px solid var(--color-input-bg); padding: 40px 24px 32px; text-align: center; }
  .install-app-icon { width: 80px; height: 80px; background: var(--color-accent); border-radius: 20px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; box-shadow: none; }
  .install-app-icon span { font-size: 36px; color: var(--color-background); }
  .install-app-name { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
  /* Install sub: system font */
  .install-app-sub { font-family: var(--font-body); font-size: 13px; color: var(--color-text-secondary); }
  .install-body { padding: 28px 24px; }
  /* Install section title: system font, uppercase */
  .install-section-title { font-family: var(--font-body); font-size: 11px; color: var(--color-text-secondary); text-transform: uppercase; margin-bottom: 16px; }
  .install-steps { display: flex; flex-direction: column; gap: 0; margin-bottom: 28px; }
  .install-step { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--color-input-bg); }
  .install-step:last-child { border-bottom: none; }
  /* Install step numbers: system font */
  .install-step-num { width: 36px; height: 36px; border-radius: 50%; background: #1f1900; border: 1.5px solid #3a3000; display: flex; align-items: center; justify-content: center; font-family: var(--font-body); font-size: 15px; color: var(--color-accent); flex-shrink: 0; font-weight: 700; }
  .install-step-content { flex: 1; padding-top: 4px; }
  .install-step-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
  .install-step-desc { font-size: 13px; color: var(--color-text-secondary); line-height: 1.5; }
  .install-step-visual { margin-top: 10px; background: var(--color-input-bg); border: 1px solid #3a3a3a; border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
  .install-step-visual-icon { font-size: 22px; flex-shrink: 0; }
  .install-step-visual-text { font-size: 13px; color: #888; font-weight: 500; }
  .install-step-visual.highlight { border-color: var(--color-accent); background: #1f1900; }
  .install-step-visual.highlight .install-step-visual-text { color: var(--color-accent); }
  .install-arrow { text-align: center; padding: 16px 0; animation: bounceDown 1.5s ease-in-out infinite; }
  @keyframes bounceDown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
  .install-arrow-icon { font-size: 32px; }

  /* UPDATE BANNER — shown when a newer build is deployed while the app is open.
     Amber accent with theme-invariant dark ink so it reads in both themes. */
  .update-banner { position: sticky; top: 0; z-index: 10; width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--color-accent); color: var(--color-accent-ink); border: none; font-family: var(--font-body); font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: none; animation: fadeUp 0.25s ease; touch-action: manipulation; min-height: 44px; }
  .update-banner svg { flex-shrink: 0; }
  .update-banner-text { flex: 1; text-align: left; }
  .update-banner-cta { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; opacity: 0.92; }
  .update-banner:active { filter: brightness(0.95); }

  /* INSTALL BANNER */
  .install-banner { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; background: #1f1900; border-top: 1px solid #3a3000; padding: 12px 20px; z-index: 8; display: flex; align-items: center; gap: 12px; animation: fadeUp 0.3s ease; }
  .install-banner-text { flex: 1; font-size: 13px; color: var(--color-accent); }
  /* Install banner button: system font */
  .install-banner-btn { background: var(--color-accent); color: var(--color-background); border: none; font-family: var(--font-body); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 8px; cursor: pointer; flex-shrink: 0; }

  /* INSTALL POPUP */
  .install-popup-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 30; display: flex; align-items: flex-end; justify-content: center; animation: fadeIn 0.2s ease; }
  .install-popup { width: 100%; max-width: 430px; background: var(--color-card); border-radius: 20px 20px 0 0; padding: 28px 24px calc(28px + env(safe-area-inset-bottom, 0px)); animation: slideUp 0.3s cubic-bezier(.4,0,.2,1); }
  .install-popup-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
  .install-popup-sub { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 20px; }
  .install-popup-steps { margin-bottom: 20px; }
  .install-popup-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
  /* Popup step numbers: system font */
  .install-popup-step-num { width: 28px; height: 28px; border-radius: 50%; background: #1f1900; border: 1px solid #3a3000; display: flex; align-items: center; justify-content: center; font-family: var(--font-body); font-size: 13px; color: var(--color-accent); font-weight: 700; flex-shrink: 0; }
  .install-popup-step-text { font-size: 14px; color: var(--color-foreground); }

  /* SPLASH */
  .splash { min-height: 100vh; background: var(--color-background); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; animation: fadeIn 0.3s ease; }
  .splash-icon { width: 88px; height: 88px; border-radius: 22px; overflow: hidden; animation: splashPulse 1.2s ease-in-out infinite; }
  .splash-icon img { width: 100%; height: 100%; object-fit: cover; }
  @keyframes splashPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
  /* Splash brand ID: keep mono — it's a product identifier mark */
  .splash-brand { font-family: var(--font-mono); font-size: 13px; color: var(--color-text-secondary); letter-spacing: 0.1em; }
  .splash-fade { animation: fadeOut 0.3s ease forwards; }
  @keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

  /* OWNER COMMAND CENTER */
  .oc-stat { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 12px; padding: 16px 18px; }
  /* Stat values: keep mono — they are numeric data */
  .oc-stat-val { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--color-foreground); }
  .oc-stat-val.green { color: var(--color-success); }
  .oc-stat-val.amber { color: var(--color-accent); }
  .oc-stat-label { font-size: 13px; color: #999; margin-top: 6px; letter-spacing: 0.03em; }
  .oc-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-success); animation: pulse-gps 1.5s ease-in-out infinite; }
  .map-marker-label { margin-top: 18px !important; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
  .gm-style-iw { background: var(--color-input-bg) !important; border-radius: 8px !important; }
  .gm-style-iw-d { overflow: hidden !important; }
  .gm-ui-hover-effect { filter: invert(1) !important; }
  .oc-load-row { display: flex; align-items: center; gap: 12px; margin: 0 24px 2px; padding: 14px 16px; background: var(--color-card); border: 1px solid var(--color-border); border-radius: 12px; cursor: pointer; transition: background 0.12s; }
  .oc-load-row:active { background: var(--color-input-bg); }
  .oc-search { width: 100%; margin-top: 12px; padding: 10px 14px; background: var(--color-card); border: 1px solid var(--color-border); border-radius: 10px; color: var(--color-foreground); font-family: var(--font-body); font-size: 14px; outline: none; }
  .oc-search:focus { border-color: var(--color-accent); }
  .oc-search::placeholder { color: #777; }
  .oc-driver-row { display: flex; align-items: center; gap: 12px; margin: 0 24px 2px; padding: 14px 16px; background: var(--color-card); border: 1px solid var(--color-border); border-radius: 12px; cursor: pointer; transition: background 0.12s; }
  .oc-driver-row:active { background: var(--color-input-bg); }
  /* Driver avatar: keep mono — brand/identity mark */
  .oc-driver-avatar { width: 40px; height: 40px; border-radius: 10px; background: #1f1900; border: 1px solid #3a3000; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 14px; color: var(--color-accent); font-weight: 600; flex-shrink: 0; }
  /* Status badge: system font, no letter-spacing */
  .oc-status-badge { font-family: var(--font-body); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 6px; letter-spacing: 0; }
  .oc-status-badge.on-trip { background: #0f2a10; border: 1px solid #2a6b18; color: var(--color-success); }
  .oc-status-badge.available { background: var(--color-input-bg); border: 1px solid #333; color: #666; }

  /* OFFLINE BANNER */
  /* System font for system status messages */
  .offline-banner { position: sticky; top: 0; z-index: 9; padding: 8px 16px; background: var(--color-error-bg, #2a0f0f); border-bottom: 1px solid var(--color-error-border, #5a2020); color: var(--color-error); font-family: var(--font-body); font-size: 13px; text-align: center; }

  /* PULL-TO-REFRESH HINT (one-time) */
  /* Use CSS variables instead of hardcoded dark-amber hex */
  .ptr-hint { padding: 8px 16px; text-align: center; font-family: var(--font-body); font-size: 13px; color: var(--color-accent); background: var(--color-warning-bg); border-bottom: 1px solid var(--color-warning-border); animation: ptrHintFade 2.4s ease forwards; pointer-events: none; }
  @keyframes ptrHintFade { 0% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; } 10% { opacity: 1; max-height: 40px; padding-top: 8px; padding-bottom: 8px; } 80% { opacity: 1; max-height: 40px; padding-top: 8px; padding-bottom: 8px; } 100% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; } }

  /* FOCUS-VISIBLE — outdoor / keyboard-friendly
   *
   * The base input/select/textarea rule above sets `outline: none` and replaces
   * the OS focus ring with a `border-color: var(--color-accent)` change for
   * mouse users. That base rule (specificity 0,1,1 — attribute selector) beats
   * globals.css `:focus-visible` (0,1,0), so keyboard users were getting no
   * visible focus ring at all (see the /login PIN-pad / phone input). The
   * explicit element + attribute selectors below restore parity for keyboard
   * users without losing the on-focus border tint.
   */
  a:focus-visible, .contact-row:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 8px; }
  select:focus-visible,
  textarea:focus-visible,
  input[type="text"]:focus-visible,
  input[type="number"]:focus-visible,
  input[type="date"]:focus-visible,
  input[type="tel"]:focus-visible,
  input[type="password"]:focus-visible,
  input[type="search"]:focus-visible,
  input[type="email"]:focus-visible,
  .fleet-edit-input:focus-visible,
  .vin-detected-input:focus-visible,
  .oc-search:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
  }

  /* Active-load hero — wrap action buttons on narrow screens (e.g. 360px) */
  .active-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
  .active-hero-actions > button { min-width: 0; }

  /* Theme-toggle discovery hint */
  @keyframes hintPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(232,160,32,0.7); } 60% { box-shadow: 0 0 0 8px rgba(232,160,32,0); } }
  @keyframes hintBubbleIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes hintBubbleOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-6px); } }
  .theme-hint-ring { animation: hintPulse 1.4s ease-in-out infinite !important; border-color: var(--color-accent) !important; }
  /* Hint bubble: keep mono — branded UI element */
  .theme-hint-bubble { position: absolute; top: calc(100% + 12px); right: -4px; background: var(--color-accent); color: #1a1a1a; padding: 10px 14px; border-radius: 12px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; white-space: nowrap; z-index: 200; cursor: pointer; box-shadow: 0 4px 20px rgba(232,160,32,0.45); letter-spacing: 0.04em; animation: hintBubbleIn 0.3s ease; user-select: none; }
  .theme-hint-bubble.dismissing { animation: hintBubbleOut 0.3s ease forwards; }
  .theme-hint-bubble::before { content: ""; position: absolute; top: -7px; right: 20px; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid var(--color-accent); }

  /* Light theme overrides — fix hardcoded dark values when theme-driver is absent */
  .app:not(.theme-driver) .bottom-nav { background: rgba(245,245,247,0.88); border-top: 0.5px solid rgba(0,0,0,0.08); }
  .app:not(.theme-driver) .sheet-handle { background: rgba(0,0,0,0.15); }
  .app:not(.theme-driver) .detail-header { background: rgba(245,245,247,0.92); border-bottom: 0.5px solid rgba(0,0,0,0.08); }
  .app:not(.theme-driver) .driver-chip { background: var(--color-input-bg); border-color: var(--color-border); }
  .app:not(.theme-driver) .expense-tile.selected { background: var(--color-input-bg); }
  /* Light mode toast: keep dark material blur — matches iOS system banners */
  .app:not(.theme-driver) .toast { background: rgba(50,50,50,0.92); color: #ffffff; }
  /* .ptr-hint override removed — base rule already uses var(--color-warning-bg/border) which self-adapts */
  .app:not(.theme-driver) .ptr-spinner { border-color: var(--color-border); border-top-color: var(--color-accent); }
  .app:not(.theme-driver) .notif-item.unread { background: var(--color-input-bg); }
  .app:not(.theme-driver) .install-banner { background: var(--color-input-bg); border-top-color: var(--color-border); }
  .app:not(.theme-driver) .install-popup-step-num { background: var(--color-input-bg); border-color: var(--color-border); }
  .app:not(.theme-driver) .install-step-num { background: var(--color-input-bg); border-color: var(--color-border); }
  .app:not(.theme-driver) .info-avatar { background: var(--color-input-bg); border-color: var(--color-border); }
  .app:not(.theme-driver) .oc-driver-avatar { background: var(--color-input-bg); border-color: var(--color-border); }
  /* Load card overrides for light theme */
  .app:not(.theme-driver) .load-card.driver-paid { background: #f0faf0; border: 1px solid #a5d6a7; border-left: 3px solid var(--color-success); }
  .app:not(.theme-driver) .lc-paid-badge { background: var(--color-success); color: #ffffff; }
  .app:not(.theme-driver) .load-card.status-active { border: 1px solid rgba(46,125,50,0.2); border-left: 3px solid var(--color-success); }
  .app:not(.theme-driver) .load-card.status-in_transit { border: 1px solid rgba(21,101,160,0.2); border-left: 3px solid var(--color-info); }
  .app:not(.theme-driver) .load-card.load-flash { animation: loadFlashLight 1.5s ease-out; }
  @keyframes loadFlashLight { 0% { background: var(--color-input-bg); box-shadow: 0 0 12px rgba(232,160,32,0.2); } 100% { background: var(--color-card); box-shadow: 0 2px 8px rgba(0,0,0,0.06); } }

/* =========================================================
 * PHASE 3 — STATUS / BUTTON / EXPENSE COLOR TOKENS
 * Consumed by inline style props in driver sub-components.
 * Dark values on .app.theme-driver; light values on .app:not(.theme-driver).
 * Inline style vars use dynamic names: var(--color-status-${s}-bg) etc.
 * =========================================================
 */
  .app.theme-driver {
    --color-status-en_route_pickup-bg:      #1a0f2a;
    --color-status-en_route_pickup-border:  #3a1a5a;
    --color-status-en_route_pickup-text:    #b07ad4;
    --color-status-arrived_pickup-bg:       #1f1900;
    --color-status-arrived_pickup-border:   #5a4500;
    --color-status-arrived_pickup-text:     #e0a020;
    --color-status-active-bg:        #0f2a10;
    --color-status-active-border:    #2a6b18;
    --color-status-active-text:      #5dd45f;
    --color-status-in_transit-bg:    #0f2a10;
    --color-status-in_transit-border:#2a6b18;
    --color-status-in_transit-text:  #5dd45f;
    --color-status-arrived_delivery-bg:     #0a1e2e;
    --color-status-arrived_delivery-border: #1a3a5a;
    --color-status-arrived_delivery-text:   #4a9fd4;
    --color-status-upcoming-bg:      #1a1a00;
    --color-status-upcoming-border:  #5a5a00;
    --color-status-upcoming-text:    #d4c420;
    --color-status-completed-bg:     #1a1a1a;
    --color-status-completed-border: #333333;
    --color-status-completed-text:   #a8a39b;
    --color-expense-approved-bg:     #0a1a0a;
    --color-expense-approved-border: #1e7e34;
    --color-expense-approved-text:   #2ecc71;
    --color-expense-rejected-bg:     #1a0a0a;
    --color-expense-rejected-border: #c0392b;
    --color-expense-rejected-text:   #e74c3c;
    --color-expense-pending-bg:      #1a1500;
    --color-expense-pending-border:  #856404;
    --color-expense-pending-text:    #d4c420;
    --color-btn-info-bg:             #0a1e2e;
    --color-btn-info-border:         #1a3a5a;
    --color-btn-accent-bg:           #1f1900;
    --color-btn-accent-border:       #3a3000;
    --color-payment-cop-text:        #b07ad4;
    --color-secondary-text:          #888888;
    --color-subtle-border:           #333333;
  }
  .app:not(.theme-driver) {
    --color-status-en_route_pickup-bg:      #f3e8fd;
    --color-status-en_route_pickup-border:  #d6b3f0;
    --color-status-en_route_pickup-text:    #6a1b9a;
    --color-status-arrived_pickup-bg:       #fff3e0;
    --color-status-arrived_pickup-border:   #ffd09e;
    --color-status-arrived_pickup-text:     #bf6000;
    --color-status-active-bg:        #e8f5e9;
    --color-status-active-border:    #a5d6a7;
    --color-status-active-text:      #2e7d32;
    --color-status-in_transit-bg:    #e8f5e9;
    --color-status-in_transit-border:#a5d6a7;
    --color-status-in_transit-text:  #2e7d32;
    --color-status-arrived_delivery-bg:     #e8f4fd;
    --color-status-arrived_delivery-border: #b3d4f0;
    --color-status-arrived_delivery-text:   #1565a0;
    --color-status-upcoming-bg:      #fff9e0;
    --color-status-upcoming-border:  #ffe082;
    --color-status-upcoming-text:    #7a6000;
    --color-status-completed-bg:     #f5f5f5;
    --color-status-completed-border: #dddddd;
    --color-status-completed-text:   #666666;
    --color-expense-approved-bg:     #e8f5e9;
    --color-expense-approved-border: #a5d6a7;
    --color-expense-approved-text:   #2e7d32;
    --color-expense-rejected-bg:     #fdecea;
    --color-expense-rejected-border: #ef9a9a;
    --color-expense-rejected-text:   #c62828;
    --color-expense-pending-bg:      #fffde7;
    --color-expense-pending-border:  #ffe082;
    --color-expense-pending-text:    #f57f17;
    --color-btn-info-bg:             #e3f2fd;
    --color-btn-info-border:         #90caf9;
    --color-btn-accent-bg:           #fffde7;
    --color-btn-accent-border:       #f9a825;
    --color-payment-cop-text:        #6a1b9a;
    --color-secondary-text:          #555555;
    --color-subtle-border:           #dddddd;
  }

/* =========================================================
 * PHASE 3 — APPLE HIG TYPE SCALE
 * .dp-* classes replace inline fontSize / fontFamily violations.
 * Font-family inherits Inter from :root — no explicit override needed.
 * letter-spacing: 0 removes the mono-era 0.04–0.08em drift on UI chrome.
 * Large Title (34px) already handled by .screen-title / .loads-title.
 * =========================================================
 */
  .dp-title3   { font-size: 20px; font-weight: 600; letter-spacing: 0; }
  .dp-body     { font-size: 17px; letter-spacing: 0; }
  .dp-callout  { font-size: 16px; letter-spacing: 0; }
  .dp-subhead  { font-size: 15px; letter-spacing: 0; }
  .dp-footnote { font-size: 13px; letter-spacing: 0; }
  .dp-caption1 { font-size: 12px; letter-spacing: 0; }
  .dp-caption2 { font-size: 11px; letter-spacing: 0; }
