/* ==========================================================================
   SISTEMA DE VOTACIÓN ELECTRÓNICA ESCOLAR 2027
   I.E. "LAS CAPULLANAS" - SULLANA
   Hoja de Estilos Completa (styles.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES DE DISEÑO & PALETA TIPOGRÁFICA
   -------------------------------------------------------------------------- */
:root {
  /* Azules Institucionales */
  --primary: #1e3a8a;            /* Azul marino oficial */
  --primary-hover: #172554;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;

  /* Dorados & Vinos */
  --gold: #d97706;               /* Dorado brillante */
  --gold-hover: #b45309;
  --gold-light: #fef3c7;
  --accent: #831843;             /* Granate institucional */
  --accent-light: #fdf2f8;

  /* Superficies */
  --bg-body: #f8fafc;            /* Fondo pizarra suave */
  --bg-card: #ffffff;            /* Fondo blanco puro */
  --border: #e2e8f0;             /* Bordes elegantes */

  /* Colores de Letras y Textos (Alto Contraste y Nitidez) */
  --text-main: #0b1f44;          /* Títulos y textos principales oscuros */
  --text-body: #1e293b;          /* Párrafos e información general */
  --text-muted: #64748b;         /* Subtítulos y etiquetas secundarias */

  /* Estados */
  --success: #16a34a;            /* Verde esmeralda */
  --success-light: #dcfce7;
  --danger: #dc2626;             /* Rojo carmesí */
  --danger-light: #fee2e2;

  /* Formas y Sombras */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(11, 31, 68, 0.05);
  --shadow-md: 0 4px 14px -2px rgba(11, 31, 68, 0.08);
  --shadow-lg: 0 12px 28px -4px rgba(11, 31, 68, 0.12);

  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. RESET Y ESTILOS BASE
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-body);
  color: var(--text-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   3. ENCABEZADO INSTITUCIONAL
   -------------------------------------------------------------------------- */
.main-header {
  background: linear-gradient(135deg, var(--primary) 0%, #0b1f44 100%);
  color: #ffffff;
  padding: 0.9rem 1.25rem;
  border-bottom: 3.5px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  box-shadow: var(--shadow-sm);
}

.brand-badge {
  background: var(--gold);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.2px;
  line-height: 1.2;
  color: #ffffff;
}

.brand-text p {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* --------------------------------------------------------------------------
   4. CONTENEDOR Y ANIMACIONES DE VISTAS
   -------------------------------------------------------------------------- */
.main-content {
  flex: 1;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1rem 3rem;
}

.card-view {
  display: none;
  animation: viewFadeIn 0.28s ease-out forwards;
}

.card-view.active {
  display: block;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   5. VISTA 1: IDENTIFICACIÓN POR DNI (LOGIN)
   -------------------------------------------------------------------------- */
.login-card {
  max-width: 480px;
  margin: 1.5rem auto 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-lg);
}

.card-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.15rem;
}

.login-center-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(11, 31, 68, 0.08));
}

.card-header h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.card-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.input-group input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.12);
}

/* Caja de Datos de la Estudiante */
.student-info-box {
  background: var(--primary-light);
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 1.05rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.student-info-box p {
  font-size: 0.88rem;
  color: var(--text-body);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.student-info-box p strong {
  color: var(--primary);
  font-size: 0.82rem;
  text-transform: uppercase;
  font-weight: 800;
}

.student-info-box p span {
  font-weight: 700;
  text-align: right;
  color: var(--text-main);
}

#lblName {
  color: var(--primary-hover);
  font-size: 0.98rem;
}

.login-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   6. VISTA 2: CÉDULA DIGITAL DE SUFRAGIO
   -------------------------------------------------------------------------- */
.ballot-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.voter-tag {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.15rem;
}

.ballot-header h2 {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-main);
}

.ballot-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

.ballot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.candidate-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  user-select: none;
}

.candidate-card:hover {
  transform: translateY(-3px);
  border-color: #94a3b8;
  box-shadow: var(--shadow-md);
}

.candidate-card.selected {
  border-color: var(--primary);
  background: #f0f7ff;
  box-shadow: 0 0 0 3.5px rgba(30, 58, 138, 0.2);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9rem;
}

.list-number-badge {
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.radio-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.candidate-card.selected .radio-check {
  border-color: var(--primary);
  background: var(--primary);
}

.candidate-card.selected .radio-check::after {
  content: '';
  width: 9px;
  height: 9px;
  background: #ffffff;
  border-radius: 50%;
}

.card-main {
  margin-bottom: 0.9rem;
}

.candidate-details h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.candidate-list-name {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.25rem;
}

.proposals-box {
  background: #f1f5f9;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: #334155;
  margin-top: auto;
}

.proposals-box strong {
  color: var(--text-main);
}

/* Votos Especiales */
.special-votes-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.btn-special-vote {
  background: var(--bg-card);
  border: 2px dashed #94a3b8;
  color: #475569;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-special-vote:hover {
  background: #f1f5f9;
  border-color: #475569;
}

.btn-special-vote.active-special {
  border-style: solid;
  border-color: #334155;
  background: #e2e8f0;
  color: var(--text-main);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.15);
}

/* --------------------------------------------------------------------------
   7. VISTA 3: CONSTANCIA DE SUFRAGIO EXITOSO
   -------------------------------------------------------------------------- */
.success-card {
  max-width: 500px;
  margin: 1.5rem auto 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.success-icon {
  width: 72px;
  height: 72px;
  background: var(--success-light);
  color: var(--success);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 1.25rem;
  border: 2px solid #bbf7d0;
}

.success-card h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
}

.success-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0.4rem 0 1.5rem;
}

.receipt-box {
  background: var(--bg-body);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  text-align: left;
  margin-bottom: 1.75rem;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #edf2f7;
  font-size: 0.88rem;
}

.receipt-row:last-child {
  border-bottom: none;
}

.receipt-row span {
  color: var(--text-muted);
  font-weight: 600;
}

.receipt-row code {
  background: #e2e8f0;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   8. VISTA 4 & 5: PANELES DE CONTROL & ESCRUTINIO (#viewResults & #viewAdmin)
   -------------------------------------------------------------------------- */
.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-md);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 1.5rem;
}

.admin-title-group h2,
.admin-header h2 {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.admin-title-group p,
.admin-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.badge-admin {
  background: var(--gold);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Pestañas de Navegación del Panel */
.admin-nav-tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.admin-tab-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.admin-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* Tarjetas de Resumen General (KPIs) */
.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

.summary-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.summary-icon {
  font-size: 2.2rem;
  background: var(--primary-light);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.summary-value {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
  display: block;
  margin-top: 0.15rem;
}

.text-accent {
  color: var(--gold) !important;
}

/* Barra de Monitoreo en Tiempo Real */
.monitoring-bar {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.monitoring-info h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.update-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* Selector y Botones de Nivel General */
.level-tabs-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.level-tabs-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-main);
}

.level-tabs {
  display: flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 10px;
  gap: 3px;
}

.level-btn {
  border: none;
  background: transparent;
  padding: 0.45rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 800;
  color: #475569;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.level-btn:hover {
  color: var(--text-main);
}

.level-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(11, 31, 68, 0.08);
}

.filter-select {
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--primary);
}

/* Métricas del Escrutinio */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.metric-card {
  background: var(--bg-body);
  padding: 1.15rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
}

.metric-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  display: block;
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--primary);
  margin-top: 0.25rem;
  line-height: 1;
}

.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }

/* Barras de Resultados de Candidatas */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.result-item {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
}

.progress-bar-bg {
  width: 100%;
  height: 13px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sub-sección 1: Avance de Participación */
.participation-progress-box {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.progress-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
}

.progress-info-row h4 {
  font-size: 1rem;
  color: var(--text-main);
}

.progress-info-row span {
  font-size: 0.88rem;
  color: var(--primary);
}

.level-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.level-stat-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.level-stat-card h5 {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.level-stat-numbers {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.level-stat-numbers strong {
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 900;
}

/* Sub-sección 2: Grilla de Mesas de Votación */
.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.table-status-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-left: 4.5px solid var(--success);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
}

.table-status-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: #cbd5e1;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.table-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}

.status-pill-open {
  background: var(--success-light);
  color: var(--success);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.table-status-card h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.table-detail {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
  font-weight: 500;
}

/* Sub-sección 3: Tabla de Auditoría / Registro */
.log-table-container {
  overflow-x: auto;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.admin-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-log-table th, .admin-log-table td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-log-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.4px;
}

.admin-log-table td {
  color: var(--text-body);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   9. MODALES DEL SISTEMA
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 68, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 100;
}

.modal-content {
  background: #ffffff;
  max-width: 440px;
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  text-align: center;
  box-shadow: 0 25px 35px -5px rgba(11, 31, 68, 0.3);
  animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon {
  font-size: 2.3rem;
  margin-bottom: 0.4rem;
}

.modal-icon.danger {
  color: var(--danger);
}

.modal-content h3 {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-main);
}

.modal-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.selected-summary {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin: 1.15rem 0 1.5rem;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   10. BOTONES & ELEMENTOS GLOBALES
   -------------------------------------------------------------------------- */
.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.28);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text-main);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-outline-sm {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline-sm:hover {
  background: rgba(255, 255, 255, 0.22);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.alert-message {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  background: var(--danger-light);
  color: var(--danger);
  border-left: 4.5px solid var(--danger);
}

.hidden {
  display: none !important;
}

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   11. RESPONSIVIDAD
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-actions {
    width: 100%;
  }

  .monitoring-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .level-tabs-container {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .level-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .special-votes-container {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    grid-template-columns: 1fr;
  }
}