/*
Descripción: Estilos del dashboard adaptable Mi flota.
Creado: 2026-11-27
Modificado: 2026-11-30
Revisión: r004
Cambios:
- 2026-11-30 | r004 | Presenta Leaflet con teselas geográficas y puntos WGS84 configurables.
- 2026-11-27 | r003 | Estiliza login, carga y error con ajustes responsive.
- 2026-11-27 | r002 | Añade estilos de estado para unidades sin posición GPS.
*/
:root {
    color-scheme: light;
    --page: #f8f7f4;
    --surface: #ffffff;
    --surface-soft: #f4f2ec;
    --surface-hover: #f8f6f0;
    --border: #e5e2da;
    --border-strong: #d8d4ca;
    --text: #171719;
    --muted: #77767b;
    --muted-strong: #5e5d63;
    --accent: #795a10;
    --gold: #b58e28;
    --gold-soft: #f6efd9;
    --green: #248451;
    --green-soft: #e8f4ed;
    --amber: #a8731a;
    --amber-soft: #fbf1dc;
    --status-red: #963a3a;
    --error: #963a3a;
    --blue: #4878b7;
    --violet: #8063aa;
    --sidebar: #151518;
    --sidebar-muted: #98979f;
    --sidebar-border: #2a2a2e;
    --sidebar-active: #252529;
    --map-ground: #eeede7;
    --map-block: #e3e1da;
    --map-road: #faf9f5;
    --map-road-major: #fffdfa;
    --map-highway: #d8c58f;
    --map-park: #d9e5d6;
    --map-park-path: #b9cbb4;
    --map-label: #92918b;
    --shadow: 0 12px 32px rgba(25, 24, 20, .045);
    --brand-letter: #fff;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --page: #0e0e10;
    --surface: #1a1a1e;
    --surface-soft: #222226;
    --surface-hover: #25252a;
    --border: #303036;
    --border-strong: #45454d;
    --text: #f5f5f6;
    --muted: #a0a0a8;
    --muted-strong: #c2c1c8;
    --accent: #d4af37;
    --gold: #d4af37;
    --gold-soft: #332d1b;
    --green: #62bd87;
    --green-soft: #1d3327;
    --amber: #e1b356;
    --amber-soft: #392f1e;
    --status-red: #ff9292;
    --error: #ff9292;
    --blue: #83a9dd;
    --violet: #b49bd5;
    --map-ground: #25282a;
    --map-block: #303436;
    --map-road: #383c3d;
    --map-road-major: #414647;
    --map-highway: #70623c;
    --map-park: #2c3d32;
    --map-park-path: #506957;
    --map-label: #a2a8a1;
    --shadow: 0 12px 32px rgba(0, 0, 0, .16);
    --brand-letter: #151518;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--page); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--page); color: var(--text); font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, a { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 62%, transparent); outline-offset: 3px; }
svg { display: block; }
.app-shell { min-height: 100vh; }

.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; width: 248px; flex-direction: column; padding: 26px 17px 16px; background: var(--sidebar); color: #f5f5f6; }
.brand { display: flex; min-height: 54px; align-items: center; gap: 11px; padding: 0 8px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; color: #d4af37; }
.brand-mark svg { width: 40px; height: 40px; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 15px; font-weight: 750; letter-spacing: .075em; }
.brand-copy small { color: #9e9da5; font-size: 8px; font-weight: 700; letter-spacing: .17em; }
.nav-section-label { margin: 42px 10px 12px; color: #77767e; font-size: 9px; font-weight: 750; letter-spacing: .14em; }
.main-nav { display: grid; gap: 5px; }
.nav-link { position: relative; display: flex; min-height: 43px; align-items: center; gap: 12px; padding: 0 11px; border: 1px solid transparent; border-radius: 9px; color: var(--sidebar-muted); font-size: 12px; font-weight: 560; text-decoration: none; transition: background .16s, color .16s; }
.nav-link > svg { width: 17px; height: 17px; flex: 0 0 auto; }
.nav-link:hover { background: #202024; color: #fff; }
.nav-link.active { border-color: #333236; background: var(--sidebar-active); color: #f5f4f1; }
.nav-link.active > svg { color: #d4af37; }
.nav-count { display: grid; min-width: 21px; height: 20px; margin-left: auto; place-items: center; border-radius: 6px; background: #35343a; color: #e9e8eb; font-size: 10px; font-weight: 700; }
.live-dot, .account-type-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #46b97b; box-shadow: 0 0 0 3px rgba(70, 185, 123, .12); }
.soon-tag { margin-left: auto; color: #77767e; font-size: 8px; font-weight: 750; letter-spacing: .05em; }
.sidebar-bottom { display: grid; gap: 17px; margin-top: auto; }
.support-card { display: grid; gap: 6px; padding: 15px 13px 13px; border: 1px solid #303035; border-radius: 11px; background: #1d1d21; }
.support-icon { display: grid; width: 27px; height: 27px; margin-bottom: 3px; place-items: center; border: 1px solid #3a393d; border-radius: 8px; color: #d4af37; }
.support-icon svg { width: 15px; height: 15px; }
.support-card strong { font-size: 11px; font-weight: 650; }
.support-card > span:not(.support-icon) { color: #98979f; font-size: 10px; }
.support-card a { display: flex; justify-content: space-between; margin-top: 4px; color: #d4af37; font-size: 10px; font-weight: 650; text-decoration: none; }
.account-row { display: flex; align-items: center; gap: 9px; padding: 2px 3px; }
.account-avatar, .user-avatar { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #37352d; color: #e3c564; font-size: 12px; font-weight: 750; }
.account-copy { display: grid; min-width: 0; gap: 3px; }
.account-copy strong { overflow: hidden; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { color: #929198; font-size: 9px; }
.icon-button { display: inline-grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { background: var(--surface-soft); color: var(--text); }
.account-menu { margin-left: auto; color: #8c8b92; font-size: 16px; letter-spacing: 1px; }
.sidebar-footnote { padding: 0 5px; color: #6e6d74; font-size: 8px; font-weight: 700; letter-spacing: .14em; }
.sidebar-footnote span { margin: 0 4px; color: #b58e28; }

.main-content { min-height: 100vh; margin-left: 248px; }
.topbar { position: sticky; z-index: 10; top: 0; display: flex; height: 70px; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--page) 92%, transparent); backdrop-filter: blur(12px); }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 11px; }
.breadcrumb strong { color: var(--text); font-weight: 650; }
.crumb-divider { color: var(--border-strong); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.account-type { display: flex; align-items: center; gap: 8px; color: var(--muted-strong); font-size: 10px; font-weight: 620; }
.account-type-dot { width: 6px; height: 6px; margin: 0; box-shadow: none; }
.topbar-divider { height: 24px; border-left: 1px solid var(--border); }
.theme-toggle { display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--muted-strong); cursor: pointer; transition: all .16s; }
.theme-toggle:hover { border-color: var(--gold); color: var(--accent); }
.theme-toggle svg { width: 17px; height: 17px; }
.moon-icon { display: none; }
html[data-theme="dark"] .sun-icon { display: none; }
html[data-theme="dark"] .moon-icon { display: block; }
.notification-button { position: relative; }
.notification-button svg { width: 17px; height: 17px; }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border: 1px solid var(--page); border-radius: 50%; background: #b58e28; }
.user-avatar { width: 31px; height: 31px; background: #e9e5da; color: #4f452d; font-size: 10px; }
html[data-theme="dark"] .user-avatar { background: #38332a; color: #e3c564; }
.user-name { color: var(--muted-strong); font-size: 10px; font-weight: 620; }
.user-chevron { width: 21px; color: var(--muted); font-size: 16px; }
.mobile-menu { display: none; }

.page-content { width: min(100%, 1550px); margin: 0 auto; padding: 30px 34px 30px; }
.page-heading { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.eyebrow-line { width: 15px; border-top: 1px solid currentColor; }
h1, h2, p { margin: 0; }
h1 { display: flex; align-items: center; gap: 10px; font-size: 25px; font-weight: 720; letter-spacing: -.045em; line-height: 1.2; }
.heading-count { display: grid; min-width: 23px; height: 21px; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--muted-strong); font-size: 10px; font-weight: 650; letter-spacing: 0; }
.page-heading p { margin-top: 6px; color: var(--muted); font-size: 11px; }
.heading-actions { display: flex; align-items: center; gap: 12px; }
.updated-pill { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: #56ad78; box-shadow: 0 0 0 3px color-mix(in srgb, #56ad78 14%, transparent); }
.button { display: inline-flex; min-height: 35px; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border-radius: 8px; font-size: 10px; font-weight: 620; cursor: pointer; }
.button svg { width: 14px; height: 14px; }
.button-outline { border: 1px solid var(--border); background: var(--surface); color: var(--muted-strong); }
.button-outline:hover { border-color: var(--border-strong); color: var(--text); }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.stat-card { position: relative; display: flex; min-height: 85px; align-items: center; gap: 12px; padding: 15px 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.stat-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 10px; }
.stat-icon svg { width: 19px; height: 19px; }
.stat-icon-neutral { background: var(--surface-soft); color: var(--muted-strong); }
.stat-icon-green { background: var(--green-soft); color: var(--green); }
.stat-icon-amber { background: var(--amber-soft); color: var(--amber); }
.stat-copy { display: grid; gap: 4px; }
.stat-copy > span { color: var(--muted); font-size: 9px; font-weight: 550; }
.stat-copy strong { font-size: 20px; font-weight: 720; letter-spacing: -.04em; line-height: 1; }
.stat-foot, .stat-indicator { margin-left: auto; align-self: flex-end; padding-bottom: 2px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.stat-indicator { display: flex; align-items: center; gap: 5px; color: var(--green); }
.stat-indicator i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .93fr); align-items: start; gap: 16px; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.map-panel { display: flex; flex-direction: column; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 17px 18px 14px; }
.panel-heading h2 { font-size: 12px; font-weight: 700; letter-spacing: -.015em; }
.panel-heading p { margin-top: 5px; color: var(--muted); font-size: 9px; }
.panel-title-row { display: flex; align-items: center; gap: 9px; }
.map-live { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid color-mix(in srgb, var(--green) 23%, transparent); border-radius: 5px; background: var(--green-soft); color: var(--green); font-size: 7px; font-weight: 800; letter-spacing: .08em; }
.map-live i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 16%, transparent); }
.location-pin { margin-right: 3px; color: var(--gold); font-size: 12px; }
.heading-separator { margin: 0 4px; color: var(--border-strong); }
.map-actions { display: flex; align-items: center; gap: 8px; }
.map-refresh { display: flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-size: 8px; }
.map-refresh svg { width: 12px; height: 12px; }
.panel-menu { width: 28px; height: 28px; color: var(--muted); font-size: 14px; letter-spacing: 1px; }
.map-stage { position: relative; min-height: 380px; overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--map-ground); isolation: isolate; }
.map-zoom-controls { position: absolute; z-index: 4; right: 15px; top: 15px; display: grid; width: 31px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 2px 9px rgba(0, 0, 0, .08); }
.map-zoom-controls button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; background: transparent; color: var(--muted-strong); font-size: 18px; line-height: 1; cursor: pointer; }
.map-zoom-controls button:hover { background: var(--surface-soft); color: var(--text); }
.map-zoom-controls button svg { width: 14px; height: 14px; }
.map-zoom-controls span { border-top: 1px solid var(--border); }
.map-attribution { position: absolute; z-index: 2; bottom: 12px; left: 14px; padding: 5px 7px; border: 1px solid color-mix(in srgb, var(--border) 75%, transparent); border-radius: 5px; background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--muted); font-size: 7px; backdrop-filter: blur(6px); }
.map-attribution span { margin: 0 3px; color: var(--gold); }
.map-legend { display: flex; min-height: 42px; align-items: center; gap: 17px; padding: 0 18px; color: var(--muted-strong); font-size: 8px; }
.map-legend > span:not(.legend-updated) { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.map-legend strong { margin-left: 1px; color: var(--text); font-size: 8px; font-weight: 700; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-online { background: var(--green); }
.legend-stale { background: var(--amber); }
.legend-updated { margin-left: auto; color: var(--muted); font-size: 8px; white-space: nowrap; }

.fleet-column { display: grid; gap: 15px; }
.fleet-heading { min-height: 62px; padding: 15px 15px 12px; }
.fleet-heading p { font-size: 9px; }
.vehicle-list { display: grid; max-height: 291px; overflow: auto; padding: 0 8px; scrollbar-color: var(--border-strong) transparent; scrollbar-width: thin; }
.vehicle-row { display: flex; min-height: 66px; align-items: center; gap: 9px; padding: 9px 8px; border: 1px solid transparent; border-bottom-color: var(--border); border-radius: 8px; background: transparent; text-align: left; cursor: pointer; transition: background .15s, border-color .15s; }
.vehicle-row:last-child { border-bottom-color: transparent; }
.vehicle-row:hover { background: var(--surface-hover); }
.vehicle-row.is-selected { border-color: color-mix(in srgb, var(--gold) 28%, var(--border)); background: color-mix(in srgb, var(--gold-soft) 62%, var(--surface)); }
.vehicle-glyph { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--surface-soft); color: var(--muted-strong); }
.vehicle-glyph svg { width: 18px; height: 18px; }
.glyph-gold { background: var(--gold-soft); color: var(--accent); }
.glyph-blue { background: color-mix(in srgb, var(--blue) 13%, var(--surface)); color: var(--blue); }
.glyph-violet { background: color-mix(in srgb, var(--violet) 13%, var(--surface)); color: var(--violet); }
.glyph-amber { background: var(--amber-soft); color: var(--amber); }
.vehicle-main { display: grid; min-width: 0; flex: 1; gap: 5px; }
.vehicle-main strong { overflow: hidden; color: var(--text); font-size: 9px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.vehicle-main small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.vehicle-main small i { margin: 0 3px; color: var(--border-strong); font-style: normal; }
.vehicle-meta { display: grid; justify-items: end; gap: 5px; color: var(--muted); }
.vehicle-meta small { font-size: 8px; white-space: nowrap; }
.status-dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; }
.status-online { background: var(--green); }
.status-stale { background: var(--amber); }
.status-no_position { background: var(--muted-strong); }
.vehicle-meta > .status-dot { margin-right: 1px; }
.add-vehicle-button { display: flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; margin: 0 14px 13px; border: 1px dashed var(--border-strong); border-radius: 8px; background: transparent; color: var(--muted-strong); font-size: 9px; font-weight: 650; cursor: not-allowed; }
.add-vehicle-button > span { display: grid; width: 16px; height: 16px; place-items: center; border-radius: 5px; background: var(--surface-soft); color: var(--muted-strong); font-size: 14px; }
.add-vehicle-button small { margin-left: 3px; color: var(--muted); font-size: 7px; font-weight: 750; letter-spacing: .07em; }
.selected-panel { padding-bottom: 12px; }
.selected-heading { align-items: flex-start; padding: 16px 15px 10px; }
.selected-heading .eyebrow { margin-bottom: 6px; font-size: 7px; }
.selected-heading h2 { max-width: 175px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 5px; font-size: 7px; font-weight: 680; white-space: nowrap; }
.status-badge-online { background: var(--green-soft); color: var(--green); }
.status-badge-stale { background: var(--amber-soft); color: var(--amber); }
.status-badge-no_position { background: var(--surface-soft); color: var(--muted-strong); }
.legend-no-position { background: var(--muted-strong); }
.selected-address { display: flex; align-items: center; gap: 6px; margin: 0 15px 14px; color: var(--muted); font-size: 8px; }
.selected-address svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--gold); }
.selected-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 11px 13px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.selected-details > div { display: grid; min-width: 0; gap: 7px; padding-left: 9px; border-left: 1px solid var(--border); }
.selected-details > div:first-child { padding-left: 2px; border-left: 0; }
.selected-details > div > span { color: var(--muted); font-size: 7px; white-space: nowrap; }
.selected-details strong { display: flex; align-items: center; gap: 5px; overflow: hidden; font-size: 9px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.selected-details strong small { color: var(--muted); font-size: 7px; font-weight: 500; }
.detail-clock { width: 6px; height: 6px; border: 1px solid var(--green); border-radius: 50%; box-shadow: 0 0 0 2px var(--green-soft); }
.ignition-indicator { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.selected-foot { display: flex; justify-content: space-between; gap: 8px; padding: 10px 15px 0; color: var(--muted); font-size: 7px; }
.selected-foot span:last-child { color: var(--muted-strong); font-variant-numeric: tabular-nums; }
.demo-note { display: flex; align-items: center; gap: 8px; margin-top: 15px; color: var(--muted); font-size: 8px; }
.demo-note-icon { display: grid; width: 15px; height: 15px; flex: 0 0 auto; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--muted-strong); font-size: 9px; font-weight: 700; }
.empty-map-state { position: absolute; z-index: 5; inset: 0; display: grid; align-content: center; justify-items: center; gap: 9px; background: color-mix(in srgb, var(--map-ground) 81%, transparent); text-align: center; backdrop-filter: blur(2px); }
.empty-map-icon, .empty-fleet-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--gold); }
.empty-map-icon svg, .empty-fleet-icon svg { width: 20px; height: 20px; }
.empty-map-state strong, .empty-fleet-state strong { font-size: 11px; font-weight: 700; }
.empty-map-state > span:not(.empty-map-icon), .empty-fleet-state > span:not(.empty-fleet-icon) { color: var(--muted); font-size: 9px; }
.empty-map-state a { margin-top: 3px; color: var(--accent); font-size: 9px; font-weight: 650; text-decoration: none; }
.empty-fleet-state { display: grid; min-height: 198px; align-content: center; justify-items: center; gap: 8px; padding: 18px; text-align: center; }
.empty-fleet-icon { width: 37px; height: 37px; margin-bottom: 2px; }
.empty-fleet-icon svg { width: 18px; height: 18px; }
.selected-empty { padding: 15px; color: var(--muted); font-size: 9px; line-height: 1.6; }

@media (max-width: 1250px) {
    .sidebar { width: 220px; }
    .main-content { margin-left: 220px; }
    .page-content { padding-right: 24px; padding-left: 24px; }
    .topbar { padding-right: 24px; padding-left: 24px; }
    .workspace-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr); gap: 12px; }
    .map-stage { min-height: 350px; }
    .map-legend { gap: 10px; padding-right: 13px; padding-left: 13px; }
    .legend-updated { font-size: 7px; }
}
@media (max-width: 1000px) {
    .sidebar { width: 72px; align-items: center; padding-right: 10px; padding-left: 10px; }
    .brand { justify-content: center; padding: 0; }
    .brand-copy, .nav-section-label, .nav-link > span:not(.nav-count):not(.live-dot), .nav-count, .soon-tag, .sidebar-bottom { display: none; }
    .main-nav { width: 100%; margin-top: 35px; }
    .nav-link { justify-content: center; padding: 0; }
    .nav-link > svg { width: 19px; height: 19px; }
    .live-dot { position: absolute; top: 8px; right: 9px; width: 5px; height: 5px; }
    .main-content { margin-left: 72px; }
    .workspace-grid { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .9fr); }
}
@media (max-width: 760px) {
    .sidebar { z-index: 40; width: 248px; align-items: stretch; transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar.is-open { transform: translateX(0); box-shadow: 15px 0 45px rgba(0, 0, 0, .25); }
    .brand { justify-content: flex-start; padding: 0 8px; }
    .brand-copy, .nav-section-label, .nav-link > span:not(.nav-count):not(.live-dot), .nav-count, .soon-tag, .sidebar-bottom { display: initial; }
    .brand-copy { display: grid; }
    .main-nav { margin-top: 0; }
    .nav-link { justify-content: flex-start; padding: 0 11px; }
    .nav-link > svg { width: 17px; height: 17px; }
    .nav-link.active > span:not(.nav-count) { display: initial; }
    .nav-count { display: grid; }
    .sidebar-bottom { display: grid; }
    .main-content { margin-left: 0; }
    .topbar { height: 60px; gap: 8px; padding: 0 16px; }
    .mobile-menu { display: inline-grid; width: 31px; height: 31px; margin-left: -5px; }
    .mobile-menu svg { width: 17px; height: 17px; }
    .breadcrumb { margin-right: auto; gap: 7px; font-size: 10px; }
    .topbar-actions { gap: 8px; }
    .account-type, .topbar-divider, .user-name, .user-chevron { display: none; }
    .user-avatar { width: 29px; height: 29px; }
    .page-content { padding: 22px 16px 24px; }
    .page-heading { align-items: flex-start; margin-bottom: 17px; }
    .page-heading h1 { font-size: 23px; }
    .page-heading p { max-width: 245px; font-size: 10px; line-height: 1.5; }
    .heading-actions { flex-direction: column-reverse; align-items: flex-end; gap: 9px; }
    .updated-pill { font-size: 7px; }
    .button { min-height: 32px; padding: 0 9px; }
    .stats-grid { gap: 8px; margin-bottom: 12px; }
    .stat-card { min-height: 75px; gap: 8px; padding: 10px; }
    .stat-icon { width: 30px; height: 30px; border-radius: 8px; }
    .stat-icon svg { width: 15px; height: 15px; }
    .stat-copy > span { max-width: 78px; font-size: 8px; line-height: 1.25; }
    .stat-copy strong { font-size: 17px; }
    .stat-foot, .stat-indicator { display: none; }
    .workspace-grid { grid-template-columns: 1fr; gap: 12px; }
    .fleet-column { grid-template-columns: 1fr; }
    .map-stage { min-height: 360px; }
    .map-legend { flex-wrap: wrap; gap: 8px 13px; padding: 8px 13px; }
    .legend-updated { width: 100%; margin-left: 13px; }
    .vehicle-list { max-height: 330px; }
    .selected-heading h2 { max-width: 230px; }
}
@media (max-width: 420px) {
    .page-heading { gap: 8px; }
    .page-heading .eyebrow { font-size: 7px; }
    .page-heading h1 { font-size: 21px; }
    .page-heading p { max-width: 205px; }
    .updated-pill { max-width: 135px; white-space: normal; }
    .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stat-card { display: grid; min-height: 91px; align-content: center; justify-items: start; gap: 6px; padding: 9px; }
    .stat-icon { position: absolute; top: 9px; right: 8px; width: 24px; height: 24px; }
    .stat-icon svg { width: 13px; height: 13px; }
    .map-stage { min-height: 320px; }
    .map-label { font-size: 10px; }
    .map-label-major { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Estados del proveedor, sesión web y contraste legible en escritorio y ventana estrecha. */
.map-refresh { min-height: 34px; background: var(--surface); cursor: pointer; font-size: 12px; }
.map-refresh svg { width: 15px; height: 15px; }
.map-refresh:hover, .map-refresh:focus-visible { border-color: var(--accent); color: var(--accent); }
.vehicle-main strong, .selected-heading h2 { font-size: 14px; }
.vehicle-main small, .vehicle-meta small { font-size: 11px; }
.status-badge { font-size: 10px; }
.selected-address, .selected-details > div > span, .selected-foot, .demo-note { font-size: 11px; }
.selected-details strong { font-size: 12px; }
.selected-details strong small { font-size: 10px; }
.stat-copy > span { font-size: 11px; }
.stat-foot, .stat-indicator, .map-legend, .map-attribution { font-size: 10px; }
.map-legend strong { font-size: 11px; }
.empty-map-state strong, .empty-fleet-state strong { font-size: 14px; }
.empty-map-state > span:not(.empty-map-icon), .empty-fleet-state > span:not(.empty-fleet-icon), .selected-empty { font-size: 12px; }
.vehicle-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.status-offline { background: var(--status-red); }
.status-unknown, .status-unlinked, .status-tracker_missing { background: var(--muted-strong); }
.status-badge-offline { background: color-mix(in srgb, var(--status-red) 13%, var(--surface)); color: var(--status-red); }
.status-badge-unknown, .status-badge-unlinked, .status-badge-tracker_missing { background: var(--surface-soft); color: var(--muted-strong); }
.fleet-service-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 16px; padding: 13px 16px; border: 1px solid color-mix(in srgb, #bd4545 38%, var(--border)); border-radius: 10px; background: color-mix(in srgb, #bd4545 8%, var(--surface)); color: var(--text); }
.fleet-service-alert strong { color: var(--error); font-size: 14px; }
.fleet-service-alert span { flex: 1 1 230px; color: var(--muted-strong); font-size: 12px; }
.fleet-service-alert button, .service-fleet-state button, .service-map-state button { min-height: 36px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); color: var(--accent); cursor: pointer; font-size: 12px; font-weight: 650; }
.fleet-refresh-status { margin-bottom: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted-strong); }
.fleet-refresh-status:not([hidden])::before { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; content: ""; animation: fleet-spin .8s linear infinite; }
.service-error-copy { margin: 20px; color: var(--error); font-size: 13px; }
.service-map-state { background: color-mix(in srgb, var(--map-ground) 90%, transparent); }
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 22px; background: var(--page); }
.login-card { position: relative; width: min(100%, 440px); padding: 34px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.login-brand { padding: 0; color: var(--text); }
.login-brand .brand-copy small { color: var(--muted); }
.login-theme-toggle { position: absolute; top: 26px; right: 24px; }
.login-card > .eyebrow { margin-top: 35px; color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .09em; }
.login-card h1 { margin: 7px 0; font-size: 26px; }
.login-intro { margin: 0 0 23px; color: var(--muted-strong); font-size: 14px; }
.login-form { display: grid; gap: 9px; }
.login-form label { margin-top: 8px; font-size: 13px; font-weight: 650; }
.login-form input { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--page); color: var(--text); font: inherit; }
.login-form input:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--gold) 27%, transparent); }
.login-submit { min-height: 48px; margin-top: 14px; border: 0; border-radius: 9px; background: var(--text); color: var(--surface); cursor: pointer; font-weight: 700; }
.login-error { margin: 0; color: var(--error); font-size: 12px; }
.login-submit:focus-visible, .fleet-service-alert button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@keyframes fleet-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
    .vehicle-main strong, .selected-heading h2 { font-size: 14px; }
    .vehicle-main small, .vehicle-meta small, .selected-address { font-size: 11px; }
    .selected-details > div > span, .selected-foot, .map-legend, .demo-note { font-size: 10px; }
    .selected-details strong { font-size: 11px; }
    .stat-copy > span { font-size: 10px; }
    .map-refresh { min-height: 38px; }
    .login-card { padding: 26px 21px; }
}

/* Leaflet: mapa geográfico real con atribución de proveedor visible. */
.geographic-map { position: absolute; z-index: 0; inset: 0; background: var(--map-ground); }
.map-stage .leaflet-container { width: 100%; height: 100%; background: var(--map-ground); font: inherit; z-index: 0; }
.map-stage .leaflet-control-attribution { margin: 0 7px 6px 0; border: 1px solid var(--border); border-radius: 5px; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--muted-strong); font-size: 10px; }
.map-stage .leaflet-control-attribution a { color: var(--accent-text); }
.map-stage .leaflet-tooltip { border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .14); }
.map-stage .leaflet-tooltip-top:before { border-top-color: var(--surface); }
.map-stage .leaflet-pane { z-index: 2; }
.map-stage .leaflet-tile-pane { z-index: 2; }
.map-stage .leaflet-overlay-pane { z-index: 4; }
.map-stage .leaflet-tooltip-pane { z-index: 6; }
.map-zoom-controls { z-index: 450; }
.map-attribution { z-index: 450; bottom: 10px; left: 10px; color: var(--muted-strong); text-decoration: underline; }
.map-tiles-notice { display: none; position: absolute; z-index: 440; left: 10px; top: 10px; padding: 7px 9px; border-radius: 6px; background: var(--surface); color: var(--muted-strong); font-size: 11px; }
.map-stage.map-tiles-unavailable .map-tiles-notice { display: block; }
html[data-theme="dark"] .map-stage .leaflet-tile-pane { filter: brightness(.68) saturate(.72); }
@media (max-width: 900px) { .map-stage .leaflet-control-attribution { font-size: 9px; } }
