/* ==========================================================================
   CENTRO DE MANDO ELECTORAL // ANTIOQUIA 2023
   Aesthetics: Military OSINT SITREP Dark Glassmorphism (ConflictRadar360 Inspired)
   Typography: Outfit (Headings, HUD) + Inter (Data, Tables, Controls)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #07090e;
  --bg-secondary: #0d121c;
  --bg-surface: rgba(13, 20, 32, 0.75);
  --bg-surface-elevated: rgba(20, 30, 48, 0.85);
  --bg-surface-hover: rgba(28, 42, 68, 0.9);
  
  /* Borders & Glass Accents */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(6, 182, 212, 0.5);
  --border-glow: rgba(59, 130, 246, 0.35);
  
  /* Tactical Neon Accents */
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-crimson: #ef4444;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-magenta: #ec4899;
  
  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;
  
  /* Fonts */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Geometry */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --header-height: 56px;
  --sidebar-width: 380px;
  --telemetry-width: 440px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Background Starfield Grid Pattern */
body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.03) 0%, transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* App Container */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   TOP COMMAND HUD
   ========================================================================== */
.command-hud {
  height: var(--header-height);
  background: rgba(7, 10, 17, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: relative;
  z-index: 100;
}

.hud-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.radar-logo {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
}

.radar-logo::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radar-ping {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}

.hud-title-group h1 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-title-group h1 span.tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.hud-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Quick Navigation Presets */
.hud-nav-presets {
  display: flex;
  align-items: center;
  gap: 6px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 5px;
}

.preset-btn:hover, .preset-btn.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.hud-telemetry-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.telemetry-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-emerald 2s infinite;
}

@keyframes pulse-emerald {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

/* Viewport Layout */
.main-viewport {
  flex: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr var(--telemetry-width);
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   LEFT DASHBOARD: PARAMETER FILTERS
   ========================================================================== */
.params-sidebar {
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 20;
  position: relative;
}

.params-sidebar::-webkit-scrollbar {
  width: 5px;
}
.params-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.section-header {
  padding: 14px 16px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reset-filters-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.reset-filters-btn:hover {
  color: var(--accent-rose);
}

/* Filter Groups */
.filter-group {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-label .count-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Corporation Pill Buttons */
.corporation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.corp-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.corp-btn .corp-desc {
  font-size: 9px;
  font-weight: 400;
  color: var(--text-muted);
}

.corp-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.corp-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(59, 130, 246, 0.15) 100%);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.25);
}

/* Custom Select & Search Inputs */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon input,
.custom-select {
  width: 100%;
  background: rgba(10, 15, 24, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-sans);
  padding: 8px 10px;
  outline: none;
  transition: all 0.2s;
}

.input-with-icon input:focus,
.custom-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.custom-select option {
  background: #0d121c;
  color: #fff;
}

/* Curul Status Filter Chips */
.curul-status-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.status-chip-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}

.status-chip-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.status-chip-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: #fff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.status-chip-btn.active.failed {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--accent-crimson);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.status-chip-btn .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-chip-btn.active .dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

/* Opposition Law Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-top: 6px;
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toggle-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}

.toggle-sub {
  font-size: 9px;
  color: var(--text-muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* ==========================================================================
   CENTER VIEWPORT: 3D GLOBE & TACTICAL CANVAS
   ========================================================================== */
.globe-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at center, #0a0f1d 0%, #05070c 100%);
}

#globe-canvas-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  cursor: grab;
}

#globe-canvas-container:active {
  cursor: grabbing;
}

/* Tactical Overlay on Globe */
.tactical-hud-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Crosshair Center */
.globe-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border: 1px dashed rgba(6, 182, 212, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.globe-crosshair::before, .globe-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(6, 182, 212, 0.4);
}

.globe-crosshair::before {
  top: 50%; left: -10px; right: -10px; height: 1px;
}
.globe-crosshair::after {
  left: 50%; top: -10px; bottom: -10px; width: 1px;
}

/* Floating Controls (Top & Bottom on Globe) */
.globe-floating-tools {
  position: absolute;
  top: 16px;
  left: 16px;
  pointer-events: auto;
  display: flex;
  gap: 8px;
}

.tool-btn {
  background: rgba(13, 20, 32, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-cyan);
  color: #fff;
}

.tool-btn.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* Legend Floating Bar */
.globe-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  pointer-events: auto;
  background: rgba(10, 15, 24, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.legend-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Floating InfoCard (On Hover / Selection) */
.tactical-infocard {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 320px;
  background: rgba(10, 15, 24, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  padding: 14px;
  pointer-events: auto;
  z-index: 50;
  display: none;
  animation: fadeInCard 0.2s ease-out;
}

@keyframes fadeInCard {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.infocard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.infocard-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.infocard-sub {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.infocard-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
}

.infocard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.infocard-metric {
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.infocard-metric-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.infocard-metric-val {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
}

/* ==========================================================================
   RIGHT TELEMETRY PANEL: CURULES & D'HONDT RESULTS
   ========================================================================== */
.telemetry-sidebar {
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 20;
}

.telemetry-sidebar::-webkit-scrollbar {
  width: 5px;
}
.telemetry-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* KPI Highlights Grid */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.kpi-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.kpi-val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.kpi-sub {
  font-size: 9px;
  color: var(--text-secondary);
}

/* Hemicycle Diagram Box */
.hemicycle-box {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hemicycle-title {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hemicycle-title h3 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #fff;
}

.curules-count-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.hemicycle-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.hemicycle-toggle-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  color: #fff;
  border-color: var(--accent-cyan);
}

#hemicycle-svg-container {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height 0.3s ease, opacity 0.3s ease;
}

.hemicycle-box.compact {
  padding: 8px 14px;
}

.hemicycle-box.compact #hemicycle-svg-container {
  height: 48px;
  opacity: 0.6;
}

.hemicycle-box.compact .party-curules-summary {
  display: none;
}

.seat-node {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s;
}

.seat-node:hover {
  transform: scale(1.4);
  filter: drop-shadow(0 0 6px currentColor);
}

/* Party Seats Allocation Summary */
.party-curules-summary {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.party-badge-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 10px;
}

.party-badge-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.party-badge-pill .pill-count {
  font-weight: 700;
  font-family: var(--font-mono);
}

/* Candidate Table & Results List */
.results-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.results-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.results-header h3 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.candidate-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 8px 12px;
  gap: 6px;
}

.candidate-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s;
}

.candidate-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.candidate-card.elected {
  border-left: 3px solid var(--accent-emerald);
  background: rgba(16, 185, 129, 0.04);
}

.candidate-card.opposition {
  border-left: 3px solid var(--accent-amber);
  background: rgba(245, 158, 11, 0.04);
}

.cand-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cand-name-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cand-number-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
}

.cand-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.curul-tag {
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.curul-tag.elected {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.curul-tag.not-elected {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
}

.cand-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

.cand-party {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cand-party-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.cand-votes-group {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-weight: 600;
}

/* Progress bar for votes share */
.vote-bar-bg {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.vote-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ==========================================================================
   BOTTOM SITREP TICKER (NEWS & EVENTS FEED)
   ========================================================================== */
.sitrep-ticker {
  height: 34px;
  background: rgba(7, 10, 17, 0.95);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  overflow: hidden;
  position: relative;
  z-index: 100;
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 16px;
  white-space: nowrap;
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
  animation: tickerScroll 45s linear infinite;
}

.ticker-content:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.ticker-item strong {
  color: #fff;
}

.ticker-item .tag-badge {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   MODAL / EXPORT DOSSIER DRAWER
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
}

.modal-window {
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  background: #0d121c;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  background: rgba(20, 30, 48, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 16px;
  color: #fff;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  font-family: var(--font-sans);
}

/* Quotient breakdown table */
.quotient-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  font-family: var(--font-mono);
  margin-top: 12px;
}

.quotient-table th, .quotient-table td {
  padding: 6px 10px;
  text-align: right;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.quotient-table th:first-child, .quotient-table td:first-child {
  text-align: left;
}

.quotient-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.quotient-table tr.threshold-passed {
  background: rgba(16, 185, 129, 0.05);
}

.quotient-table tr.threshold-failed {
  background: rgba(239, 68, 68, 0.04);
  opacity: 0.6;
}

.quotient-table td.cifra-cell {
  background: rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
  font-weight: 700;
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   QUICK MUNICIPAL ACCESS STRIP
   ========================================================================== */
.quick-muni-strip {
  height: 40px;
  background: rgba(10, 15, 26, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  position: relative;
  z-index: 95;
  overflow: visible;
}

.quick-muni-label {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.5px;
}

.quick-pulse-icon {
  animation: pulse-icon 1.5s infinite alternate;
}

@keyframes pulse-icon {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--accent-cyan)); }
  100% { transform: scale(1.25); filter: drop-shadow(0 0 6px var(--accent-cyan)); }
}

.quick-muni-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  padding: 2px 0;
}

.quick-muni-chips::-webkit-scrollbar {
  height: 3px;
}
.quick-muni-chips::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.muni-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font-sans);
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.muni-chip:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
}

.muni-chip.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(6, 182, 212, 0.2) 100%);
  border-color: var(--accent-emerald);
  color: #fff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
  font-weight: 600;
}

.quick-search-split {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.quick-muni-search-wrap {
  width: 140px;
}

.quick-muni-search-wrap input {
  width: 100%;
  height: 26px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 11px;
  font-family: var(--font-sans);
  padding: 0 10px;
  outline: none;
  transition: all 0.2s;
}

.quick-muni-search-wrap input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

/* OMNI CANDIDATE SEARCH */
.omni-candidate-search-wrap {
  position: relative;
  width: 280px;
}

.omni-candidate-search-wrap input {
  width: 100%;
  height: 26px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 14px;
  color: #fff;
  font-size: 11px;
  font-family: var(--font-sans);
  padding: 0 12px;
  outline: none;
  transition: all 0.25s ease;
}

.omni-candidate-search-wrap input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.45);
  background: rgba(6, 14, 26, 0.95);
}

.omni-candidate-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 440px;
  max-height: 440px;
  overflow-y: auto;
  background: rgba(8, 14, 24, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 10px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(6, 182, 212, 0.2);
  z-index: 99999;
  animation: dropdownFade 0.2s ease-out;
}

@keyframes dropdownFade {
  0% { opacity: 0; transform: translateY(-4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.candidate-search-header {
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  letter-spacing: 0.8px;
}

.candidate-search-no-results {
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.candidate-search-item {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.15s ease;
}

.candidate-search-item:hover,
.candidate-search-item.selected {
  background: rgba(6, 182, 212, 0.12);
  border-left: 3px solid var(--accent-cyan);
}

.cand-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.cand-corp-tag {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.cand-corp-tag.asamblea {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.cand-corp-tag.concejo {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.cand-corp-tag.gobernador {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.cand-corp-tag.alcalde {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.cand-territory {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-secondary);
}

.cand-status-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
}

.cand-status-pill.elected {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.cand-status-pill.no-elect {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.cand-item-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.cand-num-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
}

.cand-name-text {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
}

mark.search-mark {
  background: rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  font-weight: 800;
  border-radius: 2px;
  padding: 0 2px;
}

.cand-item-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
}

.cand-party-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.cand-party-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cand-votes-detail {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* 3D GLOBE ADAPTIVE LOD CONTROLS */
.globe-lod-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 16, 26, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 6px;
  padding: 2px 6px;
}

.lod-status-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--accent-cyan);
  padding-right: 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.lod-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
  animation: lodPulse 1.5s infinite alternate;
}

@keyframes lodPulse {
  0% { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(1.2); opacity: 1; }
}

.lod-btn-group {
  display: flex;
  gap: 2px;
}

.lod-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lod-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.lod-btn.active {
  color: #fff;
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

/* SEARCH HIGHLIGHT BEACON FOR CANDIDATE ROWS */
.search-focus-highlight {
  animation: searchBeacon 1.2s ease-in-out infinite alternate !important;
  border-left: 4px solid var(--accent-cyan) !important;
}

@keyframes searchBeacon {
  0% { background: rgba(6, 182, 212, 0.15); box-shadow: 0 0 5px rgba(6, 182, 212, 0.3); }
  100% { background: rgba(6, 182, 212, 0.35); box-shadow: 0 0 18px rgba(6, 182, 212, 0.6); }
}

/* ==========================================================================
   ACTIVE FOCUS TACTICAL BANNER
   ========================================================================== */
.active-focus-banner {
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(20, 30, 48, 0.7) 0%, rgba(13, 20, 32, 0.5) 100%);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.focus-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.focus-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.focus-icon {
  font-size: 13px;
}

.focus-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #fff;
}

.focus-seats-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 7px;
  border-radius: 12px;
}

.focus-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
}

.meta-sep {
  color: var(--text-muted);
}

/* ==========================================================================
   TELEMETRY VIEW MODE TABS
   ========================================================================== */
.telemetry-view-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.25);
}

.tab-btn {
  flex: 1;
  padding: 8px 4px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

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

.tab-btn.active {
  color: #fff;
  border-bottom-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
}

.tab-count-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 10px;
  color: var(--text-secondary);
}

.tab-btn.active .tab-count-badge {
  background: rgba(6, 182, 212, 0.25);
  color: var(--accent-cyan);
}

/* View Panels */
.view-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* ==========================================================================
   PARTY BREAKDOWN ACCORDION / GROUPED VIEW
   ========================================================================== */
.party-breakdown-list {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.party-breakdown-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.2s;
}

.party-breakdown-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.party-breakdown-header {
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  user-select: none;
}

.party-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 65%;
}

.party-color-stripe {
  width: 4px;
  height: 28px;
  border-radius: 2px;
  flex-shrink: 0;
}

.party-title-text {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.party-votes-sub {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.party-badges-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.party-seats-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.party-seats-pill.has-seats {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.party-seats-pill.no-seats {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
}

.party-candidates-box {
  padding: 6px 10px 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.2);
}

.party-cand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.015);
  font-size: 11px;
}

.party-cand-row.is-elected {
  background: rgba(16, 185, 129, 0.08);
  border-left: 2px solid var(--accent-emerald);
}

.party-cand-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.party-cand-num {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  width: 22px;
}

.party-cand-name {
  color: #fff;
  font-weight: 500;
}

.party-cand-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.party-cand-votes {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-secondary);
}

/* ==========================================================================
   CONGRESSIONAL STRUCTURE AUDIT PANEL
   ========================================================================== */
.audit-panel-content {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.audit-hero-card {
  background: linear-gradient(135deg, rgba(20, 30, 50, 0.8) 0%, rgba(13, 20, 32, 0.6) 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audit-hero-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

.audit-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.audit-stat-box {
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 8px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.audit-stat-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.audit-stat-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.audit-cand-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.audit-cand-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.audit-cand-title {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.audit-cand-sponsor {
  font-size: 10px;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.audit-verdict-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.audit-verdict-tag.superado {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.audit-verdict-tag.cumplido {
  background: rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.audit-verdict-tag.deficit {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.audit-verdict-tag.inflado {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-crimson);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.audit-cand-body {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.audit-cand-notes {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.35;
}

/* ==========================================================================
   ARBEANTIOQUIA // TACTICAL LOGIN & CINEMATIC INTRO ANIMATION
   ========================================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0c1524 0%, #050811 75%, #020408 100%);
  overflow: hidden;
  font-family: var(--font-body);
}

#login-matrix-canvas,
.login-matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

.login-grid-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 35%, rgba(3, 7, 18, 0.8) 100%);
  z-index: 1;
}

.login-card {
  position: relative;
  z-index: 2;
  width: 92%;
  max-width: 480px;
  margin: auto;
  background: rgba(10, 16, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: 0 0 60px rgba(6, 182, 212, 0.16), 0 25px 50px -12px rgba(0, 0, 0, 0.85), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-card.shake-card {
  animation: shakeCard 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

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

.login-scanner-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(6, 182, 212, 0.9) 50%, transparent 100%);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.8);
  pointer-events: none;
  animation: scanBeam 4s ease-in-out infinite;
  z-index: 3;
}

@keyframes scanBeam {
  0% { top: 0%; opacity: 0; }
  15% { opacity: 0.9; }
  85% { opacity: 0.9; }
  100% { top: 100%; opacity: 0; }
}

.login-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.login-radar-emblem,
.login-emblem {
  position: relative;
  width: 68px;
  height: 68px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emblem-core {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #38bdf8 0%, #0284c7 60%, transparent 100%);
  box-shadow: 0 0 20px #38bdf8, inset 0 0 8px #ffffff;
  animation: pulseCore 2s ease-in-out infinite alternate;
}

@keyframes pulseCore {
  0% { transform: scale(0.85); opacity: 0.75; }
  100% { transform: scale(1.15); opacity: 1; }
}

.emblem-ring-outer {
  position: absolute;
  inset: 0;
  border: 2px dashed rgba(6, 182, 212, 0.6);
  border-radius: 50%;
  animation: spinOuter 10s linear infinite;
}

.emblem-ring-inner {
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(16, 185, 129, 0.45);
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: spinInner 5s linear infinite reverse;
}

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

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

.login-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 0 0 25px rgba(6, 182, 212, 0.6);
  margin-bottom: 6px;
}

.login-subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.login-security-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.2px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-input-group label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.login-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(6, 10, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 12px;
  transition: all 0.25s ease;
}

.login-input-wrapper:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.35);
  background: rgba(8, 14, 26, 0.95);
}

.input-icon {
  font-size: 14px;
  margin-right: 10px;
  opacity: 0.7;
}

.login-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 0;
  letter-spacing: 1.5px;
}

.login-input-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-family: var(--font-mono);
}

.login-error-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fca5a5;
  animation: fadeIn 0.3s ease;
}

.error-icon {
  font-size: 14px;
}

.login-submit-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  margin-top: 6px;
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.4);
  transition: all 0.25s ease;
}

.login-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(6, 182, 212, 0.55);
  filter: brightness(1.1);
}

.login-submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
}

.btn-glow-line {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: btnGlow 3s infinite;
}

@keyframes btnGlow {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.login-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.login-footer-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* CYBERNETIC INTRO SEQUENCE TERMINAL */
.intro-terminal {
  display: flex;
  flex-direction: column;
  background: #030712;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.25);
  animation: terminalExpand 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes terminalExpand {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.intro-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.term-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.term-dot.green { background: #10b981; }
.term-dot.yellow { background: #f59e0b; }
.term-dot.red { background: #ef4444; }

.term-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: #94a3b8;
}

.intro-terminal-body {
  height: 180px;
  padding: 14px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: #34d399;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.05) 0%, transparent 80%);
}

.term-line {
  margin-bottom: 6px;
  opacity: 0.92;
  word-break: break-all;
}

.term-line.highlight {
  color: #38bdf8;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
}

.intro-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  width: 100%;
}

.intro-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  box-shadow: 0 0 10px #06b6d4;
  transition: width 0.2s ease;
}

/* SHOCKWAVE IRIS FLASH */
.login-shockwave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.9) 0%, rgba(6, 182, 212, 0.5) 40%, transparent 80%);
  transform: translate(-50%, -50%);
  animation: shockwaveExpand 0.75s ease-out forwards;
  pointer-events: none;
  z-index: 10;
}

@keyframes shockwaveExpand {
  0% { width: 10px; height: 10px; opacity: 1; }
  100% { width: 300vmax; height: 300vmax; opacity: 0; }
}

/* TOP HUD LOGOUT BUTTON & USER BADGE */
.hud-logout-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hud-logout-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.user-badge {
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.1);
  font-weight: 700;
  letter-spacing: 1px;
}

/* ==========================================================================
   DUAL MODE SWITCHER & ELECTION SELECTOR
   ========================================================================== */
.hud-mode-switcher {
  display: flex;
  background: rgba(13, 18, 28, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.mode-btn.active[data-mode="SITUATIONAL"] {
  background: rgba(6, 182, 212, 0.18);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
}

.mode-btn.active[data-mode="PRECAMPAIGN"] {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid var(--accent-amber);
  color: #fff;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.mode-pulse {
  animation: pulse-glow 1.5s infinite;
  color: var(--accent-amber);
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.hud-election-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 18, 28, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px 8px;
}

.hud-election-selector label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.custom-select-compact {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.custom-select-compact option {
  background: #0d121c;
  color: #fff;
}

.hud-tool-btn {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.hud-tool-btn:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: #a78bfa;
  color: #fff;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.35);
}

/* ==========================================================================
   PRE-CAMPAIGN VIEWPORT (DEMOSARRAKIS SUITE)
   ========================================================================== */
#precampaign-viewport {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(7, 9, 14, 0.94);
  backdrop-filter: blur(20px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.25s ease-out;
}

.precamp-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(13, 18, 28, 0.85);
}

.precamp-tabs-group {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.precamp-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
}

.precamp-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.precamp-tab-btn.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--accent-amber);
  color: #fff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.precamp-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* DEFCON Alert Controls */
.defcon-control-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.defcon-control-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
}

.defcon-btn-pills {
  display: flex;
  gap: 3px;
}

.defcon-pill {
  width: 20px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  transition: all 0.15s;
}

.defcon-pill[data-level="1"].active {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 10px #ef4444;
  animation: pulse-glow 1s infinite;
}
.defcon-pill[data-level="2"].active { background: #f97316; color: #fff; box-shadow: 0 0 8px #f97316; }
.defcon-pill[data-level="3"].active { background: #f59e0b; color: #fff; box-shadow: 0 0 8px #f59e0b; }
.defcon-pill[data-level="4"].active { background: #10b981; color: #fff; box-shadow: 0 0 8px #10b981; }
.defcon-pill[data-level="5"].active { background: #3b82f6; color: #fff; box-shadow: 0 0 8px #3b82f6; }

/* Pre-campaign Main Content Area */
.precamp-content-area {
  flex: 1;
  padding: 16px 24px;
  overflow-y: auto;
}

.precamp-panel {
  display: none;
  animation: fadeIn 0.2s ease-in;
}

.precamp-panel.active {
  display: block;
}

/* War Room Grid Layout */
.warroom-directors-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.director-nav-btn {
  flex: 1;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.director-nav-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.director-nav-btn.active {
  background: rgba(30, 58, 138, 0.4);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}

.dir-role-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.dir-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 2px 0;
}

.dir-desc {
  font-size: 10.5px;
  color: var(--text-muted);
}

.warroom-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.warroom-card {
  background: rgba(13, 20, 32, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  backdrop-filter: blur(16px);
}

.warroom-card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

/* Psychometric & Sentiment bars */
.ocean-trait-row {
  margin-bottom: 10px;
}
.ocean-label-split {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  margin-bottom: 3px;
}
.ocean-progress-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.ocean-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 3px;
}

.plutchik-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.plutchik-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  text-align: center;
}
.plutchik-cell-name {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.plutchik-cell-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

/* Wargame Red vs Blue */
.wargame-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 16px;
}
.wargame-side {
  padding: 12px;
  border-radius: var(--radius-sm);
}
.wargame-side.red {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.wargame-side.blue {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Threat Radar Table */
.tactical-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.tactical-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.tactical-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Elasticity Gauges */
.elasticity-card-box {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}
.elasticity-kpi {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  padding: 14px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-subtle);
}
.elasticity-kpi-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 4px 0;
}

/* Pre-campaign Action Button */
.precamp-primary-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #000;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
  transition: all 0.2s;
}
.precamp-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}


