/* ============================ TAXINGON — Design system ============================ */
:root {
    --bg: #ebebeb;
    --app-bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #efefef;   /* Canvas Soft */
    --surface-3: #e2e2e2;   /* Surface Pressed (:active) */
    --ink: #000000;
    --ink-2: #5e5e5e;       /* text-body */
    --muted: #5e5e5e;
    --mute: #afafaf;        /* text-mute / hint */
    --line: #efefef;
    --line-2: #e2e2e2;      /* hairline */
    --brand: #ffc043;       /* amarillo taxi — SOLO acento puntual (logo/estrellas/barras) */
    --brand-ink: #000000;
    --accent: #276ef1;
    --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(--brand-ink); 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; }
.brand .tag { color: var(--brand); }
.topbar .who { text-align: right; line-height: 1.15; }
.topbar .who .name { font-weight: 700; font-size: .9rem; }
.topbar .who .sub { font-size: .72rem; color: #cbd5e1; }

/* ============================ 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: #000; color: #fff; }
.btn-primary:active { background: #282828; }
.btn-dark { background: #000; color: #fff; }
.btn-dark:active { background: #282828; }
.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: #000; }
.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(--surface-2); font-size: 1rem; outline: none;
    transition: border .15s, box-shadow .15s, background .15s;
}
.input:focus { border-color: #000; background: #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
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: #000; 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(--surface-2); color: #5e5e5e; }
.badge.yellow { background: var(--surface-2); color: #5e5e5e; }
.badge.blue   { background: var(--surface-2); color: #5e5e5e; }
.badge.purple { background: var(--surface-2); color: #5e5e5e; }
.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: #94a3b8; }

/* ============================ Stats ============================ */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stats.c3 { grid-template-columns: repeat(3, 1fr); }
.stats.c4 { grid-template-columns: repeat(4, 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); }
.stat:has(.v.brand)::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; 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 { width: 46px; height: 46px; border-radius: 50%; background: #efefef; color: #000; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.stars { color: var(--brand); font-size: .9rem; letter-spacing: 1px; }

/* ============================ 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: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 8px 16px; font-weight: 600; font-size: .86rem; cursor: pointer; color: var(--muted); transition: background .12s, color .12s, border-color .12s; }
.admin-tabs button:hover:not(.active) { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.admin-tabs button.active { background: #000; 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(--surface-2); z-index: 1;
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.table tbody tr:nth-child(even) td { background: #fafafa; }
.table tbody tr:hover td { background: var(--surface-2); }
.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 */
.bars { display: flex; align-items: flex-end; 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; min-height: 3px; position: relative;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  border-radius: 5px 5px 0 0; box-shadow: inset 0 2px 0 var(--brand); transition: filter .12s;
}
.bars .bar:hover { filter: brightness(1.25); }
.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); }
.switch input:checked + .track { background: var(--ok); }
.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: gris neutro translúcido en vez de slate frío + hairline inferior */
.topbar .who .sub { color: rgba(255,255,255,.6); }
.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(0,0,0,.09); }
/* 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: #000; }
.pulse { background: #000; }
.pulse::after { background: #000; }
.pulse::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #000; 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 (glyph negro en círculo blanco) */
.car-pin { width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.28); display: grid; place-items: center; }
/* 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: #000; }
.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 */
/* Splash de marca al abrir */
#splash {
    position: fixed; inset: 0; z-index: 99999; background: #000;
    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: #000; 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: #000; }
.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: #000; 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); }
.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: #000; 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: #000; 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: #000; 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: #000; color: #fff; border-color: transparent; }
.btn-primary:hover, .btn-dark:hover { background: #1a1a1a; }
.btn-primary:active, .btn-dark:active { background: #282828; }
.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: tiles desaturados (gris cálido tipo Uber, sin tinte azul) */
.leaflet-tile { 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: #000; 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; } }
