/* =====================================================================
   E-Voting Ketua Umum I-MES — gaya tampilan
   ===================================================================== */
:root {
  --primary: #1e6fd9;
  --primary-700: #1553a8;
  --primary-50: #eaf2fd;
  --navy: #0b2350;
  --silver: #9aa8ba;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #14213a;
  --muted: #5b6b84;
  --border: #dbe4f0;
  --success: #12805c;
  --success-50: #e7f6ef;
  --warning: #9a5b00;
  --warning-50: #fff5e0;
  --danger: #c62828;
  --danger-50: #fdeceb;
  --info-50: #eaf2fd;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(11, 35, 80, .06), 0 6px 20px rgba(11, 35, 80, .06);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15.5px; line-height: 1.55; color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3, h4, h5 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
.h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 800; }
.h3 { font-size: 1.25rem; font-weight: 700; }
.h4 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.h5 { font-size: .95rem; font-weight: 700; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
code, .mono { font-family: var(--mono); font-size: .93em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.text-danger { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--primary); margin-bottom: .4em; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.container.narrow, .narrow { max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- Komponen dasar ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head.wrap { flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-size: .93rem;
  padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: background .15s, border-color .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus-visible, summary:focus-visible { outline: 3px solid rgba(30, 111, 217, .35); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-700); }
.btn-primary:disabled { background: #a9c2e6; cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--primary-700); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); background: var(--primary-50); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: #f1c4c2; }
.btn-danger-ghost:hover { background: var(--danger-50); }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.btn-lg { padding: 13px 24px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row.center { justify-content: center; }
.icon-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; width: 38px; height: 38px; font-size: 1.1rem; cursor: pointer; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .88rem; }
.form fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px 16px; margin: 0; display: grid; gap: 12px; }
.form legend { font-weight: 700; padding: 0 6px; }
.input { width: 100%; font: inherit; font-weight: 500; font-size: .95rem; color: var(--text); background: #fff; border: 1px solid #c9d6e8; border-radius: var(--radius-sm); padding: 10px 12px; }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.5; }
.input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(30, 111, 217, .15); }
.input-token { font-family: var(--mono); font-size: 1.35rem; font-weight: 700; text-align: center; letter-spacing: .14em; text-transform: uppercase; padding: 14px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form .input { width: auto; flex: 1 1 200px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-2.gap-lg { gap: 20px; align-items: start; }
.radio-row { display: flex !important; align-items: center; gap: 10px !important; font-weight: 500 !important; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.radio-row span:nth-child(2) { flex: 1; }
.radio-row:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; border: 1px solid; font-size: .92rem; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert-success { background: var(--success-50); border-color: #b5e2cd; color: #0b5c41; }
.alert-warning { background: var(--warning-50); border-color: #f2d49a; color: #6e4100; }
.alert-danger { background: var(--danger-50); border-color: #f3c1be; color: #8e1c1c; }
.alert-info { background: var(--info-50); border-color: #bcd5f5; color: #123f7d; }
.alert-token { background: #fffbea; border-color: #f0dc8c; color: #4d3d00; }
.token-reveal { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.token-reveal .mono { font-size: 1.5rem; font-weight: 700; letter-spacing: .1em; background: #fff; padding: 6px 14px; border-radius: 8px; border: 1px dashed #d8c164; }

.badge { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: #eef2f7; color: var(--muted); white-space: nowrap; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge-open { background: var(--success-50); color: var(--success); }
.badge-open .dot { animation: pulse 1.6s infinite; }
.badge-upcoming { background: var(--warning-50); color: var(--warning); }
.badge-closed { background: #eceff4; color: #3b4a63; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: #eef2f7; color: #3b4a63; }
.tag-ok { background: var(--success-50); color: var(--success); }
.tag-danger { background: var(--danger-50); color: var(--danger); cursor: help; }
.empty { padding: 28px; text-align: center; color: var(--muted); background: #f8fafd; border: 1px dashed var(--border); border-radius: var(--radius-sm); }

/* ---------- Header publik ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand img { height: 50px; width: auto; }
.topnav { display: flex; gap: 4px; flex-wrap: wrap; }
.topnav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .9rem; }
.topnav a:hover { background: var(--primary-50); }
.topnav a[aria-current="page"] { background: var(--primary-50); color: var(--primary-700); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; padding: 56px 0 64px; overflow: hidden;
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(91, 164, 255, .45), transparent 60%),
    linear-gradient(135deg, #0b2350 0%, #123c84 55%, #1e6fd9 100%); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .12;
  background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 32px 32px; mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; margin: 16px 0 8px; }
.hero .lead { font-size: 1.1rem; opacity: .85; margin-bottom: 22px; }
.hero .badge { background: rgba(255,255,255,.14); color: #fff; }
.hero .badge-open { background: #13a372; }
.schedule { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.schedule div { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 12px 14px; }
.schedule dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.schedule dd { margin: 4px 0 0; font-weight: 700; font-size: .95rem; }
.countdown { display: inline-flex; flex-direction: column; gap: 2px; }
.cd-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.cd-value { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.token-card { color: var(--text); margin: 0; padding: 26px; }

/* ---------- Seksi ---------- */
.section { padding: 48px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: 1.6rem; font-weight: 800; }
.section-head .badge { margin-bottom: 12px; }

/* ---------- Kartu calon ---------- */
.cand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.cand-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.cand-photo { position: relative; aspect-ratio: 4 / 5; background: #e3edf9; }
.cand-photo img { width: 100%; height: 100%; object-fit: cover; }
.cand-no { position: absolute; left: 12px; top: 12px; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.35rem; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.cand-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cand-body h3 { font-size: 1.08rem; margin: 0; }
.vm { margin-top: auto; padding-top: 10px; }
.vm summary { cursor: pointer; font-weight: 700; color: var(--primary-700); font-size: .9rem; }
.vm h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 4px; }
.vm ol { padding-left: 18px; margin: 0; font-size: .92rem; }
.vm p { font-size: .92rem; margin: 0; }

.how { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.how li { counter-increment: step; display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.how li::before { content: counter(step); width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 6px; }
.how span { color: var(--muted); font-size: .9rem; }

/* ---------- Surat suara ---------- */
.ballot-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.ballot-timer { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; display: flex; flex-direction: column; }
.ballot-timer .cd-value { font-size: 1.3rem; color: var(--primary-700); }
.ballot-timer .cd-label { color: var(--muted); }
.instruction { background: var(--primary-50); border: 1px solid #c4daf7; padding: 12px 16px; border-radius: var(--radius-sm); }
.ballot-option { cursor: pointer; display: block; }
.ballot-option input { position: absolute; opacity: 0; pointer-events: none; }
.ballot-card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ballot-option:hover .ballot-card { border-color: #9fc0ea; transform: translateY(-2px); }
.ballot-option input:focus-visible + .ballot-card { outline: 3px solid rgba(30, 111, 217, .4); outline-offset: 2px; }
.ballot-option input:checked + .ballot-card { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(30, 111, 217, .18), var(--shadow); }
.ballot-check { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: 1.3rem; font-weight: 800; transform: scale(0); transition: transform .18s; }
.ballot-option input:checked + .ballot-card .ballot-check { transform: scale(1); }
.ballot-option input:checked + .ballot-card img { filter: none; }
.ballot-grid:has(input:checked) .ballot-option input:not(:checked) + .ballot-card { opacity: .62; }
.cand-name { font-weight: 700; font-size: 1.05rem; }
.ballot-actions { position: sticky; bottom: 0; margin-top: 22px; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 30%); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

.dialog { border: 0; border-radius: var(--radius); padding: 24px; width: min(440px, calc(100% - 32px)); box-shadow: 0 20px 60px rgba(11, 35, 80, .3); }
.dialog::backdrop { background: rgba(11, 35, 80, .5); }
.confirm-cand { display: flex; gap: 14px; align-items: center; background: var(--primary-50); border-radius: 12px; padding: 12px; margin: 10px 0 14px; }
.confirm-cand img { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; }
.confirm-cand strong { display: block; font-size: 1.1rem; }

.done-card { padding: 36px 28px; }
.check-anim svg { width: 76px; height: 76px; margin: 0 auto 14px; display: block; }
.check-anim circle { fill: var(--success-50); stroke: var(--success); stroke-width: 2; }
.check-anim path { fill: none; stroke: var(--success); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.receipt { display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--bg); border: 1px dashed #9fc0ea; border-radius: 12px; padding: 16px; margin: 18px 0; }
.receipt span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.receipt strong { font-size: 1.3rem; letter-spacing: .06em; color: var(--navy); }

/* ---------- Hasil ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat strong { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--navy); }
.bars { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 16px; }
.bar-item { display: flex; gap: 14px; align-items: center; }
.bar-item img { width: 52px; height: 64px; object-fit: cover; border-radius: 8px; background: #e3edf9; flex: none; }
.bars.compact .bar-item img { width: 40px; height: 50px; }
.bar-main { flex: 1; min-width: 0; }
.bar-label { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; font-weight: 600; }
.bar-num { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.bar-track { height: 14px; background: #e9eff7; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary-700), var(--primary)); border-radius: 999px; transition: width .8s cubic-bezier(.2, .8, .2, 1); min-width: 2px; }
.bar-item.is-winner .bar-fill { background: linear-gradient(90deg, #0f7a56, #19a774); }
.winner-card { display: flex; gap: 18px; align-items: center; border-color: #b5e2cd; background: linear-gradient(135deg, #fff, var(--success-50)); }
.winner-card img { width: 84px; height: 105px; object-fit: cover; border-radius: 10px; }

/* ---------- Footer ---------- */
.site-footer { padding: 28px 0 36px; font-size: .88rem; border-top: 1px solid var(--border); background: #fff; }
.site-footer p { margin: 0 0 4px; }
main#main { min-height: calc(100vh - 220px); }

/* ---------- Login ---------- */
.login-page { background: linear-gradient(135deg, #0b2350, #1e6fd9); min-height: 100vh; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(400px, 100%); padding: 30px; }
.login-logo { margin: 0 auto 16px; }
.login-card h1 { text-align: center; margin-bottom: 18px; }

/* ---------- Admin ---------- */
.admin { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: linear-gradient(90deg, #fff 239px, var(--border) 239px 240px, var(--bg) 240px); }
.sidebar { background: #fff; border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { display: flex; flex-direction: column; gap: 4px; padding: 4px 10px 12px; border-bottom: 1px solid var(--border); text-decoration: none; }
.sidebar-brand img { width: 150px; height: auto; }
.sidebar-brand span { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.sidebar nav { display: grid; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; }
.sidebar nav a svg { width: 18px; height: 18px; fill: var(--silver); flex: none; }
.sidebar nav a:hover { background: var(--bg); }
.sidebar nav a[aria-current="page"] { background: var(--primary-50); color: var(--primary-700); }
.sidebar nav a[aria-current="page"] svg { fill: var(--primary); }
.sidebar-foot { margin-top: auto; padding: 10px 12px; font-size: .85rem; }
.admin-main { min-width: 0; }
.admin-top { display: flex; align-items: center; gap: 14px; padding: 16px 28px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.admin-top h1 { font-size: 1.3rem; margin: 0; }
.admin-user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; }
.admin-user form { margin: 0; }
.admin-content { padding: 24px 28px 48px; max-width: 1280px; }
.only-mobile { display: none; }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--border); background: #f8fafd; }
.table td { padding: 10px; border-bottom: 1px solid #edf1f7; vertical-align: top; }
.table tr:hover td { background: #fafcff; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 14px; }
.pager a { min-width: 34px; text-align: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); text-decoration: none; color: var(--text); font-size: .85rem; }
.pager a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }

.menu { position: relative; display: inline-block; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(11, 35, 80, .15); min-width: 210px; padding: 6px; display: grid; text-align: left; }
.menu-pop form { margin: 0; }
.menu-pop button, .menu-pop a { display: block; width: 100%; text-align: left; font: inherit; font-size: .88rem; padding: 8px 10px; border: 0; background: none; border-radius: 7px; cursor: pointer; color: var(--text); text-decoration: none; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--bg); }
.menu-pop .text-danger { color: var(--danger); }

.checklist { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.checklist li > span:nth-child(2) { flex: 1; }
.checklist .ci { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; flex: none; }
.checklist .ok .ci { background: var(--success-50); color: var(--success); }
.checklist .todo .ci { background: var(--warning-50); color: var(--warning); }
.kv { display: grid; gap: 6px; margin: 0; }
.kv div { display: flex; gap: 10px; }
.kv dt { color: var(--muted); min-width: 92px; }
.kv dd { margin: 0; font-weight: 600; }

.admin-cands { display: grid; gap: 10px; }
.admin-cand { display: flex; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.admin-cand img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; }
.admin-cand form { margin: 0; }
.cand-form { grid-template-columns: 200px 1fr; align-items: start; }
.cand-fields { display: grid; gap: 14px; }
.photo-field { display: grid; gap: 8px; justify-items: start; }
.photo-field img { width: 200px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }

.progress { margin-top: 16px; }
.progress-track { height: 10px; border-radius: 999px; background: #e9eff7; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; width: 0; background: var(--primary); transition: width .4s; }
.send-errors { max-height: 160px; overflow: auto; padding-left: 18px; }
.email-preview { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: 10px; background: #eef3fa; }

.doc-list { display: grid; gap: 10px; margin-bottom: 14px; }
.doc { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); }
.doc:hover { border-color: var(--primary); background: var(--primary-50); }
.doc strong { color: var(--primary-700); }

details.sub { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
details.sub summary { cursor: pointer; font-weight: 700; color: var(--primary-700); margin-bottom: 10px; }
.danger-zone { border-color: #f3c1be; }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 8px; }

/* ---------- Responsif ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 1fr; background: var(--bg); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .sidebar.open { transform: none; }
  .only-mobile { display: inline-grid; place-items: center; }
  .admin-top { padding: 12px 16px; }
  .admin-content { padding: 18px 16px 40px; }
  .grid-2.gap-lg { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar-inner { min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .brand img { height: 40px; }
  .topnav a { padding: 6px 9px; font-size: .84rem; }
  .hero { padding: 36px 0 40px; }
  .schedule, .grid-2 { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
  .cand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cand-body { padding: 12px; }
  .cand-no { width: 38px; height: 38px; font-size: 1.1rem; left: 8px; top: 8px; }
  .card { padding: 18px; }
  .cand-form { grid-template-columns: 1fr; }
  .admin-user span { display: none; }
  .winner-card { flex-direction: column; text-align: center; }
}
@media (max-width: 380px) { .cand-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
