/* =========================================================
   E-Voting Sekolah — Vibrant Edu-Civic (sumber: DESIGN.md)
   ========================================================= */
:root {
  /* Warna */
  --primary: #004ac6;            /* tombol utama (YAML primary, cocok foto) */
  --primary-accent: #2563EB;     /* aksen, fokus, badge OSIS */
  --primary-container: #2563EB;
  --tertiary: #3B82F6;
  --secondary-ink: #1E1B4B;      /* navy otoritas */
  --secondary: #5b598c;
  --secondary-container: #c7c3fe;
  --canvas: #EEF2FF;
  --surface: #f8f9ff;
  --card: #FFFFFF;
  --subtle: #F8FAFC;
  --sc-low: #eff4ff;
  --sc: #e5eeff;
  --sc-high: #dce9ff;
  --border: #E2E8F0;
  --border-input: #CBD5E1;
  --outline-variant: #c3c6d7;
  --text: #0F172A;
  --text-2: #434655;
  --muted: #64748B;
  --inverse: #213145;
  --error: #ba1a1a;
  --error-container: #ffdad6;
  --on-error-container: #93000a;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --ev-osis: #2563EB;
  --ev-kelas: #10B981;
  --ev-kepsek: #8B5CF6;
  --ev-lain: #F59E0B;

  /* Bentuk & jarak */
  --r-sm: .25rem; --r: .5rem; --r-md: .75rem; --r-xl-btn: 12px; --r-lg: 1rem; --r-2xl: 20px; --r-full: 9999px;
  --gutter: 1.5rem; --margin: 2rem;

  /* Elevasi */
  --e1: 0 4px 16px -2px rgba(30, 27, 75, 0.05);
  --e2: 0 12px 28px -4px rgba(37, 99, 235, 0.12);
  --e3: 0 20px 40px -8px rgba(15, 23, 42, 0.2);
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.2);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --sidebar-w: 264px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); font-size: 14px; line-height: 22px; color: var(--text);
  background: var(--canvas); -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
:where(svg[viewBox="0 0 24 24"]) { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; color: var(--text); }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Tipografi ---------- */
.t-hero { font-size: 48px; line-height: 56px; font-weight: 800; letter-spacing: -0.03em; }
.t-h1 { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; }
.t-h2 { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em; }
.t-h3 { font-size: 20px; line-height: 28px; font-weight: 600; }
.t-title { font-size: 18px; line-height: 26px; font-weight: 600; }
.t-body-lg { font-size: 16px; line-height: 24px; }
.t-sm { font-size: 12px; line-height: 18px; }
.t-label { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .02em; }
.t-caps { font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) {
  .t-hero { font-size: 32px; line-height: 40px; letter-spacing: -0.02em; }
  .t-h1 { font-size: 24px; line-height: 32px; letter-spacing: -0.01em; }
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: var(--r-xl-btn); border: 1px solid transparent;
  font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: .01em; cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; text-decoration: none !important;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 14px -6px rgba(0, 74, 198, .55); }
.btn-primary:hover:not(:disabled) { background: #003ea8; }
.btn-secondary { background: var(--canvas); color: var(--primary-accent); border-color: #DBEAFE; }
.btn-secondary:hover:not(:disabled) { background: var(--sc-high); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--subtle); }
.btn-danger { background: #FEF2F2; color: var(--danger); border-color: #FCA5A5; }
.btn-danger:hover:not(:disabled) { background: #FEE2E2; }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; box-shadow: 0 6px 14px -6px rgba(16, 185, 129, .6); }
.btn-success:hover:not(:disabled) { background: #059669; }
.btn-warning { background: #FFFBEB; color: #B45309; border-color: #FDE68A; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-xs { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 12px; }
.btn .spinner { width: 16px; height: 16px; border-width: 2px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary-accent); font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.link-btn svg { width: 16px; height: 16px; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field-label { font-size: 14px; font-weight: 600; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.field .hint { font-size: 12px; line-height: 18px; color: var(--muted); }
.field .err { font-size: 12px; color: var(--danger); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 0 14px; background: #fff; border: 1px solid var(--border-input);
  border-radius: var(--r-xl-btn); transition: box-shadow .15s, border-color .15s;
}
.textarea { padding: 12px 14px; min-height: 110px; resize: vertical; line-height: 22px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary-accent); box-shadow: var(--focus); }
.input.soft, .select.soft, .textarea.soft { background: var(--subtle); border-color: transparent; }
.input.soft:focus { background: #fff; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.input-wrap .input { padding-left: 44px; }
.input-wrap .trail { position: absolute; right: 8px; }
.input-lg { min-height: 60px; font-size: 20px; letter-spacing: .08em; }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748B' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--outline-variant); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 24px; height: 24px; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { box-shadow: var(--focus); }

/* Segmented / tabs */
.seg { display: flex; gap: 4px; padding: 6px; background: var(--sc-high); border-radius: 16px; }
.seg button { flex: 1; height: 48px; border: 0; background: transparent; border-radius: 12px; font-weight: 600; font-size: 16px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; }
.seg button svg { width: 20px; height: 20px; }
.seg button[aria-selected="true"] { background: #fff; color: var(--primary); box-shadow: var(--e1); }

.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; background: var(--sc-low); border: 1px solid var(--border); border-radius: 14px; }
.tabs button { height: 40px; padding: 0 16px; border: 0; background: transparent; border-radius: 10px; font-weight: 600; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tabs button svg { width: 16px; height: 16px; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--primary); box-shadow: var(--e1); }
.tabs .count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--sc-high); color: var(--primary-accent); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tabs button[aria-selected="true"] .count { background: var(--primary); color: #fff; }
.tabs-scroll { overflow-x: auto; max-width: 100%; }

/* ---------- Kartu ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--e1); }
.card-pad { padding: 24px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.card-head h2, .card-head h3 { font-size: 20px; line-height: 28px; font-weight: 700; }
.card-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tonal { background: var(--sc-low); border-radius: 14px; padding: 14px 16px; }
.icon-tile { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--sc-high); color: var(--primary-accent); flex: none; }
.icon-tile svg { width: 24px; height: 24px; }
.icon-tile.sm { width: 40px; height: 40px; border-radius: 12px; }
.icon-tile.sm svg { width: 20px; height: 20px; }
.tile-green { background: #ECFDF5; color: #047857; }
.tile-amber { background: #FFFBEB; color: #B45309; }
.tile-violet { background: #F5F3FF; color: #6D28D9; }
.tile-red { background: #FEF2F2; color: var(--danger); }

/* StatCard */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }
.stat { padding: 22px; display: flex; flex-direction: column; gap: 6px; position: relative; min-height: 140px; }
.stat .top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.stat .label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.stat .value { font-size: 36px; line-height: 44px; font-weight: 800; letter-spacing: -0.02em; }
.stat .value small { font-size: 18px; font-weight: 500; color: var(--text-2); letter-spacing: 0; margin-left: 4px; }
.stat .foot { font-size: 13px; color: var(--muted); margin-top: auto; }
.stat.accent-top { overflow: hidden; }
.stat.accent-top::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--bar, var(--primary-accent)); }

/* Pills & badge */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-full); font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 16px; white-space: nowrap; background: var(--sc-high); color: var(--primary); }
.pill svg { width: 14px; height: 14px; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill .dot.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.pill-blue { background: #EFF6FF; color: #1D4ED8; }
.pill-green { background: #ECFDF5; color: #047857; }
.pill-violet { background: #F5F3FF; color: #6D28D9; }
.pill-amber { background: #FFFBEB; color: #B45309; }
.pill-red { background: #FEF2F2; color: #B91C1C; }
.pill-gray { background: #F1F5F9; color: #475569; }
.pill-navy { background: var(--secondary-ink); color: #fff; }
.pill-solid { background: var(--primary-accent); color: #fff; }
.pill-caps { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.chip { display: inline-flex; padding: 3px 10px; border-radius: 8px; background: var(--sc-high); color: var(--primary); font-size: 12px; font-weight: 600; }

/* Nomor kandidat */
.cand-no { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; box-shadow: 0 8px 18px -8px var(--c, #2563EB); background: var(--c, #2563EB); flex: none; }
.cand-no.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 16px; }
.cand-no.md { width: 48px; height: 48px; border-radius: 14px; font-size: 22px; }

/* Progress */
.progress { height: 8px; border-radius: 99px; background: var(--sc-high); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--primary)); transition: width .6s ease; }
.progress.lg { height: 14px; }
.progress.xl { height: 22px; background: #fff; border: 1px solid var(--border); }

/* Alert */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: var(--error-container); color: var(--on-error-container); }
.alert svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.alert .grow { flex: 1; }
.alert strong { display: block; font-weight: 700; }
.alert-info { background: var(--sc-low); color: #1E3A8A; }
.alert-warn { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-ok { background: #ECFDF5; color: #065F46; }
.alert .x { background: none; border: 0; color: inherit; cursor: pointer; padding: 2px; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; }
table.dt { width: 100%; border-collapse: collapse; min-width: 720px; }
.dt th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); padding: 16px 18px; background: var(--sc-low); white-space: nowrap; }
.dt th:first-child { border-top-left-radius: 14px; } .dt th:last-child { border-top-right-radius: 14px; }
.dt td { padding: 16px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dt tr:last-child td { border-bottom: 0; }
.dt tbody tr:hover td { background: #FAFBFF; }
.dt tr.selected td { background: #F5F8FF; }
.dt tr.row-danger td { background: #FFF5F5; }
.dt tr.row-warn td { background: #FFFCF2; }
.dt .num { text-align: right; font-variant-numeric: tabular-nums; }
.dt .center { text-align: center; }
.person { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--sc-high); color: var(--primary); font-weight: 700; font-size: 14px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 18px; }
.person .name { font-weight: 600; }
.person .sub { font-size: 12px; color: var(--muted); }

/* FilterBar */
.filterbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px 20px; }
.filterbar .search { flex: 1 1 260px; }
.filterbar .select { width: auto; min-width: 170px; }

/* Pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
.pager .pages { display: flex; gap: 6px; align-items: center; }
.pager .pages button { min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--border); background: #fff; font-weight: 600; cursor: pointer; }
.pager .pages button[aria-current="page"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager .pages button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Keadaan: memuat, kosong, error ---------- */
.spinner { width: 28px; height: 28px; border: 3px solid var(--sc-high); border-top-color: var(--primary-accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 40px 20px; color: var(--muted); }
.state .icon-tile { margin-bottom: 4px; }
.state h3 { font-size: 18px; color: var(--text); }
.state p { max-width: 420px; }
.state.error .icon-tile { background: #FEF2F2; color: var(--danger); }
.skeleton { background: linear-gradient(90deg, #EEF2FF 25%, #F8FAFF 37%, #EEF2FF 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 12px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-line { height: 14px; margin: 10px 0; }
.loading-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(238, 242, 255, .7); backdrop-filter: blur(3px); }
.loading-overlay .box { background: #fff; padding: 28px 32px; border-radius: 20px; box-shadow: var(--e3); display: flex; flex-direction: column; align-items: center; gap: 14px; font-weight: 600; }

/* ---------- Modal, dialog, panel ---------- */
.backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 24px; box-shadow: var(--e3); width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; animation: pop .2s ease; position: relative; }
.modal.lg { width: min(860px, 100%); }
.modal.sm { width: min(448px, 100%); }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-head { padding: 24px 28px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-head h2 { font-size: 22px; line-height: 30px; }
.modal-body { padding: 20px 28px; }
.modal-foot { padding: 0 28px 24px; display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.modal-foot.split > .btn { flex: 1; }
.close-x { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.close-x svg { width: 18px; height: 18px; }
.dialog-center { text-align: center; }
.dialog-icon { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: #FFF7E6; }
.dialog-icon > span { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--warning); color: #fff; }
.dialog-icon.danger { background: #FEF2F2; } .dialog-icon.danger > span { background: var(--danger); }
.dialog-icon.info { background: var(--sc-low); } .dialog-icon.info > span { background: var(--primary-accent); }
.dialog-icon.ok { background: #ECFDF5; } .dialog-icon.ok > span { background: var(--success); }
.dialog-icon svg { width: 26px; height: 26px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--warning); }

.panel-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(8px); animation: fade .18s ease; }
.sidepanel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 101; width: min(720px, 100%); background: #fff; box-shadow: var(--e3); display: flex; flex-direction: column; animation: slide .22s ease; }
.sidepanel.narrow { width: min(440px, 100%); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.sidepanel .sp-head { padding: 28px 30px 18px; display: flex; justify-content: space-between; gap: 16px; background: var(--subtle); border-bottom: 1px solid var(--border); }
.sidepanel .sp-body { flex: 1; overflow: auto; padding: 24px 30px; display: flex; flex-direction: column; gap: 20px; }
.sidepanel .sp-foot { padding: 18px 30px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; background: var(--subtle); }

/* Toast */
.toasts { position: fixed; z-index: 200; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--inverse); color: #fff; border-radius: 14px; box-shadow: var(--e3); animation: pop .2s ease; font-weight: 500; }
.toast svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.toast.success svg { color: #6EE7B7; } .toast.error { background: #7F1D1D; } .toast.warn svg { color: #FCD34D; }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 12px; padding: 20px 24px; overflow-x: auto; }
.stepper .step { display: flex; align-items: center; gap: 12px; flex: none; }
.stepper .num { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: var(--sc-low); color: var(--muted); }
.stepper .num svg { width: 22px; height: 22px; }
.stepper .st-cap { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stepper .st-name { font-weight: 600; color: var(--muted); }
.stepper .step.done .num { background: #ECFDF5; color: var(--success); }
.stepper .step.done .st-cap { color: var(--success); } .stepper .step.done .st-name { color: var(--text); }
.stepper .step.active .num { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--sc-high); }
.stepper .step.active .st-cap, .stepper .step.active .st-name { color: var(--primary); }
.stepper .line { flex: 1; min-width: 24px; height: 3px; border-radius: 3px; background: var(--border); }
.stepper .line.done { background: var(--success); }

/* Dropzone & ImageInput */
.dropzone { border: 2px dashed var(--outline-variant); border-radius: 18px; padding: 28px; text-align: center; background: var(--subtle); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--primary-accent); background: var(--sc-low); }
.dropzone .icon-tile { border-radius: 50%; }
.dropzone strong { color: var(--text); }
.img-preview { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 14px; }
.img-preview img { width: 72px; height: 90px; object-fit: cover; border-radius: 12px; background: var(--sc-low); }

/* ClassPicker */
.cp-group { margin-top: 18px; }
.cp-group-title { display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 10px; }
.cp-group-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.cp-item { height: 40px; border-radius: 12px; border: 1px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--text-2); }
.cp-item svg { width: 16px; height: 16px; opacity: 0; }
.cp-item[aria-pressed="true"] { background: var(--sc-high); border-color: #BFD3FF; color: var(--secondary-ink); }
.cp-item[aria-pressed="true"] svg { opacity: 1; color: var(--primary); }

/* Countdown */
.countdown { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 99px; background: #FFF7E6; color: #92400E; font-weight: 700; }
.countdown .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warning); }
.countdown .lbl { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.countdown .val { font-size: 24px; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.countdown svg { width: 20px; height: 20px; color: var(--warning); }

/* Menu dropdown */
.menu { position: fixed; z-index: 150; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--e3); padding: 6px; min-width: 220px; animation: pop .14s ease; }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; font-weight: 500; }
.menu button:hover { background: var(--sc-low); }
.menu button svg { width: 18px; height: 18px; color: var(--muted); }
.menu button.danger, .menu button.danger svg { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

/* =========================================================
   SHELL SISWA
   ========================================================= */
.s-top { background: rgba(248, 249, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.s-top .in { max-width: 1296px; margin: 0 auto; padding: 14px var(--margin); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none !important; color: var(--text); }
.brand .logo { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-accent); color: #fff; display: grid; place-items: center; flex: none; overflow: hidden; }
.brand .logo img { width: 100%; height: 100%; object-fit: cover; }
.brand .logo svg { width: 24px; height: 24px; }
.brand .bt { font-size: 22px; font-weight: 700; color: var(--primary); letter-spacing: -0.01em; line-height: 26px; }
.brand .bs { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.s-nav { display: flex; gap: 6px; margin: 0 auto; }
.s-nav a, .s-nav button { height: 44px; padding: 0 16px; border-radius: 12px; display: inline-flex; align-items: center; font-weight: 600; font-size: 16px; color: var(--text); border: 0; background: none; cursor: pointer; text-decoration: none !important; }
.s-nav .on { background: var(--primary-accent); color: #fff; }
.who { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--sc-low); }
.who .avatar { width: 36px; height: 36px; font-size: 13px; }
.who b { display: block; font-size: 14px; line-height: 18px; }
.who small { font-size: 12px; color: var(--muted); font-weight: 600; }
.logout-link { color: var(--danger); font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; }
.logout-link svg { width: 20px; height: 20px; }
.s-main { max-width: 1296px; margin: 0 auto; padding: 32px var(--margin) 48px; }
.s-foot { background: var(--sc-low); border-top: 1px solid var(--border); }
.s-foot .in { max-width: 1296px; margin: 0 auto; padding: 18px var(--margin); display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .s-top .in { padding: 12px 16px; gap: 12px; }
  .s-nav { display: none; }
  .brand .bt { font-size: 18px; }
  .who .meta { display: none; }
  .logout-link span { display: none; }
  .s-main { padding: 20px 16px 40px; }
  .s-top .in .brand { margin-right: auto; }
}

/* =========================================================
   SHELL STAF
   ========================================================= */
.staff { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--border); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; z-index: 40; }
.sidebar .sb-brand { padding: 18px 20px; display: flex; align-items: center; gap: 12px; background: var(--sc-low); }
.sidebar .sb-brand .logo { width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.sidebar .sb-brand .logo svg { width: 24px; height: 24px; }
.sidebar .sb-brand .logo img { width: 100%; height: 100%; object-fit: cover; }
.sidebar .sb-brand b { display: block; font-size: 16px; line-height: 20px; }
.sidebar .sb-brand small { font-size: 13px; color: var(--text-2); }
.sb-user { margin: 12px 16px 4px; padding: 12px; border-radius: 14px; background: var(--subtle); display: flex; gap: 12px; align-items: center; }
.sb-user .avatar { background: var(--sc-high); }
.sb-user b { display: block; font-size: 14px; line-height: 18px; }
.sb-user small { font-size: 12px; color: var(--muted); }
.sb-group { padding: 14px 12px 0; }
.sb-group > span { display: block; padding: 0 8px 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.sb-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text); font-weight: 500; font-size: 15px; text-decoration: none !important; }
.sb-link svg { width: 20px; height: 20px; color: var(--text-2); }
.sb-link:hover { background: var(--sc-low); }
.sb-link.on { background: var(--primary-accent); color: #fff; font-weight: 600; }
.sb-link.on svg { color: #fff; }
.sb-link.sub { padding-left: 44px; font-size: 14px; }
.sb-link .badge { margin-left: auto; padding: 2px 9px; border-radius: 99px; background: var(--primary-accent); color: #fff; font-size: 11px; font-weight: 700; }
.sb-link.on .badge { background: rgba(255,255,255,.22); }
.sb-logout { margin: auto 16px 20px; padding-top: 24px; }
.sb-logout .btn { width: 100%; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(248, 249, 255, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar .in { display: flex; align-items: center; gap: 16px; padding: 14px var(--margin); }
.crumbs { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; min-width: 0; }
.crumbs svg { width: 16px; height: 16px; flex: none; }
.crumbs b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.year-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--sc-low); border-radius: 12px; font-weight: 600; border: 0; cursor: pointer; }
.year-pill svg { width: 18px; height: 18px; color: var(--primary-accent); }
.top-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: none; border: 0; cursor: pointer; position: relative; color: var(--text-2); }
.top-ico svg { width: 22px; height: 22px; }
.top-ico.me { background: var(--primary-accent); color: #fff; }
.menu-btn { display: none; }
.content { padding: 8px var(--margin) 48px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 12px 0 24px; }
.page-head .ph-left { min-width: 0; flex: 1 1 420px; }
.page-head .crumb2 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; flex-wrap: wrap; }
.page-head .crumb2 a { color: var(--text-2); }
.page-head .crumb2 .cur { color: var(--primary-accent); }
.page-head h1 { font-size: 38px; line-height: 46px; font-weight: 800; letter-spacing: -0.03em; }
.page-head .desc { color: var(--text-2); font-size: 16px; line-height: 26px; margin-top: 6px; max-width: 780px; }
.page-head .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.mt { margin-top: 24px; } .mt-sm { margin-top: 12px; }
@media (max-width: 1200px) { .grid-main { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 960px) {
  .staff { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--e3); }
  .staff.nav-open .sidebar { transform: none; }
  .staff.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 35; }
  .menu-btn { display: grid; }
  .content { padding: 8px 16px 40px; }
  .topbar .in { padding: 12px 16px; }
  .crumbs .hide-m { display: none; }
  .page-head h1 { font-size: 28px; line-height: 36px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Demo banner */
.demo-bar { background: var(--secondary-ink); color: #fff; font-size: 12px; font-weight: 600; text-align: center; padding: 6px 12px; letter-spacing: .02em; }
.demo-bar a { color: #C7D2FE; }

/* =========================================================
   HALAMAN
   ========================================================= */
/* Login */
.login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; background: radial-gradient(circle at 20% 10%, #fff 0, transparent 40%), radial-gradient(circle at 80% 90%, #E0E7FF 0, transparent 45%), var(--canvas); }
.login-card { width: min(600px, 100%); background: #fff; border-radius: 44px; box-shadow: 0 30px 60px -20px rgba(30, 27, 75, .12); padding: 48px 50px 44px; display: flex; flex-direction: column; gap: 22px; }
.login-card .center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.login-logo { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; }
.login-logo .logo { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-accent); color: #fff; display: grid; place-items: center; overflow: hidden; }
.login-logo .logo img { width: 100%; height: 100%; object-fit: cover; }
.login-logo b { font-size: 20px; line-height: 20px; letter-spacing: .01em; display: block; }
.login-logo small { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--text-2); }
.login-card h1 { font-size: 30px; line-height: 38px; letter-spacing: -0.02em; }
.or { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--sc-high); }
.login-foot { width: min(600px, 100%); display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; padding: 18px 20px 0; }
@media (max-width: 640px) { .login-card { padding: 32px 22px; border-radius: 28px; } }

/* QR scanner */
.scan-frame { position: relative; aspect-ratio: 1; width: 100%; border-radius: 20px; overflow: hidden; background: #0B1C30; }
.scan-frame video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame .reticle { position: absolute; inset: 16%; border-radius: 20px; box-shadow: 0 0 0 999px rgba(11, 28, 48, .45); }
.scan-frame .reticle::before, .scan-frame .reticle::after { content: ''; position: absolute; inset: -3px; border-radius: 22px; border: 3px solid transparent; border-top-color: #fff; border-bottom-color: #fff; }
.scan-frame .laser { position: absolute; left: 18%; right: 18%; height: 2px; background: var(--tertiary); box-shadow: 0 0 12px var(--tertiary); animation: laser 2.2s ease-in-out infinite; }
@keyframes laser { 0%, 100% { top: 20%; } 50% { top: 78%; } }

/* Hero siswa */
.hero { padding: 36px 40px; display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: center; background: linear-gradient(135deg, #fff 55%, #F3F0FF 100%); }
.hero h1 { font-size: 44px; line-height: 54px; font-weight: 800; letter-spacing: -0.03em; margin: 16px 0 8px; }
.hero .lead { font-size: 19px; line-height: 30px; color: var(--text-2); }
@media (max-width: 960px) { .hero { grid-template-columns: 1fr; padding: 24px; } .hero h1 { font-size: 30px; line-height: 38px; } .hero .lead { font-size: 16px; line-height: 26px; } }
.legend { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 1100px) { .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 680px) { .event-grid { grid-template-columns: 1fr; } }
.ev-card { position: relative; overflow: hidden; padding: 34px 30px 30px; display: flex; flex-direction: column; gap: 16px; }
.ev-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 7px; background: var(--c); }
.ev-card h3 { font-size: 26px; line-height: 34px; font-weight: 600; letter-spacing: -0.01em; }
.ev-card .body { color: var(--text-2); font-size: 16px; line-height: 27px; }
.ev-card .actions { margin-top: auto; }
.ev-card.featured { box-shadow: var(--e2); }

/* Bilik */
.ballot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
@media (max-width: 680px) { .ballot-grid { grid-template-columns: 1fr; gap: 20px; } }
.cand-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; transition: box-shadow .15s, border-color .15s; }
.cand-card:hover { box-shadow: var(--e2); }
.cand-card.selected { border: 2px solid var(--c); box-shadow: var(--e2); }
.cand-photo { position: relative; aspect-ratio: 4 / 3.1; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, var(--sc-high), #E9E4FF); display: grid; place-items: center; }
.cand-photo img { width: 100%; height: 100%; object-fit: cover; }
.cand-photo .initials { font-size: 64px; font-weight: 800; color: var(--c); opacity: .5; letter-spacing: -0.03em; }
.cand-card h3 { font-size: 26px; line-height: 32px; font-weight: 600; }
.cand-card .quote { font-style: italic; color: var(--text-2); font-size: 16px; line-height: 27px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prog-item { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--sc-low); font-size: 14px; color: var(--text); }
.prog-item svg { width: 18px; height: 18px; color: var(--c); flex: none; }
.cand-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; padding-top: 12px; }
.btn-cand { background: var(--c); color: #fff; box-shadow: 0 8px 16px -8px var(--c); }
.btn-cand:hover:not(:disabled) { filter: brightness(.94); }
.secret-bar { margin-top: 48px; background: var(--inverse); color: #fff; border-radius: 20px; padding: 18px 28px; display: flex; align-items: center; gap: 18px; }
.secret-bar .icon-tile { background: var(--primary-accent); color: #fff; }
.secret-bar p { color: #DCE6F7; font-size: 15px; }
.secret-bar b { color: #fff; font-size: 17px; }

/* Terima kasih */
.thanks { max-width: 800px; margin: 0 auto; text-align: center; }
.thanks .burst { width: 120px; height: 120px; border-radius: 50%; margin: 24px auto 12px; background: radial-gradient(circle, #D1FAE5 0, #ECFDF5 60%, transparent 70%); display: grid; place-items: center; }
.thanks .burst span { width: 56px; height: 56px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; animation: pop .4s ease; }
.thanks .burst svg { width: 30px; height: 30px; }
.receipt { text-align: left; margin-top: 32px; overflow: hidden; }
.receipt .rh { background: var(--primary); color: #fff; padding: 16px 28px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .02em; }
.receipt .rh span { display: flex; gap: 10px; align-items: center; }
.receipt .rh svg { width: 20px; height: 20px; }
.receipt .rb { padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.receipt .perf { border-top: 2px dashed var(--border); margin: 0 -28px; position: relative; }
.code-box { display: inline-flex; padding: 8px 14px; border-radius: 10px; background: var(--sc-low); color: var(--primary); font-family: var(--mono); font-weight: 700; font-size: 24px; letter-spacing: .18em; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 120; }

/* Live */
.live { min-height: 100vh; padding: 28px 30px; display: flex; flex-direction: column; gap: 26px; }
.live-head { display: flex; align-items: center; gap: 28px; padding: 22px 40px; }
.live-head .lt { border-left: 1px solid var(--border); padding-left: 24px; flex: 1; min-width: 0; }
.live-head h1 { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.01em; text-transform: uppercase; }
.live-badge { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 99px; background: #FEF2F2; color: var(--danger); font-weight: 700; letter-spacing: .04em; }
.live-badge i { width: 14px; height: 14px; border-radius: 50%; background: var(--danger); animation: pulse 1.4s infinite; color: var(--danger); }
.live-clock { display: flex; align-items: center; gap: 14px; padding: 14px 24px; background: var(--sc-high); border-radius: 16px; font-weight: 600; font-size: 18px; }
.live-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 30px; flex: 1; }
.live-cand { padding: 30px 26px; border-radius: 18px; background: var(--sc-low); display: flex; flex-direction: column; gap: 18px; }
.live-cand .pct { font-size: 64px; line-height: 64px; font-weight: 800; letter-spacing: -0.03em; color: var(--c); }
.live-cand .name { font-size: 26px; font-weight: 600; }
.live-bar { height: 26px; border-radius: 99px; background: #fff; overflow: hidden; }
.live-bar span { display: block; height: 100%; border-radius: 99px; background: var(--c); transition: width 1s ease; position: relative; }
.live-bar span::after { content: ''; position: absolute; right: 12px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #fff; }
.ticker { display: flex; align-items: center; gap: 20px; padding: 16px 30px; background: var(--inverse); color: #fff; border-radius: 20px; overflow: hidden; }
.ticker .tag { flex: none; padding: 8px 16px; border-radius: 10px; background: var(--primary-accent); font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.ticker .run { white-space: nowrap; font-size: 18px; animation: marquee 30s linear infinite; }
@keyframes marquee { from { transform: translateX(40%); } to { transform: translateX(-100%); } }
@media (max-width: 1000px) { .live-grid { grid-template-columns: 1fr; } .live-head { flex-wrap: wrap; padding: 20px; } .live-head .lt { border: 0; padding: 0; } .live-head h1 { font-size: 22px; line-height: 30px; } .live-cand .pct { font-size: 40px; line-height: 44px; } }

/* Kontrol: ubin kelas */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.tile { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.tile h3 { font-size: 22px; }

/* Kartu pemilih (cetak) */
.sheet-wrap { background: var(--sc-low); border-radius: 20px; padding: 28px; overflow: auto; }
.sheet { width: 210mm; min-height: 297mm; background: #fff; margin: 0 auto; padding: 12mm 10mm; box-shadow: var(--e3); position: relative; transform-origin: top center; }
.sheet-head { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; color: var(--muted); border-bottom: 1px dashed var(--border); padding-bottom: 6px; margin-bottom: 8px; letter-spacing: .04em; }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
.vcard { border: 1px dashed #CBD5E1; border-radius: 4mm; padding: 4mm; height: 50mm; display: flex; flex-direction: column; gap: 2mm; font-size: 9px; line-height: 12px; break-inside: avoid; }
.vcard.nocut { border-style: solid; border-color: #E2E8F0; }
.vcard .vh { display: flex; gap: 2mm; align-items: center; }
.vcard .vh .lg { width: 7mm; height: 7mm; border-radius: 1.6mm; background: var(--primary-accent); display: grid; place-items: center; color: #fff; overflow: hidden; flex: none; }
.vcard .vh .lg img { width: 100%; height: 100%; object-fit: cover; }
.vcard .vh .lg svg { width: 4.5mm; height: 4.5mm; }
.vcard .vh b { color: var(--primary); font-size: 8.5px; letter-spacing: .02em; display: block; }
.vcard .vh small { font-size: 7px; color: var(--muted); }
.vcard .vh .no { margin-left: auto; font-family: var(--mono); font-size: 7px; background: var(--sc-low); padding: 1px 5px; border-radius: 4px; }
.vcard .vb { display: flex; gap: 3mm; flex: 1; }
.vcard .vb .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .6mm; }
.vcard .nm { font-weight: 800; font-size: 10.5px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard .mono { font-size: 8.5px; }
.vcard .tok { margin-top: auto; align-self: flex-start; background: var(--primary); color: #fff; border-radius: 1.6mm; padding: 1mm 2.4mm; font-family: var(--mono); font-weight: 700; font-size: 10px; letter-spacing: .1em; }
.vcard .qr { width: 20mm; text-align: center; font-size: 6.5px; color: var(--muted); }
.vcard .qr svg { width: 20mm; height: 20mm; display: block; }
.vcard .vf { display: flex; justify-content: space-between; font-size: 6.5px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 1mm; }
.sheet-foot { display: flex; justify-content: space-between; margin-top: 6mm; font-size: 8px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 3mm; }

/* Timeline riwayat */
.year-band { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 22px 26px; background: var(--sc-high); border-radius: 20px; }

/* Grafik */
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 13px; color: var(--text-2); margin-top: 10px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.hbar { display: flex; flex-direction: column; gap: 6px; }
.hbar .hl { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; gap: 10px; }

/* Danger zone */
.danger-zone { background: #FFF6F6; border-color: #FECACA; }

/* Area cetak hanya muncul saat mencetak */
.print-area { display: none; }

/* =========================================================
   CETAK
   ========================================================= */
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { display: block; position: absolute; left: 0; top: 0; width: 100%; }
  .sheet { box-shadow: none; margin: 0; transform: none !important; page-break-after: always; }
  .sheet-wrap { padding: 0; background: #fff; }
  .no-print { display: none !important; }
}
.page-head .crumb2 svg { width: 14px; height: 14px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.kv .k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kv .v { font-weight: 600; margin-top: 2px; }
.notfound { min-height: 70vh; display: grid; place-items: center; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--sc-low); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow b, .list-row .grow .sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .sub { font-size: 12px; color: var(--muted); }
.feed-item { padding: 14px 16px; border-radius: 16px; background: var(--subtle); border: 1px solid var(--border); display: flex; gap: 12px; }
.choice-card { padding: 24px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; position: relative; text-align: left; font: inherit; color: inherit; background: #fff; border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--e1); }
.choice-card[aria-pressed="true"] { border: 2px solid var(--primary-accent); box-shadow: var(--e2); }
.choice-card[aria-pressed="true"] h3 { color: var(--primary-accent); }
.choice-card .cc-foot { margin: auto -24px -24px; padding: 14px 24px; background: var(--subtle); border-radius: 0 0 var(--r-2xl) var(--r-2xl); display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-2); }
.choice-card[aria-pressed="true"] .cc-foot { background: var(--sc-low); color: var(--primary-accent); font-weight: 600; }
.radio-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--outline); display: grid; place-items: center; }
.choice-card[aria-pressed="true"] .radio-dot { border-color: var(--primary-accent); background: var(--primary-accent); color: #fff; }
.radio-dot svg { width: 12px; height: 12px; }
.sticky-foot { position: sticky; bottom: 0; z-index: 20; margin-top: 24px; background: rgba(248,249,255,.95); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 20px; padding: 14px 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; box-shadow: var(--e1); }
.yt { position: relative; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #0B1C30; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mini-stat { padding: 14px 16px; border-radius: 16px; background: var(--sc-low); }
.mini-stat .k { font-size: 12px; color: var(--text-2); }
.mini-stat .v { font-size: 22px; font-weight: 800; }

.tc { text-align: center; }
.staff { background: linear-gradient(to right, #fff var(--sidebar-w), transparent var(--sidebar-w)); }
.sb-link span:not(.badge) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-link .badge { flex: none; white-space: nowrap; }
@media (max-width: 960px) { .staff { background: none; } }
.radio-dot svg { opacity: 0; }
.choice-card[aria-pressed="true"] .radio-dot svg { opacity: 1; }

/* Kolom aksi tabel tetap terlihat saat tabel digulir ke samping */
.dt td.num:last-child, .dt th.num:last-child { position: sticky; right: 0; background: #fff; box-shadow: -8px 0 12px -10px rgba(15,23,42,.25); }
.dt th.num:last-child { background: var(--sc-low); }
.dt tr.selected td.num:last-child { background: #F5F8FF; }
.dt tr.row-danger td.num:last-child { background: #FFF5F5; }
