/* ==============================================================================
   LOZADA & PARTNERS SAS - SISTEMA DE EVALUACIÓN TÉCNICA DE NÓMINA
   HOJA DE ESTILOS MODERNA (VANILLA CSS)
   ============================================================================== */

:root {
  /* Paleta Corporativa */
  --primary-950: #0f172a;
  --primary-900: #172554;
  --primary-800: #1e3a8a; /* Azul Marino Corporativo Principal */
  --primary-700: #1d4ed8;
  --primary-600: #2563eb;
  --primary-500: #3b82f6;
  --primary-100: #dbeafe;
  --primary-50:  #eff6ff;

  /* Neutros Slate */
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white:      #ffffff;

  /* Estados Semánticos */
  --danger-900: #7f1d1d;
  --danger-800: #991b1b;
  --danger-600: #dc2626;
  --danger-500: #ef4444;
  --danger-100: #fee2e2;
  --danger-50:  #fef2f2;

  --success-900: #064e3b;
  --success-700: #047857;
  --success-600: #059669;
  --success-500: #10b981;
  --success-100: #d1fae5;
  --success-50:  #ecfdf5;

  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --amber-50:  #fffbeb;

  /* Tipografía */
  --font-family-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'Plus Jakarta Sans', var(--font-family-body);

  /* Sombras y Elevaciones */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
  --shadow-glow-danger: 0 0 25px rgba(220, 38, 38, 0.35);

  /* Bordes y Radios */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transiciones */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==============================================================================
   RESET Y CONFIGURACIÓN BASE
   ============================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-body);
  background-color: var(--slate-50);
  color: var(--slate-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Antifraude: user-select none estricto salvo en inputs y textareas */
.no-select {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

.no-select input,
.no-select textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* Utilidades generales */
.hidden {
  display: none !important;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--slate-500); }
.text-muted-contrast { color: #fca5a5; }
.text-danger-strong { color: var(--danger-600); }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

/* Tipografía de Encabezados */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.25;
}

/* Contenedor de Tarjeta */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
}

/* ==============================================================================
   FORMULARIOS Y CONTROLES
   ============================================================================== */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.4rem;
}

.form-group label .required {
  color: var(--danger-500);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--slate-400);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.input-with-icon .form-control {
  padding-left: 2.75rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-family-body);
  font-size: 0.9375rem;
  color: var(--slate-800);
  background-color: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control::placeholder {
  color: var(--slate-400);
  font-size: 0.875rem;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--slate-500);
  margin-top: 0.35rem;
}

.checkbox-custom {
  accent-color: var(--primary-800);
  width: 1.15rem;
  height: 1.15rem;
  cursor: pointer;
  margin-top: 0.15rem;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
  text-align: left;
  background-color: var(--slate-50);
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--slate-300);
}

.terms-label {
  font-size: 0.8125rem;
  color: var(--slate-600);
  line-height: 1.45;
  cursor: pointer;
}

/* ==============================================================================
   BOTONES
   ============================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-family-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary-800);
  color: var(--white);
  box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-700);
  box-shadow: 0 4px 8px rgba(30, 58, 138, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--slate-700);
  border-color: var(--slate-300);
}

.btn-secondary:hover {
  background-color: var(--slate-100);
  border-color: var(--slate-400);
}

.btn-success {
  background-color: var(--success-600);
  color: var(--white);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

.btn-success:hover {
  background-color: var(--success-700);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
  transform: translateY(-1px);
}

.btn-danger {
  background-color: var(--danger-600);
  color: var(--white);
}

.btn-danger:hover {
  background-color: var(--danger-800);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-icon {
  background: transparent;
  border: none;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--slate-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
}

.btn-icon:hover {
  background-color: var(--slate-100);
  color: var(--slate-900);
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--slate-400);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.btn-close:hover {
  color: var(--slate-700);
  background-color: var(--slate-100);
}

/* ==============================================================================
   BADGES Y CHIPS
   ============================================================================== */
.badge-role {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--primary-100);
  color: var(--primary-800);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  letter-spacing: 0.025em;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.badge-success {
  background-color: var(--success-50);
  color: var(--success-700);
  border: 1px solid var(--success-100);
}
.badge-success .badge-dot { background-color: var(--success-500); }

.badge-info {
  background-color: var(--primary-50);
  color: var(--primary-800);
  border: 1px solid var(--primary-100);
}
.badge-info .badge-dot {
  background-color: var(--primary-600);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
  animation: pulse-dot 1.5s infinite;
}

.badge-danger {
  background-color: var(--danger-50);
  color: var(--danger-800);
  border: 1px solid var(--danger-100);
}
.badge-danger .badge-dot { background-color: var(--danger-600); }

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==============================================================================
   1. VISTA CANDIDATO: IDENTIFICACIÓN INICIAL
   ============================================================================== */
.login-wrapper {
  max-width: 580px;
  margin: 3rem auto;
  padding: 0 1.25rem;
}

.brand-header {
  margin-bottom: 2.25rem;
}

.brand-logo-container {
  margin-bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-brand-logo {
  max-height: 145px;
  max-width: 440px;
  width: 90%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.main-brand-logo:hover {
  transform: scale(1.02);
}

.brand-title {
  display: none;
}

.brand-subtitle {
  display: none;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.4);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
}

.security-warning-box {
  display: flex;
  gap: 0.85rem;
  background-color: #fff1f2;
  border-left: 4px solid var(--danger-600);
  padding: 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
  text-align: left;
}

.warning-icon-wrapper {
  color: var(--danger-600);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.warning-text strong {
  display: block;
  font-size: 0.775rem;
  letter-spacing: 0.04em;
  color: var(--danger-900);
  margin-bottom: 0.25rem;
}

.warning-text p {
  font-size: 0.8125rem;
  color: var(--danger-800);
  line-height: 1.45;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.login-footer {
  margin-top: 1.5rem;
  border-top: 1px solid var(--slate-100);
  padding-top: 1rem;
}

/* ==============================================================================
   2. VISTA CANDIDATO: EXAMEN TÉCNICO EN CURSO
   ============================================================================== */
.exam-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo-img {
  max-height: 40px;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.mini-logo {
  width: 38px;
  height: 38px;
  background: var(--primary-800);
  color: var(--white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.exam-header-title {
  font-size: 1.05rem;
  color: var(--primary-900);
  line-height: 1.1;
}

.exam-badge {
  font-size: 0.75rem;
  color: var(--slate-500);
  font-weight: 500;
}

.candidate-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--slate-100);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--slate-700);
}

.id-tag {
  background-color: var(--white);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  border: 1px solid var(--slate-200);
}

/* Cronómetro de 1 Hora y Media */
.timer-meta {
  display: flex;
  align-items: center;
}

.timer-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--slate-100);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.95rem;
  transition: all 0.25s ease;
}

.timer-svg-icon {
  color: var(--primary-600);
  flex-shrink: 0;
}

.timer-pill-texts {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.timer-pill-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
}

.timer-pill-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-900);
  letter-spacing: 0.06em;
}

/* Advertencia cuando quedan menos de 15 minutos */
.timer-pill.timer-warning {
  background-color: #fffbeb;
  border-color: #fcd34d;
}

.timer-pill.timer-warning .timer-svg-icon,
.timer-pill.timer-warning .timer-pill-label,
.timer-pill.timer-warning .timer-pill-value {
  color: #b45309;
}

/* Advertencia crítica cuando quedan menos de 5 minutos */
.timer-pill.timer-critical {
  background-color: #fef2f2;
  border-color: #fca5a5;
  animation: timer-pulse-alert 1.2s infinite;
}

.timer-pill.timer-critical .timer-svg-icon,
.timer-pill.timer-critical .timer-pill-label,
.timer-pill.timer-critical .timer-pill-value {
  color: #dc2626;
  font-weight: 800;
}

@keyframes timer-pulse-alert {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    transform: scale(1);
  }
}

.supervision-status {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-shield-indicator {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--success-50);
  color: var(--success-700);
  border: 1px solid var(--success-100);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pulsing-shield-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success-500);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.save-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--slate-500);
}

.progress-bar-container {
  width: 100%;
  height: 4px;
  background-color: var(--slate-200);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-600), var(--success-500));
  transition: width 0.3s ease;
}

/* Contenido del Examen */
.exam-content-wrapper {
  padding: 2rem 1.5rem 5rem;
}

.exam-container {
  max-width: 900px;
  margin: 0 auto;
}

.exam-intro-card {
  margin-bottom: 2rem;
  background-color: var(--white);
  border-left: 4px solid var(--primary-800);
}

.intro-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.questions-counter-badge {
  background-color: var(--primary-50);
  color: var(--primary-800);
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  white-space: nowrap;
}

.anti-cheat-mini-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  background-color: var(--amber-50);
  color: var(--amber-600);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Tarjetas de Sección */
.section-card {
  margin-bottom: 2rem;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast);
}

.section-card:hover {
  box-shadow: var(--shadow-md);
}

.section-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--slate-100);
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.section-title {
  font-size: 1.35rem;
  color: var(--primary-900);
}

/* Caja de Contexto del Caso */
.case-context-box {
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.context-badge {
  display: inline-block;
  background-color: var(--slate-200);
  color: var(--slate-700);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.context-text {
  font-size: 0.9375rem;
  color: var(--slate-700);
  margin-bottom: 0.75rem;
}

.context-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
  background: var(--white);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
}

.data-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.data-item .lbl {
  font-size: 0.75rem;
  color: var(--slate-500);
}

.data-item .val {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--primary-900);
}

/* Lista de Preguntas */
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.question-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.question-label {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  cursor: pointer;
}

.q-number {
  background-color: var(--primary-800);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.q-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-800);
}

.exam-submit-card {
  margin-top: 3rem;
  background: linear-gradient(180deg, var(--white), var(--slate-50));
  border: 2px dashed var(--slate-300);
  padding: 2.5rem;
}

/* ==============================================================================
   3. PANTALLA ROJA DE ALERTA: PRUEBA INVALIDADA (ANTIFRAUDE)
   ============================================================================== */
.blocked-screen {
  min-height: 100vh;
  background: linear-gradient(135deg, #450a0a 0%, #1e1b1b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  color: var(--white);
}

.blocked-card-container {
  max-width: 680px;
  background: rgba(127, 29, 29, 0.4);
  backdrop-filter: blur(16px);
  border: 2px solid var(--danger-600);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-glow-danger);
  animation: shake-in 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake-in {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.blocked-icon-pulse {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.5rem;
  background: rgba(220, 38, 38, 0.25);
  border: 2px solid var(--danger-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--danger-500);
  animation: pulse-danger 1.5s infinite;
}

@keyframes pulse-danger {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 18px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.blocked-badge {
  display: inline-block;
  background-color: var(--danger-600);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.blocked-title {
  color: #fef2f2;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.blocked-subtitle {
  color: #fca5a5;
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.incident-details-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: left;
  margin-bottom: 2rem;
}

.incident-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fca5a5;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.85rem;
}

.incident-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  font-size: 0.875rem;
}

.incident-meta-grid .full-width {
  grid-column: span 2;
  background: rgba(220, 38, 38, 0.2);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--danger-500);
}

.meta-label {
  color: #cbd5e1;
  font-size: 0.75rem;
  display: block;
}

.incident-meta-grid strong {
  color: #ffffff;
}

.incident-meta-grid .text-danger-strong {
  color: #fca5a5 !important;
  font-size: 0.95rem;
}

.blocked-explanation {
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* ==============================================================================
   4. PANTALLA ÉXITO: PRUEBA FINALIZADA
   ============================================================================== */
.finished-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
}

.finished-card-container {
  max-width: 600px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.finished-icon-wrapper {
  width: 80px;
  height: 80px;
  background-color: var(--success-50);
  border: 2px solid var(--success-500);
  color: var(--success-600);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.success-badge {
  display: inline-block;
  background-color: var(--success-100);
  color: var(--success-700);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.finished-title {
  font-size: 1.75rem;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
}

.finished-subtitle {
  color: var(--slate-600);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.finished-receipt-card {
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--slate-200);
  padding-bottom: 0.5rem;
}

.receipt-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ==============================================================================
   5. VISTA ADMINISTRADOR: PANEL DE CONTROL RRHH
   ============================================================================== */
.admin-view {
  min-height: 100vh;
  background-color: #f8fafc;
}

.admin-top-bar {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  padding: 1rem 2rem;
  box-shadow: var(--shadow-sm);
}

.admin-header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-header-logo-img {
  max-height: 48px;
  max-width: 170px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.modal-brand-logo {
  max-height: 60px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.btn-admin-access-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--white);
  border: 1px solid var(--slate-300);
  color: var(--slate-600);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.btn-admin-access-link:hover {
  background-color: var(--primary-50);
  color: var(--primary-800);
  border-color: var(--primary-400);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.login-error-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  margin-top: 0.75rem;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
}

.btn-logout:hover {
  background-color: #fca5a5;
  color: #991b1b;
}

.admin-brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-900), var(--primary-700));
  color: var(--white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.admin-title {
  font-size: 1.25rem;
  color: var(--primary-900);
}

.admin-subtitle {
  font-size: 0.8125rem;
  color: var(--slate-500);
}

.admin-user-badge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background-color: var(--slate-50);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--slate-200);
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary-800);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--slate-800);
  line-height: 1.1;
}

.user-role {
  font-size: 0.7rem;
  color: var(--slate-500);
}

.admin-main-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Métricas Resumen */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrapper.navy { background-color: var(--primary-100); color: var(--primary-800); }
.stat-icon-wrapper.emerald { background-color: var(--success-100); color: var(--success-700); }
.stat-icon-wrapper.blue { background-color: var(--primary-50); color: var(--primary-600); }
.stat-icon-wrapper.red { background-color: var(--danger-100); color: var(--danger-600); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--slate-500);
  font-weight: 500;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.1;
}

/* Barra de Herramientas */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.5rem;
  flex-wrap: wrap;
}

.toolbar-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 320px;
}

.toolbar-search svg {
  position: absolute;
  left: 0.85rem;
  color: var(--slate-400);
}

.toolbar-search-input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.5rem;
  font-size: 0.875rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filter-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--slate-600);
}

.filter-pill-group {
  display: flex;
  background-color: var(--slate-100);
  padding: 0.2rem;
  border-radius: var(--radius-md);
  gap: 0.2rem;
}

.filter-pill {
  border: none;
  background: transparent;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--slate-600);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill.active {
  background-color: var(--white);
  color: var(--primary-900);
  box-shadow: var(--shadow-sm);
}

.btn-icon-text {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.spin-icon {
  transition: transform 0.4s ease;
}

.is-refreshing .spin-icon {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Tabla de Administración */
.admin-table-card {
  padding: 0;
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.admin-data-table th {
  background-color: var(--slate-50);
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--slate-200);
}

.admin-data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--slate-100);
  vertical-align: middle;
}

.admin-data-table tbody tr:hover {
  background-color: var(--slate-50);
}

.admin-data-table tbody tr:last-child td {
  border-bottom: none;
}

.candidate-cell {
  display: flex;
  flex-direction: column;
}

.candidate-cell-name {
  font-weight: 600;
  color: var(--slate-900);
}

.candidate-cell-cedula {
  font-size: 0.75rem;
  color: var(--slate-500);
}

.candidate-cell-sub {
  font-size: 0.725rem;
  color: var(--slate-600);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.reason-tag {
  display: inline-block;
  background-color: #fee2e2;
  color: #991b1b;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  max-width: 280px;
  white-space: normal;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ==============================================================================
   6. MODALES Y DIÁLOGOS
   ============================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-container {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 540px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-container.modal-lg {
  max-width: 900px;
  max-height: 85vh;
}

.modal-container.modal-sm {
  max-width: 440px;
}

@keyframes modal-pop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-icon-box.blue { background-color: var(--primary-100); color: var(--primary-800); }
.header-icon-box.amber { background-color: var(--amber-100); color: var(--amber-600); }

.modal-body {
  padding: 1.5rem;
}

.modal-scrollable {
  overflow-y: auto;
  max-height: calc(85vh - 140px);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: var(--slate-50);
}

.callout-box {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  margin-top: 1rem;
}

.callout-box.info {
  background-color: var(--primary-50);
  color: var(--primary-800);
  border: 1px solid var(--primary-100);
}

/* Visualizador de Respuestas en Modal */
.response-section-block {
  margin-bottom: 1.75rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.response-section-header {
  background-color: var(--slate-100);
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-900);
  border-bottom: 1px solid var(--slate-200);
}

.response-item-row {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--slate-100);
}

.response-item-row:last-child {
  border-bottom: none;
}

.response-q-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.35rem;
}

.response-q-answer {
  background-color: var(--slate-50);
  border-left: 3px solid var(--primary-600);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--slate-900);
  white-space: pre-wrap;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.response-q-answer.empty {
  color: var(--slate-400);
  font-style: italic;
  border-left-color: var(--slate-300);
}

/* ==============================================================================
   7. TOAST NOTIFICACIÓN
   ============================================================================== */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 400px;
  animation: slide-toast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-toast {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.toast-notification.success { border-left: 4px solid var(--success-500); }
.toast-notification.warning { border-left: 4px solid var(--amber-500); }
.toast-notification.error   { border-left: 4px solid var(--danger-500); }
.toast-notification.info    { border-left: 4px solid var(--primary-600); }

.toast-content h4 {
  font-size: 0.875rem;
  margin-bottom: 0.15rem;
}

.toast-content p {
  font-size: 0.8125rem;
  color: var(--slate-600);
}

/* ==============================================================================
   VIDEO A PANTALLA COMPLETA DE FONDO (DIFUMINADO AMBIENTAL CORPORATIVO)
   ============================================================================== */
.fullscreen-video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: #070d1e;
}

.fullscreen-video-media {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%) scale(1.04);
  object-fit: cover;
  filter: blur(4px) brightness(0.74) saturate(1.1);
  will-change: transform, filter;
}

.fullscreen-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.25) 0%, rgba(8, 15, 30, 0.65) 100%);
}

/* Elevación de vistas para flotar sobre el fondo ambiental */
.app-view {
  position: relative;
  z-index: 1;
}

.admin-hero-banner {
  display: block;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.admin-hero-info h2 {
  font-size: 1.35rem;
  color: var(--primary-900);
  margin: 0.35rem 0 0.5rem;
}

.btn-ai {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.35);
  font-weight: 600;
}

.btn-ai:hover {
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.45);
  transform: translateY(-1px);
}

.auto-grade-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background-color: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
  margin-left: 0.5rem;
}

/* ==============================================================================
   SISTEMA DE CALIFICACIÓN Y SOLUCIONARIO EN MODAL DE PAOLA
   ============================================================================== */
.modal-grading-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--slate-200);
}

.grading-score-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.grading-score-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.grading-score-badge {
  background-color: var(--primary-50);
  color: var(--primary-800);
  border: 1px solid var(--primary-200);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
}

.grading-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.answer-key-guide-box {
  margin-top: 0.55rem;
  padding: 0.65rem 0.9rem;
  background-color: #ecfdf5;
  border-left: 3px solid #10b981;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.8rem;
  color: #065f46;
  line-height: 1.45;
}

.answer-key-guide-box strong {
  color: #047857;
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.question-grade-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.btn-grade-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--slate-300);
  background: var(--white);
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-grade-opt:hover {
  border-color: var(--slate-400);
  background: var(--slate-50);
}

.btn-grade-opt.active-correct {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
}

.btn-grade-opt.active-partial {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
}

.btn-grade-opt.active-wrong {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

.btn-delete-candidate {
  background-color: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
}

.btn-delete-candidate:hover {
  background-color: #fee2e2 !important;
  border-color: #f87171 !important;
  color: #991b1b !important;
}

.score-pill-table {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* ==============================================================================
   RESPONSIVIDAD Y ESTILOS DE IMPRESIÓN
   ============================================================================== */
@media (max-width: 768px) {
  .admin-hero-banner {
    grid-template-columns: 1fr;
  }
  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .candidate-meta,
  .timer-meta {
    width: 100%;
  }

  .candidate-pill,
  .timer-pill {
    width: 100%;
    justify-content: center;
  }
  
  .supervision-status {
    width: 100%;
    justify-content: space-between;
  }
  
  .admin-header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-search {
    min-width: 100%;
  }

  .toolbar-filters {
    flex-direction: column;
    align-items: flex-start;
  }

  .incident-meta-grid {
    grid-template-columns: 1fr;
  }

  .incident-meta-grid .full-width {
    grid-column: span 1;
  }
}

@media print {
  body {
    background: #ffffff !important;
  }

  .exam-header,
  .admin-top-bar,
  .admin-toolbar,
  .modal-footer,
  .btn,
  .btn-close {
    display: none !important;
  }

  .modal-overlay {
    position: static;
    background: transparent;
    padding: 0;
  }

  .modal-container {
    box-shadow: none;
    border: none;
    max-width: 100% !important;
  }
}
