:root {
  --ink: #0E1726; --ink2: #33415A; --muted: #5B6B82; --line: #E2E7EE; --line2: #EEF1F5;
  --bg: #F4F6F9; --card: #FFFFFF; --navy: #0B1F3A; --navy2: #16325A; --navy3: #12294A;
  --blue: #1D4ED8; --amber: #F59E0B;
  --ok: #10B981; --prog: #3B82F6; --bad: #EF4444; --idle: #94A3B8;
  --n16: #8B5CF6; --n17: #14B8A6; --n18: #F97316;
  --r: 12px;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 14px; line-height: 1.5; }
a { color: var(--blue); }
a:hover { color: #1E3A8A; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- butang & medan ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid #CBD3DF; background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #F7F9FB; color: var(--ink); }
.btn-pri { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-pri:hover { background: #1E40AF; color: #fff; }
.btn-red { background: #fff; border-color: #FCA5A5; color: #B91C1C; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { width: 40px; height: 40px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; text-decoration: none; }
.icon-btn.tel { background: #DBEAFE; color: #1D4ED8; }
.icon-btn.wa { background: #D1FAE5; color: #047857; }
.icon-btn.map { background: var(--line2); color: var(--ink2); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .lbl { font-size: 13px; font-weight: 600; }
.input { min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid #CBD3DF; background: #fff; width: 100%; }
textarea.input { padding: 10px 12px; min-height: 84px; resize: vertical; }
.input:focus, .btn:focus-visible, .seg button:focus-visible, .icon-btn:focus-visible, .nav a:focus-visible { outline: 3px solid rgba(37,99,235,.35); outline-offset: 1px; }
.pw-wrap { position: relative; display: flex; }
.pw-wrap .input { padding-right: 52px; }
.pw-wrap button { position: absolute; right: 2px; top: 2px; width: 40px; height: 40px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: var(--ink2); display: flex; align-items: center; justify-content: center; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* segmen (pil pemilih) */
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--line2); border-radius: 10px; }
.seg button { min-height: 38px; padding: 0 14px; border-radius: 8px; border: 0; background: transparent; color: var(--ink2); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.seg button[aria-pressed="true"] { background: var(--c, var(--navy)); color: #fff; box-shadow: 0 2px 8px rgba(11,31,58,.18); }
.seg .dot { width: 8px; height: 8px; border-radius: 99px; background: var(--c, #64748B); }
.seg button[aria-pressed="true"] .dot { background: #fff; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.st-SELESAI { background: #D1FAE5; color: #047857; }
.st-DALAMTINDAKAN { background: #DBEAFE; color: #1D4ED8; }
.st-BELUMMULA { background: var(--line2); color: var(--ink2); }
.st-BERMASALAH { background: #FEE2E2; color: #B91C1C; }
.pr-KRITIKAL { background: #FEE2E2; color: #B91C1C; }
.pr-TINGGI { background: #FFEDD5; color: #9A3412; }
.pr-SEDERHANA { background: #FEF3C7; color: #854D0E; }
.pr-RENDAH { background: #DCFCE7; color: #15803D; }
.rl-ADMIN { background: #EDE9FE; color: #6D28D9; }
.rl-EDITOR { background: #DBEAFE; color: #1D4ED8; }
.rl-VIEWER { background: var(--line2); color: var(--ink2); }
.kod { display: inline-block; padding: 2px 8px; border-radius: 6px; font-family: var(--mono); font-size: 12px; font-weight: 600; color: #fff; background: var(--c, #64748B); white-space: nowrap; }

/* ---------- log masuk ---------- */
.login { display: flex; flex-wrap: wrap; min-height: 100vh; }
.login-hero { flex: 1 1 480px; background: var(--navy); color: #E6ECF5; padding: clamp(32px, 6vw, 72px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-hero .brand { display: flex; align-items: center; gap: 14px; }
.login-logo { width: 64px; height: 64px; }
.login-title { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }
.login-hero .lead { margin: 0; font-size: 16px; color: #C9D5E6; }
.logo-tile { background: #fff; border-radius: 12px; padding: 6px; display: flex; align-items: center; justify-content: center; flex: none; }
.logo-tile img { display: block; width: 100%; height: auto; }
.login-hero h1 { margin: 0; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.15; color: #fff; letter-spacing: -.01em; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.login-stats { display: flex; flex-wrap: wrap; gap: 32px; }
.login-stats b { display: block; font-family: var(--mono); font-size: 26px; color: #fff; font-weight: 600; }
.login-stats span { font-size: 13px; color: #9FB3CF; }
.login-form-wrap { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.login-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.login-form h2 { margin: 0; font-size: 24px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; color: var(--ink2); }
.check input { width: 18px; height: 18px; margin: 0; }
.err { min-height: 20px; color: #B42318; font-size: 13px; font-weight: 600; }

/* ---------- rangka aplikasi ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 256px; flex: none; background: var(--navy); color: #E6ECF5; padding: 22px 14px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.side .brand b { display: block; color: #fff; font-size: 15px; }
.side .brand span { font-size: 12px; color: #9FB3CF; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: #C9D5E6; text-decoration: none; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a[aria-current="page"] { background: var(--navy2); color: #fff; font-weight: 600; }
.nav .badge { margin-left: auto; background: var(--amber); color: #1F1300; border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700; }
.nav-sec { margin: 14px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8EA3C2; }
.me { margin-top: auto; padding: 12px; border-radius: 10px; background: var(--navy3); display: flex; flex-direction: column; gap: 10px; }
.me-row { display: flex; align-items: center; gap: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--amber); color: #1F1300; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.me b { display: block; color: #fff; font-size: 13px; }
.me span { font-size: 12px; color: #9FB3CF; }
.me .acts { display: flex; gap: 6px; }
.me .acts button { flex: 1; min-height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #E6ECF5; font-size: 12px; font-weight: 600; cursor: pointer; }
.me .acts button:hover { background: rgba(255,255,255,.08); }

.main { flex: 1; min-width: 0; padding: 30px clamp(16px, 3vw, 40px) 60px; display: flex; flex-direction: column; gap: 22px; }
.topbar { display: none; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.head h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -.01em; }
.head .eyebrow { color: var(--muted); }
.head .sub { font-size: 13px; color: var(--muted); }
.head .acts { display: flex; flex-wrap: wrap; gap: 8px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.pad { padding: 22px 24px; }
.card h2 { margin: 0; font-size: 17px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; padding: 16px; }
.filters .field { flex: 1 1 200px; }
.filters .field.auto { flex: 0 1 auto; max-width: 100%; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
@media (max-width: 480px) { .grid-auto { grid-template-columns: 1fr; } }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--g1), var(--g2)); box-shadow: 0 6px 18px color-mix(in srgb, var(--g1) 22%, transparent); }
.kpi .t { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; opacity: .95; }
.kpi .tag { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; }
.kpi .v { font-family: var(--mono); font-size: 32px; font-weight: 600; line-height: 1.1; }
.kpi .v small { font-size: 16px; opacity: .8; }
.kpi .bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.25); overflow: hidden; }
.kpi .bar i { display: block; height: 100%; background: #fff; border-radius: 999px; }
.kpi .n { font-size: 12px; opacity: .92; }

/* carta */
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px; }
.legend { flex: 1 1 180px; display: flex; flex-direction: column; gap: 10px; }
.legend div { display: grid; grid-template-columns: 14px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: #F7F9FB; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cols { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 8px; }
.yaxis { display: flex; flex-direction: column; justify-content: space-between; height: 200px; font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; }
.plot { position: relative; height: 200px; border-left: 1px solid #DDE3EB; border-bottom: 1px solid #DDE3EB; background: repeating-linear-gradient(to top, transparent 0, transparent 49px, var(--line2) 49px, var(--line2) 50px); display: grid; align-items: end; padding: 0 12px; }
.col-g { display: flex; align-items: flex-end; justify-content: center; gap: 6px; height: 100%; }
.col { position: relative; width: 34%; max-width: 40px; border-radius: 6px 6px 0 0; }
.col span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; font-weight: 600; white-space: nowrap; }
.xlab { display: grid; padding: 0 12px; }
.xlab div { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 12px; color: var(--muted); }
.xlab b { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); }
.rings { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.ring { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 7%, white); border: 1px solid color-mix(in srgb, var(--c) 22%, white); text-align: center; }
.ring b { font-size: 13px; }
.stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line2); }

/* jadual */
.tbl-box { overflow: auto; }
.tbl-box.tall { max-height: 520px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { position: sticky; top: 0; z-index: 1; background: #F7F9FB; text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.t th:first-child, table.t td:first-child { padding-left: 24px; }
table.t th:last-child, table.t td:last-child { padding-right: 24px; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #F7F9FB; }
.prog { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.prog .b { flex: 1; height: 8px; border-radius: 999px; background: var(--line2); overflow: hidden; }
.prog .b i { display: block; height: 100%; border-radius: 999px; background: var(--c, var(--blue)); }
.prog span { font-family: var(--mono); font-size: 12px; width: 44px; text-align: right; }
.acts-cell { display: flex; gap: 6px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* kad isu & JDM */
.isu { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); border-top: 4px solid var(--c); background: #fff; }
.isu .r { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.isu .w { margin-left: auto; font-size: 12px; color: var(--muted); }
.isu p { margin: 0; font-size: 13px; color: #1F2A3C; }
.isu.clamp p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.isu .meta { font-size: 12px; color: var(--muted); }
.jdm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.jdm { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 12px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); }
.jdm.kosong { border: 1px dashed #FDBA74; border-top: 4px solid #F97316; }
.jdm h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.jdm .who { display: flex; align-items: center; gap: 12px; }
.jdm .who .avatar { width: 44px; height: 44px; background: var(--c); color: #fff; font-size: 13px; }
.jdm .loc { display: flex; gap: 8px; font-size: 12px; color: var(--ink2); }
.jdm .btns { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.jdm .btns a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none; }
.jdm .btns .t1 { background: #2563EB; color: #fff; }
.jdm .btns .t2 { background: #059669; color: #fff; }
.jdm .btns .t3 { background: var(--line2); color: var(--ink); }
.jdm .btns .off { opacity: .4; pointer-events: none; }
.warn { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 8px; background: #FFF7ED; color: #9A3412; font-size: 13px; font-weight: 600; }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 8px; background: #EFF6FF; color: #1E3A8A; font-size: 13px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(11,31,58,.55); display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow-y: auto; }
.dlg { width: 100%; max-width: 680px; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(11,31,58,.35); display: flex; flex-direction: column; }
.dlg-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); border-top: 5px solid var(--c, var(--navy)); border-radius: 16px 16px 0 0; }
.dlg-h h2 { margin: 0; font-size: 20px; }
.dlg-h .eyebrow { color: var(--muted); font-size: 11px; }
.dlg-b { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.dlg-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); background: #F7F9FB; border-radius: 0 0 16px 16px; }
.dlg-f .r { display: flex; gap: 8px; margin-left: auto; }
.close { width: 44px; height: 44px; border-radius: 8px; border: 0; background: var(--bg); color: var(--ink2); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid color-mix(in srgb, var(--c) 40%, white); background: color-mix(in srgb, var(--c) 7%, white); color: #1F2A3C; }
.chips button[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.items { display: flex; flex-direction: column; gap: 6px; }
.items button { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; }
.items button[aria-pressed="true"] { border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 7%, white); }
.items .w { margin-left: auto; font-size: 11px; font-weight: 700; color: #B45309; }
.stpick { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
@media (max-width: 560px) { .stpick { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.stpick button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.stpick button .dot { width: 10px; height: 10px; border-radius: 99px; background: var(--c); }
.stpick button[aria-checked="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.stpick button[aria-checked="true"] .dot { background: #fff; }
.stpick button[disabled] { opacity: .45; cursor: not-allowed; }
.ro { padding: 10px 12px; border-radius: 8px; background: #F7F9FB; border: 1px solid var(--line); font-size: 13px; }

/* peta */
#peta { height: 620px; border-radius: var(--r); border: 1px solid var(--line); z-index: 0; }

.peta-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink2); }
.peta-legend .sw { vertical-align: -1px; margin-right: 2px; }

/* laporan */
.lp-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.lp { width: 100%; max-width: 940px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 40px 44px; box-shadow: 0 8px 30px rgba(11,31,58,.06); font-size: 12.5px; line-height: 1.45; }
.lp-kop { display: flex; align-items: center; gap: 18px; padding-bottom: 14px; border-bottom: 3px solid var(--navy); }
.lp-kop img { width: 62px; height: auto; flex: none; }
.lp-org { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #C8102E; }
.lp-kop h1 { margin: 2px 0 3px; font-size: 21px; line-height: 1.2; color: var(--navy); letter-spacing: -.01em; }
.lp-sub { font-size: 12px; color: var(--muted); }
.lp-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lp-meta div { padding: 8px 12px; border-left: 1px solid var(--line); }
.lp-meta div:first-child { border-left: 0; }
.lp-meta dt { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lp-meta dd { margin: 2px 0 0; font-weight: 600; font-size: 12px; }
.lp-s { margin-top: 26px; }
.lp-s h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding-bottom: 7px; font-size: 16.5px; color: var(--navy); border-bottom: 1px solid var(--line); }
.lp-s h2 span { width: 26px; height: 26px; border-radius: 6px; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; }
.lp-s h3 { margin: 18px 0 8px; font-size: 13px; color: var(--ink2); }
.lp-ket { margin: 0 0 8px; color: var(--ink2); }
.lp-nota { margin: 6px 0 0; font-size: 11px; color: var(--muted); }
.lp-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lp-kpi div { padding: 10px 12px; border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 8px; }
.lp-kpi b { display: block; font-family: var(--mono); font-size: 22px; line-height: 1.2; color: var(--c); }
.lp-kpi span { font-size: 11px; color: var(--ink2); }
.lp-penemuan { margin: 0; padding-left: 18px; }
.lp-penemuan li { margin: 3px 0; }
.lp-tw { overflow-x: auto; }
.lp-t { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.lp-t th { padding: 6px 8px; background: var(--navy); color: #fff; font-size: 10.5px; font-weight: 600; text-align: left; vertical-align: bottom; line-height: 1.25; }
.lp-t td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lp-t tbody tr:nth-child(even) td { background: #F8FAFC; }
.lp-t tfoot td, .lp-t tr.lp-jum td { font-weight: 700; background: #EEF2F7 !important; border-top: 2px solid var(--navy); }
.lp-t .lp-num { text-align: right; white-space: nowrap; }
.lp-t td.lp-num b { font-family: var(--mono); }
.lp-t td.lp-num small { margin-left: 6px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.lp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.lp-carta { display: block; width: 100%; height: auto; }
.lp-pet { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 11px; color: var(--ink2); }
.lp-pet i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.lp-tumpuan { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.lp-kad { padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 8px; }
.lp-kad .k { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.lp-kad h4 { margin: 2px 0 6px; font-size: 13.5px; }
.lp-kad ul { margin: 0; padding-left: 16px; font-size: 11.5px; }
.lp-mini { display: flex; align-items: center; gap: 8px; }
.lp-mini i { flex: 1; min-width: 60px; height: 6px; border-radius: 9px; background: #EEF1F5; overflow: hidden; }
.lp-mini i b { display: block; height: 100%; background: var(--c); }
.lp-mini span { width: 42px; text-align: right; font-size: 11px; }
.lp-tahap { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 10px; font-weight: 700; color: #fff; background: var(--c); white-space: nowrap; }
.lp-dun { margin-top: 14px; }
.lp-dun h4 { display: flex; align-items: center; margin: 0 0 6px; font-size: 12.5px; }
.lp-kaki { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--muted); }
@media (max-width: 640px) {
  .lp { padding: 20px 14px; }
  .lp-kop { gap: 12px; }
  .lp-kop img { width: 46px; }
  .lp-kop h1 { font-size: 17px; }
  .lp-meta, .lp-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-meta div:nth-child(3) { border-left: 0; }
  .lp-meta div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media print {
  @page {
    size: A4; margin: 14mm 12mm 16mm;
    @bottom-left { content: "Laporan Kesiapsiagaan · JPRC P.098 Gombak"; font: 8.5pt 'IBM Plex Sans', sans-serif; color: #5B6B82; }
    @bottom-right { content: "Muka surat " counter(page) " / " counter(pages); font: 8.5pt 'IBM Plex Sans', sans-serif; color: #5B6B82; }
  }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { background: #fff; }
  .side, .topbar, .bnav, .scrim, .no-print, .toast, .loading, #modal-root { display: none !important; }
  .shell { display: block; min-height: 0; }
  .main { display: block; padding: 0; }
  .lp { max-width: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .lp-baru { break-before: page; }
  .lp-s h2, .lp-s h3, .lp-dun h4 { break-after: avoid; }
  .lp-t tr, .lp-kad, .lp-carta, .lp-kpi, .lp-pet { break-inside: avoid; }
  .lp-t thead { display: table-header-group; }
  .lp-tw { overflow: visible; }
}

/* muatan & toast */
.loading { position: fixed; inset: 0; z-index: 80; background: rgba(244,246,249,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--ink2); font-weight: 600; }
.spin { width: 40px; height: 40px; border: 4px solid #DBE5F3; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 90; max-width: 420px; padding: 13px 17px; border-radius: 10px; background: #101828; color: #fff; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast.bad { background: #991B1B; }

/* bawah navigasi (telefon) */
.bnav { display: none; }

@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 10px 0 32px rgba(0,0,0,.28); width: min(84vw, 300px); }
  .side.open { transform: none; }
  /* 100dvh: bar alamat pelayar telefon tidak lagi menutup kotak pengguna; kotak diletakkan terus di bawah menu */
  .side { height: 100dvh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .side .me { margin-top: 8px; }
  .scrim { position: fixed; inset: 0; z-index: 55; background: rgba(3,7,18,.5); }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; padding: 10px 14px; background: var(--navy); color: #fff; }
  .topbar button { width: 44px; height: 44px; border-radius: 10px; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .topbar b { font-size: 15px; }
  .topbar span { font-size: 11px; color: #9FB3CF; display: block; }
  .shell { flex-direction: column; }
  .main { padding: 18px 14px 96px; }
  .head h1 { font-size: 22px; }
  .bnav { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding: 4px 4px calc(8px + env(safe-area-inset-bottom)); }
  .bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; }
  .bnav a[aria-current="page"] { color: var(--blue); font-weight: 700; }
  .toast { left: 14px; right: 14px; bottom: 80px; max-width: none; }
  #peta { height: 70vh; }

  /* log masuk: jalur tajuk ringkas, borang terus kelihatan tanpa skrol */
  .login { flex-direction: column; flex-wrap: nowrap; min-height: 100dvh; }
  .login-hero { flex: none; padding: 20px 20px 22px; gap: 18px; justify-content: flex-start; }
  .login-logo { width: 48px; height: 48px; }
  .login-title { gap: 6px; }
  .login-hero h1 { font-size: 26px; }
  .login-hero .lead, .login-stats { display: none; }
  .login-form-wrap { flex: 1 0 auto; align-items: flex-start; padding: 24px 20px 32px; }
  .login-form { gap: 14px; }
}

@media (max-width: 640px) {
  .head { gap: 12px; }
  .head .eyebrow { font-size: 10px; letter-spacing: .06em; }
  .head .acts { width: 100%; }
  .head .acts .btn { flex: 1 1 0; min-height: 40px; padding: 0 10px; font-size: 13px; white-space: normal; line-height: 1.2; text-align: center; }
  .pad { padding: 18px 16px; }
  .filters { gap: 14px; padding: 14px; }
  .filters .field, .filters .field.auto { flex: 1 1 100%; }

  /* pemilih segmen: grid kemas 2 lajur; jika bilangan pilihan ganjil, "Semua" mengambil sebaris penuh */
  .seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg > button:first-child:nth-last-child(2n+1) { grid-column: 1 / -1; }
  .seg button { justify-content: center; text-align: center; padding: 6px 8px; min-height: 40px; line-height: 1.2; white-space: normal; }
  .seg button:has(.dot) { justify-content: flex-start; text-align: left; padding-left: 12px; }

  /* KPI 2 sejajar; kad pertama sebaris penuh jika bilangan ganjil */
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis > .kpi:first-child:nth-last-child(2n+1) { grid-column: 1 / -1; }
  .kpi { padding: 14px; gap: 8px; border-radius: 12px; }
  .kpi .t { font-size: 12px; line-height: 1.25; gap: 6px; }
  .kpi .tag { width: 26px; height: 26px; font-size: 11px; flex: none; }
  .kpi .v { font-size: 24px; }
  .kpi .v small { font-size: 12px; }
  .kpi .n { font-size: 11px; line-height: 1.3; }

  /* carta donut di tengah, petunjuk di bawah */
  .donut-wrap { gap: 18px; }
  .donut-wrap svg { width: 180px; height: 180px; }
  .legend { flex-basis: 100%; }

  /* modul: 2 kad sebaris */
  .rings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ring { padding: 12px 8px; }
  .ring svg { width: 68px; height: 68px; }
  .ring b { font-size: 12px; line-height: 1.25; }

  .jdm-grid { grid-template-columns: 1fr; }
  table.t th:first-child, table.t td:first-child { padding-left: 16px; }
}
