/* ===================================================
   VotoDigital.es — Design System
   Fresh, elegant & trustworthy palette
   =================================================== */

/* ---- TOKENS ---- */
:root {
  /* Primary: deep sapphire */
  --primary-50:  #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-900: #1e1b4b;

  /* Accent: emerald */
  --accent-400:  #34d399;
  --accent-500:  #10b981;
  --accent-600:  #059669;

  /* Neutrals */
  --bg:          #f8f9fc;
  --bg-card:     #ffffff;
  --bg-glass:    rgba(255,255,255,0.75);
  --border:      #e2e8f0;
  --border-subtle: rgba(100,116,139,0.12);
  --text:        #0f172a;
  --text-muted:  #64748b;
  --text-light:  #94a3b8;

  /* Votes */
  --si-color:      #0ea5e9;
  --si-light:      #e0f2fe;
  --no-color:      #f43f5e;
  --no-light:      #ffe4e6;
  --blanco-color:  #8b5cf6;
  --blanco-light:  #ede9fe;

  /* Status */
  --open-color:   #059669;
  --open-bg:      #d1fae5;
  --closed-color: #b91c1c;
  --closed-bg:    #fee2e2;
  --pending-color:#92400e;
  --pending-bg:   #fef3c7;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl:  0 24px 64px rgba(0,0,0,0.16);

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Transitions */
  --t-fast: 150ms ease;
  --t-mid:  250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===================== NAVBAR ===================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow var(--t-mid);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-600);
  letter-spacing: -0.02em;
  transition: opacity var(--t-fast);
}
.logo:hover { opacity: 0.85; }
.logo-icon { font-size: 1.1rem; }
.logo-dot { color: var(--accent-500); }

.nav-links { display: flex; gap: 0.25rem; margin-left: auto; }
.nav-link {
  padding: 0.4rem 1rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--t-fast);
}
.nav-link:hover, .nav-link.active {
  color: var(--primary-600);
  background: var(--primary-50);
}

.btn-admin {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: white;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.btn-admin:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
  background: var(--primary-50);
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 70%, #3730a3 100%);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: white;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(135deg, #34d399, #6ee7b7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: rgba(255,255,255,0.72);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(8px);
  border-radius: var(--r-md);
  padding: 0.9rem 1.6rem;
  min-width: 110px;
  transition: transform var(--t-mid);
}
.stat-chip:hover { transform: translateY(-2px); }

.stat-num {
  font-size: 1.7rem;
  font-weight: 800;
  color: white;
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.3rem;
}

/* Orbs */
.hero-decoration { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}
.orb-1 { width: 400px; height: 400px; background: #818cf8; top: -100px; left: -80px; animation: orb-float 8s ease-in-out infinite; }
.orb-2 { width: 300px; height: 300px; background: #34d399; bottom: -80px; right: -40px; animation: orb-float 10s ease-in-out infinite reverse; }
.orb-3 { width: 200px; height: 200px; background: #f472b6; top: 50%; left: 50%; transform: translate(-50%,-50%); animation: orb-float 6s ease-in-out infinite; }

@keyframes orb-float {
  0%,100% { transform: translate(0,0); }
  33% { transform: translate(20px,-15px); }
  66% { transform: translate(-15px,10px); }
}

/* ===================== FILTER BAR ===================== */
.filter-bar {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 90;
}

.filter-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group { display: flex; gap: 0.25rem; }

.filter-btn {
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: white;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
}
.filter-btn:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
}
.filter-btn.active {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: white;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.4rem 0.9rem;
  flex: 1;
  max-width: 320px;
  transition: border-color var(--t-fast);
}
.search-box:focus-within { border-color: var(--primary-500); }
.search-icon { color: var(--text-light); flex-shrink: 0; }
.search-input {
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  outline: none;
  width: 100%;
}
.search-input::placeholder { color: var(--text-light); }

/* ===================== MAIN / BENTO ===================== */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

/* ---- Poll Card ---- */
.poll-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-mid);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: card-enter 0.35s ease forwards;
  opacity: 0;
  transform: translateY(16px);
}
@keyframes card-enter {
  to { opacity: 1; transform: translateY(0); }
}

.poll-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
  opacity: 0;
  transition: opacity var(--t-mid);
}
.poll-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-200);
}
.poll-card:hover::before { opacity: 1; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.card-category {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-600);
  background: var(--primary-50);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.card-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.card-status.open { background: var(--open-bg); color: var(--open-color); }
.card-status.closed { background: var(--closed-bg); color: var(--closed-color); }
.card-status.pending { background: var(--pending-bg); color: var(--pending-color); }

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.card-status.open .status-dot { animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.5; transform:scale(1.4); }
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.card-excerpt {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mini vote bar on card */
.card-mini-results {
  display: flex;
  gap: 4px;
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border);
}
.mini-bar { height: 100%; transition: width 0.6s ease; min-width: 0; }
.mini-bar.si     { background: var(--si-color); }
.mini-bar.no     { background: var(--no-color); }
.mini-bar.blanco { background: var(--blanco-color); }

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
}

.card-date {
  font-size: 0.75rem;
  color: var(--text-light);
  display: flex; align-items: center; gap: 0.3rem;
}

.card-votes {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* ---- Voted badge on card ---- */
.card-voted-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--primary-600);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ===================== LOADER ===================== */
.loader-sentinel { padding: 2.5rem; text-align: center; }

.loader-dots {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}
.loader-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary-500);
  animation: dot-bounce 1.2s ease-in-out infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-bounce {
  0%,100% { transform: translateY(0); opacity: 0.4; }
  50%      { transform: translateY(-8px); opacity: 1; }
}

.end-message {
  font-size: 0.9rem;
  color: var(--text-light);
  display: flex; align-items: center; gap: 0.5rem;
  justify-content: center;
}

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: overlay-in 0.2s ease;
  overflow-y: auto;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  background: white;
  border-radius: var(--r-xl);
  padding: 2.25rem;
  max-width: 620px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: modal-slide-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
@keyframes modal-slide-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
  line-height: 1;
}
.modal-close:hover { background: var(--bg); color: var(--text); border-color: var(--text-muted); }

.modal-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}
.modal-status-badge.open { background: var(--open-bg); color: var(--open-color); }
.modal-status-badge.closed { background: var(--closed-bg); color: var(--closed-color); }
.modal-status-badge.pending { background: var(--pending-bg); color: var(--pending-color); }

.modal-category {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-600);
  background: var(--primary-50);
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.modal-article {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-dates {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.date-chip {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-sm);
}
.date-separator { color: var(--text-light); font-size: 0.9rem; }

/* ---- VOTE SECTION ---- */
.vote-section { margin-bottom: 1.5rem; }
.vote-prompt {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.vote-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.1rem 0.5rem;
  border-radius: var(--r-md);
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all var(--t-mid);
  position: relative;
  overflow: hidden;
}
.vote-btn::after {
  content: '';
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.vote-btn:hover::after { opacity: 0.06; }

.vote-icon { font-size: 1.5rem; }
.vote-label { font-size: 0.85rem; font-weight: 600; }

.vote-si:hover, .vote-si:focus {
  border-color: var(--si-color);
  background: var(--si-light);
  color: #0369a1;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14,165,233,0.2);
}
.vote-no:hover, .vote-no:focus {
  border-color: var(--no-color);
  background: var(--no-light);
  color: #be123c;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(244,63,94,0.2);
}
.vote-blanco:hover, .vote-blanco:focus {
  border-color: var(--blanco-color);
  background: var(--blanco-light);
  color: #6d28d9;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139,92,246,0.2);
}

.vote-btn:active { transform: scale(0.97); }

/* ---- VOTED NOTICE ---- */
.voted-notice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  color: var(--primary-700);
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* ---- RESULTS ---- */
.results-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.results-title, .locations-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.results-bars { display: flex; flex-direction: column; gap: 0.75rem; }

.result-row { display: flex; flex-direction: column; gap: 0.3rem; }
.result-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.result-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  display: flex; align-items: center; gap: 0.4rem;
}
.result-pct {
  font-size: 0.82rem;
  font-weight: 700;
}

.result-track {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.result-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}
.result-fill.si     { background: linear-gradient(90deg, var(--si-color), #38bdf8); }
.result-fill.no     { background: linear-gradient(90deg, var(--no-color), #fb7185); }
.result-fill.blanco { background: linear-gradient(90deg, var(--blanco-color), #a78bfa); }

.results-total {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ---- LOCATIONS ---- */
.top3-label {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-light);
}

.countries-list { display: flex; flex-direction: column; gap: 0.6rem; }

.country-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.country-rank {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.country-flag { font-size: 1.1rem; }
.country-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.country-pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-600);
}
.country-track {
  width: 80px;
  height: 5px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.country-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
  border-radius: 999px;
  transition: width 0.7s ease;
}

.no-location-note {
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
}

/* ===================== ADMIN MODAL ===================== */
.admin-modal { max-width: 640px; }

.admin-form { display: flex; flex-direction: column; gap: 1.1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.form-input {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  width: 100%;
}
.form-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
  background: white;
}
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.65rem 0.9rem;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 500;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.btn-primary {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: white;
  border: none;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-700), #3730a3);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79,70,229,0.4);
}
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  padding: 0.65rem 1.2rem;
  background: white;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--t-fast);
}
.btn-secondary:hover { border-color: var(--text-muted); color: var(--text); }

/* ===================== TOAST ===================== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  pointer-events: none;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: #065f46; }
.toast.error   { background: #7f1d1d; }
.toast.info    { background: var(--primary-700); }

/* ===================== EMPTY STATE ===================== */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.empty-state p { font-size: 0.85rem; }

/* ===================== FOOTER ===================== */
.footer {
  background: var(--primary-900);
  color: rgba(255,255,255,0.6);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.footer-inner { max-width: 640px; margin: 0 auto; }

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.footer-desc {
  font-size: 0.82rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.footer-copy { font-size: 0.75rem; opacity: 0.5; }

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 640px) {
  .hero { padding: 3rem 1rem 2.5rem; }
  .vote-options { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .vote-btn { padding: 0.85rem 0.25rem; }
  .form-row { grid-template-columns: 1fr; }
  .bento-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 1.5rem; }
}

@media (min-width: 900px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  /* Featured first card */
  .poll-card:first-child {
    grid-column: span 2;
  }
}

@media (min-width: 1100px) {
  .bento-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .poll-card:first-child {
    grid-column: span 2;
  }
  .poll-card:nth-child(5) {
    grid-column: span 2;
  }
}

/* Focus visible for a11y */
:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* ============================================================
   LOGIN MODAL
   ============================================================ */
.login-modal,
.denied-modal {
  max-width: 420px;
  text-align: center;
}

.login-icon,
.denied-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  display: block;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

.denied-msg {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* Password field wrapper */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper .form-input {
  padding-right: 2.8rem;
  width: 100%;
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--primary-600);
}

/* Denied modal — red accent */
.denied-modal .denied-icon {
  filter: grayscale(0);
}

.denied-modal .modal-title {
  color: var(--no-color);
}
