:root {
  --bg: #0f172a;
  --card: #17213b;
  --texto: #e6ebf5;
  --texto-tenue: #93a0b8;
  --presente: #22c55e;
  --ausente: #64748b;
  --error: #ef4444;
  --borde: #263351;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--texto);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pantalla { width: 100%; max-width: 420px; }
.oculto { display: none !important; }

.tarjeta {
  background: var(--card);
  border: 1px solid var(--borde);
  border-radius: 16px;
  padding: 28px 24px;
}

h1 { font-size: 20px; margin: 0 0 4px; }
p.subtitulo { color: var(--texto-tenue); margin: 0 0 24px; font-size: 14px; }

label { display: block; font-size: 13px; color: var(--texto-tenue); margin: 14px 0 6px; }
input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--borde);
  background: #0c1526;
  color: var(--texto);
  font-size: 15px;
}
input:focus { outline: 2px solid #3b82f6; }

button {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 18px;
}
.btn-primario { background: #3b82f6; color: white; }
.btn-primario:disabled { opacity: 0.5; cursor: not-allowed; }

.estado-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.nombre-empleado { font-size: 16px; font-weight: 600; }
.link-salir { color: var(--texto-tenue); font-size: 13px; background: none; width: auto; margin: 0; padding: 4px; text-decoration: underline; }

.pastilla-estado {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(100,116,139,0.15);
  color: var(--ausente);
}
.pastilla-estado.presente { background: rgba(34,197,94,0.15); color: var(--presente); }
.pastilla-estado .punto { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.boton-marcar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 24px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 17px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  color: white;
  transition: transform 0.15s ease;
}
.boton-marcar:active { transform: scale(0.96); }
.boton-marcar.marcar-ingreso { background: radial-gradient(circle at 30% 30%, #34d399, #16a34a); }
.boton-marcar.marcar-salida { background: radial-gradient(circle at 30% 30%, #fca5a5, #dc2626); }
.boton-marcar span.icono { font-size: 34px; margin-bottom: 6px; }
.boton-marcar:disabled { opacity: 0.6; }

.info-jornada {
  text-align: center;
  color: var(--texto-tenue);
  font-size: 13px;
  min-height: 18px;
}

.mensaje {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
}
.mensaje.ok { background: rgba(34,197,94,0.12); color: var(--presente); }
.mensaje.error { background: rgba(239,68,68,0.12); color: var(--error); }

.historial { margin-top: 22px; border-top: 1px solid var(--borde); padding-top: 14px; }
.historial h2 { font-size: 13px; color: var(--texto-tenue); margin: 0 0 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.fila-marcacion { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--borde); }
.fila-marcacion:last-child { border-bottom: none; }
.fila-marcacion.invalida { color: var(--error); }

.footer-red {
  text-align: center;
  color: var(--texto-tenue);
  font-size: 11px;
  margin-top: 22px;
}
.footer-red a { color: var(--texto-tenue); }
