/* ==========================================================================
   Gap Ewangi — tema terang: putih hangat, garis tipis, satu aksen mint.
   ========================================================================== */

:root {
  --bg: #f2eee4;
  --surface: #fbf9f3;
  --surface-2: #f7f3ea;
  --surface-3: #efe9dd;
  --line: #e5dfd1;
  --line-2: #d5cebd;
  --text: #2b2620;
  --text-2: #5d564b;
  --text-3: #7c7466;
  --mint: #0e8f65;
  --mint-dark: #0a7351;
  --mint-soft: #e7f2ec;
  --gold: #96681b;
  --rose: #a62f39;
  --iris: #5750a8;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Sora', 'Manrope', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --shadow: 0 1px 2px rgba(74, 58, 34, .05), 0 12px 30px -22px rgba(74, 58, 34, .28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.2; letter-spacing: -.02em; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--mint-dark); text-decoration: none; }
b, strong { font-weight: 700; }
::selection { background: rgba(15, 157, 110, .18); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- kerangka ---------- */
.shell { display: flex; min-height: 100vh; }
.rail {
  position: fixed; inset: 0 auto 0 0; width: 228px; z-index: 30;
  display: flex; flex-direction: column; gap: 22px; padding: 22px 14px 18px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); }
.brand-t { display: flex; flex-direction: column; line-height: 1.2; }
.brand-t b { font-family: var(--display); font-size: 14px; letter-spacing: -.01em; }
.brand-t b span { color: var(--mint); }
.brand-t small { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-top: 2px; }
.rnav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); font-weight: 700; padding: 4px 10px 5px; }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-3); }
.roles button {
  height: 27px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3);
  font-size: 10.5px; font-weight: 700; letter-spacing: -.01em; cursor: pointer; transition: background .12s, color .12s, box-shadow .12s; white-space: nowrap;
}
.roles button:hover { color: var(--text-2); }
.roles button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(74, 58, 34, .10); }
.roles-m { display: none; }
.rnav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 13px; font-weight: 600; transition: background .12s, color .12s;
}
.rnav a:hover { color: var(--text); background: var(--surface-3); }
.rnav a.on { color: var(--text); background: var(--mint-soft); box-shadow: inset 2px 0 0 var(--mint); }
.rnav a.on .ic { color: var(--mint); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.rail-ai {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px; cursor: pointer;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--text);
  text-align: left; transition: border-color .12s, background .12s;
}
.rail-ai:hover { border-color: var(--line-2); background: var(--surface-2); }
.rail-ai-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--mint-soft); color: var(--mint-dark); }
.rail-ai-t { display: flex; flex-direction: column; line-height: 1.2; }
.rail-ai-t b { font-size: 12px; }
.rail-ai-t small { font-size: 10.5px; color: var(--text-3); }
.rail-ver { font-size: 10.5px; color: var(--text-3); padding-left: 8px; }
.rail-akun { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); }
.rail-akun .ava { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--mint-soft); color: var(--mint-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; flex: none; }
.rail-akun-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.rail-akun-t b { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-akun-t small { font-size: 9px; color: var(--text-3); letter-spacing: .1em; text-transform: uppercase; }
.rail-keluar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text-3); cursor: pointer; flex: none; }
.rail-keluar:hover { color: var(--rose); border-color: #efd7d9; background: #f8eded; }
.rail-keluar .ic { width: 14px; height: 14px; }

.main { flex: 1; min-width: 0; margin-left: 228px; padding: 22px 26px 60px; }
.app { max-width: 1120px; margin: 0 auto; }
.mtop { display: none; }
.bnav { display: none; }

/* ---------- utilitas ---------- */
.dim { color: var(--text-2); }
.faint { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.hide { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hint { font-size: 11.8px; color: var(--text-3); line-height: 1.55; }
.loading { padding: 70px 0; text-align: center; color: var(--text-3); font-size: 13px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 13px; }
.page-head h1 { font-size: 21px; letter-spacing: -.03em; }
.page-head .sub { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; font-size: 12px; color: var(--text-3); }
.page-head .sub span { display: inline-flex; align-items: center; gap: 5px; }
.page-head .sub .ic { width: 13px; height: 13px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); margin-bottom: 10px; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--text-2); }
.crumbs .ic { width: 12px; height: 12px; transform: rotate(-90deg); opacity: .6; }
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 18px 0 9px; flex-wrap: wrap; }
.sec h2 { font-size: 16px; }
.sec h3 { font-size: 14px; }
.sec .side { font-size: 12px; color: var(--text-3); }
.eyebrow { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--mint-dark); }

/* ---------- tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 13px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; text-decoration: none;
}
.btn:hover { background: var(--surface-3); border-color: #c6beae; }
.btn .ic { width: 15px; height: 15px; }
.btn.primary { background: var(--text); border-color: var(--text); color: #fff; }
.btn.primary:hover { background: #26362c; border-color: #26362c; }
.btn.gold { background: #f8f1e2; border-color: #eadcbe; color: var(--gold); }
.btn.gold:hover { background: #f3e9d4; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { background: #f8eded; border-color: #efd7d9; color: var(--rose); }
.btn.danger:hover { background: #f4e2e3; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.sm .ic { width: 13px; height: 13px; }
.btn.icon { width: 36px; padding: 0; }
.btn:disabled { opacity: .5; cursor: progress; }

/* ---------- panel ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.panel-pad { padding: 12px; }
.panel-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-hd h3 { font-size: 13.5px; }
.panel-bd { padding: 12px; }
.panel-print::before { display: none; }
.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- banner ---------- */
.hero {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow);
}
.hero-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(15, 157, 110, .13), transparent 58%),
    radial-gradient(60% 100% at 0% 100%, rgba(169, 118, 31, .08), transparent 60%);
}
.hero-sky::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; opacity: .4;
  -webkit-mask-image: linear-gradient(105deg, transparent 10%, #000 65%);
  mask-image: linear-gradient(105deg, transparent 10%, #000 65%);
}
.hero-in { position: relative; z-index: 1; padding: 20px 22px 16px; }
.hero-copy { max-width: 560px; }
.hero h1 { font-size: clamp(20px, 2.4vw, 27px); letter-spacing: -.03em; margin: 8px 0 7px; }
.hero h1 em { font-style: normal; color: var(--mint); }
.hero p { margin: 0; color: var(--text-2); font-size: 12.5px; line-height: 1.55; max-width: 430px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.hero-foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 24px; margin: 0 22px; padding: 11px 0 14px; border-top: 1px solid var(--line); }
.hstat { display: flex; flex-direction: column; }
.hstat b { font-family: var(--display); font-size: 15px; letter-spacing: -.02em; }
.hstat span { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-top: 1px; }

/* ---------- kartu angka ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.kpi { padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.kpi .k-top { display: flex; align-items: center; gap: 5px; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.kpi .k-top .ic { width: 13px; height: 13px; }
.kpi b { display: block; font-family: var(--display); font-size: 17px; letter-spacing: -.03em; margin-top: 7px; }
.kpi b em { font-style: normal; font-size: 12px; color: var(--text-3); margin-left: 3px; letter-spacing: 0; }
.kpi small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.kpi.acc { border-color: #cbe4d7; background: linear-gradient(170deg, #eef7f1, #fbf9f3 70%); }
.kpi.acc b { color: var(--mint-dark); }
.kpi.acc .k-top .ic { color: var(--mint); }
.kpi.warn b { color: var(--gold); }
.kpi.danger b { color: var(--rose); }

/* ---------- daftar proyek ---------- */
.plist { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.pcard {
  display: flex; flex-direction: column; gap: 9px; padding: 13px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow);
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.pcard:hover { border-color: #cdc5b5; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(74, 58, 34, .06), 0 16px 34px -26px rgba(74, 58, 34, .32); }
.pcard h3 { font-size: 14px; line-height: 1.35; }
.pcard .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-3); }
.pcard .meta span { display: inline-flex; align-items: center; gap: 5px; }
.pcard .meta .ic { width: 12px; height: 12px; }
.pcard .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding-top: 9px; border-top: 1px solid var(--line); margin-top: auto; }
.pcard .val { font-family: var(--display); font-size: 16px; letter-spacing: -.03em; }
.pcard .val-lab { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.pcard .go { color: var(--text-3); }
.pcard:hover .go { color: var(--mint); }

/* ---------- tab ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  display: inline-flex; align-items: center; gap: 5px; padding: 8px 10px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: transparent;
  color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--mint); }
.tabs .ic { width: 15px; height: 15px; }
.tabs .cnt { min-width: 18px; padding: 0 5px; border-radius: 99px; font-size: 10px; font-weight: 700; background: var(--surface-3); color: var(--text-2); }
.tabs button.on .cnt { background: var(--mint-soft); color: var(--mint-dark); }

/* ---------- pil ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.ok { color: #0b7f59; background: #e9f4ee; border-color: #cbe4d7; }
.pill.warn { color: #8a5f13; background: #f8f1e2; border-color: #eadcbe; }
.pill.bad { color: #a3242e; background: #f8eded; border-color: #efd7d9; }
.pill.ai { color: #4a43a0; background: #efedf7; border-color: #dad6ec; }
.pill.plain { color: var(--text-2); background: var(--surface-3); border-color: var(--line); }
.pill.plain::before { display: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 5px; font-family: var(--mono); font-size: 10.5px; color: var(--text-2); background: var(--surface-3); border: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer; transition: .12s; }
.chip:hover { border-color: #c2baa9; color: var(--text); }
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-bottom: 9px; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 170px; }
.search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 14px; height: 14px; }
.search input { padding-left: 32px; }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.input {
  width: 100%; height: 36px; padding: 0 11px; border-radius: var(--r-sm); font-size: 13px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text); outline: none; transition: border-color .12s, box-shadow .12s;
}
.input::placeholder { color: #a89f91; }
.input:hover { border-color: #c2baa9; }
.input:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(15, 157, 110, .12); }
.input.sm { height: 30px; font-size: 12.5px; padding: 0 9px; }
textarea.input { height: auto; padding: 9px 11px; resize: vertical; min-height: 76px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b968f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 15px; padding-right: 30px; }
.grid-form { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-form .full { grid-column: 1 / -1; }
.switch { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 99px; background: #e2dbcd; border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: .15s; flex: none; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(74, 58, 34, .22); transition: .15s var(--ease); }
.switch input:checked { background: var(--mint); border-color: var(--mint); }
.switch input:checked::after { left: 18px; }

/* ---------- tabel ---------- */
.table-card { overflow: hidden; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 7px 10px; font-size: 9px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3); background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover { background: #f8f5ee; }
.tbl tbody tr.pick { cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot td { padding: 11px 12px; font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line-2); border-bottom: 0; }
.tbl .right, .tbl th.right { text-align: right; }
.tbl .center, .tbl th.center { text-align: center; }
.tbl .uraian { font-weight: 600; font-size: 13px; line-height: 1.35; }
.tbl .uraian small { display: block; font-weight: 400; color: var(--text-3); font-size: 11px; margin-top: 2px; }
.clamp1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; padding: 18px; background: rgba(43, 38, 32, .30); backdrop-filter: blur(3px); display: flex; justify-content: flex-end; align-items: flex-start; animation: fade .14s var(--ease); }
.drawer {
  width: min(720px, 100%); height: auto; max-height: calc(100vh - 36px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: 0 30px 80px -30px rgba(74, 58, 34, .42); animation: slidein .2s var(--ease); overflow: hidden;
}
.drawer.wide { width: min(880px, 100%); }
.drawer-hd { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 14px; border-bottom: 1px solid var(--line); }
.drawer-hd h3 { font-size: 15px; flex: 1; }
.drawer-hd .sub { display: block; font-family: var(--sans); font-weight: 500; font-size: 11.5px; color: var(--text-3); margin-top: 4px; letter-spacing: 0; }
.drawer-bd { padding: 16px 18px 24px; overflow-y: auto; flex: 1; min-height: 0; }
.drawer-ft { display: flex; gap: 8px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.x { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--text-2); cursor: pointer; flex: none; }
.x:hover { background: var(--surface-3); color: var(--text); }
@keyframes fade { from { opacity: 0; } }
@keyframes slidein { from { transform: translateX(20px); opacity: .6; } }

/* ---------- opsi AHSP ---------- */
.opsi { display: flex; flex-direction: column; gap: 6px; }
.opsi button {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 11px; text-align: left; cursor: pointer;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); transition: .12s;
}
.opsi button:hover { border-color: var(--line-2); background: var(--surface-2); }
.opsi button.picked { border-color: #b7e3d1; background: var(--mint-soft); }
.opsi .isi { flex: 1; min-width: 0; }
.opsi .isi b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.opsi .isi small { color: var(--text-3); font-size: 11px; }
.opsi .score { font-family: var(--display); font-size: 11.5px; font-weight: 600; color: var(--mint-dark); }

/* ---------- tabel kecil ---------- */
.subtabel { width: 100%; border-collapse: collapse; font-size: 12.3px; }
.subtabel th { text-align: left; padding: 5px 8px; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line); }
.subtabel td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.subtabel tr:last-child td { border-bottom: 0; }
.koef { font-family: var(--mono); font-size: 11px; color: var(--text-3); }

/* ---------- detail item ---------- */
.dgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.notice { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); font-size: 12.3px; line-height: 1.55; border: 1px solid; }
.notice .ic { width: 15px; height: 15px; margin-top: 1px; }
.notice.info { color: #1f5c86; background: #eef3f7; border-color: #d6e4ef; }
.notice.warn { color: #8a5f13; background: #f8f1e2; border-color: #eadcbe; }
.notice.bad { color: #a3242e; background: #f8eded; border-color: #efd7d9; }
.notice.ok { color: #0b7f59; background: #e9f4ee; border-color: #cbe4d7; }
.notice ul { margin: 4px 0 0; padding-left: 16px; }
.sect-label { display: flex; align-items: center; gap: 8px; font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 8px; }
.sect-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- kosong ---------- */
.empty { text-align: center; padding: 46px 20px; }
.empty .em-ic { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-3); }
.empty .em-ic .ic { width: 21px; height: 21px; }
.empty b { display: block; font-family: var(--display); font-size: 14.5px; margin-bottom: 5px; }
.empty p { margin: 0 auto 14px; max-width: 380px; font-size: 12.5px; color: var(--text-3); }

/* ---------- chat ---------- */
.chat-shell {
  position: fixed; right: 22px; bottom: 22px; z-index: 70; width: min(392px, calc(100vw - 28px)); height: min(580px, calc(100vh - 52px));
  display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 30px 80px -30px rgba(74, 58, 34, .42); animation: slidein .2s var(--ease);
}
.chat-hd { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-hd .av { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--mint-soft); color: var(--mint-dark); }
.chat-hd b { font-family: var(--display); font-size: 13px; display: block; }
.chat-hd small { font-size: 10.5px; color: var(--text-3); }
.chat-bd { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; background: var(--surface-2); }
.bubble { max-width: 92%; padding: 10px 12px; border-radius: var(--r-md); font-size: 12.6px; line-height: 1.58; white-space: pre-wrap; }
.bubble.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); }
.bubble.user { align-self: flex-end; background: var(--text); color: #fff; font-weight: 600; }
.bubble code { font-family: var(--mono); font-size: 11px; background: rgba(74, 58, 34, .08); padding: 1px 4px; border-radius: 4px; }
.chat-ft { padding: 10px; border-top: 1px solid var(--line); display: flex; gap: 7px; align-items: flex-end; }
.chat-ft textarea { flex: 1; resize: none; min-height: 38px; max-height: 100px; }
.saran { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.saran button { font-size: 11.5px; padding: 7px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; text-align: left; }
.saran button:hover { border-color: var(--line-2); color: var(--text); }
.dots { display: inline-flex; gap: 4px; align-items: center; height: 15px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); animation: blink 1.1s infinite; }
.dots i:nth-child(2) { animation-delay: .16s; }
.dots i:nth-child(3) { animation-delay: .32s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 14px); opacity: 0;
  pointer-events: none; padding: 9px 16px; border-radius: var(--r-sm); font-size: 12.5px; font-weight: 600;
  max-width: min(92vw, 440px); text-align: center; color: #fff; background: #2b2620;
  border: 1px solid #2b2620; box-shadow: 0 18px 40px -18px rgba(74, 58, 34, .55); transition: .18s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #8f2630; border-color: #8f2630; }

/* ---------- katalog ---------- */
.kgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.kitem { padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); transition: border-color .12s; }
.kitem:hover { border-color: #cdc5b5; }
.kitem .krow { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.kitem h4 { font-size: 13px; font-weight: 600; line-height: 1.35; margin: 8px 0 0; }
.kitem .kstats { display: flex; gap: 12px; font-size: 10.5px; color: var(--text-3); margin-top: 7px; }
.kitem .kstats b { color: var(--text-2); font-weight: 700; }

/* ---------- misc ---------- */
.meter { height: 4px; border-radius: 99px; background: #ece7db; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--mint); }
.meter.gold > i { background: var(--gold); }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--text-3); }
.kv .v { font-weight: 600; text-align: right; }
.checklist { display: flex; flex-direction: column; gap: 9px; }
.checklist label { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.checklist .box { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line-2); flex: none; margin-top: 1px; display: grid; place-items: center; color: transparent; background: var(--surface); }
.checklist input { display: none; }
.checklist input:checked + .box { background: var(--mint); border-color: var(--mint); color: #fff; }
.checklist input:checked ~ span { color: var(--text); }
.callout { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; background: var(--surface); }

/* ---------- responsif ---------- */
@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .rail { display: none; }
  .main { margin-left: 0; padding: 16px 14px 92px; }
  .mtop { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
  .mtop .mk { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); }
  .mtop .mt { display: flex; flex-direction: column; line-height: 1.2; }
  .mtop .mt b { font-family: var(--display); font-size: 13px; }
  .mtop .mt b span { color: var(--mint); }
  .mtop .mt small { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
  .roles-m { display: grid; margin-bottom: 12px; }
  .bnav {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 50;
    padding: 5px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: rgba(251, 249, 243, .94);
    backdrop-filter: blur(14px); box-shadow: 0 16px 40px -20px rgba(74, 58, 34, .32);
  }
  .bnav a, .bnav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; border-radius: 7px; border: 0; background: transparent; color: var(--text-3); font-size: 10px; font-weight: 700; text-decoration: none; cursor: pointer; }
  .bnav a.on, .bnav button.on { color: var(--mint-dark); background: var(--mint-soft); }
  .bnav .ic { width: 18px; height: 18px; }
  .hero-in { padding: 22px 18px 18px; }
  .hero-foot { margin: 0 18px; gap: 22px; }
  .split { grid-template-columns: 1fr; }
  .chat-shell { right: 0; left: 0; bottom: 0; width: 100%; height: 88vh; border-radius: var(--r-md) var(--r-md) 0 0; }
}
@media (max-width: 860px) {
  .scrim { padding: 0; align-items: flex-end; }
  .drawer, .drawer.wide { width: 100%; max-height: 92vh; border-left: 0; border-right: 0; border-bottom: 0; border-radius: var(--r-md) var(--r-md) 0 0; animation: fade .16s var(--ease); }
  .drawer-hd { padding: 14px 16px 12px; }
  .drawer-bd { padding: 14px 16px 20px; }
  .drawer-ft { padding: 10px 16px; }
}
@media (max-width: 780px) {
  .toolbar .search { flex-basis: 100%; order: 3; }
  .toolbar .chips { order: 1; width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .toolbar .chips::-webkit-scrollbar { display: none; }
  .toolbar > .btn { order: 2; margin-left: auto; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tfoot, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tbody tr { border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 8px; background: var(--surface); overflow: hidden; }
  .tbl tbody tr:hover { background: var(--surface); }
  .tbl tbody tr:last-child td { border-bottom: 0; }
  .tbl td { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border: 0; text-align: right; font-size: 12.5px; }
  .tbl td::before { content: attr(data-l); color: var(--text-3); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: left; flex: none; }
  .tbl td.utama { display: block; text-align: left; padding: 11px 12px 7px; background: var(--surface-2); }
  .tbl td.utama::before { display: none; }
  .tbl td[data-l="No"] { display: none; }
  .tbl tfoot tr { border: 0; background: transparent; }
  .tbl tfoot td { border: 0; padding: 5px 2px; }
  .tbl-wrap { overflow: visible; }
  .dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-form { grid-template-columns: 1fr; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head h1 { font-size: 20px; }
  .kpi b { font-size: 18px; }
  .plist { grid-template-columns: 1fr; }
  .kgrid { grid-template-columns: 1fr; }
  .hero-foot { padding-top: 14px; }
}
@media (max-width: 480px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 12.5px; }
  .hstat:nth-child(3) { display: none; }
  .tabs button { padding: 8px 9px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d9d2c3; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #c2baa9; }

/* ---------- panduan langkah ---------- */
.steps { display: flex; flex-direction: column; gap: 8px; }
.step {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow);
}
.step-no {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: var(--surface-3); color: var(--text-2); font-family: var(--display); font-size: 11.5px; font-weight: 700;
}
.step-txt { flex: 1; min-width: 0; }
.step-txt b { display: block; font-size: 13px; }
.step-txt p { margin: 2px 0 0; font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.step-syarat { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.tab-note { display: flex; align-items: flex-start; gap: 7px; margin: 0 0 10px; font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.tab-note .ic { width: 14px; height: 14px; margin-top: 1px; flex: none; color: var(--mint); }
@media (max-width: 620px) {
  .step { flex-wrap: wrap; }
  .step-txt { flex-basis: calc(100% - 40px); }
  .step .btn, .step-syarat { margin-left: 40px; }
}
