/* ============================ TAXINGON — Design system ============================ */
/* Paleta oficial del rebrand del cliente (2026-07-29, REBRAND-CLIENTE.md / PDF pág 3).
   Roles: --navy primario (CTAs, topbar) · --accent azul medio (superficies interactivas,
   chip activo, avatares) · --brand amarillo (estrellas/barras/resaltados; texto SOBRE
   amarillo SIEMPRE en tinta/marino: blanco daría 1.38:1) · --lav fondos e inputs ·
   --grayblue SOLO placeholders/flechas/estado ausente (sobre lavanda = 2.01:1, no para texto).
   #FFFF2C y #0E0E99 viven SOLO dentro de los SVG del logo (assets/), no son tokens. */
:root {
    --bg: #E7E7F7;
    --app-bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #E7E7F7;   /* Canvas Soft = lavanda claro */
    --surface-3: #d8d8ee;   /* Surface Pressed (:active), derivado de la lavanda */
    --ink: #000000;
    --ink-2: #5e5e5e;       /* text-body */
    --muted: #5e5e5e;
    --mute: #afafaf;        /* text-mute / hint */
    --line: #efefef;
    --line-2: #e2e2e2;      /* hairline */
    --brand: #F4DD08;       /* amarillo oficial de la paleta */
    --brand-ink: #000000;
    --navy: #141495;        /* azul marino oficial — primario */
    --accent: #1D4DB8;      /* azul medio oficial */
    --lav: #E7E7F7;         /* lavanda claro oficial */
    --grayblue: #99A6BF;    /* gris azulado oficial */
    --ok: #1f7a4d;
    --warn: #b25e09;
    --danger: #c0271a;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-pill: 999px;
    --shadow: 0 2px 8px rgba(0,0,0,.08);
    --shadow-lg: 0 6px 24px rgba(0,0,0,.16);
    --shadow-sheet: 0 -2px 16px rgba(0,0,0,.12);
    --safe-b: env(safe-area-inset-bottom, 0px);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); overscroll-behavior: none; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }

#app { height: 100%; display: flex; justify-content: center; }
#screen { width: 100%; max-width: 480px; height: 100%; background: var(--app-bg); position: relative; overflow: hidden; display: flex; flex-direction: column; }
#screen.wide { max-width: 1180px; }

/* ============================ Tipografía / utilidades ============================ */
.h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.h2 { font-size: 1.3125rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.muted { color: var(--muted); }
.small { font-size: .8125rem; line-height: 1.4; }
.tiny { font-size: .72rem; line-height: 1.35; }
.b { font-weight: 700; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }
.gap-sm { gap: 6px; }
.mt { margin-top: 12px; } .mt-lg { margin-top: 22px; }
.hide { display: none !important; }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ============================ Topbar ============================ */
.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 16px; background: var(--navy); color: #fff; flex: 0 0 auto;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: .03em; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; }
.topbar .who { text-align: right; line-height: 1.15; }
.topbar .who .name { font-weight: 700; font-size: .9rem; color: var(--brand); }
.topbar .who .sub { font-size: .72rem; color: rgba(244,221,8,.75); }

/* ============================ Botones ============================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 12px; padding: 14px 20px; font-weight: 600; font-size: 1rem; letter-spacing: 0;
    cursor: pointer; background: var(--surface-2); color: var(--ink);
    transition: transform .06s ease, filter .15s, background .15s;
}
.btn:hover { filter: brightness(.97); }
.btn:active { transform: scale(.98); background: var(--surface-3); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:active { background: #0E0E99; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:active { background: #0E0E99; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 22px; font-size: 1.125rem; border-radius: 12px; }
.btn-sm { padding: 9px 16px; font-size: .9rem; border-radius: 10px; }
.btn-pill { border-radius: var(--radius-pill) !important; height: 54px; padding: 0 22px; font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; }
.btn-pill.btn-block { border-radius: 12px !important; }
.btn:disabled { opacity: .5; pointer-events: none; }

/* Search-pill (CTA dominante del pasajero) + toggles Origen/Destino */
.searchbar {
    width: 100%; height: 56px; border: 0; border-radius: var(--radius-pill);
    background: var(--surface-2); padding: 0 18px; display: flex; align-items: center; gap: 12px;
    cursor: pointer; transition: background .15s;
}
.searchbar:active { background: var(--surface-3); }
.searchbar .sb-ic { display: flex; flex: 0 0 auto; }
.searchbar .sb-txt { font-size: 1.0625rem; font-weight: 500; color: var(--muted); }
.pin-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 1; height: 40px;
    border: 1px solid var(--line-2); border-radius: var(--radius-pill); background: #fff;
    font-size: .85rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.pin-toggle.sel { border-color: #000; color: #000; }
.pin-d { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.pin-d.g { background: var(--ok); }
.pin-d.b { background: var(--accent); }
.fare-hero { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 2px; }
.pill-neutral { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--muted); font-size: .74rem; font-weight: 600; }

/* ============================ Cards / superficies ============================ */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; border: 1px solid #f1f1f1; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.pad { padding: 16px; }
.body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.stack > * + * { margin-top: 12px; }

/* Bottom sheet (pasajero/chofer) */
.sheet {
    position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface);
    border-radius: 16px 16px 0 0; box-shadow: var(--shadow-sheet);
    padding: 8px 16px calc(16px + var(--safe-b)); z-index: 500; max-height: 82%; overflow-y: auto;
}
.sheet .grabber { width: 32px; height: 4px; border-radius: var(--radius-pill); background: var(--line-2); margin: 8px auto 12px; }

/* ============================ Campos ============================ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input {
    width: 100%; padding: 14px 16px; border: 1.5px solid transparent; border-radius: var(--radius-sm);
    background: var(--lav); font-size: 1rem; outline: none;
    transition: border .15s, box-shadow .15s, background .15s;
}
.input:focus { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px rgba(20,20,149,.12); }
textarea.input { resize: vertical; min-height: 64px; }

/* ============================ Chips / badges ============================ */
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: var(--radius-pill);
    border: 1px solid var(--line-2); background: var(--surface); font-size: .875rem; font-weight: 500; cursor: pointer;
}
.chip:active { background: var(--surface-3); }
.chip.active, .chip.sel { background: var(--accent); color: #fff; border-color: transparent; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: .72rem; font-weight: 600; letter-spacing: .01em; }
.badge.gray   { background: var(--lav); color: #5c6a85; }
.badge.yellow { background: var(--brand); color: var(--navy); }
.badge.blue   { background: var(--accent); color: #fff; }
.badge.purple { background: var(--lav); color: var(--accent); }
.badge.green  { background: #e7f7ee; color: #05854a; }
.badge.red    { background: #fdecec; color: #c0271a; }
.dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; }
.dot.green { background: var(--ok); } .dot.red { background: var(--danger); } .dot.gray { background: var(--grayblue); }

/* ============================ Stats ============================ */
/* minmax(0,1fr) y no 1fr: `1fr` es `minmax(auto,1fr)`, así que la etiqueta más larga
   ("FACTURADO HOY") empujaba su columna y las tres tiles del Panel salían de 164/164/172px
   —desiguales— en vez de idénticas como en el mock. */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stats.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid #f1f1f1; position: relative; }
.stat .v { font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.stat .k { font-size: .74rem; color: var(--muted); font-weight: 600; margin-top: 4px; text-transform: uppercase; letter-spacing: .03em; }
.stat .v.brand { color: var(--ink); }
/* Franja amarilla INSET (mock pág 11): va a la ALTURA DE LA CIFRA, no de toda la tile — el amarillo
   #F4DD08 es el color más saturado de la paleta y a barra completa pesaba más que el propio número.
   Se centra vertical con la cifra y respira en un carril propio (ver la regla del Panel abajo):
   antes iba en los 16px del padding y quedaba pegada al borde y a la cifra a la vez. */
.stat:has(.v.brand)::before { content: ''; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 3px; height: 26px; border-radius: 99px; background: var(--brand); }

/* ============================ Mapa ============================ */
.map { position: absolute; inset: 0; z-index: 1; }
.map-mini { height: 200px; border-radius: var(--radius); overflow: hidden; }
.leaflet-container { font: inherit; background: #e9e9e9; }
.leaflet-control-attribution { font-size: 9px !important; background: rgba(255,255,255,.65) !important; color: #9a9a9a !important; padding: 0 5px !important; border-radius: 6px 0 0 0; }
.leaflet-control-attribution a { color: #9a9a9a !important; }
.taxi-pin { font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.pin-dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.25); }
.pin-dot.green { background: var(--ok); } .pin-dot.blue { background: var(--accent); }

/* ============================ Listas ============================ */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); min-height: 56px; }
.item:last-child { border-bottom: 0; }
.item:active { background: var(--surface-2); }
.item .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 1.1rem; flex: 0 0 auto; color: #000; }
.item .tt { font-weight: 500; font-size: 1rem; color: #000; }
.item .ss { font-size: .875rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Avatar en AZUL MEDIO con iniciales blancas (rebrand pág 5: "avatares azul medio"). Se había
   quedado en el gris #efefef del diseño anterior: la app nativa ya lo tenía azul y la web no,
   así que la misma persona salía con avatar distinto en el teléfono y en el navegador. */
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
/* Estrellas amarillas: text-shadow azul como APROXIMACIÓN del contorno #1D4DB8 del rebrand
   (el contorno exacto solo se logra con estrella SVG fill+stroke; decidir con el cliente si basta). */
.stars { color: var(--brand); font-size: .9rem; letter-spacing: 1px; text-shadow: 0 0 1px var(--accent); }

/* ============================ Bottom nav ============================ */
.nav {
    flex: 0 0 auto; display: flex; background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: var(--safe-b); z-index: 400;
}
.nav button {
    flex: 1; background: none; border: 0; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px;
    color: var(--mute); font-size: .6875rem; font-weight: 500; cursor: pointer;
}
.nav button .ni { font-size: 1.3rem; }
.nav button.active { color: #000; font-weight: 600; }
.nav button.active .ni { transform: translateY(-1px); }

/* ============================ Admin layout ============================ */
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.admin-tabs button { white-space: nowrap; border: 0; background: var(--lav); border-radius: 99px; padding: 8px 16px; font-weight: 600; font-size: .86rem; cursor: pointer; color: var(--navy); transition: background .12s, color .12s, border-color .12s; }
.admin-tabs button:hover:not(.active) { background: #dcdcf0; color: var(--navy); }
.admin-tabs button.active { background: var(--accent); color: #fff; border-color: transparent; }
.table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table th {
  text-align: left; color: var(--muted); font-weight: 600;
  font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
  padding: 11px 12px; border-bottom: 1px solid var(--line-2);
  position: sticky; top: 0; background: var(--lav); z-index: 1;
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.table tbody tr:nth-child(even) td { background: var(--lav); }
.table tbody tr:hover td { background: #dcdcf0; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .money { font-weight: 700; }
.table .money.pos { color: var(--ok); }
.table .money.neg { color: var(--danger); }
.card > .table { border-radius: inherit; overflow: hidden; }

/* Mini barras de reporte */
/* justify-content + el max-width de .bar son el freno para series CORTAS: la serie de
   reports/trips_by_day viene de un GROUP BY sin relleno de ceros, así que si solo hubo viajes UN
   día llega un único punto y ese `flex: 1` lo estiraba a los ~490px del contenedor (un bloque
   amarillo gigante). Con el tope, una barra sola mide 72px y catorce siguen repartiéndose el
   ancho (a 14 el reparto real es menor que el tope, así que no estorba). */
.bars { display: flex; align-items: flex-end; justify-content: flex-start; gap: 6px; height: 150px; padding: 20px 0 22px; }
.bars .bar .bar-val { position: absolute; top: -16px; left: -4px; right: -4px; text-align: center; font-size: .6rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bars .bar {
  flex: 1 1 0; max-width: 72px; min-height: 3px; position: relative;
  background: var(--brand);
  border-radius: 5px 5px 0 0; transition: filter .12s;
}
.bars .bar:hover { filter: brightness(.95); }
.bars .bar span { position: absolute; bottom: -20px; left: -2px; right: -2px; text-align: center; font-size: .62rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============================ Login / landing ============================ */
.landing { flex: 1; display: flex; flex-direction: column; background: #000; color: #fff; padding: 0 22px; overflow-y: auto; }
.landing .hero { padding: 46px 0 18px; text-align: center; }
.landing .hero .logo { width: 84px; height: 84px; border-radius: 22px; margin: 0 auto 16px; box-shadow: var(--shadow-lg); }
.landing .hero h1 { font-size: 2.5rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.08; }
.landing .hero h1 .y { color: var(--brand); }
.landing .hero p { color: #afafaf; margin-top: 6px; }
.role-card {
    background: #121212; border: 1px solid #242424; border-radius: 16px;
    padding: 18px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: background .15s, transform .05s, border-color .15s; color: #fff;
}
.role-card:active { transform: scale(.99); }
.role-card:hover { background: #1b1b1b; border-color: #3a3a3a; }
.role-card .r-ic { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%; background: #1e1e1e; display: grid; place-items: center; color: #fff; }
.role-card .tt { font-weight: 800; font-size: 1.05rem; }
.role-card .ss { font-size: .82rem; color: #cbd5e1; }

/* ============================ Toast / modal ============================ */
#toast-host { position: fixed; left: 0; right: 0; bottom: 80px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 9000; pointer-events: none; }
.toast { background: #000; color: #fff; padding: 11px 18px; border-radius: var(--radius-pill); box-shadow: var(--shadow-lg); font-size: .9rem; font-weight: 600; max-width: 88%; animation: pop .2s ease; }
.toast.ok { background: var(--ok); } .toast.err { background: var(--danger); } .toast.warn { background: var(--warn); }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }

#modal-host:empty { display: none; }
#modal-host { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 8000; }
.modal { background: var(--surface); width: 100%; max-width: 480px; border-radius: 16px 16px 0 0; padding: 20px 18px calc(20px + var(--safe-b)); box-shadow: var(--shadow-lg); animation: up .22s ease; }
.modal.center { border-radius: 16px; margin: auto; max-width: 380px; }
@keyframes up { from { transform: translateY(20px); opacity: .6; } }

/* Pulso para "buscando" */
.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); position: relative; }
.pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ring 1.4s infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(3.4); opacity: 0; } }

.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand-ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.countdown { font-size: 2.4rem; font-weight: 900; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.kv { display: flex; justify-content: space-between; padding: 5px 0; font-size: .92rem; }
.kv .k { color: var(--muted); }
.kv.total { font-size: 1.15rem; font-weight: 800; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }

/* ============================ Componentes premium (auditoría Uber del workflow) ============================ */
.btn-outline { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-outline:hover { filter: none; background: var(--surface-2); }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* Cronómetro de espera (chofer) */
.wait-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px; }
.wait-card.on { border-color: var(--ink); }
.wait-label { display: flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.wait-cost { font-size: .8rem; color: var(--muted); font-weight: 600; }
.wait-time { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.wait-led { width: 9px; height: 9px; border-radius: 50%; background: #c8c8c8; display: inline-block; }
.wait-led.live { background: var(--ok); animation: waitPulse 1.3s infinite; }
@keyframes waitPulse { 0% { box-shadow: 0 0 0 0 rgba(14,138,79,.5); } 70% { box-shadow: 0 0 0 7px rgba(14,138,79,0); } 100% { box-shadow: 0 0 0 0 rgba(14,138,79,0); } }

/* Oferta de viaje (chofer) */
.offer-amount { font-size: 2.4rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.offer-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 12px; }
.offer-bar-fill { height: 100%; background: var(--ink); width: 100%; transform-origin: left; }
.offer-bar-fill.run { animation: offerDrain var(--dur, 15s) linear forwards; }
@keyframes offerDrain { to { width: 0%; } }
.countdown.urgent { color: var(--danger); animation: cdPulse .9s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes cdPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.modal .countdown { font-size: 1.5rem; text-align: right; }

/* Switch (toggle estilo iOS/Uber) */
.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; transition: .15s; }
.switch .track::before { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
/* Encendido en AMARILLO de marca (rebrand: "switches amarillos"), igual que la nativa, que usa
   trackColor {true: brand} con la perilla blanca. Antes era verde --ok: ese verde queda reservado
   para la semántica de dinero/estados, no para un ajuste de sí/no. */
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::before { transform: translateX(18px); }

/* Encabezado de sección (config admin) */
.sec-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sec-title { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.sec-sub { font-size: .8rem; color: var(--muted); line-height: 1.35; }

/* Leyenda flotante del mapa en vivo (admin) */
.map-legend { position: absolute; top: 12px; right: 12px; z-index: 600; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 10px 12px; font-size: .8rem; display: flex; flex-direction: column; gap: 6px; min-width: 132px; }
.map-legend .b { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.map-legend .lg-row { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.map-legend .lg-ic { font-size: 1rem; }
.map-legend .lg-pin { width: 12px; height: 12px; border-width: 2px; }

/* ============================ Pulido fino v4 (auditoría profunda 4 lentes) ============================ */
/* Foco accesible solo por teclado (anillo blanco+negro visible en cualquier fondo) + reduce-motion */
:focus-visible { outline: none; }
.btn:focus-visible, .chip:focus-visible, .searchbar:focus-visible, .pin-toggle:focus-visible,
.admin-tabs button:focus-visible, .nav button:focus-visible, .role-card:focus-visible,
a:focus-visible, .switch input:focus-visible + .track { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000; }
.input:focus-visible { box-shadow: 0 0 0 3px rgba(0,0,0,.12); }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
/* Elevación: sombra sin doble borde (Uber usa solo sombra en cards elevadas) */
.card, .stat { border: 0; }
.card.flat { border: 1px solid var(--line-2); }
/* Topbar / landing: hairline inferior. (El subtítulo .who .sub queda en amarillo, regla de
   la sección Topbar — mock pág 11: 'Central - Owner' en amarillo como la línea principal.) */
.topbar { box-shadow: inset 0 -1px 0 rgba(255,255,255,.07); }
.role-card .ss { color: #afafaf; }
/* Bordes de control a 1px nítido + foco con anillo (sin salto de layout) */
.btn-outline { border-width: 1px; }
.input, select.input, textarea.input { border-width: 1px; }
.input:focus { box-shadow: 0 0 0 3px rgba(20,20,149,.12); }
/* Tipografía: montos-héroe unificados a 800 y tamaños sueltos a .875rem */
.offer-amount, .countdown { font-weight: 700; }
.admin-tabs button, .table, .kv, .pin-toggle { font-size: .875rem; }
/* Monocromo: destino negro + radar de "buscando" negro con doble anillo */
.pin-dot.blue { background: var(--accent); }
.pulse { background: var(--accent); }
.pulse::after { background: var(--accent); }
.pulse::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ring 1.8s infinite; animation-delay: .9s; }
/* Press feedback en superficies táctiles */
.searchbar:active { transform: scale(.99); }
.chip:active { transform: scale(.97); }
/* Marcador de auto estilo Uber (carrito top-down que rota según el rumbo; sin círculo de fondo) */
.car-pin { width: 32px; height: 32px; display: grid; place-items: center; transition: transform .4s ease; }
.car-pin svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
/* Interlineado de cuerpo más apretado */
body { line-height: 1.4; }
/* Toast con icono de estado */
.toast { display: inline-flex; align-items: center; gap: 8px; }
.toast-ic { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.22); font-size: .7rem; font-weight: 800; flex: 0 0 auto; }
/* Estado vacío */
.empty-state { text-align: center; padding: 44px 20px; }
.empty-state .es-ic { font-size: 2.4rem; line-height: 1; }
.empty-state .es-t { font-weight: 700; color: var(--ink); margin-top: 12px; font-size: 1.05rem; }
.empty-state .es-s { font-size: .9rem; color: var(--muted); margin-top: 4px; }
/* Skeleton (carga) con shimmer */
.skel-row { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.skel { background: linear-gradient(90deg, #efefef 25%, #e4e4e4 37%, #efefef 63%); background-size: 400% 100%; border-radius: 8px; animation: shimmer 1.4s ease infinite; }
.skel-av { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; }
.skel-l1 { height: 12px; width: 60%; margin-bottom: 7px; }
.skel-l2 { height: 10px; width: 38%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
/* Bottom sheet arrastrable (composer): scrim que atenúa el mapa + asa con cursor de arrastre */
.map-scrim { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .15s linear; z-index: 800; }
.sheet .grabber { touch-action: none; }
.sheet.draggable .grabber { cursor: grab; height: 5px; }
.sheet.draggable { will-change: height; }
.sheet.settling { transition: height .34s cubic-bezier(.22,1.2,.36,1) !important; }

/* ============================ Flujo de pedido fiel a Uber (v6) ============================ */
/* Bloque origen→destino conectado */
.route-card { background: var(--surface-2); border-radius: 14px; padding: 4px 14px; }
.rc-row { display: flex; align-items: center; gap: 14px; min-height: 50px; cursor: pointer; }
.rc-mark { width: 9px; height: 9px; flex: 0 0 auto; position: relative; }
.rc-mark.o { border-radius: 50%; background: var(--ok); }
.rc-mark.d { border-radius: 2px; background: var(--accent); }
.rc-row:first-child .rc-mark::after { content: ''; position: absolute; left: 50%; top: 13px; transform: translateX(-50%); width: 2px; height: 30px; background: var(--line-2); }
.rc-txt { font-size: 1rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-txt.ph { color: var(--mute); }
/* Campo de búsqueda de dirección */
.search-field { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 12px; padding: 0 14px; height: 50px; }
.search-field input { border: 0; background: transparent; outline: none; flex: 1; font-size: 1rem; min-width: 0; }
/* Tarjeta de producto "elige tu viaje" */
.ride-product { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 2px solid #000; border-radius: 14px; background: var(--surface); }
.ride-product .rp-ic { width: 46px; height: 46px; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; flex: 0 0 auto; }
.ride-product .rp-name { font-weight: 700; font-size: 1.05rem; }
.ride-product .rp-cap { display: inline-flex; align-items: center; gap: 3px; font-size: .72rem; font-weight: 700; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 7px 1px 5px; font-variant-numeric: tabular-nums; }
.ride-product .rp-cap svg { color: var(--ink-2); }
.ride-product .rp-eta { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.ride-product .rp-price { font-weight: 800; font-size: 1.2rem; flex: 0 0 auto; }
/* Placa del vehículo estilo Uber */
.plate { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; letter-spacing: .08em; font-size: .9rem; padding: 6px 10px; border: 2px solid #000; border-radius: 8px; background: #fff; color: #000; white-space: nowrap; flex: 0 0 auto; }

/* ============================ Brillo final (v9) ============================ */
/* Marcadores que se deslizan suave (el auto "viaja" en el mapa, no salta) */
.leaflet-marker-icon { transition: transform .85s cubic-bezier(.4, 0, .2, 1); }
.leaflet-zoom-anim .leaflet-marker-icon { transition: none; } /* sin lag al hacer zoom */
/* Taxis: glide continuo ≈110% de la cadencia de datos de cada fuente (así el siguiente
   dato llega con el marcador aún "en vuelo" y nunca se congela). Viaje: poll 3 s. */
.car-marker { transition: transform 3s linear; }
.car-marker--fleet { transition-duration: 8.8s; } /* flotilla del home: poll 8 s */
.car-marker--me { transition-duration: 5.5s; }    /* carrito propio del chofer: envía cada 5 s */
/* Guarda por eventos zoomstart/zoomend (map.js): durante el pinch los marcadores no "nadan" */
.map-zooming .leaflet-marker-icon { transition: none !important; }
/* Splash de marca al abrir */
#splash {
    position: fixed; inset: 0; z-index: 99999; background: var(--navy);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
    animation: splashOut .45s ease 1.1s forwards;
}
#splash .splash-logo { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 12px 44px rgba(0,0,0,.5); animation: splashPop .5s cubic-bezier(.2,.8,.2,1); }
#splash .splash-name { font-weight: 900; font-size: 1.85rem; letter-spacing: -.02em; color: #fff; animation: fadeUp .5s ease .15s both; }
#splash .splash-name span { color: var(--brand); }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }
@keyframes splashPop { from { opacity: 0; transform: scale(.82); } }
/* Entrada del landing (hero + tarjetas en cascada) */
.landing .hero { animation: fadeUp .5s ease both; }
.landing .role-card { animation: fadeUp .45s ease both; }
.landing .role-card:nth-child(1) { animation-delay: .06s; }
.landing .role-card:nth-child(2) { animation-delay: .13s; }
.landing .role-card:nth-child(3) { animation-delay: .20s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
/* Home full-bleed estilo Uber: botón de perfil flotante sobre el mapa + páginas con safe-area */
.map-fab { position: absolute; z-index: 600; width: 46px; height: 46px; border-radius: 50%; background: var(--surface); border: 0; box-shadow: var(--shadow-lg); display: grid; place-items: center; font-weight: 800; font-size: .95rem; cursor: pointer; color: var(--ink); transition: transform .08s; }
.map-fab:active { transform: scale(.93); }
.map-fab.tl { top: calc(14px + env(safe-area-inset-top, 0px)); left: 14px; }
.page { padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(16px + var(--safe-b)); }

/* ============================ Pulido fino map-first (v11) ============================ */
/* FAB de recentrar/mi ubicación (abajo-derecha, sobre el peek del sheet) */
.map-fab.br { right: 14px; bottom: calc(34vh + 14px); transition: transform .08s, bottom .26s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.map-fab .mf-ic { width: 20px; height: 20px; display: block; }
/* Degradado superior para legibilidad de los controles flotantes sobre el mapa */
.map::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 140px; z-index: 500; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,.4) 45%, rgba(255,255,255,0) 100%); }
/* Pin de origen/destino con forma de gota (la punta clava la coordenada) */
.pin-pin { width: 26px; height: 26px; position: relative; }
.pin-pin::before { content: ''; position: absolute; left: 50%; top: 0; width: 22px; height: 22px; transform: translateX(-50%) rotate(45deg); border-radius: 50% 50% 50% 0; background: var(--accent); box-shadow: 0 3px 6px rgba(0,0,0,.3); }
.pin-pin::after { content: ''; position: absolute; left: 50%; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: translateX(-50%); }
.pin-pin.green::before { background: var(--ok); }
/* Ruta con más contraste sobre el mapa claro */
.leaflet-overlay-pane path { filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }
/* Estado "buscando tu taxi" con radar de doble onda */
.searching-hero { text-align: center; padding: 18px 8px 6px; }
.searching-hero .radar { width: 88px; height: 88px; margin: 0 auto 14px; position: relative; display: grid; place-items: center; }
.searching-hero .radar span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #000; opacity: 0; animation: radar 2s cubic-bezier(.2,.6,.3,1) infinite; }
.searching-hero .radar span:nth-child(2) { animation-delay: 1s; }
.searching-hero .radar-core { width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.22); display: grid; place-items: center; }
@keyframes radar { 0% { transform: scale(.4); opacity: .55; } 100% { transform: scale(1); opacity: 0; } }
.searching-hero .sh-title { font-weight: 700; font-size: 1.15rem; margin-top: 2px; }
.searching-hero .sh-elapsed { font-size: .78rem; color: var(--mute); margin-top: 6px; font-variant-numeric: tabular-nums; }
.searching-hero .sh-sub { transition: opacity .2s; }
/* Entradas suaves */
.rp-in { animation: fadeUp .28s ease both; }
.state-in { animation: fadeUp .3s ease both; }
.ride-product.skeleton { border-color: var(--line-2); }
/* Iconos de línea del bottom-nav (en vez de emojis) */
.nav button .ni { line-height: 0; }
.nav .ni-svg { width: 24px; height: 24px; }
/* Selector de pago tipo Uber (filas con icono de línea) */
.paysel { display: flex; flex-direction: column; gap: 6px; }
.payrow { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; cursor: pointer; transition: border-color .12s, background .12s; }
.payrow.on { border-color: #000; background: var(--surface-2); }
.payrow-ic { flex: 0 0 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); }
.payrow.on .payrow-ic { background: var(--accent); }
.payrow-ic svg { width: 19px; height: 19px; color: #1a1a1a; }
.payrow.on .payrow-ic svg { color: #fff; }
.payrow-d { font-size: .76rem; color: var(--mute); }
/* ¿Cuándo? Ahora / Después */
.when-segs { display: flex; gap: 8px; }
.when-seg { flex: 1; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; cursor: pointer; }
.when-seg.on { background: var(--accent); color: #fff; border-color: transparent; }
.when-later { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .22s ease, opacity .22s ease; }
.when-later.show { max-height: 240px; opacity: 1; margin-top: 12px; }

/* ============================ Fidelidad Uber v13 (plan maestro) ============================ */
/* #3 — tabular-nums en TODA cifra para que los dígitos no "bailen" al actualizar en vivo */
.rp-price, .rp-eta, .fare-hero, .plate, .offer-amount, .wait-cost, .stat .v, .h1, .tracker-eta, .sh-elapsed { font-variant-numeric: tabular-nums; }

/* #4 — Pines caen con micro-rebote (drop-in) al CREARSE; el auto en movimiento queda exento */
@keyframes pinDrop { 0% { transform: translateY(-14px) scale(.8); opacity: 0; } 60% { transform: translateY(2px) scale(1.04); opacity: 1; } 100% { transform: translateY(0) scale(1); } }
.pin-pin, .pin-dot { animation: pinDrop .42s cubic-bezier(.34,1.56,.64,1) both; }
.car-pin { animation: none; }

/* #5 — PIN CENTRAL FIJO estilo Uber (overlay sobre el mapa, no marcador Leaflet) */
.center-pin { position: absolute; left: 50%; top: 50%; z-index: 560; pointer-events: none; transform: translate(-50%, -100%); will-change: transform; }
.center-pin .cp-stick { width: 26px; height: 26px; position: relative; transition: transform .2s cubic-bezier(.2,.8,.2,1); }
/* AZUL MEDIO, igual que el pin de destino (.pin-pin) y que el pin central de la app nativa: era el
   único pin marino del producto y hacía que el mismo gesto —fijar un punto en el mapa— se viera de
   distinto color en el teléfono y en el navegador. */
.center-pin .cp-stick::before { content: ''; position: absolute; left: 50%; top: 0; width: 22px; height: 22px; transform: translateX(-50%) rotate(45deg); border-radius: 50% 50% 50% 0; background: var(--accent); box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.center-pin .cp-stick::after { content: ''; position: absolute; left: 50%; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: translateX(-50%); }
.center-pin .cp-shadow { position: absolute; left: 50%; top: 100%; width: 14px; height: 5px; margin-top: 2px; border-radius: 50%; background: rgba(0,0,0,.28); transform: translateX(-50%) scale(1); transition: transform .2s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.center-pin.lifted .cp-stick { transform: translateY(-7px); }
.center-pin.lifted .cp-shadow { transform: translateX(-50%) scale(.55); opacity: .5; }
.center-pin .cp-label { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; background: var(--navy); color: #fff; font-size: .8rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.22); opacity: 0; transition: opacity .18s; }
.center-pin .cp-label::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #000; }
.center-pin.show-label .cp-label { opacity: 1; }

/* #11 — Barra de dirección del modo pin-central */
.mp-pickbar { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 12px; padding: 0 14px; height: 52px; margin-top: 4px; }
.mp-addr { flex: 1; min-width: 0; font-size: 1rem; font-weight: 500; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .ic svg { width: 20px; height: 20px; color: #5e5e5e; display: block; }

/* ============================ Fidelidad Uber v14 (realismo del chofer + recibos) ============================ */
.eta-avatar { position: relative; width: 72px; height: 72px; flex: 0 0 72px; display: grid; place-items: center; }
.eta-avatar .eta-ring { position: absolute; inset: 0; }
.eta-ring-fill { transition: stroke-dashoffset .6s cubic-bezier(.4,0,.2,1); }
.eta-avatar .avatar { position: relative; z-index: 1; }
.dc-act { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.dc-act svg { width: 18px; height: 18px; }
.rcpt-check { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); margin: 0 auto; position: relative; }
.rcpt-check::after { content: ''; position: absolute; left: 17px; top: 9px; width: 10px; height: 20px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.badge.amber { background: #fff6e6; color: #8a5a00; }
.offer-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); color: #5e5e5e; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; transition: transform .1s; }
.offer-x:active { transform: scale(.92); }
@media (prefers-reduced-motion: reduce) { .eta-ring-fill { transition: none; } }

/* #12a — Cross-fade + slide del cuerpo del sheet al cambiar de estado (no corte seco) */
@keyframes sheetSwap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sheet-state-in { animation: sheetSwap .26s cubic-bezier(.2,.8,.2,1) both; }

/* #12b — Entrada escalonada (stagger) de filas de lista */
.stagger > * { animation: fadeUp .34s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 55ms); }

/* #12c — Latido sutil del núcleo del radar */
.searching-hero .radar-core { animation: corePulse 2s ease-in-out infinite; }
@keyframes corePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }

/* #10 — Press elástico (compresión rápida + recuperación con micro-overshoot) */
.btn { transition: transform .14s cubic-bezier(.34,1.56,.64,1), filter .15s, background .15s; }
.btn:active { transform: scale(.96); transition: transform .07s ease-out; }
.map-fab { transition: transform .16s cubic-bezier(.34,1.56,.64,1), bottom .26s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.map-fab:active { transform: scale(.9); transition: transform .07s ease-out; }
.searchbar { transition: background .15s, transform .14s cubic-bezier(.34,1.56,.64,1); }
.searchbar:active, .chip:active { transition: transform .07s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .pin-pin, .pin-dot, .sheet-state-in, .stagger > *, .searching-hero .radar-core, .countdown.urgent, .offer-bar-fill.run { animation: none !important; }
  .center-pin .cp-stick, .center-pin .cp-shadow { transition: none; }
}

/* ============================ Interacciones firma Uber v17 ============================ */
/* Slide-to-confirm del chofer ("Sliding button" de Uber Base) */
.slide-action { margin-top: 12px; }
.sa-track { position: relative; width: 100%; height: 56px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); overflow: hidden; touch-action: none; outline: none; --sa-prog: 0; }
.sa-track:focus-visible { box-shadow: 0 0 0 3px rgba(0,0,0,.18); }
.sa-track.grabbing { background: var(--surface-3); }
.sa-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 56px; border-radius: 12px; background: var(--ink); transition: width .26s cubic-bezier(.22,.61,.36,1); }
.sa-fill.nt, .sa-thumb.nt { transition: none; }
.sa-track.ok .sa-fill, .sa-track.ok .sa-thumb { background: var(--ok); }
.sa-label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600; font-size: 1rem; color: var(--muted); opacity: calc(1 - var(--sa-prog) * 1.35); transform: translateX(calc(var(--sa-prog) * 10px)); pointer-events: none; padding-left: 44px; }
.sa-thumb { position: absolute; top: 4px; left: 4px; width: 48px; height: 48px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: grab; box-shadow: 0 2px 6px rgba(0,0,0,.22); transition: transform .26s cubic-bezier(.22,.61,.36,1); touch-action: none; }
.sa-thumb:active, .sa-track.grabbing .sa-thumb { cursor: grabbing; }
.sa-arrow { display: grid; place-items: center; }
.sa-track.armed .sa-thumb { box-shadow: 0 0 0 3px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.22); }
.sa-track.confirmed .sa-label, .sa-track.confirmed .sa-arrow { opacity: 0; }
.sa-track.confirmed .sa-thumb::after { content: ''; position: absolute; width: 14px; height: 8px; border-left: 2.6px solid #fff; border-bottom: 2.6px solid #fff; transform: rotate(-45deg) translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .sa-fill, .sa-thumb { transition: none !important; } }

/* On-trip pasajero: banda de vehículo con color + barra de progreso del trayecto */
.veh-line { display: flex; align-items: center; gap: 7px; margin-top: 3px; }
.veh-swatch { width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), 0 0 0 2px var(--surface); }
.veh-model { font-size: .82rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
img.dc-photo { object-fit: cover; }
.trip-prog { margin-top: 12px; }
.trip-prog-track { position: relative; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.trip-prog-fill { position: absolute; inset: 0 auto 0 0; height: 100%; border-radius: 99px; background: var(--accent); transition: width .6s cubic-bezier(.4,0,.2,1); }
.trip-prog-ends { display: flex; justify-content: space-between; margin-top: 5px; }
@media (prefers-reduced-motion: reduce) { .trip-prog-fill { transition: none; } }

/* Pulido visual final (último 2%) */
.map::before { height: calc(env(safe-area-inset-top, 0px) + 56px); background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.18) 55%, rgba(255,255,255,0) 100%); }
.nav button { color: #6b6b6b; font-weight: 500; }
.nav button.active { color: #000; font-weight: 700; }
.sheet { box-shadow: 0 -1px 0 rgba(0,0,0,.06), 0 -8px 28px rgba(0,0,0,.10); }
.sheet .grabber { width: 36px; height: 5px; background: #d4d4d4; margin: 7px auto 14px; }
.sheet.draggable .grabber { height: 5px; background: #c8c8c8; }
.ride-product { background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.ride-product .rp-ic { background: #fff; }
#modal-host { animation: scrimIn .2s ease both; }
@keyframes scrimIn { from { background: rgba(0,0,0,0); } to { background: rgba(0,0,0,.55); } }
.modal { animation: upSheet .28s cubic-bezier(.2,.8,.2,1); }
@keyframes upSheet { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal.center { animation: upCenter .24s cubic-bezier(.2,.8,.2,1); }
@keyframes upCenter { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal:not(.center)::before { content: ''; display: block; width: 36px; height: 5px; border-radius: 999px; background: #d4d4d4; margin: -6px auto 14px; }
@keyframes splashOut { to { opacity: 0; visibility: hidden; transform: scale(1.04); } }
#splash { transform-origin: center; }
@media (prefers-reduced-motion: reduce) { #modal-host, .modal, .modal.center { animation: none !important; } }

/* ============================ Pase v18 — botones nítidos + mapa premium ============================ */
/* Botón secundario: blanco con borde fino (no gris lavado); primarios/tono siguen sólidos */
.btn { background: var(--surface); border: 1px solid var(--line-2); }
.btn:hover { filter: none; background: var(--surface-2); }
.btn:active { background: var(--surface-3); }
/* Re-afirmar sólidos DESPUÉS del override de .btn (misma especificidad: gana el último) */
.btn-primary, .btn-dark { background: var(--navy); color: #fff; border-color: transparent; }
.btn-primary:hover, .btn-dark:hover { background: #1D4DB8; }
.btn-primary:active, .btn-dark:active { background: #0E0E99; }
.btn-accent { background: var(--accent); color: #fff; border-color: transparent; }
.btn-ok { background: var(--ok); color: #fff; border-color: transparent; }
.btn-danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost:active { background: var(--surface-3); }
/* Radio de esquina unificado en controles (12px como los botones) */
.payrow, .when-seg, .route-card, .ride-product, .rp-ic { border-radius: 12px; }
/* Plegables <details>: fuera flecha nativa; fila táctil con chevrón que rota */
details.card > summary { list-style: none; display: flex; align-items: center; min-height: 32px; position: relative; padding-right: 26px; user-select: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after {
    content: ''; position: absolute; right: 4px; top: 50%; width: 8px; height: 8px;
    border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
    transform: translateY(-70%) rotate(45deg); transition: transform .18s ease;
}
details.card[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
details.card[open] > summary { margin-bottom: 2px; }
/* Mapa con acabado premium: desaturación SOLO para los tiles CARTO (fallback);
   los tiles propios (estilo Positron ajustado) ya traen el gris correcto de fábrica.
   (Leaflet pone el className en el CONTENEDOR de la capa, no en cada tile.) */
.tiles-carto .leaflet-tile, .leaflet-tile.tiles-carto { filter: saturate(.45) contrast(1.03) brightness(1.02); }
.leaflet-container { background: #e7e7e5; }
/* Tooltips del mapa: píldora negra (no caja blanca de Leaflet) */
.leaflet-tooltip {
    background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: 5px 12px;
    font-size: .78rem; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.25); white-space: nowrap;
}
.leaflet-tooltip-top::before { border-top-color: #000; }
.leaflet-tooltip-bottom::before { border-bottom-color: #000; }
.leaflet-tooltip-left::before { border-left-color: #000; }
.leaflet-tooltip-right::before { border-right-color: #000; }
/* El texto con ellipsis dentro de filas flex no debe desbordar (min-width:0 en el hijo flexible) */
.item .grow, .rc-row .rc-txt, .sheet { min-width: 0; }
.sheet { overflow-x: hidden; }
/* Landing centrado vertical (sin hueco muerto abajo); colapsa con scroll en pantallas bajas */
.landing::before, .landing::after { content: ''; flex: 1 1 0; min-height: 0; }
.landing .hero { padding: 26px 0 18px; }
@media (prefers-reduced-motion: reduce) { details.card > summary::after { transition: none; } }

/* ============================ Marca del cliente (logo oficial) — SOLO splash + login ============================ */
/* Paleta OFICIAL del rebrand (2026): marino var(--navy), azul medio var(--accent), amarillo
   var(--brand). Esta pintura de marca vive únicamente en el splash y la pantalla de entrada
   (.landing.auth-brand); el resto de la app conserva el monocromo "Uber Base". */
/* Splash: MISMO degradado azul que la landing (PDF pág 4), no el blanco de antes. El splash muestra
   el logo NEGATIVO vertical (logo-neg-v.svg: "Taxi" amarillo + "ngón!" BLANCO), que está hecho para
   fondo oscuro: sobre el degradado casi blanco que había aquí, "ngón!" quedaba invisible y "Taxi"
   ilegible. Cuando se corrigió la landing quitándole la zona blanca, esta regla se quedó atrás.
   Además, al compartir el mismo fondo, el splash se desvanece hacia la landing sin destello blanco. */
#splash { background: linear-gradient(180deg, #1D4DB8 0%, #141495 100%); }
#splash .splash-logo { width: min(64vw, 300px); height: auto; border-radius: 0; box-shadow: none; }
/* Contenido CENTRADO (proporción original); el degradado va más abajo para que el logo
   centrado siga cayendo en la banda blanca y las tarjetas sobre el azul. */
.landing.auth-brand { background: linear-gradient(180deg, #1D4DB8 0%, #141495 100%); } /* PDF pág 4: azul medio arriba -> marino abajo, SIN zona blanca */
.auth-brand .hero .auth-logo { display: block; width: min(86vw, 430px); height: auto; margin: 0 auto 12px; } /* horizontal (PDF pág 4) */
.auth-brand .hero p { color: #fff; font-weight: 600; }   /* tagline blanca y SEMIBOLD sobre el degradado azul (PDF pág 4) */
.auth-brand .role-card { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18); }
.auth-brand .role-card:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.30); }
.auth-brand .role-card .r-ic { background: var(--brand); color: var(--accent); }
.auth-brand .role-card .tt { font-size: 1.25rem; }  /* título ≈1.6× el subtítulo (PDF pág 4) */
.auth-brand .role-card .ss { color: rgba(255,255,255,.92); }  /* subtítulo en blanco casi pleno (PDF pág 4) */
.auth-brand .role-card:focus-visible { box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px var(--brand); }
.auth-brand .auth-foot { color: rgba(255,255,255,.55); }

/* ============================ Admin escritorio premium (v19) ============================ */
/* Shell: en móvil manda topbar + tabs (sidebar oculta); en escritorio, sidebar + encabezado. */
.admin-shell { display: flex; height: 100%; width: 100%; min-height: 0; }
.admin-side { display: none; }
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100%; background: var(--lav); }
.admin-main .body { padding: 16px; }
.admin-head { display: none; }
.dot.blue { background: var(--accent); }
/* Tooltip premium (elementos con data-tip) */
.tipbox {
    position: fixed; z-index: 9500; max-width: 280px; background: #0d1424; color: #fff;
    padding: 9px 13px; border-radius: 10px; font-size: .78rem; line-height: 1.45; font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,.28); opacity: 0; transform: translateY(4px);
    transition: opacity .12s ease, transform .12s ease; pointer-events: none; white-space: pre-line;
}
.tipbox.show { opacity: 1; transform: none; }
/* Tarjeta de métrica con icono (el icono solo se pinta en escritorio) */
.stat { display: flex; align-items: center; gap: 13px; }
.stat-ic { display: none; }
.stat-tx { min-width: 0; }
.stat .k { display: flex; align-items: center; gap: 6px; }
.stat[data-tip] { cursor: default; }
/* Barras: etiqueta corta en móvil, fecha completa en escritorio */
.bars .bar .bl-f { display: none; }
/* Barras del panel admin en amarillo de marca (rebrand 2026; la etiqueta numérica en tinta hace de redundancia) */
.admin-shell .bars .bar { background: var(--brand); box-shadow: none; border-radius: 6px 6px 2px 2px; }
.admin-shell .bars .bar:hover { filter: brightness(.95); }

@media (min-width: 1024px) {
    /* Un solo origen de verdad para el carril horizontal del panel. */
    .admin-shell { --adm-pad: clamp(20px, 2.5vw, 48px); }
    /* Sin buzoneado: el tope de 1460px dejaba 230px de franja lavanda por lado en un monitor de
       1920, y como la vista Panel tiene fondo blanco se leía como "un teléfono estirado en medio
       de la pantalla". El tope de 480/1180px se queda para pasajero y chofer, que sí son móviles. */
    #screen.wide { max-width: none; }
    /* Mock de escritorio (PDF pág 11): TOPBAR marino + fila de chips, SIN sidebar. El código de
       la sidebar sigue vivo en admin.js (sideBar()) pero oculto por CSS para poder revertir:
       para volver a la sidebar, cambiar display:none -> flex y re-ocultar topbar/tabs. */
    .admin-side { display: none; flex-direction: column; flex: 0 0 236px; background: #ffffff; color: var(--ink); padding: 20px 14px 16px; gap: 6px; border-right: 1px solid #e9edf4; }
    .as-brand { display: flex; align-items: center; padding: 0 6px 18px; }
    .as-brand .as-logo { width: 100%; max-width: 180px; height: auto; display: block; }
    .as-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
    .as-item { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 0; border-radius: 10px; background: transparent; color: #5c6675; font-weight: 600; font-size: .92rem; cursor: pointer; text-align: left; transition: background .12s, color .12s; }
    .as-item:hover { background: #f1f4f9; color: var(--ink); }
    .as-item.active { background: var(--navy); color: #fff; }
    .as-ic { display: grid; place-items: center; line-height: 0; }
    .as-ic svg { width: 18px; height: 18px; }
    .as-foot { border-top: 1px solid #edf0f6; padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
    .as-user { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
    .as-av { width: 36px; height: 36px; border-radius: 50%; background: var(--lav); display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: var(--navy); flex: 0 0 auto; }
    .as-name { font-weight: 700; font-size: .86rem; color: var(--ink); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .as-sub { font-size: .72rem; color: var(--muted); }
    .as-out { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font-weight: 600; font-size: .88rem; cursor: pointer; transition: background .12s; }
    .as-out:hover { background: var(--surface-2); }
    .as-out svg { width: 16px; height: 16px; }
    /* -------- Encabezado -------- */
    .admin-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px var(--adm-pad) 0; }
    .ah-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; }
    .ah-sub { font-size: .84rem; color: var(--muted); margin-top: 2px; }
    .ah-date { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 9px 14px; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
    .ah-date svg { width: 15px; height: 15px; color: var(--muted); }
    .ah-refresh { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); transition: background .12s; }
    .ah-refresh:hover { background: var(--surface-2); }
    .ah-refresh svg { width: 15px; height: 15px; }
    /* -------- Contenido: a todo lo ancho con el contenido centrado (mock pág 11) -------- */
    .admin-main { background: var(--lav); }
    .admin-main .body { padding: 20px var(--adm-pad) 32px; }
    /* El panel de la central es la ÚNICA superficie de escritorio del producto (pasajero y chofer
       viven en la app nativa), así que aquí NO se le pone techo de ancho: con el tope de 1100px un
       monitor de 1920 dejaba 872px muertos —45% de la pantalla— y las tablas de 7 columnas no
       pasaban de 1033px. El carril horizontal sale de UNA sola variable para que topbar, chips,
       encabezado y cuerpo queden a plomo (antes el topbar iba a sangre y el contenido 190px
       adentro, y entre 1024 y 1152px los chips se desalineaban 12px del contenido). */
    .admin-head, .admin-main .body { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }
    .admin-shell .topbar,
    .admin-shell .admin-tabs { padding-left: var(--adm-pad); padding-right: var(--adm-pad); }
    .admin-shell .stats { gap: 14px; }
    .admin-shell .stat { padding: 18px; transition: transform .14s ease, box-shadow .14s ease; }
    .admin-shell .stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
    .admin-shell .stat .v { font-size: 1.75rem; }
    .stat-ic { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); color: #1a2233; }
    .stat-ic svg { width: 20px; height: 20px; }
    /* -------- Gráfica: eje X con día a dos dígitos '08' también en escritorio (mock pág 11);
       la fecha completa vive solo en el tooltip data-tip -------- */
    .admin-shell .bars { height: 230px; padding: 26px 4px 26px; gap: 10px; }
    .admin-shell .bars .bar span { font-size: .68rem; }
    .admin-shell .bars .bar .bar-val { font-size: .72rem; top: -19px; }
    /* Foco accesible sobre fondos oscuro/claro */
    .as-item:focus-visible, .as-out:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy); }
    .ah-refresh:focus-visible, .stat:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000; }
}

/* ============================ Rebrand cliente Fase 3 — web (REBRAND-CLIENTE.md) ============================ */
/* Colocado al FINAL a propósito: .btn-brand/.btn-lav deben ganar al bloque v18 de .btn,
   y tr.sel a las reglas de striping/hover de .table. */
/* Placeholder gris azulado; el texto tecleado sigue en tinta (#99A6BF no pasa AA como texto) */
.input::placeholder { color: var(--grayblue); }
/* Fila seleccionada por clic (pág 12): amarillo de marca con texto en tinta.
   Interacción nueva: la delega table() de admin.js (guard para no robar el clic de los botones).
   VELADURA en vez de amarillo macizo: el #F4DD08 a tope ocupaba la fila completa —1421x42 px, unas
   200 veces el área de la franja de una tile— y al quitarle el techo de 1100px a la tabla creció
   todavía más. Se lee como un subrayador fluorescente y tapa la información de la fila, que es lo
   que uno quiere ver al seleccionarla. Con la veladura + una marca maciza en la primera celda la
   señal sigue siendo inequívocamente amarilla y el texto gana contraste (negro sobre #FCF8DE ≈ 19:1
   contra 15:1 sobre el amarillo macizo). */
.table tbody tr.sel td, .table tbody tr.sel:hover td { background: rgba(244, 221, 8, .22); color: var(--ink); }
.table tbody tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
/* Barras sin datos: guioncito lavanda (mock pág 11) */
.bars .bar.zero, .admin-shell .bars .bar.zero { background: var(--lav); }
/* Botón amarillo de marca (Bloquear): texto SIEMPRE marino — blanco sobre amarillo = 1.38:1, prohibido */
.btn-brand { background: var(--brand); color: var(--navy); border-color: transparent; }
.btn-brand:hover { background: var(--brand); filter: brightness(.96); }
.btn-brand:active { background: #ddc807; }
/* Botón suave lavanda (Desbloquear) */
.btn-lav { background: var(--lav); color: var(--accent); }
.btn-lav:hover { background: #dcdcf0; }
.btn-lav:active { background: #d8d8ee; }
/* Guardas: .btn:hover (v18) pinta lavanda con MÁS especificidad que .btn-accent/.btn-ok/.btn-danger,
   dejando texto blanco sobre lavanda al pasar el cursor; se re-afirma el fondo tonal. */
.btn-accent:hover { background: var(--accent); }
.btn-ok:hover { background: var(--ok); }
.btn-danger:hover { background: var(--danger); }

/* ============== Fase 4 — responsive del panel en celular (reporte del cliente) ==============
   En teléfonos, los grids .stats c3/c4 no tenían columna mínima (inputs de Tarifas apretados,
   labels partidas) y la botonera de Zonas iba en .row sin wrap (botones aplastados). */
@media (max-width: 640px) {
    .stats.c3, .stats.c4 { grid-template-columns: repeat(2, 1fr); }
    /* Formularios (viven dentro de .card): a 1 columna. Las stat-tiles del Panel no viven
       en .card, así que conservan el 2x2 de arriba. */
    .admin-shell .card .stats.c3, .admin-shell .card .stats.c2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .admin-shell .card.row.between { flex-wrap: wrap; }
    .admin-shell .card.row.between > .row { width: 100%; justify-content: flex-end; }
}
.btn-sm { white-space: nowrap; } /* que "Desactivar"/"Eliminar" no se partan en dos líneas */

/* Topbar del admin en teléfono: logo + rol + "Contraseña" + "Salir" suman 401px de contenido en
   una pantalla de 375, así que el bloque del rol quedaba prensado a 60px (el título ilegible) y
   la barra desbordaba. Aquí se recupera el ancho: subtítulo fuera (el rol ya va en el título),
   logo y botones compactos, y el título con elipsis si el rol es largo ("Despachador (central)"). */
@media (max-width: 600px) {
    .admin-shell .topbar { gap: 6px; padding-left: 10px; padding-right: 10px; }
    .admin-shell .topbar .brand .logo { height: 24px !important; }
    .admin-shell .topbar > .row { gap: 6px; min-width: 0; }
    .admin-shell .topbar .who { min-width: 0; }
    .admin-shell .topbar .who .sub { display: none; }
    .admin-shell .topbar .who .name { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .admin-shell .topbar .btn-sm { padding: 6px 10px; font-size: .78rem; flex: 0 0 auto; }
}

/* ============== Fase 5 — fidelidad del rebrand (auditoría contra el PDF, 2026-07-29) ============== */
/* Panel (mock pág 11): fondo de página BLANCO solo en la vista Panel (admin.js pone .tab-panel). */
.admin-shell.tab-panel .admin-main { background: #fff; }
/* Card contenedora del 'Resumen de hoy': tiles y gráfica como sub-cards con contorno gris fino,
   SIN sombra (y sin la elevación al hover del escritorio). */
.panel-card .stat, .panel-card .card { box-shadow: none; border: 1px solid var(--line-2); }
.admin-shell .panel-card .stat:hover { transform: none; box-shadow: none; }
/* Carril izquierdo uniforme en TODAS las tiles del Panel (con o sin barra amarilla): así la barra
   de "Comisión" respira —margen al borde y hueco antes de la cifra— sin desalinear su número del de
   las otras tiles (todas arrancan en el mismo x). Más específica que .admin-shell .stat para ganar
   al padding de escritorio. */
.admin-shell .panel-grid .stat { padding-left: 26px; }
/* Panel a DOS columnas en escritorio (Resumen izquierda, Cancelaciones + Totales derecha); en
   móvil se apila. minmax(0,…) evita que el contenido más ancho (una tabla, una etiqueta larga)
   reviente su columna, que es lo que pasa con `1.2fr 1fr` a secas. */
.panel-grid { display: flex; flex-direction: column; gap: 10px; }
.panel-grid > .col { min-width: 0; }
@media (min-width: 1024px) {
    .panel-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .9fr); gap: 20px; align-items: start; }
}

/* Al quitarle el techo de 1100px al panel, los FORMULARIOS se irían con él: los campos de Tarifas
   pasarían de 1033 a ~1800px de ancho, que se lee peor que el problema original (y el mock los
   dibuja angostos y alineados a la izquierda). Los formularios viven en .stats c2/c3 dentro de una
   card; las tiles de cifras del Panel NO viven en card, así que no les aplica. */
@media (min-width: 1024px) {
    .admin-shell .card .stats.c2,
    .admin-shell .card .stats.c3 { max-width: 940px; }
    /* Campos sueltos de una card (Avisos: audiencia, título y mensaje) — se iban a 1792px de ancho,
       que no se puede leer ni escribir. Solo los HIJOS DIRECTOS: los que viven dentro de un grid
       .stats ya los limita su columna. */
    .admin-shell .card > .field,
    .admin-shell .card > .input,
    .admin-shell .card > textarea { max-width: 620px; }
    /* Botón de bloque dentro de una card: que no se estire a lo ancho de un monitor. */
    .admin-shell .card .btn-block { max-width: 320px; }
}
/* 'Justificar' (cancelaciones): píldora blanca con contorno gris (mock pág 11; la clase
   btn-outline pone el blanco + borde, aquí solo la forma). */
.rev-cancel .btn-sm { border-radius: var(--radius-pill); }

/* ============== Pulido del panel admin (2026-08-11) — que en el teléfono se vea como la app ============== */
/* 1) Fondo LAVANDA en todo el panel (antes blanco): las tarjetas blancas por fin resaltan con
   profundidad, como en la app nativa. Antes eran blanco sobre blanco y se veía lavado. */
.admin-shell .admin-main,
.admin-shell.tab-panel .admin-main { background: var(--lav); }
/* 2) Tarjetas y tiles con elevación suave (sombra azulada) en vez del borde plano. */
.admin-shell .card { box-shadow: 0 2px 10px rgba(20, 20, 149, .06); border: 0; }
.admin-shell .panel-card .stat { box-shadow: 0 2px 10px rgba(20, 20, 149, .06); border: 0; }
.admin-shell .body { padding-top: 16px; }

/* 3) TABLAS -> TARJETAS en teléfono: en vez de una tabla ancha con scroll lateral (tosco en un
   celular), cada fila se apila como tarjeta con "Etiqueta: valor". Reusa data-label de admin.js. */
@media (max-width: 720px) {
    .admin-shell .table-wrap { overflow: visible !important; background: transparent; box-shadow: none; }
    .admin-shell .table, .admin-shell .table tbody, .admin-shell .table tr, .admin-shell .table td { display: block; width: 100%; }
    .admin-shell .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* oculto accesible */
    .admin-shell .table tr {
        background: var(--surface); border-radius: 14px; margin-bottom: 10px; padding: 6px 4px;
        box-shadow: 0 2px 10px rgba(20, 20, 149, .06);
    }
    .admin-shell .table td {
        display: flex; align-items: center; justify-content: space-between; gap: 14px;
        padding: 9px 14px; border: 0; text-align: right; min-height: 40px;
    }
    .admin-shell .table td::before {
        content: attr(data-label); text-align: left; color: var(--muted); font-weight: 600;
        font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; flex: 0 0 auto;
    }
    /* Celda de acciones (botones): a lo ancho, sin la etiqueta. */
    .admin-shell .table td:has(button) { justify-content: flex-end; }
    .admin-shell .table td:has(button)::before { content: ''; }
    .admin-shell .table td .btn-sm, .admin-shell .table td button { flex: 0 0 auto; }
    /* La selección amarilla en tarjeta: franja izquierda en vez de fondo de fila. */
    .admin-shell .table tbody tr.sel td { background: transparent; }
    .admin-shell .table tbody tr.sel { box-shadow: 0 2px 10px rgba(20, 20, 149, .06), inset 3px 0 0 var(--brand); }
    /* Celda vacía (p.ej. "Acciones" sin botón en la fila del propio dueño, o para cajero/despachador
       que no ven el botón Contraseña): se oculta para no dejar una franja en blanco al pie. */
    .admin-shell .table td:empty { display: none; }
}
