/* ==========================================================================
   Presidente26 - Premium Dark Mode Design System
   ========================================================================== */

/* 1. TOKENS DE DISEÑO & VARIABLES (:root) */
:root {
  /* Tipografías */
  --font-headings: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Paleta de Colores Principal */
  --bg-main: #060913;               /* Fondo de aplicación ultra oscuro */
  --bg-card: rgba(13, 20, 38, 0.6);  /* Fondo de tarjeta translúcido */
  --bg-card-hover: rgba(22, 33, 62, 0.85); /* Hover en tarjeta */
  --bg-sidebar: rgba(10, 15, 30, 0.9);   /* Fondo de barra lateral */
  
  /* Colores de Acento Específicos */
  --color-primary: #06b6d4;         /* Cian eléctrico (Centro/General) */
  --color-primary-glow: rgba(6, 182, 212, 0.25);
  
  --color-gov: #10b981;             /* Esmeralda (Oficialismo/Pro-Gobierno) */
  --color-gov-glow: rgba(16, 185, 129, 0.2);
  
  --color-opp: #f59e0b;             /* Oro/Ambar (Críticos/Oposición) */
  --color-opp-glow: rgba(245, 158, 11, 0.2);
  
  --color-danger: #f43f5e;          /* Rosado/Rojo (Alertas/Divergencias) */
  --color-danger-glow: rgba(244, 63, 94, 0.25);

  /* Colores de Estado Físicos */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(6, 182, 212, 0.4);
  --border-active: rgba(255, 255, 255, 0.15);
  
  /* Escala de Grises de Texto */
  --text-primary: #f1f5f9;          /* Blanco de alto contraste */
  --text-secondary: #94a3b8;        /* Gris medio */
  --text-muted: #64748b;             /* Gris oscuro para pies/fuentes */
  --text-active: #ffffff;            /* Blanco puro activo */

  /* Efectos y Sombras */
  --glass-filter: blur(20px) saturate(180%);
  --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.15);
  
  /* Transiciones */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease-out;
}

/* 2. RECONCILIACIÓN Y ESTILOS BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Ocultar elementos */
.hidden {
  display: none !important;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ==========================================================================
   3. PANTALLA DE CARGA (Loading Screen Overlay)
   ========================================================================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-main);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-content {
  text-align: center;
  max-width: 450px;
  padding: 2rem;
}

.loading-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.logo-symbol {
  font-size: 2.8rem;
  animation: float 3s ease-in-out infinite;
}

.logo-text {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: 0.05em;
  color: var(--text-active);
}

.logo-text span {
  color: var(--color-primary);
  text-shadow: 0 0 10px var(--color-primary);
}

.loading-status {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  min-height: 24px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 15px var(--color-primary-glow);
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
   4. CONTENEDOR GENERAL Y ESTRUCTURA DE LA APP (SPA)
   ========================================================================== */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-image: 
    radial-gradient(at 10% 20%, rgba(6, 182, 212, 0.05) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(16, 185, 129, 0.03) 0px, transparent 50%);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 9, 19, 0.7);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.8rem 2rem;
}

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

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

.brand-flag {
  font-size: 1.8rem;
}

.brand-name {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--text-active);
}

.brand-accent {
  color: var(--color-primary);
  font-weight: 900;
}

/* Sistema de Pestañas (Nav Tabs) */
.tab-navigation {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 0.25rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--text-active);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: var(--text-active);
  background: var(--color-primary);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.tab-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Labels de tabs: por defecto mostrar completo, en mobile mostrar corto */
.tab-label-short {
  display: none;
}

.tab-label-full {
  display: inline;
}

.app-main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

/* ==========================================================================
   5. PESTAÑA COMPARADOR VERSUS (Triple Columna)
   ========================================================================== */
/* Container de Versus (ancho completo) */
.versus-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

/* Fila de Controladores en la parte superior */
.versus-controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .versus-controls-row {
    grid-template-columns: 1fr;
  }
}

.control-block {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.control-label {
  font-family: var(--font-headings);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding-left: 0.2rem;
}

/* Dropdown Personalizado */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.8rem 1.2rem;
  background: var(--bg-card);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: var(--font-headings);
  text-align: left;
  min-height: 60px;
  box-shadow: var(--shadow-premium);
}

.dropdown-trigger:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.custom-dropdown.open .dropdown-trigger {
  border-color: var(--color-primary);
  box-shadow: 0 0 15px var(--color-primary-glow);
}

.trigger-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.sector-icon {
  font-size: 1.2rem;
}

.selected-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-active);
}

.dropdown-arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  pointer-events: none;
}

.custom-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--color-primary);
}

/* Menú Desplegable */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 12, 26, 0.96);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border-active);
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  max-height: 380px;
  overflow-y: auto;
  padding: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: var(--transition-smooth);
}

.custom-dropdown.open .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-active);
  transform: translateX(2px);
}

.dropdown-item.active {
  background: rgba(6, 182, 212, 0.08);
  color: var(--text-active);
  border-left-color: var(--color-primary);
  font-weight: 600;
}

.dropdown-item .indicator-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition-fast);
}

.dropdown-item.active .indicator-dot {
  background-color: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
}

/* Dropdown de Candidatos */
.candidate-dropdown-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
}

.candidate-dropdown-item .candidate-header-sm {
  flex: 1;
  min-width: 0;
}

.candidate-dropdown-item .candidate-stats-row {
  flex-shrink: 0;
  width: 170px;
}

.candidate-dropdown-item .stat-badge {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.candidate-dropdown-item:hover .stat-badge {
  background: rgba(255, 255, 255, 0.05);
}

.candidate-dropdown-item.active .stat-badge {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(6, 182, 212, 0.2);
}

.candidate-header-sm {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.candidate-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-primary), #0369a1);
  color: var(--text-active);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Personalizar colores de avatares según el ID del candidato si aplica */
.candidate-card-btn:nth-child(1) .candidate-avatar { background: linear-gradient(135deg, #10b981, #064e3b); } /* Cepeda */
.candidate-card-btn:nth-child(2) .candidate-avatar { background: linear-gradient(135deg, #3b82f6, #1d4ed8); } /* Valencia */
.candidate-card-btn:nth-child(3) .candidate-avatar { background: linear-gradient(135deg, #06b6d4, #0891b2); } /* López */
.candidate-card-btn:nth-child(4) .candidate-avatar { background: linear-gradient(135deg, #f59e0b, #b45309); } /* Espriella */
.candidate-card-btn:nth-child(5) .candidate-avatar { background: linear-gradient(135deg, #8b5cf6, #5b21b6); } /* Barreras */
.candidate-card-btn:nth-child(6) .candidate-avatar { background: linear-gradient(135deg, #eab308, #854d0e); } /* Fajardo */

.candidate-meta-sm {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.candidate-name-sm {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidate-party-sm {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidate-stats-row {
  display: flex;
  gap: 0.5rem;
}

.stat-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  flex: 1;
  font-size: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.candidate-card-btn.active .stat-badge {
  background: rgba(255, 255, 255, 0.05);
}

.stat-label {
  color: var(--text-muted);
}

.stat-value {
  font-weight: 700;
  color: var(--text-active);
}

/* Ficha de Resumen del Posicionamiento Sectorial (Para facilitar la comprensión) */
.versus-summary-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.summary-sector-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.summary-sector-badge {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-sector-title {
  font-family: var(--font-headings);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-active);
}

.summary-sector-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.summary-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.2rem;
}

.summary-metric-widget {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.widget-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.widget-slider-container {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
  margin: 0.5rem 0;
}

.slider-track {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.slider-node {
  position: absolute;
  top: -24px;
  font-family: var(--font-headings);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  transform: translateX(-50%);
  transition: var(--transition-smooth);
}

.node-left { left: 15%; }
.node-center { left: 50%; }
.node-right { left: 85%; }

.slider-node.active {
  color: var(--text-active);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.slider-thumb {
  position: absolute;
  top: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-active);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
  transform: translateX(-50%);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-thumb.postura-continua { 
  background: var(--color-gov); 
  box-shadow: 0 0 15px var(--color-gov-glow); 
}
.slider-thumb.postura-ruptura { 
  background: var(--color-danger); 
  box-shadow: 0 0 15px var(--color-danger-glow); 
}
.slider-thumb.postura-reforma { 
  background: var(--color-primary); 
  box-shadow: 0 0 15px var(--color-primary-glow); 
}

.widget-value-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.widget-value-desc.postura-continua strong { color: var(--color-gov); }
.widget-value-desc.postura-ruptura strong { color: var(--color-danger); }
.widget-value-desc.postura-reforma strong { color: var(--color-primary); }

.widget-progress-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 36px;
}

.widget-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.widget-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease-out;
}

.widget-progress-percent {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-active);
}

.step-num {
  background: var(--color-primary-glow);
  color: var(--color-primary);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  font-family: var(--font-headings);
  font-weight: 700;
}

.step-num-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--color-primary-glow);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 0.85rem;
  margin-right: 0.4rem;
}

/* El Tablero Triple de Comparación */
.versus-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.comparison-column {
  background: var(--bg-card);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.5rem;
  box-sizing: border-box;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: var(--transition-smooth);
}

.comparison-column:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.reality-col {
  border-top: 4px solid var(--color-primary);
  box-shadow: inset 0 4px 20px rgba(6, 182, 212, 0.03), var(--shadow-premium);
}

.government-col {
  border-top: 4px solid var(--color-gov);
  box-shadow: inset 0 4px 20px rgba(16, 185, 129, 0.03), var(--shadow-premium);
}

.candidate-col {
  border-top: 4px solid var(--color-opp);
  box-shadow: inset 0 4px 20px rgba(245, 158, 11, 0.03), var(--shadow-premium);
}

.column-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
}

.column-badge {
  display: inline-block;
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.6rem;
}

.badge-reality {
  background: rgba(6, 182, 212, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge-government {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-gov);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-candidate {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-opp);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.column-title {
  font-family: var(--font-headings);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-active);
  margin-bottom: 0.4rem;
}

.column-meta-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.column-content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  flex: 1;
}

/* Estilos de Contenidos Inyectados */
.panel-subtitle {
  font-family: var(--font-headings);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-active);
}

.panel-paragraph {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.section-subheading {
  font-family: var(--font-headings);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-active);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-top: 0.5rem;
  border-left: 2px solid var(--color-primary);
  padding-left: 0.5rem;
}

/* Métricas en Columna Realidad */
.metrics-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.metric-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.8rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.metric-value-large {
  font-family: var(--font-headings);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-active);
  letter-spacing: -0.01em;
}

.metric-label-small {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.metric-source {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.2rem;
}

.challenges-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.challenges-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.2rem;
  line-height: 1.4;
}

.challenges-list li .bullet {
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 6px;
  height: 6px;
  background-color: var(--color-danger);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--color-danger);
}

/* Columna Gobierno: Promesas y Cajas de Perspectiva */
.promise-box {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--color-gov);
  padding: 0.8rem;
  border-radius: 0 8px 8px 0;
}

.promise-tag {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--color-gov);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.25rem;
}

.promise-text {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.4;
}

.perspective-box {
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border: 1px solid transparent;
}

.pro-gov {
  background: rgba(16, 185, 129, 0.02);
  border-color: rgba(16, 185, 129, 0.1);
}

.anti-gov {
  background: rgba(245, 158, 11, 0.02);
  border-color: rgba(245, 158, 11, 0.1);
}

.perspective-title {
  font-family: var(--font-headings);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pro-gov .perspective-title { color: var(--color-gov); }
.anti-gov .perspective-title { color: var(--color-opp); }

.pro-gov .perspective-title .icon-indicator::before { content: "✓"; }
.anti-gov .perspective-title .icon-indicator::before { content: "⚠"; }

.italic-desc {
  font-style: italic;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.sub-list-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.3rem;
}

.bullets-sub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bullets-sub-list li {
  font-size: 0.78rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 0.8rem;
  line-height: 1.3;
}

.bullets-sub-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.pro-gov .bullets-sub-list li::before { color: var(--color-gov); }
.anti-gov .bullets-sub-list li::before { color: var(--color-opp); }

/* Columna Candidato */
.candidato-badge-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.candidato-avatar-large {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--color-primary), #0891b2);
  color: var(--text-active);
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.candidato-title-name {
  font-family: var(--font-headings);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-active);
}

.candidato-subtitle-party {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.highlight-vision {
  font-style: italic;
  border-left: 2px solid var(--color-primary);
  padding-left: 0.6rem;
}

.actions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.actions-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.4;
}

.actions-list li .number-bullet {
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 14px;
  height: 14px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  display: inline-block;
}

/* ==========================================================================
   6. PESTAÑA TEST DE COINCIDENCIA CIUDADANA (Voter Match)
   ========================================================================== */
.quiz-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

.quiz-survey-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quiz-header-banner {
  background: var(--bg-card);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: var(--shadow-premium);
}

.section-title {
  font-family: var(--font-headings);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-active);
  margin-bottom: 0.5rem;
}

.section-description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Barra de Progreso del Test */
.quiz-progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.quiz-progress-bar {
  background: rgba(255, 255, 255, 0.05);
  height: 6px;
  border-radius: 3px;
  width: 100%;
  overflow: hidden;
}

.quiz-progress-fill {
  background: linear-gradient(90deg, var(--color-primary), var(--color-gov));
  height: 100%;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.quiz-progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  display: block;
}

/* Tarjetas de Preguntas */
.quiz-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.quiz-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
}

.quiz-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.quiz-card.answered {
  border-left: 3px solid var(--color-gov);
}

.quiz-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 0.5rem;
}

.quiz-number {
  font-family: var(--font-headings);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
}

.quiz-category {
  font-family: var(--font-headings);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--text-secondary);
}

.quiz-question-title {
  font-family: var(--font-headings);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-active);
  margin-bottom: 1.2rem;
  line-height: 1.4;
}

/* Retícula de Opciones de Encuesta */
.quiz-options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.quiz-option-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: var(--transition-smooth);
  width: 100%;
}

.quiz-option-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.quiz-option-btn.selected {
  background: rgba(6, 182, 212, 0.08);
  border-color: var(--color-primary);
  color: var(--text-active);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.08);
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.quiz-option-btn.selected .option-letter {
  background: var(--color-primary);
  color: var(--bg-main);
}

.option-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.4;
  flex: 1;
}

/* Sidebar de Resultados del Test (Sticky) */
.quiz-results-sidebar {
  position: sticky;
  top: 90px;
}

.results-card-sticky {
  background: var(--bg-card);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow-premium);
}

.results-sidebar-title {
  font-family: var(--font-headings);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-active);
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.no-results-placeholder {
  text-align: center;
  padding: 3rem 1rem;
}

.no-results-placeholder p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Contenido de Resultados Activos */
.match-summary-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
}

.gob-match-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 80%);
  border: 3px solid var(--color-gov);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--color-gov-glow);
}

.circle-val {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--color-gov);
}

.circle-lbl {
  font-size: 0.55rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
}

.gob-match-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.gob-match-desc strong {
  color: var(--text-active);
}

.candidates-match-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

.match-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.01);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.match-row.top-match {
  background: rgba(6, 182, 212, 0.04);
  border-color: rgba(6, 182, 212, 0.15);
}

.match-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.match-name {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.top-badge {
  font-size: 0.6rem;
  background: var(--color-primary);
  color: var(--bg-main);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
}

.match-party {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.match-bar-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.match-bar-fill {
  height: 6px;
  background: var(--color-primary);
  border-radius: 3px;
  transition: width 0.8s ease-out;
  box-shadow: 0 0 5px var(--color-primary-glow);
}

.match-row:nth-child(2) .match-bar-fill { background: #3b82f6; }
.match-row:nth-child(3) .match-bar-fill { background: #10b981; }

.match-percentage {
  font-family: var(--font-headings);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-active);
  min-width: 32px;
  text-align: right;
}

/* ==========================================================================
   7. PESTAÑA PERFILES & EXPEDIENTES
   ========================================================================== */
.profiles-section-header {
  background: var(--bg-card);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: var(--shadow-premium);
  margin-bottom: 2rem;
}

.profiles-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 2rem;
}

.profile-dossier-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 1.8rem;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: var(--transition-smooth);
}

.profile-dossier-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.profile-card-top {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
}

.profile-avatar-large {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--color-primary), #0369a1);
  color: var(--text-active);
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
  flex-shrink: 0;
}

/* Colorear avatares de los perfiles según id/iniciales */
.profile-dossier-card:nth-child(1) .profile-avatar-large { background: linear-gradient(135deg, #10b981, #064e3b); }
.profile-dossier-card:nth-child(2) .profile-avatar-large { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.profile-dossier-card:nth-child(3) .profile-avatar-large { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.profile-dossier-card:nth-child(4) .profile-avatar-large { background: linear-gradient(135deg, #f59e0b, #b45309); }
.profile-dossier-card:nth-child(5) .profile-avatar-large { background: linear-gradient(135deg, #8b5cf6, #5b21b6); }
.profile-dossier-card:nth-child(6) .profile-avatar-large { background: linear-gradient(135deg, #eab308, #854d0e); }

.profile-main-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.profile-name-title {
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-active);
  line-height: 1.2;
}

.profile-party-subtitle {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.profile-lema {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 0.2rem;
}

/* Indicadores Métricos del Dossier */
.profile-grid-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.profile-metric-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.6rem;
  border-radius: 12px;
  text-align: center;
}

.profile-metric-val {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-active);
}

.profile-metric-lbl {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 0.1rem;
}

/* Acordeones Detallados (Accordion Details) */
.accordion-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.profile-details-acc {
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.profile-details-acc[open] {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.profile-details-acc summary {
  padding: 0.75rem 1rem;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  outline: none;
  user-select: none;
  transition: var(--transition-fast);
}

.profile-details-acc summary::-webkit-details-marker {
  display: none;
}

.profile-details-acc summary::after {
  content: "+";
  font-weight: bold;
  font-size: 1rem;
  color: var(--text-secondary);
}

.profile-details-acc[open] summary::after {
  content: "-";
}

.profile-details-acc summary:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-active);
}

.details-content {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: rgba(0, 0, 0, 0.15);
}

.academic-list, .simple-bullet-list, .curiosities-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.academic-list li, .simple-bullet-list li, .curiosities-list li {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  position: relative;
  padding-left: 0.8rem;
}

.academic-list li::before, .simple-bullet-list li::before, .curiosities-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

.sub-section-title {
  font-family: var(--font-headings);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-top: 0.3rem;
}

/* Timeline para Trayectoria */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-left: 1px dashed rgba(255, 255, 255, 0.1);
  padding-left: 0.8rem;
  margin-left: 0.4rem;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-0.8rem - 4.5px);
  top: 0.25rem;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
}

.timeline-period {
  font-family: var(--font-headings);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-primary);
}

.timeline-body {
  display: flex;
  flex-direction: column;
}

.timeline-role {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.1rem;
}

.timeline-entity {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.timeline-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* Controversias */
.controversy-item {
  background: rgba(244, 63, 94, 0.02);
  border: 1px solid rgba(244, 63, 94, 0.08);
  border-radius: 6px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.controversy-topic {
  font-family: var(--font-headings);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-danger);
}

.controversy-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   8. PIE DE PÁGINA (Footer)
   ========================================================================== */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 9, 19, 0.85);
  padding: 2rem;
  margin-top: auto;
  text-align: center;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-text {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.footer-subtext {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ==========================================================================
   9. ADAPTABILIDAD RESPONSIVE (Media Queries)
   ========================================================================== */

/* Tabletas y Pantallas Medianas */
@media (max-width: 1024px) {
  .versus-layout {
    grid-template-columns: 1fr;
  }
  
  .versus-comparison-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quiz-layout {
    grid-template-columns: 1fr;
  }
  
  .quiz-results-sidebar {
    position: static;
  }
}

/* Teléfonos y Dispositivos Móviles */
@media (max-width: 768px) {
  .app-header {
    padding: 0.6rem 1rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .brand {
    justify-content: center;
  }

  .brand-name {
    font-size: 1.2rem;
  }

  .tab-navigation {
    width: 100%;
    padding: 0.2rem;
    border-radius: 12px;
    justify-content: stretch;
    overflow: hidden;
  }

  .tab-btn {
    flex: 1;
    justify-content: center;
    padding: 0.55rem 0.4rem;
    font-size: 0.72rem;
    gap: 0.25rem;
    border-radius: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .tab-btn .tab-icon {
    flex-shrink: 0;
  }

  /* Mostrar label corto, ocultar completo */
  .tab-label-full {
    display: none;
  }

  .tab-label-short {
    display: inline;
  }

  .app-main {
    padding: 1rem;
  }

  .versus-comparison-grid {
    grid-template-columns: 1fr;
  }
  
  .profiles-grid-layout {
    grid-template-columns: 1fr;
  }

  .summary-metrics-row {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  /* Dropdown de candidatos en mobile: stats debajo del nombre, compactos */
  .candidate-dropdown-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .candidate-dropdown-item .candidate-stats-row {
    display: flex;
    width: 100%;
    gap: 0.3rem;
  }

  .candidate-dropdown-item .stat-badge {
    font-size: 0.62rem;
    padding: 0.15rem 0.35rem;
    flex: 1;
  }

  .candidate-dropdown-item .candidate-header-sm {
    width: 100%;
  }

  /* Dropdown menú: más altura y scroll amigable */
  .dropdown-menu {
    max-height: 60vh;
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    transform: translateY(20px);
    z-index: 300;
    padding: 1rem 0.5rem 2rem;
  }

  .custom-dropdown.open .dropdown-menu {
    transform: translateY(0);
  }

  /* Backdrop oscuro cuando el dropdown está abierto */
  .custom-dropdown.open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 299;
  }

  .dropdown-trigger {
    min-height: 52px;
  }
}
