/* ============================================================
   ELECTIONS.CSS — Oron Union Voting Portal
   ============================================================ */

/* ── Scoped page base ── */
.elections-page { background: var(--beige); }

/* ── Live pulsing dot ── */
.live-dot {
  display: inline-block;
  width: 9px; height: 9px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
  margin-right: 6px;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  50%       { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* ================================================================
   AUTH GATE
   ================================================================ */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-overlay {
  position: absolute;
  inset: 0;
  background: var(--maroon);
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(128,0,32,0.6) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(201,168,64,0.15) 0%, transparent 45%);
}

.auth-box {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  padding: 48px 44px 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.45);
  animation: auth-in 0.55s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes auth-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.auth-logo {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 4px 12px rgba(128,0,32,0.25));
}
.auth-logo img { width: 100%; height: 100%; object-fit: contain; }

.auth-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--black);
  text-align: center;
  margin-bottom: 8px;
}

.auth-sub {
  font-size: 0.88rem;
  color: var(--gray);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 28px;
}

.auth-tabs {
  display: flex;
  background: var(--beige);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.auth-tab.active {
  background: var(--white);
  color: var(--red);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form.hidden { display: none; }

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-size: 0.8rem; font-weight: 600; color: #555; letter-spacing: 0.02em; }

.field-group input,
.field-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--black);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.field-group input:focus,
.field-group select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(128,0,32,0.1);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.toggle-pass {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--gray);
}
.toggle-pass svg { width: 18px; height: 18px; }

.auth-error {
  font-size: 0.82rem;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: -4px;
}

.auth-btn {
  padding: 13px 24px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.auth-btn:hover { background: var(--red-hover); box-shadow: 0 6px 20px rgba(128,0,32,0.3); transform: translateY(-1px); }
.auth-btn:active { transform: translateY(0); }

.auth-help {
  font-size: 0.78rem;
  color: var(--gray);
  text-align: center;
  margin-top: 16px;
}
.auth-help a { color: var(--red); text-decoration: none; }

/* New member prompt */
.new-member-prompt { margin-top: 20px; }
.nmp-divider {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.nmp-divider::before, .nmp-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--card-border);
}
.nmp-divider span { font-size: 0.72rem; color: var(--gray); white-space: nowrap; font-weight: 500; }
.nmp-register-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 12px 20px;
  background: var(--beige);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  font-size: 0.88rem; font-weight: 600;
  color: var(--black);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.nmp-register-btn svg { width: 17px; height: 17px; }
.nmp-register-btn:hover { border-color: var(--red); color: var(--red); background: rgba(128,0,32,0.04); }
.nmp-note {
  font-size: 0.72rem; color: var(--gray); text-align: center;
  margin-top: 10px; line-height: 1.5;
}

/* Member ID display in chip */
.member-id-chip {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 2px 8px;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.04em;
  margin-left: 4px;
}

/* ================================================================
   ELECTIONS MAIN
   ================================================================ */
.elections-main { min-height: 100vh; padding-top: 76px; }

/* ── Hero ── */
.elec-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.elec-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--maroon);
  background-image:
    radial-gradient(ellipse at 15% 40%, rgba(128,0,32,0.8) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 60%, rgba(201,168,64,0.18) 0%, transparent 45%);
}

.elec-hero-content {
  position: relative;
  text-align: center;
  padding: 64px 24px 80px;
}

.elec-hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.elec-hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.elec-hero-sub {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  padding: 8px 8px 8px 16px;
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
}
.member-chip svg { width: 18px; height: 18px; opacity: 0.8; }

.logout-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.logout-btn:hover { background: rgba(255,255,255,0.25); }

.elec-hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
}
.elec-hero-wave svg { width: 100%; height: 60px; display: block; }

/* ── Vote stats bar — sticky so members see live counts while scrolling ── */
.vote-stats-bar {
  position: sticky;
  top: 64px;
  z-index: 90;
  background: var(--white);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 18px 24px;
  transition: box-shadow 0.25s;
}
.vote-stats-bar.pinned {
  box-shadow: 0 4px 28px rgba(0,0,0,0.12);
  border-bottom-color: rgba(128,0,32,0.15);
}
.vote-stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.vstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 40px;
  position: relative;
}
/* Highlight the Registered Members stat */
.vstat-members .vstat-num {
  color: #196F3D;
}
.vstat-members .vstat-label {
  color: #196F3D;
  font-weight: 700;
}
.vstat-members .vstat-label::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
  animation: pip-pulse 2s ease-in-out infinite;
}
.vstat-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
  transition: transform 0.3s ease;
}
.vstat-num.bump { transform: scale(1.25); }
.vstat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.vstat-divider {
  width: 1px;
  height: 40px;
  background: var(--card-border);
  flex-shrink: 0;
}

/* ── Section shell ── */
.elec-section { padding: 72px 0; }
.elec-section-beige { background: var(--beige); }
.elec-section-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.elec-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 16px;
}

.elec-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
}
.elec-section-sub { font-size: 0.9rem; color: var(--gray); }

.live-badge {
  display: inline-flex;
  align-items: center;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ================================================================
   ELECTION CARDS
   ================================================================ */
.elections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.elec-empty-note {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--gray);
  font-size: 0.95rem;
}

.election-card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s ease;
}
.election-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

.election-card-header {
  background: var(--maroon);
  background-image: radial-gradient(ellipse at 80% 0%, rgba(128,0,32,0.8) 0%, transparent 60%);
  padding: 24px 24px 22px;
  position: relative;
}
.ec-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.ec-status.active { background: rgba(34,197,94,0.2); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.ec-status.closed { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.15); }
.ec-status.voted  { background: rgba(201,168,64,0.2); color: #fcd34d; border: 1px solid rgba(201,168,64,0.3); }

.ec-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 8px;
}
.ec-deadline {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ec-deadline svg { width: 13px; height: 13px; }

.election-card-body { padding: 22px 24px; }

.ec-desc {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Participation bar */
.ec-participation { margin-bottom: 20px; }
.ec-part-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gray);
  margin-bottom: 6px;
  font-weight: 500;
}
.ec-part-label strong { color: var(--black); }
.ec-part-track {
  height: 5px;
  background: var(--beige);
  border-radius: 10px;
  overflow: hidden;
}
.ec-part-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  width: 0;
  transition: width 1.2s cubic-bezier(0.22,1,0.36,1);
}

/* Top candidates preview */
.ec-candidates-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.ec-cand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.83rem;
}
.ec-cand-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.65rem;
  color: var(--white);
  flex-shrink: 0;
}
.ec-cand-name { color: var(--black); font-weight: 500; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-cand-pct { font-weight: 700; color: var(--red); font-size: 0.8rem; flex-shrink: 0; }
.ec-cand-leading { font-size: 0.65rem; background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; padding: 1px 6px; border-radius: 4px; font-weight: 600; margin-left: 4px; }

.election-card-actions {
  padding: 0 24px 22px;
  display: flex;
  gap: 10px;
}
.ec-btn-vote {
  flex: 1;
  padding: 11px 16px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ec-btn-vote:hover { background: var(--red-hover); box-shadow: 0 6px 18px rgba(128,0,32,0.3); transform: translateY(-1px); }
.ec-btn-vote:disabled { background: var(--gray); cursor: not-allowed; transform: none; box-shadow: none; }

.ec-btn-results {
  flex: 1;
  padding: 11px 16px;
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.ec-btn-results:hover { background: var(--red); color: var(--white); }

/* ================================================================
   VOTE MODAL
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10,0,5,0.75);
  backdrop-filter: blur(4px);
  animation: modal-bg-in 0.25s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes modal-bg-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.vote-modal-box {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modal-in 0.35s cubic-bezier(0.22,1,0.36,1) both;
  box-shadow: 0 40px 100px rgba(0,0,0,0.4);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: var(--beige);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--gray);
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.modal-close:hover { background: #fee2e2; color: var(--red); }

.vote-modal-header {
  padding: 32px 32px 0;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 24px;
  margin-bottom: 0;
}
.vote-modal-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(128,0,32,0.07);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.vote-modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
}
.vote-modal-desc { font-size: 0.85rem; color: var(--gray); line-height: 1.5; }

.vote-modal-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.8rem;
  padding: 10px 16px;
  margin: 20px 32px;
  border-radius: 10px;
}
.vote-modal-warning svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Candidate selection cards */
.candidates-list {
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.candidate-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 2px solid var(--card-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  position: relative;
}
.candidate-option:hover { border-color: rgba(128,0,32,0.3); background: rgba(128,0,32,0.03); }
.candidate-option.selected {
  border-color: var(--red);
  background: rgba(128,0,32,0.04);
  transform: scale(1.01);
}
.candidate-option.selected .cand-radio-dot { background: var(--red); }

.cand-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  flex-shrink: 0;
}
.cand-info { flex: 1; min-width: 0; }
.cand-name { font-weight: 700; font-size: 0.95rem; color: var(--black); margin-bottom: 2px; }
.cand-title-text { font-size: 0.78rem; color: var(--gray); }

.cand-radio {
  width: 20px; height: 20px;
  border: 2px solid var(--card-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.candidate-option.selected .cand-radio { border-color: var(--red); }
.cand-radio-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s;
}

.vote-modal-actions {
  padding: 24px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cast-vote-btn {
  padding: 14px 24px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.cast-vote-btn:hover:not(:disabled) { background: var(--red-hover); box-shadow: 0 6px 20px rgba(128,0,32,0.3); transform: translateY(-1px); }
.cast-vote-btn:disabled { background: var(--light-gray); cursor: not-allowed; }

.cancel-vote-btn {
  padding: 12px 24px;
  background: none;
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.cancel-vote-btn:hover { border-color: var(--red); color: var(--red); }

/* ================================================================
   RESULTS MODAL
   ================================================================ */
.results-modal-box {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modal-in 0.35s cubic-bezier(0.22,1,0.36,1) both;
  box-shadow: 0 40px 100px rgba(0,0,0,0.4);
}

.results-modal-header {
  background: var(--maroon);
  border-radius: 20px 20px 0 0;
  padding: 32px;
}
.results-live-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #86efac;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.results-modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.results-modal-meta { font-size: 0.82rem; color: rgba(255,255,255,0.55); }

.results-list {
  padding: 28px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.result-item { }
.result-item-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.result-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
  flex-shrink: 0;
}
.result-name { font-weight: 600; font-size: 0.95rem; color: var(--black); }
.result-votes { margin-left: auto; font-size: 0.82rem; color: var(--gray); font-weight: 500; }
.result-pct-label { font-weight: 700; font-size: 0.95rem; color: var(--red); margin-left: 8px; }
.result-leading-tag {
  font-size: 0.65rem;
  background: #fef9c3; color: #854d0e;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 6px;
}
.result-my-vote-tag {
  font-size: 0.65rem;
  background: rgba(128,0,32,0.08); color: var(--red);
  border: 1px solid rgba(128,0,32,0.2);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 4px;
}

.result-bar-track {
  height: 8px;
  background: var(--beige);
  border-radius: 10px;
  overflow: hidden;
}
.result-bar-fill {
  height: 100%;
  border-radius: 10px;
  width: 0;
  transition: width 1.1s cubic-bezier(0.22,1,0.36,1);
}

.voted-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(128,0,32,0.06);
  border: 1px solid rgba(128,0,32,0.2);
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 10px;
  margin: 20px 32px 0;
}
.voted-notice svg { width: 16px; height: 16px; flex-shrink: 0; }

.results-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px 28px;
  margin-top: 16px;
  border-top: 1px solid var(--card-border);
}
.results-updated { font-size: 0.75rem; color: var(--gray); }
.close-results-btn {
  padding: 9px 20px;
  background: none;
  border: 1.5px solid var(--card-border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.close-results-btn:hover { border-color: var(--red); color: var(--red); }

/* ================================================================
   SUCCESS OVERLAY
   ================================================================ */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10,0,5,0.8);
  backdrop-filter: blur(6px);
}
.success-overlay.hidden { display: none; }

.success-box {
  background: var(--white);
  border-radius: 24px;
  padding: 48px 44px;
  text-align: center;
  max-width: 380px;
  width: 100%;
  animation: modal-in 0.4s cubic-bezier(0.22,1,0.36,1) both;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}
.success-icon svg { width: 100%; height: 100%; }
.checkmark-circle {
  stroke: var(--red);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: circle-draw 0.55s ease-in-out forwards;
}
.checkmark-check {
  stroke: var(--red);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: check-draw 0.35s ease-in-out 0.45s forwards;
}
@keyframes circle-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes check-draw {
  to { stroke-dashoffset: 0; }
}

.success-box h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 10px;
}
.success-box p { font-size: 0.9rem; color: var(--gray); line-height: 1.5; }

/* ================================================================
   INTEGRITY SECTION
   ================================================================ */
.integrity-section {
  padding: 64px 0;
  background: var(--maroon);
}
.integrity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.integrity-item { text-align: center; }
.integrity-icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.integrity-icon svg { width: 26px; height: 26px; stroke: var(--gold); }
.integrity-item h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.integrity-item p { font-size: 0.82rem; color: rgba(255,255,255,0.6); line-height: 1.6; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
  .integrity-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .vstat { padding: 0 24px; }
}

@media (max-width: 600px) {
  .auth-box { padding: 32px 24px 28px; }
  .field-row { grid-template-columns: 1fr; }
  .vstat { padding: 12px 16px; }
  .vstat-divider { display: none; }
  .vote-stats-inner { justify-content: flex-start; gap: 0; }
  .elec-section-header { flex-direction: column; }
  .elections-grid { grid-template-columns: 1fr; }
  .vote-modal-header, .vote-modal-warning, .candidates-list, .vote-modal-actions { padding-left: 20px; padding-right: 20px; }
  .results-modal-header { padding: 24px 20px; }
  .results-list { padding: 20px 20px 0; }
  .results-footer { padding: 16px 20px 24px; }
  .voted-notice { margin: 16px 20px 0; }
  .integrity-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .success-box { padding: 36px 24px; }
  .elec-hero-content { padding: 50px 20px 70px; }
}

@media (max-width: 400px) {
  .integrity-grid { grid-template-columns: 1fr; }
  .vote-stats-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}
