/* ===== VAYGO — estilos de las páginas internas: rojo, negro y blanco, como la página principal (primero para el celular) =====
   Modo claro y oscuro: sigue al teléfono, o lo que elija la persona con el botón 🌓 (data-theme en <html>).
   Las variables --lime* ahora son el rojo de VAYGO (se dejan los nombres para no tocar todas las páginas). */

:root {
  color-scheme: light;
  --bg: #F7F5F2;
  --bg-2: #F7F5F2;
  --card: #FFFFFF;
  --card-2: #F1EEEA;
  --line: #E6E1DA;
  --text: #2A2B31;
  --muted: #6B6E78;
  --ink: #0B0B0F;
  --night: #0B0B0F;        /* bloques siempre oscuros (conductores, banda de abajo) */
  --header: rgba(255, 255, 255, .92);
  --lime: #E3122B;         /* rojo VAYGO */
  --lime-dark: #B50D22;
  --lime-ink: #FFFFFF;     /* letras sobre rojo */
  --lime-soft: #FDE6E9;
  --ok: #2E8B57;
  --ok-soft: #DDF0E4;
  --danger: #C8102E;
  --danger-soft: #FBE1E4;
  --info: #2A2B31;
  --info-soft: #EEEDEA;
  --warn: #A8660F;
  --warn-soft: #FBEDD3;
  --women: #B50D22;
  --women-soft: #FDE6E9;
  --women-line: #F5B8C1;
  --wa: #25d366;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(11, 11, 15, .05), 0 10px 30px rgba(11, 11, 15, .08);
  --shadow-lg: 0 24px 60px rgba(11, 11, 15, .16);
  /* Mapa de Google: aclarado en modo claro */
  --map-filter: invert(1) hue-rotate(180deg) brightness(1.02);
}
/* Modo oscuro: fondos casi negros, letras hueso y el mapa rojo de noche (como la app). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111417; --bg-2: #0C0E10; --card: #1A1E22; --card-2: #24292E; --line: #30363C;
    --text: #E6E2DA; --muted: #9BA6A3; --ink: #EEE8DD; --night: #08080B; --header: rgba(17, 20, 23, .9);
    --lime-dark: #FF4A5E; --lime-soft: #3A1418;
    --ok: #4CC283; --ok-soft: #163325; --danger: #FF5A6B; --danger-soft: #3A1820;
    --info: #C9CBD2; --info-soft: #24262C; --warn: #E7A33E; --warn-soft: #3A2A12;
    --women: #FF4A5E; --women-soft: #3A1418; --women-line: #6B2430;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
    --map-filter: sepia(.9) saturate(3.2) hue-rotate(-42deg) brightness(.72) contrast(1.18);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111417; --bg-2: #0C0E10; --card: #1A1E22; --card-2: #24292E; --line: #30363C;
  --text: #E6E2DA; --muted: #9BA6A3; --ink: #EEE8DD; --night: #08080B; --header: rgba(17, 20, 23, .9);
  --lime-dark: #FF4A5E; --lime-soft: #3A1418;
  --ok: #4CC283; --ok-soft: #163325; --danger: #FF5A6B; --danger-soft: #3A1820;
  --info: #C9CBD2; --info-soft: #24262C; --warn: #E7A33E; --warn-soft: #3A2A12;
  --women: #FF4A5E; --women-soft: #3A1418; --women-line: #6B2430;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  --map-filter: sepia(.9) saturate(3.2) hue-rotate(-42deg) brightness(.72) contrast(1.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg-2);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8em; }
a { color: var(--lime-dark); font-weight: 600; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.accent { color: var(--lime-dark); }
.hl { background: linear-gradient(transparent 58%, var(--lime) 58%); padding: 0 .1em; }

.container { width: min(640px, 100% - 32px); margin-inline: auto; }
.container.wide { width: min(1180px, 100% - 32px); }
main { padding: 18px 0 100px; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--header); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 12px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -.03em; }
.brand img { width: 34px; height: 34px; }
.brand b { color: var(--lime-dark); }
.nav-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.3em; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; color: var(--ink);
  background: var(--card-2); transition: filter .15s, transform .1s, opacity .15s, box-shadow .15s;
}
.btn:hover:not(:disabled) { filter: brightness(.97); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--lime); color: var(--lime-ink); box-shadow: 0 6px 18px rgba(227, 18, 43, .3); }
.btn-dark { background: var(--ink); color: var(--card); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.btn-ghost { background: var(--card); border-color: var(--line); }
.btn-wa { background: var(--wa); color: #053d1d; }
.btn-sm { padding: .5em .95em; font-size: .85rem; }
.btn-lg { padding: 1.05em 1.5em; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 140px; }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card.highlight { border-color: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft), var(--shadow); }
.card.ok { border-color: #86efac; }
.card.alert { border-color: #fca5a5; background: var(--danger-soft); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-head .right { margin-left: auto; }

.hero { padding: 10px 0 6px; }
.hero p { color: var(--muted); }

/* ---------- Formularios ---------- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg-2);
  border: 1.5px solid var(--line); border-radius: 14px; padding: .8em .95em;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime-dark); background: var(--card); box-shadow: 0 0 0 4px var(--lime-soft); }
input[type=file] { padding: .6em; font-size: .9rem; background: var(--card); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-error { color: var(--danger); font-weight: 600; margin: 6px 0; }
.form-error:empty { display: none; }
.form-ok { color: var(--ok); font-weight: 600; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* Precio grande que escribe el pasajero o el conductor */
.price-input { position: relative; }
.price-input input { font-size: 2rem; font-weight: 800; padding: .45em .6em .45em 1.4em; text-align: left; }
.price-input::before { content: "$"; position: absolute; left: .7em; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 800; color: var(--muted); }

/* Buscador de direcciones con sugerencias */
.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; }
.search .btn { flex: none; padding-inline: 1em; }
.suggest {
  list-style: none; margin: 6px 0 0; padding: 6px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg); position: relative; z-index: 5;
}
.suggest li { padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.suggest li:hover { background: var(--lime-soft); }
.suggest li b { display: block; color: var(--ink); font-size: .95rem; }
.suggest li small { color: var(--muted); }
.suggest li.none { cursor: default; color: var(--muted); }
#trip-map.map.tall { height: 62vh; min-height: 320px; }
.suggest li .km { float: right; color: var(--muted); font-size: .8rem; margin-left: 8px; }
.suggest li.far .km, .suggest li.far b { color: var(--danger); }
/* Calculadora del viaje */
.quote { background: var(--lime-soft); border: 1px solid var(--lime); border-radius: 18px; padding: 14px 16px; margin: 4px 0 14px; }
.quote-top { display: flex; align-items: flex-end; gap: 12px; }
.quote-facts { margin-left: auto; text-align: right; }
.quote-facts b { display: block; font-size: 1.3rem; color: var(--ink); }
.quote-facts span { color: var(--muted); font-weight: 600; font-size: .9rem; }
.quote .hint { margin: 6px 0 0; }

.tabs { display: flex; gap: 6px; background: var(--card-2); padding: 5px; border-radius: 999px; margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  flex: 1 0 auto; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700;
  padding: .7em 1.1em; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.tabs button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.tabs .count { background: var(--lime); color: var(--lime-ink); border-radius: 99px; padding: 0 .5em; font-size: .75rem; margin-left: .3em; }

/* ---------- Insignias ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3em; font-size: .75rem; font-weight: 700;
  padding: .25em .7em; border-radius: 99px; background: var(--card-2); color: var(--muted); white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.lime { background: var(--lime); color: var(--lime-ink); }

/* ---------- Personas (conductor / pasajero) ---------- */
.person { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex: none;
  background: var(--card-2); border: 3px solid var(--lime);
}
.avatar.sm { width: 44px; height: 44px; border-width: 2px; }
.person .who { min-width: 0; }
.person .who strong { display: block; color: var(--ink); font-size: 1.05rem; }
.car-photo { width: 100%; max-height: 180px; object-fit: cover; border-radius: 14px; margin-top: 12px; }
.plate {
  display: inline-block; font-family: ui-monospace, monospace; font-weight: 800; letter-spacing: .08em;
  background: #fff; color: #111; border: 2px solid #111; border-radius: 6px; padding: 0 .45em; font-size: .85rem;
}

/* ---------- Precio y estados ---------- */
.price-big { font-size: 3rem; font-weight: 800; color: var(--ink); line-height: 1; margin: 8px 0 4px; letter-spacing: -.03em; }
.status-line { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--lime-dark); flex: none; animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(227, 18, 43, .55); } 100% { box-shadow: 0 0 0 14px rgba(227, 18, 43, 0); } }
.timer { height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; margin: 8px 0; }
.timer > i { display: block; height: 100%; background: var(--lime-dark); transition: width 1s linear; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .95rem; margin: 10px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Ofertas de conductores (pasajero) y pedidos (conductor) ---------- */
.offers { display: grid; gap: 10px; margin: 12px 0; }
.offer {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 12px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card);
  animation: pop .25s ease-out;
}
.offer .price { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.offer .price small { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); text-align: right; }
.offer.cheaper .price { color: var(--ok); }
.offer.higher .price { color: var(--warn); }
.offer .go { grid-column: 1 / -1; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.request { border: 1.5px solid var(--line); border-radius: 18px; padding: 14px; background: var(--card); margin-bottom: 12px; }
.request.offered { border-color: var(--lime-dark); background: var(--lime-soft); }
.request-top { display: flex; gap: 12px; align-items: center; }
.request-top .price { margin-left: auto; text-align: right; font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1; }
.request-top .price small { display: block; font-size: .72rem; color: var(--muted); font-weight: 700; }
.route { margin: 10px 0; padding-left: 20px; position: relative; font-weight: 600; color: var(--ink); }
.route::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; border-left: 2px dashed var(--line); }
.route div { position: relative; margin: 2px 0; }
.route div::before { content: ""; position: absolute; left: -19px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--lime-dark); }
.route div:last-child::before { background: var(--ink); border-radius: 2px; }
.route small { color: var(--muted); font-weight: 500; }

/* Conectarse (conductor) */
.switch-card { display: flex; align-items: center; gap: 14px; }
.switch-card .txt { flex: 1; min-width: 0; }
.switch-card .txt strong { display: block; font-size: 1.1rem; color: var(--ink); }
.toggle {
  width: 66px; height: 38px; border-radius: 99px; border: 0; padding: 4px; cursor: pointer; flex: none;
  background: var(--line); position: relative; transition: background .2s;
}
.toggle::after { content: ""; display: block; width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .2s; }
.toggle.on { background: var(--lime-dark); }
.toggle.on::after { transform: translateX(28px); }
.toggle:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Mapa ---------- */
.map { height: 240px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); margin: 10px 0; background: var(--card-2); z-index: 0; }
.map.tall { height: 360px; }
.map.full { height: calc(100vh - 220px); min-height: 320px; max-height: 760px; }
.pin { font-size: 28px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
/* Mapa de Google con el tono del tema (los marcadores no cambian). */
.map-google .leaflet-tile-pane { filter: var(--map-filter); }
.leaflet-container { font: inherit; }

/* ---------- Estadísticas ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.6rem; color: var(--ink); line-height: 1.1; letter-spacing: -.02em; }
.stat.lime { background: var(--lime); border-color: var(--lime); }
.stat.lime span { color: var(--lime-ink); }
.stat.bad b { color: var(--danger); }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* ---------- Listas ---------- */
.rows { display: grid; gap: 10px; }
.row {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px;
  display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap;
}
.row .main { flex: 1 1 220px; min-width: 0; }
.selfie-pair { display: flex; gap: 4px; align-self: flex-start; }
.row .main strong { color: var(--ink); }
.row .side { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.docs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.docs a { font-size: .8rem; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }

/* ---------- Modales (también los usa camera.js) ---------- */
.modal {
  border: 0; border-radius: 24px; padding: 0; width: min(440px, 100% - 24px);
  background: var(--card); color: var(--text); box-shadow: var(--shadow-lg);
}
.modal::backdrop { background: rgba(16, 23, 13, .5); }
.modal-body { padding: 22px; display: grid; gap: 10px; }
.modal-body h2 { margin: 0; }
.selfie-stage { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #111; width: min(280px, 100%); margin: 6px auto; }
.selfie-stage video, .selfie-stage img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.selfie-stage img { transform: none; }
.selfie-guide { position: absolute; inset: 8%; border: 3px dashed rgba(227, 18, 43, .9); border-radius: 50%; pointer-events: none; }
.selfie-wait { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: #fff; margin: 0; }

/* ---------- Avisos ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3000;
  background: var(--ink); color: var(--card); padding: .85em 1.3em; border-radius: 999px; font-weight: 700;
  box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); text-align: center;
}
.toast.error { background: var(--danger); }
.banner { border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; font-weight: 600; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.bad { background: var(--danger-soft); color: var(--danger); }
.banner.info { background: var(--info-soft); color: var(--info); }
.banner.lime { background: var(--lime-soft); color: var(--lime-dark); border: 1px solid var(--lime); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.women { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin: 4px 0 14px; border-radius: 16px; border: 2px solid var(--women-line); background: var(--women-soft); cursor: pointer; }
.women input { width: 22px; height: 22px; accent-color: var(--women); flex: none; }
.women.on { border-color: var(--women); background: var(--women-soft); }
.badge.women-b { background: var(--women-soft); color: var(--women); }
.stars { display: flex; gap: 6px; margin: 6px 0 12px; }
.stars button { font-size: 2rem; line-height: 1; background: none; border: 0; padding: 2px; cursor: pointer; filter: grayscale(1); opacity: .35; }
.stars button.on { filter: none; opacity: 1; }
.chips button {
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700;
  padding: .5em .95em; border-radius: 99px; cursor: pointer;
}
.chips button:hover, .chips button.on { border-color: var(--lime-dark); background: var(--lime-soft); }

.site-footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 20px 0 30px; }
.site-footer a { color: var(--muted); }

/* ---------- Monitoreo de vehículos (panel) ---------- */
.plates { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.plate-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: inherit;
  background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 6px 10px 6px 8px; color: var(--text);
}
.plate-btn:hover { border-color: #c7cec0; }
.plate-btn.active { border-color: var(--lime-dark); background: var(--lime-soft); }
.plate-btn .plate { font-size: .8rem; }
.plate-btn small { color: var(--muted); font-size: .75rem; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #c4cabe; flex: none; display: inline-block; }
.dot.trip { background: var(--info); }
.dot.online { background: var(--ok); }
.dot.sos { background: var(--danger); animation: pulse 1s infinite; }
.map-plate {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 20px; line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); cursor: pointer;
}
.map-plate b {
  font: 800 11px/1 ui-monospace, monospace; letter-spacing: .05em; background: #fff; color: #111;
  border: 2px solid #111; border-radius: 5px; padding: 3px 5px;
}
.map-plate.sel b { background: var(--lime); }
.map-plate.sos b { background: #dc2626; color: #fff; border-color: #fff; animation: pulse 1s infinite; }
.monitor-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin: -4px 0 12px; }
.monitor-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Botón de pánico ---------- */
.sos-btn {
  position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 2000;
  width: 74px; height: 74px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: #dc2626; color: #fff; font: inherit; font-weight: 800; font-size: 1.1rem; letter-spacing: .04em;
  box-shadow: 0 8px 24px rgba(220, 38, 38, .45), 0 0 0 5px rgba(220, 38, 38, .18);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.sos-btn span { position: relative; }
.sos-btn svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.sos-btn circle { fill: none; stroke: #fff; stroke-width: 6; stroke-dasharray: 289; stroke-dashoffset: 289; }
.sos-btn.holding circle { stroke-dashoffset: 0; transition: stroke-dashoffset 3s linear; }
.sos-btn.holding { transform: scale(1.08); }
.sos-btn.sent { background: #7f1d1d; }
.card.alarm {
  border: 2px solid #dc2626; background: var(--danger-soft);
  animation: alarm 1.2s ease-in-out infinite;
}
.card.alarm .status-line { color: #b91c1c; font-size: 1.15rem; }
@keyframes alarm { 50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, .25); } }
.btn-danger.alarm-call { background: #dc2626; color: #fff; border-color: #dc2626; }
.alarm-item { padding: 12px 0; border-bottom: 1px solid #fecaca; }
.alarm-item:last-child { border-bottom: 0; }
.coords { font-family: ui-monospace, monospace; font-size: .9rem; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .35em .6em; display: inline-block; }

@media (max-width: 420px) {
  .grid-2 { grid-template-columns: 1fr; }
  .price-big { font-size: 2.5rem; }
}

/* =========================================================
   Página de inicio
   ========================================================= */
.landing { background: var(--bg); overflow-x: clip; }
.nav-links { display: flex; gap: 24px; margin-left: 30px; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.nav-links a:hover { color: var(--ink); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--lime-dark); margin-bottom: 14px;
}
.pill { background: var(--lime-soft); color: var(--lime-dark); border: 1px solid var(--lime); padding: .4em .9em; border-radius: 99px; letter-spacing: .02em; text-transform: none; font-size: .85rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: live 1.6s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); } 100% { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); } }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 52ch; }
.lead b { color: var(--ink); }

.l-hero { position: relative; padding: 56px 0 80px; background: radial-gradient(900px 520px at 90% 0%, var(--lime-soft), transparent 65%); }
.l-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.l-hero h1 { font-size: clamp(2.5rem, 6.5vw, 4.4rem); line-height: 1; letter-spacing: -.045em; margin-bottom: 20px; }
.l-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.l-trust { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px 22px; flex-wrap: wrap; color: var(--muted); font-weight: 600; font-size: .92rem; }
.l-trust li::before { content: "\2713"; color: var(--lime-dark); font-weight: 800; margin-right: 6px; }

/* Celular de muestra: el pasajero recibe ofertas */
.phone-wrap { position: relative; display: grid; place-items: center; padding: 20px 0; }
.phone-wrap::before { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: var(--lime); filter: blur(4px); opacity: .9; z-index: 0; }
.phone {
  width: 290px; height: 590px; border-radius: 46px; padding: 11px; position: relative; z-index: 1;
  background: #111; box-shadow: var(--shadow-lg); transform: rotate(3deg);
}
.phone-notch { position: absolute; top: 19px; left: 50%; transform: translateX(-50%); width: 90px; height: 24px; border-radius: 99px; background: #000; z-index: 2; }
.phone-screen { height: 100%; border-radius: 36px; overflow: hidden; background: var(--bg-2); display: flex; flex-direction: column; padding: 52px 14px 14px; gap: 10px; }
.mock-ask { background: var(--card); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.mock-ask small { display: block; color: var(--muted); font-size: .7rem; font-weight: 700; }
.mock-ask b { color: var(--ink); font-size: .95rem; }
.mock-ask .big { font-size: 1.9rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1.1; }
.mock-title { font-size: .78rem; font-weight: 800; color: var(--muted); padding: 2px 4px; display: flex; align-items: center; gap: 6px; }
.mock-offer { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); animation: slidein .6s ease-out both; }
.mock-offer:nth-of-type(2) { animation-delay: .4s; }
.mock-offer:nth-of-type(3) { animation-delay: .8s; }
.mock-offer:nth-of-type(4) { animation-delay: 1.2s; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.mock-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); font-weight: 800; font-size: .75rem; flex: none; }
.mock-offer div { min-width: 0; flex: 1; }
.mock-offer div b { display: block; font-size: .8rem; color: var(--ink); }
.mock-offer div small { font-size: .68rem; color: var(--muted); }
.mock-offer .p { font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.mock-offer .p.ok { color: var(--ok); }
.mock-btn { margin-top: auto; background: var(--lime); color: var(--lime-ink); text-align: center; font-weight: 800; border-radius: 999px; padding: 12px; font-size: .9rem; }
.float-card {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; font-size: 1.4rem;
  background: var(--card); border: 1px solid var(--line); padding: 10px 14px; border-radius: 16px; box-shadow: var(--shadow-lg);
}
.float-card b { display: block; font-size: .85rem; color: var(--ink); }
.float-card small { display: block; font-size: .72rem; color: var(--muted); }
.float-card.fc1 { left: -2%; top: -1%; animation: float 4s ease-in-out infinite; }
.float-card.fc2 { right: -3%; bottom: 14%; animation: float 4s ease-in-out 2s infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

.l-section { padding: 84px 0; }
.l-section.alt { background: var(--bg-2); }
.l-head { text-align: center; max-width: 660px; margin: 0 auto 44px; }
.l-section h2, .l-final h2 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); letter-spacing: -.035em; }

.join { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.join-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: 28px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.join-card.driver { background: var(--night); border-color: var(--night); color: #d6dcd1; }
.join-card.driver h3 { color: #fff; }
.join-card.driver .muted { color: #a3ab9d; }
.join-card.driver .checks li { color: #e4e9df; }
.join-card.driver a.small { color: var(--lime); }
.join-ico { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; font-size: 2rem; background: var(--lime-soft); }
.join-card.driver .join-ico { background: rgba(227, 18, 43, .15); }
.join-card h3 { font-size: 1.6rem; margin: 0; }
.join-card .checks { margin: 0; flex: 1; }
.join-tag { position: absolute; top: 24px; right: 24px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 26px 20px; box-shadow: var(--shadow); transition: transform .2s; }
.step:hover { transform: translateY(-4px); }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--night); color: var(--lime); font-weight: 800; margin-bottom: 14px; }
.step-ico { position: absolute; top: 22px; right: 20px; font-size: 1.8rem; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }

.l-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }
.feature > span { font-size: 1.6rem; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--lime-soft); margin-bottom: 12px; }
.feature h3 { margin: 0 0 4px; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }

.driver-band {
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center;
  padding: 48px; border-radius: 32px; background: var(--night); color: #d6dcd1;
}
.driver-band h2 { color: #fff; }
.driver-band .eyebrow { color: var(--lime); }
.checks { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; gap: 10px; }
.checks li { padding-left: 32px; position: relative; color: var(--text); }
.driver-band .checks li { color: #e4e9df; }
.checks li::before {
  content: "\2713"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); font-weight: 800; font-size: .8rem;
}
.fee-card { background: var(--lime); color: var(--lime-ink); border-radius: 26px; padding: 30px; text-align: center; }
.fee-card > small { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.fee { font-size: 4.2rem; font-weight: 800; line-height: 1.05; margin: 6px 0 10px; letter-spacing: -.04em; color: var(--lime-ink); }
.fee small { font-size: 1.05rem; font-weight: 700; }
.fee-card p { margin: 0; font-size: .92rem; }

.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 0 20px; }
.faq details[open] { border-color: var(--lime-dark); box-shadow: 0 0 0 4px var(--lime-soft); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--lime-dark); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq p { color: var(--muted); margin: 0 0 18px; }

.l-final { padding: 96px 0; text-align: center; background: var(--lime); }
.l-final h2 { color: var(--lime-ink); }
.l-final .lead { margin: 0 auto 28px; color: var(--lime-ink); }
.l-final .l-cta { justify-content: center; }
.l-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 22px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .l-hero { padding: 34px 0 60px; }
  .l-hero-grid, .l-split, .driver-band, .join { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .driver-band { padding: 30px 22px; }
  .join-card { padding: 26px 22px; }
  .phone { transform: none; width: 262px; height: 540px; }
  .phone-wrap::before { width: 280px; height: 280px; }
  .float-card.fc1 { left: 0; }
  .float-card.fc2 { right: 0; }
  .l-section { padding: 64px 0; }
}
@media (max-width: 520px) {
  .steps, .features { grid-template-columns: 1fr; }
  .l-cta .btn { flex: 1 1 100%; }
  .l-footer { justify-content: center; text-align: center; }
  .landing .nav-right .btn-ghost { display: none; }
  .float-card.fc2 { bottom: auto; top: 6%; }
  .float-card.fc1 { display: none; }
}
/* ---------- Ingresar y crear cuenta: la ciudad roja de noche detrás (como la app) ---------- */
#auth {
  position: relative; padding: 18px 12px 120px; margin: 0 0 16px; border-radius: 24px;
  background: url(img/ciudad-roja.svg) bottom / 100% auto no-repeat,
    radial-gradient(120% 70% at 50% 100%, rgba(227, 18, 43, .55), rgba(227, 18, 43, 0) 70%), #08080B;
}
#auth .card { position: relative; z-index: 1; }
/* Título sobre el fondo oscuro (página del conductor): letras blancas. */
#auth .hero h1 { color: #fff; }
#auth .hero p { color: rgba(255, 255, 255, .8); }
#auth .hero .hl { color: #fff; }

/* Pedir: viaje o envío, y carro o moto con sus dos precios */
.mode-tabs { margin-bottom: 12px; }
.veh-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.veh-prices button { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 14px; padding: 10px; font: inherit; font-weight: 600; cursor: pointer; text-align: left; display: grid; gap: 2px; }
.veh-prices button b { font-size: 1.15rem; color: var(--ink); }
.veh-prices button small { color: var(--muted); font-weight: 500; }
.veh-prices button.on { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }

/* Botón 🌓 de modo claro / oscuro */
.theme-btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* En la web solo se registra: pedir y manejar es en la app del celular. */
.app-only { text-align: center; max-width: 520px; margin: 24px auto; }
.app-only-icon { font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.app-only-steps { text-align: left; margin: 12px auto 16px; max-width: 360px; line-height: 1.7; }
.app-only .badge { display: inline-block; margin-bottom: 14px; }
.app-only .banner { text-align: left; margin: 10px 0; }

/* Cuadrito para aceptar los términos antes de registrarse. */
.terms-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: .92rem; line-height: 1.4; cursor: pointer; }
.terms-check input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: #E3122B; }
.terms-check a { color: #E3122B; font-weight: 700; }

/* Registro de pasajero y conductor: botón Volver y foto, como los demás registros. */
.back-link { display: inline-block; margin: 14px 0 4px; font-weight: 700; color: var(--text, inherit); text-decoration: none; }
.back-link:hover { color: #E3122B; }
.auth-photo { border-radius: 20px; overflow: hidden; margin: 0 0 16px; box-shadow: var(--shadow); }
.auth-photo img { display: block; width: 100%; height: auto; }
