/* Ai Dispatches — PHASE 3 APP LAYOUT.
   The site restructured to mirror the app's structure and ease of use:
   bottom tab bar, app Search home, app Settings rows, app Alerts /
   Trucks / States presentations. Mobile rules are gated behind
   html.vw-mobile; since Ahmed's 2026-11-24 orders the desktop view
   uses the SAME app design widened (html.vw-desktop sections below,
   incl. the desktop shell at the end of this file). The tab bar and
   the settings-home block are display:none by default and are only
   revealed inside a logged-in session. */

/* ── Bottom tab bar (app's 6 tabs) ─────────────────────────────────── */
.tabbar{display:none}
html.vw-mobile body.in-session .tabbar{
  display:flex;position:fixed;left:0;right:0;bottom:0;z-index:70;
  background:var(--card);border-top:1px solid var(--card-border);
  padding:5px 2px calc(5px + env(safe-area-inset-bottom));
  box-shadow:0 -4px 18px rgba(30,10,60,.08)}
.tab-btn{flex:1;background:none;border:none;cursor:pointer;position:relative;
  display:flex;flex-direction:column;align-items:center;gap:1px;
  padding:4px 0 3px;color:var(--gray);font-size:11px;font-family:inherit}
.tab-btn .tab-ic{display:inline-flex}
.tab-btn.active{color:var(--accent);font-weight:700}
.tab-btn.active::after{content:'';position:absolute;bottom:-1px;left:50%;
  transform:translateX(-50%);width:26px;height:3px;border-radius:2px;background:var(--accent)}
html.vw-mobile body.in-session .page{padding-bottom:96px}
html.vw-mobile .new-pill{bottom:92px}

/* ── Mobile chrome: no sideways sidebar strip, slimmer top bar ─────── */
html.vw-mobile .sidebar{display:none!important}
html.vw-mobile .topbar-inner{padding:6px 12px;gap:8px}
html.vw-mobile .topbar .balance-pill{display:none}
html.vw-mobile body:not(.in-session) .topbar .wordmark{display:none}
html.vw-mobile body:not(.in-session) .topbar-inner{justify-content:flex-end}
html.vw-mobile #homeView .hero,
html.vw-mobile #settingsView .hero{display:none}
.m-only{display:none}
html.vw-mobile .m-only{display:block}

/* ── App hero (Alerts / States tabs) ───────────────────────────────── */
.app-hero{border-radius:24px;padding:20px 16px;color:#fff;position:relative;overflow:hidden;
  background:linear-gradient(115deg,#4C2A85 0%,#2A1A52 55%,#1B1236 100%)}
.app-hero::after{content:'';position:absolute;inset:0;
  background:radial-gradient(ellipse 70% 90% at 85% 0%,rgba(168,85,247,.45),transparent 60%),
             linear-gradient(0deg,rgba(217,165,20,.14),transparent 45%)}
.app-hero .hero-text{position:relative;z-index:1}
.app-hero h1{color:#fff;font-size:24px;margin:0}
.app-hero p{color:rgba(255,255,255,.78);margin:4px 0 0}

/* ── Home (app Search screen) ──────────────────────────────────────── */
.home-toprow{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:2px}
.home-theme .th-opt{display:inline-flex;align-items:center;gap:5px}
.home-balrow{display:flex;gap:10px;align-items:center;margin-top:14px;flex-wrap:wrap}
.home-balance{background:linear-gradient(135deg,#7C3AED,#7226E8);color:#fff;border:none;
  font-size:19px;font-weight:800;padding:10px 22px;border-radius:999px;cursor:pointer;
  box-shadow:0 6px 16px rgba(114,38,232,.35);font-family:inherit}
.home-balance.center{display:block;margin:16px auto 4px}
.home-owner-chip{border:1.6px solid var(--accent);color:var(--accent);border-radius:999px;
  padding:7px 14px;font-weight:700;font-size:13.5px}
.home-wm{margin-top:18px;font-size:34px;text-align:center}
.home-title{text-align:center;font-size:29px;margin:10px 0 2px;color:var(--text)}
.home-title .accent,.home-subtitle .accent{color:var(--accent)}
.home-subtitle{text-align:center;color:var(--gray);font-weight:600;margin:0}
.home-tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}
.home-tile{background:var(--card);border:1px solid var(--card-border);border-radius:20px;
  padding:16px 10px;display:flex;flex-direction:column;align-items:center;gap:9px;
  font-weight:700;font-size:14.5px;color:var(--text);cursor:pointer;font-family:inherit}
.home-tile-ic{width:46px;height:46px;border-radius:50%;background:var(--accent);color:#fff;
  display:flex;align-items:center;justify-content:center}
.home-booked{margin-top:14px;width:100%;display:flex;align-items:center;gap:12px;
  background:linear-gradient(135deg,#7C3AED,#5B21B6);color:#fff;border:none;border-radius:22px;
  padding:16px;cursor:pointer;text-align:left;font-family:inherit}
.home-booked-ic{width:46px;height:46px;border-radius:50%;background:rgba(255,255,255,.22);
  display:flex;align-items:center;justify-content:center;flex:none}
.home-booked-tx{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}
.home-booked-tx strong{font-size:17px}
.home-booked-tx span{font-size:12.5px;opacity:.88}
.feat-row{margin-top:12px;width:100%;display:flex;align-items:center;gap:13px;
  background:var(--card);border:1px solid var(--card-border);border-left:5px solid var(--accent);
  border-radius:22px;padding:14px;cursor:pointer;text-align:left;font-family:inherit;color:var(--text)}
.feat-row-ic{width:54px;height:54px;border-radius:50%;background:var(--accent);color:#fff;
  display:flex;align-items:center;justify-content:center;flex:none}
.feat-row-tx{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}
.feat-row-name{font-size:16.5px;font-weight:800}
.feat-row-desc{font-size:13px;color:var(--gray)}
.feat-row-arrow{width:38px;height:38px;border-radius:50%;background:var(--accent);color:#fff;
  display:flex;align-items:center;justify-content:center;flex:none}

/* ── Settings (app Settings screen) ────────────────────────────────── */
.acct-banner{background:linear-gradient(135deg,#1E1445,#2C1A5E);color:#fff;border-radius:24px;
  padding:16px;margin-top:4px;position:relative;overflow:hidden}
.acct-top{display:flex;justify-content:space-between;align-items:flex-start}
.acct-ic{width:44px;height:44px;border:1.6px solid #A855F7;border-radius:12px;
  display:flex;align-items:center;justify-content:center;color:#C084FC}
.acct-soon{border:1.6px solid #D946EF;color:#F0ABFC;border-radius:999px;padding:5px 12px;
  font-weight:700;font-size:12.5px}
.acct-title{font-size:19px;font-weight:800;margin-top:10px}
.acct-sub{opacity:.78;font-size:13.5px;margin-top:2px}
.acct-bars{display:flex;align-items:flex-end;gap:6px;margin-top:12px;height:42px}
.acct-bar{width:16px;border-radius:4px 4px 0 0;background:linear-gradient(180deg,#D946EF,#7C3AED)}
.set-row{margin-top:12px;width:100%;display:flex;align-items:center;gap:12px;
  background:var(--card);border:1px solid var(--card-border);border-left:5px solid var(--accent);
  border-radius:20px;padding:13px 14px;cursor:pointer;text-align:left;font-family:inherit;color:var(--text)}
.set-row-ic{width:44px;height:44px;flex:none;display:flex;align-items:center;justify-content:center;color:var(--accent)}
.set-row-ic.tile-lav{background:#EFE9FD;border-radius:12px}
.set-row-ic.tile-purple{background:var(--accent);color:#fff;border-radius:14px}
.set-row-ic.circle-purple{background:var(--accent);color:#fff;border-radius:50%}
.set-row-tx{flex:1;display:flex;flex-direction:column;gap:1px;min-width:0}
.set-row-title{font-size:15.5px;font-weight:700}
.set-row-title.light{color:#fff}
.set-row-sub{font-size:12.5px;color:var(--gray)}
.set-row-sub.light{color:rgba(255,255,255,.78)}
.set-row-value{color:var(--accent);font-weight:600;font-size:13.5px}
.act-card{margin-top:12px;width:100%;display:flex;align-items:center;gap:12px;
  background:#221A3E;color:#fff;border:none;border-radius:20px;padding:14px;cursor:pointer;
  text-align:left;font-family:inherit}
.act-ic{width:44px;height:44px;border-radius:50%;background:#F5B301;color:#221A3E;
  display:flex;align-items:center;justify-content:center;flex:none}

/* ── Alerts tab ────────────────────────────────────────────────────── */
.alerts-card{background:var(--card);border:1px solid var(--card-border);border-radius:24px;
  margin-top:14px;overflow:hidden}
.alerts-head{display:flex;align-items:center;gap:11px;padding:13px 14px}
.alerts-head.on{background:var(--purple-soft)}
.alerts-truck-ic{width:52px;height:52px;border-radius:50%;background:var(--card);
  border:2.4px solid var(--card-border);color:var(--gray);
  display:flex;align-items:center;justify-content:center;flex:none}
.alerts-truck-ic.on{border-color:var(--accent);color:var(--accent)}
.alerts-head-mid{flex:1;min-width:0}
.alerts-head-chips{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.alerts-num{background:var(--accent);color:#fff;border-radius:9px;padding:3px 9px;
  font-weight:700;font-size:13.5px}
.alerts-onpill{background:#E5484D;color:#fff;border-radius:999px;padding:3px 10px;
  font-size:12px;font-weight:600}
.alerts-onpill.on{background:#22C55E}
.alerts-type{color:var(--gray);font-size:13.5px;margin-top:4px}
.alerts-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:12px}
.alert-chip{display:flex;align-items:center;gap:8px;border:1.6px solid var(--card-border);
  border-radius:14px;padding:9px 10px}
.alert-chip.on{border-color:var(--accent);background:var(--purple-soft)}
.alert-chip.wide{grid-column:span 2}
.alert-chip.wide .alert-chip-label{text-align:center}
.alert-chip-ic{display:inline-flex;flex:none}
.alert-chip-label{flex:1;display:flex;flex-direction:column;line-height:1.15;min-width:0}
.alert-chip-a{font-size:13.5px;font-weight:600;color:var(--text)}
.alert-chip-b{font-size:13.5px;font-weight:800}

/* ── Trucks tab cards ──────────────────────────────────────────────── */
.fleet-stats-card{background:var(--card);border:1px solid var(--card-border);
  border-radius:20px;padding:12px;margin-top:12px}
.truck-card{background:var(--card);border:1px solid var(--card-border);
  border-left:5px solid var(--accent);border-radius:22px;padding:14px;margin-top:12px}
.truck-card-head{display:flex;align-items:center;gap:10px}
.truck-card-ic{width:48px;height:48px;border-radius:50%;background:#EFE9FD;color:var(--accent);
  display:flex;align-items:center;justify-content:center;flex:none}
.truck-mode-chip{border:1.4px solid var(--card-border);border-radius:8px;padding:3px 8px;
  font-size:12px;color:var(--gray)}
.truck-del{margin-left:auto;background:none;border:none;color:#E5484D;cursor:pointer;
  padding:6px;border-radius:8px;display:inline-flex}
.truck-del.confirm{background:#E5484D;color:#fff}
.truck-booked-banner{background:#FEF3C7;color:#92400E;border-radius:10px;padding:7px 10px;
  font-weight:700;font-size:13px;margin-top:10px}
html[data-theme="dark"] .truck-booked-banner{background:#3A2E10;color:#F5C04A}
.truck-mc{font-weight:700;margin:10px 0 0}
.truck-specs{color:var(--gray);margin:3px 0 0}
.truck-loc-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:8px}
.truck-loc{color:var(--gray)}
.truck-edit-sched{background:none;border:none;color:var(--accent);font-weight:700;
  cursor:pointer;padding:4px;font-family:inherit;font-size:14px}
.truck-toggles{display:flex;gap:2px;margin-top:12px;border:1px solid var(--card-border);
  border-radius:14px;padding:9px 4px}
.truck-tog{display:flex;flex-direction:column;align-items:center;gap:4px;flex:1;min-width:0}
.truck-tog .toggle{margin-left:0;transform:scale(.8)}
.truck-tog-label{font-size:9.5px;font-weight:700;text-align:center;line-height:1.1}

/* ── States tab: app Destination States screen ─────────────────────── */
.states-note{margin-top:12px;display:flex;gap:10px;align-items:flex-start}
.states-note-ic{flex:none;margin-top:1px}
.states-note-tx{flex:1;line-height:1.45}
.truck-pill-wrap{margin-top:14px;position:relative;z-index:5}
.truck-pill{display:flex;align-items:center;gap:10px;width:100%;background:var(--card);
  border:1px solid var(--card-border);border-radius:18px;padding:13px 16px;font:inherit;
  font-size:16px;font-weight:600;color:var(--text);cursor:pointer;text-align:start;
  box-shadow:0 4px 14px rgba(30,10,60,.06)}
.truck-pill svg{color:var(--accent);flex:none}
.truck-pill-tx{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.truck-pill-chev{display:inline-flex;flex:none}
.truck-pill-drop{margin-top:8px;background:var(--card);border:1px solid var(--card-border);
  border-radius:16px;overflow:hidden;box-shadow:0 10px 24px rgba(30,10,60,.10)}
.truck-pill-opt{display:block;width:100%;text-align:start;background:none;border:none;
  border-bottom:1px solid var(--card-border);padding:12px 16px;font:inherit;font-size:15px;
  font-weight:600;color:var(--text);cursor:pointer}
.truck-pill-opt:last-child{border-bottom:none}
.states-head{margin-top:18px}
.states-head-pill{display:inline-block;background:var(--accent);color:#fff;font-size:16.5px;
  font-weight:600;padding:8px 14px;border-radius:14px;box-shadow:0 6px 16px rgba(114,38,232,.30)}
.states-selbox{padding:0;overflow:hidden}
.states-sel-head{display:flex;align-items:center;gap:8px;width:100%;background:none;border:none;
  padding:14px 16px;font:inherit;cursor:pointer;color:var(--text)}
.states-sel-count{flex:1;text-align:start;font-size:16.5px;font-weight:500}
.states-sel-chev{display:inline-flex;color:var(--accent);transition:transform .2s}
.states-selbox.open .states-sel-chev{transform:rotate(180deg)}
.states-sel-panel{padding:0 16px 16px}
.states-sel-mass{margin:0 0 4px}
.states-chips-head{font-size:14.5px;font-weight:600;color:var(--accent);margin:12px 0 6px}
.states-chips-head.dim{color:var(--gray)}
.states-chips{display:flex;flex-wrap:wrap;gap:7px}
.states-chip{border:1.6px solid var(--card-border);background:var(--card);color:var(--text);
  border-radius:999px;padding:6px 12px;font:inherit;font-size:13.5px;font-weight:500;cursor:pointer}
.states-chip.on{background:var(--accent);border-color:var(--accent);color:#fff}
.pill-control.states-solid{background:var(--accent);border-color:var(--accent);color:#fff}
.pill-control.states-outline{background:var(--card);border-color:var(--accent);color:var(--accent)}
.states-mass{margin-top:12px}
.states-regions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:14px}
.region-chip{display:inline-flex;align-items:center;gap:6px;background:var(--card);
  border:1.6px solid var(--card-border);border-radius:999px;padding:7px 12px;font:inherit;
  font-size:13.5px;font-weight:500;color:var(--accent);cursor:pointer;
  box-shadow:0 3px 10px rgba(30,10,60,.05)}
.region-chip-ic{display:inline-flex}
.states-map-card{padding:10px}
.usmap-wrap{position:relative}
.us-map{width:100%;height:auto;display:block}
.us-map-real{touch-action:none}
/* Real geographic map — colors are the app's (theme.dart mapIdle family) */
.us-state{fill:#E9E7F0;stroke:#FFFFFF;stroke-width:1.2;cursor:pointer}
.us-state.on{fill:#7226E8;stroke:#7226E8}
.us-state-tx{fill:#7B7489;font-weight:500;letter-spacing:.5px;pointer-events:none}
.us-state-tx.on{fill:#fff}
.us-leader-line{stroke:rgba(123,116,137,.65);stroke-width:1.5}
.us-leader-box{fill:#E9E7F0;stroke:#FFFFFF;stroke-width:1.2;cursor:pointer}
.us-leader-box.on{fill:#7226E8;stroke:#7226E8}
.us-leader-tx{fill:#7B7489;font-size:19px;font-weight:500;letter-spacing:.5px;pointer-events:none}
.us-leader-tx.on{fill:#fff}
html[data-theme="dark"] .us-state{fill:#3B3549;stroke:#141219}
html[data-theme="dark"] .us-state.on{fill:#7226E8;stroke:#7226E8}
html[data-theme="dark"] .us-state-tx{fill:#B3ADC4}
html[data-theme="dark"] .us-state-tx.on{fill:#fff}
html[data-theme="dark"] .us-leader-box{fill:#3B3549;stroke:#141219}
html[data-theme="dark"] .us-leader-box.on{fill:#7226E8;stroke:#7226E8}
html[data-theme="dark"] .us-leader-tx{fill:#B3ADC4}
html[data-theme="dark"] .us-leader-tx.on{fill:#fff}
html[data-theme="dark"] .us-leader-line{stroke:rgba(179,173,196,.5)}
.usmap-zoom{position:absolute;right:10px;bottom:10px;display:flex;flex-direction:column;gap:8px;z-index:2}
.usmap-zbtn{width:42px;height:42px;border-radius:50%;background:var(--card);
  border:1px solid var(--card-border);color:var(--accent);font-size:24px;line-height:1;
  cursor:pointer;box-shadow:0 3px 10px rgba(20,10,50,.16);display:flex;align-items:center;
  justify-content:center;font-family:inherit;padding:0}

/* ── Notifications / loads: app card rhythm on mobile ──────────────── */
html.vw-mobile .pill-controls{display:grid;grid-template-columns:1fr 1fr;gap:9px;align-items:stretch}
html.vw-mobile .notif-card{border-radius:20px;border-left:5px solid #D9A514}
html.vw-mobile .notif-card .load-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px 10px}
html.vw-mobile .loads-list-grid .load-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px 10px}
html.vw-mobile .notif-card.covered .covered-banner{color:#E5484D;font-weight:800;letter-spacing:.04em}
html.vw-mobile .bk-booked-card{border-radius:20px}
html.vw-mobile .feat-grid{grid-template-columns:1fr}
html.vw-mobile .msg-layout{grid-template-columns:1fr}

/* ── Pay (mobile): a website-original page (the app has no Pay screen —
   in the app, money just opens this website) built in the app's own
   design language: HeroHeader photo treatment (bits.dart: the app's
   hero_truck.jpg under the page-bg scrim, big navy title), the Home /
   Settings purple balance pill, the Add Money screen's amount chips
   and big purple PillButton, Settings-row toggles, Money Notebook
   entry cards. Every rule is scoped to #payView AND html.vw-mobile,
   so desktop Pay renders exactly as before. Pay stays the post-login
   landing root (NavHist) — unchanged. ─────────────────────────────── */

/* Hero: the app's purple semi photo fading in from the right under
   the page-background scrim, so the navy title always reads cleanly
   (HeroHeader, height-260 variant like the app's Add Money screen).
   No back circle: on the website Pay is the landing root, not a
   pushed screen — the tab bar is the way out, exactly like a tab. */
html.vw-mobile #payView .hero{
  min-height:148px;padding:20px 18px;border:none;overflow:hidden;
  border-radius:0 0 24px 24px;
  background:
    linear-gradient(90deg,var(--grad1) 5%,rgba(248,244,255,.55) 45%,rgba(248,244,255,0) 85%),
    url('hero_truck.jpg?v=20261124b') right center/cover no-repeat,
    linear-gradient(135deg,var(--soft),var(--accent-light))}
html.vw-mobile[data-theme="dark"] #payView .hero{
  background:
    linear-gradient(90deg,var(--grad1) 5%,rgba(23,19,31,.55) 45%,rgba(23,19,31,0) 85%),
    url('hero_truck.jpg?v=20261124b') right center/cover no-repeat,
    linear-gradient(135deg,var(--soft),var(--accent-deep))}
/* RTL: the title side flips, so the photo and scrim flip with it. */
html.vw-mobile[dir="rtl"] #payView .hero{
  background:
    linear-gradient(270deg,var(--grad1) 5%,rgba(248,244,255,.55) 45%,rgba(248,244,255,0) 85%),
    url('hero_truck.jpg?v=20261124b') left center/cover no-repeat,
    linear-gradient(225deg,var(--soft),var(--accent-light))}
html.vw-mobile[dir="rtl"][data-theme="dark"] #payView .hero{
  background:
    linear-gradient(270deg,var(--grad1) 5%,rgba(23,19,31,.55) 45%,rgba(23,19,31,0) 85%),
    url('hero_truck.jpg?v=20261124b') left center/cover no-repeat,
    linear-gradient(225deg,var(--soft),var(--accent-deep))}
html.vw-mobile #payView .hero-text h1{font-size:31px;font-weight:800}
html.vw-mobile #payView .hero-text p{font-size:14px;font-weight:600}

/* Balance: the app's big purple pill (Home "$400" / Settings pill),
   not a plain web figure. Refresh stays the white pill under it. */
html.vw-mobile #payView .balance-center{padding:18px 2px 2px}
html.vw-mobile #payView .balance-big{display:inline-block;
  background:linear-gradient(135deg,#7C3AED,#7226E8);color:#fff;
  font-size:31px;font-weight:800;letter-spacing:0;line-height:1.15;
  padding:13px 36px;border-radius:999px;
  box-shadow:0 8px 20px rgba(114,38,232,.35)}
html.vw-mobile #payView .refresh-pill{display:block;margin:12px auto 0}
html.vw-mobile #payView #balanceMeta{margin-top:10px}
html.vw-mobile #payView #balanceNotices{text-align:left}
html.vw-mobile #payView .notice-gold,
html.vw-mobile #payView .notice-red{border-radius:16px}

/* Sections: app cards (radius, soft border, purple shadow) with the
   app's navy section titles. */
html.vw-mobile #payView .grid{gap:14px;margin-top:16px}
html.vw-mobile #payView .card{border:1px solid var(--card-border);
  border-radius:24px;box-shadow:var(--shadow);padding:18px 16px}
html.vw-mobile #payView .card-head h2{color:var(--navy);font-size:19px;font-weight:800}

/* Add Money flow: Add Money screen language — navy w600 field labels,
   app amount chips (selected = purple fill), full-width custom field,
   the big purple pill action. */
html.vw-mobile #payView .field-label{color:var(--navy);font-weight:600;font-size:16.5px}
html.vw-mobile #payView .chips{gap:9px}
html.vw-mobile #payView .chip{padding:11px 20px;font-size:16.5px}
html.vw-mobile #payView .input-box.small{max-width:none;border-radius:16px}
html.vw-mobile #payView #toCardBtn{font-size:17px;padding:14px 18px}
html.vw-mobile #payView #payNowBtn{font-size:16px;padding:13px 16px}
html.vw-mobile #payView .stripe-stub{border-radius:16px}
html.vw-mobile #payView .text-input{border-radius:14px}
html.vw-mobile #payView #refundSubmit{margin-top:8px}

/* Auto-pay toggles + refund rows: Settings value-row rhythm. */
html.vw-mobile #payView .toggle-row{padding:12px 0}
html.vw-mobile #payView .toggle-label{font-weight:600;font-size:15.5px}
html.vw-mobile #payView .kv-row{padding:11px 0}

/* Money Notebook: the app's entry cards (credit teal / debit red-deep
   already come from styles.css). */
html.vw-mobile #payView .entry{border-radius:20px;padding:13px 15px}

/* ── Old-design cleanup (2026-11-24 — Ahmed: "Don't leave ANY design
   box or full page of how ugly is used to be i still see some, so
   replace, and remove it duplicate"). Every remaining pre-Phase-3
   visual block that can render on mobile is replaced here with the
   app's design language; desktop keeps the old code untouched.
   1) Sub-view .hero banners (Features, Trucks, Messages, Email,
      Ai Broker, Extraction, Methods, MC Control, Owner, Activity,
      Booked, Missing) and the Alerts/States .app-hero and the
      Notifications/Extracted .lav-header all get the app's
      HeroHeader photo treatment (hero_truck.jpg + page-bg scrim,
      navy title) — the same treatment Pay got in §20. Home/Settings
      heroes stay display:none on mobile (ID-scoped rules above win).
   2) Clone-era card chrome — the gradient .swoosh bar and gradient
      .grad-chip icon tiles on every generic .card (Settings grid,
      Email, Ai Broker, Extraction, Trucks location/status cards,
      Activity) — is replaced by the app's plain card + lavender
      icon tile. ─────────────────────────────────────────────────── */
html.vw-mobile .hero{
  min-height:104px;padding:18px;border:none;overflow:hidden;
  border-radius:0 0 24px 24px;
  background:
    linear-gradient(90deg,var(--grad1) 5%,rgba(248,244,255,.55) 45%,rgba(248,244,255,0) 85%),
    url('hero_truck.jpg?v=20261124b') right center/cover no-repeat,
    linear-gradient(135deg,var(--soft),var(--accent-light))}
html.vw-mobile[data-theme="dark"] .hero{
  background:
    linear-gradient(90deg,var(--grad1) 5%,rgba(23,19,31,.55) 45%,rgba(23,19,31,0) 85%),
    url('hero_truck.jpg?v=20261124b') right center/cover no-repeat,
    linear-gradient(135deg,var(--soft),var(--accent-deep))}
html.vw-mobile[dir="rtl"] .hero{
  background:
    linear-gradient(270deg,var(--grad1) 5%,rgba(248,244,255,.55) 45%,rgba(248,244,255,0) 85%),
    url('hero_truck.jpg?v=20261124b') left center/cover no-repeat,
    linear-gradient(225deg,var(--soft),var(--accent-light))}
html.vw-mobile[dir="rtl"][data-theme="dark"] .hero{
  background:
    linear-gradient(270deg,var(--grad1) 5%,rgba(23,19,31,.55) 45%,rgba(23,19,31,0) 85%),
    url('hero_truck.jpg?v=20261124b') left center/cover no-repeat,
    linear-gradient(225deg,var(--soft),var(--accent-deep))}
html.vw-mobile .hero-text h1{font-size:26px;font-weight:800}
html.vw-mobile .hero-text p{font-size:13.5px;font-weight:600}
html.vw-mobile .app-hero{
  background:
    linear-gradient(90deg,var(--grad1) 5%,rgba(248,244,255,.55) 45%,rgba(248,244,255,0) 85%),
    url('hero_truck.jpg?v=20261124b') right center/cover no-repeat,
    linear-gradient(135deg,var(--soft),var(--accent-light))}
html.vw-mobile[data-theme="dark"] .app-hero{
  background:
    linear-gradient(90deg,var(--grad1) 5%,rgba(23,19,31,.55) 45%,rgba(23,19,31,0) 85%),
    url('hero_truck.jpg?v=20261124b') right center/cover no-repeat,
    linear-gradient(135deg,var(--soft),var(--accent-deep))}
html.vw-mobile[dir="rtl"] .app-hero{
  background:
    linear-gradient(270deg,var(--grad1) 5%,rgba(248,244,255,.55) 45%,rgba(248,244,255,0) 85%),
    url('hero_truck.jpg?v=20261124b') left center/cover no-repeat,
    linear-gradient(225deg,var(--soft),var(--accent-light))}
html.vw-mobile[dir="rtl"][data-theme="dark"] .app-hero{
  background:
    linear-gradient(270deg,var(--grad1) 5%,rgba(23,19,31,.55) 45%,rgba(23,19,31,0) 85%),
    url('hero_truck.jpg?v=20261124b') left center/cover no-repeat,
    linear-gradient(225deg,var(--soft),var(--accent-deep))}
html.vw-mobile .app-hero::after{display:none}
html.vw-mobile .app-hero h1{color:var(--navy);font-size:26px}
html.vw-mobile .app-hero p{color:var(--gray);font-weight:600}
html.vw-mobile .lav-header{
  border:none;border-radius:24px;padding:18px;
  background:
    linear-gradient(90deg,var(--grad1) 5%,rgba(248,244,255,.55) 45%,rgba(248,244,255,0) 85%),
    url('hero_truck.jpg?v=20261124b') right center/cover no-repeat,
    linear-gradient(135deg,var(--soft),var(--accent-light))}
html.vw-mobile[data-theme="dark"] .lav-header{
  background:
    linear-gradient(90deg,var(--grad1) 5%,rgba(23,19,31,.55) 45%,rgba(23,19,31,0) 85%),
    url('hero_truck.jpg?v=20261124b') right center/cover no-repeat,
    linear-gradient(135deg,var(--soft),var(--accent-deep))}
html.vw-mobile[dir="rtl"] .lav-header{
  background:
    linear-gradient(270deg,var(--grad1) 5%,rgba(248,244,255,.55) 45%,rgba(248,244,255,0) 85%),
    url('hero_truck.jpg?v=20261124b') left center/cover no-repeat,
    linear-gradient(225deg,var(--soft),var(--accent-light))}
html.vw-mobile[dir="rtl"][data-theme="dark"] .lav-header{
  background:
    linear-gradient(270deg,var(--grad1) 5%,rgba(23,19,31,.55) 45%,rgba(23,19,31,0) 85%),
    url('hero_truck.jpg?v=20261124b') left center/cover no-repeat,
    linear-gradient(225deg,var(--soft),var(--accent-deep))}
html.vw-mobile .card{border:1px solid var(--card-border);border-radius:24px}
html.vw-mobile .swoosh::before{display:none}
html.vw-mobile .grad-chip{background:#EFE9FD;color:var(--accent);
  border-radius:12px;box-shadow:none}
html.vw-mobile[data-theme="dark"] .grad-chip{background:#2E2149;color:#C4B5FD}

/* ── Fitment pass (2026-11-24, Ahmed): proportions tightened to the
   app screenshots — comfortable tap targets, slimmer header stacks so
   real content starts in the first viewport. Same design language,
   correct sizes. ─────────────────────────────────────────────────── */
html.vw-mobile .pill-control{padding:11px 16px}
html.vw-mobile .region-chip{padding:8px 13px}
html.vw-mobile .states-chip{padding:7px 13px}
html[dir="rtl"] .usmap-zoom{right:auto;left:10px}
/* Header stacks: heroes capped to app proportions on every screen */
html.vw-mobile .hero{min-height:96px;padding-top:14px;padding-bottom:14px}
html.vw-mobile .app-hero{min-height:92px}
html.vw-mobile .lav-header{padding-top:14px;padding-bottom:14px}
/* Trucks (Ahmed's worked example): compact Add Truck pill + stats as
   ONE slim single-row strip — the first truck card is visible in the
   first viewport. */
html.vw-mobile #fleetRoot>.pill-controls{margin:10px 0 0;justify-content:flex-start}
html.vw-mobile #fleetRoot>.pill-controls .pill-btn{flex:0 0 auto;padding:10px 20px;min-height:44px}
html.vw-mobile .fleet-stats-card{padding:10px 12px;margin-top:10px;border-radius:16px}
html.vw-mobile .fleet-stats{display:flex;flex-wrap:nowrap;gap:8px}
html.vw-mobile .fleet-stat{flex:1;text-align:center;min-width:0}
html.vw-mobile .fleet-stat strong{display:block;font-size:20px;line-height:1.15}
html.vw-mobile .fleet-stat span{font-size:11px;color:var(--gray);font-weight:600;
  display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.vw-mobile .truck-card{margin-top:10px}

/* ── Desktop widened (2026-11-24, Ahmed 00:17 — supersedes the old
   preserve-desktop rule): the NEW app design, widened into a true
   desktop layout. Wide, not tall: compact headers, content-forward,
   multi-column where the content suits it. No toggle — viewmode.js
   stays automatic. The old desktop remains recoverable from the
   production backup. ─────────────────────────────────────────────── */
html.vw-desktop .hero{
  background-image:linear-gradient(to right,var(--bg) 22%,rgba(244,242,248,.45) 55%,rgba(244,242,248,0) 82%),url('hero_truck.jpg');
  background-size:cover,cover;background-position:center,center right;
  border:none;border-radius:0 0 24px 24px;min-height:118px;
  display:flex;flex-direction:column;justify-content:center}
html.vw-desktop[data-theme="dark"] .hero{
  background-image:linear-gradient(to right,var(--bg) 22%,rgba(20,18,25,.5) 55%,rgba(20,18,25,.08) 82%),url('hero_truck.jpg')}
html.vw-desktop[dir="rtl"] .hero{
  background-image:linear-gradient(to left,var(--bg) 22%,rgba(244,242,248,.45) 55%,rgba(244,242,248,0) 82%),url('hero_truck.jpg');
  background-position:center,center left}
html.vw-desktop .hero h1{color:#0D1526;font-size:30px}
html.vw-desktop[data-theme="dark"] .hero h1{color:#F2F0F7}
html.vw-desktop .hero p{color:#5B6472;font-weight:600}
html.vw-desktop[data-theme="dark"] .hero p{color:#B9B3C7}
html.vw-desktop .app-hero{
  background-image:linear-gradient(to right,var(--bg) 22%,rgba(244,242,248,.45) 55%,rgba(244,242,248,0) 82%),url('hero_truck.jpg');
  background-size:cover,cover;background-position:center,center right;min-height:112px}
html.vw-desktop .app-hero::after{display:none}
html.vw-desktop .app-hero h1{color:#0D1526;font-size:30px}
html.vw-desktop[data-theme="dark"] .app-hero h1{color:#F2F0F7}
html.vw-desktop .app-hero p{color:#5B6472}
html.vw-desktop[data-theme="dark"] .app-hero p{color:#B9B3C7}
html.vw-desktop .lav-header{
  background-image:linear-gradient(to right,var(--bg) 22%,rgba(244,242,248,.45) 55%,rgba(244,242,248,0) 82%),url('hero_truck.jpg');
  background-size:cover,cover;background-position:center,center right;
  border:none;border-radius:24px;min-height:96px}
html.vw-desktop .card{border:1px solid var(--card-border);border-radius:24px}
html.vw-desktop .swoosh::before{display:none}
html.vw-desktop .grad-chip{background:#EFE9FD;color:var(--accent);border-radius:12px;box-shadow:none}
html.vw-desktop[data-theme="dark"] .grad-chip{background:#2E2149;color:#C4B5FD}
/* Settings: the app rows show on desktop too, above the sections */
html.vw-desktop #settingsHome{display:block}
/* Home: feature rows flow two-wide; everything else spans */
html.vw-desktop #homeRoot{display:grid;grid-template-columns:1fr 1fr;gap:14px 16px;align-items:start}
html.vw-desktop #homeRoot>*{min-width:0;margin-top:0}
html.vw-desktop #homeRoot>.home-toprow,html.vw-desktop #homeRoot>.home-balrow,
html.vw-desktop #homeRoot>.home-wm,html.vw-desktop #homeRoot>.home-title,html.vw-desktop #homeRoot>.home-subtitle,
html.vw-desktop #homeRoot>.home-tiles,html.vw-desktop #homeRoot>.home-booked{grid-column:1/-1}
html.vw-desktop #homeRoot>.home-tiles{grid-template-columns:repeat(4,1fr)}
/* Trucks: cards multi-column; add row + stats strip span full width */
html.vw-desktop #fleetRoot>div:not(.pill-controls):not(.fleet-stats-card){
  display:grid;grid-template-columns:repeat(auto-fill,minmax(410px,1fr));gap:14px;align-items:start}
html.vw-desktop #fleetRoot .truck-card{margin-top:0}
html.vw-desktop .fleet-stats{display:flex;flex-wrap:nowrap;gap:8px}
html.vw-desktop .fleet-stat{flex:1;text-align:center}
/* Notifications + Loads: cards multi-column, notices span */
html.vw-desktop #notifList,html.vw-desktop #loadsList{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(430px,1fr));gap:14px;align-items:start}
html.vw-desktop #notifList>.notice,html.vw-desktop #notifList>.empty-state,
html.vw-desktop #loadsList>.notice,html.vw-desktop #loadsList>.empty-state{grid-column:1/-1}
/* Feature forms: section cards two-wide; back row + map card span */
html.vw-desktop #featuresRoot .feat-form{display:grid;
  grid-template-columns:repeat(auto-fit,minmax(440px,1fr));gap:14px;align-items:start}
html.vw-desktop #featuresRoot .feat-form>*{min-width:0;margin-top:0}
html.vw-desktop #featuresRoot .feat-form>.feat-back{grid-column:1/-1;justify-self:start}
html.vw-desktop #featuresRoot .feat-form>.card:has(.usmap-wrap){grid-column:1/-1}

/* ── Desktop shell (2026-11-24 DESKTOP FIX, Ahmed 00:42): "Desktop
   site mode … It looks like old desktop design." The old 224px
   sidebar shell in styles.css governed the desktop chrome, so the
   new grids inside still read as the old desktop. That shell is now
   retired at its source (styles.css). Desktop uses the SAME shell as
   the app design: the slim top bar (wordmark · balance · Download ·
   Log out) and the app's own bottom tab bar — the app's navigation —
   with the content column at the shared 1280px base width ("a bit
   wider" than the phone column, per Ahmed). Every non-tab view is
   reached exactly as in the app: Pay is the landing and sits behind
   the balance pill, the rest behind Home tiles/rows and Settings
   rows (TAB_OF keeps the parent tab lit). No sidebar, no toggle —
   viewmode.js stays automatic. ─────────────────────────────────── */
html.vw-desktop body.in-session .tabbar{
  display:flex;position:fixed;left:0;right:0;bottom:0;z-index:70;
  background:var(--card);border-top:1px solid var(--card-border);
  padding:5px max(2px,calc((100% - 1240px)/2)) calc(5px + env(safe-area-inset-bottom));
  box-shadow:0 -4px 18px rgba(30,10,60,.08)}
html.vw-desktop body.in-session .page{padding-bottom:100px}
html.vw-desktop .new-pill{bottom:92px}
