:root { --fondo: #08203a; --panel: #10304f; --panel2: #163a5e; --texto: #eef4fb; --suave: #9db8d3; --linea: rgba(255,255,255,.12); --azul: #1e88d8; --verde: #1f9d6b; --ambar: #f2a93b; --rojo: #e5484d; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--fondo); color: var(--texto); font: 16px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
body { min-height: 100vh; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.pantalla { max-width: 560px; margin: 0 auto; padding: 16px 16px 90px; }
.marca { display: flex; justify-content: center; padding: 28px 0 8px; } .marca img { width: 120px; height: 120px; border-radius: 24px; }
h1 { font-size: 22px; margin: 6px 0 2px; } h2 { font-size: 18px; margin: 0; } p { margin: 4px 0; } .suave { color: var(--suave); font-size: 14px; }
.tarjeta { background: var(--panel); border: 1px solid var(--linea); border-radius: 16px; padding: 14px; margin: 12px 0; }
label { display: block; font-size: 14px; color: var(--suave); margin: 12px 0 6px; }
input { width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--linea); background: var(--panel2); font-size: 20px; letter-spacing: .06em; }
.boton { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px; border: 0; border-radius: 14px; font-weight: 600; font-size: 17px; background: var(--azul); color: #fff; }
.boton.verde { background: var(--verde); } .boton.ambar { background: var(--ambar); color: #3a2400; } .boton.fantasma { background: transparent; border: 1px solid var(--linea); color: var(--texto); } .boton.chico { width: auto; padding: 9px 14px; font-size: 14px; border-radius: 10px; }
.boton[disabled] { opacity: .55; }
.error { color: #ff9aa0; font-size: 15px; min-height: 22px; margin-top: 10px; }
.barra { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(8,32,58,.96); border-bottom: 1px solid var(--linea); }
.barra b { flex: 1; font-size: 17px; } .barra button { background: transparent; border: 1px solid var(--linea); border-radius: 10px; padding: 8px 12px; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(157,184,211,.18); color: var(--suave); }
.chip.azul { background: rgba(30,136,216,.22); color: #8cc8f5; } .chip.verde { background: rgba(31,157,107,.24); color: #7fdcb4; } .chip.ambar { background: rgba(242,169,59,.22); color: #f2c36f; }
.servicio { display: block; width: 100%; text-align: left; border: 1px solid var(--linea); background: var(--panel); border-radius: 16px; padding: 14px; margin: 12px 0; }
.servicio .arriba { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .servicio .hora { font-size: 22px; font-weight: 700; }
.ruta { margin: 8px 0 6px; color: var(--texto); font-size: 15px; } .progreso { height: 6px; background: rgba(255,255,255,.12); border-radius: 6px; overflow: hidden; margin-top: 10px; } .progreso i { display: block; height: 100%; background: var(--verde); }
.parada { border: 1px solid var(--linea); background: var(--panel); border-radius: 16px; padding: 14px; margin: 12px 0; } .parada.actual { border-color: var(--azul); box-shadow: 0 0 0 2px rgba(30,136,216,.35); } .parada.hecha { opacity: .72; }
.cab { display: flex; gap: 12px; align-items: flex-start; } .letra { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--azul); color: #fff; } .parada.hecha .letra { background: var(--verde); }
.cab h2 { font-size: 17px; } .datos { font-size: 14px; color: var(--suave); margin-top: 8px; } .datos b { color: var(--texto); font-weight: 600; }
.acciones { display: grid; gap: 10px; margin-top: 12px; } .fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.foto-fila { display: flex; align-items: center; gap: 10px; margin-top: 10px; } .foto-fila .suave { flex: 1; }
#aviso { position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 20; background: #0b1a2b; border: 1px solid var(--linea); border-radius: 12px; padding: 12px 14px; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
#aviso.mal { border-color: var(--rojo); color: #ffb3b7; } #aviso.bien { border-color: var(--verde); }
.vacio { text-align: center; padding: 40px 10px; color: var(--suave); }
input[type=file] { display: none; }

/* ───────── Pantalla de entrada: el diseño completo es la imagen; los campos reales van encima ───────── */
.login { display: flex; flex-direction: column; justify-content: flex-end; min-height: 100vh; min-height: 100dvh; background: #001a2f; overflow: hidden; }
.login-lienzo { position: relative; width: 100%; max-width: 520px; margin: 0 auto; aspect-ratio: 941 / 1672; background: url(fondo-login.webp) center / 100% 100% no-repeat; font-size: min(4.6vw, 24px); }
.login-lienzo::before { content: ''; position: absolute; left: 0; right: 0; top: -140px; height: 140px; background: linear-gradient(0deg, #001a2f, rgba(0,26,47,0)); }
.login-lienzo input { position: absolute; left: 25.5%; width: 58%; height: 5.4%; border: 0; border-radius: 0; background: transparent; padding: 0; font-size: 1em; letter-spacing: .06em; color: #fff; outline: 0; }
.login-lienzo input::placeholder { color: transparent; } .login-lienzo input:focus, .login-lienzo input:not(:placeholder-shown) { background: #07152b; }
#dni { top: 36.5%; } #pin { top: 43.5%; }
.login-lienzo button { position: absolute; left: 12.3%; width: 75.6%; top: 50.4%; height: 5.6%; border: 0; border-radius: 999px; background: transparent; color: transparent; }
.login-lienzo button:active { background: rgba(255,255,255,.14); } .login-lienzo button[disabled] { background: rgba(0,0,0,.35); color: #fff; font-weight: 700; }
.login-lienzo .error { position: absolute; left: 12%; right: 12%; top: 56.6%; margin: 0; min-height: 0; text-align: center; font-size: .72em; line-height: 1.2; text-shadow: 0 1px 3px #000; }

/* ───────── Barra de abajo y pantallas internas con el estilo del diseño ───────── */
html, body { background: radial-gradient(ellipse at top, #0d2b52 0%, #071a33 60%, #05142a 100%) fixed; }
.barra-logo { width: 30px; height: 30px; border-radius: 8px; }
.pantalla { padding-bottom: 110px; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: rgba(5,20,42,.97); border-top: 1px solid rgba(80,150,230,.35); max-width: 560px; margin: 0 auto; }
.nav button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; background: transparent; border: 0; color: var(--suave); font-size: 12px; padding: 6px 0; }
.nav button.activa { color: #fff; } .nav button.activa svg { stroke: #4aa3ff; }
.nav svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav .punto { position: absolute; top: 0; right: 28%; background: #e5484d; color: #fff; font-style: normal; font-size: 11px; min-width: 18px; border-radius: 9px; padding: 1px 5px; }
.servicio.alerta { border-left: 4px solid var(--ambar); } .servicio.alerta.rojo { border-left-color: var(--rojo); }
.servicio, .parada, .tarjeta { background: rgba(10,36,70,.82); border-color: rgba(80,150,230,.3); }

/* ───────── Mapa de la ruta ───────── */
#mapa-capa { position: fixed; inset: 0; z-index: 30; background: #05142a; display: flex; flex-direction: column; }
#mapa-capa[hidden] { display: none; }
.mapa-barra { display: flex; align-items: center; gap: 12px; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); background: rgba(5,20,42,.97); border-bottom: 1px solid var(--linea); }
.mapa-barra button { background: transparent; border: 1px solid var(--linea); border-radius: 10px; padding: 8px 12px; }
#mapa-lienzo { flex: 1; min-height: 0; }
#mapa-info { padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); background: rgba(5,20,42,.97); border-top: 1px solid var(--linea); display: grid; gap: 10px; }
.mapa-prox { display: flex; gap: 12px; align-items: center; } .mapa-letra { width: 38px; height: 38px; border-radius: 50%; background: var(--azul); display: grid; place-items: center; font-weight: 700; }
.mapa-llego { background: rgba(31,157,107,.2); border: 1px solid var(--verde); border-radius: 12px; padding: 10px; text-align: center; font-weight: 600; } .mapa-fin { text-align: center; padding: 6px; }
.mapa-pin { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; color: #fff; font-weight: 700; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.mapa-yo { width: 22px; height: 22px; border-radius: 50%; background: #2f8cff; border: 4px solid #fff; box-shadow: 0 0 0 8px rgba(47,140,255,.3); }
.boton.azul { background: var(--azul); }

.demo-cinta { background: #f2a93b; color: #3a2400; text-align: center; font-weight: 700; font-size: 13px; padding: 6px; position: sticky; top: 60px; z-index: 4; }

.guia-fila { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--linea); }
.guia-fila .suave { font-size: 13px; }
