/* =====================================================
   E-VOTING DE FATMAWATI — Futuristic Modern Civic Election
   Light theme • hijau logo Paguyuban • glassmorphism
   ===================================================== */

:root {
  /* Palet hijau logo Paguyuban De Fatmawati */
  --dfm-red: #2e9e5b;        /* hijau utama logo */
  --dfm-red-dark: #1f7a44;   /* hijau tua */
  --dfm-red-light: #e3f5ea;  /* hijau muda */
  --dfm-red-glow: rgba(46, 158, 91, .35);
  --dfm-ink-green: #1e3a2f;  /* hijau gelap teks logo */
  --ink: #1f2937;
  --muted: #6b7280;
  --bg: #f8fafc;
  --card-bg: rgba(255, 255, 255, .82);
  --border: rgba(229, 231, 235, .9);
  --radius: 20px;
  --shadow: 0 10px 40px -12px rgba(17, 24, 39, .12);
}

* { -webkit-tap-highlight-color: transparent; }

body.app-body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--dfm-red-light) 0%, transparent 60%),
    radial-gradient(900px 400px at -10% 30%, #f0faf4 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  font-size: 16px;
}

/* ---------- Glass cards ---------- */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card-glass {
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Header / brand ---------- */
.site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--border); }
.brand-badge {
  width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: hidden; background: #fff; padding: 6px;
  border: 2px solid var(--dfm-red-light);
  box-shadow: 0 6px 18px -4px var(--dfm-red-glow);
}
.brand-badge img { width: 100%; height: 100%; object-fit: contain; }
.brand-badge-lg { width: 76px; height: 76px; padding: 9px; }
.btn-help {
  border: 1px solid var(--dfm-red-light); color: var(--dfm-red-dark); background: #fff;
  min-height: 44px; font-weight: 600;
}
.btn-help:hover { background: var(--dfm-red-light); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 3rem 1rem 1rem; overflow: hidden; }
.hero-shape {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; pointer-events: none;
  animation: floaty 9s ease-in-out infinite;
}
.hero-shape-1 { width: 260px; height: 260px; background: #bfe8cd; top: -60px; right: -40px; }
.hero-shape-2 { width: 200px; height: 200px; background: #e3f5ea; bottom: 20px; left: -50px; animation-delay: -3s; }
.hero-shape-3 { width: 120px; height: 120px; background: #8fd4a8; top: 40%; left: 15%; animation-delay: -6s; opacity: .35; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.05); }
}
.hero-logo { width: 130px; height: 130px; margin-bottom: .75rem; filter: drop-shadow(0 10px 24px rgba(46,158,91,.28)); }
.badge-status {
  background: linear-gradient(135deg, var(--dfm-red), #4cb878);
  color: #fff; font-weight: 700; letter-spacing: .04em; padding: .55em 1.1em;
  box-shadow: 0 6px 20px -6px var(--dfm-red-glow);
}
.hero-title {
  font-weight: 800; font-size: clamp(1.9rem, 6vw, 3.4rem); line-height: 1.08;
  letter-spacing: -.02em; margin-top: 1rem;
}
.hero-subtitle {
  font-weight: 800; font-size: clamp(1.05rem, 3vw, 1.5rem);
  color: var(--dfm-ink-green); letter-spacing: .28em; margin-bottom: .75rem;
}
.tagline { color: var(--muted); max-width: 520px; margin: 0 auto; }
.schedule-card { max-width: 380px; }
.btn-hero { min-height: 56px; font-weight: 700; border-radius: 999px; }
.btn-primary {
  --bs-btn-bg: var(--dfm-red); --bs-btn-border-color: var(--dfm-red);
  --bs-btn-hover-bg: var(--dfm-red-dark); --bs-btn-hover-border-color: var(--dfm-red-dark);
  --bs-btn-active-bg: var(--dfm-red-dark);
  box-shadow: 0 8px 24px -8px var(--dfm-red-glow);
}
.btn-outline-danger { --bs-btn-color: var(--dfm-red-dark); --bs-btn-border-color: #8fd4a8; min-height: 48px; }
.btn-outline-brand { --bs-btn-color: var(--dfm-red-dark); --bs-btn-border-color: #8fd4a8; min-height: 48px; }
.btn-outline-brand:hover { color: #fff; background: var(--dfm-red); border-color: var(--dfm-red); }

/* ---------- Stats ---------- */
.stat-card { text-align: center; padding: 1.25rem .75rem; transition: transform .2s ease; }
.stat-card:hover { transform: translateY(-3px); }
.stat-value { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; line-height: 1; }
.stat-label { color: var(--muted); font-size: .82rem; margin-top: .35rem; font-weight: 600; }

.feature-icon {
  width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; color: var(--dfm-red);
  background: linear-gradient(135deg, #fff, var(--dfm-red-light));
  border: 1px solid var(--dfm-red-light);
  box-shadow: 0 8px 24px -10px var(--dfm-red-glow);
}

/* ---------- Section titles ---------- */
.section-title, .page-title { font-weight: 800; letter-spacing: -.01em; }
.page-title { font-size: clamp(1.4rem, 4vw, 2rem); }

/* ---------- Progress steps ---------- */
.progress-steps { position: relative; }
.pstep-dot {
  width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid var(--border); color: var(--muted); font-weight: 700;
  transition: all .25s ease;
}
.pstep.active .pstep-dot {
  border-color: var(--dfm-red); color: var(--dfm-red);
  box-shadow: 0 0 0 6px var(--dfm-red-light), 0 6px 18px -6px var(--dfm-red-glow);
  animation: pulseGlow 2s infinite;
}
.pstep.done .pstep-dot { border-color: #86efac; background: #ecfdf5; color: #059669; }
.pstep-label { display: block; font-size: .78rem; font-weight: 600; margin-top: .4rem; color: var(--muted); }
.pstep.active .pstep-label { color: var(--dfm-red-dark); }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 6px var(--dfm-red-light), 0 6px 18px -6px var(--dfm-red-glow); }
  50% { box-shadow: 0 0 0 10px var(--dfm-red-light), 0 6px 22px -6px var(--dfm-red-glow); }
}

/* ---------- Forms ---------- */
.form-control:focus, .form-select:focus {
  border-color: #8fd4a8; box-shadow: 0 0 0 .25rem rgba(46, 158, 91, .12);
}
.code-input {
  font-family: 'Plus Jakarta Sans', monospace; font-weight: 700; letter-spacing: .12em;
  font-size: 1.3rem; text-transform: uppercase;
}
.btn-lg { min-height: 52px; font-weight: 700; }

/* ---------- Verify / success ---------- */
.verify-check, .success-icon, .info-icon, .warn-icon {
  width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem;
}
.verify-check { background: #ecfdf5; color: #059669; border: 2px solid #a7f3d0; }
.success-icon { background: #ecfdf5; color: #059669; border: 2px solid #a7f3d0; box-shadow: 0 0 0 10px #ecfdf580; }
.info-icon { background: var(--dfm-red-light); color: var(--dfm-red-dark); border: 2px solid #bfe8cd; }
.warn-icon { background: #fef3c7; color: #d97706; border: 2px solid #fde68a; }
.data-box { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: .5rem 1.25rem; }
.ref-code { letter-spacing: .1em; color: var(--dfm-red-dark); }

/* ---------- Candidate cards ---------- */
.candidate-card {
  cursor: pointer; position: relative; border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  user-select: none;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  padding: 2.25rem 1.25rem 1.25rem;
}
.candidate-card:hover { transform: translateY(-4px); box-shadow: 0 16px 44px -14px var(--dfm-red-glow); }
.candidate-card.selected {
  border: 2px solid var(--dfm-red);
  box-shadow: 0 0 0 6px var(--dfm-red-light), 0 16px 44px -14px var(--dfm-red-glow);
}
.selected-badge {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%) scale(.85);
  background: linear-gradient(135deg, #059669, #10b981); color: #fff;
  font-size: .72rem; font-weight: 800; padding: .45em 1em; border-radius: 999px;
  opacity: 0; transition: all .2s ease; white-space: nowrap; z-index: 2;
  box-shadow: 0 6px 16px -6px rgba(5, 150, 105, .5);
}
.candidate-card.selected .selected-badge { opacity: 1; transform: translateX(-50%) scale(1); }
.candidate-photo {
  width: 130px; height: 130px; border-radius: 50%; overflow: hidden; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #fff, var(--dfm-red-light));
  border: 3px solid #fff; outline: 2px solid var(--dfm-red-light);
  font-size: 3.4rem; color: #8fd4a8;
}
.candidate-photo img { width: 100%; height: 100%; object-fit: cover; }
.candidate-photo-sm { width: 110px; height: 110px; font-size: 2.8rem; }
.candidate-number {
  display: inline-block; font-weight: 800; color: var(--dfm-red-dark);
  background: var(--dfm-red-light); border-radius: 999px;
  letter-spacing: .12em; font-size: .78rem; padding: .45em 1.1em; margin-top: 1.25rem;
}
.candidate-name { font-weight: 800; font-size: 1.25rem; margin: .6rem 0 .35rem; }
.candidate-vision { color: var(--muted); font-size: .88rem; max-width: 250px; margin: 0 auto 1rem; }
.candidate-card .btn { margin-top: auto; }
.select-hint {
  color: var(--dfm-red-dark); font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  margin-top: .9rem; min-height: 1.4em;
}
.candidate-card.selected .select-hint { visibility: hidden; }

.guide-box { border-left: 4px solid #f59e0b; }

/* ---------- Confirm ---------- */
.confirm-card { border: 2px solid var(--dfm-red-light); }
.confirm-card .candidate-number { margin-top: 1rem; }
.confirm-card .candidate-name { margin-bottom: .25rem; }

/* ---------- How-to ---------- */
.howto-card { padding: 1.1rem 1.25rem; }
.howto-num {
  font-size: 1.6rem; font-weight: 800; color: var(--dfm-red-light);
  -webkit-text-stroke: 1.5px var(--dfm-red); min-width: 52px; line-height: 1;
}
.howto-icon {
  width: 48px; height: 48px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--dfm-red-light); color: var(--dfm-red-dark); font-size: 1.3rem;
}

/* ---------- Result bars ---------- */
.result-bar { height: 14px; border-radius: 999px; background: #f3f4f6; }
.result-bar .progress-bar { background: linear-gradient(90deg, var(--dfm-red), #6cc48f); border-radius: 999px; }
.participation-bar { height: 18px; border-radius: 999px; background: #f3f4f6; }

/* ---------- Admin ---------- */
.admin-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.admin-table td { vertical-align: middle; }
.table-responsive-wrapper { border-radius: var(--radius); overflow: hidden; }
.admin-quick { transition: transform .2s ease; color: var(--ink); }
.admin-quick:hover { transform: translateY(-3px); }
.btn-group-sm > .btn { min-width: 38px; min-height: 38px; }
.navbar .nav-link.active { color: var(--dfm-red-dark) !important; }

.auth-body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(600px 300px at 80% 0%, var(--dfm-red-light), transparent 65%);
}

.site-footer { margin-top: 2rem; }

/* ---------- Responsive & aksesibilitas ---------- */
@media (max-width: 576px) {
  body.app-body { font-size: 15.5px; }
  .hero { padding-top: 2rem; }
  .candidate-photo { width: 112px; height: 112px; }
  .btn-group-sm > .btn { min-width: 42px; min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}