@import url("./fleet/vehicle-explorer.css");
@import url("./fleet/interface-polish.css");
@import url("./fleet/tablet-dashboard.css?v=driving-v2");
@import url("./fleet/driving-layout.css?v=driving-v2");
@import url("./fleet/desktop.css");
/* ═══════════════════════════════════════════════════════════════════════
   NEXUS · FLEET — css/fleet.css  (NX-FLEET-001, 2026-09-21)

   THE PALETTE IS THE OWNER'S. On 2026-09-21 he sent the NEXUS FLEET mark and
   said: keep these colors, work around them, mechanic friendly. Sampled from
   the file through a canvas, not guessed:

       ink    #122e34   the ring, the wordmark, the dark band
       mint   #00c3a9   the arrow and the progress arc
       amber  #f1aa3e   the tick on the ring
       paper  #f4f6f2   the light ground

   Everything on this screen is built from those four plus white. There is no
   red: DUE NOW is solid amber on ink (the loudest thing the palette has),
   SOON is an amber outline, OK is mint, NO INFO is a quiet outline.

   MECHANIC FRIENDLY means, concretely:
     · nothing to tap is smaller than 48 px tall; primary actions are full
       width on a phone
     · the numbers a mechanic reads (odometer, mm, days) are the biggest
       type on the page
     · status is a WORD in caps with a colour, never a colour alone
     · the wheel grid shows each tire where it sits on the truck
     · one screen, no nested menus: every action is a button on the card

   Every class is `flt-` prefixed (a class name is a global). Tokens are
   scoped to #fleetView so nothing leaks into the rest of NEXUS, and the app's
   light theme flips the ground to paper.
   ═══════════════════════════════════════════════════════════════════════ */

#fleetView {
  --fl-ink: #122e34;
  --fl-ink-2: #1b3f46;        /* raised surface on ink */
  --fl-ink-3: #24505a;        /* pressed / border on ink */
  --fl-mint: #00c3a9;
  --fl-mint-ink: #0d7a6b;     /* mint dark enough for text on paper (4.7:1) */
  --fl-amber: #f1aa3e;
  --fl-amber-ink: #8a5a0a;    /* amber dark enough for text on paper */
  --fl-paper: #f4f6f2;
  --fl-white: #ffffff;
  /* dark theme (default): ink ground, paper text */
  --fl-bg: var(--fl-ink);
  --fl-card: var(--fl-ink-2);
  --fl-card-2: var(--fl-ink-3);
  --fl-line: rgba(244, 246, 242, 0.14);
  --fl-text: var(--fl-paper);
  --fl-text-2: rgba(244, 246, 242, 0.72);
  --fl-mint-text: var(--fl-mint);
  --fl-amber-text: var(--fl-amber);
  background: var(--fl-bg);
  color: var(--fl-text);
  padding: 0 0 calc(var(--nx-bottom-nav-h, 65px) + 24px);
  font-size: 17px;
  line-height: 1.35;
}
:root[data-theme="light"] #fleetView,
[data-theme="light"] #fleetView {
  --fl-bg: var(--fl-paper);
  --fl-card: var(--fl-white);
  --fl-card-2: #e7ebe6;
  --fl-line: rgba(18, 46, 52, 0.16);
  --fl-text: var(--fl-ink);
  --fl-text-2: rgba(18, 46, 52, 0.7);
  --fl-mint-text: var(--fl-mint-ink);
  --fl-amber-text: var(--fl-amber-ink);
}

.flt-wrap { display: flex; flex-direction: column; gap: 14px; padding: 12px 16px 0; max-width: 1080px; width: 100%; margin: 0 auto; box-sizing: border-box; }

/* ── brand band ── */
.flt-brand { display: flex; align-items: center; gap: 12px; padding: 10px 0 2px; }
.flt-brand svg { width: 44px; height: 44px; flex: none; }
.flt-logo { display: block; height: 40px; width: auto; border-radius: 6px; flex: none; }
@media (max-width: 420px) { .flt-logo { height: 32px; } }
.flt-brand-word { font-size: 1.45rem; font-weight: 800; letter-spacing: .02em; color: var(--fl-text); line-height: 1; }
.flt-brand-word span { font-weight: 400; }
.flt-brand-sub { color: var(--fl-text-2); font-size: .85rem; margin-top: 3px; }
.flt-brand-sub .flt-inline-err { margin-left: 6px; }

/* ── buttons: nothing smaller than 48 px ── */
.flt-btn { appearance: none; -webkit-appearance: none; border: 2px solid transparent; border-radius: 12px; min-height: 48px; padding: 10px 18px; font: inherit; font-size: 1rem; font-weight: 700; letter-spacing: .01em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; line-height: 1.1; box-sizing: border-box; transition: transform .08s ease, filter .12s ease; }
.flt-btn:active { transform: scale(.97); filter: brightness(.94); }
.flt-btn:focus-visible { outline: 3px solid var(--fl-mint); outline-offset: 2px; }
.flt-btn:disabled { opacity: .5; cursor: default; }
.flt-btn--primary { background: var(--fl-mint); color: var(--fl-ink); border-color: var(--fl-mint); }
.flt-btn--amber { background: var(--fl-amber); color: var(--fl-ink); border-color: var(--fl-amber); }
.flt-btn--ghost { background: transparent; color: var(--fl-text); border-color: var(--fl-line); }
.flt-btn--quiet { background: transparent; color: var(--fl-text-2); border-color: transparent; }
.flt-btn--block { width: 100%; }
.flt-btn--icon { width: 48px; padding: 0; font-size: 1.3rem; }
.flt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.flt-row > .flt-btn { flex: 1 1 auto; }
@media (max-width: 480px) { .flt-row--stack > .flt-btn { flex-basis: 100%; } }

/* ── stat tiles ── */
.flt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.flt-stat { background: var(--fl-card); border: 1px solid var(--fl-line); border-radius: 14px; padding: 12px 12px 10px; min-width: 0; }
.flt-stat b { display: block; font-size: 1.7rem; font-weight: 800; color: var(--fl-text); line-height: 1; }
.flt-stat span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fl-text-2); margin-top: 6px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flt-stat.is-due { background: var(--fl-amber); border-color: var(--fl-amber); }
.flt-stat.is-due b, .flt-stat.is-due span { color: var(--fl-ink); }
.flt-stat.is-warn b { color: var(--fl-amber-text); }
@media (max-width: 420px) { .flt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── tabs: big, full width ── */
.flt-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--fl-card); border: 1px solid var(--fl-line); border-radius: 14px; padding: 5px; }
.flt-tab { appearance: none; border: 0; background: transparent; color: var(--fl-text-2); font: inherit; font-size: 1rem; font-weight: 700; min-height: 46px; border-radius: 10px; cursor: pointer; }
.flt-tab[aria-selected="true"] { background: var(--fl-mint); color: var(--fl-ink); }
.flt-tab:focus-visible { outline: 3px solid var(--fl-mint); outline-offset: 2px; }

/* ── cards ── */
.flt-list { display: flex; flex-direction: column; gap: 12px; }
.flt-card { background: var(--fl-card); border: 1px solid var(--fl-line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.flt-card--tap { cursor: pointer; border-width: 2px; }
.flt-card--tap:active { transform: scale(.995); }
.flt-card--tap:focus-visible { outline: 3px solid var(--fl-mint); outline-offset: 2px; }
.flt-card--due { border-color: var(--fl-amber); }
.flt-card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.flt-card-title { font-weight: 800; color: var(--fl-text); font-size: 1.25rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flt-card-title small { font-size: .85rem; font-weight: 600; color: var(--fl-text-2); margin-left: 8px; }
.flt-card-meta { color: var(--fl-text-2); font-size: .92rem; display: flex; gap: 12px; flex-wrap: wrap; }
.flt-card-meta b { color: var(--fl-text); font-weight: 700; }
.flt-dots { display: flex; gap: 5px; flex-shrink: 0; }
.flt-dot { width: 12px; height: 12px; border-radius: 50%; background: transparent; border: 2px solid var(--fl-line); box-sizing: border-box; }
.flt-dot.s-due { background: var(--fl-amber); border-color: var(--fl-amber); }
.flt-dot.s-approaching, .flt-dot.s-inspection_due { border-color: var(--fl-amber); }
.flt-dot.s-within { background: var(--fl-mint); border-color: var(--fl-mint); }

/* ── status pills: a WORD in caps, never a colour alone ── */
.flt-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; border: 2px solid var(--fl-line); color: var(--fl-text-2); background: transparent; flex: none; }
.flt-pill.s-due { background: var(--fl-amber); color: var(--fl-ink); border-color: var(--fl-amber); }
.flt-pill.s-approaching, .flt-pill.s-inspection_due { color: var(--fl-amber-text); border-color: var(--fl-amber); }
.flt-pill.s-within, .flt-pill.s-active { background: var(--fl-mint); color: var(--fl-ink); border-color: var(--fl-mint); }
.flt-pill.s-unknown, .flt-pill.s-parked, .flt-pill.s-retired { color: var(--fl-text-2); }
.flt-pill.s-shop { color: var(--fl-amber-text); border-color: var(--fl-amber); }

/* ── vehicle detail ── */
.flt-back { align-self: flex-start; }
.flt-detail-head { display: flex; flex-direction: column; gap: 8px; }
.flt-detail-head h2 { margin: 0; font-size: 1.6rem; font-weight: 800; color: var(--fl-text); line-height: 1.1; }
.flt-meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.flt-meter { background: var(--fl-card); border: 1px solid var(--fl-line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.flt-meter b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--fl-text); line-height: 1.05; }
.flt-meter small { display: block; color: var(--fl-text-2); font-size: .8rem; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flt-section { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.flt-section h3 { margin: 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fl-text-2); font-weight: 800; }

/* ── the wheel grid: each tire where it sits ── */
.flt-wheels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.flt-wheel { min-height: 64px; border-radius: 14px; border: 2px solid var(--fl-line); background: var(--fl-card); color: var(--fl-text); font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; padding: 8px; }
.flt-wheel b { font-size: 1.05rem; font-weight: 800; }
.flt-wheel small { font-size: .8rem; color: var(--fl-text-2); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.flt-wheel.s-due { background: var(--fl-amber); border-color: var(--fl-amber); color: var(--fl-ink); }
.flt-wheel.s-due small { color: var(--fl-ink); }
.flt-wheel.s-approaching, .flt-wheel.s-inspection_due { border-color: var(--fl-amber); }
.flt-wheel.s-within { border-color: var(--fl-mint); }
.flt-wheel.s-within small { color: var(--fl-mint-text); }
.flt-wheel:focus-visible { outline: 3px solid var(--fl-mint); outline-offset: 2px; }
.flt-wheel--spare { grid-column: 1 / -1; min-height: 48px; }

/* ── component card ── */
.flt-comp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; }
.flt-comp-name { font-weight: 800; color: var(--fl-text); font-size: 1.15rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flt-comp-name small { color: var(--fl-text-2); font-weight: 700; margin-left: 8px; font-size: .9rem; }
.flt-comp-big { grid-column: 1 / -1; font-size: 1.35rem; font-weight: 800; color: var(--fl-text); line-height: 1.1; }
.flt-comp-big small { display: block; font-size: .85rem; font-weight: 600; color: var(--fl-text-2); margin-top: 2px; }
.flt-comp-line { grid-column: 1 / -1; color: var(--fl-text-2); font-size: .9rem; display: flex; gap: 10px; flex-wrap: wrap; }
.flt-comp-line b { color: var(--fl-text); font-weight: 700; }
.flt-comp-reason { grid-column: 1 / -1; color: var(--fl-amber-text); font-size: .95rem; font-weight: 600; }
.flt-comp-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 2px; }
.flt-comp-actions .flt-btn--quiet { grid-column: 1 / -1; min-height: 40px; }
.flt-bar { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: var(--fl-card-2); overflow: hidden; }
.flt-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--fl-mint); }
.flt-bar.s-approaching > span, .flt-bar.s-inspection_due > span, .flt-bar.s-due > span { background: var(--fl-amber); }

/* ── history ── */
.flt-events { display: flex; flex-direction: column; gap: 4px; }
.flt-event { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; font-size: .95rem; color: var(--fl-text); padding: 8px 0; border-bottom: 1px solid var(--fl-line); }
.flt-event:last-child { border-bottom: 0; }
.flt-event time { color: var(--fl-text-2); font-size: .82rem; font-weight: 700; }
.flt-event-kind { font-weight: 800; color: var(--fl-text); margin-right: 6px; text-transform: capitalize; }
.flt-event small { color: var(--fl-text-2); }

/* ── empty / error / notes ── */
.flt-empty { text-align: center; color: var(--fl-text-2); padding: 32px 14px; border: 2px dashed var(--fl-line); border-radius: 16px; font-size: 1rem; }
.flt-empty b { display: block; color: var(--fl-text); margin-bottom: 6px; font-size: 1.15rem; }
.flt-note { background: var(--fl-card); border-left: 5px solid var(--fl-amber); border-radius: 12px; padding: 12px 14px; color: var(--fl-text); font-size: .92rem; }
.flt-note code, .flt-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: var(--fl-card-2); border-radius: 6px; padding: 2px 6px; word-break: break-all; color: var(--fl-text); }
.flt-key { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; background: var(--fl-card-2); border: 2px solid var(--fl-mint); border-radius: 12px; padding: 12px 14px; margin: 8px 0; word-break: break-all; user-select: all; color: var(--fl-text); }
.flt-inline-err { color: var(--fl-amber-text); font-size: .9rem; font-weight: 700; }

/* ── map ── */
.flt-map { height: min(60vh, 520px); min-height: 280px; border-radius: 16px; overflow: hidden; border: 2px solid var(--fl-line); background: var(--fl-card); }
.flt-map-legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--fl-text-2); font-size: .85rem; font-weight: 600; }
.flt-map-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: middle; border: 2px solid var(--fl-line); box-sizing: border-box; }
.flt-map-legend .fresh i { background: var(--fl-mint); border-color: var(--fl-mint); }
.flt-map-legend .stale i { background: var(--fl-amber); border-color: var(--fl-amber); }
.flt-map-legend .none i { background: transparent; }

/* ── sheet / forms: big fields, one column on a phone ── */
.flt-sheet-veil { position: fixed; inset: 0; background: rgba(18, 46, 52, .72); z-index: 1200; display: flex; align-items: flex-end; justify-content: center; }
.flt-sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--fl-card, #1b3f46); border: 1px solid var(--fl-line, rgba(244,246,242,.14)); border-radius: 20px 20px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; color: var(--fl-text, #f4f6f2); font-size: 17px; }
@media (min-width: 640px) { .flt-sheet-veil { align-items: center; } .flt-sheet { border-radius: 20px; } }
.flt-sheet h3 { margin: 0; font-size: 1.3rem; font-weight: 800; }
.flt-sheet p { margin: 0; color: var(--fl-text-2, rgba(244,246,242,.72)); font-size: .95rem; }
.flt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.flt-grid .span2 { grid-column: 1 / -1; }
.flt-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.flt-field label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fl-text-2, rgba(244,246,242,.72)); font-weight: 800; }
.flt-field input, .flt-field select, .flt-field textarea { width: 100%; box-sizing: border-box; min-height: 50px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--fl-line, rgba(244,246,242,.14)); background: var(--fl-bg, #122e34); color: var(--fl-text, #f4f6f2); font: inherit; font-size: 18px; }
.flt-field textarea { min-height: 72px; resize: vertical; }
.flt-field input:focus, .flt-field select:focus, .flt-field textarea:focus { outline: none; border-color: var(--fl-mint, #00c3a9); }
.flt-field .hint { font-size: .8rem; color: var(--fl-text-2, rgba(244,246,242,.72)); }
.flt-sheet-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.flt-sheet-actions .flt-btn { flex: 1 1 140px; }
.flt-readings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.flt-readings input { font-size: 22px; font-weight: 800; text-align: center; }
@media (max-width: 420px) { .flt-grid { grid-template-columns: 1fr; } .flt-readings { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Fleet admin (2026-09-24). The buttons follow fleet_whoami(); the database
   is what actually refuses a non-admin (nx_fleet_admin_ok() in RLS). */
.flt-admin-panel { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between;
  padding: 18px 20px; margin-bottom: 18px; border-radius: 16px; border: 1px solid rgba(18,46,52,.16); background: #fff; }
.flt-admin-panel h3 { margin: 4px 0 6px; font-size: 1.1rem; }
.flt-admin-panel p { margin: 0; max-width: 62ch; }
.flt-admin-panel.flt-admin-on { border-color: #122e34; box-shadow: inset 5px 0 0 #00c3a9; }
.flt-admin-panel.flt-admin-readonly { background: transparent; }
.flt-admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-width: min(100%, 360px); }
.flt-admin-list li { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.flt-admin-list small { display: block; opacity: .75; }
.flt-admin-this { font-size: .78rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #122e34; color: #f4f6f2; }
.flt-devices-readonly [data-act="add-device"], .flt-devices-readonly [data-act^="device-"] { display: none !important; }

/* ── Stat cards are buttons; the work list (2026-09-24) ─────────────── */
button.flt-stat { font: inherit; text-align: left; cursor: pointer; width: 100%; min-height: 48px; color: inherit; transition: border-color .15s, box-shadow .15s; }
button.flt-stat:hover { border-color: var(--fl-text-2); }
button.flt-stat:focus-visible { outline: 3px solid var(--fl-mint, #00c3a9); outline-offset: 2px; }
button.flt-stat[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--fl-ink, #122e34); }
button.flt-stat:disabled { cursor: default; }
.flt-work { display: grid; gap: 14px; }
.flt-work-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.flt-work-head h2 { margin: 2px 0 0; font-size: 1.6rem; line-height: 1.1; }
.flt-work-head h2 small { font-size: .9rem; font-weight: 600; color: var(--fl-text-2); margin-left: 6px; }
.flt-work-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.flt-work-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flt-work-row { font: inherit; color: inherit; width: 100%; text-align: left; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 14px 16px; min-height: 64px; background: var(--fl-card); border: 1px solid var(--fl-line); border-radius: 14px; }
.flt-work-row:hover { border-color: var(--fl-text-2); }
.flt-work-row:focus-visible { outline: 3px solid var(--fl-mint, #00c3a9); outline-offset: 2px; }
.flt-work-what, .flt-work-num { display: grid; gap: 3px; min-width: 0; }
.flt-work-what b { font-size: 1.02rem; }
.flt-work-what b small { font-weight: 600; color: var(--fl-text-2); margin-left: 4px; }
.flt-work-what > span, .flt-work-num > span { font-size: .8rem; color: var(--fl-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flt-work-num { text-align: right; }
.flt-work-num b { font-size: 1rem; white-space: nowrap; }
@media (max-width: 520px) {
  .flt-work-row { grid-template-columns: minmax(0, 1fr) auto; }
  .flt-work-num { grid-column: 1; grid-row: 2; text-align: left; }
  .flt-work-row > .flt-pill { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
.flt-part-card.flt-flash { animation: flt-flash 1.6s ease-out 1; }
@keyframes flt-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--fl-amber, #f1aa3e); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .flt-part-card.flt-flash { animation: none; outline: 3px solid var(--fl-amber, #f1aa3e); } }
/* Printing the work list prints the list, not the app around it. */
@media print {
  body * { visibility: hidden !important; }
  .flt-work, .flt-work * { visibility: visible !important; }
  .flt-work { position: absolute; inset: 0 auto auto 0; width: 100%; }
  .flt-work-actions { display: none !important; }
  .flt-work-row { break-inside: avoid; border-color: #999; }
}
/* A phone's header is one row: the logo and the two actions. The tagline was
   squeezing the logo and pushing "+ Add vehicle" onto a second line. */
@media (max-width: 520px) {
  #fleetView .flt-tagline { display: none; }
  #fleetView .flt-topbar { flex-wrap: nowrap; }
}
.flt-spend { font-size: .82rem; color: var(--fl-text-2); text-align: right; }
.flt-spend b { color: var(--fl-text); font-size: .95rem; }
/* The 160px floor lines the three device slots up side by side; stacked on a
   phone it only left an empty box under "Native Android enrollment pending". */
@media (max-width: 850px) { #fleetView .flt-device-empty { min-height: 0; } }
/* Papers: registration, state inspection, insurance. Amber is the mark's
   "act now"; there is no red on the fleet screen. */
.flt-papers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.flt-paper { display: inline-flex; align-items: baseline; gap: 5px; font-size: .78rem; color: var(--fl-text-2); background: var(--fl-card); border: 1px solid var(--fl-line); border-radius: 999px; padding: 4px 10px; }
.flt-paper b { color: var(--fl-text); font-weight: 700; }
.flt-paper--expired { background: #fff3da; border-color: #efd8aa; color: #705015; }
.flt-paper--expired b { color: #5a3f0e; }
.flt-paper--soon { border-color: #efd8aa; color: #705015; }
.flt-card-meta .flt-paper { font-weight: 700; padding: 2px 8px; }
.flt-work-sub { margin: 6px 0 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fl-text-2); font-weight: 800; }
/* ── Plan a route (Google Routes) ─────────────────────────────────────── */
.flt-route { display: grid; gap: 8px; padding: 14px 16px; background: var(--fl-card); border: 1px solid var(--fl-line); border-radius: 16px; }
.flt-route-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.flt-route-head h3 { margin: 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fl-text-2); font-weight: 800; }
.flt-route-from { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--fl-text-2); font-weight: 650; }
.flt-route-from select { min-height: 44px; border-radius: 10px; border: 1px solid var(--fl-line); background: var(--fl-bg, #fff); color: var(--fl-text); font: inherit; padding: 0 10px; max-width: 60vw; }
.flt-route-step { margin: 0; font-size: 1rem; color: var(--fl-text); }
.flt-route-err { color: var(--fl-amber-text, #9a6200); font-weight: 650; }
.flt-route-result { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 1.35rem; color: var(--fl-text); }
.flt-route-result span { font-size: .8rem; color: var(--fl-text-2); flex-basis: 100%; }
.flt-route-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.flt-route-actions:empty { display: none; }

/* ─── work orders (2026-09-24) ─────────────────────────────────────── */
.flt-map-canvas { position: relative; width: 100%; height: 100%; }
.flt-tab-n { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--fl-amber); color: var(--fl-ink); font-size: .78rem; line-height: 20px; text-align: center; }
.flt-wo-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.flt-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--fl-card); border: 1px solid var(--fl-line); }
.flt-seg-btn { min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--fl-text); font: inherit; font-weight: 700; cursor: pointer; }
.flt-seg-btn b { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 10px; background: var(--fl-line); line-height: 20px; }
.flt-seg-btn[aria-pressed="true"] { background: var(--fl-mint); color: var(--fl-ink); }
.flt-seg-btn[aria-pressed="true"] b { background: rgba(18, 46, 52, .18); }
.flt-seg-btn:focus-visible { outline: 3px solid var(--fl-amber); outline-offset: 2px; }
.flt-wo { border-left: 5px solid var(--fl-line); }
.flt-wo.flt-wo--in_progress { border-left-color: var(--fl-mint); }
.flt-wo.flt-wo--planned { border-left-color: var(--fl-amber); }
.flt-wo.flt-wo--mine { box-shadow: 0 0 0 2px var(--fl-mint) inset; }
.flt-wo-status { flex: 0 0 auto; padding: 3px 9px; border-radius: 8px; font-size: .75rem; font-weight: 800; letter-spacing: .04em; border: 1.5px solid currentColor; }
.flt-wo.flt-wo--in_progress .flt-wo-status { color: var(--fl-mint-text); }
.flt-wo.flt-wo--planned .flt-wo-status { color: var(--fl-amber-text); }
.flt-wo-place b { color: var(--fl-text); }
.flt-wo-issues, .flt-wo-pick { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.flt-wo-issues li { display: flex; gap: 8px; align-items: baseline; font-weight: 600; }
.flt-wo-issues li span, .flt-wo-sev { flex: 0 0 auto; font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: 1px 7px; border-radius: 6px; border: 1.5px solid currentColor; }
.flt-wo-issues .flt-sev--urgent span, .flt-wo-sev.flt-sev--urgent { color: var(--fl-amber-text); }
.flt-wo-issues .flt-sev--fixed { opacity: .75; text-decoration: line-through; text-decoration-thickness: 1px; }
.flt-wo-issues .flt-sev--fixed span { color: var(--fl-mint-text); text-decoration: none; }
.flt-wo-pick label { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; }
.flt-wo-pick input { width: 22px; height: 22px; accent-color: var(--fl-mint); }
.flt-wo-pick small { flex-basis: 100%; padding-left: 30px; color: var(--fl-text-2); font-weight: 500; }
.flt-wo-total { margin-top: 10px; font-weight: 800; }
.flt-wo-sub { margin: 22px 0 10px; font-size: 1rem; }
.flt-wo-foot { margin: 16px 2px 4px; color: var(--fl-text-2); font-size: .85rem; }
.flt-wo .flt-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.flt-wo .flt-card-actions .flt-btn { flex: 0 1 auto; min-height: 44px; }
.flt-costs { display: grid; gap: 8px; }
.flt-cost-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px; gap: 8px; }
.flt-cost-row input, .flt-cost-row select { min-height: 44px; }
@media (max-width: 420px) { .flt-cost-row { grid-template-columns: 1fr 1fr; } .flt-cost-row input[name^="desc_"] { grid-column: 1 / -1; grid-row: 1; } }
.flt-pick-map { display: grid; gap: 6px; }
.flt-pick-map[hidden] { display: none; }
.flt-pick-box { height: 260px; border-radius: 12px; overflow: hidden; border: 2px solid var(--fl-line); }
.flt-pick-hint { margin: 0; font-size: .85rem; font-weight: 600; }

