/* ═══════════════════════════════════════════════════════════════════════
   El aspecto de la app del conductor.

   El diseño se hizo primero en un lienzo de Claude Design («E-CHARGE · App
   del cliente») y esto es ese diseño llevado a la app: la letra del sistema,
   títulos grandes, tarjetas blancas de esquinas amplias sobre un fondo gris
   claro, líneas finas en vez de bordes, y una barra de pestañas traslúcida.

   ── POR QUÉ ES UNA CAPA Y NO UNA REESCRITURA ──

   `estilos.css` lo comparten la app del conductor y el panel de operación, y
   casi todo en él sale de variables. Esta hoja se carga solo en la app
   (`index.html`), cambia esas variables y retoca las piezas que no dependen de
   ellas. El panel no se entera.

   La letra es la del SISTEMA a propósito: en un iPhone es San Francisco y en
   un Android la suya. Una app se siente nativa cuando habla con la letra del
   teléfono, y de paso no se descarga ninguna.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --papel: #f2f2f7;
  --blanco: #ffffff;
  --gris-suave: #f2f2f7;
  --relleno: #e4e4ea; /* campos y controles segmentados */

  --tinta: #0b0b0f;
  --tinta-media: #3c3c44;
  --tinta-suave: #5c5c66;
  --tinta-tenue: #5c5c66;

  --borde: #ececf0;
  --borde-fuerte: #d9d9e0;

  --azul: #2705dc;
  --azul-hover: #1c04a8;
  --azul-tenue: #ece9ff;
  --azul-borde: #ece9ff;

  --verde: #14713b;
  --verde-vivo: #1f8a4c;
  --verde-tenue: #e6f5ec;
  --verde-borde: #e6f5ec;

  --ambar: #8a5300;
  --ambar-tenue: #fff1db;
  --ambar-borde: #fff1db;

  --rojo-borde: #fbdfe1;

  --noche: #0b1026; /* el fondo de todo lo que es puntos */
  --noche-2: #232a4d;
  --oro: #f5b301;
  --oro-claro: #ffd25a;
  --oro-texto: #8a5300;

  --texto: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --mono: var(--texto);

  --radio: 22px;
  --radio-sm: 14px;
  --sombra: 0 1px 3px rgba(11, 11, 15, 0.06);
  --sombra-media: 0 6px 20px rgba(11, 11, 15, 0.08);
}

body {
  background: var(--papel);
  font-family: var(--texto);
  color: var(--tinta);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}

.envoltura {
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 40px;
}

/* ── Cabecera: discreta, sin línea ─────────────────────────────────── */

.cabecera {
  border-bottom: none;
  padding-bottom: 6px;
}
.cabecera .marca .nombre {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cabecera .marca .iso {
  width: 26px;
  height: 26px;
}
.estado-red {
  font-family: var(--texto);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--tinta-suave);
}

/* ── Títulos ───────────────────────────────────────────────────────── */

.titulo-grande,
.cta-titulo {
  font-size: 34px;
  line-height: 41px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 10px 0 4px;
  color: var(--tinta);
}
.titulo-seccion {
  font-family: var(--texto);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: var(--tinta-suave);
  margin: 22px 0 10px;
}
.etiqueta {
  font-family: var(--texto);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--tinta-suave);
}
.sitio-nombre {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.sitio-detalle {
  font-size: 15px;
  color: var(--tinta-suave);
}

/* ── Tarjetas: blancas, sin borde, esquinas amplias ────────────────── */

.ficha,
.recibo,
.estacion,
.equipo,
.monto,
.boca,
.cta-tarjeta,
.cta-carga,
.res-pago,
.con-tarjeta,
.tarjeta-app {
  background: var(--blanco);
  border: none;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}
.ficha,
.recibo {
  padding: 18px;
}
.ficha .datos {
  border: none;
  background: var(--gris-suave);
  border-radius: var(--radio-sm);
  overflow: hidden;
}
.ficha .dato {
  border-color: var(--blanco);
}
.dato .valor {
  font-family: var(--texto);
  font-size: 17px;
  font-weight: 600;
}
.dato .clave {
  font-size: 12px;
  color: var(--tinta-suave);
}
.monto .cifra {
  font-family: var(--texto);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.monto .equivale {
  font-size: 13px;
}
.recibo .renglon {
  font-size: 17px;
  border-color: var(--borde);
}
.recibo .renglon .cifra {
  font-family: var(--texto);
  font-weight: 600;
}

/* ── Botones ───────────────────────────────────────────────────────── */

.boton {
  min-height: 54px;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.1px;
}
.boton-fantasma {
  background: var(--blanco);
  border-color: transparent;
  color: var(--azul);
  box-shadow: var(--sombra);
}
.boton-fantasma:hover:not(:disabled) {
  border-color: transparent;
  color: var(--azul-hover);
}
.boton-peligro {
  border-color: transparent;
  box-shadow: var(--sombra);
}
.boton:disabled {
  opacity: 0.45;
}

/* ── Campos: rellenos, sin borde ───────────────────────────────────── */

.campo input {
  height: 50px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: var(--relleno);
  font-family: var(--texto);
  font-size: 17px;
}
.campo input:focus {
  box-shadow: 0 0 0 3px var(--azul-tenue);
}

/* ── Avisos ────────────────────────────────────────────────────────── */

.aviso {
  border: none;
  border-radius: 16px;
  padding: 13px 15px;
  font-size: 15px;
  line-height: 21px;
}
.aviso.neutro {
  background: var(--blanco);
  box-shadow: var(--sombra);
  color: var(--tinta-media);
}
.nota {
  font-size: 13px;
  line-height: 18px;
  color: var(--tinta-suave);
}

/* ── La barra de pestañas: de borde a borde y traslúcida ───────────── */

.barra-nav {
  left: 0;
  right: 0;
  bottom: 0;
  transform: none;
  width: auto;
  gap: 0;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border: none;
  border-top: 1px solid rgba(11, 11, 15, 0.08);
  border-radius: 0;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.nav-item {
  flex-direction: column;
  gap: 3px;
  min-height: 48px;
  padding: 2px 4px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--tinta-suave);
}
.nav-item svg {
  width: 26px;
  height: 26px;
}
.nav-item.activo {
  background: none;
  color: var(--azul);
  font-weight: 600;
}
body.con-nav .envoltura {
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
}

/* ── Mi cuenta ─────────────────────────────────────────────────────── */

.cta-quien {
  font-family: var(--texto);
  font-size: 15px;
}
.cta-tarjeta {
  padding: 16px 18px;
}
.cta-chip {
  width: 46px;
  height: 32px;
  border-radius: 7px;
  background: var(--azul);
}
.cta-tarjeta-texto b {
  font-family: var(--texto);
  font-size: 17px;
  font-weight: 600;
}
.cta-carga {
  padding: 14px 18px;
}
.cta-carga b {
  font-size: 17px;
}
.cta-carga .der b {
  font-family: var(--texto);
}
.cta-vacio {
  border: none;
  background: var(--blanco);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  font-size: 15px;
}

.con-tarjeta {
  padding: 20px;
}
.con-tarjeta .ct-titulo {
  font-size: 20px;
  letter-spacing: -0.3px;
}
.con-tarjeta p {
  font-size: 15px;
  line-height: 21px;
}

/* ── Cargando ──────────────────────────────────────────────────────── */

.ses-cab {
  margin: 8px 0 14px;
}
.ses-sitio {
  font-size: 17px;
  font-weight: 600;
}
.ses-centro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.ses-anillo {
  position: relative;
  width: 236px;
  height: 236px;
}
.ses-anillo svg {
  display: block;
}
.ses-anillo .pista {
  stroke: var(--relleno);
}
.ses-anillo .avance {
  stroke: var(--azul);
  transition: stroke-dasharray 0.8s ease;
}
.ses-anillo .dentro {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.ses-grande {
  margin: 0;
  align-items: baseline;
}
.ses-numero {
  font-size: 68px;
  line-height: 70px;
  font-weight: 300;
  letter-spacing: -3px;
}
.ses-unidad {
  font-size: 24px;
}
.ses-pie {
  margin: 0;
  font-size: 14px;
  color: var(--tinta-suave);
  /* Centrado bajo la cifra: sin esto queda pegado a su borde izquierdo, y con
     un número de dos dígitos se nota torcido. */
  text-align: center;
}
/* ── Eliminar la cuenta ── */
#cta-eliminar {
  margin-top: 6px;
}
.eli-caja {
  padding: 18px;
  background: var(--blanco);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}
.eli-caja b {
  display: block;
  font-size: 20px;
  letter-spacing: -0.2px;
  margin-bottom: 8px;
}
.eli-caja p {
  margin: 10px 0 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: var(--tinta-suave);
}
.eli-caja ul {
  margin: 0;
  padding-left: 18px;
}
.eli-caja li {
  font-size: 15px;
  line-height: 21px;
  color: var(--tinta-media);
  margin-bottom: 3px;
}
.eli-caja .eli-aviso {
  margin: 14px 0 12px;
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--rojo);
}
.eli-botones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.eli-botones .boton {
  margin: 0;
}

/* ── La tarjeta E-CHARGE en «Tu cuenta» ── */
.ech-tarjeta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  margin-bottom: 12px;
  background: var(--blanco);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}
.ech-cab {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* El plástico, dibujado: azul con su franja, sin imagen que cargar. */
.ech-plastico {
  flex: none;
  width: 46px;
  height: 32px;
  border-radius: 7px;
  background: var(--azul);
  display: flex;
  align-items: center;
}
.ech-plastico i {
  display: block;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.85);
}
.ech-nombre {
  flex: 1;
  min-width: 0;
}
.ech-nombre b {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--tinta);
}
.ech-nombre span {
  display: block;
  font-size: 13px;
  color: var(--tinta-suave);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ech-estado {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fdecec;
  color: var(--rojo);
  font-size: 12px;
  font-weight: 600;
}
.ech-saldo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--borde);
}
.ech-saldo span {
  font-size: 15px;
  color: var(--tinta-media);
}
.ech-saldo b {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
  color: var(--tinta);
}
.ech-nota {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--tinta-suave);
}
.ech-nota b { color: var(--tinta-media); font-weight: 600; }
.ech-quitar {
  align-self: flex-start;
  padding: 6px 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--tinta-suave);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ech-vincular {
  margin-bottom: 4px;
}
.ech-fila {
  display: flex;
  gap: 10px;
}
.ech-fila input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  border: none;
  border-radius: 14px;
  background: var(--blanco);
  box-shadow: var(--sombra);
  font: inherit;
  font-size: 17px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--tinta);
}
.ech-fila input::placeholder {
  letter-spacing: 0;
  text-transform: none;
  color: var(--tinta-suave);
}
.ech-fila .boton {
  flex: none;
  width: auto;
  height: 50px;
  margin: 0;
  padding: 0 18px;
}
/* La marca lleva guion, y el navegador parte el renglón justo ahí. */
.junto { white-space: nowrap; }
/* El saldo que queda, en el recibo de una carga con tarjeta E-CHARGE. */
.res-saldo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--borde);
}
.res-saldo span {
  font-size: 15px;
  color: var(--tinta-media);
}
.res-saldo b {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── La ilustración de temporada, en la pantalla de carga ──
   El dibujo trae su propio fondo claro: va dentro de una ficha blanca para
   que ese fondo parezca puesto a propósito y no un rectángulo pegado. */
.ses-ilustracion {
  margin: 4px 0 14px;
  border-radius: var(--radio);
  overflow: hidden;
  background: #f1f3f8;
  box-shadow: var(--sombra);
}
.ses-ilustracion[hidden] {
  display: none;
}
/* Con el botón de detener arriba, su nota queda justo encima de las cifras:
   necesita aire por debajo para no tocarlas. */
#p-sesion #s-nota {
  margin-bottom: 16px;
}
.ses-ilustracion img {
  display: block;
  width: 100%;
  /* La proporción del dibujo (1477 × 1065), reservada antes de que cargue:
     sin esto la pantalla da un salto cuando llega la imagen. */
  aspect-ratio: 1477 / 1065;
  object-fit: cover;
}

/* Lo estimado de la batería: bajo el estado, dos renglones como mucho. */
.ses-estimado {
  margin-top: 12px;
  text-align: center;
}
.ses-estimado-1 {
  font-size: 17px;
  line-height: 22px;
  font-weight: 500;
  color: var(--tinta);
}
.ses-estimado-1 b { font-weight: 700; }
.ses-estimado-2 {
  margin-top: 2px;
  font-size: 13px;
  line-height: 18px;
  color: var(--tinta-suave);
}
.ses-estimado-2 b { font-weight: 600; color: var(--tinta-media); }

.ses-estado {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--azul-tenue);
  color: var(--azul);
  font-size: 13px;
  letter-spacing: 0.3px;
}
.ses-rejilla {
  gap: 1px;
  padding: 0;
  border: none;
  border-radius: var(--radio);
  overflow: hidden;
  background: var(--borde);
  box-shadow: var(--sombra);
}
.ses-dato {
  background: var(--blanco);
  padding: 16px 18px;
}
.ses-dato b {
  font-size: 26px;
  letter-spacing: -0.5px;
}
.ses-fila {
  border: none;
  background: none;
  padding: 14px 6px 0;
  margin-bottom: 14px;
  font-size: 15px;
}
.boton-mantener {
  border-radius: 20px;
  background: var(--tinta);
  padding: 12px 16px;
  min-height: 62px;
}
.boton-mantener .texto b {
  font-size: 17px;
  font-weight: 600;
}
.boton-mantener .texto small {
  color: #c9c9d1;
  opacity: 1;
}

/* ── Resumen ───────────────────────────────────────────────────────── */

.res-titulo .marca-ok {
  width: 60px;
  height: 60px;
  background: var(--verde-vivo);
  color: #fff;
  font-size: 28px;
}
.res-titulo h2 {
  font-size: 28px;
  line-height: 34px;
  letter-spacing: -0.4px;
}
.res-pago {
  padding: 20px;
}
.res-cab b {
  font-size: 15px;
  font-weight: 600;
}
.res-total {
  font-size: 44px;
  line-height: 50px;
  letter-spacing: -1.4px;
}
.res-tarjeta {
  font-family: var(--texto);
}

/* ── Puntos: la franja oscura que se repite ────────────────────────── */

.puntos-franja {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 18px 20px;
  margin-bottom: 14px;
  border: none;
  border-radius: var(--radio);
  background: var(--noche);
  color: #fff;
  font-family: var(--texto);
  text-align: left;
  cursor: pointer;
}
.puntos-franja .arriba {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.puntos-franja .rotulo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
}
.moneda {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--oro);
  color: #5a3e00;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.moneda svg {
  width: 16px;
  height: 16px;
}
.puntos-franja .mas {
  font-size: 22px;
  font-weight: 700;
  color: var(--oro-claro);
}
.puntos-franja .desglose {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  color: #c9cce0;
}
.puntos-franja .desglose div {
  display: flex;
  justify-content: space-between;
}
.barra-puntos {
  height: 8px;
  border-radius: 4px;
  background: var(--noche-2);
  overflow: hidden;
}
.barra-puntos i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--oro);
}
.res-ahorro {
  font-size: 14px;
  color: var(--tinta-suave);
  text-align: center;
  margin: 2px 0 10px;
}
.res-ahorro b {
  color: var(--verde);
}

/* ── Puntos: mis niveles ───────────────────────────────────────────── */

.pts-cab {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.pts-cab .enlace {
  min-height: 44px;
  display: flex;
  align-items: center;
  border: none;
  background: none;
  font-family: var(--texto);
  font-size: 17px;
  font-weight: 600;
  color: var(--azul);
  cursor: pointer;
}
.tarjeta-app {
  padding: 20px;
  margin-bottom: 14px;
}
.pts-mes {
  display: flex;
  align-items: center;
  gap: 18px;
}
.pts-aro {
  position: relative;
  width: 122px;
  height: 122px;
  flex-shrink: 0;
}
.pts-aro .dentro {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.pts-aro .dentro b {
  font-size: 34px;
  line-height: 36px;
  letter-spacing: -1px;
}
.pts-aro .dentro span {
  font-size: 12px;
  color: var(--tinta-suave);
}
.pts-mes .mes {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--tinta-suave);
}
.pts-mes .falta {
  font-size: 20px;
  line-height: 25px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 4px 0 6px;
}
.pts-mes .saldo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--oro-texto);
}
.pts-mes .saldo i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--oro);
}

.lista-app {
  padding: 0;
  overflow: hidden;
}
.lista-app > * {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-top: 1px solid var(--borde);
}
.lista-app > *:first-child {
  border-top: none;
}
.nivel .num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  background: var(--gris-suave);
  color: var(--tinta-suave);
}
.nivel.hecho .num {
  background: var(--verde-vivo);
  color: #fff;
}
.nivel.actual .num {
  background: none;
  border: 2px solid var(--azul);
  color: var(--azul);
}
.nivel .cuerpo {
  flex: 1;
  min-width: 0;
}
.nivel .cuerpo b {
  display: block;
  font-size: 17px;
  font-weight: 600;
}
.nivel .cuerpo span {
  display: block;
  font-size: 13px;
  color: var(--tinta-suave);
  margin-top: 1px;
}
.nivel.hecho .cuerpo span,
.nivel.hecho .gana {
  color: var(--verde);
}
.nivel .gana {
  font-size: 15px;
  font-weight: 600;
}
.nivel:not(.hecho):not(.actual) .gana,
.nivel:not(.hecho):not(.actual) .cuerpo b {
  color: var(--tinta-media);
}
.nivel .progreso {
  height: 6px;
  border-radius: 3px;
  background: var(--relleno);
  overflow: hidden;
  margin-top: 6px;
}
.nivel .progreso i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--azul);
}

.pts-ahorro {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pts-ahorro .icono {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--verde-tenue);
  color: var(--verde);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.pts-ahorro b {
  display: block;
  font-size: 22px;
  letter-spacing: -0.4px;
}
.pts-ahorro span {
  font-size: 13px;
  color: var(--tinta-suave);
}
.pts-ahorro button {
  border: none;
  background: none;
  padding: 0;
  font-family: var(--texto);
  font-size: 13px;
  font-weight: 600;
  color: var(--azul);
  cursor: pointer;
}
.meses .fila {
  justify-content: space-between;
  font-size: 15px;
}
.meses .fila span {
  color: var(--tinta-suave);
}

/* ── Puntos: la tienda ─────────────────────────────────────────────── */

.volver {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  margin-left: -8px;
  border: none;
  background: none;
  font-family: var(--texto);
  font-size: 17px;
  color: var(--azul);
  cursor: pointer;
}
.volver svg {
  width: 24px;
  height: 24px;
}
.saldo-oscuro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  margin-bottom: 14px;
  border-radius: var(--radio);
  background: var(--noche);
  color: #fff;
}
.saldo-oscuro .cifra {
  display: flex;
  align-items: center;
  gap: 12px;
}
.saldo-oscuro .cifra .moneda {
  width: 40px;
  height: 40px;
}
.saldo-oscuro .cifra .moneda svg {
  width: 20px;
  height: 20px;
}
.saldo-oscuro .cifra b {
  font-size: 40px;
  line-height: 44px;
  letter-spacing: -1px;
}
.saldo-oscuro .cifra span {
  font-size: 17px;
  color: #c9cce0;
}
.saldo-oscuro p {
  margin: 0;
  font-size: 15px;
  color: #c9cce0;
}
.saldo-oscuro p b {
  color: #fff;
}
.cupon .cuerpo {
  flex: 1;
}
.cupon .cuerpo b {
  display: block;
  font-size: 22px;
  letter-spacing: -0.4px;
}
.cupon .cuerpo span {
  font-size: 13px;
  color: var(--tinta-suave);
}
.cupon button {
  min-height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 18px;
  background: var(--azul);
  color: #fff;
  font-family: var(--texto);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.cupon button:disabled {
  background: var(--gris-suave);
  color: var(--tinta-suave);
  cursor: default;
}
.cupon-activo {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--verde-tenue);
  box-shadow: none;
}
.cupon-activo b {
  display: block;
  font-size: 17px;
  color: var(--verde);
}
.cupon-activo span {
  font-size: 13px;
  color: var(--tinta-media);
}
.invitar {
  display: flex;
  align-items: center;
  gap: 14px;
}
.invitar .cuerpo {
  flex: 1;
}
.invitar .cuerpo b {
  display: block;
  font-size: 17px;
  font-weight: 600;
}
.invitar .cuerpo span {
  font-size: 13px;
  line-height: 18px;
  color: var(--tinta-suave);
}
.invitar .codigo {
  padding: 8px 12px;
  border: none;
  border-radius: 12px;
  background: var(--azul-tenue);
  color: var(--azul);
  font-family: var(--texto);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
}

/* ── «Sumaste puntos»: la pantalla entera es de noche ──────────────── */

#p-sumaste {
  position: fixed;
  inset: 0;
  z-index: calc(var(--capa-cajon) + 10);
  background: var(--noche);
  color: #fff;
  align-items: center;
  padding: calc(84px + env(safe-area-inset-top, 0px)) 24px calc(30px + env(safe-area-inset-bottom, 0px));
}
#p-sumaste h2 {
  margin: 0;
  font-size: 30px;
  line-height: 36px;
  letter-spacing: -0.4px;
  color: var(--oro-claro);
}
.moneda-grande {
  position: relative;
  width: 176px;
  height: 186px;
  margin-top: 48px;
}
.moneda-grande .canto,
.moneda-grande .cara {
  position: absolute;
  left: 0;
  width: 176px;
  height: 176px;
  border-radius: 50%;
}
.moneda-grande .canto {
  top: 10px;
  background: #b87c00;
}
.moneda-grande .cara {
  top: 0;
  background: var(--oro);
  display: grid;
  place-items: center;
  animation: caer 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.moneda-grande .cara span {
  width: 138px;
  height: 138px;
  border-radius: 50%;
  border: 5px solid #d99a00;
  display: grid;
  place-items: center;
  color: #c98a00;
}
.moneda-grande .cara svg {
  width: 70px;
  height: 70px;
}
@keyframes caer {
  from {
    transform: translateY(-40px) scale(0.8);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .moneda-grande .cara {
    animation: none;
  }
}
.sum-mas {
  margin-top: 46px;
  font-size: 72px;
  line-height: 76px;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--oro-claro);
}
.sum-que {
  font-size: 17px;
  font-weight: 600;
  color: var(--oro-claro);
}
.sum-saldo {
  width: 100%;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: #c9cce0;
}
.sum-saldo .fila {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sum-saldo .fila b {
  font-size: 17px;
  color: #fff;
}
.sum-saldo p {
  margin: 0;
  line-height: 21px;
}
.sum-saldo p b {
  color: #fff;
}
.boton-oro {
  width: 100%;
  min-height: 54px;
  border: none;
  border-radius: 16px;
  background: var(--oro-claro);
  color: var(--noche);
  font-family: var(--texto);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════
   El mapa de inicio y la hoja de la estación.
   ═══════════════════════════════════════════════════════════════════════ */

/* El mapa ocupa la pantalla entera, por debajo de la barra de pestañas. */
#p-mapa {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--papel);
  animation: none;
}
/* Con la hoja de la estación abierta, el mapa sigue a la vista detrás. */
body:has(#p-ficha.activa) #p-mapa {
  display: flex;
}
#p-mapa .lienzo-mapa {
  position: absolute;
  inset: 0;
  height: auto;
  min-height: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  /* Encierra las capas de Leaflet: lo que flota encima va por fuera. */
  z-index: 0;
}

.mapa-arriba {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 0;
  /* Lo que no es un control deja pasar el dedo al mapa. */
  pointer-events: none;
}
.mapa-arriba > * {
  pointer-events: auto;
}
.mapa-fila {
  display: flex;
  gap: 10px;
}
.mapa-buscar {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 16px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--sombra-media);
  color: var(--tinta-suave);
}
.mapa-buscar svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.mapa-buscar input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  font-family: var(--texto);
  font-size: 17px;
  color: var(--tinta);
}
.mapa-buscar input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.mapa-redondo {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--sombra-media);
  color: var(--azul);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.mapa-redondo svg {
  width: 23px;
  height: 23px;
}
.mapa-redondo.buscando svg {
  animation: girar 1s linear infinite;
}
@keyframes girar {
  to {
    transform: rotate(360deg);
  }
}

.mapa-resultados {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--sombra-media);
  overflow: hidden;
}
.mapa-resultado {
  display: block;
  width: 100%;
  padding: 12px 18px;
  border: none;
  border-top: 1px solid var(--borde);
  background: none;
  text-align: left;
  font-family: var(--texto);
  cursor: pointer;
}
.mapa-resultado:first-child {
  border-top: none;
}
.mapa-resultado b {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--tinta);
}
.mapa-resultado span {
  font-size: 13px;
  color: var(--tinta-suave);
}
.mapa-sin-resultado {
  padding: 14px 18px;
  font-size: 15px;
  color: var(--tinta-suave);
}

/* Mapa | Lista: un control pequeño, no dos botones grandes. */
#p-mapa .vistas {
  align-self: flex-start;
  display: inline-flex;
  gap: 2px;
  margin: 0;
  padding: 3px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--sombra);
}
#p-mapa .vista {
  min-height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: none;
  font-family: var(--texto);
  font-size: 14px;
  font-weight: 500;
  color: var(--tinta-media);
  cursor: pointer;
}
#p-mapa .vista.activa {
  background: var(--tinta);
  color: #fff;
  font-weight: 600;
}
#p-mapa #aviso-mapa .aviso {
  margin: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--sombra-media);
}

/* ── Los puntos del mapa: una pastilla con su punta ───────────────────── */

.pin {
  position: relative;
  width: auto;
  min-width: 54px;
  height: 36px;
  padding: 0 11px 0 8px;
  gap: 3px;
  border: 2.5px solid #fff;
  border-radius: 18px;
  background: var(--azul);
  color: #fff;
  font-family: var(--texto);
  box-shadow: 0 4px 12px rgba(11, 11, 15, 0.28);
}
.pin svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.pin .pin-cifra {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
.pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: inherit;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  border-radius: 0 0 3px 0;
  transform: rotate(45deg);
}
.pin-libre {
  background: var(--azul);
}
.pin-lleno {
  background: #8e8e98;
}
.pin-sin-saber {
  background: #8e8e98;
}

/* ── La lista, cuando se prefiere al mapa ─────────────────────────────── */

#p-mapa .estaciones {
  position: absolute;
  inset: calc(132px + env(safe-area-inset-top, 0px)) 0 0 0;
  z-index: 1;
  overflow-y: auto;
  padding: 8px 16px calc(110px + env(safe-area-inset-bottom, 0px));
  background: var(--papel);
}
#p-mapa .estacion {
  width: 100%;
  padding: 16px 18px;
  margin-bottom: 10px;
  text-align: left;
  font-family: var(--texto);
}
.estacion-nombre {
  font-size: 17px;
  font-weight: 600;
}
.estacion-detalle,
.estacion-km {
  font-size: 13px;
  color: var(--tinta-suave);
}
.estacion-libres {
  font-family: var(--texto);
  font-size: 13px;
  font-weight: 600;
}

/* ── La hoja de la estación ───────────────────────────────────────────── */

#p-ficha.activa {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: calc(var(--capa-mapa-tope) + 20);
  max-height: 82svh;
  overflow-y: auto;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  border-radius: 28px 28px 0 0;
  background: var(--blanco);
  box-shadow: 0 -10px 40px rgba(11, 11, 15, 0.18);
  animation: subir 0.32s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes subir {
  from {
    transform: translateY(40%);
    opacity: 0;
  }
}
.hoja-agarre {
  width: 40px;
  height: 5px;
  margin: 2px auto 12px;
  border-radius: 3px;
  background: var(--borde-fuerte);
}
.hoja-cab {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.hoja-atras {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--gris-suave);
  color: var(--tinta);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.hoja-atras svg {
  width: 22px;
  height: 22px;
}
.hoja-titulo {
  min-width: 0;
}
.hoja-titulo .sitio-nombre {
  font-size: 22px;
  line-height: 27px;
}
.disponibilidad-resumen {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--texto);
  font-size: 15px;
  font-weight: 600;
  color: var(--tinta-suave);
}
.disponibilidad-resumen::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.disponibilidad-resumen.libre {
  color: var(--verde);
}
.disponibilidad-resumen.lleno {
  color: var(--ambar);
}
.hoja-acciones {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.hoja-acciones .boton {
  flex: 1;
  margin: 0;
}
.boton-oscuro {
  background: var(--tinta);
  color: #fff;
  border-radius: 999px;
}
.hoja-acciones .boton-primario {
  border-radius: 999px;
}
.hoja-datos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.hoja-dato {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 6px;
  border-radius: 18px;
  background: var(--gris-suave);
  text-align: center;
}
.hoja-dato b {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.hoja-dato span {
  font-size: 12px;
  color: var(--tinta-suave);
}
#p-ficha .equipo {
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--gris-suave);
  box-shadow: none;
  border-radius: 18px;
}
.equipo-cabecera {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.equipo-nombre {
  font-family: var(--texto);
  font-size: 17px;
  font-weight: 600;
}
.equipo-libres {
  font-family: var(--texto);
  font-size: 14px;
  font-weight: 600;
  color: var(--verde);
}
.bocas-fila {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.boca-chip {
  min-width: 74px;
  padding: 8px 12px;
  border: none;
  border-radius: 12px;
  background: var(--blanco);
  font-family: var(--texto);
}
.boca-chip .boca-rotulo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--texto);
  font-size: 15px;
  font-weight: 700;
}
.boca-chip .boca-rotulo::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8e8e98;
}
.boca-chip .boca-tipo,
.boca-chip .boca-estado {
  display: block;
  font-family: var(--texto);
  font-size: 12px;
  color: var(--tinta-suave);
}
.boca-chip.libre {
  background: var(--verde-tenue);
}
.boca-chip.libre .boca-rotulo,
.boca-chip.libre .boca-estado {
  color: var(--verde);
}
.boca-chip.libre .boca-rotulo::before {
  background: var(--verde-vivo);
}
.boca-chip.ocupada .boca-rotulo::before {
  background: var(--oro);
}
.hoja-direccion {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 2px 4px;
  font-size: 15px;
  line-height: 20px;
  color: var(--tinta-suave);
}
.hoja-direccion svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* El mapa de OpenStreetMap trae mucho color: se le baja un poco para que lo
   que resalte sean nuestros puntos, no las avenidas. */
#p-mapa .leaflet-tile-pane {
  filter: saturate(0.55) brightness(1.04) contrast(0.96);
}
#p-mapa .leaflet-control-attribution {
  /* Por encima de la barra de pestañas, y discreta. */
  margin-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  border-radius: 8px 0 0 8px;
  font-family: var(--texto);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.8);
}

/* ── Avisos y autorización de datos ───────────────────────────────────── */

#s-avisos {
  margin-bottom: 12px;
}
.ses-avisos-ok {
  margin: 0;
  font-size: 14px;
  text-align: center;
  color: var(--verde);
  font-weight: 600;
}
.cta-acepta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 2px 18px;
  font-size: 14px;
  line-height: 20px;
  color: var(--tinta-media);
  cursor: pointer;
}
.cta-acepta input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--azul);
}
.cta-acepta a {
  color: var(--azul);
  font-weight: 600;
}
