/* Checador: pantalla del empleado.
   Paleta de la marca: azul noche, naranja, amarillo. El comprobante usa el
   color manila de las tarjetas de reloj checador tradicionales. */
:root {
  --azul: #002251;
  --azul-2: #0a3168;
  --azul-linea: rgba(255, 255, 255, 0.14);
  --naranja: #d76d2f;
  --naranja-hondo: #b55823;
  --amarillo: #e7be33;
  --rojo: #ab492e;
  --manila: #ecdfb8;
  --manila-tinta: #3d3420;
  --claro: #eef1f5;
  --texto: #14213a;
  --tenue: #5b6780;
  --letra: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --angosta: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--letra); font-size: 1rem; line-height: 1.45; -webkit-font-smoothing: antialiased; }
.fondo-azul { background: var(--azul); color: #fff; }
.fondo-claro { background: var(--claro); color: var(--texto); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 3px; }
button { font: inherit; cursor: pointer; }

/* ---------- Botones ---------- */
.boton-solido {
  display: block; width: 100%; border: 0; border-radius: 12px; padding: 0.95rem 1rem;
  background: var(--naranja); color: #fff; font-weight: 700; font-size: 1.05rem;
}
.boton-solido:hover { background: var(--naranja-hondo); }
.boton-linea {
  display: block; width: 100%; border: 2px solid var(--azul-linea); border-radius: 12px;
  background: transparent; color: #fff; padding: 0.85rem 1rem; font-weight: 600; font-size: 1rem;
}
.boton-linea:hover { border-color: rgba(255,255,255,0.4); }
.enlace { background: none; border: 0; color: rgba(255,255,255,0.6); text-decoration: underline; padding: 0.5rem; }

.aviso { margin: 0 0 1rem; padding: 0.75rem 0.9rem; border-radius: 10px; font-weight: 500; }
.aviso-error { background: #fbe6df; color: #7a2410; border-left: 4px solid var(--rojo); }

/* ---------- Entrar ---------- */
.entrar { max-width: 420px; margin: 0 auto; padding: 12vh 1.5rem 2rem; }
.entrar-marca h1 {
  font-family: var(--angosta); font-weight: 700; font-size: 4.2rem; line-height: 0.9;
  margin: 0.15rem 0 2.5rem; letter-spacing: -0.01em;
}
.entrar-empresa { color: var(--amarillo); font-weight: 600; }
.titulo-medio { font-size: 1.6rem; line-height: 1.2; }
.entrar-form label { display: block; font-weight: 600; margin: 0 0 0.35rem; color: rgba(255,255,255,0.85); }
.entrar-form input[type=text], .entrar-form input[type=password] {
  width: 100%; font: inherit; font-size: 1.1rem; padding: 0.8rem 0.9rem; margin-bottom: 1.1rem;
  border-radius: 10px; border: 2px solid transparent; background: #fff; color: var(--texto);
}
.entrar-form input:focus { border-color: var(--amarillo); outline: none; }
.entrar-form .boton-solido { margin-top: 0.5rem; }
.entrar-nota { color: rgba(255,255,255,0.6); font-size: 0.92rem; margin-top: 1.25rem; }

/* ---------- Checador ---------- */
.checador { max-width: 480px; margin: 0 auto; padding: 1rem 1.25rem 2rem; min-height: 100vh; display: flex; flex-direction: column; }
.barra { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.saludo { margin: 0; font-weight: 700; font-size: 1.1rem; }
.empresa { margin: 0; color: rgba(255,255,255,0.55); font-size: 0.9rem; }
.barra-links { display: flex; gap: 1rem; padding-top: 0.2rem; }
.barra-links a { color: var(--amarillo); font-weight: 600; text-decoration: none; }
.barra-links a:hover { text-decoration: underline; }

.reloj { text-align: center; margin: 2.5rem 0 2rem; }
.reloj-hora {
  margin: 0; font-family: var(--angosta); font-weight: 600; line-height: 0.85;
  font-size: clamp(5.5rem, 30vw, 8.5rem); letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.reloj-seg { font-size: 0.32em; color: var(--amarillo); vertical-align: top; margin-left: 0.15em; letter-spacing: 0; }
.reloj-fecha { margin: 0.6rem 0 0; color: rgba(255,255,255,0.7); font-size: 1.05rem; }
.reloj-fecha::first-letter { text-transform: uppercase; }
.reloj-estado { margin: 0.9rem auto 0; display: inline-block; padding: 0.3rem 0.85rem; border-radius: 99px;
  background: rgba(255,255,255,0.08); font-weight: 600; font-size: 0.95rem; }

.acciones { display: grid; gap: 0.75rem; justify-items: center; }
.boton-checar {
  width: min(72vw, 260px); aspect-ratio: 1; border-radius: 50%; border: 0;
  background: var(--naranja); color: #fff;
  box-shadow: 0 0 0 10px rgba(215,109,47,0.18), 0 0 0 22px rgba(215,109,47,0.08), 0 14px 30px rgba(0,0,0,0.35);
  font-family: var(--angosta); font-weight: 700; font-size: 2.05rem; line-height: 1;
  padding: 1.5rem; margin-bottom: 1.4rem; transition: transform 0.12s ease, background 0.12s ease;
}
.boton-checar:hover { background: var(--naranja-hondo); }
.boton-checar:active { transform: scale(0.96); }
.boton-checar.ocupado { font-size: 1.35rem; background: var(--azul-2); box-shadow: 0 0 0 10px rgba(255,255,255,0.06); }
.boton-checar:focus-visible { outline-offset: 30px; }
.acciones .boton-linea { max-width: 320px; }

.gps { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 1.4rem 0 1rem;
  color: rgba(255,255,255,0.7); font-size: 0.92rem; text-align: center; }
.gps-punto { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.4); flex-shrink: 0; }
.gps-bien .gps-punto { background: #4cc46a; }
.gps-regular .gps-punto { background: var(--amarillo); }
.gps-mal .gps-punto { background: var(--rojo); }
.gps-mal { color: #ffd2c4; }

.hoy { margin-top: auto; padding-top: 1.5rem; border-top: 1px solid var(--azul-linea); }
.hoy h2 { font-size: 1rem; margin: 0 0 0.6rem; color: rgba(255,255,255,0.75); font-weight: 600; }
.hoy-lista { list-style: none; margin: 0; padding: 0; }
.hoy-lista li { display: grid; grid-template-columns: 3.4rem 1fr auto; gap: 0.75rem; padding: 0.45rem 0; align-items: baseline; }
.hoy-hora { font-family: var(--angosta); font-weight: 600; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.hoy-folio { color: rgba(255,255,255,0.45); font-size: 0.85rem; }
.hoy-lista .hoy-vacio { display: block; color: rgba(255,255,255,0.5); }
.cerrar { text-align: center; margin-top: 1.5rem; }

/* ---------- Comprobante ---------- */
.tarjeta-capa { position: fixed; inset: 0; background: rgba(0, 18, 44, 0.78); display: grid; place-items: end center;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 10; }
.tarjeta-capa[hidden] { display: none; }
.tarjeta {
  position: relative; width: 100%; max-width: 420px; background: var(--manila); color: var(--manila-tinta);
  border-radius: 6px 6px 14px 14px; padding: 2.2rem 1.5rem 1.4rem; outline: none;
  animation: entra-tarjeta 0.38s cubic-bezier(.2,.8,.3,1.1);
}
.tarjeta-perforado {
  position: absolute; top: 0.7rem; left: 1.5rem; right: 1.5rem; height: 10px;
  background: radial-gradient(circle, rgba(0,18,44,0.78) 3.5px, transparent 4px) 0 0 / 18px 10px repeat-x;
}
.tarjeta-tipo { margin: 0; font-weight: 700; font-size: 1.1rem; }
.tarjeta-hora {
  margin: 0.1rem 0 0.9rem; font-family: var(--angosta); font-weight: 700; font-size: 4.2rem; line-height: 1;
  color: var(--azul); font-variant-numeric: tabular-nums; transform: rotate(-1.2deg); transform-origin: left;
}
.tarjeta-datos { margin: 0 0 1.1rem; padding-top: 0.9rem; border-top: 1px dashed rgba(61,52,32,0.35); display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1rem; }
.tarjeta-datos dt { font-size: 0.8rem; color: rgba(61,52,32,0.7); }
.tarjeta-datos dd { margin: 0; font-weight: 600; }
.tarjeta-sello { font-family: var(--angosta); letter-spacing: 0.04em; }
.tarjeta-alerta { background: rgba(171,73,46,0.12); border-left: 3px solid var(--rojo); padding: 0.55rem 0.7rem; margin: 0 0 1rem; font-size: 0.92rem; }
@keyframes entra-tarjeta { from { transform: translateY(70%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Mis registros ---------- */
.registros { max-width: 560px; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; }
.registros-barra h1 { font-family: var(--angosta); font-size: 2.6rem; margin: 0.6rem 0 0; line-height: 1; color: var(--azul); }
.registros-barra p { margin: 0.3rem 0 1.5rem; color: var(--tenue); }
.volver { color: var(--naranja-hondo); font-weight: 600; text-decoration: none; }
.volver::before { content: "‹ "; }
.dia { display: grid; grid-template-columns: 3.6rem 1fr; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid #d6dce6; }
.dia-fecha { text-align: center; }
.dia-num { display: block; font-family: var(--angosta); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--azul); }
.dia-mes { font-size: 0.8rem; color: var(--tenue); }
.dia-horas { margin: 0; font-family: var(--angosta); font-weight: 600; font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.dia-detalle { margin: 0.1rem 0 0; color: var(--tenue); }
.dia-detalle strong { color: var(--naranja-hondo); }
.dia-folios { margin: 0.2rem 0 0; font-size: 0.82rem; color: #8a93a7; }
.dia-falta .dia-num, .dia-falta .dia-horas { color: var(--rojo); }
.vacio { color: var(--tenue); padding: 2rem 0; }

@media (prefers-reduced-motion: reduce) {
  .tarjeta { animation: none; }
  .boton-checar { transition: none; }
}
@media (max-height: 640px) {
  .reloj { margin: 1.2rem 0 1rem; }
  .boton-checar { width: min(56vw, 200px); font-size: 1.7rem; }
}
