/* DRW Gov — tema hijau zaitun (registri tema: tiap app beda rona). Token warna di :root, mode gelap dipilih (bukan dibalik otomatis). */
:root {
  color-scheme: light;
  --bg: #f4f4f2;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --border: #e2e1dc;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #7a7974;
  --accent: #56661a;
  --accent-ink: #ffffff;
  --accent-soft: #eef1e0;
  --series-1: #2a78d6;  /* terbayar */
  --series-2: #eb6834;  /* belum lunas */
  --bar: #2a78d6;
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
  --good-soft: #e3f4e3; --warning-soft: #fdf1d6; --serious-soft: #fbe6dd; --critical-soft: #f8e0e0;
  --status-ink: #0b0b0b;
  --grid: #e8e7e3;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  --radius: 10px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211; --surface: #1a1a19; --surface-2: #232321; --border: #2f2f2c;
    --text: #ffffff; --text-2: #c3c2b7; --muted: #9a998f;
    --accent: #a6bd4a; --accent-ink: #1a1f05; --accent-soft: #262c14;
    --series-1: #3987e5; --series-2: #d95926; --bar: #3987e5;
    --good-soft: #17301a; --warning-soft: #3a2e12; --serious-soft: #3b2418; --critical-soft: #3d1a1a;
    --status-ink: #ffffff; --grid: #2a2a27;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211; --surface: #1a1a19; --surface-2: #232321; --border: #2f2f2c;
  --text: #ffffff; --text-2: #c3c2b7; --muted: #9a998f;
  --accent: #a6bd4a; --accent-ink: #1a1f05; --accent-soft: #262c14;
  --series-1: #3987e5; --series-2: #d95926; --bar: #3987e5;
  --good-soft: #17301a; --warning-soft: #3a2e12; --serious-soft: #3b2418; --critical-soft: #3d1a1a;
  --status-ink: #ffffff; --grid: #2a2a27;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 620; }
h3 { font-size: 14px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.boot { padding: 40px; color: var(--muted); }
.hidden { display: none !important; }

/* ── Kerangka ── */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-in { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; white-space: nowrap; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav a { padding: 7px 11px; border-radius: 8px; color: var(--text-2); white-space: nowrap; font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.user { display: flex; align-items: center; gap: 8px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); object-fit: cover; }
.main { max-width: 1280px; margin: 0 auto; padding: 20px 16px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Komponen ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 0; }
.card-head .sub { color: var(--muted); font-size: 12px; }
.grid { display: grid; gap: 16px; }
.grid-kpi { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.kpi { padding: 14px 16px; }
.kpi .label { color: var(--text-2); font-size: 12px; font-weight: 500; }
.kpi .value { font-size: 22px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .foot { color: var(--muted); font-size: 12px; margin-top: 2px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--critical); }
.btn.sm { padding: 4px 8px; font-size: 12px; border-radius: 7px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.icon { width: 16px; height: 16px; flex: none; }

input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { min-height: 70px; resize: vertical; }
input[type=checkbox] { width: auto; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); font-weight: 550; }
label.f .help { font-weight: 400; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters > * { width: auto; }
.filters input[type=search] { min-width: 220px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; color: var(--text-2); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
td .sub { color: var(--muted); font-size: 12px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 560;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.good { background: var(--good-soft); color: var(--status-ink); } .badge.good .dot { background: var(--good); }
.badge.warning { background: var(--warning-soft); color: var(--status-ink); } .badge.warning .dot { background: var(--warning); }
.badge.serious { background: var(--serious-soft); color: var(--status-ink); } .badge.serious .dot { background: var(--serious); }
.badge.critical { background: var(--critical-soft); color: var(--status-ink); } .badge.critical .dot { background: var(--critical); }
.badge.info { background: var(--accent-soft); color: var(--accent); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 550; }

.alerts { display: flex; flex-direction: column; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.alert:last-child { border-bottom: 0; }
.alert:hover { background: var(--surface-2); text-decoration: none; }
.alert .sev { flex: none; margin-top: 2px; }
.alert.critical .sev { color: var(--critical); } .alert.serious .sev { color: var(--serious); } .alert.warning .sev { color: var(--warning); }

.note { padding: 12px 14px; border-radius: 8px; background: var(--accent-soft); color: var(--text); font-size: 13px; }
.note.warn { background: var(--warning-soft); }
.note ul { margin: 6px 0 0; padding-left: 18px; }

/* Detail */
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.dl dt { color: var(--muted); font-size: 12px; padding-top: 1px; }
.dl dd { margin: 0; word-break: break-word; }
@media (max-width: 600px) { .dl { grid-template-columns: minmax(0, 1fr); } .dl dd { margin-bottom: 6px; } }

/* Chart */
.chart { position: relative; padding: 8px 16px 12px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 16px 0; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px; min-width: 160px; z-index: 5; }
.tip .row { display: flex; justify-content: space-between; gap: 12px; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.hbars { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.hbar .top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.hbar .track { height: 8px; background: var(--surface-2); border-radius: 4px; margin-top: 4px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; }

/* Modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 12px; border: 1px solid var(--border); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface); }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: calc(100vw - 32px); }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 420px; }
.toast.err { background: var(--critical); color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 8px 12px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--accent); border-color: var(--accent); }
.tabs a:hover { text-decoration: none; }

/* Login — dua kolom: panel brand (gelap, statis di kedua tema) + kartu masuk. */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.auth-hero { position: relative; overflow: hidden; color: #eef2e2;
  background: radial-gradient(700px 420px at 15% 0%, rgba(166,189,74,.30), transparent 60%),
              radial-gradient(600px 400px at 100% 100%, rgba(240,200,90,.16), transparent 60%), #0e1308; }
.auth-hero::before { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 20%, #000 30%, transparent 75%); }
.auth-hero-in { position: relative; height: 100%; display: flex; flex-direction: column; gap: 36px; padding: 44px 56px; max-width: 640px; }
.auth-mark { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; letter-spacing: -.01em; }
.auth-mark .logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #8aa12c, #56661a); color: #fff; box-shadow: 0 6px 20px rgba(110,130,30,.45); }
.auth-copy { margin-top: auto; }
.auth-eyebrow { display: inline-block; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: #c9dc7e;
  padding: 4px 10px; border: 1px solid rgba(201,220,126,.3); border-radius: 999px; background: rgba(201,220,126,.08); }
.auth-copy h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.12; font-weight: 750; letter-spacing: -.025em; margin: 18px 0 14px; color: #fff; }
.auth-copy h2 em { font-style: normal; background: linear-gradient(90deg, #c9dc7e, #f0d27a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-copy p { margin: 0; color: #b9c2a6; font-size: 15px; line-height: 1.6; max-width: 460px; }
.auth-preview { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 18px 20px;
  backdrop-filter: blur(8px); box-shadow: 0 20px 60px rgba(0,0,0,.35); max-width: 420px; }
.ap-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #b9c2a6; }
.ap-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(74,222,128,.14); color: #86efac; font-weight: 600; }
.ap-chip .icon { width: 12px; height: 12px; }
.ap-amt { font-size: 26px; font-weight: 750; color: #fff; margin: 6px 0 12px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ap-bars { display: flex; align-items: flex-end; gap: 6px; height: 56px; }
.ap-bars i { flex: 1; border-radius: 3px 3px 0 0; background: rgba(201,220,126,.35); }
.ap-rows { display: grid; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #d6dcc6; }
.ap-rows div { display: flex; align-items: center; gap: 8px; }
.ap-rows b { margin-left: auto; color: #fff; }
.ap-dot { width: 8px; height: 8px; border-radius: 50%; }
.auth-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.auth-feats li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: #d6dcc6; }
.auth-feats .icon { color: #c9dc7e; width: 18px; height: 18px; }

.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: min(400px, 100%); }
.auth-mark-sm { display: none; color: var(--text); margin-bottom: 28px; }
.auth-card h1 { font-size: 30px; font-weight: 750; letter-spacing: -.025em; margin: 0 0 10px; }
.auth-lead { margin: 0 0 24px; color: var(--text-2); line-height: 1.6; font-size: 15px; }
.auth-lead.small { font-size: 13px; }
.g-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 13px 18px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 650; font-size: 15px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.05); transition: transform .12s, box-shadow .12s, border-color .12s; }
.g-btn:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 10px 26px rgba(86,102,26,.18); transform: translateY(-1px); }
.g-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.g-logo { width: 20px; height: 20px; flex: none; }
.auth-sep { display: flex; align-items: center; gap: 12px; margin: 28px 0 18px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.auth-points .icon { flex: none; width: 30px; height: 30px; padding: 7px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); margin-top: -5px; }
.auth-points b { color: var(--text); font-weight: 650; }
.auth-wait { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--warning-soft); margin-bottom: 18px; }
.auth-wait .icon { width: 26px; height: 26px; color: var(--text); }
.auth-foot { text-align: center; font-size: 12px; color: var(--muted); margin: 40px 0 0; }
.login-err { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; margin-bottom: 16px; border-radius: 10px;
  background: var(--critical-soft); color: var(--status-ink); font-size: 13px; }
.login-err .icon { color: var(--critical); margin-top: 2px; }
.login-actions { display: flex; gap: 8px; }
.login-actions .btn { flex: 1; justify-content: center; padding: 11px; border-radius: 10px; }
@media (max-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-hero { display: none; }
  .auth-mark-sm { display: flex; }
  .auth-main { background: radial-gradient(700px 360px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
}
@media (max-width: 480px) { .auth-main { padding: 32px 16px; justify-content: flex-start; padding-top: 12vh; } .auth-card h1 { font-size: 26px; } }

details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary h2::before { content: "▸ "; color: var(--muted); }
details[open] > summary h2::before { content: "▾ "; }
.legal-doc { max-width: 720px; margin: 40px auto; padding: 0 16px; }
.legal-doc h2 { margin: 20px 0 6px; }

/* ── DRW Gov ─────────────────────────────────────────────────────────────── */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hello h1 { font-size: 24px; }
.hello p { margin: 4px 0 0; color: var(--text-2); max-width: 640px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 26px 0 10px; }
.section-title h2 { font-size: 15px; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cara kerja (3 langkah) */
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.how > div { display: flex; gap: 12px; padding: 14px 16px; }
.how .n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.how b { display: block; margin-bottom: 2px; }
.how span { color: var(--text-2); font-size: 13px; }

/* Kartu permohonan */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.perm { padding: 16px; display: flex; flex-direction: column; gap: 10px; color: var(--text); transition: border-color .12s, transform .12s; }
.perm:hover { text-decoration: none; border-color: var(--accent); }
.perm-top { display: flex; gap: 12px; align-items: flex-start; }
.perm-top .logo { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.perm-top .logo .icon { width: 20px; height: 20px; }
.perm-name { font-weight: 650; font-size: 15px; }
.perm-sub { color: var(--muted); font-size: 12px; }
.perm-top .badge { margin-left: auto; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.perm-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.perm-foot b { color: var(--text); }
.perm.closed { opacity: .65; }

/* Katalog layanan — panel ilustrasi dokumen contoh (art.js) diwarnai --hue per layanan */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 8px; }
.svc { padding: 0; display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.svc:hover { text-decoration: none; transform: translateY(-3px); border-color: color-mix(in srgb, var(--hue) 55%, var(--border)); box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--hue) 60%, transparent); }
a.svc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.svc-art { position: relative; aspect-ratio: 240 / 132; overflow: hidden;
  background: radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--hue) 42%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--hue) 22%, var(--surface)), color-mix(in srgb, var(--hue) 8%, var(--surface)));
  border-bottom: 1px solid color-mix(in srgb, var(--hue) 25%, var(--border)); }
.svc-art svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .3s ease; }
a.svc:hover .svc-art svg { transform: scale(1.04) rotate(-1deg); }
.svc-chip { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--text-2); backdrop-filter: blur(4px); }
.svc-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.svc .head { display: flex; align-items: center; gap: 10px; }
.svc .logo { width: 32px; height: 32px; border-radius: 8px; flex: none; background: color-mix(in srgb, var(--hue) 22%, var(--surface-2)); color: color-mix(in srgb, var(--hue) 70%, var(--text)); }
.svc.off .logo { background: var(--surface-2); color: var(--muted); }
.svc p { margin: 0; color: var(--text-2); font-size: 13px; flex: 1; }
.svc-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.svc-meta li { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 6px; padding: 3px 8px; }
.svc-meta .icon { width: 13px; height: 13px; color: var(--muted); }
.svc-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; color: var(--accent); margin-top: 2px; }
.svc-cta .icon { width: 15px; height: 15px; transition: transform .18s; }
a.svc:hover .svc-cta .icon { transform: translateX(3px); }
.svc.off { opacity: .7; }
@media (prefers-reduced-motion: reduce) { .svc, .svc-art svg, .svc-cta .icon { transition: none; } a.svc:hover, a.svc:hover .svc-art svg { transform: none; } }

/* Wizard */
.wizard { max-width: 860px; }
.wz-step { padding: 18px; margin-bottom: 14px; }
.wz-step > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wz-step > h2 .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 12px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--surface); }
.choice:hover { border-color: var(--accent); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice b { font-size: 14px; }
.choice span { color: var(--text-2); font-size: 12.5px; }
.choice .docs { color: var(--muted); font-size: 12px; margin-top: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.consent input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.fee-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); margin-top: 12px; }
.fee-box .total { font-size: 20px; font-weight: 700; }

/* Detail permohonan */
.detail-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; margin-bottom: 16px; }
.detail-head h1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.detail-head p { margin: 4px 0 0; color: var(--text-2); }
.eta { padding: 14px 18px; min-width: 260px; }
.eta .label { font-size: 12px; color: var(--text-2); font-weight: 550; }
.eta .date { font-size: 22px; font-weight: 750; letter-spacing: -.01em; margin: 2px 0; }
.eta .sub { font-size: 12px; color: var(--muted); }
@media (max-width: 720px) { .detail-head { grid-template-columns: minmax(0, 1fr); } .eta { min-width: 0; } }
.next { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin-bottom: 16px; border-left: 4px solid var(--accent); }
.next .icon { width: 22px; height: 22px; color: var(--accent); }
.next p { margin: 0; flex: 1; }
.detail-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }

/* Stepper tahapan */
.steps { list-style: none; margin: 0; padding: 14px 16px; }
.steps li { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border); }
.steps li:last-child::before { display: none; }
.steps li.done::before { background: var(--accent); }
.steps .dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 2px solid var(--border); z-index: 1; }
.steps .dot .icon { width: 14px; height: 14px; }
.steps li.done .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps li.active .dot { border-color: var(--accent); color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.steps .t { font-weight: 600; font-size: 13.5px; }
.steps .m { font-size: 12px; color: var(--muted); }
.who { display: inline-block; font-size: 10.5px; font-weight: 650; padding: 0 6px; border-radius: 4px; margin-left: 4px; vertical-align: 1px; background: var(--surface-2); color: var(--text-2); }
.who.ai { background: var(--accent-soft); color: var(--accent); }

/* Langkah detail */
.step-card { padding: 16px; margin-bottom: 12px; }
.step-card.done { opacity: .78; }
.step-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.step-card h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.step-card p { margin: 6px 0 0; color: var(--text-2); }
.step-card .form-grid { margin-top: 12px; }
.step-card .actions { margin-top: 12px; }

/* Slot dokumen */
.doc-list { display: grid; gap: 10px; }
.doc { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; }
.doc .thumb { width: 56px; height: 56px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); border: 1px dashed var(--border); }
.doc .thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc .thumb .icon { width: 22px; height: 22px; }
.doc.has .thumb { border-style: solid; }
.doc .nm { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doc .ket { color: var(--muted); font-size: 12.5px; }
.doc .issue { margin-top: 6px; font-size: 12.5px; color: var(--text); background: var(--serious-soft); padding: 6px 10px; border-radius: 6px; white-space: pre-line; }
.doc .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.doc.drop { outline: 2px dashed var(--accent); outline-offset: -4px; }
@media (max-width: 600px) { .doc { grid-template-columns: 48px minmax(0, 1fr); } .doc .thumb { width: 48px; height: 48px; } .doc .acts { grid-column: 1 / -1; justify-content: flex-start; } }
.group-label { font-size: 12px; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; margin: 20px 0 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.group-label .sub { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 500; }
.group-label .sub::before { content: "· "; }
.doc .tag.sifat-wajib { background: var(--accent-soft); color: var(--accent); }

/* Temuan */
.finding { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.finding:last-child { border-bottom: 0; }
.finding .sev { flex: none; margin-top: 1px; }
.finding.kritis .sev { color: var(--critical); } .finding.perhatian .sev { color: var(--serious); } .finding.info .sev { color: var(--accent); }
.finding b { display: block; }
.finding p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.finding .saran { color: var(--text); }
.verdict { display: flex; gap: 14px; align-items: center; padding: 16px; margin-bottom: 16px; }
.verdict .big { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.verdict .big .icon { width: 24px; height: 24px; }
.verdict.ok .big { background: var(--good-soft); color: var(--good); }
.verdict.no .big { background: var(--serious-soft); color: var(--serious); }
.verdict.wait .big { background: var(--accent-soft); color: var(--accent); }
.verdict h2 { margin-bottom: 2px; }
.verdict p { margin: 0; color: var(--text-2); }

/* Data siap salin */
.copy-table td:first-child { color: var(--text-2); width: 38%; font-size: 13px; }
.copy-table td.val { font-weight: 600; word-break: break-word; }
.copy-table td:last-child { width: 1%; white-space: nowrap; }
.checklist { list-style: none; margin: 0; padding: 8px 16px 14px; display: grid; gap: 8px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.checklist input { margin-top: 3px; flex: none; }
.checklist input:checked + span { text-decoration: line-through; color: var(--muted); }
.tips { margin: 0; padding: 8px 16px 14px 34px; color: var(--text-2); font-size: 13.5px; display: grid; gap: 6px; }

/* Konsultan AI */
.chat { display: flex; flex-direction: column; min-height: 60vh; }
.msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; max-height: 64vh; }
.msg { max-width: 92%; }
.msg.user { align-self: flex-end; }
.msg.user .msg-body { background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; }
.msg.assistant .msg-body { background: var(--surface-2); padding: 12px 16px; border-radius: 14px 14px 14px 4px; }
.msg-body p { margin: 0 0 8px; } .msg-body p:last-child { margin-bottom: 0; }
.msg-body h2, .msg-body h3, .msg-body h4 { margin: 12px 0 6px; font-size: 15px; }
.msg-body ul, .msg-body ol { margin: 4px 0 8px; padding-left: 20px; }
.msg-body code { background: var(--surface); padding: 1px 4px; border-radius: 4px; font-size: 12px; }
.msg-body table { margin: 6px 0; background: var(--surface); border-radius: 6px; }
.msg-body th, .msg-body td { padding: 6px 8px; font-size: 13px; }
.chat-empty { margin: auto; text-align: center; max-width: 560px; display: flex; flex-direction: column; gap: 12px; align-items: center; color: var(--text-2); }
.chat-empty > .icon { width: 34px; height: 34px; color: var(--accent); }
.sugs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sug { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer; }
.sug:hover { border-color: var(--accent); color: var(--accent); }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 180px; resize: none; }
.typing { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.err-text { color: var(--critical); }
.chat-note { padding: 0 12px 10px; margin: 0; font-size: 11.5px; color: var(--muted); }

.preview-img { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: 8px; }
.preview-pdf { width: 100%; height: 70vh; border: 0; border-radius: 8px; background: var(--surface-2); }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 550; word-break: break-word; }
.mini-table th, .mini-table td { padding: 5px 8px; font-size: 12px; }
.stat-bars { padding: 12px 16px 16px; display: grid; gap: 10px; }
.delta { color: var(--serious); font-weight: 600; }
.composer .deep { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; align-self: center; cursor: pointer; }
.composer .deep input { width: auto; }
@media (max-width: 600px) { .composer { flex-wrap: wrap; } .composer .deep { order: 3; } }

/* ── Mode Isi M-Paspor ───────────────────────────────────────────────────── */
.isi-head { margin-bottom: 14px; }
.isi-head h1 { margin: 6px 0 10px; }
.isi-progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.isi-progress i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.isi-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.isi-aside { display: grid; gap: 16px; }
@media (max-width: 960px) { .isi-grid { grid-template-columns: minmax(0, 1fr); } }
.isi-card h2 { margin: 4px 0 6px; }
.isi-sec { font-size: 12px; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.isi-label { font-size: 15px; font-weight: 600; margin-top: 10px; }
.isi-val { font-size: clamp(22px, 5vw, 30px); font-weight: 650; line-height: 1.25; margin: 6px 0 10px; word-break: break-word; color: var(--text); }
.isi-big { width: 100%; justify-content: center; padding: 14px 16px; font-size: 16px; margin-top: 6px; }
.isi-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.isi-kv { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.isi-kv b { word-break: break-all; }
.isi-kv > span:first-child { color: var(--muted); font-size: 13px; }
.isi-inline { display: flex; gap: 6px; align-items: center; }
.isi-inline input { flex: 1; min-width: 0; }
.isi-guide { margin: 12px 0; padding-left: 20px; display: grid; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; padding: 3px; gap: 3px; margin: 10px 0 4px; flex-wrap: wrap; }
.seg button { border: 0; background: none; color: var(--text-2); padding: 6px 12px; border-radius: 6px; font: inherit; cursor: pointer; }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.good-txt { color: var(--good); text-transform: none; letter-spacing: 0; }
.isi-qr { text-align: center; }
.isi-qr h3 { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 0 0 10px; }
.isi-qr img { background: #fff; padding: 8px; border-radius: 10px; }
.isi-list { list-style: none; margin: 0; padding: 0 8px; }
.isi-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; border-radius: 8px; }
.isi-list li.cur { background: var(--accent-soft); }
.isi-list li > button:first-child { all: unset; cursor: pointer; padding: 6px 8px; display: grid; min-width: 0; }
.isi-list li > button:first-child span { font-size: 12px; color: var(--muted); }
.isi-list li > button:first-child b { font-weight: 550; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.isi-list li.done b { color: var(--text-2); }
.isi-list li.done .btn { color: var(--good); }
@media (max-width: 600px) { .isi-kv { grid-template-columns: 80px minmax(0, 1fr) auto; } }

/* ── Kantor terdekat ─────────────────────────────────────────────────────── */
.kantor-head .seg { margin-top: 0; }
.kantor-loc { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.kantor-loc form { flex: 1; min-width: 220px; }
.kantor-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
.kantor-map { padding: 0; overflow: hidden; position: sticky; top: 12px; }
#peta { width: 100%; aspect-ratio: 4 / 3; background: var(--surface-2); z-index: 0; }
.kantor-pin span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font: 700 12px/1 system-ui, sans-serif; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.kantor-pin span.on { background: #e8553d; color: #fff; transform: scale(1.18); }
.kantor-no { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; margin-right: 6px; vertical-align: 1px; }
.kantor-rute { background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; }
.kantor-rute .icon { width: 14px; height: 14px; vertical-align: -2px; }
.leaflet-container { font: inherit; }
.leaflet-popup-content { margin: 10px 12px; color: #1d1f23; }
/* Tile OSM digelapkan di tema gelap agar tidak menyilaukan. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.6); } }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.6); }
.kantor-list { display: grid; gap: 10px; }
.kantor-item { padding: 14px; display: grid; gap: 6px; }
.kantor-item.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.kantor-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.kantor-top b { flex: 1 1 100%; }
.kantor-jarak { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--accent); }
.kantor-jarak .icon, .kantor-hari .icon { width: 13px; height: 13px; vertical-align: -2px; }
.kantor-jam summary { cursor: pointer; color: var(--text-2); }
.kantor-jam ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); }
.kantor-item .actions { margin-top: 4px; }
@media (max-width: 860px) { .kantor-grid { grid-template-columns: minmax(0, 1fr); } .kantor-map { position: static; } #peta { aspect-ratio: 16 / 11; } }
