:root {
  color-scheme: light dark;
  --fondo: #f6f7f9; --superficie: #fff; --texto: #15181d; --secundario: #5b6270; --linea: #e3e6eb;
  --acento: #2453d4; --acento-texto: #fff; --acento-suave: #e8eefc;
  --ok: #1d8a4e; --pausa: #b86e00; --apagado: #8a909c; --error: #c0362c;
  --esq: #eceef2; --radio: 14px;
  font: 400 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #111317; --superficie: #1a1d23; --texto: #eceef2; --secundario: #a0a6b2; --linea: #2a2e36;
    --acento: #7ea1ff; --acento-texto: #0d1530; --acento-suave: #1e2740;
    --ok: #4cc47f; --pausa: #f0a640; --apagado: #7b818d; --error: #ff7a6e; --esq: #252930;
  }
}
* { box-sizing: border-box; }
html { background: var(--fondo); color: var(--texto); }
body { margin: 0; min-height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
::selection { background: var(--acento-suave); color: var(--texto); }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
h1 { margin: 0; font-size: 1.75rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
main { max-width: 40rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

.boton {
  font: 600 0.9375rem/1 inherit; font-family: inherit; min-height: 2.5rem; padding: 0 1rem; border-radius: 999px;
  border: 1px solid var(--linea); background: var(--superficie); color: var(--texto); cursor: pointer;
  transition: background-color .15s, transform .1s;
}
.boton:active { transform: scale(.97); }
.boton.primario { background: var(--acento); border-color: var(--acento); color: var(--acento-texto); }
.boton:disabled { opacity: .55; cursor: default; }

.entrar { display: flex; flex-direction: column; align-items: center; padding-top: 18vh; text-align: center; }
.entrar img { border-radius: 14px; margin-bottom: 1rem; }
.entrar form { width: 100%; max-width: 20rem; margin-top: 2rem; display: flex; flex-direction: column; text-align: left; gap: .5rem; }
.entrar label { font-size: .875rem; font-weight: 600; color: var(--secundario); }
.entrar input {
  font: inherit; height: 3rem; padding: 0 .875rem; border-radius: 10px; border: 1px solid var(--linea);
  background: var(--superficie); color: var(--texto);
}
.entrar input:focus { outline: 2px solid var(--acento); outline-offset: -1px; border-color: transparent; }
.entrar .boton { height: 3rem; margin-top: .75rem; border-radius: 10px; }
.error { margin: 0; color: var(--error); font-size: .875rem; }

.cabecera { padding: .75rem .25rem 1.25rem; }
.cuentas { margin: .25rem 0 0; color: var(--secundario); font-variant-numeric: tabular-nums; }
.cuentas b { color: var(--texto); font-weight: 600; }

.tarjeta { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); }
.estado { display: flex; align-items: center; gap: .875rem; padding: .875rem 1rem; margin-bottom: .75rem; }
.estado-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.estado-texto strong { font-weight: 600; }
.secundario { color: var(--secundario); font-size: .875rem; }
.punto { width: .625rem; height: .625rem; border-radius: 50%; background: var(--apagado); flex: none; margin: 0 .25rem; }
.estado[data-estado="andando"] .punto { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.estado[data-estado="pausado"] .punto { background: var(--pausa); }
.icono { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: var(--secundario); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.lista { margin-top: 1.5rem; }
.dia { margin: 1.5rem .25rem .5rem; font-size: .8125rem; font-weight: 600; color: var(--secundario); }
.dia:first-child { margin-top: 0; }
.grupo { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; }
.fila { display: flex; flex-direction: column; gap: .125rem; padding: .8125rem 1rem; text-decoration: none; color: inherit; }
.fila + .fila { border-top: 1px solid var(--linea); }
a.fila:active { background: var(--esq); }
.fila-arriba { display: flex; align-items: baseline; gap: .75rem; }
.empresa { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hora { color: var(--secundario); font-size: .8125rem; font-variant-numeric: tabular-nums; flex: none; }
.puesto { color: var(--secundario); font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fuente { font-size: .75rem; color: var(--secundario); }
.vacio { padding: 3rem 1rem; text-align: center; color: var(--secundario); }

.esq { display: block; height: .875rem; border-radius: 6px; background: var(--esq); animation: latido 1.4s ease-in-out infinite; }
.fila .esq + .esq { margin-top: .375rem; height: .75rem; }
@keyframes latido { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .esq { animation: none; } .boton { transition: none; } }
