:root {
  --bg: #0A1120; --bg2: #0E1729; --surface: #121D33; --surface2: #172541; --sunk: #0D1628;
  --line: #22324E; --line2: #2C3F60; --ink: #E7EEF8; --muted: #8C9CB6; --faint: #5E6F8C;
  --g1: #22D3EE; --g2: #6366F1; --g3: #C026D3;
  --brand: linear-gradient(135deg, var(--g1), var(--g2) 55%, var(--g3));
  --accent: #7C83FF; --accent-ink: #fff;
  --ok: #22C55E; --ok-bg: rgba(34,197,94,.14); --warn: #F5A524; --warn-bg: rgba(245,165,36,.15);
  --crit: #F2545B; --crit-bg: rgba(242,84,91,.15); --na: #94A3B8; --na-bg: rgba(148,163,184,.14);
  --info: #38BDF8; --info-bg: rgba(56,189,248,.14);
  --c-mon: #8B5CF6; --c-prob: #F59E0B; --c-bkp: #06B6D4; --c-sec: #F43F5E; --c-phy: #22C55E; --c-usr: #3B82F6; --c-x: #EC4899;
  --radius: 12px; --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.25);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #EEF2F9; --bg2: #E6ECF6; --surface: #FFFFFF; --surface2: #F5F8FC; --sunk: #F1F4FA;
  --line: #DAE2EE; --line2: #C9D4E4; --ink: #0E1A2E; --muted: #56677F; --faint: #8794A8;
  --accent: #4F46E5; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 6px 18px rgba(16,24,40,.06);
  --ok: #16A34A; --warn: #C27803; --crit: #DC2626; --na: #64748B; --info: #0284C7;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(900px 500px at 85% -10%, rgba(99,102,241,.16), transparent 60%), radial-gradient(700px 420px at -5% 110%, rgba(34,211,238,.10), transparent 60%); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--g1); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .nowrap { white-space: nowrap; } .num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; gap: 12px; }
.logo svg { flex: none; filter: drop-shadow(0 6px 16px rgba(99,102,241,.45)); }
.logo b { display: block; font-size: 17px; letter-spacing: -.01em; }
.logo span { display: block; font-size: 12px; color: var(--muted); }

/* ---------- Login ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--brand); }
.auth-card h2 { margin: 22px 0 4px; font-size: 22px; }
.auth-card form { display: grid; gap: 12px; margin-top: 18px; }
.auth-foot { margin-top: 16px; font-size: 12px; color: var(--faint); text-align: center; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100%; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg2); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; }
.nav { display: grid; gap: 3px; }
.nav-label { font-size: 11.5px; color: var(--faint); margin: 10px 10px 4px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--surface2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.nav .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; color: #fff; background: var(--c, var(--accent)); box-shadow: 0 4px 12px -4px var(--c, var(--accent)); }
.nav .ic svg { width: 17px; height: 17px; }
.nav .count { margin-left: auto; font-size: 11.5px; background: var(--crit); color: #fff; border-radius: 10px; padding: 0 7px; }
.me { margin-top: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.me-row { display: flex; gap: 10px; align-items: center; }
.me-row > div > b { display: block; font-size: 13.5px; } .me-row > div > span { font-size: 12px; color: var(--muted); }
.me-actions { display: flex; gap: 6px; }
.me-actions .btn { flex: 1; padding: 6px 8px; font-size: 12.5px; }
.main { min-width: 0; padding: 22px 28px 60px; }
.topbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.topbar h1 { font-size: 24px; }
.topbar p { margin: 3px 0 0; color: var(--muted); }
.now-chip { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 8px; font-size: 13px; }
.now-chip .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; color: #fff; }
.mobile-top { display: none; }

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card, .card + .grid, .grid + .card, .grid + .grid { margin-top: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h3 { font-size: 15.5px; display: flex; align-items: center; gap: 9px; }
.card-h h3 .bar { width: 4px; height: 16px; border-radius: 2px; background: var(--c, var(--accent)); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line2); background: var(--surface2); color: var(--ink); border-radius: 9px; padding: 8px 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -6px rgba(99,102,241,.7); }
.btn.danger { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 45%, transparent); background: var(--crit-bg); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn svg { width: 16px; height: 16px; }
.field { display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.input, select.input, textarea.input { width: 100%; background: var(--sunk); border: 1px solid var(--line2); border-radius: 9px; padding: 8px 11px; color: var(--ink); font-weight: 500; font-size: 14px; }
textarea.input { resize: vertical; min-height: 90px; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; }
.filters .field { min-width: 140px; }
.filters .grow { flex: 1; min-width: 180px; }
.spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--na-bg); color: var(--na); }
.pill.ok, .pill.tepat, .pill.info-ok { background: var(--ok-bg); color: var(--ok); }
.pill.warning, .pill.terlambat { background: var(--warn-bg); color: var(--warn); }
.pill.critical, .pill.terlewat, .pill.fail { background: var(--crit-bg); color: var(--crit); }
.pill.info, .pill.berjalan { background: var(--info-bg); color: var(--info); }
.pill.admin { background: rgba(192,38,211,.16); color: #E879F9; } .pill.supervisor { background: rgba(99,102,241,.18); color: #A5B4FC; } .pill.operator { background: rgba(34,211,238,.14); color: #67E8F9; }
:root[data-theme="light"] .pill.admin { color: #A21CAF; } :root[data-theme="light"] .pill.supervisor { color: #4338CA; } :root[data-theme="light"] .pill.operator { color: #0E7490; }
.dot-s { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--na); }
.dot-s.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; flex: none; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--sunk); color: var(--muted); font-weight: 700; font-size: 12.5px; white-space: nowrap; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface2) 70%, transparent); }
tr.click { cursor: pointer; }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; font-size: 13px; color: var(--muted); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; background: var(--info-bg); color: var(--ink); border: 1px solid color-mix(in srgb, var(--info) 35%, transparent); }
.notice.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.notice.crit { background: var(--crit-bg); border-color: color-mix(in srgb, var(--crit) 40%, transparent); }
.notice.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--accent)); }
.kpi .v { font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 3px; }
.kpi .d { font-size: 12px; font-weight: 700; margin-top: 6px; }
.up { color: var(--ok); } .down { color: var(--crit); } .flat { color: var(--muted); }
.meter { height: 8px; border-radius: 6px; background: var(--sunk); overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; }
.m-ok { background: var(--ok); } .m-warning { background: var(--warn); } .m-critical { background: var(--crit); } .m-na { background: var(--na); }

/* ---------- Checklist ---------- */
.ctx { display: grid; grid-template-columns: 170px 210px 1fr; gap: 14px; align-items: end; }
.sites { display: flex; flex-wrap: wrap; gap: 6px; }
.site-btn { position: relative; border: 1px solid var(--line2); background: var(--sunk); color: var(--ink); border-radius: 10px; padding: 7px 14px 7px 26px; font-weight: 700; cursor: pointer; }
.site-btn::before { content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--na); }
.site-btn[data-st="tepat"]::before { background: var(--ok); } .site-btn[data-st="terlambat"]::before { background: var(--warn); }
.site-btn[data-st="terlewat"]::before { background: var(--crit); } .site-btn[data-st="berjalan"]::before { background: var(--info); animation: pulse 1.6s infinite; }
.site-btn[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: transparent; }
@keyframes pulse { 50% { opacity: .35; } }
.win { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line2); font-size: 13px; color: var(--muted); }
.win b { color: var(--ink); }
.progress { position: sticky; top: 10px; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 16px 0; padding: 12px 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); }
.progress .pbar { flex: 1; min-width: 160px; }
.progress .pbar div:first-child { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.cat { --c: var(--accent); margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cat-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%); border-bottom: 1px solid var(--line); }
.cat-h .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--c); display: grid; place-items: center; color: #fff; flex: none; }
.cat-h .ic svg { width: 18px; height: 18px; }
.cat-h h3 { font-size: 15px; } .cat-h .muted { font-size: 12.5px; }
.cat-h .btn { margin-left: auto; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.item:last-child { border-bottom: 0; }
.item[data-s="ok"] { border-left-color: var(--ok); } .item[data-s="na"] { border-left-color: var(--na); }
.item[data-s="warning"] { border-left-color: var(--warn); background: var(--warn-bg); } .item[data-s="critical"] { border-left-color: var(--crit); background: var(--crit-bg); }
.item-t b { font-weight: 650; } .item-t .hint { display: block; color: var(--muted); font-size: 12.5px; }
.freq { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; vertical-align: 1px; }
.freq.daily { background: rgba(56,189,248,.16); color: var(--info); } .freq.weekly { background: rgba(192,38,211,.16); color: #E879F9; }
:root[data-theme="light"] .freq.weekly { color: #A21CAF; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 9px; overflow: hidden; align-self: start; background: var(--sunk); }
.seg button { border: 0; background: transparent; padding: 6px 12px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; border-left: 1px solid var(--line2); }
.seg button:first-child { border-left: 0; }
.seg button:disabled { cursor: default; }
.seg button[aria-pressed="true"][data-v="ok"] { background: var(--ok); color: #fff; }
.seg button[aria-pressed="true"][data-v="warning"] { background: var(--warn); color: #1b1300; }
.seg button[aria-pressed="true"][data-v="critical"] { background: var(--crit); color: #fff; }
.seg button[aria-pressed="true"][data-v="na"] { background: var(--na); color: #fff; }
.item-f { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 170px; gap: 8px; }
.item-f .input { padding: 6px 10px; font-size: 13px; }
.item:not([data-s="warning"]):not([data-s="critical"]) .ticket { display: none; }
.item:not([data-s="warning"]):not([data-s="critical"]) .item-f { grid-template-columns: 1fr; }

/* ---------- Perangkat ---------- */
.devnav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.devchip { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line2); color: var(--ink); text-decoration: none; }
.devchip .ic { width: 26px; height: 26px; border-radius: 7px; background: var(--c); color: #fff; display: grid; place-items: center; }
.devchip b { display: block; font-size: 13px; line-height: 1.2; } .devchip small { display: block; font-size: 11.5px; color: var(--muted); }
.devchip[data-state="done"] { border-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.devchip[data-state="warn"] { border-color: var(--warn); } .devchip[data-state="crit"] { border-color: var(--crit); }
.devtype { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--ink); vertical-align: 2px; margin-left: 4px; }
.subcat { padding: 7px 16px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--sunk); border-bottom: 1px solid var(--line); }
.dev .cat-h { scroll-margin-top: 90px; }
.devbox { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--sunk); }
.devrow { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.devrow .input { padding: 5px 9px; font-size: 13px; flex: 1; min-width: 0; }
.ic.sm { width: 24px; height: 24px; border-radius: 7px; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; }

/* ---------- Matriks checklist ---------- */
.mx-wrap { overflow-x: auto; }
.mx { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
.mx th, .mx td { border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: middle; }
.mx thead th { position: sticky; top: 0; z-index: 2; background: var(--surface2); }
.mx .mx-item { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 220px; max-width: 280px; text-align: left; }
.mx thead .mx-item { z-index: 3; background: var(--surface2); }
.mx-dev { text-align: center; min-width: 196px; border-top: 3px solid var(--c); }
.mx-devh { display: flex; align-items: center; gap: 8px; justify-content: center; }
.mx-devh b { display: block; font-size: 13.5px; color: var(--ink); } .mx-devh small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.mx-devc { font-size: 12px; color: var(--muted); margin: 4px 0; font-weight: 600; }
.mx-allok { padding: 3px 9px; font-size: 11.5px; }
.mx-cat td { background: var(--sunk); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 12px; position: sticky; left: 0; }
.mx-row[data-s="warning"] .mx-item { box-shadow: inset 3px 0 0 var(--warn); }
.mx-row[data-s="critical"] .mx-item { box-shadow: inset 3px 0 0 var(--crit); }
.mx-cell { text-align: center; }
.mx-cell[data-s="warning"] { background: var(--warn-bg); } .mx-cell[data-s="critical"] { background: var(--crit-bg); }
.mx-na { text-align: center; color: var(--faint); }
.mx-seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; background: var(--sunk); }
.mx-seg button { border: 0; background: transparent; padding: 5px 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); cursor: pointer; border-left: 1px solid var(--line2); min-height: 30px; }
.mx-seg button:first-child { border-left: 0; }
.mx-seg button:disabled { cursor: default; }
.mx-seg button[aria-pressed="true"][data-v="ok"] { background: var(--ok); color: #fff; }
.mx-seg button[aria-pressed="true"][data-v="warning"] { background: var(--warn); color: #1b1300; }
.mx-seg button[aria-pressed="true"][data-v="critical"] { background: var(--crit); color: #fff; }
.mx-detail td { background: var(--sunk); padding: 8px 12px; }
.mx-note { display: grid; grid-template-columns: auto 1fr 150px; gap: 8px; align-items: center; margin: 4px 0; }
.mx-note .input { padding: 6px 10px; font-size: 13px; }
.mx-legend { padding: 10px 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 560px) { .mx-note { grid-template-columns: 1fr; position: sticky; left: 12px; max-width: calc(100vw - 64px); } .mx .mx-item { min-width: 150px; } }

/* ---------- Evidence ---------- */
.mx-acts { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.ev-btn { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; vertical-align: middle; border: 1px dashed var(--line2); background: transparent; color: var(--muted); border-radius: 7px; padding: 4px 7px; font-size: 11px; font-weight: 700; cursor: pointer; min-height: 30px; }
.ev-btn.has { border-style: solid; border-color: color-mix(in srgb, #14B8A6 60%, transparent); background: rgba(20,184,166,.14); color: #2DD4BF; }
:root[data-theme="light"] .ev-btn.has { color: #0F766E; }
.ev-btn.need { border-color: color-mix(in srgb, var(--warn) 70%, transparent); color: var(--warn); }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ev-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ev-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.ev-card figcaption { padding: 8px 10px; display: grid; gap: 4px; font-size: 12px; } .ev-card figcaption b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ev-card figcaption span { color: var(--muted); }
.ev-card.big figcaption { font-size: 12.5px; }
.ev-thumb { height: 110px; background: var(--sunk); display: grid; place-items: center; cursor: pointer; overflow: hidden; }
.ev-card.big .ev-thumb { height: 160px; }
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ev-thumb.pdf span, .ev-thumb.purged span { display: grid; place-items: center; gap: 4px; color: var(--muted); font-weight: 700; font-size: 12px; }
.ev-devs { display: flex; flex-wrap: wrap; gap: 4px; }
.ev-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 14px; max-height: 220px; overflow-y: auto; padding: 8px; background: var(--sunk); border-radius: 8px; border: 1px solid var(--line); }
.ev-pick label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink); }
.ev-drop { display: grid; place-items: center; gap: 6px; text-align: center; padding: 22px; border: 2px dashed var(--line2); border-radius: 12px; cursor: pointer; color: var(--muted); }
.ev-drop b { color: var(--ink); font-size: 14px; } .ev-drop span { font-size: 12px; }
.ev-drop:hover, .ev-drop.over, .ev-drop:focus-visible { border-color: #14B8A6; background: rgba(20,184,166,.08); }
.ev-view { background: var(--sunk); border-radius: 10px; display: grid; place-items: center; max-height: 65vh; overflow: auto; }
.ev-view img { max-width: 100%; height: auto; display: block; }

/* ---------- Kepatuhan / heatmap ---------- */
.hm td, .hm th { text-align: center; padding: 6px 6px; }
.hm td:first-child, .hm th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.hm th:first-child { background: var(--sunk); }
.cell { display: inline-flex; flex-direction: column; align-items: center; min-width: 74px; border-radius: 8px; padding: 4px 6px; font-size: 11.5px; font-weight: 700; line-height: 1.25; }
.cell small { font-weight: 500; opacity: .85; font-size: 10.5px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell.tepat { background: var(--ok-bg); color: var(--ok); } .cell.terlambat { background: var(--warn-bg); color: var(--warn); }
.cell.terlewat { background: var(--crit-bg); color: var(--crit); } .cell.berjalan { background: var(--info-bg); color: var(--info); }
.cell.akan, .cell.na { background: transparent; color: var(--faint); }
.cell .fx { display: inline-flex; gap: 3px; margin-top: 2px; } .cell .fx i { font-style: normal; font-size: 10px; padding: 0 4px; border-radius: 4px; color: #fff; }
.fx .w { background: var(--warn); color: #1b1300 !important; } .fx .c { background: var(--crit); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- Report ---------- */
.seg-tabs { display: inline-flex; background: var(--sunk); border: 1px solid var(--line2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg-tabs button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg-tabs button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.doc-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; padding: 20px 22px; border-radius: var(--radius); background: linear-gradient(120deg, color-mix(in srgb, var(--g2) 30%, var(--surface)), color-mix(in srgb, var(--g1) 18%, var(--surface)) 60%, var(--surface)); border: 1px solid var(--line2); margin-bottom: 16px; }
.doc-head h2 { font-size: 24px; } .doc-head .sub { margin-top: 4px; font-weight: 600; }
.doc-head .meta { font-size: 12.5px; color: var(--muted); text-align: right; }
.narr { margin: 0; padding-left: 18px; } .narr li { margin: 5px 0; max-width: 95ch; }
.chart { position: relative; height: 260px; }
.chart.sm { height: 220px; }
.hbar { display: grid; grid-template-columns: minmax(130px, 1.2fr) 3fr 64px; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.hbar .meter { height: 10px; }
.sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; font-size: 12.5px; color: var(--muted); }
.sign div { border-top: 1px solid var(--line2); padding-top: 8px; min-height: 70px; }

/* ---------- Modal & toast ---------- */
dialog { border: 1px solid var(--line2); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 0; width: min(640px, calc(100vw - 24px)); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
dialog.wide { width: min(980px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(5,10,20,.65); backdrop-filter: blur(3px); }
.dlg-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dlg-h h3 { font-size: 17px; }
.dlg-b { padding: 18px 20px; max-height: 70vh; overflow-y: auto; display: grid; gap: 12px; }
.dlg-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); }
.x { border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--surface2); border: 1px solid var(--line2); border-left: 4px solid var(--ok); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); max-width: 380px; font-size: 13.5px; }
.toast.err { border-left-color: var(--crit); }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.check-grid label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--ink); }
.switch { appearance: none; width: 36px; height: 20px; border-radius: 20px; background: var(--line2); position: relative; cursor: pointer; vertical-align: middle; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--ok); } .switch:checked::after { transform: translateX(16px); }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.subtabs a { padding: 7px 14px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 700; border: 1px solid var(--line); background: var(--surface); }
.subtabs a[aria-current="page"] { background: var(--brand); color: #fff; border-color: transparent; }

@media (max-width: 1100px) { .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: 20px 0 50px rgba(0,0,0,.4); }
  .side.open { transform: none; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--bg2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .main { padding: 16px 14px 60px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .ctx { grid-template-columns: 1fr 1fr; } .ctx .sitef { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .item { grid-template-columns: 1fr; } .seg { width: 100%; } .seg button { flex: 1; padding: 7px 4px; }
  .item-f { grid-template-columns: 1fr !important; }
  .sign { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print {
  :root { --bg: #fff; --surface: #fff; --surface2: #fff; --sunk: #F4F6FA; --ink: #111; --muted: #444; --line: #ccc; --line2: #bbb; }
  body::before, .side, .mobile-top, .topbar, .no-print, .toasts { display: none !important; }
  .shell { display: block; } .main { padding: 0; }
  .card, .kpi, .doc-head { box-shadow: none; break-inside: avoid; }
  .doc-head { background: #fff; }
  .chart { height: 220px; }
}
