:root {
  --green: #14573a; --green-2: #0e4029; --green-soft: #e6f0ea;
  --gold: #a87914; --ink: #1d2521; --muted: #5b6761; --line: #d9dfda; --bg: #f4f6f2; --card: #fff;
  --ok: #14703f; --ok-bg: #e1f3e8; --warn: #8a5a00; --warn-bg: #fdf0d2; --bad: #a3271f; --bad-bg: #fbe3e0;
  --manual: #53408f; --manual-bg: #ece8f8; --none: #56615b; --none-bg: #eceeea; --info: #0b5cad; --info-bg: #e3eefa;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); }
.wrap { width: min(1280px, 100% - 32px); margin-inline: auto; }
a { color: var(--info); }
a:hover { color: var(--green-2); }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 22px 0 6px; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 26px 0 10px; }
h3 { font-size: 1rem; margin: 0 0 6px; }
.lead { color: var(--muted); margin: 0 0 16px; max-width: 75ch; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* Header */
.top { background: var(--green); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.top-in { display: flex; align-items: center; gap: 18px; padding: 8px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; margin-right: 6px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #fff; color: var(--green); font-weight: 800; font-size: 1.1rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small { opacity: .8; font-size: .75rem; }
.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav a, .nav summary { color: #fff; text-decoration: none; padding: 8px 11px; border-radius: 8px; cursor: pointer; font-size: .93rem; list-style: none; }
.nav a:hover, .nav summary:hover { background: rgba(255,255,255,.14); color: #fff; }
.nav a.on { background: rgba(255,255,255,.2); font-weight: 600; }
summary::-webkit-details-marker { display: none; }
.nav summary::after { content: " ▾"; font-size: .8em; }
.menu { position: relative; }
.menu-list { position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; z-index: 30; display: flex; flex-direction: column; }
.menu-right .menu-list { left: auto; right: 0; }
.menu-list a, .menu-list .linklike { color: var(--ink) !important; padding: 8px 10px; border-radius: 6px; text-decoration: none; font-size: .92rem; text-align: left; }
.menu-list a:hover, .menu-list .linklike:hover { background: var(--green-soft); }
.linklike { background: none; border: 0; font: inherit; cursor: pointer; width: 100%; }
.who summary { display: flex; flex-direction: column; line-height: 1.2; padding: 4px 10px; color: #fff; cursor: pointer; }
.who summary::after { content: none; }
.who small { opacity: .8; font-size: .75rem; }
.who-name { font-weight: 600; }
main { padding-bottom: 30px; min-height: 60vh; }
.foot { display: flex; flex-direction: column; gap: 2px; padding: 18px 0 28px; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); }

/* Komponen */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card + .card { margin-top: 14px; }
.grid { display: grid; gap: 12px; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 14px 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-left-width: 5px; border-radius: var(--radius); padding: 10px 14px; }
.tile b { display: block; font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { font-size: .84rem; color: var(--muted); }
.tile.ok { border-left-color: var(--ok); } .tile.warn { border-left-color: #d79a00; } .tile.bad { border-left-color: var(--bad); }
.tile.manual { border-left-color: var(--manual); } .tile.none { border-left-color: #9aa59f; } .tile.main { border-left-color: var(--green); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge i { font-style: normal; font-weight: 800; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: #b9dfc8; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: #efd391; }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: #f0bab5; }
.badge.manual { background: var(--manual-bg); color: var(--manual); border-color: #cfc6ee; }
.badge.none { background: var(--none-bg); color: var(--none); border-color: #d3d8d4; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-ptipd { background: #fff3cf; color: #7a5600; }
.flash { margin: 16px 0 0; padding: 10px 14px; border-radius: 8px; font-weight: 500; border: 1px solid; }
.flash-ok { background: var(--ok-bg); border-color: #b9dfc8; color: #0f5a33; }
.flash-err { background: var(--bad-bg); border-color: #f0bab5; color: var(--bad); }
.note-public { background: var(--info-bg); border: 1px solid #bcd6f1; color: #0a4a8c; padding: 8px 12px; border-radius: 8px; margin: 14px 0 0; font-size: .9rem; }
.banner { background: var(--warn-bg); border: 1px solid #efd391; border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.crumbs { margin: 16px 0 0; font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Tab tahun */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; }
.tabs a.on { background: var(--green); color: #fff; border-color: var(--green); }

/* Tabel */
.tw { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: #eef2ee; font-weight: 600; font-size: .8rem; text-transform: none; color: #33403a; position: sticky; top: 0; }
tbody tr:hover { background: #fafcfa; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.grp td { background: var(--green-soft); font-weight: 700; color: var(--green-2); border-bottom: 1px solid #c9ddd1; }
.kode { font-weight: 700; white-space: nowrap; }
.kode a { text-decoration: none; }
.kode a:hover { text-decoration: underline; }
.bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: #e4e8e4; min-width: 120px; }
.bar span { display: block; height: 100%; }
.bar .ok { background: #2e9d5f; } .bar .warn { background: #e0a400; } .bar .bad { background: #cf4a40; } .bar .manual { background: #7b66c7; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.dot.ok { background: #2e9d5f; } .dot.warn { background: #e0a400; } .dot.bad { background: #cf4a40; } .dot.manual { background: #7b66c7; } .dot.none { background: #b4bcb7; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin: 8px 0; }

/* Formulir */
form.filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin: 10px 0 14px; }
label { display: block; font-size: .83rem; font-weight: 600; margin-bottom: 3px; color: #33403a; }
input[type=text], input[type=url], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #b9c3bd; border-radius: 8px; background: #fff; color: var(--ink); }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
.f-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 12px; }
.f-row.wide { grid-template-columns: 1fr; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--green); background: var(--green); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--green-2); color: #fff; }
.btn.sec { background: #fff; color: var(--green); }
.btn.sec:hover { background: var(--green-soft); color: var(--green-2); }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.inline { display: inline; }

/* Detail indikator */
.defgrid { display: grid; grid-template-columns: 150px 1fr; gap: 4px 14px; margin: 0; }
.defgrid dt { color: var(--muted); font-size: .86rem; }
.defgrid dd { margin: 0; }
.years { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); margin-top: 14px; align-items: start; }
.year { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; border-top: 4px solid var(--green); }
.year header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.year h3 { font-size: 1.1rem; margin: 0; }
.kv { display: grid; grid-template-columns: 112px 1fr; gap: 3px 10px; margin: 6px 0; }
.kv dt { color: var(--muted); font-size: .84rem; } .kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.bukti-list { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 6px; }
.bukti-list li { padding: 6px 8px; background: #f7f9f7; border: 1px solid var(--line); border-radius: 8px; word-break: break-word; }
.bukti-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: end; margin-bottom: 8px; padding: 8px; background: #f7f9f7; border: 1px solid var(--line); border-radius: 8px; }
.bukti-row .span-all { grid-column: 1 / -1; }
.komentar { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.komentar li { border-left: 3px solid #b9c3bd; padding: 4px 10px; background: #fafbfa; }
details.edit { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
details.edit > summary { cursor: pointer; font-weight: 600; color: var(--green); }
.lock { color: var(--bad); font-weight: 600; font-size: .85rem; }
.review-box { background: #f1f6ff; border: 1px solid #c5d9f2; border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.review-note { background: var(--warn-bg); border: 1px solid #efd391; border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.log-time { white-space: nowrap; }
.pager { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.token-box { display: flex; gap: 8px; }
.token-box input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.err-list { background: var(--bad-bg); border: 1px solid #f0bab5; padding: 8px 14px 8px 30px; border-radius: 8px; color: var(--bad); }
.login { max-width: 420px; margin: 8vh auto 0; }

@media (max-width: 760px) {
  h1 { font-size: 1.35rem; }
  .defgrid { grid-template-columns: 1fr; }
  .nav { order: 3; width: 100%; }
  .who { margin-left: auto; }
  .years { grid-template-columns: 1fr; }
}
@media print {
  .top, .foot, .tabs, form, .actions, .skip { display: none !important; }
  body { background: #fff; }
  .card, .year, .tw { border-color: #999; }
}
@media (prefers-reduced-motion: no-preference) { .bar span { transition: width .3s; } }
