/* Kiosco de fichaje: la misma pantalla del sistema original (franja de encabezado, estado de la cámara,
   recuadro con guías y línea de escaneo, respuesta a pantalla completa sobre la cámara), con la paleta de Ganda.
   El video de la cámara se reemplaza por una silueta: la demo no usa la cámara. */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
:root {
  --brand-blue: #0E4D82;
  --brand-accent: #5D8AA8;
  --surface-alt: #F2EEE4;
  --surface: #fff;
  --text-primary: #171717;
  --text-secondary: #55524B;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--text-primary); font-family: "Geist", system-ui, sans-serif; min-height: 100dvh; display: flex; flex-direction: column; }
h1, p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid #D9784D; outline-offset: 2px; }

.header { background: var(--surface); border-bottom: 1px solid rgba(23, 23, 23, .1); }
.branding { padding: 14px 0; display: flex; justify-content: center; }
.logo-badge { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-blue); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; }

main { flex: 1 1 auto; display: flex; }
.attendance-wrapper { flex: 1 1 auto; width: 100%; padding: 32px 20px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.attendance-card { background: var(--surface); border-radius: 24px; border: 1px solid rgba(23, 23, 23, .1); max-width: 560px; width: 100%; overflow: hidden; }
.card-header-band { background: var(--brand-blue); padding: 28px 32px 24px; color: #fff; position: relative; z-index: 0; }
.card-header-band::after { content: ''; position: absolute; z-index: -1; bottom: -1px; left: 0; right: 0; height: 20px; background: var(--surface); border-radius: 20px 20px 0 0; }
.card-header-band h1 { font-size: 1.25rem; font-weight: 600; margin: 0 0 4px; }
.card-header-band p { font-size: 0.85rem; color: rgba(255, 255, 255, .78); }
.header-icon { width: 44px; height: 44px; background: rgba(255, 255, 255, .15); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 22px; }
.card-body-area { padding: 24px 28px 28px; }

.camera-status { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 20px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #157540; animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.8); } }

.camera-block { position: relative; border-radius: 16px; overflow: hidden; background: #14181E; aspect-ratio: 4 / 3; width: 100%; margin-bottom: 24px; display: grid; place-items: center; }
.camera-placeholder { width: 42%; fill: none; stroke: rgba(235, 230, 216, .35); stroke-width: 3; }
.scan-line { position: absolute; left: 0; right: 0; height: 2px; background: rgba(93, 138, 168, .9); animation: scanMove 2.5s ease-in-out infinite; z-index: 3; } /* taste-skill-ignore: línea de escaneo del sistema original */
@keyframes scanMove { 0% { top: 10%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 90%; opacity: 0; } }
.camera-guides { position: absolute; inset: 0; z-index: 2; }
.corner { position: absolute; width: 28px; height: 28px; border-color: rgba(255, 255, 255, .6); border-style: solid; }
.corner.tl { top: 14px; left: 14px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.corner.tr { top: 14px; right: 14px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.corner.bl { bottom: 14px; left: 14px; border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.corner.br { bottom: 14px; right: 14px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

.result-overlay { position: absolute; inset: 0; z-index: 10; display: none; align-items: center; justify-content: center; opacity: 0; transform: scale(.94); transition: opacity .32s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.result-overlay.visible { display: flex; }
.result-overlay.shown { opacity: 1; transform: scale(1); }
.result-overlay.result-success { background: #157540; }
.result-overlay.result-verifying { background: var(--brand-blue); }
.result-inner { text-align: center; color: #fff; padding: 24px; }
.result-icon-wrap { width: 72px; height: 72px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 36px; animation: iconPop .45s .08s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes iconPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; opacity: .8; margin-bottom: 6px; }
.result-name { font-size: 1.4rem; font-weight: 600; line-height: 1.25; margin-bottom: 10px; }
.result-subtext { font-size: 0.85rem; opacity: .8; }
.result-progress { margin: 18px auto 0; width: 140px; height: 3px; background: rgba(255, 255, 255, .2); border-radius: 2px; overflow: hidden; }
.result-progress-bar { height: 100%; background: rgba(255, 255, 255, .75); width: 0%; transition: width 3s linear; }

.btn-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.btn-attendance { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 20px; border-radius: 14px; border: none; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: transform .2s ease, background-color .2s; text-align: left; }
.btn-attendance:active { transform: scale(.97); }
.btn-attendance:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-attendance > .bi { font-size: 1.25rem; }
.btn-sublabel { display: block; font-size: 0.75rem; font-weight: 400; opacity: .8; }
.btn-ingreso { background: var(--brand-blue); color: #fff; }
.btn-ingreso:hover:not(:disabled) { background: #0A3B66; }
.btn-salida { background: var(--surface-alt); color: var(--brand-blue); border: 1.5px solid var(--brand-accent); }
.btn-salida:hover:not(:disabled) { background: #E9E3D5; }

.demo-note { max-width: 560px; font-size: 0.85rem; color: var(--text-secondary); text-align: center; }

@media (max-width: 480px) {
  .card-header-band { padding: 24px 22px 22px; }
  .card-body-area { padding: 20px; }
  .btn-row { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .scan-line, .status-dot, .result-icon-wrap { animation: none; }
  .result-overlay, .result-progress-bar { transition: none; }
}
