/* Sistema de Control de Asistencia Remota - Tema Gris Claro Mate & Seguridad */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #f1f5f9;       /* Gris claro mate principal */
  --bg-secondary: #e2e8f0;     /* Gris mate para elementos secundarios */
  --bg-card: #ffffff;          /* Blanco mate para tarjetas de alta legibilidad */
  --bg-card-hover: #f8fafc;    /* Gris muy claro en hover */
  --border-main: #cbd5e1;      /* Borde gris mate definido */
  --border-subtle: #e2e8f0;    /* Borde sutil */
  --border-dark: #0f172a;      /* Borde de seguridad oscuro */
  --text-black: #0f172a;       /* Letras en negro carbón profundo */
  --text-dark: #1e293b;        /* Letras en gris muy oscuro */
  --text-muted: #475569;       /* Letras secundarias */
  --text-caption: #64748b;     /* Letras de pie o apoyo */
  --security-navy: #0f172a;    /* Color de seguridad principal */
  --security-blue: #1e40af;    /* Azul corporativo de seguridad */
  --security-emerald: #059669; /* Verde de acceso permitido */
  --security-rose: #dc2626;    /* Rojo de salida / alerta */
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-black);
  -webkit-tap-highlight-color: transparent;
}

/* Tarjetas y Contenedores Gris Mate & Seguridad */
.glass-panel {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-main);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

.card-security {
  background: var(--bg-card);
  border: 1px solid var(--border-main);
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -2px rgba(15, 23, 42, 0.03);
}

.card-security:hover {
  border-color: #94a3b8;
}

/* Visor de Cámara y Láser Escáner */
.scan-overlay {
  position: relative;
  overflow: hidden;
}

.scan-box {
  width: 250px;
  height: 250px;
  position: relative;
  border-radius: 20px;
  box-shadow: 0 0 0 4000px rgba(15, 23, 42, 0.7);
}

.scan-corner {
  position: absolute;
  width: 36px;
  height: 36px;
  border-color: #059669;
}

.scan-tl { top: 0; left: 0; border-top: 5px solid; border-left: 5px solid; border-top-left-radius: 20px; }
.scan-tr { top: 0; right: 0; border-top: 5px solid; border-right: 5px solid; border-top-right-radius: 20px; }
.scan-bl { bottom: 0; left: 0; border-bottom: 5px solid; border-left: 5px solid; border-bottom-left-radius: 20px; }
.scan-br { bottom: 0; right: 0; border-bottom: 5px solid; border-right: 5px solid; border-bottom-right-radius: 20px; }

.laser-line {
  position: absolute;
  left: 6%;
  right: 6%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #10b981, #059669, transparent);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.8);
  animation: laserSweep 2s ease-in-out infinite alternate;
}

@keyframes laserSweep {
  0% { top: 8%; opacity: 0.3; }
  50% { opacity: 1; }
  100% { top: 92%; opacity: 0.3; }
}

/* Botones del Teclado PIN Táctil */
.pin-key-btn {
  transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: var(--text-black);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
}

.pin-key-btn:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
}

.pin-key-btn:active {
  transform: scale(0.93);
  background-color: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.pin-key-btn:active span {
  color: #ffffff !important;
}

/* Pulsos */
.pulse-emerald {
  animation: pulseEmerald 2s infinite;
}

@keyframes pulseEmerald {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* Credencial / Gafete Vertical Estándar CR80 */
.employee-badge-vertical {
  width: 290px;
  min-height: 460px;
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 20px;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.15);
  color: #0f172a;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 14px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media print {
  @page {
    size: portrait;
    margin: 10mm;
  }
  
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body * {
    visibility: hidden !important;
  }

  #modal-badge-viewer,
  #modal-badge-viewer * {
    visibility: visible !important;
  }

  #modal-badge-viewer {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .modal-badge-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .no-print {
    display: none !important;
    visibility: hidden !important;
  }

  #badge-print-area {
    visibility: visible !important;
    display: block !important;
    margin: 0 auto !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    border-radius: 16px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #badge-print-area * {
    visibility: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

