/* ══════════════════════════════════════════════════════════════════════════
   PROMOÉXIT - ESTILOS OFICIALES DE VERIFICACIÓN Y CONSULTA PÚBLICA DE CERTIFICADOS
   css/consulta-publica.css
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Branding Promoéxit */
  --px-brand-magenta:        #E6007E;
  --px-brand-magenta-bright: #FC0097;
  --px-brand-magenta-dark:   #B80065;
  --px-brand-yellow:         #FFED00;
  --px-brand-white:          #FFFFFF;

  /* Slate Scale */
  --px-slate-50:             #F8FAFC;
  --px-slate-100:            #F1F5F9;
  --px-slate-200:            #E2E8F0;
  --px-slate-300:            #CBD5E1;
  --px-slate-400:            #94A3B8;
  --px-slate-500:            #64748B;
  --px-slate-600:            #475569;
  --px-slate-700:            #334155;
  --px-slate-800:            #1E293B;
  --px-slate-900:            #0F172A;

  /* Emerald (Status Success) */
  --px-emerald-50:           #ECFDF5;
  --px-emerald-100:          #D1FAE5;
  --px-emerald-500:          #10B981;
  --px-emerald-700:          #047857;
  --px-emerald-border:       #A7F3D0;

  /* Radius & Shadows */
  --px-radius-sm:            8px;
  --px-radius-md:            12px;
  --px-radius-lg:            16px;
  --px-radius-xl:            24px;

  --px-shadow-sm:            0 2px 8px rgba(15, 23, 42, 0.04);
  --px-shadow-md:            0 8px 24px -4px rgba(30, 41, 59, 0.08), 0 4px 12px -2px rgba(230, 0, 126, 0.04);
  --px-shadow-lg:            0 16px 36px -6px rgba(30, 41, 59, 0.12), 0 6px 16px -4px rgba(230, 0, 126, 0.08);
  --px-shadow-magenta:       0 10px 24px -4px rgba(230, 0, 126, 0.35);

  --px-transition-fast:      0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --px-transition-normal:    0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --px-spring:               cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset y Contenedor Principal */
body {
  background-color: var(--px-slate-50);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--px-slate-800);
  margin: 0;
  padding: 0;
}

.px-public-verify-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  box-sizing: border-box;
}

/* ══════════════════════════════════════════════════════════════════════════
   1. CABECERA HERO E INSTITUCIONAL
   ══════════════════════════════════════════════════════════════════════════ */
.px-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 36px;
}

.px-authenticity-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(230, 0, 126, 0.08);
  border: 1px solid rgba(230, 0, 126, 0.2);
  color: var(--px-brand-magenta);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  transition: transform var(--px-spring);
}

.px-authenticity-badge:hover {
  transform: translateY(-2px);
  background: rgba(230, 0, 126, 0.12);
}

.px-authenticity-badge i {
  font-size: 1rem;
}

.px-hero-title {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--px-slate-900);
  margin: 0 0 14px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.px-hero-title .px-text-gradient {
  background: linear-gradient(135deg, var(--px-brand-magenta) 0%, var(--px-brand-magenta-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.px-hero-subtitle {
  color: var(--px-slate-600);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 660px;
  font-weight: 500;
}

.px-hero-divider {
  width: 64px;
  height: 4px;
  background: linear-gradient(90deg, var(--px-brand-magenta), var(--px-brand-yellow));
  border-radius: 99px;
  margin: 18px auto 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   2. FRANJA DE ENTIDADES ALIADAS Y EMBLEMAS
   ══════════════════════════════════════════════════════════════════════════ */
.px-institutions-bar {
  background: var(--px-brand-white);
  border: 1px solid var(--px-slate-200);
  border-radius: var(--px-radius-lg);
  padding: 16px 24px;
  margin-bottom: 36px;
  box-shadow: var(--px-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.px-institutions-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--px-slate-500);
}

.px-institutions-header i {
  color: var(--px-brand-magenta);
}

.px-institutions-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.px-institution-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--px-radius-md);
  height: 60px;
  min-height: 60px;
  max-height: 60px;
  width: 130px;
  min-width: 130px;
  box-sizing: border-box;
  opacity: 0.75;
  transition: opacity var(--px-transition-fast), transform var(--px-spring), border-color var(--px-transition-fast), background var(--px-transition-fast), box-shadow var(--px-transition-fast);
}

.px-institution-logo:hover {
  opacity: 1;
  transform: translateY(-3px);
  border-color: rgba(230, 0, 126, 0.35);
  background: #FFF5F8;
}

/* Destaque Impactante para Auspiciantes Principales (Promoéxit y Nítido) */
.px-institution-logo:first-child,
.px-institution-logo:last-child {
  height: 84px !important;
  min-height: 84px !important;
  max-height: 84px !important;
  width: 200px !important;
  min-width: 200px !important;
  padding: 8px 16px;
  background: #FFFFFF;
  border: 2px solid #E6007E;
  box-shadow: 0 4px 18px rgba(230, 0, 126, 0.18);
  opacity: 1 !important;
}

.px-institution-logo:first-child:hover,
.px-institution-logo:last-child:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--px-brand-magenta-bright);
  box-shadow: 0 8px 26px rgba(230, 0, 126, 0.3);
  background: #FFFFFF;
}

/* Base de imágenes desbloqueada para escalado dinámico */
.px-institution-logo img,
.px-logo-img {
  width: 100%;
  height: 100%;
  max-height: 44px;
  max-width: 110px;
  object-fit: contain;
  transition: transform var(--px-transition-normal);
}

.px-institution-logo:first-child img,
.px-institution-logo:first-child .px-logo-img,
.px-institution-logo:last-child img,
.px-institution-logo:last-child .px-logo-img {
  max-height: 64px !important;
  max-width: 170px !important;
  transform: scale(1.12) !important;
}

.px-institution-logo:first-child:hover img,
.px-institution-logo:first-child:hover .px-logo-img,
.px-institution-logo:last-child:hover img,
.px-institution-logo:last-child:hover .px-logo-img {
  transform: scale(1.16) !important;
}

.px-institution-logo:not(:first-child):not(:last-child):hover img,
.px-institution-logo:not(:first-child):not(:last-child):hover .px-logo-img {
  transform: scale(1.05);
}

.px-institution-placeholder {
  font-size: 0.88rem;
  color: var(--px-slate-500);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
}

/* ══════════════════════════════════════════════════════════════════════════
   3. TARJETA DE BÚSQUEDA INTELIGENTE
   ══════════════════════════════════════════════════════════════════════════ */
.px-search-card {
  background: var(--px-brand-white);
  border: 1px solid var(--px-slate-200);
  border-radius: var(--px-radius-lg);
  padding: 28px;
  margin-bottom: 36px;
  box-shadow: var(--px-shadow-lg);
  position: relative;
  overflow: hidden;
}

.px-search-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--px-brand-magenta) 0%, var(--px-brand-magenta-bright) 70%, var(--px-brand-yellow) 100%);
}

.px-search-header {
  margin-bottom: 24px;
}

.px-search-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--px-slate-900);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.px-search-title i {
  color: var(--px-brand-magenta);
}

.px-search-desc {
  font-size: 0.92rem;
  color: var(--px-slate-600);
  margin: 0;
}

/* Selector de Tabs/Modos de Búsqueda */
.px-search-tabs {
  display: inline-flex;
  background: var(--px-slate-100);
  padding: 4px;
  border-radius: var(--px-radius-md);
  gap: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--px-slate-200);
  width: 100%;
  box-sizing: border-box;
}

.px-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--px-slate-600);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--px-transition-fast);
  outline: none;
}

.px-tab-btn i {
  font-size: 0.95rem;
  color: var(--px-slate-500);
}

.px-tab-btn:hover {
  color: var(--px-brand-magenta);
  background: rgba(230, 0, 126, 0.05);
}

.px-tab-btn.active {
  background: var(--px-brand-white);
  color: var(--px-brand-magenta);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.px-tab-btn.active i {
  color: var(--px-brand-magenta);
}

/* Inputs de 50px con icono integrado */
.px-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.px-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.px-field-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--px-slate-800);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.px-input-icon-wrapper {
  position: relative;
  width: 100%;
}

.px-input-icon-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  color: var(--px-slate-400);
  transition: color var(--px-transition-fast);
  pointer-events: none;
  z-index: 2;
}

.px-input-custom {
  width: 100%;
  box-sizing: border-box;
  height: 50px;
  padding: 12px 16px 12px 48px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--px-slate-900);
  background: var(--px-brand-white);
  border: 1px solid var(--px-slate-200);
  border-radius: var(--px-radius-md);
  transition: all var(--px-transition-fast);
}

.px-input-custom::placeholder {
  color: var(--px-slate-400);
  font-weight: 400;
}

.px-input-custom:hover {
  border-color: var(--px-slate-300);
  background: var(--px-slate-50);
}

.px-input-custom:focus {
  border-color: var(--px-brand-magenta);
  box-shadow: 0 0 0 4px rgba(230, 0, 126, 0.15);
  background: var(--px-brand-white);
  outline: none;
}

.px-input-icon-wrapper:focus-within i {
  color: var(--px-brand-magenta);
}

/* Botones de Acción de Búsqueda */
.px-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.px-btn-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--px-brand-magenta) 0%, var(--px-brand-magenta-bright) 100%);
  color: var(--px-brand-white) !important;
  border: none;
  border-radius: var(--px-radius-md);
  padding: 14px 28px;
  min-height: 50px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  box-shadow: var(--px-shadow-magenta);
  transition: transform var(--px-spring), box-shadow var(--px-transition-fast), background var(--px-transition-fast);
  text-decoration: none !important;
}

.px-btn-search:hover {
  background: linear-gradient(135deg, var(--px-brand-magenta-bright) 0%, var(--px-brand-magenta-dark) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(230, 0, 126, 0.45);
}

.px-btn-search:active {
  transform: translateY(0) scale(0.98);
}

.px-btn-search i {
  font-size: 1.1rem;
}

.px-btn-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--px-brand-white);
  color: var(--px-slate-600) !important;
  border: 1px solid var(--px-slate-300);
  border-radius: var(--px-radius-md);
  padding: 14px 22px;
  min-height: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  text-decoration: none !important;
  transition: all var(--px-transition-fast);
}

.px-btn-reset:hover {
  border-color: var(--px-brand-magenta);
  color: var(--px-brand-magenta) !important;
  background: #FFF5F8;
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════════════════════════════════════
   4. PRESENTACIÓN DE RESULTADOS Y FICHA DE VALIDACIÓN
   ══════════════════════════════════════════════════════════════════════════ */
.px-results-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Empty State */
.px-empty-state {
  background: var(--px-brand-white);
  border: 1px dashed var(--px-slate-300);
  border-radius: var(--px-radius-lg);
  padding: 48px 24px;
  text-align: center;
  box-shadow: var(--px-shadow-sm);
}

.px-empty-icon {
  width: 72px;
  height: 72px;
  background: var(--px-slate-100);
  border: 1px solid var(--px-slate-200);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--px-brand-magenta);
  font-size: 30px;
}

.px-empty-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--px-slate-900);
  margin: 0 0 8px;
}

.px-empty-desc {
  font-size: 0.95rem;
  color: var(--px-slate-600);
  margin: 0 auto;
  max-width: 500px;
  line-height: 1.5;
}

/* Counter & Alert Banner de Confirmación de Resultados */
.px-alert-success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #047857;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.px-results-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.px-results-counter-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--px-slate-700);
}

.px-results-counter-text span {
  color: var(--px-brand-magenta);
}

/* Ficha de Validación Oficial (Card de Certificado) */
.px-certificate-card {
  background: var(--px-brand-white);
  border: 1px solid var(--px-emerald-border);
  border-radius: var(--px-radius-lg);
  padding: 28px;
  box-shadow: 0 10px 30px -6px rgba(16, 185, 129, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  position: relative;
  transition: transform var(--px-spring), box-shadow var(--px-transition-fast);
}

.px-certificate-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -6px rgba(16, 185, 129, 0.18), 0 6px 16px -4px rgba(15, 23, 42, 0.06);
}

.px-card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--px-slate-100);
}

/* Badge Verde Esmeralda de Autenticidad */
.px-badge-valid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--px-emerald-50);
  border: 1px solid var(--px-emerald-border);
  color: var(--px-emerald-700);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.px-badge-valid i {
  font-size: 0.95rem;
  color: var(--px-emerald-500);
}

/* Code Pill Monospace */
.px-code-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--px-brand-magenta);
  background: #FFF5F8;
  border: 1px solid rgba(230, 0, 126, 0.2);
  padding: 4px 12px;
  border-radius: 8px;
}

/* Header de la Ficha */
.px-cert-student-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--px-slate-900);
  margin: 0 0 6px;
  line-height: 1.2;
}

.px-cert-course-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--px-slate-700);
  margin: 0 0 20px;
  line-height: 1.4;
}

/* Grid de Datos Técnicos del Certificado */
.px-cert-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  background: var(--px-slate-50);
  border: 1px solid var(--px-slate-200);
  border-radius: var(--px-radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.px-data-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.px-data-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--px-slate-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.px-data-label i {
  color: var(--px-brand-magenta);
  font-size: 0.85rem;
}

.px-data-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--px-slate-800);
}

/* Botón de Acción Principal Destacado */
.px-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}

.px-btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--px-brand-magenta) 0%, var(--px-brand-magenta-bright) 100%);
  color: var(--px-brand-white) !important;
  border: none;
  border-radius: var(--px-radius-md);
  padding: 14px 26px;
  min-height: 48px;
  font-size: 0.98rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  text-decoration: none !important;
  box-shadow: var(--px-shadow-magenta);
  transition: transform var(--px-spring), box-shadow var(--px-transition-fast), background var(--px-transition-fast);
}

.px-btn-download:hover {
  background: linear-gradient(135deg, var(--px-brand-magenta-bright) 0%, var(--px-brand-magenta-dark) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(230, 0, 126, 0.45);
}

.px-btn-download i {
  font-size: 1.15rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   5. PASO A PASO (CÓMO CONSULTAR)
   ══════════════════════════════════════════════════════════════════════════ */
.px-steps-section {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px dashed var(--px-slate-300);
}

.px-steps-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 32px;
}

.px-steps-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--px-slate-900);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.px-steps-title span {
  color: var(--px-brand-magenta);
}

.px-steps-subtitle {
  font-size: 0.95rem;
  color: var(--px-slate-600);
  margin: 0;
  font-weight: 500;
}

.px-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.px-step-card {
  position: relative;
  background: var(--px-brand-white);
  border: 1px solid var(--px-slate-200);
  border-radius: var(--px-radius-lg);
  padding: 28px 22px 24px;
  box-shadow: var(--px-shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform var(--px-spring), box-shadow var(--px-transition-fast), border-color var(--px-transition-fast);
}

.px-step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--px-shadow-md);
  border-color: rgba(230, 0, 126, 0.3);
}

.px-step-badge {
  position: absolute;
  top: -14px;
  background: linear-gradient(135deg, var(--px-brand-magenta) 0%, var(--px-brand-magenta-bright) 100%);
  color: var(--px-brand-white);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 99px;
  box-shadow: 0 4px 12px rgba(230, 0, 126, 0.25);
}

.px-step-icon {
  width: 56px;
  height: 56px;
  background: #FFF5F8;
  border: 1px solid rgba(230, 0, 126, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--px-brand-magenta);
  margin: 8px 0 16px;
}

.px-step-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--px-slate-900);
  margin: 0 0 8px;
}

.px-step-desc {
  font-size: 0.88rem;
  color: var(--px-slate-600);
  margin: 0;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════════════
   6. ESCÁNER QR EN VIVO & HUD TÁCTICO
   ══════════════════════════════════════════════════════════════════════════ */
.px-qr-scanner-card {
  max-width: 680px;
  margin: 0 auto 36px;
  background: var(--px-brand-white);
  border: 1px solid var(--px-slate-200);
  border-radius: var(--px-radius-xl);
  padding: 32px;
  box-shadow: var(--px-shadow-lg);
  position: relative;
  overflow: hidden;
}

.px-qr-scanner-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--px-brand-magenta) 0%, var(--px-brand-magenta-bright) 70%, var(--px-brand-yellow) 100%);
}

.px-camera-viewport {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 3;
  margin: 0 auto 20px;
  background: #0F172A;
  border-radius: var(--px-radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(15, 23, 42, 0.15);
  border: 2px solid var(--px-slate-800);
}

.px-camera-viewport canvas#qr-canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* Framework HUD Táctico */
.px-hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.px-hud-target {
  width: 70%;
  height: 70%;
  position: relative;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45);
  border-radius: 12px;
}

.px-hud-bracket {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--px-brand-magenta-bright);
  border-style: solid;
}

.px-bracket-tl { top: -2px; left: -2px; border-width: 4px 0 0 4px; border-top-left-radius: 8px; }
.px-bracket-tr { top: -2px; right: -2px; border-width: 4px 4px 0 0; border-top-right-radius: 8px; }
.px-bracket-bl { bottom: -2px; left: -2px; border-width: 0 0 4px 4px; border-bottom-left-radius: 8px; }
.px-bracket-br { bottom: -2px; right: -2px; border-width: 0 4px 4px 0; border-bottom-right-radius: 8px; }

/* Láser de Escaneo Vertical Animation */
.px-scanline {
  position: absolute;
  top: 0;
  left: 4px;
  right: 4px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--px-brand-magenta-bright), var(--px-brand-yellow), var(--px-brand-magenta-bright), transparent);
  box-shadow: 0 0 12px var(--px-brand-magenta-bright), 0 0 4px var(--px-brand-yellow);
  opacity: 0;
}

.px-camera-viewport.scanning .px-scanline {
  opacity: 1;
  animation: pxScanMotion 2.2s ease-in-out infinite alternate;
}

@keyframes pxScanMotion {
  0% { top: 4%; }
  100% { top: 94%; }
}

/* Alerta de Estado Accesible */
.px-status-alert {
  background: var(--px-slate-100);
  border: 1px solid var(--px-slate-200);
  color: var(--px-slate-700);
  padding: 12px 18px;
  border-radius: var(--px-radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.px-status-alert i {
  color: var(--px-brand-magenta);
}

/* Barra de Controles Rápidos del Escáner */
.px-scanner-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.px-btn-scan-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--px-brand-magenta) 0%, var(--px-brand-magenta-bright) 100%);
  color: var(--px-brand-white) !important;
  border: none;
  border-radius: var(--px-radius-md);
  padding: 14px 28px;
  min-height: 50px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  box-shadow: var(--px-shadow-magenta);
  transition: transform var(--px-spring), box-shadow var(--px-transition-fast);
  text-decoration: none !important;
}

.px-btn-scan-primary:hover {
  background: linear-gradient(135deg, var(--px-brand-magenta-bright) 0%, var(--px-brand-magenta-dark) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(230, 0, 126, 0.45);
}

.px-btn-toggle-cam {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--px-brand-white);
  color: var(--px-slate-700) !important;
  border: 1px solid var(--px-slate-300);
  border-radius: var(--px-radius-md);
  padding: 14px 20px;
  min-height: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--px-transition-fast);
}

.px-btn-toggle-cam:hover {
  border-color: var(--px-brand-magenta);
  color: var(--px-brand-magenta) !important;
  background: #FFF5F8;
  transform: translateY(-2px);
}

.px-manual-link-wrapper {
  text-align: center;
  margin-top: 16px;
}

.px-manual-link {
  color: var(--px-slate-600);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  transition: color var(--px-transition-fast);
}

.px-manual-link:hover {
  color: var(--px-brand-magenta);
}

/* ══════════════════════════════════════════════════════════════════════════
   7. RESPONSIVE DESIGN
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .px-public-verify-container {
    padding: 24px 14px 60px;
  }

  .px-hero-title {
    font-size: 1.95rem;
  }

  .px-hero-subtitle {
    font-size: 0.95rem;
  }

  .px-search-card {
    padding: 20px;
  }

  .px-search-tabs {
    flex-direction: column;
  }

  .px-form-actions {
    flex-direction: column;
    width: 100%;
  }

  .px-btn-search, .px-btn-reset {
    width: 100%;
  }

  .px-cert-student-name {
    font-size: 1.25rem;
  }

  .px-cert-data-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .px-card-footer {
    justify-content: stretch;
  }

  .px-btn-download {
    width: 100%;
  }

  .px-steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
