/* Estación LEAH — misma identidad que los tableros: azul marino #1b3b5f y dorado #c9a227 */
:root {
  --marino: #1b3b5f;
  --fondo: #060e1a;
  --fondo-2: #0b1a2d;
  --panel: rgba(27, 59, 95, 0.28);
  --panel-borde: rgba(201, 162, 39, 0.22);
  --linea: rgba(160, 190, 225, 0.14);
  --oro: #c9a227;
  --oro-claro: #e6c65a;
  --texto: #e8eef6;
  --tenue: #93a7bf;
  --verde: #3fcf8e;
  --ambar: #f0a93b;
  --rojo: #ff6b6b;
  --titulos: 'Lora', Georgia, serif;
  --cuerpo: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --cifras: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --radio: 14px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--cuerpo);
  font-size: 16px;
  line-height: 1.5;
  color: var(--texto);
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(27, 59, 95, 0.75), transparent 60%),
    radial-gradient(800px 480px at 100% 0%, rgba(201, 162, 39, 0.10), transparent 62%),
    linear-gradient(180deg, var(--fondo-2), var(--fondo) 55%);
  background-attachment: fixed;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--linea) 1px, transparent 1px),
    linear-gradient(90deg, var(--linea) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
  opacity: 0.5;
}
h1, h2 { font-family: var(--titulos); font-weight: 600; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
h2 { font-size: 1.15rem; }
p { margin: 0; }
[hidden] { display: none !important; }
.tenue { color: var(--tenue); }
.cifra { font-family: var(--cifras); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.error { color: var(--rojo); font-weight: 600; }

.panel {
  position: relative; z-index: 1;
  background: var(--panel);
  border: 1px solid var(--panel-borde);
  border-radius: var(--radio);
  backdrop-filter: blur(12px);
  padding: 18px;
}

/* Controles */
input[type='password'], input[type='text'] {
  font: inherit; color: var(--texto);
  background: rgba(6, 14, 26, 0.7); border: 1px solid var(--linea); border-radius: 10px; padding: 9px 12px; min-width: 0; width: 100%;
}
input:focus-visible, .boton:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }
.boton { font: inherit; font-weight: 600; cursor: pointer; color: #1a1304; background: linear-gradient(180deg, var(--oro-claro), var(--oro)); border: 0; border-radius: 10px; padding: 10px 18px; }
.boton-suave { color: var(--texto); background: transparent; border: 1px solid var(--linea); padding: 6px 12px; font-weight: 500; }
.boton-suave:hover { border-color: var(--oro); }
.boton-grande { width: 100%; min-height: 56px; font-size: 1.1rem; border-radius: 12px; }
.boton:disabled { opacity: 0.4; cursor: default; }

/* Ingreso */
.ingreso { display: grid; place-items: center; padding: 16px; }
.ingreso-caja { width: min(100%, 400px); display: grid; gap: 10px; padding: 28px; }
.ingreso-caja form { display: grid; gap: 10px; margin-top: 10px; }
.ingreso-caja label { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tenue); }

/* Barra */
.barra {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 10px 16px;
  background: rgba(6, 14, 26, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--panel-borde);
}
.barra { flex-wrap: wrap; }
.barra form { margin: 0; }
.sesion { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 0.88rem; }
.ingreso-caja .nota { font-size: 0.82rem; }
.marca { font-family: var(--titulos); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.14em; color: var(--oro-claro); white-space: nowrap; }
.marca span { font-family: var(--cuerpo); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tenue); margin-left: 10px; }

.menu { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 0.88rem; }
.menu a { color: var(--tenue); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--texto); }
.menu a[aria-current='page'] { color: var(--oro-claro); border-bottom-color: var(--oro); }
.menu a:focus-visible, summary:focus-visible, select:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }

/* Estación: identificación */
.identidad h1 { font-size: clamp(1.6rem, 1.1rem + 2.6vw, 2.6rem); }
.identidad h2 { font-family: var(--cuerpo); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tenue); margin: 14px 0 6px; }
.fichas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fichas li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--linea); font-size: 0.95rem; }
.fichas-oro li { border-color: var(--oro); color: var(--oro-claro); font-weight: 600; font-size: 1.05rem; padding: 8px 14px; }
.rechazado { animation: rechazado 0.9s ease-out; }
@keyframes rechazado {
  0% { border-color: var(--rojo); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.55); }
  100% { border-color: var(--panel-borde); box-shadow: 0 0 0 22px rgba(255, 107, 107, 0); }
}
@media (prefers-reduced-motion: reduce) { .rechazado { animation: none; } }
summary { cursor: pointer; color: var(--tenue); }
.fila-manual { display: grid; gap: 8px; margin-top: 12px; }

/* Estación: tiempos */
.rotulo { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tenue); }
.tiempo-abierto { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ambar); background: rgba(240, 169, 59, 0.08); display: grid; gap: 2px; }
.aviso-ambar { color: var(--ambar); font-size: 0.92rem; }
.abierto-proyecto { font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
.acciones-grandes { display: grid; gap: 10px; margin-top: 16px; }
#paso-empleado, #paso-qr, #paso-tareas, #paso-resultado { display: grid; gap: 10px; }
.tareas { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-items: start; }
.tareas .rotulo { grid-column: 1 / -1; margin-top: 8px; }
.boton-tarea { min-height: 64px; font-size: 1.05rem; text-align: left; color: var(--texto); background: rgba(27, 59, 95, 0.55); border: 1px solid var(--oro); }
.boton-tarea:hover { background: rgba(201, 162, 39, 0.18); }
.resultado-lista { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 1.05rem; }

/* Tablero trabajando / total */
.tablero { display: grid; gap: 10px; }
.tablero-cifra { font-size: clamp(3rem, 2rem + 8vw, 5.5rem); font-weight: 700; line-height: 1; color: var(--oro-claro); }
.tablero-cifra small { font-size: 0.45em; font-weight: 500; color: var(--tenue); }
progress { appearance: none; width: 100%; height: 12px; border: 0; border-radius: 999px; overflow: hidden; background: rgba(6, 14, 26, 0.7); }
progress::-webkit-progress-bar { background: rgba(6, 14, 26, 0.7); }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--oro), var(--oro-claro)); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--oro); }
.tablero details .fichas { margin-top: 10px; }

/* Personal escogido y ventana con la lista */
#paso-personal { display: grid; gap: 10px; }
.ficha-persona { display: flex; align-items: center; gap: 10px; border-color: var(--oro) !important; padding: 6px 6px 6px 14px !important; }
.ficha-persona > span, .lista-personal label > span { display: grid; min-width: 0; }
.ficha-persona small, .lista-personal small { font-size: 0.82rem; }
.quitar { font: inherit; font-size: 1.3rem; line-height: 1; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--linea); background: transparent; color: var(--texto); cursor: pointer; }
.quitar:hover { border-color: var(--rojo); color: var(--rojo); }
.quitar:focus-visible, .lista-personal input:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }
.ventana { width: min(94vw, 560px); max-height: 88dvh; padding: 18px; color: var(--texto); background: var(--fondo-2); border: 1px solid var(--panel-borde); border-radius: var(--radio); }
.ventana[open] { display: grid; gap: 12px; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.ventana::backdrop { background: rgba(2, 6, 12, 0.72); }
.lista-personal { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.lista-personal li { border-top: 1px solid var(--linea); }
.lista-personal label { display: flex; align-items: center; gap: 14px; padding: 12px 4px; min-height: 56px; cursor: pointer; }
.lista-personal input { width: 24px; height: 24px; flex: none; accent-color: var(--oro); }

/* Grupos, tickets y confirmación */
.paso { display: grid; gap: 12px; }
.tarjetas { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tarjeta { font: inherit; text-align: left; color: var(--texto); cursor: pointer; display: grid; gap: 4px; align-content: start; min-height: 88px; padding: 14px; border-radius: 12px; border: 1px solid var(--panel-borde); background: rgba(27, 59, 95, 0.45); overflow-wrap: anywhere; }
.tarjeta:hover { border-color: var(--oro); background: rgba(201, 162, 39, 0.14); }
.tarjeta:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }
.tarjeta strong { font-size: 1.1rem; color: var(--oro-claro); }
.tarjeta small { color: var(--tenue); font-size: 0.82rem; }
.boton-tarea { display: grid; gap: 2px; align-content: center; }
.boton-tarea small { font-size: 0.8rem; font-weight: 500; color: var(--ambar); }
.resumen { margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.resumen div { padding: 10px 12px; border: 1px solid var(--linea); border-radius: 10px; min-width: 0; }
.resumen dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tenue); }
.resumen dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.resumen dd.cifra { font-size: 1.5rem; color: var(--oro-claro); }
.resultado-lista small { display: block; color: var(--tenue); font-size: 0.88rem; }

/* Historial del día */
.registros { display: grid; gap: 10px; }
.registro { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--linea); border-radius: 12px; overflow-wrap: anywhere; }
.registro.abierto { border-color: var(--ambar); background: rgba(240, 169, 59, 0.08); }
.registro strong { font-size: 1.05rem; }
.registro .acciones { margin-top: 8px; }
input[type='time'] { font: inherit; font-family: var(--cifras); font-size: 1.2rem; color: var(--texto); background: rgba(6, 14, 26, 0.7); border: 1px solid var(--linea); border-radius: 10px; padding: 9px 12px; width: 100%; min-height: 48px; }

/* Formularios y listas */
.campo { display: grid; gap: 4px; }
.campo > span { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tenue); }
select { font: inherit; color: var(--texto); background: rgba(6, 14, 26, 0.7); border: 1px solid var(--linea); border-radius: 10px; padding: 9px 12px; width: 100%; min-width: 0; }
.acciones { display: flex; gap: 10px; flex-wrap: wrap; }
.acciones .boton { min-height: 44px; }
.boton-peligro { background: var(--rojo); color: #1a0606; }
.exito { color: var(--verde); font-weight: 600; }
.empleados { list-style: none; margin: 10px 0 0; padding: 0; }
.empleados li { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--linea); }
.empleados li > div { display: grid; min-width: 0; }
.empleados .tenue { font-size: 0.85rem; }
.con-tarjeta { color: var(--oro-claro); }

.prueba.ancha { width: min(100%, 1100px); }
.tabla-caja { overflow-x: auto; }
.tabla-roles { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.tabla-roles th, .tabla-roles td { padding: 8px 10px; border-top: 1px solid var(--linea); text-align: center; }
.tabla-roles thead th { border-top: 0; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tenue); font-weight: 600; vertical-align: bottom; }
.tabla-roles th[scope='row'], .tabla-roles thead th:first-child { text-align: left; white-space: nowrap; font-weight: 500; }
.tabla-roles input { width: 22px; height: 22px; accent-color: var(--oro); }

/* Prueba de lectura */
.prueba { position: relative; z-index: 1; width: min(100%, 720px); margin: 0 auto; padding: 20px 16px 40px; display: grid; gap: 16px; }
.chequeos { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.92rem; }
.chequeos .bien { color: var(--verde); }
.chequeos .mal { color: var(--rojo); }

.lector { display: grid; gap: 12px; }
.lector-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sello { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--linea); color: var(--tenue); white-space: nowrap; }
.sello.activo { color: var(--oro-claro); border-color: var(--oro); }
.sello.bien { color: var(--verde); border-color: var(--verde); }
.sello.mal { color: var(--rojo); border-color: var(--rojo); }
.lectura { font-size: clamp(1.4rem, 1rem + 3.2vw, 2.4rem); font-weight: 700; color: var(--oro-claro); overflow-wrap: anywhere; min-height: 1.5em; }
.visor { width: 100%; max-height: 46vh; border-radius: 10px; border: 1px solid var(--panel-borde); background: #02060c; object-fit: cover; }

.leido { animation: leido 0.9s ease-out; }
@keyframes leido {
  0% { border-color: var(--verde); box-shadow: 0 0 0 0 rgba(63, 207, 142, 0.55); }
  100% { border-color: var(--panel-borde); box-shadow: 0 0 0 22px rgba(63, 207, 142, 0); }
}
@media (prefers-reduced-motion: reduce) { .leido { animation: none; } }

.historial { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.historial li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--linea); font-size: 0.9rem; }
.historial .tipo { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tenue); }
.historial .dato { overflow-wrap: anywhere; }
