/* FleetDesk Pro — app stylesheet
   Brand: navy #080B14, orange #FF6B1A, Archivo / Archivo Black.
   Also restyles the class vocabulary used by the legacy page modules
   (.card .pill .stat-grid .stat .toolbar .filters .link-button .alert-item ...). */

:root {
  --bg: #080B14;
  --bg-2: #0C111D;
  --card: #121826;
  --card-2: #0F1420;
  --border: #222b3a;
  --border-2: #2d384b;
  --orange: #FF6B1A;
  --orange-2: #ff8442;
  --orange-soft: rgba(255, 107, 26, .12);
  --text: #e8edf5;
  --muted: #9aa4b2;
  --dim: #6b7484;
  --green: #2bb673;
  --red: #ef4444;
  --amber: #f5a623;
  --blue: #4f8cff;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 268px;
  --topbar-h: 60px;
  --tabbar-h: 62px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .35);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
code { background: var(--card-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; font-size: .85em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.slab { font-family: 'Archivo Black', var(--font); text-transform: uppercase; letter-spacing: -.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--orange); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 200; font-weight: 700; }
.skip-link:focus { left: 8px; text-decoration: none; }

/* ------------------------------------------------------------ app shell */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--bg-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 60;
  transition: transform .22s ease;
}
.sidebar-head { padding: 14px 16px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { height: 38px; width: auto; display: block; }
.wm { font-family: 'Archivo Black', var(--font); font-size: 17px; line-height: 1; letter-spacing: -.01em; text-transform: uppercase; font-style: italic; }
.wm b { color: var(--orange); font-weight: inherit; }
.wm small { display: block; font-family: var(--font); font-style: normal; font-weight: 700; font-size: 8.5px; letter-spacing: .5em; color: var(--orange); margin-top: 3px; }
.nav-search { padding: 0 14px 10px; }
.nav-search input {
  width: 100%; background: var(--card-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 9px 12px; font-size: 14px;
}
.nav-scroll { flex: 1; overflow-y: auto; padding: 4px 10px 16px; overscroll-behavior: contain; }
.nav-top { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 14px; }
.nav-top:hover { background: var(--card); text-decoration: none; }
.nav-top.active { background: var(--orange-soft); color: var(--orange-2); }
.nav-group { margin-top: 2px; }
.nav-group > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; user-select: none;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: var(--card); color: var(--text); }
.nav-group > summary .chev { margin-left: auto; transition: transform .15s; opacity: .6; }
.nav-group[open] > summary .chev { transform: rotate(90deg); }
.nav-group[open] > summary { color: var(--text); }
.nav-items { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 8px 14px; margin-left: 17px; border-left: 1px solid var(--border); }
.nav-link { display: block; padding: 7px 10px; border-radius: 8px; color: #c4ccd8; font-size: 14px; }
.nav-link:hover { background: var(--card); color: #fff; text-decoration: none; }
.nav-link.active { background: var(--orange-soft); color: var(--orange-2); font-weight: 700; }
.nav-link.is-import { font-size: 13px; color: var(--dim); }
.nav-link.is-import::before { content: '↳ '; }
.nav-empty { display: none; padding: 14px 10px; color: var(--muted); font-size: 13px; }
.sidebar-foot { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #000; font-weight: 800; display: grid; place-items: center; flex: none; }
.foot-user { min-width: 0; flex: 1; font-size: 13px; line-height: 1.25; }
.foot-user strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot-user span { color: var(--muted); font-size: 12px; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: rgba(8, 11, 20, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.topbar .icon-btn { display: none; }
.top-search { flex: 1; max-width: 460px; }
.top-search input {
  width: 100%; background: var(--card-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 9px 14px; font-size: 14px;
}
.top-spacer { flex: 1; }
.trial-chip { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--orange); color: var(--orange-2); background: var(--orange-soft); white-space: nowrap; }
.trial-chip:hover { text-decoration: none; background: rgba(255, 107, 26, .2); }
.icon-btn { background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 10px; width: 40px; height: 40px; display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.icon-btn:hover { background: var(--card); }
.content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 24px; flex: 1; }
.footer { padding: 18px 24px 28px; color: var(--dim); font-size: 12px; text-align: center; }

.tabbar { display: none; }
.scrim { display: none; }

@media (max-width: 960px) {
  .sidebar { transform: translateX(-102%); width: min(86vw, 320px); box-shadow: var(--shadow); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 55; }
  .main { margin-left: 0; }
  .topbar { padding: 0 12px; }
  .topbar .icon-btn { display: inline-grid; }
  .trial-chip { display: none; }
  .content { padding: 14px 12px calc(var(--tabbar-h) + 22px); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: var(--tabbar-h); background: rgba(12, 17, 29, .96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--muted); font-size: 11px; font-weight: 600; background: none; border: 0; cursor: pointer; font-family: inherit; padding: 0;
  }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .active { color: var(--orange-2); }
  .tabbar svg { width: 22px; height: 22px; }
}

/* ------------------------------------------------------------ components (shared + legacy classes) */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px;
}
.card > h2:first-child, .card > .pill + h2 { margin-top: 2px; }
.card .card { background: var(--card-2); }
.pill {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255, 107, 26, .5); color: var(--orange-2);
  background: var(--orange-soft); margin-bottom: 10px;
}
.muted { color: var(--muted); font-size: 14px; }
.msg { margin-top: 10px; font-size: 14px; color: var(--amber); }
.msg:empty { display: none; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 14px 0; }
.stat { background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.stat strong { display: block; font-size: 1.45rem; line-height: 1.15; font-weight: 800; overflow-wrap: anywhere; }
.stat span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 6px; }

.toolbar, .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { margin: 14px 0; }
.inline-form { display: inline; margin: 0; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; margin: 14px 0; }
.filters label { margin-top: 0; }

/* Buttons */
button, .btn, .link-button {
  font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer;
  border-radius: 10px; padding: 10px 16px; min-height: 40px;
  border: 1px solid var(--orange); background: var(--orange); color: #14100c;
  transition: background .15s, transform .05s, border-color .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
button:hover, .btn:hover { background: var(--orange-2); border-color: var(--orange-2); text-decoration: none; }
button:active, .btn:active, .link-button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; }
.link-button {
  background: transparent; color: var(--text); border-color: var(--border-2);
}
.link-button:hover { background: var(--card-2); border-color: var(--orange); color: #fff; text-decoration: none; }
button.danger, .danger { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .55); color: #fca5a5; }
button.danger:hover { background: rgba(239, 68, 68, .25); border-color: var(--red); }
button.secondary, .btn-secondary { background: transparent; color: var(--text); border-color: var(--border-2); }
button.secondary:hover, .btn-secondary:hover { background: var(--card-2); border-color: var(--orange); }
.btn-lg { padding: 14px 24px; font-size: 16px; min-height: 50px; }
.btn-block { width: 100%; }
/* legacy blue AI buttons -> brand secondary */
button[style*="#1d4ed8"] { background: rgba(79, 140, 255, .14) !important; border: 1px solid rgba(79, 140, 255, .55) !important; color: #bcd3ff !important; border-radius: 10px !important; }
button[style*="#065f46"] { background: rgba(43, 182, 115, .15) !important; border: 1px solid rgba(43, 182, 115, .5) !important; color: #9be8c3 !important; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 5px; }
input, select, textarea {
  font-family: inherit; font-size: 16px; /* 16px prevents iOS zoom on focus */
  background: var(--card-2); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 10px; padding: 10px 12px; min-height: 42px; width: 100%; max-width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 26, .18); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--orange); vertical-align: middle; }
input[type=file] { padding: 8px; }
textarea { min-height: 110px; resize: vertical; }
.actions input, .toolbar input, .actions select, .toolbar select { width: auto; }
form .actions { margin-top: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.field { min-width: 0; }
.field-help { font-size: 12.5px; color: var(--dim); margin-top: 4px; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-wrap > table { margin: 0; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: var(--card-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table > tr:hover td { background: rgba(255, 255, 255, .02); }
td .actions { flex-wrap: nowrap; }
td .link-button, td button { padding: 6px 12px; min-height: 34px; font-size: 13px; }

/* Alerts */
.alert-list { display: grid; gap: 10px; margin: 14px 0; }
.alert-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: var(--card-2); border: 1px solid var(--border); border-left: 4px solid var(--amber);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.alert-item strong { display: block; font-size: 14.5px; }
.alert-item span { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.alert-critical { border-left-color: var(--red); }
.alert-good { border-left-color: var(--green); }
@media (max-width: 640px) { .alert-item { grid-template-columns: 1fr; } }

.notice { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--card-2); margin: 12px 0; font-size: 14px; }
.notice.error { border-color: rgba(239, 68, 68, .6); background: rgba(239, 68, 68, .1); color: #fecaca; }
.notice.success { border-color: rgba(43, 182, 115, .6); background: rgba(43, 182, 115, .1); color: #bbf7d0; }
.notice.warn { border-color: rgba(245, 166, 35, .6); background: rgba(245, 166, 35, .1); color: #fde68a; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border-2); color: #cbd5e1; background: var(--card-2); white-space: nowrap; }
.badge-green { border-color: rgba(43, 182, 115, .5); color: #86efac; background: rgba(43, 182, 115, .1); }
.badge-orange { border-color: rgba(255, 107, 26, .5); color: var(--orange-2); background: var(--orange-soft); }
.badge-red { border-color: rgba(239, 68, 68, .5); color: #fca5a5; background: rgba(239, 68, 68, .1); }
.badge-blue { border-color: rgba(79, 140, 255, .5); color: #bcd3ff; background: rgba(79, 140, 255, .1); }
.badge-gray { color: var(--muted); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
details.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; }
details.panel > summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::before { content: '+'; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--orange); color: #000; font-weight: 800; }
details.panel[open] > summary::before { content: '–'; }
details.panel > .panel-body { padding: 0 18px 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.kpi .kpi-label { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi .kpi-value { font-size: 1.75rem; font-weight: 800; margin-top: 4px; line-height: 1.1; }
.kpi .kpi-sub { color: var(--dim); font-size: 12.5px; margin-top: 4px; }
.kpi.accent { border-color: rgba(255, 107, 26, .5); background: linear-gradient(180deg, var(--orange-soft), var(--card)); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.good { color: #86efac; } .bad { color: #fca5a5; }

/* Mobile: tables become stacked cards (labels come from <th> via app.js) */
@media (max-width: 640px) {
  .card { padding: 16px 14px; border-radius: 10px; }
  h2 { font-size: 1.25rem; }
  .actions > .link-button, .toolbar > .link-button, .toolbar > button, .actions > button { flex: 1 1 auto; }
  .table-wrap.stack { border: 0; overflow: visible; }
  .table-wrap.stack table, .table-wrap.stack tbody { display: block; }
  .table-wrap.stack tr:has(th) { display: none; }
  .table-wrap.stack tr {
    display: block; background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; padding: 6px 12px;
  }
  .table-wrap.stack td {
    display: flex; justify-content: space-between; gap: 14px; align-items: center; text-align: right;
    padding: 8px 0; border-bottom: 1px dashed var(--border); overflow-wrap: anywhere;
  }
  .table-wrap.stack td:last-child { border-bottom: 0; }
  .table-wrap.stack td[data-label]::before {
    content: attr(data-label); color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    text-align: left; flex: none; max-width: 45%;
  }
  .table-wrap.stack td[colspan] { display: block; text-align: center; color: var(--muted); }
  .table-wrap.stack td .actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .stat strong { font-size: 1.2rem; }
}

/* ------------------------------------------------------------ auth screens */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(900px 480px at 80% -10%, rgba(255, 107, 26, .16), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 30px 28px; box-shadow: var(--shadow); }
.auth-card .brand { justify-content: center; margin-bottom: 18px; }
.auth-card .brand img { height: 118px; }
.auth-card h1 { text-align: center; font-size: 1.5rem; margin-bottom: 4px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.auth-card button[type=submit] { width: 100%; margin-top: 18px; min-height: 48px; font-size: 15px; }
.auth-links { margin-top: 16px; text-align: center; font-size: 14px; color: var(--muted); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 32px; padding: 4px 10px; font-size: 12px; background: transparent; border: 1px solid var(--border-2); color: var(--muted); }
.pw-toggle:hover { background: var(--card); color: #fff; border-color: var(--orange); }

/* ------------------------------------------------------------ pricing (billing + landing) */
.plans { display: grid; grid-template-columns: minmax(0, 360px); gap: 18px; margin-top: 8px; }
.plan { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px 22px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--orange); background: linear-gradient(180deg, #1a130e, var(--card)); }
.plan .tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--orange); color: #000; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.plan .plan-name { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.plan.featured .plan-name { color: var(--orange-2); }
.plan .price { font-family: 'Archivo Black', var(--font); font-size: 3rem; line-height: 1.1; margin: 6px 0; }
.plan .price small { font-family: var(--font); font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan .plan-desc { color: var(--muted); font-size: 14px; }
.plan ul { list-style: none; padding: 0; margin: 14px 0 20px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; font-size: 14px; color: #d5dce6; }
.plan li::before { content: '✓'; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: rgba(43, 182, 115, .16); color: var(--green); font-size: 11px; display: grid; place-items: center; font-weight: 800; }
.plan button { width: 100%; }

/* ------------------------------------------------------------ print */
@media print {
  body { background: #fff; color: #111827; font-size: 12px; }
  .sidebar, .topbar, .tabbar, .no-print, .footer, .scrim { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; max-width: none; }
  .card, .stat, .kpi { background: #fff; color: #111827; border-color: #d1d5db; box-shadow: none; }
  th, td { border-color: #d1d5db; color: #111827; }
  th { background: #f3f4f6; }
  .muted, .stat span, th { color: #4b5563; }
  a { color: #111827; }
  .table-wrap { overflow: visible; border-color: #d1d5db; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* dashboard */
.statusbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--card-2); border: 1px solid var(--border); margin: 8px 0 12px; }
.statusbar span { display: block; min-width: 4px; }

/* ---- Driver phone portal ---- */
.driver-app .content{max-width:560px;margin:0 auto;padding:16px 14px 32px}
.drv h1{font-size:24px;margin:6px 0 4px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.drv h3{margin:0 0 10px;font-size:16px}
.drv-card{display:block;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin:12px 0;color:var(--text);text-decoration:none}
a.drv-card:hover{border-color:var(--orange)}
.drv-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:18px}
.drv-lane{display:flex;flex-direction:column;gap:2px;font-weight:600;margin-bottom:8px}
.drv-lane .arrow{color:var(--orange);font-size:14px}
.drv-stop{margin-bottom:14px;display:flex;flex-direction:column;gap:2px}
.drv-stop small{color:var(--orange);letter-spacing:.08em;font-weight:700}
.drv-stop strong{font-size:18px}
.drv-done{opacity:.8}
.drv-empty{padding:32px 16px;text-align:center;color:var(--muted);border:1px dashed var(--border-2);border-radius:var(--radius)}
.drv-big{width:100%;min-height:56px;font-size:18px;font-weight:700;border-radius:14px;margin:6px 0}
.drv-big.secondary{background:transparent;border:2px solid var(--orange);color:var(--orange)}
.driver-app .topbar .link-button{white-space:nowrap}

/* driver voice assistant */
.drv-check{display:flex;gap:10px;align-items:flex-start;margin:10px 0;font-size:16px}
.drv-check input{width:22px;height:22px;flex:none;margin-top:2px}
.voice-log p{margin:6px 0;font-size:17px}
.voice-me{color:var(--muted,#555)}
.voice-confirm{margin-top:12px;padding:12px;border:2px solid var(--orange);border-radius:var(--radius);font-weight:600}
.voice-caps{width:100%;border-collapse:collapse;font-size:15px}
.voice-caps td{padding:6px 4px;border-bottom:1px solid var(--border)}
.cap-yes{color:#15803d;font-weight:600}.cap-no{color:#b45309;font-weight:600}
.voice-list{padding-left:18px;margin:0}.voice-list li{margin:6px 0}
.voice-text{margin-top:14px}
.drv [hidden],#voice-app [hidden]{display:none!important}

/* iOS / Android app only (see static/js/native.js) */
.native-cam-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 10px}
.native-cam-btn{background:transparent;color:var(--text);border:2px solid var(--orange);min-height:48px;font-weight:700}
.native-cam-btn:hover{background:var(--card-2);border-color:var(--orange)}
.native-toast{position:fixed;left:12px;right:12px;top:calc(env(safe-area-inset-top) + 10px);z-index:1000;display:flex;flex-direction:column;gap:2px;
  padding:12px 14px;border-radius:12px;background:var(--card);border:1px solid var(--orange);color:var(--text);box-shadow:0 8px 24px rgba(0,0,0,.4)}
.native-toast span{color:var(--muted);font-size:14px}

/* ------------------------------------------------------------ help / user guide */
.help-wrap { max-width: 880px; margin: 0 auto; }
.help-wrap h1 { margin: 6px 0 4px; }
.help-search { display: flex; gap: 8px; margin: 4px 0 18px; }
.help-search input { flex: 1; min-width: 0; font-size: 16px; padding: 12px 14px; }
.help-search button { padding: 0 20px; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 18px; }
a.help-card, a.help-start, a.help-result { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; margin-bottom: 0; transition: border-color .15s, transform .15s; }
a.help-card:hover, a.help-start:hover, a.help-result:hover, .help-pager a:hover { border-color: var(--orange); transform: translateY(-1px); }
a.help-card strong, a.help-start strong { font-size: 17px; }
a.help-card .muted, a.help-start .muted { font-size: 14px; line-height: 1.45; }
a.help-start { margin-bottom: 14px; border-color: rgba(255, 107, 26, .55); background: var(--orange-soft); }
a.help-start .pill { align-self: flex-start; }
a.help-result { margin-bottom: 10px; }
.help-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--orange-soft); color: var(--orange); font-weight: 800; font-size: 14px; }
.help-contact { display: flex; flex-direction: column; gap: 4px; }
.help-crumbs { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.help-crumbs a { color: var(--orange-2); }
.help-toc { margin-bottom: 16px; }
.help-toc ol { margin: 8px 0 0; padding-left: 22px; columns: 2; column-gap: 28px; }
.help-toc li { margin: 4px 0; break-inside: avoid; }
.help-section { scroll-margin-top: 80px; }
.help-h { margin: 0 0 10px; font-size: 20px; line-height: 1.25; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.help-topic-title { font-size: 26px; margin: 34px 0 2px; scroll-margin-top: 80px; }
.help-p { line-height: 1.6; margin: 0 0 12px; font-size: 16px; }
.help-list { margin: 0 0 12px; padding-left: 22px; line-height: 1.6; }
.help-list li { margin: 5px 0; }
.help-steps { list-style: none; counter-reset: helpstep; padding: 0; margin: 4px 0 14px; }
.help-steps li { counter-increment: helpstep; position: relative; padding: 4px 0 4px 44px; margin: 8px 0; line-height: 1.55; font-size: 16px; min-height: 30px; }
.help-steps li::before { content: counter(helpstep); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #000; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.help-callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); border-left-width: 4px; margin: 12px 0; line-height: 1.55; background: var(--card-2); }
.help-callout-label { flex: none; min-width: 74px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.help-tip { border-left-color: var(--green); } .help-tip .help-callout-label { color: var(--green); }
.help-note { border-left-color: var(--blue); } .help-note .help-callout-label { color: var(--blue); }
.help-warn { border-left-color: var(--amber); background: rgba(245, 166, 35, .08); } .help-warn .help-callout-label { color: var(--amber); }
kbd.help-ui { font-family: inherit; font-size: .92em; font-weight: 700; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--border-2); border-bottom-width: 2px; background: var(--card-2); color: var(--text); white-space: nowrap; }
.help-nav { font-weight: 700; color: var(--text); white-space: nowrap; }
a.help-nav { color: var(--orange-2); text-decoration: underline; text-underline-offset: 3px; }
.help-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 2px 8px; margin-right: 6px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border-2); color: var(--muted); vertical-align: middle; }
.help-table td, .help-table th { font-size: 15px; vertical-align: top; }
.help-faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 8px 0; background: var(--card-2); }
.help-faq summary { cursor: pointer; padding: 12px 14px; font-weight: 700; line-height: 1.4; }
.help-answer { padding: 0 14px 14px; line-height: 1.6; }
.help-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.help-pager a { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; margin-bottom: 0; }
.help-next { text-align: right; grid-column: 2; }
body.help-page.driver-app .help-wrap { max-width: 640px; }
body.help-page.driver-app .help-p, body.help-page.driver-app .help-steps li { font-size: 18px; }
@media (max-width: 640px) {
  .help-toc ol { columns: 1; }
  .help-pager { grid-template-columns: 1fr; }
  .help-next { grid-column: auto; }
  .help-callout { flex-direction: column; gap: 4px; }
}
@media print {
  .help-section { break-inside: avoid-page; }
  .help-topic-title { break-before: page; }
  .help-callout { background: #f9fafb; }
  kbd.help-ui, .help-badge { background: #f3f4f6; border-color: #9ca3af; color: #111827; }
  a.help-nav, .help-nav { color: #111827; }
  .help-faq details { border-color: #d1d5db; background: #fff; }
  .help-faq details > .help-answer { display: block; }
  .help-steps li::before { background: #111827; color: #fff; }
}
@media (max-width: 480px) {
  body.driver-app .topbar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  body.driver-app .topbar .link-button { padding: 6px 9px; font-size: 13px; min-height: 36px; }
  body.driver-app .topbar .wm { font-size: 14px; }
  body.driver-app .topbar .brand img { height: 24px !important; }
  body.driver-app .topbar .wm small { display: none; }
}
