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

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* DL4ALL Brand Colors */
  --green-900: #1b5e20;
  --green-800: #2e7d32;
  --green-700: #388e3c;
  --green-600: #43a047;
  --green-500: #4caf50;
  --green-400: #66bb6a;
  --green-300: #81c784;
  --green-200: #a5d6a7;
  --green-100: #c8e6c9;

  --bg-primary: #060d06;
  --bg-secondary: #0d1a0d;
  --bg-card: rgba(13, 26, 13, 0.75);
  --bg-card-hover: rgba(30, 60, 30, 0.6);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(76, 175, 80, 0.12);
  --glass-border-hover: rgba(76, 175, 80, 0.25);

  --text-primary: #e8f5e9;
  --text-secondary: #a5d6a7;
  --text-muted: #4caf50;
  --text-dark: #1a1a1a;

  --accent: #4caf50;
  --accent-light: #66bb6a;
  --accent-glow: rgba(76, 175, 80, 0.3);
  --success: #4caf50;
  --success-glow: rgba(76, 175, 80, 0.25);
  --error: #ef5350;
  --error-glow: rgba(239, 83, 80, 0.2);
  --warning: #ffa726;

  --gradient-brand: linear-gradient(135deg, #2e7d32, #4caf50, #66bb6a);
  --gradient-dark: linear-gradient(135deg, #1b5e20, #2e7d32);
  --gradient-accent: linear-gradient(135deg, #4caf50, #81c784);
  --gradient-gold: linear-gradient(135deg, #ffa726, #ff7043);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px var(--accent-glow);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(76, 175, 80, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(46, 125, 50, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(102, 187, 106, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* =============================
   LANDING PAGE
   ============================= */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 24px;
  text-align: center;
}

.landing__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.landing__logo-main {
  width: 280px;
  max-width: 60vw;
  animation: floatBounce 3s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(76, 175, 80, 0.3));
}

.landing__logo-nysc {
  width: 100px;
  max-width: 20vw;
  animation: floatBounce 3s ease-in-out infinite 0.5s;
  filter: drop-shadow(0 0 20px rgba(255, 167, 38, 0.2));
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-12px); }
  60% { transform: translateY(-6px); }
}

.landing__title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  animation: fadeUp 0.8s ease forwards;
}

.landing__subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 40px;
  max-width: 500px;
  animation: fadeUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.landing__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

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

.landing__badge {
  position: absolute;
  bottom: 32px;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
}

/* =============================
   LAYOUT
   ============================= */
.app-container {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* =============================
   HEADER
   ============================= */
.header {
  text-align: center;
  padding: 24px 0 16px;
}

.header__logo {
  height: 40px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(76, 175, 80, 0.3));
}

.header__title {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.header__subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* =============================
   GLASS CARD
   ============================= */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--glass-border-hover);
}

/* =============================
   SECTIONS & TRANSITIONS
   ============================= */
.section {
  display: none;
  animation: fadeSlideIn 0.5s ease forwards;
}

.section.active {
  display: block;
}

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

/* =============================
   FORM ELEMENTS
   ============================= */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(76, 175, 80, 0.05);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: var(--transition);
  outline: none;
}

.form-input::placeholder { color: var(--text-muted); font-weight: 400; opacity: 0.6; }

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(76, 175, 80, 0.08);
}

.form-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-glow);
}

/* =============================
   BUTTONS
   ============================= */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.12), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--accent-light);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.btn-outline:hover {
  background: rgba(76, 175, 80, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(76, 175, 80, 0.1);
  color: var(--accent-light);
  border: 1px solid rgba(76, 175, 80, 0.2);
  width: 100%;
}

.btn-secondary:hover {
  background: rgba(76, 175, 80, 0.15);
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* =============================
   SPINNER
   ============================= */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn.loading .spinner { display: inline-block; }
.btn.loading .btn-text { display: none; }

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

/* =============================
   ALERTS
   ============================= */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 8px;
  animation: shakeIn 0.4s ease;
}

.alert.show { display: flex; }

.alert-error {
  background: var(--error-glow);
  border: 1px solid rgba(239, 83, 80, 0.3);
  color: #ef9a9a;
}

.alert-success {
  background: var(--success-glow);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: var(--green-200);
}

@keyframes shakeIn {
  0% { transform: translateX(-10px); opacity: 0; }
  50% { transform: translateX(5px); }
  100% { transform: translateX(0); opacity: 1; }
}

/* =============================
   POSITION HEADER
   ============================= */
.position-header {
  text-align: center;
  margin-bottom: 20px;
}

.position-badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(76, 175, 80, 0.12);
  border: 1px solid rgba(76, 175, 80, 0.25);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.position-counter {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* =============================
   CANDIDATE CARDS (VOTING)
   ============================= */
.candidates-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.candidate-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.candidate-card:hover {
  border-color: var(--glass-border-hover);
  background: rgba(76, 175, 80, 0.04);
}

.candidate-card.selected {
  border-color: var(--accent);
  background: rgba(76, 175, 80, 0.08);
  box-shadow: 0 0 20px var(--accent-glow);
}

.candidate-photo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--glass-border);
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.candidate-photo-placeholder {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.candidate-info { flex: 1; }

.candidate-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.candidate-position {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.candidate-check {
  width: 22px; height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(76, 175, 80, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.candidate-card.selected .candidate-check {
  background: var(--accent);
  border-color: var(--accent);
}

.candidate-card.selected .candidate-check::after {
  content: '✓';
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.candidate-card.selected .candidate-photo {
  border-color: var(--accent);
}

/* =============================
   SECTION TITLES
   ============================= */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* =============================
   STEP INDICATOR
   ============================= */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.step {
  width: 28px; height: 4px;
  border-radius: 2px;
  background: rgba(76, 175, 80, 0.12);
  transition: var(--transition);
}

.step.active {
  background: var(--accent);
  width: 42px;
}

.step.done {
  background: var(--green-700);
}

/* =============================
   SUMMARY / CONFIRMATION
   ============================= */
.summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(76, 175, 80, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.summary-item__photo {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--glass-border);
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.summary-item__info { flex: 1; }

.summary-item__position {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.summary-item__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.summary-item__check {
  color: var(--accent);
  font-size: 1rem;
}

.confirmation {
  text-align: center;
  padding: 20px 0;
}

.confirmation__icon {
  width: 80px; height: 80px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 20px;
  box-shadow: 0 0 40px var(--success-glow);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.confirmation__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.confirmation__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* =============================
   FOOTER
   ============================= */
.footer {
  margin-top: auto;
  text-align: center;
  padding: 24px 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
}

.footer a {
  color: var(--accent-light);
  text-decoration: none;
}

/* =============================
   CANDIDATE TREE PAGE
   ============================= */
.tree-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px;
  position: relative;
  z-index: 1;
}

.tree-page__header {
  text-align: center;
  padding: 32px 0 20px;
}

.tree-page__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tree-page__nav a {
  color: var(--accent-light);
  text-decoration: none;
  font-size: 0.85rem;
}

.tree-section {
  margin-bottom: 48px;
}

.tree-section__title {
  text-align: center;
  margin-bottom: 32px;
}

.tree-section__badge {
  display: inline-block;
  padding: 8px 24px;
  background: var(--gradient-brand);
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* Tree stem */
.tree-timeline {
  position: relative;
  padding: 0;
}

.tree-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), rgba(76, 175, 80, 0.1));
  transform: translateX(-50%);
  border-radius: 2px;
}

.tree-node {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 32px;
  width: 100%;
}

.tree-node::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 50%;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  border-radius: var(--radius-full);
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Left node */
.tree-node--left {
  justify-content: flex-start;
  padding-right: calc(50% + 28px);
}

/* Right node */
.tree-node--right {
  justify-content: flex-end;
  padding-left: calc(50% + 28px);
}

.tree-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  max-width: 320px;
  width: 100%;
  transition: var(--transition);
  animation: fadeSlideIn 0.5s ease forwards;
}

.tree-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(76, 175, 80, 0.15);
}

.tree-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tree-card__photo {
  width: 56px; height: 56px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--glass-border);
  background: var(--bg-secondary);
}

.tree-card__photo-placeholder {
  width: 56px; height: 56px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.tree-card__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tree-card__position {
  font-size: 0.75rem;
  color: var(--accent-light);
  font-weight: 600;
  margin-top: 2px;
}

.tree-card__manifesto {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--transition);
}

.tree-card__manifesto.expanded {
  -webkit-line-clamp: unset;
}

.tree-card__toggle {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--accent-light);
  cursor: pointer;
  font-weight: 600;
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
}

.tree-card__toggle:hover { text-decoration: underline; }

/* Mobile tree */
@media (max-width: 640px) {
  .tree-timeline::before {
    left: 20px;
  }

  .tree-node::before {
    left: 20px;
  }

  .tree-node--left,
  .tree-node--right {
    padding-left: 48px;
    padding-right: 0;
    justify-content: flex-start;
  }

  .tree-card { max-width: 100%; }
}

/* =============================
   ADMIN STYLES
   ============================= */
.admin-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-header__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-badge {
  padding: 4px 12px;
  background: rgba(255, 167, 38, 0.15);
  border: 1px solid rgba(255, 167, 38, 0.3);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--warning);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.admin-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.position-results-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.position-results-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--accent-light);
}

.result-item { margin-bottom: 12px; }

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.result-name { font-size: 0.85rem; font-weight: 600; }

.result-count { font-size: 0.8rem; color: var(--text-secondary); }

.result-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(76, 175, 80, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.result-bar {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-form .form-input {
  padding: 12px 14px;
  font-size: 0.9rem;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.85rem;
}

.manage-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.manage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.manage-item__name { font-size: 0.85rem; font-weight: 500; }
.manage-item__position { font-size: 0.75rem; color: var(--text-muted); }

.btn-delete {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-delete:hover { background: var(--error-glow); }

.admin-auth { max-width: 400px; margin: 80px auto; }

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 700px) {
  .admin-grid { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 480px) {
  .app-container { padding: 16px 12px; }
  .card { padding: 24px 18px; }
  .header__title { font-size: 1.15rem; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(76, 175, 80, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(76, 175, 80, 0.25); }

/* =============================
   VOTER REGISTER (ADMIN)
   ============================= */
[hidden] { display: none !important; }

.register-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.register-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.register-actions .btn { width: auto; }

.register-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 20px;
}

.register-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.register-chip strong {
  font-size: 1rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.register-chip--wide { flex: 1 1 260px; color: var(--text-muted); }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 20px;
  border: 2px dashed rgba(76, 175, 80, 0.3);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 0%, rgba(76, 175, 80, 0.08), transparent 70%);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.dropzone:hover,
.dropzone:focus-within,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: radial-gradient(circle at 50% 0%, rgba(76, 175, 80, 0.16), transparent 75%);
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.08);
}

.dropzone.is-dragover { transform: scale(1.01); }
.dropzone.has-file { border-style: solid; }

.dropzone__icon { font-size: 1.8rem; transition: transform 0.3s; }
.dropzone:hover .dropzone__icon { transform: translateY(-3px); }
.dropzone__title { font-weight: 600; color: var(--text-primary); font-size: 0.95rem; word-break: break-all; }
.dropzone__title u { color: var(--accent-light); text-underline-offset: 3px; }
.dropzone__hint { font-size: 0.75rem; color: var(--text-muted); }
.dropzone__hint code,
.preview-issues code {
  background: rgba(76, 175, 80, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--green-200);
  font-size: 0.75rem;
}

.mode-toggle {
  border: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.mode-toggle legend { margin-bottom: 8px; }

.mode-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.mode-option:hover { border-color: var(--glass-border-hover); }
.mode-option input { accent-color: var(--accent); margin-top: 3px; }
.mode-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(76, 175, 80, 0.08);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.1);
}
.mode-option:has(input[value="replace"]:checked) {
  border-color: var(--warning);
  background: rgba(255, 167, 38, 0.06);
  box-shadow: 0 0 20px rgba(255, 167, 38, 0.08);
}

.mode-option__body { display: flex; flex-direction: column; gap: 2px; }
.mode-option__title { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }
.mode-option__desc { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.4; }

.register-preview {
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border-hover);
  background: rgba(6, 13, 6, 0.6);
  animation: fadeSlideIn 0.35s ease;
}

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

.register-preview.is-loading { opacity: 0.55; pointer-events: none; }

.register-preview__title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-light);
  margin-bottom: 14px;
}

.register-preview__title span { font-weight: 400; color: var(--text-muted); font-size: 0.8rem; }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.preview-stat {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  text-align: center;
}

.preview-stat__value { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); }
.preview-stat__label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-top: 2px; }
.preview-stat--add .preview-stat__value { color: var(--green-300); }
.preview-stat--update .preview-stat__value { color: #90caf9; }
.preview-stat--remove .preview-stat__value { color: var(--error); }
.preview-stat--warn .preview-stat__value { color: var(--warning); }
.preview-stat--muted { opacity: 0.6; }

.preview-issues { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.preview-issues:empty { display: none; }

.preview-note {
  font-size: 0.8rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.preview-note--warn { background: rgba(255, 167, 38, 0.08); border: 1px solid rgba(255, 167, 38, 0.25); color: #ffcc80; }
.preview-note--info { background: rgba(76, 175, 80, 0.06); border: 1px solid var(--glass-border); color: var(--text-secondary); }

.preview-note ul {
  list-style: none;
  margin-top: 6px;
  max-height: 140px;
  overflow-y: auto;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.register-preview__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.register-preview__footer .btn { width: auto; min-width: 140px; }
.register-preview__footer .btn-primary.is-danger {
  background: var(--gradient-gold);
  box-shadow: 0 4px 16px rgba(255, 167, 38, 0.25);
}

@media (max-width: 600px) {
  .mode-toggle { grid-template-columns: 1fr; }
  .register-preview__footer .btn { flex: 1; min-width: 0; }
}

/* =============================
   CANDIDATE PHOTO UPLOAD & PREVIEW
   ============================= */
.cand-image-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.cand-image-toggle {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.cand-toggle-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cand-toggle-btn:hover:not(.active) {
  background: rgba(76, 175, 80, 0.1);
  color: var(--text-primary);
}

.cand-toggle-btn.active {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.cand-image-input-wrap {
  width: 100%;
}

.cand-image-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 14px;
  border: 2px dashed rgba(76, 175, 80, 0.3);
  border-radius: var(--radius-md);
  background: rgba(76, 175, 80, 0.03);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.cand-image-dropzone:hover,
.cand-image-dropzone.is-dragover {
  border-color: var(--accent);
  background: rgba(76, 175, 80, 0.09);
  box-shadow: 0 0 16px rgba(76, 175, 80, 0.15);
  transform: translateY(-1px);
}

.cand-image-dropzone__icon {
  font-size: 1.5rem;
  transition: transform 0.2s;
}

.cand-image-dropzone:hover .cand-image-dropzone__icon {
  transform: scale(1.1);
}

.cand-image-dropzone__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cand-image-dropzone__hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cand-photo-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  animation: fadeSlideIn 0.3s ease;
}

.cand-photo-preview__thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  background: var(--bg-secondary);
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.cand-photo-preview__details {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.cand-photo-preview__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.cand-photo-preview__meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.cand-photo-preview__remove {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

.cand-photo-preview__remove:hover {
  background: var(--error-glow);
  transform: scale(1.1);
}

/* =============================
   VOTER REGISTER HUB & SINGLE REGISTRATION
   ============================= */
.voter-nav-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin: 18px 0 16px;
  flex-wrap: wrap;
}

.voter-nav-btn {
  flex: 1 1 160px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.voter-nav-btn:hover:not(.active) {
  background: rgba(76, 175, 80, 0.08);
  color: var(--text-primary);
}

.voter-nav-btn.active {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.voter-tab-pane {
  animation: fadeSlideIn 0.3s ease;
}

.single-voter-card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.single-voter-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 650px) {
  .single-voter-form-grid {
    grid-template-columns: 1fr;
  }
}

.recent-voters-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--glass-border);
}

.recent-voters-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.voter-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(6, 13, 6, 0.5);
  margin-top: 14px;
}

.voter-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.voter-table th {
  padding: 12px 14px;
  background: rgba(76, 175, 80, 0.08);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}

.voter-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(76, 175, 80, 0.07);
  color: var(--text-primary);
  vertical-align: middle;
}

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

.voter-table tr:hover td {
  background: rgba(76, 175, 80, 0.03);
}

.voter-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.voter-badge-status.voted {
  background: rgba(76, 175, 80, 0.15);
  color: var(--green-300);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.voter-badge-status.not-voted {
  background: rgba(255, 167, 38, 0.1);
  color: #ffb74d;
  border: 1px solid rgba(255, 167, 38, 0.25);
}

.voter-code-badge {
  font-family: monospace;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(76, 175, 80, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.voter-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.voter-search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.voter-search-bar .form-input {
  flex: 1;
}



