/* =============================================
   AAA ELECTION SYSTEM — NEUMORPHIC UI
   Soft, tactile, extruded design
   Font: Sora + DM Sans
============================================= */

:root {
  --bg: #e8edf2;
  --surface: #e8edf2;
  --shadow-light: #ffffff;
  --shadow-dark: #c5ccd6;
  --neu-flat: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
  --neu-pressed: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
  --neu-raised: 8px 8px 20px var(--shadow-dark), -8px -8px 20px var(--shadow-light);
  --neu-raised-lg: 12px 12px 28px var(--shadow-dark), -12px -12px 28px var(--shadow-light);
  --neu-inset: inset 3px 3px 8px var(--shadow-dark), inset -3px -3px 8px var(--shadow-light);
  --primary: #4a90d9;
  --primary-dark: #2f6fb5;
  --primary-glow: rgba(74, 144, 217, 0.25);
  --accent: #f0a500;
  --accent-glow: rgba(240, 165, 0, 0.2);
  --success: #27ae60;
  --success-glow: rgba(39, 174, 96, 0.2);
  --danger: #e74c3c;
  --danger-glow: rgba(231, 76, 60, 0.2);
  --text: #2d3748;
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --text-light: #a0aec0;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font: 'Sora', sans-serif;
  --font-head: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }

/* ======= HEADER — stronger navbar presence ======= */
.site-header { background: var(--bg); box-shadow: 0 2px 16px rgba(0,0,0,.07), var(--neu-flat); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 28px; height: 70px; display: flex; align-items: center; justify-content: space-between; width: 100%; }
.logo { display: flex; align-items: center; gap: 14px; }
.logo-badge { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; box-shadow: var(--neu-raised); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.logo-text { display: flex; flex-direction: column; gap: 2px; }
.org-name { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: #1e2a3a; letter-spacing: -.1px; }
.election-label { font-size: 11px; color: var(--primary); font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.header-status { font-size: 13px; color: var(--success); font-weight: 600; display: flex; align-items: center; gap: 6px; background: var(--bg); padding: 8px 16px; border-radius: 99px; box-shadow: var(--neu-flat); }

/* ======= LOGO AS HOME BUTTON ======= */
button.logo { background: none; border: none; cursor: pointer; padding: 6px 10px 6px 0; border-radius: var(--radius-sm); transition: var(--transition); }
button.logo:hover { opacity: .8; transform: scale(.97); }
button.logo:active { transform: scale(.94); }

/* ======= STEPS ======= */
#app { flex: 1; }
.step { display: none; animation: fadeUp .4s ease; }
.step.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ======= CONTAINER ======= */
.container { max-width: 1100px; margin: 0 auto; padding: 44px 28px 88px; }

/* ======= LANDING HERO ======= */
.landing-hero { min-height: calc(100vh - 70px); display: flex; align-items: center; background: var(--bg); position: relative; overflow: hidden; }
.hero-content { max-width: 1200px; width: 100%; margin: 0 auto; padding: 80px 28px; display: grid; grid-template-columns: 1fr auto; gap: 80px; align-items: center; position: relative; z-index: 2; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; }

/* Election badge */
.election-badge { display: inline-flex; align-items: center; gap: 9px; background: var(--bg); box-shadow: var(--neu-flat); border-radius: 99px; padding: 8px 18px; font-size: 13px; font-weight: 600; color: var(--primary); font-family: var(--font-head); margin-bottom: 20px; width: fit-content; align-self: flex-start; transition: var(--transition); }
.election-badge--closed { color: var(--danger); }
.badge-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 3px var(--success-glow); animation: pulse 2s infinite; flex-shrink: 0; transition: var(--transition); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px var(--success-glow); } 50% { box-shadow: 0 0 0 6px rgba(39,174,96,.08); } }

/* Vote button — disabled state when election is closed */
.btn-primary--disabled { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.3); }
.btn-primary--disabled:hover { transform: none; box-shadow: var(--neu-raised); }

/* Closed modal icon */
.closed-modal-icon { width: 72px; height: 72px; border-radius: 50%; background: rgba(231,76,60,.1); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; color: var(--danger); }

/* point 1+3: tighter rhythm, stronger contrast */
.hero-title { font-family: var(--font-head); font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; color: #1a2535; line-height: 1.1; margin-bottom: 16px; }
.title-accent { color: var(--primary); }
.hero-desc { font-size: 15.5px; color: #3d4a5c; max-width: 500px; margin-bottom: 24px; line-height: 1.8; }

/* point 1+5: consistent spacing, flush-left cards */
.election-meta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.meta-item { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #3d4a5c; background: var(--bg); padding: 11px 18px; border-radius: var(--radius-sm); box-shadow: 5px 5px 12px var(--shadow-dark), -5px -5px 12px var(--shadow-light); width: 100%; max-width: 360px; }
.meta-item svg { width: 17px; height: 17px; color: var(--primary); flex-shrink: 0; }
.meta-item strong { color: #1a2535; font-weight: 700; }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ======= HERO VISUAL — point 2: smaller logo ======= */
.hero-visual {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.vote-illustration {
  position: relative;
  width: 420px;
  height: 420px;
}

.vi-logo-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  height: 420px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    16px 16px 40px var(--shadow-dark),
    -16px -16px 40px var(--shadow-light),
    0 0 0 6px var(--bg);
  animation: floatLogo 5s ease-in-out infinite;
}
@keyframes floatLogo { 0%,100% { transform: translate(-50%,-50%) translateY(0); } 50% { transform: translate(-50%,-50%) translateY(-14px); } }
.vi-logo-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ======= HERO BACKGROUND — point 6: subtle circles ======= */
.hero-bg-pattern {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 0% 100%, rgba(74,144,217,.09) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(74,144,217,.07) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(240,165,0,.04) 0%, transparent 70%);
  animation: meshShift 10s ease-in-out infinite alternate;
}
@keyframes meshShift {
  0%   { opacity: .8; transform: scale(1); }
  50%  { opacity: 1;  transform: scale(1.03); }
  100% { opacity: .9; transform: scale(1.01); }
}
.hero-bg-pattern::before {
  content: '';
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(74,144,217,.08);
  top: -120px; left: -100px;
  box-shadow: inset 0 0 40px rgba(74,144,217,.02);
  animation: spinRing 30s linear infinite;
}
.hero-bg-pattern::after {
  content: '';
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(74,144,217,.06);
  bottom: -80px; right: 5%;
  animation: spinRing 22s linear infinite reverse;
}
@keyframes spinRing {
  from { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.06); }
  to   { transform: rotate(360deg) scale(1); }
}
.landing-hero::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath fill='rgba(74,144,217,0.06)' d='M0,60 C240,110 480,10 720,60 C960,110 1200,10 1440,60 L1440,120 L0,120 Z'/%3E%3C/svg%3E") center bottom / cover no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath fill='rgba(74,144,217,0.04)' d='M0,80 C360,20 720,100 1080,40 C1260,10 1380,70 1440,80 L1440,120 L0,120 Z'/%3E%3C/svg%3E") center bottom / cover no-repeat;
  animation: waveShift 8s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes waveShift { 0% { transform: translateX(0); } 100% { transform: translateX(-30px); } }
.landing-hero::after {
  content: '';
  position: absolute;
  top: 8%; right: 8%;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1px dashed rgba(74,144,217,.08);
  animation: spinRing 18s linear infinite reverse;
  pointer-events: none;
  z-index: 0;
}

/* ======= BUTTONS ======= */
.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border: none; border-radius: var(--radius); padding: 13px 26px; font-size: 14px; font-weight: 600; font-family: var(--font-head); cursor: pointer; transition: var(--transition); box-shadow: 6px 6px 16px var(--shadow-dark), -3px -3px 10px var(--shadow-light), 0 4px 15px var(--primary-glow); text-decoration: none; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 8px 8px 20px var(--shadow-dark), -4px -4px 12px var(--shadow-light), 0 8px 24px var(--primary-glow); }
.btn-primary:active { transform: translateY(0); box-shadow: var(--neu-pressed); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary.btn-large { padding: 15px 34px; font-size: 15px; border-radius: var(--radius-lg); letter-spacing: .1px; }
.btn-primary.btn-full { width: 100%; justify-content: center; padding: 15px; }
.btn-primary svg { width: 18px; height: 18px; }

/* point 4: stronger secondary CTA */
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; background: var(--bg); color: var(--primary); border: none; border-radius: var(--radius); padding: 13px 28px; font-size: 14px; font-weight: 600; font-family: var(--font-head); cursor: pointer; transition: var(--transition); box-shadow: var(--neu-raised), inset 0 0 0 1.5px rgba(74,144,217,.2); }
.btn-ghost.btn-full { width: 100%; justify-content: center; padding: 15px; }
.btn-ghost:hover { color: var(--primary-dark); box-shadow: var(--neu-raised-lg), inset 0 0 0 1.5px rgba(74,144,217,.35); transform: translateY(-2px); }
.btn-ghost:active { box-shadow: var(--neu-pressed); transform: translateY(0); }
.btn-outline { display: inline-flex; align-items: center; gap: 8px; background: var(--bg); color: var(--primary); border: none; border-radius: var(--radius-lg); padding: 14px 30px; font-size: 15px; font-weight: 600; font-family: var(--font-head); cursor: pointer; transition: var(--transition); box-shadow: var(--neu-raised); }
.btn-outline:hover { box-shadow: var(--neu-raised-lg); transform: translateY(-2px); }
.btn-outline:active { box-shadow: var(--neu-pressed); transform: translateY(0); }

/* ======= STEP HEADER ======= */
.step-header { display: flex; align-items: center; gap: 18px; margin-bottom: 40px; padding-bottom: 24px; position: relative; }
.step-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--bg); box-shadow: 0 1px 3px var(--shadow-dark), 0 -1px 2px var(--shadow-light); border-radius: 2px; }
.back-btn { display: flex; align-items: center; gap: 7px; background: var(--bg); border: none; border-radius: var(--radius-sm); padding: 10px 16px; font-size: 13px; color: var(--text-secondary); font-family: var(--font-body); cursor: pointer; transition: var(--transition); box-shadow: var(--neu-flat); }
.back-btn:hover { color: var(--primary); box-shadow: var(--neu-raised); }
.back-btn:active { box-shadow: var(--neu-pressed); }
.back-btn svg { width: 16px; height: 16px; }
.step-indicator { display: flex; align-items: center; gap: 12px; }
.si-num { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--primary); opacity: .25; line-height: 1; }
.si-label { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--text); }

/* ======= SECTION TITLES ======= */
.section-title { font-family: var(--font-head); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--text); margin-bottom: 10px; }
.section-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.7; max-width: 600px; }

/* ======= VERIFY ======= */
.verify-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.verify-info .section-title { margin-bottom: 14px; }
.info-rules { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.rule-item { display: flex; align-items: center; gap: 14px; background: var(--bg); border-radius: var(--radius-sm); padding: 14px 18px; box-shadow: var(--neu-flat); transition: var(--transition); }
.rule-item:hover { box-shadow: var(--neu-raised); }
/* uniform blue SVG icons */
.rule-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--bg); box-shadow: var(--neu-flat); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rule-icon svg { width: 18px; height: 18px; stroke: var(--primary); }
.rule-item p { font-size: 13px; color: #3d4a5c; font-weight: 500; }
.verify-form-card { background: var(--bg); border-radius: var(--radius-xl); padding: 32px; box-shadow: var(--neu-raised-lg); }
.form-card-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; padding-bottom: 22px; position: relative; }
.form-card-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; box-shadow: 0 1px 3px var(--shadow-dark), 0 -1px 2px var(--shadow-light); border-radius: 2px; background: var(--bg); }
.form-card-icon { width: 48px; height: 48px; background: var(--bg); border-radius: 14px; box-shadow: var(--neu-flat); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.form-card-icon svg { width: 22px; height: 22px; color: var(--primary); }
.form-card-header h3 { font-family: var(--font-head); font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.form-card-header p { font-size: 13px; color: var(--text-muted); }
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-bottom: 9px; text-transform: uppercase; letter-spacing: .8px; }
.input-wrapper { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.input-icon--right { left: auto; right: 14px; }
.form-group input,
.form-group select { width: 100%; padding: 13px 16px 13px 44px; background: var(--bg); border: none; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 14px; color: var(--text); box-shadow: var(--neu-inset); outline: none; transition: var(--transition); }
.form-group select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.form-group input:focus,
.form-group select:focus { box-shadow: inset 3px 3px 8px var(--shadow-dark), inset -3px -3px 8px var(--shadow-light), 0 0 0 3px var(--primary-glow); }
.form-group input::placeholder { color: var(--text-light); }
.form-group input.error,
.form-group select.error { box-shadow: var(--neu-inset), 0 0 0 2px var(--danger-glow); }
.scholarship-help { font-size: 12px; color: var(--text-muted); margin: -2px 0 12px; line-height: 1.6; }
.scholarship-other-input { margin-top: 12px; }
.verify-account-status { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(39,174,96,.08); box-shadow: var(--neu-flat); }
.verify-account-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 4px; }
.verify-account-value { font-size: 13px; font-weight: 700; color: var(--success); word-break: break-word; }
.verify-browser-card { margin-top: 12px; padding: 16px; border-radius: var(--radius-sm); background: rgba(74,144,217,.08); box-shadow: var(--neu-flat); }
.verify-browser-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.verify-browser-text, .verify-browser-steps { font-size: 12px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 10px; }
.verify-browser-steps { margin-bottom: 14px; }
.field-error { display: block; font-size: 12px; color: var(--danger); margin-top: 6px; min-height: 16px; }
.form-message { margin-bottom: 20px; border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13px; display: none; }
.form-message.error { display: block; color: var(--danger); background: var(--bg); box-shadow: var(--neu-flat), 0 0 0 2px var(--danger-glow); }
.form-message.success { display: block; color: var(--success); background: var(--bg); box-shadow: var(--neu-flat), 0 0 0 2px var(--success-glow); }
.form-message.info { display: block; color: var(--primary); background: var(--bg); box-shadow: var(--neu-flat), 0 0 0 2px var(--primary-glow); }

/* ======= SPINNER ======= */
.btn-spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--shadow-dark); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.loading-state { text-align: center; padding: 70px 20px; color: var(--text-muted); font-size: 14px; }

/* ======= CANDIDATES ======= */
.candidates-header { margin-bottom: 36px; }
.position-group { margin-bottom: 52px; }
.position-label { font-family: var(--font-head); font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: var(--text-primary); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); display: inline-block; }
.candidate-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.candidate-card { background: var(--bg); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--neu-raised); transition: var(--transition); cursor: pointer; }
.candidate-card:hover { transform: translateY(-6px); box-shadow: var(--neu-raised-lg); }
.candidate-card:active { box-shadow: var(--neu-flat); transform: translateY(0); }
.candidate-photo-wrap { aspect-ratio: 1; overflow: hidden; background: var(--bg); position: relative; }
.candidate-photo-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.candidate-card:hover .candidate-photo-wrap img { transform: scale(1.06); }
.candidate-photo-placeholder { width: 100%; height: 100%; background: var(--bg); box-shadow: var(--neu-inset); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 38px; font-weight: 800; color: var(--primary); }
.candidate-info { padding: 18px; }
.candidate-name { font-family: var(--font-head); font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.candidate-position-badge { display: inline-block; background: var(--bg); box-shadow: var(--neu-flat); color: var(--primary); font-size: 12px; font-weight: 700; padding: 6px 16px; border-radius: 99px; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 8px; }
.candidate-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.candidate-platform-preview { font-size: 12px; color: var(--text-secondary); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.candidates-footer { margin-top: 44px; text-align: center; }

/* ======= PARTY FILTER BUTTONS ======= */
.party-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.party-filter-btn { padding: 8px 20px; border-radius: 30px; border: none; background: var(--bg); color: var(--text-secondary); font-family: var(--font); font-size: 13px; font-weight: 500; cursor: pointer; box-shadow: var(--neu-flat); transition: var(--transition); }
.party-filter-btn:hover { box-shadow: var(--neu-raised); color: var(--primary); }
.party-filter-btn.active { box-shadow: var(--neu-pressed); color: var(--primary); font-weight: 600; }

/* ======= PARTY BADGE ======= */
.party-badge { display: inline-flex; align-items: center; gap: 4px; margin: 4px 0 6px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: .3px; background: color-mix(in srgb, var(--party-color, #4a90d9) 12%, var(--bg)); color: var(--party-color, #4a90d9); box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light); }
.party-badge.party-independent { --party-color: #888; background: color-mix(in srgb, #888 10%, var(--bg)); color: #777; }

/* ======= BALLOT ======= */
.ballot-header { margin-bottom: 36px; }
.voter-badge { display: inline-flex; align-items: center; gap: 9px; background: var(--bg); box-shadow: var(--neu-flat), 0 0 0 2px var(--success-glow); color: var(--success); border-radius: 99px; padding: 8px 18px; font-size: 13px; font-weight: 600; margin-top: 18px; }
.voter-badge svg { width: 15px; height: 15px; }
.ballot-wrapper { margin-bottom: 36px; }
.ballot-position-group { margin-bottom: 36px; }
.ballot-position-header { background: var(--bg); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 18px 22px; box-shadow: 6px 0px 14px var(--shadow-dark), -6px 0px 14px var(--shadow-light), 0 -6px 14px var(--shadow-dark); position: relative; z-index: 1; }
.ballot-position-header::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(to bottom, var(--primary), var(--primary-dark)); border-radius: var(--radius-lg) 0 0 0; }
.ballot-position-header h3 { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.ballot-position-header p { font-size: 12px; color: var(--text-muted); }
.ballot-candidates { background: var(--bg); border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden; box-shadow: 6px 8px 18px var(--shadow-dark), -6px 8px 18px var(--shadow-light); }
.ballot-option { display: flex; align-items: center; gap: 16px; padding: 16px 22px; cursor: pointer; transition: var(--transition); position: relative; border-bottom: 1px solid rgba(0,0,0,.04); }
.ballot-option:last-child { border-bottom: none; }
.ballot-option:hover { background: rgba(74,144,217,.04); }
.ballot-option.selected { background: rgba(74,144,217,.06); }
.ballot-option.selected::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(to bottom, var(--primary), var(--primary-dark)); }
.ballot-radio { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; background: var(--bg); box-shadow: var(--neu-inset); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.ballot-option.selected .ballot-radio { box-shadow: inset 3px 3px 7px var(--shadow-dark), inset -3px -3px 7px var(--shadow-light), 0 0 0 2px var(--primary); background: var(--primary); }
.ballot-option.selected .ballot-radio::after { content: ''; width: 8px; height: 8px; background: #fff; border-radius: 50%; }
.ballot-cand-photo { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: var(--bg); flex-shrink: 0; box-shadow: var(--neu-flat); }
.ballot-cand-photo img { width: 100%; height: 100%; object-fit: cover; }
.ballot-cand-initials { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--primary); }
.ballot-cand-info { flex: 1; }
.ballot-cand-name { font-family: var(--font-head); font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.ballot-cand-meta { font-size: 12px; color: var(--text-muted); }

/* ======= PROGRESS ======= */
.ballot-progress { background: var(--bg); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--neu-flat); margin-bottom: 32px; }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 12px; color: var(--text-secondary); }
.progress-bar { height: 8px; background: var(--bg); border-radius: 4px; box-shadow: var(--neu-inset); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); border-radius: 4px; transition: width .5s cubic-bezier(.4,0,.2,1); box-shadow: 0 2px 8px var(--primary-glow); }
.ballot-actions { text-align: center; }

/* ======= REVIEW ======= */
.review-wrapper { margin-bottom: 28px; }
.review-item { display: flex; align-items: center; gap: 18px; background: var(--bg); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; box-shadow: var(--neu-flat); transition: var(--transition); }
.review-item:hover { box-shadow: var(--neu-raised); }
.review-position { min-width: 180px; }
.review-position-label { font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.review-position-name { font-family: var(--font-head); font-size: 13px; font-weight: 700; color: var(--primary); }
.review-arrow { color: var(--text-muted); }
.review-arrow svg { width: 18px; height: 18px; }
.review-candidate { display: flex; align-items: center; gap: 13px; flex: 1; }
.review-photo { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: var(--bg); flex-shrink: 0; box-shadow: var(--neu-flat); }
.review-photo img { width: 100%; height: 100%; object-fit: cover; }
.review-photo-init { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 13px; font-weight: 700; color: var(--primary); }
.review-name { font-family: var(--font-head); font-size: 14px; font-weight: 700; }
.review-meta { font-size: 12px; color: var(--text-muted); }
.review-warning { display: flex; align-items: flex-start; gap: 12px; background: var(--bg); border-radius: var(--radius-sm); padding: 16px 18px; font-size: 13px; color: var(--text-secondary); margin-bottom: 28px; box-shadow: var(--neu-flat), 0 0 0 2px var(--accent-glow); }
.review-warning svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.review-actions { display: flex; align-items: center; justify-content: center; gap: 18px; }

/* ======= SUCCESS ======= */
.success-wrapper { max-width: 560px; margin: 0 auto; text-align: center; padding: 70px 20px; }
.success-animation { position: relative; width: 110px; height: 110px; margin: 0 auto 32px; }
.success-ring { width: 110px; height: 110px; border-radius: 50%; background: var(--bg); box-shadow: var(--neu-raised-lg); position: absolute; inset: 0; animation: expandRing .6s ease forwards; }
@keyframes expandRing { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-check { position: absolute; inset: 10px; background: linear-gradient(135deg, var(--success), #2ecc71); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px var(--success-glow); animation: popIn .4s .3s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
.success-check svg { width: 42px; height: 42px; color: #fff; }
.success-title { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: var(--text); margin-bottom: 14px; }
.success-desc { font-size: 15px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.75; }
.ref-card { background: var(--bg); border-radius: var(--radius-xl); padding: 28px; margin-bottom: 32px; box-shadow: var(--neu-raised-lg); position: relative; overflow: hidden; }
.ref-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); }
.ref-label { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 10px; font-weight: 700; }
.ref-num { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; letter-spacing: 4px; color: var(--primary); margin-bottom: 10px; }
.ref-hint { font-size: 12px; color: var(--text-muted); }
.success-summary { margin-bottom: 32px; text-align: left; }
.success-footer { font-size: 13px; color: var(--text-muted); }

/* ======= MODAL ======= */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 999; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-card { background: var(--bg); border-radius: var(--radius-xl); max-width: 480px; width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,.22); position: relative; transform: scale(.92) translateY(16px); transition: transform .3s cubic-bezier(.34,1.56,.64,1); max-height: 90vh; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.modal-card::-webkit-scrollbar { display: none; }
.modal-overlay.open .modal-card { transform: scale(1) translateY(0); }
.modal-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; background: rgba(0,0,0,.06); border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--transition); z-index: 10; }
.modal-close:hover { background: rgba(0,0,0,.12); }
.modal-close:active { background: rgba(0,0,0,.18); }
.modal-close svg { width: 16px; height: 16px; color: var(--text-secondary); }
.modal-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.modal-photo-placeholder { width: 100%; aspect-ratio: 1; background: var(--bg); box-shadow: var(--neu-inset); border-radius: var(--radius-xl) var(--radius-xl) 0 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 64px; font-weight: 800; color: var(--primary); }
.modal-body { padding: 26px; }
.modal-position-badge { background: rgba(74,144,217,.12); color: var(--primary); font-size: 12px; font-weight: 700; padding: 6px 16px; border-radius: 99px; text-transform: uppercase; letter-spacing: 1.5px; display: inline-block; margin-bottom: 16px; }
.modal-name { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; margin-bottom: 5px; }
.modal-course { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.modal-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--primary); margin-bottom: 10px; }
.modal-platform { font-size: 14px; color: var(--text-secondary); line-height: 1.85; }

.admin-action-modal {
  max-width: 560px;
  overflow: hidden;
}
.admin-action-modal::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), rgba(74, 144, 217, 0.22), transparent);
}
.admin-action-modal[data-tone="success"]::before {
  background: linear-gradient(90deg, var(--success), rgba(39, 174, 96, 0.2), transparent);
}
.admin-action-modal[data-tone="danger"]::before {
  background: linear-gradient(90deg, var(--danger), rgba(231, 76, 60, 0.22), transparent);
}
.admin-action-modal__body {
  padding: 36px 32px 30px;
}
.admin-action-modal__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.admin-action-modal__eyebrow {
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-muted);
}
.admin-action-modal__tone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(74, 144, 217, 0.08);
  color: var(--primary);
  box-shadow: var(--neu-flat);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.admin-action-modal[data-tone="success"] .admin-action-modal__tone {
  background: rgba(39, 174, 96, 0.1);
  color: var(--success);
}
.admin-action-modal[data-tone="danger"] .admin-action-modal__tone {
  background: rgba(231, 76, 60, 0.1);
  color: var(--danger);
}
.admin-action-modal__hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}
.admin-action-modal__icon {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.95), rgba(255,255,255,0) 60%),
    linear-gradient(145deg, rgba(74, 144, 217, 0.18), rgba(74, 144, 217, 0.05));
  box-shadow: var(--neu-raised), inset 0 0 0 1px rgba(74, 144, 217, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.admin-action-modal__icon svg {
  width: 28px;
  height: 28px;
}
.admin-action-modal[data-tone="success"] .admin-action-modal__icon {
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.95), rgba(255,255,255,0) 60%),
    linear-gradient(145deg, rgba(39, 174, 96, 0.18), rgba(39, 174, 96, 0.05));
  color: var(--success);
  box-shadow: var(--neu-raised), inset 0 0 0 1px rgba(39, 174, 96, 0.12);
}
.admin-action-modal[data-tone="danger"] .admin-action-modal__icon {
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.95), rgba(255,255,255,0) 60%),
    linear-gradient(145deg, rgba(231, 76, 60, 0.18), rgba(231, 76, 60, 0.05));
  color: var(--danger);
  box-shadow: var(--neu-raised), inset 0 0 0 1px rgba(231, 76, 60, 0.12);
}
.admin-action-modal__title {
  font-family: var(--font-head);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 10px;
}
.admin-action-modal__message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.admin-action-modal__state {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.45), rgba(255,255,255,0)),
    var(--bg);
  box-shadow: var(--neu-inset);
}
.admin-action-modal__state[hidden] {
  display: none;
}
.admin-action-modal__state-card {
  background: rgba(255,255,255,0.22);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--neu-flat);
}
.admin-action-modal__state-card--next {
  box-shadow: var(--neu-flat), inset 0 0 0 1px rgba(74, 144, 217, 0.16);
}
.admin-action-modal[data-tone="success"] .admin-action-modal__state-card--next {
  box-shadow: var(--neu-flat), inset 0 0 0 1px rgba(39, 174, 96, 0.16);
}
.admin-action-modal[data-tone="danger"] .admin-action-modal__state-card--next {
  box-shadow: var(--neu-flat), inset 0 0 0 1px rgba(231, 76, 60, 0.18);
}
.admin-action-modal__state-label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-muted);
}
.admin-action-modal__state-value {
  display: block;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.admin-action-modal__state-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--neu-flat);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.admin-action-modal__state-arrow svg {
  width: 17px;
  height: 17px;
}
.admin-action-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
}
.admin-action-modal__actions button {
  min-width: 132px;
  justify-content: center;
}
.admin-action-modal__actions button[hidden] {
  display: none;
}
.admin-action-modal__actions .btn-primary[data-tone="danger"] {
  background: linear-gradient(135deg, var(--danger), #c0392b);
  box-shadow: 6px 6px 16px var(--shadow-dark), -3px -3px 10px var(--shadow-light), 0 4px 16px var(--danger-glow);
}
.admin-action-modal__actions .btn-primary[data-tone="success"] {
  background: linear-gradient(135deg, var(--success), #1e8449);
  box-shadow: 6px 6px 16px var(--shadow-dark), -3px -3px 10px var(--shadow-light), 0 4px 16px var(--success-glow);
}
@media (max-width: 640px) {
  .admin-action-modal__body {
    padding: 32px 22px 24px;
  }
  .admin-action-modal__hero {
    grid-template-columns: 1fr;
  }
  .admin-action-modal__icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }
  .admin-action-modal__state {
    grid-template-columns: 1fr;
  }
  .admin-action-modal__state-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
  .admin-action-modal__actions {
    flex-direction: column-reverse;
  }
  .admin-action-modal__actions button {
    width: 100%;
  }
}

/* ======= BACK TO TOP ======= */
.back-to-top { position: fixed; bottom: 28px; right: 28px; width: 46px; height: 46px; border-radius: 50%; background: #4a90d9; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 6px 6px 16px var(--shadow-dark), -6px -6px 16px var(--shadow-light), 0 4px 15px var(--primary-glow); transition: var(--transition); z-index: 200; opacity: 0; pointer-events: none; transform: translateY(12px); }
.back-to-top.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
.back-to-top:hover { box-shadow: 8px 8px 20px var(--shadow-dark), -8px -8px 20px var(--shadow-light), 0 8px 22px var(--primary-glow); transform: translateY(-3px); }
.back-to-top:active { box-shadow: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light); transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; color: #ffffff; }

/* ======= FOOTER ======= */
.site-footer { background: var(--bg); border-top: 1px solid rgba(0,0,0,.06); box-shadow: 0 -4px 20px rgba(0,0,0,.04); margin-top: 60px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 48px 28px 32px; display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; }
.footer-brand { display: flex; align-items: flex-start; gap: 14px; }
.footer-logo img { width: 52px; height: 52px; border-radius: 50%; box-shadow: var(--neu-flat); object-fit: cover; }
.footer-org { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.footer-school { font-size: 12px; color: var(--text-secondary); }
.footer-heading { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: var(--text-secondary); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--primary); }
.footer-text { font-size: 13px; color: var(--text-secondary); }
.footer-bottom { border-top: 1px solid rgba(0,0,0,.06); padding: 20px 28px; max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom p { font-size: 12px; color: var(--text-secondary); margin: 0; }
.footer-privacy { font-size: 11px !important; color: #888 !important; line-height: 1.6; }
.footer-icon-item { display: inline-flex; align-items: center; gap: 7px; }
.footer-icon-item svg { color: var(--primary); flex-shrink: 0; }

/* Guidelines modal list */
.guidelines-list { padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.guidelines-list li { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* Facebook link */
.fb-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 30px; background: var(--bg); color: #1877f2 !important; font-size: 13px; font-weight: 600; box-shadow: var(--neu-flat); transition: var(--transition); text-decoration: none !important; }
.fb-link:hover { box-shadow: var(--neu-raised); transform: translateY(-2px); }
.fb-link:active { box-shadow: var(--neu-pressed); transform: translateY(0); }

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
  /* Header */
  .header-inner { padding: 0 16px; height: 62px; }
  .logo-badge { width: 42px; height: 42px; }
  .org-name { font-size: 13px; }
  .election-label { font-size: 10px; }
  .header-status { font-size: 12px; padding: 6px 12px; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .admin-link { padding: 6px 10px; font-size: 11px; margin-left: 8px; }

  /* Container */
  .container { padding: 28px 16px 60px; }

  /* Hero */
  .landing-hero { min-height: auto; padding: 0; }
  .hero-content { grid-template-columns: 1fr; gap: 40px; padding: 48px 20px 60px; }
  .hero-visual { display: none; }
  .hero-title { font-size: clamp(2rem, 7vw, 2.8rem); }
  .hero-desc { font-size: 14.5px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-actions .btn-primary, .hero-actions .btn-ghost { width: 100%; justify-content: center; }

  /* Step header */
  .step-header { gap: 12px; margin-bottom: 28px; padding-bottom: 18px; }
  .si-num { font-size: 20px; }
  .si-label { font-size: 13px; }

  /* Verify */
  .verify-layout { grid-template-columns: 1fr; gap: 28px; }
  .verify-form-card { padding: 24px 20px; }

  /* Candidates */
  .candidate-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .party-filter-btn { font-size: 12px; padding: 7px 14px; }
  .position-group { margin-bottom: 40px; }

  /* Ballot */
  .ballot-option { padding: 14px 16px; gap: 12px; }
  .ballot-cand-photo { width: 40px; height: 40px; }
  .ballot-position-header { padding: 16px 18px; }
  .ballot-actions .btn-primary { width: 100%; justify-content: center; }

  /* Review */
  .review-item { flex-direction: column; align-items: flex-start; gap: 12px; }
  .review-position { min-width: auto; }
  .review-arrow { display: none; }
  .review-actions { flex-direction: column-reverse; width: 100%; }
  .review-actions .btn-outline, .review-actions .btn-primary { width: 100%; justify-content: center; }

  /* Success */
  .success-wrapper { padding: 48px 16px; }
  .ref-num { font-size: 1.3rem; letter-spacing: 2px; }

  /* Modal */
  .modal-overlay { padding: 12px; }
  .modal-card { border-radius: var(--radius-lg); }

  /* Meta */
  .meta-item { min-width: auto; width: 100%; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .site-footer { margin-top: 40px; }
}

@media (max-width: 480px) {
  /* Header — compact on small screens */
  .header-inner { height: 58px; }
  .logo-badge { width: 38px; height: 38px; }
  .org-name { font-size: 11px; max-width: 110px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .election-label { font-size: 9px; }
  .header-status { font-size: 11px; padding: 5px 10px; max-width: 120px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block; }
  .admin-link { padding: 5px 9px; font-size: 11px; gap: 4px; margin-left: 6px; }
  .admin-link svg { display: none; }

  /* Container */
  .container { padding: 20px 14px 52px; }

  /* Hero */
  .hero-content { padding: 36px 16px 52px; }
  .election-badge { font-size: 12px; padding: 7px 14px; }
  .meta-item { padding: 10px 14px; font-size: 13px; }
  .hero-actions .btn-primary.btn-large { font-size: 14px; padding: 13px 24px; }

  /* Step header */
  .step-header { gap: 10px; margin-bottom: 22px; }
  .back-btn { padding: 8px 12px; font-size: 12px; }
  .si-num { font-size: 18px; }

  /* Candidate cards */
  .candidate-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .candidate-info { padding: 12px; }
  .candidate-name { font-size: 13px; }
  .candidate-position-badge { font-size: 10px; padding: 4px 10px; }
  .candidates-header { margin-bottom: 24px; }
  .position-label { font-size: 12px; letter-spacing: 1.5px; }
  .party-filters { gap: 8px; margin-bottom: 24px; }
  .party-filter-btn { font-size: 11px; padding: 6px 12px; }

  /* Verify form */
  .verify-form-card { padding: 20px 16px; border-radius: var(--radius-lg); }
  .form-card-header { gap: 12px; margin-bottom: 22px; }
  .form-card-icon { width: 40px; height: 40px; }
  .form-card-header h3 { font-size: 15px; }
  .info-rules { margin-top: 20px; gap: 10px; }
  .rule-item { padding: 12px 14px; gap: 10px; }

  /* Ballot */
  .ballot-header { margin-bottom: 24px; }
  .ballot-option { padding: 12px 14px; gap: 10px; }
  .ballot-cand-photo { width: 38px; height: 38px; }
  .ballot-cand-name { font-size: 13px; }
  .ballot-progress { padding: 16px 18px; }
  .ballot-position-header { padding: 14px 16px; }
  .ballot-position-header h3 { font-size: 13px; }
  .ballot-radio { width: 20px; height: 20px; }

  /* Review */
  .review-item { padding: 14px 16px; }
  .review-warning { padding: 12px 14px; font-size: 12px; }

  /* Success */
  .success-wrapper { padding: 36px 12px; }
  .success-title { font-size: 1.7rem; }
  .success-desc { font-size: 14px; }
  .ref-card { padding: 22px 18px; }
  .ref-num { font-size: 1.1rem; }

  /* Modal */
  .modal-overlay { padding: 8px; align-items: flex-end; }
  .modal-card { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 92vh; }

  /* Section titles */
  .section-title { font-size: clamp(1.3rem, 5vw, 1.8rem); }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 24px; padding: 32px 16px 24px; }
  .footer-bottom { padding: 16px; }
}

@media (max-width: 360px) {
  .header-inner { padding: 0 10px; }
  .container { padding: 16px 10px 44px; }
  .candidate-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .candidate-info { padding: 10px; }
  .candidate-name { font-size: 12px; }
  .ballot-option { padding: 10px 12px; gap: 8px; }
  .verify-form-card { padding: 16px 12px; }
  .hero-content { padding: 28px 12px 40px; }
}

/* ======= ADMIN MODE — hide site chrome ======= */
body.admin-mode .site-header,
body.admin-mode .site-footer { display: none !important; }
body.admin-mode #app { display: flex; flex-direction: column; min-height: 100vh; }
#stepAdminDashboard { display: none; flex-direction: column; min-height: 100vh; }
#stepAdminDashboard.active { display: flex; }
body.admin-mode #stepAdminDashboard { flex: 1; }

/* ======= ADMIN TOPBAR ======= */
.admin-topbar {
  background: var(--bg);
  box-shadow: 0 3px 16px var(--shadow-dark), 0 1px 4px var(--shadow-dark);
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-topbar-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--neu-raised);
  background: var(--bg);
}
.admin-topbar-title {
  display: block;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.admin-topbar-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-body);
}
.admin-topbar-actions { display: flex; gap: 10px; }
.admin-topbar-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--neu-flat);
  white-space: nowrap;
}
.admin-topbar-btn:hover { color: var(--primary); box-shadow: var(--neu-raised); }
.admin-topbar-btn:active { box-shadow: var(--neu-pressed); }
.admin-topbar-btn--logout:hover { color: var(--danger); }

/* ======= ADMIN BODY LAYOUT ======= */
.admin-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ======= ADMIN SIDEBAR ======= */
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg);
  box-shadow: 4px 0 20px var(--shadow-dark), -1px 0 0 var(--shadow-light);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: flex-start;
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  z-index: 40;
  transition: width .25s cubic-bezier(.4, 0, .2, 1);
}
.admin-sidebar.collapsed { width: 72px; }
.admin-sidebar.collapsed .admin-sidebar-item span { display: none; }
.admin-sidebar.collapsed .admin-sidebar-item {
  justify-content: center;
  padding: 12px;
  gap: 0;
}
.admin-sidebar-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 14px;
  margin-bottom: 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, color .15s, background .15s;
}
.admin-sidebar-toggle svg {
  flex-shrink: 0;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}
.admin-sidebar-toggle:hover {
  color: var(--primary);
  background: rgba(74,144,217,.07);
}
.admin-sidebar:hover .admin-sidebar-toggle,
.admin-sidebar:focus-within .admin-sidebar-toggle {
  opacity: 1;
  pointer-events: auto;
}
.admin-sidebar.collapsed .admin-sidebar-toggle {
  justify-content: center;
  padding: 8px;
  gap: 0;
}
.admin-sidebar.collapsed .admin-sidebar-toggle span { display: none; }
.admin-sidebar.collapsed .admin-sidebar-toggle svg { transform: rotate(180deg); }

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 20px 12px 12px;
  gap: 4px;
}

.admin-sidebar-footer {
  padding: 14px 12px 16px;
  margin-top: auto;
  border-top: 1px solid rgba(0,0,0,.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.015));
}
.admin-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 11px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  text-align: left;
  white-space: nowrap;
}
.admin-sidebar-item svg { opacity: .6; flex-shrink: 0; transition: opacity .15s; }
.admin-sidebar-item:hover {
  color: var(--primary);
  background: rgba(74,144,217,.07);
  box-shadow: var(--neu-flat);
}
.admin-sidebar-item:hover svg { opacity: 1; }
.admin-sidebar-item.active {
  color: var(--primary);
  background: var(--bg);
  box-shadow: var(--neu-pressed);
  font-weight: 700;
}
.admin-sidebar-item.active svg { opacity: 1; }
.admin-sidebar-item--logout {
  color: var(--danger);
  background: rgba(231,76,60,.05);
  box-shadow: inset 0 0 0 1px rgba(231,76,60,.08);
  font-weight: 600;
}
.admin-sidebar-item--logout svg {
  opacity: .82;
}
.admin-sidebar-item--logout:hover {
  color: var(--danger);
  background: rgba(231,76,60,.09);
  box-shadow: var(--neu-flat), inset 0 0 0 1px rgba(231,76,60,.12);
}
.admin-sidebar-item--logout:active {
  box-shadow: var(--neu-pressed), inset 0 0 0 1px rgba(231,76,60,.12);
}

/* ======= ADMIN TAB PANELS ======= */
.admin-tab-panel.hidden { display: none; }

/* ======= ADMIN CONTENT AREA ======= */
.admin-content {
  flex: 1;
  padding: 36px 40px 60px;
  min-width: 0;
}

/* ======= CANDIDATE LIST (admin) ======= */
.admin-cand-list { display: flex; flex-direction: column; gap: 10px; }
.admin-cand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--neu-flat);
  background: var(--bg);
}
.admin-cand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--neu-flat);
  flex-shrink: 0;
  background: var(--bg);
}
.admin-cand-avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: var(--neu-flat);
  flex-shrink: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-head);
}
.admin-cand-info { flex: 1; min-width: 0; }
.admin-cand-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-cand-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.admin-cand-id-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(0,0,0,.05);
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}
.admin-cand-action-btn,
.admin-cand-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.admin-cand-action-btn:hover {
  background: rgba(74,144,217,.12);
  color: var(--primary);
}
.admin-cand-delete-btn:hover {
  background: rgba(231,76,60,.1);
  color: var(--danger);
}
.admin-reset-vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.admin-reset-vote-btn:hover {
  background: rgba(231,76,60,.1);
  color: var(--danger);
}
.admin-voter-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.admin-cand-position-group { margin-bottom: 20px; }
.admin-cand-position-group:last-child { margin-bottom: 0; }
.admin-cand-position-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 4px;
}

@media (max-width: 960px) {
  .admin-sidebar { width: 64px; }
  .admin-sidebar-item span { display: none; }
  .admin-sidebar-item { justify-content: center; padding: 12px; gap: 0; }
  .admin-sidebar-item svg { opacity: .75; }
  .admin-sidebar-item.active svg { opacity: 1; }
}
@media (max-width: 640px) {
  .admin-topbar { padding: 0 16px; height: 58px; }
  .admin-topbar-sub { display: none; }
  .admin-body { flex-direction: column; }
  .admin-sidebar,
  .admin-sidebar.collapsed {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    box-shadow: 0 3px 12px var(--shadow-dark), 0 1px 0 var(--shadow-light);
    overflow-y: hidden;
    overflow-x: auto;
  }
  .admin-sidebar-toggle { display: none; }
  .admin-sidebar.collapsed .admin-sidebar-item span { display: inline; }
  .admin-sidebar.collapsed .admin-sidebar-item {
    justify-content: flex-start;
    padding: 10px 14px;
    gap: 8px;
  }
  .admin-sidebar-nav {
    flex-direction: row;
    padding: 6px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    flex: 1;
    gap: 4px;
  }
  .admin-sidebar-nav::-webkit-scrollbar { display: none; }
  .admin-sidebar-footer {
    border-top: none;
    border-left: 1px solid rgba(0,0,0,.06);
    padding: 6px 8px;
    display: flex;
    align-items: center;
    background: none;
  }
  .admin-sidebar-item { white-space: nowrap; justify-content: flex-start; padding: 10px 14px; gap: 8px; }
  .admin-sidebar-item span { display: inline; font-size: 12px; }
  .admin-content { padding: 20px 16px 48px; }
  .admin-body { min-height: 0; }
}

/* ======= ADMIN LINK IN HEADER ======= */
.admin-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  box-shadow: var(--neu-flat);
  background: var(--bg);
  transition: var(--transition);
  margin-left: 12px;
  white-space: nowrap;
}
.admin-link:hover { color: var(--primary); box-shadow: var(--neu-raised); }
.admin-link:active { box-shadow: var(--neu-pressed); }

/* ======= ADMIN PANELS ======= */
.admin-panel {
  background: var(--bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--neu-raised-lg);
  margin-bottom: 28px;
  overflow: hidden;
}
.admin-panel-header {
  padding: 22px 28px 18px;
  box-shadow: 0 2px 8px var(--shadow-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.admin-panel-header h3 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.admin-panel-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.admin-panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ======= ELECTION STATUS ROW ======= */
.admin-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
}

/* ======= STATS ROW ======= */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.admin-stat-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--neu-raised);
  padding: 24px 20px;
  text-align: center;
}
.admin-stat-num {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}
.admin-stat-voted    { color: var(--success); }
.admin-stat-notvoted { color: var(--accent); }
.admin-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ======= ADMIN SEARCH ======= */
.admin-search {
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text);
  box-shadow: var(--neu-inset);
  outline: none;
  width: 260px;
  transition: var(--transition);
}
.admin-search:focus {
  box-shadow: inset 3px 3px 8px var(--shadow-dark),
              inset -3px -3px 8px var(--shadow-light),
              0 0 0 3px var(--primary-glow);
}

/* ======= ADMIN TABLE ======= */
.admin-table-wrap {
  overflow: auto;
  max-height: 460px;
  padding: 0 4px 8px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  background: var(--bg);
  box-shadow: 0 2px 4px var(--shadow-dark);
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,.04);
  color: var(--text-secondary);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(74,144,217,.03); }

/* ======= VOTER STATUS BADGE ======= */
.voter-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: var(--neu-flat);
}
.voter-status-badge.voted { color: var(--success); }
.voter-status-badge.not-voted { color: var(--text-muted); }

/* ======= ADD CANDIDATE FORM ======= */
.admin-candidate-form {
  padding: 28px 28px 24px;
  border-top: 1px solid rgba(0,0,0,.05);
}
.admin-candidate-form.hidden { display: none; }
.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}
.admin-form-full { grid-column: 1 / -1; }
.admin-form-grid .form-group { margin: 0; }
.admin-form-grid label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.admin-form-grid input,
.admin-form-grid textarea {
  width: 100%;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text);
  box-shadow: var(--neu-inset);
  outline: none;
  transition: var(--transition);
  resize: vertical;
}
.admin-form-grid input:focus,
.admin-form-grid textarea:focus {
  box-shadow: inset 3px 3px 8px var(--shadow-dark),
              inset -3px -3px 8px var(--shadow-light),
              0 0 0 3px var(--primary-glow);
}
.req { color: var(--danger); margin-left: 2px; }
.admin-optional { font-weight: 400; color: var(--text-muted); font-size: 11px; text-transform: none; letter-spacing: 0; }
.admin-field-hint { margin: 8px 4px 0; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.admin-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,.05);
}
.admin-form-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}
.admin-form-message.hidden { display: none; }
.admin-form-message--success { background: rgba(39,174,96,.1); color: var(--success); }
.admin-form-message--error   { background: rgba(231,76,60,.08); color: var(--danger); }

/* ======= VOTE ANALYTICS ======= */
.analytics-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.analytics-hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.5fr auto;
  gap: 24px;
  align-items: center;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.92), rgba(255,255,255,0) 40%),
    linear-gradient(145deg, rgba(74,144,217,0.16), rgba(74,144,217,0.04)),
    var(--bg);
  border-radius: var(--radius-xl);
  padding: 28px 30px;
  box-shadow: var(--neu-raised-lg);
}
.analytics-hero-card::after {
  content: '';
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(74,144,217,0.08);
  filter: blur(8px);
}
.analytics-hero-card--mid {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.92), rgba(255,255,255,0) 40%),
    linear-gradient(145deg, rgba(240,165,0,0.16), rgba(240,165,0,0.04)),
    var(--bg);
}
.analytics-hero-card--mid::after {
  background: rgba(240,165,0,0.1);
}
.analytics-hero-card--high {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.92), rgba(255,255,255,0) 40%),
    linear-gradient(145deg, rgba(39,174,96,0.16), rgba(39,174,96,0.04)),
    var(--bg);
}
.analytics-hero-card--high::after {
  background: rgba(39,174,96,0.1);
}
.analytics-hero-copy,
.analytics-orb {
  position: relative;
  z-index: 1;
}
.analytics-hero-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.05;
  font-weight: 800;
  color: var(--text-primary);
  margin: 8px 0 12px;
}
.analytics-hero-text {
  max-width: 640px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.analytics-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.analytics-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.34);
  box-shadow: var(--neu-flat);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}
.analytics-chip--live {
  color: var(--primary);
}
.analytics-orb {
  --turnout-angle: calc(var(--turnout, 0) * 3.6deg);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  padding: 14px;
  background:
    conic-gradient(from -90deg, var(--primary) 0deg, var(--primary-dark) var(--turnout-angle), rgba(255,255,255,0.55) var(--turnout-angle), rgba(255,255,255,0.28) 360deg);
  box-shadow: var(--neu-raised), inset 0 0 0 1px rgba(255,255,255,0.35);
}
.analytics-hero-card--mid .analytics-orb {
  background:
    conic-gradient(from -90deg, var(--accent) 0deg, #d98600 var(--turnout-angle), rgba(255,255,255,0.55) var(--turnout-angle), rgba(255,255,255,0.28) 360deg);
}
.analytics-hero-card--high .analytics-orb {
  background:
    conic-gradient(from -90deg, var(--success) 0deg, #1e8449 var(--turnout-angle), rgba(255,255,255,0.55) var(--turnout-angle), rgba(255,255,255,0.28) 360deg);
}
.analytics-orb__inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--neu-inset);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.analytics-orb__inner strong {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.analytics-orb__inner span {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.analytics-summary-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  box-shadow: var(--neu-raised);
}
.analytics-summary-card--accent {
  box-shadow: var(--neu-raised), inset 0 0 0 1px rgba(74,144,217,0.14);
}
.analytics-summary-card--warning {
  box-shadow: var(--neu-raised), inset 0 0 0 1px rgba(240,165,0,0.18);
}
.analytics-summary-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.analytics-summary-value {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 12px;
}
.analytics-summary-value--compact {
  font-size: 1.35rem;
}
.analytics-summary-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.analytics-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.analytics-breakdown-card,
.analytics-position-card {
  background: var(--bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--neu-raised);
}
.analytics-breakdown-card {
  padding: 22px 22px 20px;
}
.analytics-section-head {
  margin-bottom: 18px;
}
.analytics-section-head--positions {
  margin-bottom: 0;
}
.analytics-section-kicker {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
}
.analytics-section-title {
  margin-top: 8px;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.analytics-section-subtitle {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}
.analytics-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.analytics-breakdown-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.analytics-breakdown-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.analytics-breakdown-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.analytics-breakdown-count {
  font-size: 12px;
  color: var(--text-muted);
}
.analytics-breakdown-empty,
.analytics-empty-state {
  background: var(--bg);
  box-shadow: var(--neu-inset);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.analytics-empty-state strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-head);
  font-size: 14px;
  color: var(--text-primary);
}
.analytics-empty-state p {
  margin: 0;
  line-height: 1.7;
}
.analytics-empty-state--error strong,
.analytics-empty-state--error {
  color: var(--danger);
}
.analytics-positions-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.analytics-positions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.analytics-position-card {
  padding: 22px;
}
.analytics-position-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}
.analytics-position-name {
  margin-top: 8px;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}
.analytics-position-total {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  box-shadow: var(--neu-flat);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}
.analytics-position-summary {
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.analytics-position-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.analytics-bar-track {
  width: 100%;
  height: 12px;
  border-radius: 99px;
  background: var(--bg);
  box-shadow: var(--neu-pressed);
  overflow: hidden;
}
.analytics-bar-track--sm { height: 8px; }
.analytics-bar-track {
  flex: 1;
}
.analytics-candidate-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.analytics-candidate-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.analytics-candidate-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.analytics-candidate-party {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.22);
  box-shadow: var(--neu-flat);
  padding: 3px 8px;
  border-radius: 99px;
}
.analytics-candidate-party--independent {
  opacity: 0.9;
}
.analytics-leading-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--success);
  background: rgba(39,174,96,.12);
  padding: 3px 8px;
  border-radius: 99px;
}
.analytics-bar-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.analytics-bar-group--stacked .analytics-bar-label {
  min-width: 40px;
}
.analytics-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .5s ease;
}
.analytics-bar-fill--leading  { background: linear-gradient(90deg, var(--success), #1e8449); }
.analytics-bar-fill--secondary { background: linear-gradient(90deg, #b9c2cf, #9aa6b5); }
.analytics-bar-fill--course { background: linear-gradient(90deg, var(--primary), var(--primary-dark)); }
.analytics-bar-fill--year { background: linear-gradient(90deg, var(--accent), #d98600); }
.analytics-bar-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  min-width: 56px;
  text-align: right;
}
.analytics-bar-pct { font-weight: 400; color: var(--text-muted); font-size: 11px; }

/* ======= RESPONSIVE: ADMIN ======= */
@media (max-width: 768px) {
  .admin-stats-row  { grid-template-columns: 1fr 1fr; }
  .admin-search     { width: 100%; }
  .admin-panel-header   { flex-direction: column; align-items: flex-start; }
  .admin-status-row     { flex-direction: column; align-items: flex-start; }
  .admin-form-grid      { grid-template-columns: 1fr; }
  .admin-form-actions   { flex-direction: column-reverse; }
  .admin-form-actions .btn-ghost,
  .admin-form-actions .btn-primary { width: 100%; justify-content: center; }
  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 600px; }
  .admin-topbar { padding: 0 16px; }
  .admin-topbar-sub { display: none; }
  .admin-panel-actions { flex-direction: column; align-items: stretch; }
  .admin-search { min-width: 0; }
  .analytics-hero-card {
    grid-template-columns: 1fr;
    padding: 24px 22px;
  }
  .analytics-orb {
    width: 140px;
    height: 140px;
    margin: 0 auto;
  }
  .analytics-summary-grid,
  .analytics-breakdown-grid,
  .analytics-positions-grid {
    grid-template-columns: 1fr;
  }
  .analytics-position-header,
  .analytics-breakdown-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .analytics-position-total {
    white-space: normal;
  }
}
@media (max-width: 480px) {
  .admin-stats-row { grid-template-columns: 1fr; }
}

