/* ==========================================================================
   ESTILOS DE LA PAPELETA ELECTORAL Y KIOSCO (IST - VOTO ELECTRÓNICO)
   Estética Institucional Anti-AI Slop: Sobria, Limpia, Formal y Accesible
   ========================================================================== */

.kiosk-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 140px;
}

/* 1. Tarjeta de Entrada e Identificación */
.official-card {
  max-width: 580px;
  margin: 40px auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  box-shadow: var(--shadow-elevated);
}

.official-seal-header {
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
}

.welcome-logo {
  width: 72px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.official-titles {
  flex: 1;
}

.welcome-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 6px;
}

.portal-badge {
  display: inline-block;
  background-color: var(--ist-gold-surface);
  color: var(--ist-gold-400);
  border: 1px solid rgba(201, 147, 24, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Selector de Secciones (Solo para vista raíz / general) */
.section-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.section-btn {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  color: #fff;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.section-btn:hover {
  background-color: #1a2c4e;
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.section-btn-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.section-btn-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-btn-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ist-gold-400);
  margin-top: auto;
}

/* Banner de Coordinación Activa (Para /vote/ms y /vote/hs) */
.coord-banner {
  background-color: #0b172c;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: left;
}

.coord-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ist-gold-400);
  margin-bottom: 4px;
}

.coord-desc {
  font-size: 0.85rem;
  color: var(--ist-slate-300);
  line-height: 1.4;
}

/* Formulario de Carnet */
.identify-form {
  text-align: left;
}

.input-group {
  margin-bottom: 20px;
}

.input-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ist-slate-200);
  margin-bottom: 8px;
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: normal;
}

.input-field {
  width: 100%;
  background-color: #080f1d;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  outline: none;
  letter-spacing: 0.05em;
  transition: border-color 0.15s ease;
}

.input-field:focus {
  border-color: var(--border-gold);
  background-color: #0a1324;
}

.security-notice {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--ist-slate-400);
  line-height: 1.4;
}

.security-notice .lock-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* 2. Encabezado de Papeleta Activa */
.official-header-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 22px 28px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-card);
}

.ballot-student-info h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.ballot-student-info p {
  color: var(--ist-gold-400);
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: 2px;
}

.ballot-status-pill {
  background-color: rgba(5, 150, 105, 0.15);
  border: 1px solid rgba(5, 150, 105, 0.4);
  color: #34d399;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
}

/* 3. Secciones y Categorías de la Papeleta */
.official-ballot-section {
  margin-bottom: 44px;
  background-color: #0b1527;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.category-title-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--border-strong);
  gap: 16px;
}

.ballot-section-number {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ist-gold-400);
  display: block;
  margin-bottom: 2px;
}

.category-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.category-instruction {
  font-size: 0.85rem;
  color: var(--ist-slate-400);
}

/* Grilla de Tarjetas de Candidatos */
.candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

/* Tarjeta Oficial de Candidato (Estilo Boleta Electoral) */
.official-ballot-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  user-select: none;
  position: relative;
}

.official-ballot-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  background-color: #122242;
}

.official-ballot-card.selected {
  border-color: var(--border-gold);
  background-color: #14274c;
  box-shadow: 0 0 0 2px var(--border-gold);
}

.ballot-card-header {
  padding: 8px 14px;
  background-color: #070e1b;
  border-top: 3px solid #1e3a8a;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ballot-casilla {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ist-gold-400);
  letter-spacing: 0.05em;
}

.ballot-party-name {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* Marco de Fotografía */
.candidate-photo-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  background-color: #070d18;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.candidate-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Datos del Candidato */
.candidate-info {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.candidate-name {
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.candidate-slogan {
  font-size: 0.8rem;
  color: var(--ist-slate-400);
  margin-bottom: 16px;
  flex: 1;
  line-height: 1.35;
}

/* Casilla de Marcación Electoral (Tipo Boleta Física) */
.candidate-selection-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background-color: #070e1c;
  border: 1px solid var(--border-subtle);
  color: var(--ist-slate-300);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.ballot-checkbox-box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--ist-slate-500);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 900;
  background-color: #0a1426;
  color: transparent;
  flex-shrink: 0;
}

.official-ballot-card.selected .candidate-selection-indicator {
  background-color: var(--ist-gold-surface);
  border-color: var(--border-gold);
  color: #ffffff;
}

.official-ballot-card.selected .ballot-checkbox-box {
  background-color: var(--border-gold);
  border-color: var(--border-gold);
  color: #070d18;
}

/* Tarjeta de Voto en Blanco */
.official-ballot-card.blank-vote {
  background-color: #091222;
  border-style: dashed;
}

.blank-header {
  border-top-color: #64748b !important;
}

.blank-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #060b14;
}

.blank-icon-mark {
  font-size: 2.8rem;
  margin-bottom: 6px;
  opacity: 0.8;
}

.blank-photo-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ist-slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 4. Barra Flotante Inferior de Votación */
.floating-ballot-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background-color: #060c18;
  border-top: 2px solid var(--border-gold);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  gap: 20px;
}

.ballot-progress-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.progress-counter {
  color: var(--ist-gold-400);
  font-weight: 800;
}

/* 5. Pantalla de Éxito / Comprobante de Votación */
.official-success-card {
  max-width: 600px;
  margin: 50px auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--ist-emerald);
  border-radius: var(--radius-md);
  padding: 44px 36px;
  text-align: center;
  box-shadow: var(--shadow-elevated);
}

.urn-animation-container {
  width: 90px;
  height: 90px;
  margin: 0 auto 20px;
  background-color: rgba(5, 150, 105, 0.15);
  border: 2px solid var(--ist-emerald);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.urn-check-icon {
  font-size: 2.8rem;
  font-weight: 900;
  color: #34d399;
}

.success-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.success-highlight {
  color: var(--ist-gold-400);
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: 14px;
}

.success-note {
  color: var(--ist-slate-400);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 460px;
  margin: 0 auto 24px;
}

.auto-logout-timer {
  font-size: 0.85rem;
  color: var(--ist-slate-300);
  font-weight: 600;
  padding: 10px 16px;
  background-color: #08101e;
  border-radius: var(--radius-sm);
  display: inline-block;
}

#logout-countdown {
  color: var(--ist-gold-400);
  font-weight: 800;
}

/* Responsividad */
@media (max-width: 768px) {
  .section-selector {
    grid-template-columns: 1fr;
  }
  .official-seal-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .ballot-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .floating-ballot-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 18px;
  }
}
