/* ------------------------------------------------------------------
   Tareas de la estación
   Paleta: asfalto, niebla y ámbar de señalización.
   Tipografía: Barlow Condensed (rótulos) + Inter (texto y datos).
   ------------------------------------------------------------------ */

:root {
  --asfalto:  #14171C;
  --pizarra:  #232833;
  --acero:    #59616F;
  --acero-claro: #9AA2AF;
  --niebla:   #EFF1F4;
  --papel:    #FFFFFF;
  --ambar:    #FFB020;
  --ambar-oscuro: #C97F00;
  --verde:    #1E9E6A;
  --rojo:     #E0484A;
  --linea:    #DDE1E7;

  --radio: 10px;
  --toque: 60px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--niebla);
  color: var(--asfalto);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; cursor: pointer; border: none; }

.pantalla { display: none; min-height: 100%; flex-direction: column; }
.pantalla.activa { display: flex; }

/* ---------------------------------------------------- cabeceras simples */

.cabecera-simple {
  padding: 32px 28px 20px;
  background: var(--asfalto);
  color: var(--papel);
}

.eyebrow {
  margin: 0 0 6px;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ambar);
}

.titulo {
  margin: 0;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.fecha-hoy {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--acero-claro);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------- acceso */

.cuerpo-acceso { padding: 24px 20px 40px; flex: 1; }

.instruccion {
  margin: 0 0 18px;
  font-size: 16px;
  color: var(--acero);
}

.rejilla-empleados {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.ficha-empleado {
  min-height: 88px;
  padding: 18px;
  background: var(--papel);
  border: 1px solid var(--linea);
  border-left: 5px solid var(--ambar);
  border-radius: var(--radio);
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 26px;
  font-weight: 600;
  text-align: left;
  color: var(--asfalto);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.ficha-empleado:active {
  transform: scale(0.98);
  box-shadow: inset 0 0 0 2px var(--ambar);
}

.teclado-envoltorio { max-width: 380px; margin: 0 auto; text-align: center; }

.volver {
  margin-bottom: 18px;
  padding: 10px 4px;
  background: none;
  color: var(--acero);
  font-size: 15px;
}

.nombre-elegido {
  margin: 0 0 20px;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 30px;
  font-weight: 600;
}

.puntos-pin {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.puntos-pin span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--acero-claro);
}

.puntos-pin span.lleno { background: var(--asfalto); border-color: var(--asfalto); }

.aviso {
  min-height: 22px;
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--rojo);
}

.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.tecla {
  height: var(--toque);
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  font-size: 24px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--asfalto);
}

.tecla:active { background: var(--asfalto); color: var(--papel); }
.tecla-borrar { font-size: 15px; color: var(--acero); }
.tecla-vacia { visibility: hidden; }

/* ---------------------------------------------------- turno */

.opciones-turno {
  flex: 1;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 28px 20px;
}

.tarjeta-turno {
  display: block;
  padding: 28px 24px;
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  text-align: left;
}

.tarjeta-turno.sugerido { border-color: var(--ambar); box-shadow: inset 0 0 0 2px var(--ambar); }
.tarjeta-turno:active { background: var(--asfalto); }
.tarjeta-turno:active .turno-nombre,
.tarjeta-turno:active .turno-detalle { color: var(--papel); }

.turno-nombre {
  display: block;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--asfalto);
}

.turno-detalle { display: block; margin-top: 4px; font-size: 14px; color: var(--acero); }

.salir-secundario {
  margin: 0 20px 28px;
  padding: 16px;
  background: none;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  color: var(--acero);
  font-size: 15px;
}

/* ---------------------------------------------------- barra superior */

.cabecera-fija { position: sticky; top: 0; z-index: 5; }

.barra {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--asfalto);
  color: var(--papel);
}

.barra-identidad { flex: 1; min-width: 0; }

.barra-nombre {
  margin: 0;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 24px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.barra-turno {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--acero-claro);
  font-variant-numeric: tabular-nums;
}

/* Contador: lectura tipo totalizador de surtidor */
.totalizador { text-align: right; }

.totalizador-cifra {
  display: block;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: var(--ambar);
  font-variant-numeric: tabular-nums;
}

.totalizador-de { font-size: 20px; color: var(--acero); }

.totalizador-etiqueta {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acero-claro);
}

.salir {
  padding: 12px 14px;
  background: var(--pizarra);
  border-radius: var(--radio);
  color: var(--acero-claro);
  font-size: 14px;
}

/* Regleta segmentada: un segmento por tarea del turno */
.regleta {
  display: flex;
  gap: 2px;
  height: 6px;
  padding: 0 20px 0;
  background: var(--asfalto);
}

.regleta i { flex: 1; background: var(--pizarra); border-radius: 1px; }
.regleta i.si { background: var(--ambar); }
.regleta i.no { background: var(--rojo); }
.regleta i.na { background: var(--acero); }

/* ---------------------------------------------------- lista de tareas */

.lista { flex: 1; padding: 0 0 60px; }

.bloque-titulo {
  margin: 0;
  padding: 14px 20px 10px;
  background: var(--niebla);
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acero);
}

.tarea {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: var(--papel);
  border-bottom: 1px solid var(--linea);
}

.tarea-texto { flex: 1; font-size: 16px; line-height: 1.3; }

.tarea-pie {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--acero);
  font-variant-numeric: tabular-nums;
}

.marca-camara { color: var(--ambar-oscuro); font-weight: 600; }

.mandos { display: flex; gap: 6px; flex-shrink: 0; }

.mando {
  width: 52px;
  height: 52px;
  background: var(--niebla);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  font-size: 20px;
  font-weight: 600;
  color: var(--acero);
}

.mando[data-estado="si"].puesto { background: var(--verde); border-color: var(--verde); color: #fff; }
.mando[data-estado="no"].puesto { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.mando[data-estado="na"].puesto { background: var(--acero); border-color: var(--acero); color: #fff; }
.mando.pendiente-foto { border-color: var(--ambar); border-style: dashed; }

/* ---------------------------------------------------- diálogo motivo */

.velo {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(20, 23, 28, 0.6);
}

.dialogo {
  width: 100%;
  max-width: 560px;
  padding: 24px 20px 28px;
  background: var(--papel);
  border-radius: 16px 16px 0 0;
}

.dialogo-titulo {
  margin: 0 0 6px;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 26px;
  font-weight: 700;
}

.dialogo-tarea { margin: 0 0 16px; font-size: 14px; color: var(--acero); }

.motivos-rapidos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.motivo-rapido {
  padding: 10px 14px;
  background: var(--niebla);
  border: 1px solid var(--linea);
  border-radius: 999px;
  font-size: 14px;
  color: var(--asfalto);
}

.motivo-rapido.elegido { background: var(--asfalto); border-color: var(--asfalto); color: var(--papel); }

.campo {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  font-family: inherit;
  font-size: 16px;
}

.dialogo-botones { display: flex; gap: 10px; margin-top: 18px; }

.boton-fantasma,
.boton-solido {
  flex: 1;
  min-height: var(--toque);
  border-radius: var(--radio);
  font-size: 16px;
  font-weight: 600;
}

.boton-fantasma { background: var(--niebla); color: var(--acero); }
.boton-solido { background: var(--asfalto); color: var(--papel); }

/* ---------------------------------------------------- tostada */

.tostada {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 30;
  transform: translateX(-50%);
  padding: 14px 22px;
  background: var(--asfalto);
  border-radius: 999px;
  color: var(--papel);
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(20, 23, 28, 0.28);
}

.tostada.error { background: var(--rojo); }

/* ---------------------------------------------------- accesibilidad */

button:focus-visible,
.campo:focus-visible {
  outline: 3px solid var(--ambar);
  outline-offset: 2px;
}

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

@media (min-width: 760px) {
  .tarea { padding: 14px 32px; }
  .bloque-titulo { padding-left: 32px; }
  .cuerpo-acceso { padding: 32px 32px 48px; }
}
