/* =========================================================
   E-VOTING SMPN 94 JAKARTA — Liquid Glass Design System
   ========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --bg-1: #050d24;
  --bg-2: #0a2160;
  --blue: #2f6bff;
  --cyan: #2fd4f0;
  --violet: #7b5cff;
  --gold: #ffcf4a;
  --green: #2fe0a0;
  --red: #ff5a6e;
  --text: #f4f7ff;
  --muted: rgba(228, 236, 255, 0.68);
  --faint: rgba(228, 236, 255, 0.42);
  --glass: rgba(255, 255, 255, 0.085);
  --glass-strong: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-hi: rgba(255, 255, 255, 0.45);
  --radius: 26px;
  --radius-sm: 16px;
  --shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.55);
  --blur: blur(24px) saturate(170%);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--bg-1); }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Gumpalan cahaya bergerak di latar */
.aurora {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 90% at 10% 0%, #123a9c 0%, transparent 55%),
              radial-gradient(90% 80% at 100% 100%, #2a1a7a 0%, transparent 55%),
              linear-gradient(160deg, var(--bg-2), var(--bg-1) 70%);
}
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { width: 46vmax; height: 46vmax; background: var(--blue); top: -14vmax; left: -10vmax; }
.aurora span:nth-child(2) { width: 34vmax; height: 34vmax; background: var(--cyan); bottom: -12vmax; right: -6vmax; animation-delay: -8s; opacity: .38; }
.aurora span:nth-child(3) { width: 30vmax; height: 30vmax; background: var(--violet); top: 30%; left: 55%; animation-delay: -15s; opacity: .4; }
.aurora span:nth-child(4) { width: 14vmax; height: 14vmax; background: var(--gold); top: 62%; left: 12%; animation-delay: -4s; opacity: .18; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 4vmax) scale(1.08); }
  100% { transform: translate(-4vmax, 7vmax) scale(.95); }
}
@media (prefers-reduced-motion: reduce) { .aurora span { animation: none; } }

/* ---------- Glass ---------- */
.glass {
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 rgba(255,255,255,.06), var(--shadow);
}
.glass::before { /* kilap specular */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 60% at 15% -10%, rgba(255,255,255,.22), transparent 55%);
}
.glass > * { position: relative; }

/* ---------- Tipografi ---------- */
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* ---------- Tombol ---------- */
.btn {
  --b: rgba(255,255,255,.1);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 700; font-size: .95rem; color: var(--text);
  padding: .8rem 1.35rem; border-radius: 999px; cursor: pointer;
  background: var(--b); border: 1px solid rgba(255,255,255,.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 22px -10px rgba(0,0,0,.6);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform .15s ease, filter .2s ease, opacity .2s, background .2s;
  white-space: nowrap; user-select: none;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .38; cursor: not-allowed; filter: grayscale(.4); }
.btn-primary { background: linear-gradient(135deg, #3b7bff, #26c6ea); border-color: rgba(255,255,255,.35); }
.btn-gold { background: linear-gradient(135deg, #ffd65c, #ff9f3d); color: #2a1600; border-color: rgba(255,255,255,.5); }
.btn-success { background: linear-gradient(135deg, #23c98b, #1aa6c9); }
.btn-danger { background: linear-gradient(135deg, #ff5a6e, #d6336c); }
.btn-ghost { background: rgba(255,255,255,.08); }
.btn-sm { padding: .45rem .85rem; font-size: .82rem; }
.btn-lg { padding: 1.05rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-icon { width: 2.2rem; height: 2.2rem; padding: 0; }

.spinner {
  width: 1em; height: 1em; border-radius: 50%; display: inline-block;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Form ---------- */
label.field { display: block; margin-bottom: 1rem; }
label.field > span { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: .4rem; }
.input, select.input, textarea.input {
  width: 100%; font: inherit; color: var(--text);
  background: rgba(5, 15, 45, .35); border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px; padding: .8rem 1rem; outline: none;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.25);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(47,212,240,.18), inset 0 2px 6px rgba(0,0,0,.25); }
.input::placeholder { color: var(--faint); }
select.input option { color: #0a1a40; }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .65rem; border-radius: 999px;
  font-size: .74rem; font-weight: 700; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
}
.badge-green { background: rgba(47,224,160,.18); color: #8ff5cf; border-color: rgba(47,224,160,.35); }
.badge-blue { background: rgba(47,107,255,.22); color: #a9c4ff; border-color: rgba(47,107,255,.4); }
.badge-gold { background: rgba(255,207,74,.18); color: #ffe39a; border-color: rgba(255,207,74,.4); }
.badge-red { background: rgba(255,90,110,.18); color: #ffadb8; border-color: rgba(255,90,110,.4); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: rgba(3, 8, 25, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .25s;
}
.modal-overlay.show { opacity: 1; }
.modal {
  width: min(480px, 100%); padding: 1.8rem; max-height: 90vh; overflow: auto;
  background: linear-gradient(150deg, rgba(40,70,150,.72), rgba(15,25,70,.82));
  transform: translateY(14px) scale(.97); transition: transform .3s cubic-bezier(.2,.9,.3,1.2);
}
.modal-wide { width: min(760px, 100%); }
.modal-overlay.show .modal { transform: none; }
.modal-title { font-size: 1.25rem; margin-bottom: .8rem; }
.modal-body { color: var(--muted); line-height: 1.55; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.4rem; flex-wrap: wrap; }

/* ---------- Toast ---------- */
#toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 2000; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast {
  padding: .85rem 1.1rem; border-radius: 16px; font-weight: 600; font-size: .92rem;
  background: rgba(20, 35, 85, .78); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-10px); transition: all .3s;
}
.toast.show { opacity: 1; transform: none; }
.toast-success { border-color: rgba(47,224,160,.55); }
.toast-error { border-color: rgba(255,90,110,.6); background: rgba(90, 20, 40, .8); }
.toast-warn { border-color: rgba(255,207,74,.6); }

/* ---------- Login card (admin/panitia/setup) ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(420px, 100%); padding: 2.2rem 2rem; text-align: center; }
.auth-card .logo { width: 84px; filter: drop-shadow(0 10px 20px rgba(0,0,0,.4)); margin-bottom: .8rem; }
.auth-card h1 { font-size: 1.45rem; }
.auth-card p { margin: .35rem 0 1.6rem; }
.auth-card form { text-align: left; }
.auth-foot { margin-top: 1.2rem; font-size: .8rem; color: var(--faint); }

.notice {
  padding: .9rem 1.1rem; border-radius: 16px; font-size: .88rem; line-height: 1.5;
  background: rgba(255,207,74,.12); border: 1px solid rgba(255,207,74,.35); color: #ffe7a8; margin-bottom: 1rem;
}
.notice-blue { background: rgba(47,107,255,.14); border-color: rgba(47,107,255,.4); color: #cddcff; }
.notice-red { background: rgba(255,90,110,.13); border-color: rgba(255,90,110,.4); color: #ffc4cc; }

/* ---------- Tabel ---------- */
.table-wrap { overflow: auto; border-radius: 18px; border: 1px solid rgba(255,255,255,.12); background: rgba(5,15,45,.25); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th, .tbl td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.tbl th { position: sticky; top: 0; background: rgba(20,40,100,.92); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); z-index: 1; }
.tbl tbody tr:hover { background: rgba(255,255,255,.05); }
.tbl td.wrap { white-space: normal; }
.tbl .actions { display: flex; gap: .35rem; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.hidden { display: none !important; }
