/* ============================================================
   1. RESET
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

ul,
li {
  list-style: none;
}

input,
select {
  font: inherit;
}

::selection {
  background: rgba(124, 58, 237, .25);
}

/* ============================================================
   2. VARIABLES
   ============================================================ */
:root {
  --purple-deep: #6D28D9;
  --purple-accent: #7C3AED;
  --indigo: #8B5CF6;

  --bg: #F8FAFC;
  --card-glass: rgba(255, 255, 255, .55);
  --card-glass-strong: rgba(255, 255, 255, .74);
  --glass-border: rgba(255, 255, 255, .6);

  --heading: #111827;
  --body: #6B7280;

  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-sm: 0 2px 8px rgba(17, 24, 39, .04);
  --shadow-md: 0 8px 24px rgba(109, 40, 217, .08);
  --shadow-lg: 0 20px 60px rgba(109, 40, 217, .16);
  --shadow-glow: 0 0 0 1px rgba(124, 58, 237, .1), 0 12px 32px rgba(124, 58, 237, .22);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --sidebar-w: 272px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   3. LAYOUT / BACKGROUND
   ============================================================ */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  will-change: transform;
}

.orb--1 {
  width: 620px;
  height: 620px;
  background: radial-gradient(circle at 30% 30%, #A78BFA, transparent 70%);
  top: -180px;
  left: -120px;
  animation: drift1 26s ease-in-out infinite;
}

.orb--2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 60% 40%, #818CF8, transparent 70%);
  top: 30%;
  right: -160px;
  animation: drift2 30s ease-in-out infinite;
}

.orb--3 {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle at 50% 50%, #C4B5FD, transparent 70%);
  bottom: -160px;
  left: 30%;
  animation: drift1 34s ease-in-out infinite reverse;
}

@keyframes drift1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(40px, -30px) scale(1.06);
  }
}

@keyframes drift2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-50px, 20px) scale(1.08);
  }
}

.noise {
  position: absolute;
  inset: 0;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(139, 92, 246, .4);
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-100vh) translateX(20px);
    opacity: 0;
  }
}

.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

.content-home {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
}

.content {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  padding: 32px clamp(20px, 4vw, 56px) 140px;
}

.content-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ============================================================
   4. SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, .5);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-right: 1px solid var(--glass-border);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 28px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple-deep), var(--indigo));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.02em;
  color: var(--heading);
}

.brand-name span {
  color: var(--purple-accent);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--body);
  transition: background .25s var(--ease), color .25s var(--ease), transform .2s var(--ease);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: .8;
}

.nav-item:hover {
  background: rgba(124, 58, 237, .08);
  color: var(--heading);
  transform: translateX(2px);
}

.nav-item:focus-visible {
  outline: 2px solid var(--purple-accent);
  outline-offset: 2px;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, .12), rgba(139, 92, 246, .08));
  color: var(--purple-deep);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--purple-deep), var(--indigo));
}

.sidebar-footer {
  margin-top: auto;
}

.main-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  background: var(--card-glass);
  background-image: linear-gradient(180deg, rgba(20, 10, 50, .35) 0%, rgba(20, 10, 50, .55) 60%, rgba(15, 8, 40, .72) 100%), url(../img/background_main.png);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.security-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--card-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.security-card svg {
  width: 18px;
  height: 18px;
  color: var(--purple-accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.security-card strong {
  display: block;
  font-size: 12.5px;
  color: var(--heading);
  font-weight: 600;
}

.security-card p {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--body);
  margin-top: 2px;
}

/* ============================================================
   5. HERO
   ============================================================ */
.hero {
  position: relative;
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 48px);
  background-image:
    linear-gradient(180deg, rgba(20, 10, 50, .35) 0%, rgba(20, 10, 50, .55) 60%, rgba(15, 8, 40, .72) 100%),
    url('../img/background_main.png');
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

/* Deep-space orb decoration layer (matches reference art direction) */
.hero-decor {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero-sparkle {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, .9);
  animation: twinkle 3.5s ease-in-out infinite;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: .3;
  }

  50% {
    opacity: 1;
  }
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
}

.status-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .6);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, .55);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

.hero-dates {
  color: rgba(255, 255, 255, .75);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .02em;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -.03em;
  line-height: 1.1;
}

.hero-subtitle {
  color: rgba(255, 255, 255, .8);
  font-size: 15.5px;
  font-weight: 400;
}

.countdown {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.countdown-unit {
  min-width: 74px;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(10px);
}

.countdown-unit strong {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.countdown-unit span {
  font-size: 10.5px;
  color: rgba(255, 255, 255, .7);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero-progress {
  width: 100%;
  max-width: 720px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

.hero-progress-info {
  flex: 1;
  text-align: left;
}

.hero-progress-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--heading);
}

.hero-progress-label svg {
  width: 15px;
  height: 15px;
  color: var(--purple-accent);
}

.hero-progress-sub {
  font-size: 12px;
  color: var(--body);
  margin-top: 3px;
}

.hero-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #EDE9FE;
  overflow: hidden;
  margin-top: 8px;
}

.hero-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple-deep), var(--indigo));
  transition: width .6s var(--ease);
}

.progress-ring-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.progress-ring-wrap svg {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: #EDE9FE;
  stroke-width: 5;
}

.progress-ring-fg {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset .6s var(--ease);
}

.progress-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-deep);
  font-family: var(--font-display);
}

/* ============================================================
   6. TOOLBAR / NOTICE
   ============================================================ */
.notice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--card-glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
}

.notice-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--heading);
  font-weight: 500;
}

.notice-left svg {
  width: 17px;
  height: 17px;
  color: var(--purple-accent);
  flex-shrink: 0;
}

.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(17, 24, 39, .08);
  font-size: 13px;
  font-weight: 600;
  color: var(--heading);
  transition: all .2s var(--ease);
}

.btn-ghost-sm:hover {
  background: #fff;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-ghost-sm svg {
  width: 15px;
  height: 15px;
}

/* ============================================================
   7. BALLOT SECTIONS
   ============================================================ */
.ballot-section {
  border-radius: var(--radius-lg);
  background: var(--card-glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .3s var(--ease);
}

.ballot-section.is-open {
  box-shadow: var(--shadow-md);
}

.section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  text-align: left;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.section-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .12), rgba(139, 92, 246, .08));
  flex-shrink: 0;
}

.section-titles {
  min-width: 0;
}

.section-titles h2 {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -.01em;
}

.section-titles p {
  font-size: 12.5px;
  color: var(--body);
  margin-top: 2px;
}

.section-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.section-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--body);
  white-space: nowrap;
}

.section-status svg {
  width: 15px;
  height: 15px;
}

.section-status.done {
  color: var(--success);
}

.chevron {
  width: 18px;
  height: 18px;
  color: var(--body);
  transition: transform .3s var(--ease);
  flex-shrink: 0;
}

.ballot-section.is-open .chevron {
  transform: rotate(180deg);
}

.section-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease);
}

.ballot-section.is-open .section-body {
  grid-template-rows: 1fr;
}

.section-body-inner {
  overflow: hidden;
}

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 4px 24px 28px;
}

/* ============================================================
   8. CANDIDATE CARD
   ============================================================ */
.candidate-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 20px 20px;
  border-radius: var(--radius-lg);
  background: var(--card-glass-strong);
  border: 1.5px solid rgba(17, 24, 39, .06);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}

.candidate-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.candidate-card.selected {
  border-color: rgba(124, 58, 237, .5);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px) scale(1.015);
}

.avatar-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin-bottom: 14px;
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--purple-deep), var(--indigo), var(--purple-accent), var(--purple-deep));
  opacity: 0;
  transition: opacity .3s var(--ease);
  filter: blur(4px);
}

.candidate-card.selected .avatar-ring {
  opacity: .55;
  animation: spin 4s linear infinite;
}

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

.avatar {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(17, 24, 39, .1);
}

.check-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--success);
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  transition: transform .35s var(--ease);
}

.candidate-card.selected .check-badge {
  transform: scale(1);
}

.check-badge svg {
  width: 12px;
  height: 12px;
  color: #fff;
}

.candidate-alias {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  color: var(--heading);
  letter-spacing: -.01em;
}

.candidate-name {
  font-size: 12.5px;
  color: var(--body);
  margin-top: 3px;
  line-height: 1.4;
}

.candidate-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(124, 58, 237, .08);
  color: var(--purple-deep);
}

.candidate-manifesto {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--body);
  margin-top: 12px;
  min-height: 57px;
}

.view-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--purple-accent);
  margin-top: 12px;
  padding: 4px;
  transition: gap .2s var(--ease);
}

.view-profile-link:hover {
  gap: 7px;
}

.view-profile-link svg {
  width: 13px;
  height: 13px;
}

.select-btn {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  background: rgba(17, 24, 39, .04);
  color: var(--heading);
  border: 1px solid rgba(17, 24, 39, .06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .25s var(--ease);
}

.select-btn svg {
  width: 15px;
  height: 15px;
  opacity: 0;
  width: 0;
  transition: all .25s var(--ease);
}

.select-btn:hover {
  background: rgba(124, 58, 237, .08);
  color: var(--purple-deep);
}

.select-btn:focus-visible {
  outline: 2px solid var(--purple-accent);
  outline-offset: 2px;
}

.select-btn.is-selected {
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-accent));
  color: #fff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, .35);
}

.select-btn.is-selected svg {
  opacity: 1;
  width: 15px;
}

/* Collapsed / not-yet-expanded row items */
.collapsed-list {
  display: flex;
  flex-direction: column;
}

.collapsed-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-top: 1px solid rgba(17, 24, 39, .05);
  text-align: left;
  transition: background .2s var(--ease);
}

.collapsed-item:hover {
  background: rgba(124, 58, 237, .04);
}

.collapsed-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(124, 58, 237, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.collapsed-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
}

.collapsed-sub {
  font-size: 12px;
  color: var(--body);
}

.collapsed-status {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--body);
  white-space: nowrap;
}

.collapsed-status.done {
  color: var(--success);
}

.collapsed-chevron {
  width: 16px;
  height: 16px;
  color: var(--body);
  flex-shrink: 0;
}

/* ============================================================
   9. STICKY ACTION BAR
   ============================================================ */
.action-bar {
  position: fixed;
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 16px clamp(20px, 4vw, 56px);
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -8px 30px rgba(17, 24, 39, .06);
}

.action-bar-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.action-progress {
  flex: 1;
  min-width: 220px;
}

.action-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 6px;
}

.action-progress-label span:last-child {
  color: var(--purple-deep);
}

.action-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #EDE9FE;
  overflow: hidden;
}

.action-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple-deep), var(--indigo));
  transition: width .5s var(--ease);
}

.action-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.btn-secondary {
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  background: rgba(17, 24, 39, .04);
  border: 1px solid rgba(17, 24, 39, .08);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--heading);
  transition: all .2s var(--ease);
}

.btn-secondary:hover {
  background: rgba(17, 24, 39, .07);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-accent));
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(109, 40, 217, .32);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease);
}

.btn-primary svg {
  width: 15px;
  height: 15px;
  transition: transform .25s var(--ease);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(109, 40, 217, .4);
  filter: brightness(1.05);
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-primary:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--purple-accent);
  outline-offset: 2px;
}

/* ============================================================
   10. MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(17, 24, 39, .45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}

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

.modal-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 30px 80px rgba(17, 24, 39, .25);
  transform: translateY(16px) scale(.97);
  transition: transform .35s var(--ease);
  max-height: 85vh;
  overflow-y: auto;
}

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

.modal-card.modal-lg {
  max-width: 620px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, .05);
  transition: background .2s var(--ease);
}

.modal-close:hover {
  background: rgba(17, 24, 39, .1);
}

.modal-close svg {
  width: 15px;
  height: 15px;
}

.modal-card {
  position: relative;
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .12), rgba(139, 92, 246, .08));
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon svg {
  width: 26px;
  height: 26px;
  color: var(--purple-accent);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--heading);
}

.modal-header p {
  font-size: 13.5px;
  color: var(--body);
  margin-top: 6px;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, .05);
  font-size: 13px;
}

.review-row .pos {
  font-weight: 600;
  color: var(--heading);
}

.review-row .cand {
  color: var(--purple-deep);
  font-weight: 600;
}

.review-row.empty .cand {
  color: var(--danger);
  font-weight: 500;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.modal-actions .btn-secondary,
.modal-actions .btn-primary {
  flex: 1;
  justify-content: center;
}

.success-anim {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 0;
}

.success-circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #34D399);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 12px 30px rgba(16, 185, 129, .35);
  animation: popIn .5s var(--ease);
}

@keyframes popIn {
  0% {
    transform: scale(0);
  }

  70% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.success-circle svg {
  width: 38px;
  height: 38px;
  color: #fff;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw .5s .3s var(--ease) forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.success-anim h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--heading);
}

.success-anim p {
  font-size: 13.5px;
  color: var(--body);
  margin-top: 8px;
  max-width: 340px;
}

.receipt-code {
  margin-top: 18px;
  font-family: 'Sora', monospace;
  font-size: 12.5px;
  letter-spacing: .05em;
  color: var(--purple-deep);
  background: rgba(124, 58, 237, .08);
  padding: 8px 14px;
  border-radius: 999px;
}

.profile-photo-lg {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
}

.profile-body {
  text-align: center;
}

.profile-body h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--heading);
}

.profile-body .profile-sub {
  font-size: 12.5px;
  color: var(--body);
  margin-top: 3px;
}

.profile-manifesto-full {
  text-align: left;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--body);
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(17, 24, 39, .06);
}

.profile-manifesto-full strong {
  color: var(--heading);
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ============================================================
   11. RESPONSIVE
   ============================================================ */
@media (max-width: 1279px) {
  .candidate-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s var(--ease);
    box-shadow: 0 0 40px rgba(0, 0, 0, .15);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
  }

  .action-bar {
    left: 0;
  }

  .mobile-topbar {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .mobile-topbar {
    display: none;
  }
}

.mobile-topbar {
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(248, 250, 252, .85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(17, 24, 39, .06);
  margin: -32px -20px 12px;
}

.menu-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--card-glass);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-btn svg {
  width: 18px;
  height: 18px;
}

.sidebar-scrim {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .35);
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.sidebar-scrim.open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 767px) {
  .candidate-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 4px 16px 24px;
  }

  .section-header {
    padding: 16px;
  }

  .hero {
    padding: 24px 18px;
  }

  .countdown-unit {
    min-width: 62px;
    padding: 10px 6px;
  }

  .hero-progress {
    flex-direction: column;
    align-items: stretch;
  }

  .action-bar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .action-buttons {
    width: 100%;
  }

  .action-buttons .btn-secondary,
  .action-buttons .btn-primary {
    flex: 1;
    justify-content: center;
  }

  .content {
    padding: 16px 16px 180px;
  }
}

@media (max-width: 479px) {
  .modal-card {
    padding: 24px;
  }
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lazy-img {
  opacity: 0;
  transition: opacity .4s;
}

.lazy-img.loaded {
  opacity: 1;
}

:focus-visible {
  outline: 2px solid var(--purple-accent);
  outline-offset: 2px;
}

/* ============================================================
   1. AMBIENT BACKGROUND LAYERS (ADDED FOR DASHBOARD)
   ============================================================ */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-image: url('../../img/background_main.png');
  background-size: cover;
  background-position: center;
  mix-blend-mode: overlay;
  opacity: 0.15;
}

/* ============================================================
   12. WELCOME HERO CARD (index / welcome page redesign)
   All classes are prefixed with .welcome- to avoid collisions
   with the existing .hero section used on ballot pages.
   ============================================================ */

/* --- card wrapper ------------------------------------------------ */
.welcome-hero {
  position: relative;
  width: 100%;
  max-width: 1140px;
  border-radius: 0 34px 34px 0;
  overflow: hidden;
  background-image: linear-gradient(180deg, rgba(20, 10, 50, .35) 0%, rgba(20, 10, 50, .55) 60%, rgba(15, 8, 40, .72) 100%), url(../img/background_main.png);
  box-shadow: 0 40px 90px rgba(20, 5, 50, .35), 0 10px 30px rgba(20, 5, 50, .18);
  animation: welcomeFadeIn .7s ease both;
  display: flex;
  flex-direction: column;
}

@keyframes welcomeFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- floating glow blobs ---------------------------------------- */
.welcome-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.welcome-glow-1 {
  width: 480px;
  height: 480px;
  top: -140px;
  left: 220px;
  background: rgba(123, 60, 255, .16);
  animation: welcomeFloat1 12s ease-in-out infinite;
}

.welcome-glow-2 {
  width: 420px;
  height: 420px;
  bottom: 60px;
  right: -60px;
  background: rgba(168, 85, 247, .13);
  animation: welcomeFloat2 14s ease-in-out infinite;
}

.welcome-glow-3 {
  width: 300px;
  height: 300px;
  top: 340px;
  right: 380px;
  background: rgba(91, 33, 255, .11);
  animation: welcomeFloat1 16s ease-in-out infinite reverse;
}

@keyframes welcomeFloat1 {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(24px, 20px);
  }
}

@keyframes welcomeFloat2 {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-20px, -18px);
  }
}

/* --- tiny particles --------------------------------------------- */
.welcome-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.welcome-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  animation: welcomeDrift 9s ease-in-out infinite;
}

@keyframes welcomeDrift {

  0%,
  100% {
    transform: translateY(0);
    opacity: .25;
  }

  50% {
    transform: translateY(-16px);
    opacity: .7;
  }
}

/* --- hero body (two-column) ------------------------------------- */
.welcome-hero-body {
  position: relative;
  z-index: 2;
  display: flex;
  padding: 56px 60px 44px 60px;
  gap: 40px;
}

/* left column */
.welcome-hero-left {
  flex: 1;
  max-width: 560px;
  display: flex;
  flex-direction: column;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  background: rgba(124, 58, 237, .35);
  border: 1px solid rgba(168, 85, 247, .35);
  backdrop-filter: blur(6px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .10em;
  color: #E9D5FF;
  text-transform: uppercase;
}

.welcome-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px 2px rgba(255, 255, 255, .8);
  animation: welcomePulse 1.8s ease-in-out infinite;
}

@keyframes welcomePulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .5;
    transform: scale(.8);
  }
}

.welcome-eyebrow {
  margin-top: 30px;
  font-size: 24px;
  font-weight: 500;
  color: #C9C3D9;
}

.welcome-headline {
  font-size: 64px;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.03em;
  margin-top: 2px;
  background: linear-gradient(100deg, #FFFFFF 0%, #E9D5FF 45%, #A855F7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-subheadline {
  margin-top: 18px;
  font-size: 24px;
  font-weight: 600;
  color: #FFFFFF;
}

.welcome-description {
  margin-top: 16px;
  max-width: 470px;
  font-size: 16px;
  line-height: 1.65;
  color: #A7A0BC;
}

/* features list */
.welcome-features {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.welcome-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.welcome-feature-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 13px;
  background: linear-gradient(150deg, #5B21FF, #7A3CFF);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(91, 33, 255, .35);
}

.welcome-feature-icon svg {
  width: 19px;
  height: 19px;
  color: #fff;
}

.welcome-feature-title {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
}

.welcome-feature-desc {
  margin-top: 2px;
  font-size: 13.5px;
  color: #8F89A6;
}

/* CTA button */
.welcome-cta {
  margin-top: 34px;
  max-width: 470px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 26px;
  border-radius: 18px;
  background: linear-gradient(100deg, #6D28FF 0%, #9333EA 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(109, 40, 255, .42), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.welcome-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .25), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
}

.welcome-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(109, 40, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .22);
  filter: brightness(1.06);
  color: #fff;
}

.welcome-cta:hover::before {
  left: 130%;
}

.welcome-cta-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.welcome-cta svg {
  width: 18px;
  height: 18px;
}

.welcome-cta-secondary {
  margin-top: 12px;
  max-width: 470px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.welcome-cta-secondary:hover {
  background: rgba(255, 255, 255, .12);
  transform: translateY(-1px);
  color: #fff;
}

.welcome-privacy {
  margin-top: 18px;
  max-width: 470px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  color: #756F8C;
}

.welcome-privacy svg {
  width: 13px;
  height: 13px;
  color: #756F8C;
}

/* right column: overview card */
.welcome-hero-right {
  width: 400px;
  flex-shrink: 0;
}

.welcome-overview {
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .10);
  backdrop-filter: blur(20px);
  border-radius: 26px;
  padding: 26px 26px 24px 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.welcome-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.welcome-overview-title {
  font-size: 17.5px;
  font-weight: 700;
  color: #fff;
}

.welcome-overview-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(150deg, #5B21FF, #7A3CFF);
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-overview-icon svg {
  width: 17px;
  height: 17px;
  color: #fff;
}

.welcome-overview-divider {
  height: 1px;
  background: rgba(255, 255, 255, .10);
  margin: 18px 0;
}

.welcome-overview-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
}

.welcome-overview-row+.welcome-overview-row {
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.welcome-overview-row-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background: rgba(124, 58, 237, .28);
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-overview-row-icon svg {
  width: 17px;
  height: 17px;
  color: #D7BEFF;
}

.welcome-overview-label {
  font-size: 12.5px;
  color: #A7A0BC;
  margin-bottom: 4px;
}

.welcome-overview-value {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.welcome-overview-value.accent {
  color: #C39BFF;
}

.welcome-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, .18);
  border: 1px solid rgba(16, 185, 129, .35);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #6EE7B7;
}

.welcome-live-pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34D399;
}

.welcome-overview-btn {
  margin-top: 18px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.welcome-overview-btn:hover {
  background: rgba(255, 255, 255, .12);
  transform: translateY(-1px);
  color: #fff;
}

.welcome-overview-btn svg {
  width: 15px;
  height: 15px;
}

/* --- bottom stats strip ----------------------------------------- */
.welcome-stats-strip {
  position: relative;
  z-index: 2;
  margin-top: 0;
  border-top: 1px solid rgba(255, 255, 255, .09);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.welcome-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 26px 30px;
  transition: background .2s ease;
  white-space: nowrap;
}

.welcome-stat:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, .07);
}

.welcome-stat:hover {
  background: rgba(255, 255, 255, .03);
}

.welcome-stat-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(124, 58, 237, .22);
  border: 1px solid rgba(168, 85, 247, .2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-stat-icon svg {
  width: 18px;
  height: 18px;
  color: #C39BFF;
}

.welcome-stat-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
}

.welcome-stat-desc {
  margin-top: 2px;
  font-size: 12.5px;
  color: #8F89A6;
}

/* --- welcome-specific content wrapper override ------------------- */
.welcome-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 42px 48px 42px 0;
}

/* --- responsive for welcome hero -------------------------------- */
@media (max-width: 1400px) {
  .welcome-stat {
    padding: 22px 30px;
  }
}

@media (max-width: 1180px) {
  .welcome-hero-right {
    width: 340px;
  }
}

@media (max-width: 1023px) {
  .welcome-wrapper {
    padding: 20px;
  }
}

@media (max-width: 900px) {
  .welcome-hero {
    border-radius: 34px;
  }

  .welcome-hero-body {
    flex-direction: column;
  }

  .welcome-hero-right {
    width: 100%;
  }

  .welcome-stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .welcome-headline {
    font-size: 44px;
  }

  .welcome-wrapper {
    padding: 20px;
    min-height: auto;
  }
}

@media (max-width: 600px) {
  .welcome-hero-body {
    padding: 32px 24px 28px 24px;
  }

  .welcome-headline {
    font-size: 36px;
  }

  .welcome-eyebrow {
    font-size: 18px;
  }

  .welcome-subheadline {
    font-size: 18px;
  }

  .welcome-stats-strip {
    grid-template-columns: 1fr;
  }

  .welcome-stat {
    padding: 18px 24px;
  }

  .welcome-stat:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
  }
}