/* ============ Quick Count — tema modern gelap ============ */
:root {
  --bg: #060913; --bg2: #0b1124;
  --glass: rgba(255, 255, 255, .045); --glass2: rgba(255, 255, 255, .07);
  --stroke: rgba(255, 255, 255, .09); --stroke2: rgba(255, 255, 255, .16);
  --text: #e9edf9; --muted: #8b94b3; --dim: #5d6685;
  --cyan: #22d3ee; --violet: #8b5cf6; --pink: #ec4899; --green: #22c55e; --amber: #f59e0b; --red: #f43f5e;
  --grad: linear-gradient(135deg, #22d3ee, #8b5cf6 55%, #ec4899);
  --radius: 18px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; overflow-x: hidden; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
::selection { background: rgba(139, 92, 246, .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 10px; border: 2px solid var(--bg); }

/* ---------- background bergerak ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(90px); opacity: .32; animation: float 22s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { background: #1d4ed8; top: -20vmax; left: -15vmax; }
.aurora span:nth-child(2) { background: #7c3aed; bottom: -25vmax; right: -15vmax; animation-duration: 28s; animation-delay: -6s; }
.aurora span:nth-child(3) { background: #0891b2; top: 30%; left: 40%; width: 35vmax; height: 35vmax; opacity: .18; animation-duration: 34s; animation-delay: -12s; }
@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vmax, 6vmax) scale(1.15); }
  100% { transform: translate(-6vmax, 10vmax) scale(.95); }
}
.grid-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }

/* ---------- LOGIN ---------- */
.login { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px 16px; }
#net { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; }
.login-wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; width: 100%; max-width: 1020px; flex: 1; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; gap: 28px; } .login-hero { text-align: center; } .hero-stats { justify-content: center; } }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: var(--glass2); border: 1px solid var(--stroke); font-size: 12px; font-weight: 600; color: #b9c3e6; backdrop-filter: blur(10px); animation: rise .8s both; }
.glitch { position: relative; font-size: clamp(42px, 7vw, 78px); font-weight: 800; letter-spacing: -.02em; line-height: 1; margin: 18px 0 14px;
  background: var(--grad); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradmove 6s ease infinite, rise .8s .1s both; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; background: inherit; -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .7; }
.glitch::before { animation: glitch1 3.5s infinite steps(1); }
.glitch::after { animation: glitch2 3.5s infinite steps(1); }
@keyframes glitch1 { 0%, 92%, 100% { transform: none; clip-path: inset(0 0 100% 0); } 93% { transform: translate(-3px, 1px); clip-path: inset(10% 0 55% 0); } 95% { transform: translate(3px, -1px); clip-path: inset(60% 0 10% 0); } }
@keyframes glitch2 { 0%, 92%, 100% { transform: none; clip-path: inset(0 0 100% 0); } 94% { transform: translate(3px, 0); clip-path: inset(35% 0 35% 0); } 96% { transform: translate(-2px, 1px); clip-path: inset(80% 0 2% 0); } }
@keyframes gradmove { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.login-sub { font-size: 20px; font-weight: 800; color: var(--text); margin: 0 0 8px; animation: rise .8s .15s both; }
.login-sub:empty { display: none; }
.typed { font-size: 17px; color: #c3cbe6; min-height: 26px; margin: 0 0 26px; font-weight: 500; animation: rise .8s .2s both; }
.caret { color: var(--cyan); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; animation: rise .8s .3s both; }
.hero-stats div { padding: 12px 18px; border-radius: 14px; background: var(--glass); border: 1px solid var(--stroke); backdrop-filter: blur(10px); min-width: 96px; }
.hero-stats b { display: block; font-size: 20px; font-family: var(--mono); }
.hero-stats span { font-size: 12px; color: var(--muted); }

.login-card { position: relative; padding: 34px 30px 28px; border-radius: 24px; background: rgba(12, 17, 36, .72); backdrop-filter: blur(20px); animation: rise .8s .15s both; isolation: isolate; }
.login-card::before { content: ""; position: absolute; inset: -1px; border-radius: 25px; padding: 1.5px; z-index: -1;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 25%, #22d3ee, #8b5cf6, #ec4899, transparent 75% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 5s linear infinite; }
.login-card::after { content: ""; position: absolute; inset: 0; border-radius: 24px; z-index: -2; box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 60px rgba(139,92,246,.18); }
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --ang: 360deg; } }
.login-card h2 { margin: 18px 0 4px; font-size: 22px; }
.login-card > .muted { margin: 0 0 22px; }
.login-logo { width: 64px; height: 64px; position: relative; }
.login-logo::before { content: ""; position: absolute; inset: -6px; border-radius: 22px; border: 2px dashed rgba(34,211,238,.45); animation: spin2 12s linear infinite; }
@keyframes spin2 { to { transform: rotate(360deg); } }
.logo-core { width: 64px; height: 64px; border-radius: 18px; background: var(--grad); background-size: 200% 200%; animation: gradmove 5s ease infinite; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; color: #fff; font-family: var(--mono); box-shadow: 0 10px 30px rgba(139,92,246,.45); }
.logo-core.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; flex: none; }

.field { position: relative; margin-bottom: 16px; }
.field input { width: 100%; padding: 22px 44px 8px 14px; border-radius: 12px; border: 1px solid var(--stroke2); background: rgba(255,255,255,.04); color: var(--text); font: inherit; font-size: 15px; transition: border-color .2s, box-shadow .2s, background .2s; }
.field label { position: absolute; left: 15px; top: 15px; color: var(--muted); font-size: 14px; pointer-events: none; transition: all .2s; }
.field input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139,92,246,.18); background: rgba(255,255,255,.06); }
.field input:focus + label, .field input:not(:placeholder-shown) + label { top: 7px; font-size: 11px; color: #b7a6ff; font-weight: 600; }
.eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 16px; opacity: .6; color: var(--text); }
.eye:hover { opacity: 1; }

.powered { position: relative; z-index: 1; text-align: center; font-size: 12px; color: var(--muted); padding: 18px 0 6px; letter-spacing: .02em; }
.powered.sm { font-size: 11px; padding: 6px 0 0; line-height: 1.6; }
.brand-404 { background: linear-gradient(90deg, #22d3ee, #a78bfa, #f472b6, #22d3ee); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradmove 5s linear infinite; font-weight: 800; }

/* ---------- tombol ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; padding: 10px 18px; border-radius: 12px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; color: #fff; background: var(--glass2); transition: transform .15s, box-shadow .25s, background .2s, filter .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.block { width: 100%; }
.btn.primary { background: var(--grad); background-size: 200% 200%; animation: gradmove 6s ease infinite; box-shadow: 0 8px 26px rgba(139,92,246,.35); }
.btn.primary:hover { box-shadow: 0 12px 34px rgba(139,92,246,.55); }
.btn.excel { background: linear-gradient(135deg, #16a34a, #0d9488); box-shadow: 0 8px 22px rgba(22,163,74,.3); }
.btn.wa { background: linear-gradient(135deg, #25d366, #128c7e); box-shadow: 0 8px 22px rgba(37,211,102,.28); }
.btn.danger { background: linear-gradient(135deg, #f43f5e, #be123c); box-shadow: 0 8px 22px rgba(244,63,94,.28); }
.btn.ghost { background: transparent; border-color: var(--stroke2); color: #cdd4ee; }
.btn.ghost:hover { background: var(--glass2); }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
.btn.sm svg { width: 14px; height: 14px; }
.shine::after, .btn.primary::after, .btn.excel::after, .btn.wa::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); animation: sweep 3.5s ease-in-out infinite; }
@keyframes sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn.loading span { opacity: 0; }
.btn.loading::before { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin2 .7s linear infinite; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--glass); color: var(--text); cursor: pointer; font-size: 18px; }

/* ---------- layout app ---------- */
.app { position: relative; z-index: 1; display: flex; min-height: 100vh; }
.sidebar { width: 266px; flex: none; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: rgba(9, 13, 28, .66); backdrop-filter: blur(22px); border-right: 1px solid var(--stroke); z-index: 40; }
.brand { display: flex; gap: 12px; align-items: center; padding: 22px 18px 18px; }
.brand-title { font-weight: 800; font-size: 14px; line-height: 1.25; }
.brand-sub { font-size: 12px; color: var(--muted); }
nav#menu { position: relative; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
nav#menu button { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; text-align: left; border: 0; background: none; color: #aab3d1; padding: 12px 14px; border-radius: 12px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; transition: color .2s, background .2s, transform .2s; }
nav#menu button svg { width: 19px; height: 19px; flex: none; transition: transform .3s; }
nav#menu button:hover { color: #fff; background: rgba(255,255,255,.04); }
nav#menu button:hover svg { transform: scale(1.12) rotate(-4deg); }
nav#menu button.active { color: #fff; }
nav#menu button .badge { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.badge.on { background: var(--green) !important; box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: ping 2s infinite; }
.badge.warn { background: var(--amber) !important; animation: ping 1.4s infinite; }
.badge.off { background: var(--red) !important; }
.pill { position: absolute; left: 12px; right: 12px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, rgba(34,211,238,.18), rgba(139,92,246,.26)); border: 1px solid rgba(139,92,246,.35); box-shadow: 0 6px 24px rgba(139,92,246,.22); transition: top .4s cubic-bezier(.6,-0.28,.3,1.3); z-index: 0; }
.pill::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--grad); }
.side-foot { padding: 14px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--stroke); }
.content { flex: 1; min-width: 0; padding: 0 28px 10px; display: flex; flex-direction: column; }
#page { flex: 1; }
.topbar { position: relative; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 18px 0 16px; margin-bottom: 6px; background: transparent; }
.tb-title { flex: 1; min-width: 0; }
.tb-title h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.tb-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.clock { font-family: var(--mono); font-size: 13px; color: #b9c2e2; padding: 8px 12px; border-radius: 10px; background: var(--glass); border: 1px solid var(--stroke); }
.live { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; padding: 8px 12px; border-radius: 10px; background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: #86efac; }
.live.off { background: rgba(244,63,94,.1); border-color: rgba(244,63,94,.35); color: #fda4af; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: ping 2s infinite; flex: none; }
.live.off .live-dot { background: var(--red); animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.7); } 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.menu-toggle { display: none; }
.scrim { display: none; }
.page-foot { padding: 26px 0 10px; }
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
  .sidebar.open { transform: none; box-shadow: 30px 0 60px rgba(0,0,0,.5); }
  .scrim.show { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.45); backdrop-filter: blur(2px); }
  .menu-toggle { display: inline-block; }
  .content { padding: 0 16px 10px; }
  .clock { display: none; }
}

/* ---------- animasi masuk halaman ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
#page.enter > * { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
#page.enter > *:nth-child(2) { animation-delay: .07s; }
#page.enter > *:nth-child(3) { animation-delay: .14s; }
#page.enter > *:nth-child(4) { animation-delay: .21s; }
#page.enter > *:nth-child(5) { animation-delay: .28s; }
#page.enter > *:nth-child(6) { animation-delay: .35s; }
.stagger > * { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 60ms + .1s); }
#page:not(.enter) .stagger > * { animation: none; }

/* ---------- kartu ---------- */
.card { position: relative; background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; backdrop-filter: blur(16px); }
.card h3 { margin: 0 0 16px; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card h3 .right { margin-left: auto; }
.card h3 small { font-size: 12px; font-weight: 500; color: var(--muted); }
.h-ico { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(139,92,246,.18); color: #c4b5fd; flex: none; }
.h-ico svg { width: 17px; height: 17px; }
.row2 { display: grid; grid-template-columns: 360px 1fr; gap: 18px; }
@media (max-width: 1100px) { .row2 { grid-template-columns: 1fr; } }
.row2 > .card { margin-bottom: 18px; }

/* hero dashboard */
.hero { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: 24px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 200px at 0% 0%, rgba(34,211,238,.16), transparent), radial-gradient(500px 220px at 100% 100%, rgba(236,72,153,.14), transparent); pointer-events: none; }
.hero-info { flex: 1; min-width: 240px; position: relative; }
.hero-info .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.hero-info h1 { margin: 6px 0 6px; font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.hero-info p { margin: 0; color: var(--muted); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ring { position: relative; width: 140px; height: 140px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: rgba(255,255,255,.08); }
.ring::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; box-shadow: 0 0 40px rgba(139,92,246,.35); }
.ring .val { stroke: url(#gradRing); stroke-linecap: round; transition: stroke-dasharray 1.2s cubic-bezier(.2,.8,.2,1); }
.ring .lbl { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .lbl b { font-size: 26px; font-family: var(--mono); }
.ring .lbl > span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* stat */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat { position: relative; overflow: hidden; padding: 18px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--stroke); backdrop-filter: blur(16px); transition: transform .3s, border-color .3s, box-shadow .3s; }
.stat:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 16px 40px -12px color-mix(in srgb, var(--c) 45%, transparent); }
.stat::after { content: ""; position: absolute; width: 140px; height: 140px; right: -50px; top: -50px; border-radius: 50%; background: var(--c); opacity: .14; filter: blur(30px); transition: opacity .3s; }
.stat:hover::after { opacity: .3; }
.stat .ico { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); margin-bottom: 14px; }
.stat .ico svg { width: 21px; height: 21px; }
.stat .label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat .value { font-size: 30px; font-weight: 800; margin-top: 4px; font-family: var(--mono); letter-spacing: -.02em; }
.stat .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* calon */
.cands { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cand { position: relative; overflow: hidden; border-radius: var(--radius); padding: 18px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 14%, transparent), rgba(255,255,255,.02)); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); transition: transform .35s, box-shadow .35s; }
.cand:hover { transform: translateY(-5px) rotate(-.3deg); box-shadow: 0 22px 50px -18px color-mix(in srgb, var(--c) 65%, transparent); }
.cand.lead { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 70%, transparent), 0 20px 50px -20px color-mix(in srgb, var(--c) 80%, transparent); }
.cand .top { display: flex; gap: 14px; align-items: center; margin-top: 22px; }
.avatar { position: relative; width: 62px; height: 62px; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--c) 40%, #111) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; font-weight: 800; font-family: var(--mono); }
.avatar::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; padding: 2px; background: conic-gradient(var(--c), transparent 60%, var(--c)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin2 6s linear infinite; }
.cand .no { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .1em; }
.cand .nm { font-weight: 800; font-size: 16px; line-height: 1.25; }
.cand .pct { font-size: 38px; font-weight: 800; margin-top: 14px; font-family: var(--mono); letter-spacing: -.03em; color: var(--c); text-shadow: 0 0 24px color-mix(in srgb, var(--c) 50%, transparent); }
.cand .votes { color: var(--muted); font-size: 13px; }
.cand .rank { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.08); color: #cbd3ee; }
.cand.lead .rank { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #3b2500; box-shadow: 0 0 18px rgba(251,191,36,.5); animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.bar { height: 10px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 60%, #fff 0%), var(--c)); position: relative; overflow: hidden; transition: width 1.2s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 70%, transparent); }
.bar > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: translateX(-100%); animation: shimmer 2.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* donut */
.donut-wrap { display: flex; flex-direction: column; align-items: center; }
.donut { width: 220px; height: 220px; position: relative; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle.seg { transition: stroke-dasharray 1.2s cubic-bezier(.2,.8,.2,1), stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.donut .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut .mid b { font-size: 26px; font-family: var(--mono); }
.donut .mid span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.legend { list-style: none; padding: 0; margin: 16px 0 0; width: 100%; }
.legend li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--stroke); }
.legend li:last-child { border: 0; }
.legend .sw { width: 11px; height: 11px; border-radius: 4px; flex: none; box-shadow: 0 0 10px currentColor; }
.legend b { margin-left: auto; font-family: var(--mono); }

/* tile TPS */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; overflow: hidden; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--stroke); transition: transform .3s, border-color .3s; }
.tile:hover { transform: translateY(-3px); }
.tile .k { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tile .n { font-weight: 800; font-size: 15px; margin: 2px 0 6px; }
.tile .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .st { margin-top: 10px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tile.in { border-color: rgba(34,197,94,.45); background: linear-gradient(160deg, rgba(34,197,94,.14), rgba(255,255,255,.02)); }
.tile.in .st { color: #86efac; }
.tile.wait .st { color: #fcd34d; }
.dots i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-right: 3px; animation: dot 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1.2); } }
.tile.flash, tr.flash td { animation: flash 2.6s ease-out; }
@keyframes flash { 0% { box-shadow: inset 0 0 0 200px rgba(34,211,238,.28); } 100% { box-shadow: inset 0 0 0 200px transparent; } }
.tile .lock { position: absolute; top: 10px; right: 10px; font-size: 12px; }

/* ---------- form ---------- */
label.lbl { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--stroke2); border-radius: 11px; font: inherit; font-size: 14px; background: rgba(255,255,255,.04); color: var(--text); transition: border-color .2s, box-shadow .2s, background .2s; }
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139,92,246,.18); background: rgba(255,255,255,.06); }
input[type=color] { padding: 3px; height: 42px; cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--dim); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; align-items: center; }

.switch { position: relative; display: inline-flex; width: 44px; height: 24px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.12); transition: background .25s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.switch input:checked + span { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.switch input:checked + span::before { transform: translateX(20px); }

/* ---------- tabel ---------- */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--stroke); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--stroke); text-align: left; white-space: nowrap; vertical-align: middle; }
th { background: rgba(255,255,255,.035); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; position: sticky; top: 0; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(255,255,255,.03); }
tbody tr:last-child td { border-bottom: 0; }
.stagger-rows tr { animation: rise .5s both; animation-delay: calc(var(--i, 0) * 45ms + .15s); }
#page:not(.enter) .stagger-rows tr { animation: none; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 800; background: rgba(139,92,246,.1); }
td input { padding: 8px 10px; font-size: 13px; min-width: 60px; }
.tps-table th, .tps-table td { padding: 9px 7px; }
.row-act { display: flex; gap: 6px; }
td.wrap { white-space: normal; min-width: 220px; max-width: 420px; }
.sub { font-size: 11px; color: var(--muted); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; border: 1px solid transparent; }
.tag.ok { background: rgba(34,197,94,.13); color: #86efac; border-color: rgba(34,197,94,.3); }
.tag.no { background: rgba(244,63,94,.12); color: #fda4af; border-color: rgba(244,63,94,.3); }
.tag.wa { background: rgba(37,211,102,.12); color: #6ee7b7; border-color: rgba(37,211,102,.3); }
.tag.info { background: rgba(34,211,238,.12); color: #67e8f9; border-color: rgba(34,211,238,.3); }
.tag.warn { background: rgba(245,158,11,.13); color: #fcd34d; border-color: rgba(245,158,11,.3); }
.tag.vio { background: rgba(139,92,246,.15); color: #c4b5fd; border-color: rgba(139,92,246,.35); }

.msg { padding: 11px 14px; border-radius: 12px; margin-top: 14px; font-size: 13px; animation: rise .3s both; border: 1px solid; }
.msg.err { background: rgba(244,63,94,.1); color: #fda4af; border-color: rgba(244,63,94,.3); }
.msg.ok { background: rgba(34,197,94,.1); color: #86efac; border-color: rgba(34,197,94,.3); }
.msg.warn { background: rgba(245,158,11,.1); color: #fcd34d; border-color: rgba(245,158,11,.3); }
.note { color: var(--muted); font-size: 12.5px; line-height: 1.65; margin-top: 12px; }
.empty { text-align: center; color: var(--muted); padding: 34px; }
.empty .big { font-size: 34px; display: block; margin-bottom: 6px; animation: bob 2.5s ease-in-out infinite; }

/* editor calon */
.cand-edit { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 18px; margin-bottom: 14px; border-radius: var(--radius); background: rgba(255,255,255,.03); border: 1px solid var(--stroke); border-left: 4px solid var(--c); transition: border-color .3s, transform .3s; }
.cand-edit:hover { transform: translateX(3px); }
.cand-edit .avatar { width: 100px; height: 100px; font-size: 34px; cursor: pointer; transition: transform .3s; }
.cand-edit .avatar:hover { transform: scale(1.05); }
.cand-edit .avatar .cam { position: absolute; bottom: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 13px; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.cand-edit .fields { display: grid; grid-template-columns: 100px 1fr 80px; gap: 12px; }
.cand-edit .fields .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .cand-edit { grid-template-columns: 1fr; } .cand-edit .fields { grid-template-columns: 1fr 1fr; } }

/* WA */
.wa-box { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .wa-box { grid-template-columns: 1fr; } }
.qr { position: relative; width: 300px; max-width: 100%; aspect-ratio: 1; border-radius: 20px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); padding: 18px; background: rgba(255,255,255,.03); border: 1px solid var(--stroke); overflow: hidden; }
.qr img { width: 100%; border-radius: 12px; background: #fff; padding: 8px; }
.qr.scan::after { content: ""; position: absolute; left: 18px; right: 18px; height: 3px; top: 18px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); box-shadow: 0 0 16px var(--cyan); animation: scan 2.4s ease-in-out infinite alternate; }
@keyframes scan { to { top: calc(100% - 21px); } }
.qr .okbig { font-size: 64px; display: block; animation: pop .6s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes pop { from { transform: scale(0); } }
.radar { width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 12px; position: relative; background: radial-gradient(circle, rgba(34,211,238,.25), transparent 70%); }
.radar::before, .radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(34,211,238,.5); animation: radar 2s ease-out infinite; }
.radar::after { animation-delay: 1s; }
@keyframes radar { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.steps { list-style: none; padding: 0; margin: 14px 0 0; counter-reset: s; }
.steps li { position: relative; padding: 10px 0 10px 44px; color: #c3cbe6; line-height: 1.55; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; width: 30px; height: 30px; border-radius: 10px; background: rgba(139,92,246,.18); color: #c4b5fd; font-weight: 800; display: flex; align-items: center; justify-content: center; font-family: var(--mono); }
.chat { background: #0b141a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23ffffff10'/%3E%3C/svg%3E"); border-radius: 16px; padding: 18px; border: 1px solid var(--stroke); }
.bubble { max-width: 520px; padding: 10px 14px 18px; border-radius: 12px 12px 12px 3px; background: #202c33; color: #e9edef; white-space: pre-wrap; font-size: 13px; line-height: 1.55; position: relative; animation: rise .5s both; }
.bubble.me { margin-left: auto; background: #005c4b; border-radius: 12px 12px 3px 12px; }
.bubble .t { position: absolute; right: 10px; bottom: 4px; font-size: 10px; color: #8696a0; }
.bubble + .bubble { margin-top: 10px; }

/* log */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chipbtn { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--stroke2); background: transparent; color: #b8c1e0; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: all .2s; }
.chipbtn:hover { background: var(--glass2); color: #fff; }
.chipbtn.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(139,92,246,.35); }
.dir { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.dir.in { background: rgba(34,211,238,.14); color: var(--cyan); }
.dir.out { background: rgba(37,211,102,.14); color: #4ade80; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(3, 5, 12, .62); backdrop-filter: blur(8px); animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } }
.modal-box { width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 22px; padding: 24px; background: linear-gradient(160deg, #111833, #0b1024); border: 1px solid var(--stroke2); box-shadow: 0 40px 100px rgba(0,0,0,.6); animation: zoom .4s cubic-bezier(.2,1.2,.3,1) both; }
@keyframes zoom { from { opacity: 0; transform: translateY(20px) scale(.94); } }
.modal-box h3 { margin: 0 0 4px; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.modal-x { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; transition: transform .2s, color .2s; }
.modal-x:hover { color: #fff; transform: rotate(90deg); }
.recips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; max-height: 150px; overflow-y: auto; }
.recip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--stroke2); background: rgba(255,255,255,.03); cursor: pointer; font-size: 12px; font-weight: 600; transition: all .2s; user-select: none; }
.recip input { display: none; }
.recip.on { background: rgba(37,211,102,.14); border-color: rgba(37,211,102,.45); color: #bbf7d0; }
.recip.dis { opacity: .4; cursor: not-allowed; }
.tpls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.send-res { margin-top: 14px; display: grid; gap: 6px; }
.send-res div { padding: 8px 12px; border-radius: 10px; font-size: 13px; animation: rise .3s both; }
.send-res .ok { background: rgba(34,197,94,.1); color: #86efac; }
.send-res .no { background: rgba(244,63,94,.1); color: #fda4af; }

/* toast */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { position: relative; overflow: hidden; display: flex; gap: 12px; align-items: flex-start; min-width: 260px; max-width: 360px; padding: 14px 16px 16px; border-radius: 14px; background: rgba(17, 24, 51, .92); backdrop-filter: blur(14px); border: 1px solid var(--stroke2); box-shadow: 0 18px 44px rgba(0,0,0,.45); font-size: 13px; animation: tin .45s cubic-bezier(.2,1.3,.3,1) both; }
.toast.out { animation: tout .35s ease-in both; }
.toast .ti { font-size: 18px; line-height: 1; }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--tc, var(--grad)); transform-origin: left; animation: tbar 5s linear both; }
.toast.ok { --tc: linear-gradient(90deg, #22c55e, #14b8a6); }
.toast.err { --tc: linear-gradient(90deg, #f43f5e, #f97316); }
@keyframes tin { from { opacity: 0; transform: translateX(60px) scale(.9); } }
@keyframes tout { to { opacity: 0; transform: translateX(60px); } }
@keyframes tbar { to { transform: scaleX(0); } }

/* ---------- pemenang (semua TPS sudah masuk) ---------- */
.winner { overflow: hidden; padding: 28px; border-color: color-mix(in srgb, var(--c) 45%, transparent);
  background: radial-gradient(700px 320px at 15% 30%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%), linear-gradient(135deg, rgba(251,191,36,.08), rgba(255,255,255,.03)); }
.winner::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.07) 50%, transparent 60%); background-size: 250% 100%; animation: gloss 5s ease-in-out infinite; }
@keyframes gloss { 0%, 100% { background-position: 120% 0; } 50% { background-position: -20% 0; } }
.w-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: #3b2500; background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 0 26px rgba(251,191,36,.45); }
.w-body { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; margin-top: 22px; position: relative; z-index: 1; }
.w-photo { position: relative; width: 190px; height: 190px; flex: none; display: flex; align-items: center; justify-content: center; }
.w-photo .rays { position: absolute; inset: -34px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c) 40%, transparent) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 35%, transparent 70%); mask: radial-gradient(circle, #000 35%, transparent 70%); animation: spin2 24s linear infinite; }
.w-photo .avatar { width: 170px; height: 170px; font-size: 64px; box-shadow: 0 0 0 6px rgba(251,191,36,.85), 0 0 60px color-mix(in srgb, var(--c) 70%, transparent); animation: pop .9s cubic-bezier(.3,1.6,.5,1) both; }
.w-photo .crown { position: absolute; top: -26px; font-size: 44px; filter: drop-shadow(0 6px 14px rgba(251,191,36,.6)); animation: bob 2.2s ease-in-out infinite; z-index: 2; }
.w-info { flex: 1; min-width: 240px; }
.w-label { color: #fcd34d; font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.w-name { margin: 6px 0 2px; font-size: clamp(28px, 4.5vw, 46px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.w-no { color: var(--muted); font-weight: 700; }
.w-pct { font-family: var(--mono); font-size: clamp(44px, 7vw, 72px); font-weight: 800; line-height: 1.05; margin-top: 10px; background: linear-gradient(135deg, #fde68a, #f59e0b, #fb923c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.w-sub { color: #cdd5ef; margin-top: 4px; }
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 24px; position: relative; z-index: 1; }
.podium > div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--stroke); }
.podium .avatar { width: 38px; height: 38px; font-size: 15px; }
.podium .avatar::before { display: none; }
.podium b { font-family: var(--mono); margin-left: auto; }
.disclaimer { font-size: 11.5px; color: var(--muted); margin-top: 16px; position: relative; z-index: 1; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 95; }

/* ---------- grafik trafik ---------- */
.chart-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: #cdd5ef; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.seg-ctl { margin-left: auto; display: inline-flex; padding: 3px; border-radius: 99px; background: rgba(255,255,255,.05); border: 1px solid var(--stroke); }
.seg-ctl button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 99px; cursor: pointer; transition: all .2s; }
.seg-ctl button.on { background: var(--grad); color: #fff; }
.chart { position: relative; width: 100%; min-height: 300px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: rgba(255,255,255,.07); }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.chart .tline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(.4,0,.2,1); }
.chart .tline.drawn { stroke-dashoffset: 0; }
.chart .tarea { opacity: 0; transition: opacity 1.2s .6s; }
.chart .tarea.drawn { opacity: 1; }
.chart .mk { stroke: #0d1328; stroke-width: 2; opacity: 0; transition: opacity .4s, r .15s; }
.chart .mk.drawn { opacity: 1; }
.chart .endlbl { fill: var(--text); font-size: 12px; font-weight: 700; opacity: 0; transition: opacity .5s 1.3s; }
.chart .endlbl.drawn { opacity: 1; }
.chart .endlbl tspan.v { font-family: var(--mono); fill: #cdd5ef; font-weight: 500; }
.chart .xh { stroke: rgba(255,255,255,.35); stroke-dasharray: 3 3; opacity: 0; }
.chart-tip { position: absolute; pointer-events: none; min-width: 190px; padding: 10px 12px; border-radius: 12px; background: rgba(13, 19, 40, .95); border: 1px solid var(--stroke2); box-shadow: 0 14px 34px rgba(0,0,0,.5); font-size: 12px; opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; z-index: 5; }
.chart-tip.show { opacity: 1; transform: none; }
.chart-tip .h { font-weight: 800; margin-bottom: 6px; }
.chart-tip .r { display: flex; align-items: center; gap: 8px; padding: 2px 0; color: #cdd5ef; }
.chart-tip .r i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.chart-tip .r b { margin-left: auto; font-family: var(--mono); color: var(--text); }

/* ---------- foto hasil ---------- */
.tile { cursor: pointer; }
.tile .lock { right: 58px !important; }
.tile .cam { position: absolute; right: 10px; top: 10px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: rgba(34,211,238,.14); color: #67e8f9; border: 1px solid rgba(34,211,238,.3); }
.tile .cam.none { background: rgba(255,255,255,.05); color: var(--dim); border-color: var(--stroke); }
.ph-group { padding: 16px 0; border-bottom: 1px dashed var(--stroke); }
.ph-group:last-child { border-bottom: 0; }
.ph-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ph-head b { font-size: 15px; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ph { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; border: 1px solid var(--stroke2); background: #0d1328; cursor: pointer; padding: 0; transition: transform .3s, box-shadow .3s; animation: rise .5s both; animation-delay: calc(var(--i, 0) * 50ms); }
.ph:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 16px 36px rgba(0,0,0,.45), 0 0 0 1px rgba(34,211,238,.45); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.ph:hover img { transform: scale(1.07); }
.ph .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11px; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.ph-empty { aspect-ratio: 3 / 4; border-radius: 14px; border: 1.5px dashed var(--stroke2); display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; color: var(--dim); font-size: 12px; text-align: center; padding: 10px; }
.ph-empty .big { font-size: 28px; }
.modal-box.wide { max-width: 980px; }
.lb-img { position: relative; display: flex; align-items: center; justify-content: center; background: #05070f; border-radius: 14px; min-height: 300px; overflow: hidden; }
.lb-img img { max-width: 100%; max-height: 68vh; display: block; animation: zoom .35s both; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--stroke2); background: rgba(13,19,40,.8); color: #fff; font-size: 20px; cursor: pointer; transition: transform .2s, background .2s; }
.lb-nav:hover { transform: translateY(-50%) scale(1.1); background: rgba(139,92,246,.6); }
.lb-nav.p { left: 10px; } .lb-nav.n { right: 10px; }
.lb-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 12px; font-size: 13px; color: #cdd5ef; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; }
.thumbs button { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; padding: 0; border: 2px solid transparent; cursor: pointer; background: #0d1328; opacity: .6; transition: all .2s; }
.thumbs button.on { border-color: var(--cyan); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
a.btn { text-decoration: none; }

/* ---------- akses online ---------- */
.online-chip { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 12px; font-weight: 700; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.35); color: #67e8f9; transition: transform .2s, background .2s; }
.online-chip:hover { transform: translateY(-2px); background: rgba(34,211,238,.18); }
.online-chip.wait { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.35); color: #fcd34d; }
.online-chip.off { background: rgba(244,63,94,.1); border-color: rgba(244,63,94,.35); color: #fda4af; }
.online-chip .globe { display: inline-block; animation: spin2 8s linear infinite; }
.online-box { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; }
@media (max-width: 700px) { .online-box { grid-template-columns: 1fr; } }
.online-box .qrimg { width: 240px; max-width: 100%; border-radius: 14px; background: #fff; padding: 8px; }
.linkbox { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--stroke2); font-family: var(--mono); font-size: 13px; word-break: break-all; }
.linkbox a { color: #67e8f9; text-decoration: none; flex: 1; }
.banner-warn { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.35); color: #fde68a; animation: rise .5s both; }
.banner-warn b { color: #fff; }

/* ---------- suara tidak sah ---------- */
.ts-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .ts-wrap { grid-template-columns: 1fr; } }
.ts-big { font-family: var(--mono); font-size: 44px; font-weight: 800; line-height: 1; }
.ts-pct { font-family: var(--mono); font-size: 18px; font-weight: 700; color: #cbd5e1; margin-top: 10px; }
.stackbar { display: flex; gap: 2px; height: 12px; margin-top: 10px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.06); }
.stackbar i { display: block; height: 100%; width: 0; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.stackbar i.s, .stack-legend i.s { background: linear-gradient(90deg, #22d3ee, #8b5cf6); }
.stackbar i.t, .stack-legend i.t { background: #94a3b8; }
.stack-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: #cdd5ef; }
.stack-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stack-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ts-list { display: grid; gap: 10px; }
.ts-row { display: grid; grid-template-columns: 72px 1fr 120px; gap: 12px; align-items: center; font-size: 13px; padding: 2px 0; border-radius: 8px; }
.ts-row .n { font-weight: 700; }
.ts-row .track { height: 10px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.ts-row .track i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #64748b, #cbd5e1); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.ts-row .v { text-align: right; font-family: var(--mono); }
.ts-row.wait .track { background: repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 6px, transparent 6px 12px); }
.ts-row.flash { animation: flash 2.6s ease-out; }

/* ---------- Absensi DPT (Saksi 1) ---------- */
.kp-in { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.kp-in input { width: 84px; padding: 6px 8px; font-family: var(--mono); font-size: 13px; }
.ts-row.ab { grid-template-columns: 72px 1fr 190px; }
.ts-row.ab .track i { background: linear-gradient(90deg, #22c55e, #14b8a6); }
.ts-row.ab .v .tag { margin-left: 4px; font-family: var(--font); }
.ab-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; margin-bottom: 5px; }
.ab-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #22c55e, #14b8a6); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.pin { font-family: var(--mono); font-weight: 700; letter-spacing: .12em; margin-right: 4px; display: inline-block; min-width: 64px; }
.ab-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ab-tools input { flex: 1; min-width: 220px; }
.ab-imp { display: flex; gap: 8px; flex-wrap: wrap; }
.ab-imp input { flex: 1; min-width: 200px; }
tr.ab-on td { background: rgba(34,197,94,.06); }
.ab-row2 { grid-template-columns: 340px 1fr; }
@media (max-width: 1100px) { .ab-row2 { grid-template-columns: 1fr; } }
.tps-table th.grp { text-align: center; }
.tps-table th.s1, .tps-table td.s1 { background: rgba(34,197,94,.05); }
.tps-table th.s2, .tps-table td.s2 { background: rgba(139,92,246,.06); }
@media (max-width: 640px) { .ts-row.ab { grid-template-columns: 58px 1fr 120px; } .ts-row.ab .v .tag { display: none; } }


/* ---------- Badge LIVE kartu perolehan suara ---------- */
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 3px 9px; border-radius: 99px; background: rgba(34,197,94,.14); color: #86efac; border: 1px solid rgba(34,197,94,.32); }
.live-pill .live-dot { width: 7px; height: 7px; }

/* ---------- Logo 3D beranimasi di halaman login ---------- */
.login-logo { perspective: 760px; }
.login-logo-img, .login-logo .logo-core { animation: logo3d 5.5s ease-in-out infinite; transform-style: preserve-3d; will-change: transform; backface-visibility: hidden; }
.login-logo .logo-core { box-shadow: 0 16px 36px rgba(139,92,246,.55); }
.login-logo-img { filter: drop-shadow(0 16px 30px rgba(139,92,246,.55)); }
@keyframes logo3d {
  0%, 100% { transform: rotateY(-24deg) rotateX(7deg) translateY(0) scale(1); }
  50% { transform: rotateY(24deg) rotateX(-5deg) translateY(-7px) scale(1.045); }
}

/* hormati preferensi kurangi animasi */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Logo desa (kop surat & tampilan web) ---------- */
.brand-logo { width: 42px; height: 42px; border-radius: 10px; object-fit: contain; flex: none; }
.login-logo-img { width: 72px; height: 72px; border-radius: 16px; object-fit: contain; filter: drop-shadow(0 10px 24px rgba(139,92,246,.45)); }
.logo-row { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.logo-prev { width: 72px; height: 72px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--glass2); border: 1px solid var(--stroke2); overflow: hidden; }
.logo-prev img { width: 100%; height: 100%; object-fit: contain; }
.logo-prev span { color: #94a3b8; font-size: 11px; text-align: center; padding: 4px; }
.pub-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; flex: none; }
