/* ============================================================
   PUEBLO VIGILANTE — Design System
   Plataforma Anticorrupción Electoral Colombia 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;500;600;700;800;900&family=Bebas+Neue&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Colombian Flag Colors */
  --col-yellow: #FFA800;
  --col-blue: #2839BD;
  --col-red: #FF4404;

  /* Brand Palette - Iván Cepeda Campaign Theme */
  --primary: #632289;
  --primary-dark: #47126b;
  --primary-light: #8a4f9e;
  --accent: #FF4404;
  --accent-dark: #CC3300;
  --blue: #2839BD;
  --blue-light: #4e5ed6;

  /* Backgrounds - Warm Cream Theme */
  --bg-base: #FDFBF7;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F7F4EB;
  --bg-glass: rgba(99, 34, 137, 0.03);
  --bg-glass-hover: rgba(99, 34, 137, 0.06);

  /* Text */
  --text-primary: #1A1A1A;
  --text-secondary: #4A4A4A;
  --text-muted: #7A7A7A;
  --text-accent: var(--accent);

  /* Borders */
  --border: rgba(0, 0, 0, 0.08);
  --border-accent: rgba(255, 68, 4, 0.2);
  --border-red: rgba(99, 34, 137, 0.2);

  /* Gradients */
  --grad-hero: linear-gradient(135deg, #FDFBF7 0%, #F5F1E8 100%);
  --grad-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  --grad-accent: linear-gradient(135deg, var(--accent) 0%, #FFA800 100%);
  --grad-flag: linear-gradient(90deg, var(--col-yellow) 0%, var(--col-blue) 50%, var(--col-red) 100%);
  --grad-card: linear-gradient(135deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.03) 100%);

  /* Shadows - Adjusted for Light Warm Theme */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.1);
  --shadow-red: 0 0 40px rgba(99, 34, 137, 0.05);
  --shadow-yellow: 0 0 40px rgba(255, 68, 4, 0.08);
  --glow-red: 0 0 20px rgba(99, 34, 137, 0.15);
  --glow-yellow: 0 0 20px rgba(255, 68, 4, 0.15);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.6s ease;

  /* Typography */
  --font-body: 'Nunito Sans', -apple-system, sans-serif;
  --font-heading: 'Nunito Sans', sans-serif;
  --font-display: 'Bebas Neue', 'Nunito Sans', sans-serif;

  /* Z-index */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* ── Background Noise Texture ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
}

.display-title {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

img { max-width: 100%; }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  padding: var(--space-4) 0;
  transition: background var(--transition-base), backdrop-filter var(--transition-base);
}

.navbar.scrolled {
  background: rgba(253, 251, 247, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
}

.navbar-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: var(--grad-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--glow-red);
}

.navbar-logo .logo-text span {
  color: var(--accent);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}

.navbar-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.navbar-links a:hover { color: var(--text-primary); }
.navbar-links a:hover::after { width: 100%; }
.navbar-links a.active { color: var(--accent); }

.navbar-cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.navbar-live {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  background: rgba(232, 25, 44, 0.1);
  border: 1px solid rgba(232, 25, 44, 0.3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--primary-light);
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-2);
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before { left: 100%; }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(232, 25, 44, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232, 25, 44, 0.6);
}

.btn-accent {
  background: var(--grad-accent);
  color: #000;
  box-shadow: 0 4px 20px rgba(252, 209, 22, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(252, 209, 22, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: 1rem;
  border-radius: var(--radius-full);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: 0.8rem;
}

.btn-icon {
  padding: var(--space-3);
  border-radius: var(--radius-full);
  aspect-ratio: 1;
}

/* ── Cards ── */
.card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-glow-red {
  border-color: var(--border-red);
  box-shadow: 0 0 30px rgba(232, 25, 44, 0.08);
}

.card-glow-yellow {
  border-color: var(--border-accent);
  box-shadow: 0 0 30px rgba(252, 209, 22, 0.08);
}

.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ── Flag Bar ── */
.flag-bar {
  height: 4px;
  background: var(--grad-flag);
  width: 100%;
}

/* ── Section Styles ── */
.section {
  padding: var(--space-24) 0;
  position: relative;
}

.section-sm {
  padding: var(--space-16) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: rgba(252, 209, 22, 0.1);
  border: 1px solid rgba(252, 209, 22, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-4);
}

.section-title .highlight {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.stat-card {
  text-align: center;
  padding: var(--space-6);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: rgba(252, 209, 22, 0.3);
  transform: translateY(-4px);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(135deg, var(--accent), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Forms ── */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.form-label .required {
  color: var(--primary);
  margin-left: var(--space-1);
}

.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-base);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  background: rgba(252, 209, 22, 0.05);
  box-shadow: 0 0 0 3px rgba(252, 209, 22, 0.1);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A8A8C8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-2);
}

.form-error {
  font-size: 0.8rem;
  color: var(--primary-light);
  margin-top: var(--space-2);
  display: none;
}

.form-error.show { display: block; }

/* ── Wizard Steps ── */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-12);
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  position: relative;
}

.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.wizard-step.completed:not(:last-child)::after {
  background: var(--accent);
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-base);
  position: relative;
  z-index: 1;
  transition: all var(--transition-base);
}

.wizard-step.active .step-circle {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 4px rgba(252, 209, 22, 0.15);
}

.wizard-step.completed .step-circle {
  border-color: var(--accent);
  background: var(--accent);
  color: #000;
}

.step-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.wizard-step.active .step-label { color: var(--accent); }

/* ── Badges & Tags ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-red {
  background: rgba(232, 25, 44, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(232, 25, 44, 0.3);
}

.badge-yellow {
  background: rgba(252, 209, 22, 0.15);
  color: var(--accent-dark);
  border: 1px solid rgba(252, 209, 22, 0.3);
}

.badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-blue {
  background: rgba(59, 95, 201, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 95, 201, 0.3);
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: var(--space-8);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-8);
}

.timeline-dot {
  position: absolute;
  left: -25px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-base);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-dot.yellow {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

/* ── Alert / Notice Boxes ── */
.alert {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  border-left: 4px solid;
  margin-bottom: var(--space-4);
}

.alert-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }

.alert-warning {
  background: rgba(252, 209, 22, 0.08);
  border-color: var(--accent);
  color: var(--text-primary);
}

.alert-danger {
  background: rgba(232, 25, 44, 0.08);
  border-color: var(--primary);
  color: var(--text-primary);
}

.alert-info {
  background: rgba(59, 95, 201, 0.08);
  border-color: var(--blue-light);
  color: var(--text-primary);
}

.alert-success {
  background: rgba(34, 197, 94, 0.08);
  border-color: #4ade80;
  color: var(--text-primary);
}

/* ── Telegram Chat UI ── */
.tg-chat {
  background: #0E1621;
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: -apple-system, 'Segoe UI', sans-serif;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.08);
}

.tg-header {
  background: #17212B;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tg-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #CE1126, #FCD116);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.tg-info { flex: 1; }

.tg-botname {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.tg-status {
  font-size: 0.75rem;
  color: #4ade80;
}

.tg-messages {
  padding: 16px;
  min-height: 420px;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #0E1621;
}

.tg-messages::-webkit-scrollbar { width: 4px; }
.tg-messages::-webkit-scrollbar-track { background: transparent; }
.tg-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.tg-msg {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.45;
  animation: msgAppear 0.3s ease;
  position: relative;
}

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

.tg-msg-bot {
  background: #182533;
  color: #E8E8F0;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.tg-msg-user {
  background: #2B5278;
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.tg-msg-time {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  text-align: right;
  margin-top: 4px;
}

.tg-keyboard {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.tg-btn {
  background: #1E3A5F;
  color: #4DB6FF;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-family: inherit;
}

.tg-btn:hover {
  background: #2B5278;
  transform: scale(0.98);
}

.tg-btn:active { transform: scale(0.96); }

.tg-input-area {
  background: #17212B;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.tg-input {
  flex: 1;
  background: #242F3D;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  color: #fff;
  font-size: 0.875rem;
  outline: none;
  font-family: inherit;
}

.tg-input::placeholder { color: rgba(255,255,255,0.3); }

.tg-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2B5278;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4DB6FF;
  font-size: 1rem;
  transition: all 0.2s;
}

.tg-send:hover { background: #4DB6FF; color: #fff; }

/* ── Map Container ── */
#map {
  width: 100%;
  height: 600px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-legend {
  position: absolute;
  bottom: 30px;
  right: 10px;
  z-index: 1000;
  background: rgba(13, 13, 31, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  min-width: 180px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Admin Panel ── */
.admin-sidebar {
  width: 260px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
  z-index: var(--z-sticky);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.admin-content {
  margin-left: 260px;
  min-height: 100vh;
  padding: var(--space-8);
}

.sidebar-logo {
  padding: var(--space-4) 0 var(--space-6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-4);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-nav-item:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: rgba(232, 25, 44, 0.1);
  color: var(--primary-light);
  border: 1px solid rgba(232, 25, 44, 0.2);
}

.sidebar-nav-item .nav-icon { font-size: 1.1rem; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: var(--space-4);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.data-table tr:last-child td { border-bottom: none; }

/* ── Countdown ── */
.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.countdown-item {
  text-align: center;
  min-width: 80px;
}

.countdown-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 1;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.countdown-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.countdown-sep {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--text-muted);
  margin-top: -16px;
}

/* ── Toast Notification ── */
.toast-container {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  max-width: 400px;
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toastIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.hide {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
  to { transform: translateX(120%); opacity: 0; }
}

.toast-icon { font-size: 1.4rem; }
.toast-content { flex: 1; }
.toast-title { font-weight: 700; font-size: 0.9rem; }
.toast-msg { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }

.toast-red { border-left: 4px solid var(--primary); }
.toast-yellow { border-left: 4px solid var(--accent); }
.toast-green { border-left: 4px solid #4ade80; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 560px;
  width: 100%;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-base);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: rgba(232, 25, 44, 0.2);
  color: var(--primary-light);
  border-color: var(--primary);
}

/* ── Page Hero ── */
.page-hero {
  padding: calc(80px + var(--space-16)) 0 var(--space-16);
  text-align: center;
}

.page-hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: var(--space-4);
}

/* ── File Upload ── */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.file-upload:hover,
.file-upload.dragover {
  border-color: var(--accent);
  background: rgba(252, 209, 22, 0.04);
}

.file-upload-icon { font-size: 2.5rem; margin-bottom: var(--space-3); }
.file-upload-text { color: var(--text-secondary); font-size: 0.875rem; }
.file-upload-text span { color: var(--accent); cursor: pointer; }

/* ── Progress Bar ── */
.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* ── Typing Indicator ── */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 14px;
  background: #182533;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.typing-dot {
  width: 7px;
  height: 7px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  animation: typingBounce 1.2s ease infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* ── Map Filter Pills ── */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.filter-pill {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.filter-pill:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text-primary);
}

.filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Quiz ── */
.quiz-option {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: var(--space-3);
}

.quiz-option:hover {
  border-color: rgba(255,255,255,0.2);
  background: var(--bg-glass);
}

.quiz-option.correct {
  border-color: #4ade80;
  background: rgba(34, 197, 94, 0.08);
}

.quiz-option.incorrect {
  border-color: var(--primary);
  background: rgba(232, 25, 44, 0.08);
}

.quiz-letter {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.quiz-option:hover .quiz-letter,
.quiz-option.correct .quiz-letter { border-color: #4ade80; color: #4ade80; }
.quiz-option.incorrect .quiz-letter { border-color: var(--primary); color: var(--primary-light); }

/* ── Footer ── */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
  margin: var(--space-4) 0 var(--space-6);
  max-width: 320px;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.social-links {
  display: flex;
  gap: var(--space-3);
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.social-link:hover {
  background: rgba(252, 209, 22, 0.1);
  border-color: var(--accent);
}

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

/* ── Selection ── */
::selection {
  background: rgba(252, 209, 22, 0.3);
  color: #fff;
}

/* ── Utility Classes ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary-color { color: var(--primary-light); }
.text-accent-color { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-green { color: #4ade80; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-6); }

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

.w-full { width: 100%; }
.relative { position: relative; }
.hidden { display: none; }

.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-6) 0;
}

.glow-text-red {
  text-shadow: 0 0 30px rgba(232, 25, 44, 0.6);
}

.glow-text-yellow {
  text-shadow: 0 0 30px rgba(252, 209, 22, 0.6);
}

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.overflow-hidden { overflow: hidden; }

/* ── Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.pulse-slow {
  animation: pulseSlow 3s ease-in-out infinite;
}

@keyframes pulseSlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.float {
  animation: float 4s ease-in-out infinite;
}

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

.spin-slow {
  animation: spinSlow 20s linear infinite;
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-content { margin-left: 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .navbar-cta { display: none; }
  .hamburger { display: flex; }
  .navbar-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(253, 251, 247, 0.97);
    backdrop-filter: blur(20px);
    padding: var(--space-6);
    border-bottom: 1px solid var(--border);
    gap: var(--space-4);
    z-index: var(--z-sticky);
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .wizard-steps { gap: 0; }
  .countdown-grid { gap: var(--space-3); }
  .toast-container { left: var(--space-4); right: var(--space-4); }
  .toast { min-width: unset; }
  #map { height: 400px; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
  .section { padding: var(--space-16) 0; }
  .btn-lg { padding: var(--space-3) var(--space-6); font-size: 0.9rem; }
  .countdown-number { font-size: 2.5rem; }
}
