/* ==========================================================================
   SIDATA CALEG 2.0 — sistem desain
   Diadopsi utuh dari aplikasi versi Google Apps Script: token warna, tipografi
   Plus Jakarta Sans, sidebar navy bergradien, tab aktif biru aksen, kartu hero,
   metric color-mix, dan seluruh komponennya.
   ========================================================================== */

:root {
    --navy: #1F2A44;
    --navy-deep: #141D33;
    --ink: #243046;
    --muted: #6B7690;
    --line: #E4E8F0;
    --bg: #F4F6FA;
    --surface: #FFFFFF;
    --accent: #2F6FED;
    --accent-soft: #EAF1FE;
    --teal: #0E9F8A;
    --amber: #D98A18;
    --amber-soft: #FDF3E2;
    --violet: #7A5AF8;
    --rose: #D64570;
    --danger: #D6455B;
    --danger-soft: #FCEAEE;
    --ok: #17803D;
    --ok-soft: #DCFAE6;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(20, 29, 51, .05), 0 8px 24px -12px rgba(20, 29, 51, .12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.2px; }

/* ===================================================================== SIDEBAR */

.sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 264px; z-index: 60;
    background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 70%, #25355B 100%);
    color: #fff; display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, .06); transition: transform .26s ease;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 6px; }

.app-main { margin-left: 264px; min-height: 100vh; display: flex; flex-direction: column; }

.side-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; }
.brand-mark {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px; letter-spacing: .5px;
}
.side-brand h1 { font-size: 15.5px; font-weight: 800; letter-spacing: -.2px; line-height: 1.1; }
.side-brand p { font-size: 11px; color: rgba(255, 255, 255, .55); font-weight: 500; margin-top: 2px; }

.nav-group { margin-bottom: 6px; }
.nav-group-label {
    font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
    color: rgba(255, 255, 255, .4); padding: 14px 12px 7px;
}
.nav-group:first-of-type .nav-group-label { padding-top: 6px; }

.tab {
    width: 100%; border: 0; background: transparent; cursor: pointer; font-family: inherit;
    font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, .66);
    padding: 10px 12px; border-radius: 11px; display: flex; align-items: center; gap: 12px;
    transition: all .16s ease; text-align: left; margin-bottom: 2px; text-decoration: none;
}
.tab svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.tab:not(.active):hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.tab:not(.active):hover svg { opacity: 1; }
.tab.active {
    background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
    box-shadow: 0 10px 20px -9px color-mix(in srgb, var(--accent) 75%, transparent);
}
.tab.active svg { opacity: 1; }
.tab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.side-foot {
    margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 11px; color: rgba(255, 255, 255, .42); font-weight: 600; line-height: 1.5;
}

/* ====================================================================== TOPBAR */

.topbar {
    position: sticky; top: 0; z-index: 40; display: flex; align-items: center;
    justify-content: space-between; gap: 14px; padding: 14px 28px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title h2 { font-size: 16.5px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); line-height: 1.15; }
.topbar-title p { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar .clock { font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.user-chip {
    display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
.user-av {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
}
.user-chip .nm { font-size: 12.5px; font-weight: 800; color: var(--ink); line-height: 1.15; }
.user-chip .rl { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.icon-btn {
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--line);
    background: var(--surface); color: var(--muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; transition: all .15s ease;
}
.icon-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); text-decoration: none; }
.icon-btn svg { width: 17px; height: 17px; }

.side-toggle {
    display: none; width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink);
    cursor: pointer; align-items: center; justify-content: center;
}
.side-toggle svg { width: 20px; height: 20px; }
.side-toggle:active { transform: scale(.94); }

.sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(15, 20, 35, .5); z-index: 55;
    opacity: 0; visibility: hidden; transition: opacity .26s ease;
}
.sidebar-backdrop.show { opacity: 1; visibility: visible; }

main { padding: 22px 28px 60px; }
main > * + * { margin-top: 16px; }

/* Halaman pengaturan & rekap (grup "Dokumen & Pengaturan") tidak perlu selebar
   layar. Dibentangkan penuh pada monitor lebar, mata harus menyapu terlalu jauh
   dari kiri ke kanan. Isinya dipusatkan pada lebar baca yang wajar. */
main.fokus { max-width: 1180px; margin-inline: auto; width: 100%; }

/* ======================================================================== HERO */

.hero {
    position: relative; overflow: hidden; border-radius: 20px; color: #fff;
    background: linear-gradient(125deg, var(--navy-deep) 0%, var(--navy) 42%, #2C3F6E 78%, #324A82 100%);
    box-shadow: 0 18px 40px -18px rgba(20, 29, 51, .55);
    padding: 28px 30px;
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
}
.hero::before {
    content: ''; position: absolute; right: -60px; top: -90px; width: 340px; height: 340px; border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 111, 237, .45), transparent 68%); pointer-events: none;
}
.hero::after {
    content: ''; position: absolute; left: -40px; bottom: -120px; width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 90, 248, .30), transparent 70%); pointer-events: none;
}
.hero-main { position: relative; z-index: 1; min-width: 0; }
.hero-label {
    display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: 1px;
    text-transform: uppercase; color: rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
    padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.hero-label .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ADE9B; box-shadow: 0 0 0 4px rgba(74, 222, 155, .22); }
.hero-value {
    font-size: 60px; font-weight: 800; letter-spacing: -2.5px; line-height: .95; font-variant-numeric: tabular-nums;
    background: linear-gradient(90deg, #fff 0%, #CFE0FF 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 13.5px; color: rgba(255, 255, 255, .72); margin-top: 8px; font-weight: 600; }
.hero-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; position: relative; z-index: 1; }
.hero-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #fff;
    font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s ease;
}
.hero-btn:hover { background: rgba(255, 255, 255, .2); text-decoration: none; }
.hero-btn svg { width: 16px; height: 16px; }

.hero-viz { position: relative; z-index: 1; display: flex; align-items: center; gap: 20px; }
.donut-wrap { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.donut { width: 132px; height: 132px; transform: rotate(-90deg); }
.donut-track { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 14; }
.donut-seg { fill: none; stroke-width: 14; stroke-linecap: round; transition: stroke-dasharray .7s ease; }
.donut-L { stroke: #4C8DFF; }
.donut-P { stroke: #F472A8; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center .dc-num { font-size: 26px; font-weight: 800; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.donut-center .dc-cap { font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-top: 2px; }
.donut-legend { display: flex; flex-direction: column; gap: 12px; }
.dl-row { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .85); white-space: nowrap; }
.dl-dot { width: 11px; height: 11px; border-radius: 4px; flex-shrink: 0; }
.dl-dot.L { background: #4C8DFF; }
.dl-dot.P { background: #F472A8; }
.dl-row b { font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.dl-pct { font-size: 11px; font-weight: 800; color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .1); padding: 1px 8px; border-radius: 999px; margin-left: 2px; }

/* ===================================================================== METRICS */

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-grid--3 { grid-template-columns: repeat(3, 1fr); }
.metric {
    --c: var(--accent);
    background: color-mix(in srgb, var(--c) 8%, #fff);
    border: 1px solid color-mix(in srgb, var(--c) 22%, #fff);
    border-radius: 16px; padding: 16px 18px; position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 14px;
    transition: transform .16s ease, box-shadow .16s ease;
}
.metric:hover { transform: translateY(-3px); box-shadow: 0 14px 26px -14px color-mix(in srgb, var(--c) 55%, transparent); }
.metric-bg-ico {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%); z-index: 0; pointer-events: none;
    color: color-mix(in srgb, var(--c) 13%, transparent);
}
.metric-bg-ico svg { width: 78px; height: 78px; }
.metric-ico {
    width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--c); color: #fff; box-shadow: 0 10px 18px -7px color-mix(in srgb, var(--c) 65%, transparent);
    position: relative; z-index: 1;
}
.metric-ico svg { width: 24px; height: 24px; }
.metric-body { position: relative; z-index: 1; min-width: 0; }
.metric-num { font-size: 31px; font-weight: 800; letter-spacing: -1.2px; line-height: 1; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--c) 42%, var(--ink)); }
.metric-cap { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.metric-sub { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* ====================================================================== TABEL */

.table-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
}
.table-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.table-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.table-head p { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.table-head .count-pill {
    font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft);
    padding: 3px 10px; border-radius: 999px; margin-left: 8px;
}
.table-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.table-body { padding: 16px 18px; }
.table-scroll { overflow: auto; position: relative; }

table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data thead th {
    position: sticky; top: 0; z-index: 1;
    text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    color: var(--muted); padding: 11px 16px; background: #F8FAFD; border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
table.data tbody td { padding: 12px 16px; border-bottom: 1px solid #EEF1F6; vertical-align: middle; }
table.data tbody tr:hover { background: #FAFBFE; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.nama { font-weight: 600; }
table.data .mono { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.mid, table.data th.mid { text-align: center; }
table.data tfoot td { padding: 12px 16px; border-top: 1px solid var(--line); font-weight: 800; background: #F8FAFD; }
.row-no { color: var(--muted); font-weight: 700; font-size: 13px; }
.aksi-cell { text-align: right; white-space: nowrap; }

.table-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 18px; border-top: 1px solid var(--line);
}
.table-footer .info { font-size: 12.5px; color: var(--muted); font-weight: 600; }

.empty { padding: 52px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 38px; height: 38px; color: var(--line); margin-bottom: 10px; }
.empty .big { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.empty p { font-size: 13px; }

/* ================================================================ CHIP & BADGE */

.chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--ink); }
.chip.L { background: #EAF1FE; color: #2456C4; }
.chip.P { background: #FDEDF3; color: #B93A66; }
.chip.total { background: #DFF6EE; color: #0E8A76; font-weight: 800; }
.chip.kec { background: var(--accent-soft); color: var(--accent); }
.chip.kel { background: #F1ECFE; color: #6A46E5; }
.chip.rtcover { background: var(--amber-soft); color: #8A5F0F; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--amber-soft); color: #8A5F0F; }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.navy { background: var(--navy); color: #fff; }
.chip.mono { font-variant-numeric: tabular-nums; }

.wil-cell { display: flex; flex-wrap: wrap; gap: 4px; }
.wil-chip {
    display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 7px;
    max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
.wil-chip.kec { background: var(--accent-soft); color: var(--accent); }
.wil-chip.kel { background: #F1ECFE; color: #6A46E5; }
.wil-empty { color: var(--muted); font-weight: 600; }

/* ======================================================================= FORM */

/* Dulu memakai grid `repeat(auto-fit, minmax(160px,1fr)) auto`. Di layar lebar
   auto-fit membuat jauh lebih banyak track daripada jumlah isian, sehingga
   lebar antar-kolom jadi timpang dan tombol Reset terlempar ke baris kedua.
   Flex membagi ruang merata berapa pun jumlah isiannya. */
.filter-bar {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 16px 18px;
    display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: end;
}
.filter-bar > .field { flex: 1 1 200px; min-width: 0; }
.filter-bar > .flex { flex: 0 0 auto; }
.filter-bar--wide > .field { flex-basis: 165px; }
.field label {
    display: block; font-size: 11px; font-weight: 700; letter-spacing: .6px;
    text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
select, input, textarea {
    width: 100%; font-family: inherit; font-size: 14px; color: var(--ink);
    background: #FBFCFE; border: 1.5px solid var(--line); border-radius: 10px;
    padding: 10px 12px; transition: border-color .15s, box-shadow .15s;
}
select:focus, input:focus, textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft); background: #fff;
}
input[type="checkbox"], input[type="radio"] { width: auto; }
input:disabled, select:disabled, textarea:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
textarea { resize: vertical; min-height: 74px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.field .err { font-size: 12px; color: var(--danger); margin-top: 5px; font-weight: 600; }
.field.invalid input, .field.invalid select, input.invalid, select.invalid { border-color: var(--danger); }
input.valid, select.valid { border-color: color-mix(in srgb, var(--ok) 55%, #fff); }
.req::after { content: ' *'; color: var(--danger); }

.search-box { position: relative; width: 240px; max-width: 100%; }
.search-box input { padding-left: 34px; font-size: 13.5px; }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }

.form-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); max-width: 760px; margin: 0 auto; overflow: hidden;
}
.form-card.form-card-wide { max-width: none; }
.form-header { padding: 22px 26px 0; }
.form-header h2 { font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.form-header p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.form-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.form-body { padding: 20px 26px 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-body--1 { grid-template-columns: 1fr; }
.full { grid-column: 1 / -1; }
.form-actions {
    grid-column: 1 / -1; display: flex; gap: 10px; justify-content: flex-end;
    padding-top: 12px; border-top: 1px solid var(--line); margin-top: 6px;
}

.radio-row { display: flex; gap: 10px; }
.radio-pill { flex: 1; position: relative; }
.radio-pill input { position: absolute; opacity: 0; width: 0; }
.radio-pill span {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer;
    font-size: 13.5px; font-weight: 600; color: var(--muted); background: #FBFCFE; transition: all .15s;
}
.radio-pill input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.radio-pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Satu isian yang berdampingan dengan tombolnya. */
.baris-isian { display: flex; gap: 8px; align-items: stretch; }
.baris-isian > select, .baris-isian > input { flex: 1; min-width: 0; }
.baris-isian > .btn-reset { flex-shrink: 0; }

.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px;
    font-size: 13px; font-weight: 700; color: var(--muted); background: #FBFCFE; transition: all .15s;
}
.check-pill:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
/* Bila dipakai sebagai <label> di dalam .field, aturan `.field label`
   (specificity lebih tinggi) mengubahnya jadi blok HURUF BESAR 11px sehingga
   kotak centang menempel ke teksnya. Dikembalikan di sini. */
.field label.check-pill {
    display: inline-flex; text-transform: none; letter-spacing: normal;
    font-size: 13px; color: var(--muted); margin-bottom: 0; width: auto;
}
.field label.check-pill:has(input:checked) { color: var(--accent); }
.check-pill input { flex-shrink: 0; margin: 0; }

/* ==================================================================== TOMBOL */

.btn {
    font-family: inherit; font-size: 14px; font-weight: 700; border-radius: 10px;
    padding: 11px 22px; cursor: pointer; border: 0; transition: all .15s;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 20px -10px var(--accent); }
.btn-accent:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--muted); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.07); }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-reset {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 1.5px solid var(--line); background: var(--surface); color: var(--muted);
    font-family: inherit; font-size: 13px; font-weight: 600; padding: 10px 16px;
    border-radius: 10px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
/* Tanpa ini, ikon inline di dalam tombol memakai ukuran alaminya dan
   membengkak — dipakai di beberapa halaman (Excel/PDF, Setup TPS, dll). */
.btn-reset svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-reset:hover { border-color: var(--muted); color: var(--ink); text-decoration: none; }
.btn-ai {
    display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
    background: linear-gradient(135deg, #2F6FED, #7A5AF8); color: #fff; border: 0; cursor: pointer;
    padding: 10px 16px; border-radius: 11px; font-family: inherit; font-size: 13.5px; font-weight: 700;
    box-shadow: 0 6px 16px -4px rgba(122, 90, 248, .5); transition: transform .15s ease, box-shadow .15s ease;
}
.btn-ai:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -6px rgba(122, 90, 248, .6); text-decoration: none; }
.btn-ai:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-ai svg { width: 17px; height: 17px; }

.action-btn {
    width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line);
    background: var(--accent-soft); color: var(--accent); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; transition: all .15s ease;
}
.action-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }
.action-btn svg { width: 16px; height: 16px; }
.btn-delete {
    width: 32px; height: 32px; border-radius: 9px; border: 1px solid transparent; background: transparent;
    color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    transition: all .15s ease; flex-shrink: 0;
}
.btn-delete:hover { background: var(--danger-soft); color: var(--danger); }
.btn-delete svg { width: 15px; height: 15px; }

.spinner {
    width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
    border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
.spinner-dark { border-color: var(--line); border-top-color: var(--accent); }
.spinner-lg { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state { padding: 60px 20px; text-align: center; color: var(--muted); font-size: 13.5px; font-weight: 600; }

/* ==================================================================== PAGINASI */

.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager a, .pager span {
    font-family: inherit; font-size: 13px; font-weight: 700; border: 1.5px solid var(--line);
    background: var(--surface); color: var(--ink); min-width: 32px; height: 32px; padding: 0 8px;
    border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    transition: all .15s; text-decoration: none;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pager .is-current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .is-disabled { opacity: .35; pointer-events: none; }

/* ============================================================== NIK & DUPLIKAT */

.nik-wrap { position: relative; }
.dupe-warning {
    display: none; align-items: flex-start; gap: 8px; margin-top: 8px;
    background: var(--danger-soft); border: 1px solid #F4C2CE; color: #A32E4C;
    border-radius: 10px; padding: 9px 11px; font-size: 12.5px; font-weight: 600; line-height: 1.4;
}
.dupe-warning.show { display: flex; }
.dupe-warning svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.dupe-warning b { font-weight: 800; }
.ok-note {
    display: none; align-items: flex-start; gap: 8px; margin-top: 8px;
    background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 30%, #fff); color: var(--ok);
    border-radius: 10px; padding: 9px 11px; font-size: 12.5px; font-weight: 600;
}
.ok-note.show { display: flex; }
.field.dupe input { border-color: var(--danger); background: var(--danger-soft); }

/* ---- pemberitahuan di bawah isian NIK (App.pantauNik) ----
   Tiga nada: bentrok (galat), kabar (orang yang sama di modul lain, bukan
   masalah), dan aman. Dibedakan warna agar operator tidak perlu membaca dulu
   untuk tahu apakah ia boleh lanjut. */
.nik-catatan { display: none; margin-top: 6px; }
.nik-catatan.show { display: block; }
.nik-note {
    font-size: 12px; line-height: 1.45; font-weight: 600; color: var(--muted);
    padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line);
    background: var(--bg); margin-top: 5px;
}
.nik-note:first-child { margin-top: 0; }
.nik-note b { color: var(--ink); font-weight: 800; }
.nik-note.bentrok {
    color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, #fff);
    background: var(--danger-soft);
}
.nik-note.bentrok b { color: var(--danger); }
.nik-note.aman { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, #fff); background: color-mix(in srgb, var(--ok) 8%, #fff); }
.nik-note.kabar { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, #fff); background: var(--accent-soft); }
.nik-note.kabar b { color: var(--accent); }

.nik-aksi {
    display: inline-block; margin-left: 4px; padding: 3px 10px; border-radius: 999px;
    border: 1px solid var(--accent); background: var(--accent); color: #fff;
    font-size: 11.5px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.nik-aksi:hover { filter: brightness(1.08); }

/* ======================================================================= ALERT */

.alert {
    display: flex; gap: 10px; align-items: flex-start; border-radius: 12px;
    padding: 12px 14px; font-size: 12.5px; font-weight: 600; line-height: 1.5; border: 1px solid transparent;
}
.alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 28%, #fff); }
.alert-danger { background: var(--danger-soft); color: #A32E4C; border-color: #F4C2CE; }
.alert-warn { background: var(--amber-soft); color: #8A5B0C; border-color: #F0D8A8; }
.alert-info { background: var(--accent-soft); color: #1E4FB0; border-color: color-mix(in srgb, var(--accent) 22%, #fff); }

/* ======================================================================= TOAST */

#toast-area { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.toast {
    background: var(--navy-deep); color: #fff; font-size: 13.5px; font-weight: 600;
    padding: 12px 20px; border-radius: 12px; box-shadow: 0 12px 32px -8px rgba(20, 29, 51, .4);
    display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 40px);
    animation: toastIn .25s ease;
}
.toast .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: #fff; }
.toast.ok .dot { background: #3DD9A0; }
.toast.fail .dot { background: #FF7A8E; }
.toast.warn .dot { background: #FFC46B; }
.toast .close { background: none; border: 0; color: rgba(255, 255, 255, .6); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 0 0 4px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ============================================================== MODAL & KONFIRMASI */

.modal-overlay {
    position: fixed; inset: 0; background: rgba(20, 29, 51, .55);
    display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: var(--surface); border-radius: var(--radius); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .35);
    max-width: 820px; width: 100%; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column;
    animation: modalIn .18s ease;
}
.modal-box-sm { max-width: 460px; }
.modal-box-lg { max-width: 920px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.modal-head-text { flex: 1; min-width: 0; }
.modal-head h3 { font-size: 15.5px; font-weight: 800; letter-spacing: -.2px; }
.modal-head p { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.modal-close {
    background: transparent; border: 0; font-size: 22px; line-height: 1; color: var(--muted);
    cursor: pointer; padding: 2px 8px; border-radius: 8px; flex-shrink: 0;
}
.modal-close:hover { background: var(--bg); color: var(--ink); }
.modal-body { overflow: auto; padding: 18px; flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

.confirm-overlay {
    position: fixed; inset: 0; z-index: 210; display: none; align-items: center; justify-content: center;
    padding: 20px; background: rgba(15, 20, 35, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.confirm-overlay.show { display: flex; }
.confirm-box {
    background: var(--surface); border-radius: 20px; width: 100%; max-width: 398px; text-align: center;
    padding: 30px 28px 22px; box-shadow: 0 30px 70px -18px rgba(20, 29, 51, .55); animation: modalIn .2s ease;
}
.confirm-ico {
    width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 17px;
    display: flex; align-items: center; justify-content: center;
    background: var(--danger-soft); color: var(--danger);
}
.confirm-ico svg { width: 28px; height: 28px; }
.confirm-box.confirm-primary .confirm-ico { background: var(--accent-soft); color: var(--accent); }
.confirm-title { font-size: 18px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); }
.confirm-msg { font-size: 13.5px; color: var(--muted); font-weight: 500; line-height: 1.55; margin-top: 9px; }
.confirm-msg b { color: var(--ink); font-weight: 700; }
.confirm-actions { display: flex; gap: 10px; margin-top: 24px; }
.confirm-actions button {
    flex: 1; padding: 12px 16px; border-radius: 12px; font-family: inherit; font-size: 13.5px; font-weight: 700;
    cursor: pointer; transition: all .15s ease; border: 1px solid transparent;
}
.confirm-actions button:active { transform: scale(.98); }
.confirm-cancel { background: var(--bg); color: var(--ink); border-color: var(--line); }
.confirm-cancel:hover { background: var(--line); }
.confirm-ok { background: var(--danger); color: #fff; box-shadow: 0 12px 22px -10px var(--danger); }
.confirm-ok:hover { filter: brightness(1.07); }
.confirm-box.confirm-primary .confirm-ok { background: var(--accent); box-shadow: 0 12px 22px -10px var(--accent); }

/* ============================================================== GRID INPUT MASSAL */

.batch-wrap { padding: 18px 26px 24px; }
.batch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 12px; }
.batch-head h3 { font-size: 14.5px; font-weight: 800; letter-spacing: -.2px; }
.batch-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.batch-tablecard {
    border: 1px solid var(--line); border-radius: 14px; overflow: auto; background: var(--surface);
    max-height: min(58vh, 560px); box-shadow: 0 1px 2px rgba(20, 29, 51, .04);
}
.btab { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 960px; }
.btab thead th {
    position: sticky; top: 0; z-index: 2; background: var(--bg); text-align: left; white-space: nowrap;
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 800;
    padding: 11px 10px; border-bottom: 1px solid var(--line);
}
.btab thead th i { color: var(--danger); font-style: normal; margin-left: 1px; }
.btab tbody td { padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.btab tbody tr:last-child td { border-bottom: 0; }
.btab tbody tr { transition: background .12s ease; }
.btab tbody tr:hover { background: #FAFBFD; }
.btab tbody tr.valid:hover { background: #F4FDF7; }
.c-no { width: 46px; text-align: center; }
.c-act { width: 46px; text-align: center; }
.brow-no {
    display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; border-radius: 7px;
    background: var(--bg); color: var(--muted); font-weight: 800; font-size: 12px; font-variant-numeric: tabular-nums;
    transition: all .2s ease;
}
.brow.valid .brow-no { background: var(--ok-soft); color: var(--ok); }
.brow.has-dupe .brow-no { background: var(--danger-soft); color: var(--danger); }

.bi {
    width: 100%; padding: 8px 10px; border: 1.5px solid transparent; border-radius: 8px; background: transparent;
    font-family: inherit; font-size: 13px; color: var(--ink);
    transition: border-color .13s ease, background .13s ease, box-shadow .13s ease;
}
.bi::placeholder { color: #B4BCC9; }
.bi:hover { background: #EDF1F7; }
.bi:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bi.bad { border-color: var(--danger); background: var(--danger-soft); }
.b-nik { font-variant-numeric: tabular-nums; letter-spacing: .4px; }
select.bi {
    cursor: pointer; appearance: none; -webkit-appearance: none; -moz-appearance: none; padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237A8296' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 9px center;
}
.c-nik { position: relative; }
.nik-flag {
    display: none; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    width: 17px; height: 17px; border-radius: 50%; background: var(--danger); color: #fff;
    font-size: 11px; font-weight: 800; align-items: center; justify-content: center; cursor: default;
}
.brow.has-dupe .nik-flag { display: inline-flex; }
.brow.has-dupe .b-nik { padding-right: 30px; }
.brow-del {
    width: 31px; height: 31px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted);
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all .15s ease;
}
.brow-del:hover { background: var(--danger-soft); color: var(--danger); }
.brow-del:active { transform: scale(.94); }
.brow-del svg { width: 15px; height: 15px; }

.save-bar {
    position: sticky; bottom: 14px; margin-top: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px;
    box-shadow: 0 12px 34px -12px rgba(20, 29, 51, .32); z-index: 10;
}
.save-bar .info { margin-right: auto; font-size: 13px; font-weight: 800; color: var(--ink); }
.save-bar .info b { color: var(--accent); }

.shared-wrap { padding: 18px 26px 0; }
.shared-box {
    background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 18%, #fff);
    border-radius: 14px; padding: 15px 18px 18px;
}
.shared-box-title {
    display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 13px;
    font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--navy);
}
.shared-box-title span {
    font-size: 10.5px; font-weight: 700; letter-spacing: .2px; text-transform: none; color: var(--accent);
    background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 25%, #fff);
    padding: 2px 9px; border-radius: 999px;
}
.shared-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 16px; }

/* ==================================================================== SETUP TPS */

.tps-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.tps-panel {
    display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 20px 22px; border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent) 5%, #fff));
    border: 1px solid color-mix(in srgb, var(--accent) 18%, #fff);
}
.tps-panel-info { flex: 1; min-width: 170px; }
.tps-panel-cap { font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--accent); }
.tps-panel-kel { font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: var(--navy); margin-top: 2px; line-height: 1.15; }
.tps-panel-hint { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 5px; }
.tps-panel-hint b { color: var(--ink); font-weight: 800; }
.tps-stepper { display: inline-flex; align-items: center; gap: 12px; }
.tps-step-btn {
    width: 46px; height: 46px; border-radius: 13px; border: 1.5px solid color-mix(in srgb, var(--accent) 25%, #fff);
    background: var(--surface); font-size: 22px; font-weight: 700; color: var(--accent); cursor: pointer;
    display: flex; align-items: center; justify-content: center; line-height: 1; transition: all .14s ease;
    box-shadow: 0 1px 2px rgba(20, 29, 51, .05);
}
.tps-step-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.tps-step-btn:active { transform: scale(.92); }
.tps-num {
    width: 104px; height: 58px; border: 1.5px solid var(--line); border-radius: 14px; text-align: center;
    font-family: inherit; font-size: 27px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums;
    background: var(--surface); -moz-appearance: textfield;
}
.tps-num::-webkit-outer-spin-button, .tps-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tps-save-btn { height: 58px; padding: 0 30px; font-size: 15px; }

.tps-group { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.tps-group:last-child { margin-bottom: 0; }
.tps-group-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px;
    background: linear-gradient(180deg, var(--accent-soft), color-mix(in srgb, var(--accent) 4%, #fff));
    border-bottom: 1px solid var(--line);
}
.tps-group-name { font-size: 14px; font-weight: 800; letter-spacing: -.2px; color: var(--navy); }
.tps-group-sub { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tps-group-sub b { color: var(--accent); font-weight: 800; }
.tps-group-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1px; background: var(--line); }
.tps-krow {
    display: flex; align-items: center; gap: 10px; padding: 12px 15px; background: var(--surface); border: 0; width: 100%;
    font-family: inherit; text-align: left; cursor: pointer; transition: background .13s ease;
}
.tps-krow:hover { background: var(--accent-soft); }
.tps-krow-nama { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tps-krow-jml { font-size: 12.5px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tps-krow-jml.belum { color: var(--muted); font-weight: 600; font-style: italic; }
.tps-krow-edit { width: 15px; height: 15px; color: var(--muted); opacity: 0; transition: opacity .13s ease; flex-shrink: 0; }
.tps-krow:hover .tps-krow-edit { opacity: 1; color: var(--accent); }

.tps-edit-stepper { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 0 2px; }

/* ================================================================= INPUT SAKSI */

/* Kolom TPS dipatok sempit karena isinya pendek ("TPS 01"), tapi harus cukup
   untuk teks penuntunnya selagi kosong — 130px memotongnya. */
.is-loc-grid { display: grid; grid-template-columns: 1fr 1fr 180px; gap: 14px; }
.is-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; margin-top: 18px; }
.is-grid .full { grid-column: 1/-1; }

.jk-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 520px; }
.jk-opt {
    position: relative; padding: 14px 16px; border-radius: 12px; font-size: 14px; font-weight: 700;
    border: 2px solid var(--line); background: #FBFCFE; color: var(--muted); cursor: pointer;
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; transition: all .15s ease;
    font-family: inherit; text-align: left;
}
.jk-opt small { font-size: 11px; font-weight: 600; opacity: .7; text-transform: none; letter-spacing: 0; }
.jk-opt.on { color: #fff; border-color: transparent; box-shadow: 0 10px 20px -10px rgba(20, 29, 51, .45); }
.jk-opt.on small { opacity: .92; color: #fff; }
.jk-opt[data-v="PILEG"].on { background: var(--accent); }
.jk-opt[data-v="PILPRES"].on { background: var(--violet); }
.jk-opt[data-v="L"].on { background: var(--accent); }
.jk-opt[data-v="P"].on { background: var(--rose); }
.jk-opt.on::after {
    content: '\2713'; position: absolute; top: 11px; right: 13px; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255, 255, 255, .22); color: #fff; font-size: 12px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.jk-opt.locked { opacity: .55; cursor: not-allowed; background: var(--bg); border-style: dashed; color: var(--muted); }
.jk-opt.locked small { color: var(--muted); }
.jk-opt.locked::after { content: 'terisi'; position: absolute; top: 13px; right: 14px; font-size: 10px; font-weight: 800; color: var(--muted); background: transparent; width: auto; height: auto; }

.is-tps-status { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.is-slot { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 11px; border: 1.5px solid var(--line); }
.is-slot.done { background: #F6FEF9; border-color: color-mix(in srgb, #17B26A 42%, #fff); }
.is-slot.empty { background: var(--bg); border-style: dashed; }
.is-slot-tag { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 6px; flex-shrink: 0; }
.is-slot-tag.pileg { background: var(--accent-soft); color: var(--accent); }
.is-slot-tag.pilpres { background: #F1ECFE; color: var(--violet); }
.is-slot-nama { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-slot-ok { font-size: 11px; font-weight: 800; color: var(--ok); white-space: nowrap; flex-shrink: 0; }
.is-slot-empty { flex: 1; font-size: 12.5px; color: var(--muted); font-weight: 600; font-style: italic; }

/* ================================================================= REKAP SAKSI */

.saksi-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 720px; }
.saksi-tbl thead th {
    position: sticky; top: 0; z-index: 1; background: var(--bg); text-align: left; white-space: nowrap;
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 800;
    padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.saksi-tbl td { padding: 6px 12px; vertical-align: middle; }
.sk-row.sk-first td { border-top: 1px solid var(--line); }
.saksi-tbl tbody tr:first-child td { border-top: 0; }
.sk-tps { background: var(--bg); border-right: 1px solid var(--line); white-space: nowrap; }
.sk-tps-top { display: flex; align-items: center; gap: 8px; }
.sk-tps-no { font-size: 13.5px; font-weight: 800; color: var(--navy); }
.sk-tps-loc { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 3px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.slot-tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .4px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.slot-tag.pileg { background: var(--accent-soft); color: var(--accent); }
.slot-tag.pilpres { background: #F1ECFE; color: var(--violet); }
.sk-nama { font-weight: 700; color: var(--ink); }
.sk-kosong { color: var(--muted); font-style: italic; font-weight: 600; }

/* Tombol aksi harus muat berdampingan. Bila menumpuk, tinggi barisnya melonjak
   dari ~40px ke ~90px — dan tiap TPS memakan dua baris, jadi ongkosnya dobel. */
.sk-act { text-align: center; white-space: nowrap; padding-left: 4px; padding-right: 4px; }
.sk-act .action-btn, .sk-act .brow-del { width: 27px; height: 27px; border-radius: 7px; vertical-align: middle; }
.sk-act .action-btn svg, .sk-act .brow-del svg { width: 14px; height: 14px; }
.tps-status { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tps-status.ok { background: var(--ok-soft); color: var(--ok); }
.tps-status.warn { background: var(--amber-soft); color: #8A5F0F; }
.tps-status.none { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

/* ===================================================================== CAKUPAN */

.kec-cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.kec-cover { border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; background: var(--surface); }
.kec-cover-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.kec-cover-name { font-size: 13.5px; font-weight: 800; letter-spacing: -.2px; color: var(--navy); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kec-cover-pct { font-size: 14px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.kec-cover-bar { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; border: 1px solid var(--line); }
.kec-cover-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--teal)); transition: width .4s ease; }
.kec-cover-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 11px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cover-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-weight: 700; }
.cover-tag b { font-weight: 800; }
.cover-tag.ok { background: var(--ok-soft); color: var(--ok); }
.cover-tag.warn { background: var(--amber-soft); color: #8A5F0F; }
.cover-total { margin-left: auto; font-size: 11px; color: var(--muted); }

/* ============================================================ KARTU STATISTIK KEC */

.kec-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.kec-stat-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
    position: relative; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease;
}
.kec-stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.kec-stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--kec-color, var(--accent)); }
.kec-stat-top { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 16px; }
.kec-stat-icon {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--kec-color-soft, var(--accent-soft)); color: var(--kec-color, var(--accent));
}
.kec-stat-icon svg { width: 19px; height: 19px; }
.kec-stat-name { font-size: 13px; font-weight: 800; color: var(--ink); line-height: 1.3; letter-spacing: -.1px; }
.kec-stat-rank { font-size: 10.5px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.kec-stat-num { font-size: 27px; font-weight: 800; color: var(--navy); letter-spacing: -.6px; margin-bottom: 12px; }
.kec-stat-bar-track { height: 6px; border-radius: 99px; background: var(--bg); overflow: hidden; margin-bottom: 7px; }
.kec-stat-bar-fill { height: 100%; border-radius: 99px; background: var(--kec-color, var(--accent)); transition: width .6s ease; }
.kec-stat-pct { font-size: 11px; color: var(--muted); font-weight: 700; }
.kec-stat-card.kec-empty { opacity: .55; }
.kec-stat-card.kec-empty .kec-stat-num { color: var(--muted); }

/* ============================================================== KELOLA WILAYAH

   Sebelumnya tiap kelurahan memakai kartu tebal berisi DUA angka yang hampir
   selalu kembar (48/48), label "TPS tersinkron" yang selalu benar, dan tiga
   tombol. Dikalikan 34 kelurahan, layar jadi penuh pengulangan sehingga mata
   lelah dan justru yang menyimpang tidak kelihatan.

   Bentuk sekarang: daftar tenang satu baris per kelurahan, satu angka saja,
   dan penanda HANYA muncul ketika ada yang perlu ditindaklanjuti. */

/* --- bilah ringkas: angka + alat kerja dalam satu baris tipis */
.wil-bar {
    display: flex; align-items: center; gap: 14px 30px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 13px 18px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.wil-angka-grup { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.wil-fig { display: flex; align-items: center; gap: 9px; }
.wil-fig-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.wil-fig-ico svg { width: 15px; height: 15px; }
.wil-fig-ico.teal { background: #DFF6EE; color: var(--teal); }
.wil-fig-ico.amber { background: var(--amber-soft); color: var(--amber); }
.wil-fig-num { display: block; font-size: 18px; font-weight: 800; color: var(--navy); letter-spacing: -.4px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.wil-fig-cap { display: block; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.wil-bar-alat { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }

/* --- akordeon kecamatan: tertutup dulu, dibuka sesuai kebutuhan.
       34 kelurahan sekaligus terlalu banyak untuk dipandang bersamaan. */
.wil-akordeon { border-bottom: 1px solid var(--line); }
.wil-akordeon:last-child { border-bottom: 0; }
.wil-akordeon-head {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    padding: 13px 8px 13px 4px; border-radius: 9px; list-style: none; user-select: none;
}
.wil-akordeon-head::-webkit-details-marker { display: none; }
.wil-akordeon-head:hover { background: #F7F9FD; }
.wil-akordeon-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.wil-chevron { display: grid; place-items: center; width: 20px; height: 20px; color: var(--muted); transition: transform .18s ease; flex-shrink: 0; }
.wil-chevron svg { width: 15px; height: 15px; }
.wil-akordeon[open] > .wil-akordeon-head .wil-chevron { transform: rotate(90deg); }
.wil-akordeon[open] > .wil-akordeon-head { background: #F7F9FD; }
.wil-akordeon-nama { font-size: 13.5px; font-weight: 800; color: var(--navy); letter-spacing: -.1px; }
.wil-akordeon-meta { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.wil-akordeon-aksi { margin-left: auto; display: flex; gap: 3px; opacity: 0; transition: opacity .13s ease; }
.wil-akordeon-head:hover .wil-akordeon-aksi,
.wil-akordeon-head:focus-within .wil-akordeon-aksi { opacity: 1; }
.wil-akordeon-isi { padding: 2px 6px 14px 34px; }

.wil-kosong-pesan { font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 6px 0; }
.wil-tautan {
    background: none; border: 0; padding: 0; font: inherit; font-weight: 700;
    color: var(--accent); cursor: pointer; text-decoration: underline;
}

/* --- daftar kelurahan: mengalir ke bawah dulu, baru ke kolom berikutnya
       supaya urutan abjadnya tetap enak dibaca */
.wil-list { columns: 230px; column-gap: 26px; }
.wil-item {
    break-inside: avoid; display: flex; align-items: center; gap: 9px;
    min-height: 34px; padding: 3px 6px 3px 4px; border-radius: 8px;
}
.wil-item:hover { background: var(--accent-soft); }
.wil-nama { font-size: 13px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tombol baris: hadir saat dibutuhkan, tidak ikut memenuhi layar.
   Memakai opacity (bukan visibility) agar tetap bisa dicapai lewat keyboard —
   fokusnya memunculkan tombol lewat :focus-within. */
.wil-item-aksi { display: flex; gap: 2px; opacity: 0; transition: opacity .13s ease; }
.wil-item:hover .wil-item-aksi,
.wil-item:focus-within .wil-item-aksi { opacity: 1; }

.wil-item-aksi .action-btn,
.wil-akordeon-aksi .action-btn {
    width: 28px; height: 28px; border-radius: 7px; background: transparent; border-color: transparent; color: var(--muted);
}
.wil-item-aksi .action-btn:hover,
.wil-akordeon-aksi .action-btn:hover { background: #fff; color: var(--accent); border-color: var(--line); }
.wil-item-aksi .action-btn svg,
.wil-akordeon-aksi .action-btn svg { width: 14px; height: 14px; }
.wil-item-aksi .btn-delete,
.wil-akordeon-aksi .btn-delete { width: 28px; height: 28px; border-radius: 7px; }
.wil-item-aksi .btn-delete svg,
.wil-akordeon-aksi .btn-delete svg { width: 14px; height: 14px; }

/* Perangkat sentuh tidak punya hover — tombolnya ditampilkan langsung. */
@media (hover: none) {
    .wil-item-aksi, .wil-akordeon-aksi { opacity: 1; }
}

/* ============================================================ DAFTAR DRILL-DOWN */

.rekap-kec { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: var(--surface); }
.rekap-kec > summary {
    list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
    gap: 12px; font-weight: 800; font-size: 14px; color: var(--ink); background: #F8FAFD;
}
.rekap-kec > summary::-webkit-details-marker { display: none; }
.rekap-kec-body { padding: 14px 16px; background: var(--surface); }
.rekap-kel { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; overflow: hidden; background: #FBFCFE; }
.rekap-kel:last-child { margin-bottom: 0; }
.rekap-kel > summary {
    list-style: none; cursor: pointer; padding: 10px 14px; display: flex; align-items: center;
    justify-content: space-between; gap: 10px; font-weight: 700; font-size: 13px; color: var(--ink);
}
.rekap-kel > summary::-webkit-details-marker { display: none; }
.rekap-kel-body { padding: 12px 14px; border-top: 1px solid var(--line); }
.rekap-meta { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.rekap-chevron { display: inline-block; transition: transform .18s ease; color: var(--accent); font-size: 11px; }
details[open] > summary .rekap-chevron { transform: rotate(90deg); }
.rekap-rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.rekap-rt-item {
    background: var(--accent-soft); border: 1.5px solid var(--accent); border-radius: 10px;
    padding: 7px 4px 6px; text-align: center; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
    font-family: inherit;
}
.rekap-rt-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.rekap-rt-item .num { display: block; font-weight: 800; font-size: 12px; color: var(--navy); }
.rekap-rt-item .cnt { display: block; font-size: 10px; color: var(--muted); font-weight: 700; margin-top: 2px; }

/* ============================================================== KARTU KONTAK */

.pv-list { display: flex; flex-direction: column; gap: 8px; }
.pv-korrow {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: #FBFCFE; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px;
    cursor: pointer; font-family: inherit; text-align: left; transition: all .15s ease;
}
.pv-korrow:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.pv-korrow.on { border-color: var(--accent); background: var(--accent-soft); }
.pv-korrow-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pv-korrow-name { font-size: 14px; font-weight: 800; color: var(--ink); letter-spacing: -.1px; }
.pv-korrow-meta { font-size: 12px; font-weight: 700; color: var(--accent); }
.pv-chev { font-size: 23px; line-height: 1; color: var(--muted); flex-shrink: 0; }
.pv-korrow:hover .pv-chev { color: var(--accent); }

.pv-roster { display: flex; flex-direction: column; }
.pv-p { display: flex; align-items: flex-start; gap: 12px; padding: 12px 10px; border-radius: 12px; transition: background .15s ease; }
.pv-p + .pv-p { border-top: 1px solid var(--line); }
.pv-p:hover { background: #FBFCFE; }
.pv-av {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; margin-top: 1px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13.5px; font-weight: 800; letter-spacing: .3px;
    background: var(--av-bg, #EAF1FE); color: var(--av-fg, #2456C4);
}
.pv-p-body { flex: 1; min-width: 0; }
.pv-p-name { display: flex; align-items: center; gap: 8px; line-height: 1.25; }
.pv-p-name .txt { font-size: 14.5px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pv-jk { flex-shrink: 0; font-size: 10.5px; font-weight: 800; letter-spacing: .3px; padding: 1px 7px; border-radius: 999px; }
.pv-jk.L { background: #EAF1FE; color: #2456C4; }
.pv-jk.P { background: #FDEDF3; color: #B93A66; }
.pv-tag-rt { flex-shrink: 0; margin-left: auto; font-size: 10.5px; font-weight: 800; letter-spacing: .2px; color: var(--navy); background: var(--bg); border-radius: 6px; padding: 2px 8px; }
.pv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 14px; margin-top: 5px; }
.pv-meta-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; min-width: 0; }
.pv-meta-item svg { width: 13px; height: 13px; color: var(--muted); flex-shrink: 0; }
.pv-meta-item .val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-meta-item.nik .val { font-variant-numeric: tabular-nums; letter-spacing: .3px; color: #3B4763; }
.pv-meta-item.hp { color: var(--accent); text-decoration: none; }
.pv-meta-item.hp svg { color: var(--accent); }
.pv-meta-item.addr { color: var(--muted); font-weight: 500; }
.pv-group { margin-bottom: 18px; }
.pv-group:last-child { margin-bottom: 0; }
.pv-group-head { font-size: 12px; font-weight: 800; color: var(--navy); background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; margin-bottom: 6px; }
.pv-group-count { font-weight: 700; color: var(--muted); font-size: 11px; margin-left: 4px; }
.pv-empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; }

/* ================================================================== DOKUMEN */

.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.doc-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
    display: flex; flex-direction: column; gap: 14px; transition: box-shadow .15s ease, transform .15s ease;
}
.doc-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.doc-card-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.doc-card-icon svg { width: 24px; height: 24px; }
.doc-card-body { flex: 1; }
.doc-card-body h4 { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; margin-bottom: 5px; }
.doc-card-body p { font-size: 12.5px; color: var(--muted); font-weight: 500; line-height: 1.6; }
.doc-card-actions { display: flex; gap: 8px; }
.doc-card-actions .btn { flex: 1; justify-content: center; }

/* ================================================================ PENGATURAN */

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.api-warn {
    display: flex; gap: 10px; align-items: flex-start; background: var(--amber-soft); border: 1px solid #F0D8A8;
    border-radius: 10px; padding: 11px 13px; font-size: 12px; color: #8A5B0C; font-weight: 600; line-height: 1.5;
}
.api-warn svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.settings-list { display: flex; flex-direction: column; gap: 6px; }
.settings-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: #FBFCFE; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px;
    transition: border-color .15s ease, background .15s ease;
}
.settings-row:hover { background: var(--surface); border-color: #D5DEEC; }
.settings-row .nm { font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: -.1px; }
.settings-row .sub { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* ==================================================================== SCAN AI */

.scan-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
    border: 2px dashed var(--line); border-radius: 14px; padding: 38px 20px; cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.scan-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.scan-drop svg { width: 40px; height: 40px; color: var(--accent); }
.scan-drop-title { font-weight: 800; font-size: 14.5px; color: var(--ink); }
.scan-drop-sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.scan-preview-img { margin-top: 14px; text-align: center; }
.scan-preview-img img { max-width: 100%; max-height: 230px; border-radius: 12px; border: 1px solid var(--line); }
.scan-result-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.scan-result-note { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ======================================================================= LOGIN */

.login-page {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background: linear-gradient(125deg, var(--navy-deep) 0%, var(--navy) 42%, #2C3F6E 78%, #324A82 100%);
    position: relative; overflow: hidden;
}
.login-page::before {
    content: ''; position: absolute; right: -10%; top: -20%; width: 620px; height: 620px; border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 111, 237, .4), transparent 68%);
}
.login-page::after {
    content: ''; position: absolute; left: -12%; bottom: -25%; width: 560px; height: 560px; border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 90, 248, .3), transparent 70%);
}
.login-card {
    position: relative; z-index: 1; width: 100%; max-width: 410px; background: var(--surface);
    border-radius: 20px; box-shadow: 0 30px 70px -18px rgba(20, 29, 51, .55); overflow: hidden;
}
.login-head { padding: 30px 30px 6px; text-align: center; }
.login-mark {
    width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--accent), var(--violet)); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; letter-spacing: .5px;
    box-shadow: 0 12px 24px -10px var(--accent);
}
.login-head h1 { font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.login-head p { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 5px; }
.login-body { padding: 22px 30px 30px; display: flex; flex-direction: column; gap: 15px; }
.login-foot { position: relative; z-index: 1; text-align: center; margin-top: 18px; font-size: 11.5px; color: rgba(255, 255, 255, .55); font-weight: 600; line-height: 1.6; }

/* ==================================================================== UTILITAS */

.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 800; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.right { text-align: right; }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.spacer { flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 14px; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.hidden { display: none !important; }
.scrollbox { max-height: 440px; overflow-y: auto; }
.center-wrap { max-width: 960px; margin: 0 auto; }
.center-wrap-lg { max-width: 1400px; margin: 0 auto; }

/* =================================================================== RESPONSIF */

@media (max-width: 1100px) {
    .grid-side { grid-template-columns: 1fr; }
    .is-loc-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .5); }
    .sidebar.open { transform: none; }
    .app-main { margin-left: 0; }
    .side-toggle { display: inline-flex; }
}
@media (max-width: 900px) {
    .stat-grid, .stat-grid--3 { grid-template-columns: repeat(2, 1fr); }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .settings-grid, .doc-grid { grid-template-columns: 1fr; }
    .tps-pick { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    main { padding: 16px 16px 48px; }
    .topbar { padding: 12px 16px; }
    .hero { grid-template-columns: 1fr; padding: 24px 22px; gap: 20px; }
    .hero-viz { justify-content: flex-start; }
    .hero-value { font-size: 52px; }
    .form-body, .is-grid { grid-template-columns: 1fr; }
    .is-loc-grid { grid-template-columns: 1fr; }
    .is-tps-status { grid-template-columns: 1fr; }
    .batch-wrap, .shared-wrap { padding: 16px 16px 20px; }
    .user-chip .nm, .user-chip .rl, .topbar .clock { display: none; }
    .user-chip { padding: 4px; }
}
@media (max-width: 560px) {
    .stat-grid, .stat-grid--3 { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr; }
    .jk-seg { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
    .sidebar, .topbar, .save-bar, .btn, .action-btn, .btn-delete { display: none !important; }
    .app-main { margin-left: 0; }
    .table-card, .form-card { border: 0; box-shadow: none; }
}

/* ================================================================= SETUP AWAL

   Halaman persiapan sengaja tanpa sidebar: pengguna pertama tidak perlu
   berhadapan dengan empat belas menu yang belum satu pun bisa dipakai.
   Lebarnya dikunci supaya mata tidak menyapu jauh — aturan yang sama dengan
   halaman fokus lainnya. */

body.polos { background: var(--bg); }

.polos-wrap { max-width: 760px; margin: 0 auto; padding: 0 20px 64px; }

.polos-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 22px 0 26px;
}
.polos-merek { display: flex; align-items: center; gap: 11px; }
.polos-logo {
    width: 38px; height: 38px; border-radius: 11px; background: var(--navy); color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: .5px;
}
.polos-merek strong { display: block; font-size: 14.5px; color: var(--navy); letter-spacing: -.2px; }
.polos-merek small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }

.mulai-sambut { margin-bottom: 22px; }
.mulai-sambut h1 { font-size: 25px; font-weight: 800; color: var(--navy); letter-spacing: -.6px; }
.mulai-sambut p { margin-top: 7px; font-size: 13.5px; color: var(--muted); font-weight: 500; line-height: 1.6; }

/* Jejak langkah: penanda posisi, bukan navigasi — tidak bisa diklik supaya
   tidak ada yang melompat ke langkah yang syaratnya belum terpenuhi. */
.mulai-jejak {
    display: flex; gap: 8px; list-style: none; margin-bottom: 22px; flex-wrap: wrap;
}
.mulai-jejak-item {
    flex: 1 1 190px; display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 11px 13px;
}
.mulai-jejak-item.aktif { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mulai-jejak-item.selesai { background: var(--ok-soft); border-color: transparent; }
.mulai-jejak-no {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; font-size: 12px; font-weight: 800;
    background: var(--bg); color: var(--muted);
}
.mulai-jejak-item.aktif .mulai-jejak-no { background: var(--accent); color: #fff; }
.mulai-jejak-item.selesai .mulai-jejak-no { background: var(--ok); color: #fff; }
.mulai-jejak-no svg { width: 13px; height: 13px; }
.mulai-jejak-item strong { display: block; font-size: 12.5px; font-weight: 700; color: var(--navy); }
.mulai-jejak-item small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }

.mulai-kartu {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden;
}
.mulai-kartu-head { padding: 17px 20px 3px; }
.mulai-kartu-head h2 {
    display: flex; align-items: center; gap: 9px;
    font-size: 15px; font-weight: 800; color: var(--navy); letter-spacing: -.2px;
}
.mulai-kartu-head p { margin-top: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; line-height: 1.6; }
.mulai-no {
    width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft); color: var(--accent);
    display: grid; place-items: center; font-size: 11.5px; font-weight: 800;
}
.mulai-aksi { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.mulai-kartu textarea {
    font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    font-size: 12.5px; line-height: 1.65; resize: vertical;
}

.mulai-pratinjau {
    margin: 0 20px 18px; padding: 13px 15px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 11px;
}
.mulai-pra-judul { font-size: 12.5px; font-weight: 700; color: var(--navy); margin-bottom: 9px; }
.mulai-pra-baris {
    display: flex; align-items: baseline; gap: 9px; padding: 5px 0;
    font-size: 12.5px; color: var(--ink); border-top: 1px solid var(--line);
}
.mulai-pra-baris:first-of-type { border-top: 0; }
.mulai-pra-baris em { color: var(--muted); font-size: 11.5px; }
.mulai-pra-galat {
    margin-top: 10px; padding: 9px 11px; border-radius: 9px;
    background: var(--danger-soft); color: var(--danger);
    font-size: 11.5px; font-weight: 600; line-height: 1.6;
}

.mulai-penutup { text-align: center; padding: 18px 0 0; }
/* .hint hanya bergaya di dalam .field, jadi di luar itu ukurannya harus
   disebut sendiri — kalau tidak, kalimat penutup tampil sebesar isi halaman. */
.mulai-penutup .hint,
.mulai-aksi .hint {
    font-size: 11.5px; color: var(--muted); font-weight: 500; line-height: 1.6;
}
.mulai-penutup .hint { margin: 9px auto 0; max-width: 440px; }
.btn.btn-lg { padding: 12px 22px; font-size: 14px; }
.btn.disabled { pointer-events: none; opacity: .45; }

@media (max-width: 640px) {
    .mulai-jejak-item { flex-basis: 100%; }
}

/* ── pemasangan awal lewat browser ─────────────────────────────────────── */

.nota-galat {
    background: var(--danger-soft); color: var(--danger);
    border-radius: 11px; padding: 12px 16px; margin-bottom: 16px;
    font-size: 13px; font-weight: 600;
}
.nota-awas-blok {
    background: var(--amber-soft); border: 1px solid #E8C98A;
    border-radius: 11px; padding: 13px 16px; margin-top: 16px;
    font-size: 12.5px; line-height: 1.65; color: #7A4E06;
}
.nota-awas-blok strong { color: #6B4405; }

/* Kredensial ditampilkan sekali saja, jadi harus terbaca sekali lihat —
   bukan teks kecil yang gampang salah salin. */
.kredensial {
    border: 1px solid var(--line); border-radius: 11px; overflow: hidden;
}
.kredensial-baris {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.kredensial-baris:last-child { border-bottom: 0; }
.kredensial-baris > span {
    flex: 0 0 116px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.kredensial-baris code {
    font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    font-size: 13px; color: var(--ink); word-break: break-all;
}
.kredensial-baris.utama { background: var(--amber-soft); }
.kredensial-baris.utama code {
    font-size: 17px; font-weight: 700; letter-spacing: .04em; color: var(--navy);
}
.kredensial-baris.utama button { margin-left: auto; flex-shrink: 0; }
