:root {
  --teal: #0f766e;
  --teal-dark: #115e59;
  --teal-light: #ccfbf1;
  --bg: #f0fdfa;
  --card: #ffffff;
  --ink: #134e4a;
  --muted: #5f7370;
  --line: #d7e5e2;
  --gold: #b45309;
  --gold-bg: #fef3c7;
  --red: #b91c1c;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
.hidden { display: none !important; }
h1, h2, h3 { margin: 0 0 8px; }
h2 { font-size: 1.05rem; }
button, input, select, textarea { font: inherit; }
input, select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 10px; }
label input, label select, label textarea { margin-top: 4px; font-weight: 400; }
.btn {
  border: 1px solid var(--teal);
  background: #fff;
  color: var(--teal-dark);
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn.small { padding: 6px 10px; font-size: .82rem; }
.btn.danger { border-color: #fecaca; color: var(--red); }
.btn.w100 { width: 100%; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.error-text { color: var(--red); min-height: 1.2em; font-size: .88rem; }
.hint { color: var(--muted); font-size: .83rem; line-height: 1.45; }

/* Layar kunci */
.lock-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 18px; }
.lock-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px 22px; max-width: 430px; width: 100%; box-shadow: 0 10px 30px rgba(15,118,110,.12);
  text-align: center;
}
.lock-card label { text-align: left; }
.lock-logo { font-size: 2.6rem; }
.lock-sub { color: var(--muted); margin-top: 0; }
.lock-note { font-size: .88rem; line-height: 1.5; color: var(--ink); text-align: left; background: var(--bg); border: 1px solid var(--line); padding: 10px 12px; border-radius: 10px; }

/* Kerangka aplikasi */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--teal-dark); color: #fff; padding: 12px 16px;
}
.brand { font-weight: 700; font-size: 1.02rem; }
.brand-sub { font-size: .78rem; opacity: .85; }
.top-actions { display: flex; gap: 6px; }
.top-actions .btn { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.tabs {
  position: sticky; top: 57px; z-index: 19;
  display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.tab {
  white-space: nowrap; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: .88rem;
}
.tab.active { background: var(--teal); color: #fff; border-color: var(--teal); }
main { max-width: 1080px; margin: 0 auto; padding: 14px 12px 90px; }
.page { display: none; }
.page.active { display: block; }
.agenda-strip {
  background: var(--gold-bg); border: 1px solid #fde68a; color: #92400e;
  padding: 10px 14px; border-radius: var(--radius); margin-bottom: 12px; font-size: .9rem;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
}
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: 1fr; }
.cards-grid { grid-template-columns: 1fr; }
.kpi-grid { grid-template-columns: repeat(2, 1fr); margin-bottom: 14px; }
@media (min-width: 760px) {
  .grid.two { grid-template-columns: 1fr 1fr; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kpi .num { font-size: 1.5rem; font-weight: 800; color: var(--teal-dark); }
.kpi .lbl { font-size: .8rem; color: var(--muted); }
.progress { background: #e6f4f1; border-radius: 999px; height: 12px; overflow: hidden; }
.progress > div { background: var(--teal); height: 100%; border-radius: 999px; }
.progress-row { display: grid; grid-template-columns: 130px 1fr 86px; gap: 8px; align-items: center; margin: 8px 0; font-size: .85rem; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge.ada { background: var(--teal-light); color: var(--teal-dark); }
.badge.belum { background: #fee2e2; color: var(--red); }
.badge.revisi { background: var(--gold-bg); color: var(--gold); }
.badge.gold { background: var(--gold-bg); color: var(--gold); }
.badge.grey { background: #e5e7eb; color: #374151; }
.filters { display: grid; gap: 8px; grid-template-columns: 1fr; margin-bottom: 8px; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.ep-item {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-bottom: 6px;
  cursor: pointer; background: #fff; text-align: left; width: 100%;
}
.ep-item:hover { border-color: var(--teal); }
.ep-code { font-weight: 800; color: var(--teal-dark); }
.ep-meta { font-size: .78rem; color: var(--muted); }
.form-grid { display: grid; gap: 4px 12px; grid-template-columns: 1fr; }
.form-grid.one { grid-template-columns: 1fr; }
@media (min-width: 760px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span2 { grid-column: span 2; } }
.checks { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.checks legend { font-size: .85rem; font-weight: 600; padding: 0 4px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 4px 14px 4px 0; }
.check input { width: auto; }
.list-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.list-item .head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.list-item .title { font-weight: 700; }
.list-item .meta { font-size: .8rem; color: var(--muted); }
.list-item .acts { display: flex; gap: 6px; margin-top: 8px; }
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.data th, table.data td { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: left; vertical-align: top; }
table.data th { color: var(--teal-dark); }
.table-wrap { overflow-x: auto; }
.status-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 13px; background: #fff; }
.status-card .detail { font-size: .85rem; color: var(--ink); line-height: 1.5; white-space: pre-wrap; }
.links-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .links-grid { grid-template-columns: 1fr 1fr; } }
.link-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px; text-decoration: none; color: var(--ink); background: #fff; }
.link-card strong { color: var(--teal-dark); display: block; }
.link-card span { font-size: .83rem; color: var(--muted); }
.footer { color: var(--muted); font-size: .8rem; line-height: 1.55; padding: 8px 2px; }
.modal { position: fixed; inset: 0; background: rgba(10, 40, 38, .55); display: flex; align-items: flex-start; justify-content: center; padding: 22px 12px; z-index: 50; overflow-y: auto; }
.modal-card { background: #fff; border-radius: 16px; padding: 20px; width: 100%; max-width: 520px; }
.chase-code { display: inline-block; background: #e6f4f1; border-radius: 6px; padding: 1px 7px; margin: 2px 2px 2px 0; font-size: .8rem; font-weight: 700; color: var(--teal-dark); }
/* Klaster 1: struktur dokumen per area (akordeon) */
.group-title { font-size: 1.12rem; margin: 20px 2px 10px; color: var(--teal-dark); }
.subgroup-title { font-size: .98rem; margin: 14px 2px 8px; color: var(--ink); }
.area { padding: 0; overflow: hidden; }
.area-head {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: none; border: none; padding: 14px 16px; cursor: pointer;
  text-align: left; color: var(--ink); font: inherit;
}
.area-head:hover { background: var(--bg); }
.area-title { font-weight: 700; flex: 1; }
.area-sum { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.area-caret { color: var(--teal); font-weight: 800; transition: transform .15s ease; }
.area.open .area-caret { transform: rotate(90deg); }
.area-body { padding: 2px 16px 16px; border-top: 1px solid var(--line); }
.area-body > .card, .area-body > .grid { margin: 14px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 11px; font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--ink);
}
.chip:hover { border-color: var(--teal); color: var(--teal-dark); }
.chip .cnt { color: var(--muted); }
.doc-link { color: var(--teal-dark); font-weight: 600; }
.empty { color: var(--muted); font-size: .88rem; padding: 8px 0; }
