/* ARESTA — tema hijau hutan & emas (selaras GeoPalm Dashboard PTPN IV) */
:root {
  color-scheme: light;
  --page: #f6f5f0;
  --surface: #ffffff;
  --surface-2: #f1f0e9;
  --ink: #0f1f19;
  --ink-2: #4a5852;
  --muted: #84908a;
  --line: #e4e3db;
  --axis: #c4c8c0;
  --ring: rgba(8, 40, 32, .09);
  --accent: #13563f;
  --accent-ink: #ffffff;
  --accent-soft: #e2efe8;
  --forest: #082820;
  --forest-2: #0d3b2e;
  --gold: #d9a85b;
  --gold-2: #f3dfb8;
  --gold-tx: #e8c98a;
  --gold-ink: #8a5f17;
  --side: #082820;
  --side-ink: #cfe0d6;
  --up: #006300;
  --down: #c03030;
  --warn-bg: #fff4d6;
  --warn-ink: #6b4a00;
  --s-TM: #2a78d6; --s-TBM: #eb6834; --s-ATTP: #1baf7a; --s-TU: #eda100; --s-TB: #e87ba4; --s-TK: #008300;
  --s-NA: #b9b8b0;
  --div-pos: #2a78d6; --div-neg: #e34948;
  --shadow: 0 1px 2px rgba(8,40,32,.05), 0 6px 20px rgba(8,40,32,.06);
  --shadow-up: 0 2px 4px rgba(8,40,32,.06), 0 14px 34px rgba(8,40,32,.12);
  --ease: cubic-bezier(.2, .75, .2, 1);
  --f-head: "Sora", "Plus Jakarta Sans", system-ui, "Segoe UI", sans-serif;
  --f-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #06120e; --surface: #0e1d17; --surface-2: #15281f;
    --ink: #ecf1ee; --ink-2: #b4c1ba; --muted: #7d8c85; --line: #1f3329; --axis: #34483e;
    --ring: rgba(255,255,255,.07); --accent: #3fae7c; --accent-ink: #04140d; --accent-soft: #143224;
    --gold-ink: #e8c98a; --side: #041410; --side-ink: #c4d8cc; --up: #0ca30c; --down: #e66767;
    --warn-bg: #3a2e0c; --warn-ink: #f3d78a;
    --s-TM: #3987e5; --s-TBM: #d95926; --s-ATTP: #199e70; --s-TU: #c98500; --s-TB: #d55181; --s-TK: #0ca30c;
    --s-NA: #5d5c57; --div-pos: #3987e5; --div-neg: #e66767;
    --shadow: 0 1px 0 rgba(255,255,255,.03) inset; --shadow-up: 0 12px 34px rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #06120e; --surface: #0e1d17; --surface-2: #15281f;
  --ink: #ecf1ee; --ink-2: #b4c1ba; --muted: #7d8c85; --line: #1f3329; --axis: #34483e;
  --ring: rgba(255,255,255,.07); --accent: #3fae7c; --accent-ink: #04140d; --accent-soft: #143224;
  --gold-ink: #e8c98a; --side: #041410; --side-ink: #c4d8cc; --up: #0ca30c; --down: #e66767;
  --warn-bg: #3a2e0c; --warn-ink: #f3d78a;
  --s-TM: #3987e5; --s-TBM: #d95926; --s-ATTP: #199e70; --s-TU: #c98500; --s-TB: #d55181; --s-TK: #0ca30c;
  --s-NA: #5d5c57; --div-pos: #3987e5; --div-neg: #e66767;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset; --shadow-up: 0 12px 34px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--page); color: var(--ink); font: 14px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); cursor: pointer; text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--f-head); letter-spacing: -.01em; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
::selection { background: var(--gold-2); color: var(--forest); }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.side { width: 240px; flex: none; color: var(--side-ink); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(217,168,91,.16), transparent 60%),
    radial-gradient(90% 50% at 100% 100%, rgba(31,107,69,.35), transparent 70%),
    linear-gradient(180deg, var(--forest-2) 0%, var(--side) 100%); }
.side::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 14px); }
.brand { display: flex; gap: 11px; align-items: center; padding: 20px 16px 16px; position: relative; z-index: 1; }
.brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(232,201,138,.18), 0 6px 16px rgba(0,0,0,.3); animation: softFloat 5s ease-in-out infinite; }
.brand b { display: block; font-family: var(--f-head); font-size: 19px; font-weight: 800; letter-spacing: .06em; color: #fff; }
.brand small { font-size: 11px; opacity: .75; letter-spacing: .02em; }
nav { display: flex; flex-direction: column; padding: 8px 10px; gap: 3px; position: relative; z-index: 1; }
nav a { color: var(--side-ink); text-decoration: none; padding: 10px 12px; border-radius: 12px; display: flex; gap: 11px; align-items: center;
  position: relative; transition: background .25s var(--ease), color .25s, transform .25s var(--ease); font-weight: 500; }
nav a:hover { background: rgba(255,255,255,.07); transform: translateX(3px); color: #fff; }
nav a.on { background: linear-gradient(90deg, rgba(232,201,138,.20), rgba(255,255,255,.05)); color: #fff; font-weight: 650; }
nav a.on::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); animation: barIn .4s var(--ease); }
nav .ic { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; font-size: 13px; opacity: .9;
  background: rgba(255,255,255,.06); transition: background .25s, color .25s; }
nav a.on .ic { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--forest); opacity: 1; }
.nbadge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 800; color: var(--forest); background: linear-gradient(135deg, var(--gold-2), var(--gold)); animation: popIn .3s var(--ease); }
.side-foot { margin-top: auto; padding: 14px 18px; font-size: 11.5px; opacity: .7; line-height: 1.5; position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.08); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--page) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  padding: 12px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.top h1 { font-size: 20px; font-weight: 750; margin: 0; flex: 1; min-width: 140px; }
.top h1.swap { animation: titleIn .45s var(--ease); }
.top-ctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.burger { display: none; border: 0; background: none; font-size: 20px; cursor: pointer; }
.ctl { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.ctl input, .ctl select, .inp { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 10px; min-height: 36px;
  transition: border-color .2s, box-shadow .2s; }
.ctl input:focus, .ctl select:focus, .inp:focus, .f input:focus, .f select:focus, .f textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 13px; cursor: pointer; color: var(--ink-2); border-radius: 999px;
  transition: background .3s var(--ease), color .3s, box-shadow .3s; font-weight: 500; }
.seg button:hover:not(.on) { background: var(--surface-2); color: var(--ink); }
.seg button.on { background: linear-gradient(135deg, var(--accent), var(--forest-2)); color: #fff; font-weight: 650; box-shadow: 0 2px 8px rgba(13,59,46,.3); }
.user { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px; cursor: pointer; max-width: 260px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: border-color .2s, box-shadow .2s; }
.user:hover { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,168,91,.18); }
.top-act { display: flex; gap: 8px; align-items: center; }
.tema span[aria-hidden] { display: inline-block; transition: transform .5s var(--ease); }
.tema:hover span[aria-hidden] { transform: rotate(-25deg) scale(1.15); }
.tema-menu { position: fixed; z-index: 120; width: 250px; background: var(--surface); border: 1px solid var(--ring); border-radius: 16px; padding: 6px;
  box-shadow: 0 18px 44px rgba(4,20,16,.22); animation: popIn .22s var(--ease); transform-origin: top right; }
.tm-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.tema-menu button { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 11px; cursor: pointer;
  transition: background .2s; }
.tema-menu button:hover { background: var(--surface-2); }
.tema-menu button.on { background: var(--accent-soft); }
.tema-menu b { display: block; font-weight: 650; font-size: 13.5px; }
.tema-menu small { display: block; font-size: 11.5px; color: var(--ink-2); }
.tm-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; font-size: 15px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--forest); }
.tm-ok { margin-left: auto; color: var(--accent); font-weight: 700; }
/* pergantian tema: warna berpindah halus */
.tema-ganti, .tema-ganti * { transition: background-color .4s ease, color .4s ease, border-color .4s ease, fill .4s ease !important; }
.asof { background: var(--warn-bg); color: var(--warn-ink); padding: 8px 24px; font-size: 13px; animation: slideDown .4s var(--ease); }
.view { padding: 22px 24px 52px; max-width: 1500px; width: 100%; }

/* ---------- hero dashboard ---------- */
.hero { position: relative; overflow: hidden; border-radius: 20px; color: #fff; margin-bottom: 16px; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.5fr) auto 170px; gap: 24px; align-items: center; padding: 26px 30px;
  background: linear-gradient(125deg, #0d3b2e 0%, #082820 55%, #0b2f24 100%); box-shadow: 0 10px 30px rgba(8,40,32,.25); }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg i { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .55; }
.hero-bg .b1 { width: 360px; height: 360px; left: -80px; top: -160px; background: #1f6b45; animation: floatA 14s ease-in-out infinite; }
.hero-bg .b2 { width: 300px; height: 300px; right: 12%; bottom: -170px; background: rgba(217,168,91,.55); animation: floatB 17s ease-in-out infinite; }
.hero-bg::after { content: ""; position: absolute; inset: 0; opacity: .08;
  background-image: linear-gradient(rgba(255,255,255,.7) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.7) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent 0%, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 60%); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 650; letter-spacing: .04em;
  padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #e6efe9; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; position: relative; flex: none; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulseDot 1.8s ease-in-out infinite; }
.hero h2 { font-size: clamp(22px, 2.4vw, 34px); font-weight: 800; line-height: 1.1; margin: 12px 0 8px; color: #fff; }
.gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; color: rgba(255,255,255,.72); max-width: 620px; font-size: 13.5px; }
.hero-st { display: grid; grid-template-columns: repeat(3, auto); gap: 10px 26px; }
.hero-st div { border-left: 2px solid rgba(232,201,138,.45); padding-left: 12px; }
.hero-st b { display: block; font-family: var(--f-head); font-size: 24px; font-weight: 750; color: var(--gold-tx); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-st small { font-size: 11.5px; color: rgba(255,255,255,.7); }
.radar { position: relative; width: 150px; height: 150px; justify-self: end; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(232,201,138,.45); }
.radar i:nth-child(1) { animation: spinCW 26s linear infinite; }
.radar i:nth-child(2) { inset: 18px; border-style: solid; border-color: rgba(255,255,255,.14); animation: spinCCW 18s linear infinite; }
.radar i:nth-child(3) { inset: 36px; border: 0; background:
    repeating-linear-gradient(0deg, rgba(232,201,138,.0) 0 9px, rgba(232,201,138,.22) 9px 10px),
    repeating-linear-gradient(90deg, rgba(232,201,138,.0) 0 9px, rgba(232,201,138,.22) 9px 10px),
    radial-gradient(circle, #1f6b45 0%, #0d3b2e 70%);
  box-shadow: 0 0 0 1px rgba(232,201,138,.35), 0 0 30px rgba(52,211,153,.25); animation: breathe 6s ease-in-out infinite; }
.radar .sweep { position: absolute; inset: 36px; border-radius: 50%; overflow: hidden; }
.radar .sweep::before { content: ""; position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(232,201,138,.55), transparent 25%); animation: spinCW 4s linear infinite; }
.radar .ping { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-tx); left: 62%; top: 38%; box-shadow: 0 0 10px var(--gold); }
.radar .ping::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--gold-tx); animation: radarPing 2.4s ease-out infinite; }
.radar .ping.p2 { left: 34%; top: 60%; background: #34d399; box-shadow: 0 0 10px #34d399; }
.radar .ping.p2::after { border-color: #34d399; animation-delay: 1.2s; }

/* ---------- komponen ---------- */
.card { background: var(--surface); border: 1px solid var(--ring); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); min-width: 0;
  position: relative; transition: box-shadow .35s var(--ease), transform .35s var(--ease); }
.card::before { content: ""; position: absolute; left: 20px; right: 20px; top: -1px; height: 3px; border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold)); opacity: .0; transition: opacity .35s; }
.card:hover { box-shadow: var(--shadow-up); }
.card:hover::before { opacity: .9; }
.card h2 { font-size: 15.5px; font-weight: 700; margin: 0 0 2px; }
.card .sub { color: var(--ink-2); font-size: 12.5px; margin: 0 0 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g32 { grid-template-columns: 3fr 2fr; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.sp { flex: 1; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 14px; cursor: pointer; min-height: 36px; white-space: nowrap;
  font-weight: 550; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s, background .2s; position: relative; overflow: hidden; }
.btn:hover:not(:disabled) { border-color: var(--axis); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(8,40,32,.10); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn.pri { background: linear-gradient(135deg, var(--accent), var(--forest-2)); border-color: transparent; color: #fff; font-weight: 650; }
.btn.gold, #goSt, #goLainK { background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold) 100%); border-color: transparent; color: #082820; font-weight: 700; }
.btn.pri::after, .btn.gold::after, #goSt::after, #goLainK::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: translateX(-130%); }
.btn.pri:hover::after, .btn.gold:hover::after, #goSt:hover::after, #goLainK:hover::after { animation: shimmer .9s var(--ease); }
.btn.dng { color: var(--down); }
.btn.sm { padding: 3px 10px; min-height: 28px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.note { font-size: 12.5px; color: var(--ink-2); }
.badge-ref { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; }
.empty { color: var(--muted); padding: 24px; text-align: center; }

/* stat tile */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { --tc: var(--gold); background: var(--surface); border: 1px solid var(--ring); border-radius: 16px; padding: 14px 16px 13px; box-shadow: var(--shadow);
  position: relative; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--tc), color-mix(in srgb, var(--tc) 15%, transparent)); }
.tile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--tc) 18%, transparent), transparent 70%); transition: transform .5s var(--ease); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); }
.tile:hover::after { transform: scale(1.6); }
.tile .k { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; font-weight: 550; }
.tile .v { font-family: var(--f-head); font-size: clamp(20px, 1.55vw, 26px); font-weight: 750; margin: 3px 0 0; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  display: flex; flex-wrap: wrap; align-items: baseline; }
.tile .v small { font-family: var(--f-body); font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-left: 4px; letter-spacing: 0; }
.tile .d { font-size: 12px; color: var(--muted); }
.up { color: var(--up); } .down { color: var(--down); }

/* tabel */
.tw { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; }
thead th { position: sticky; top: 0; background: var(--surface-2); font-weight: 650; font-size: 12px; color: var(--ink-2); z-index: 1; white-space: nowrap; }
tbody tr td { transition: background .18s; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
tr.click { cursor: pointer; }
tr.click:hover td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
th.sort { cursor: pointer; user-select: none; }
th.sort.asc::after { content: " ▲"; font-size: 9px; } th.sort.desc::after { content: " ▼"; font-size: 9px; }
tfoot td { font-weight: 700; background: var(--surface-2); }

/* areal statement */
.as { font-size: 12.5px; }
.as th, .as td { padding: 4px 7px; border: 1px solid var(--line); }
.as thead th { text-align: center; white-space: normal; min-width: 64px; line-height: 1.2; background: var(--forest-2); color: #eef5f1; border-color: #1b4a3b; }
.as td.lbl { white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 230px; }
.as tr.h td { font-weight: 700; background: var(--surface-2); }
.as tr.h td.lbl { background: var(--surface-2); }
.as tr.s td { font-weight: 650; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.as tr.s td.lbl { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.as tr.t td { font-weight: 750; background: color-mix(in srgb, var(--gold) 20%, var(--surface)); }
.as tr.t td.lbl { background: color-mix(in srgb, var(--gold) 20%, var(--surface)); }
.as td.c { cursor: pointer; }
.as td.c:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.as td.tot { font-weight: 650; }
.as .tt { display: inline-block; width: 44px; color: var(--ink-2); }
.as .um { display: inline-block; width: 30px; color: var(--muted); text-align: right; }
.as .z { color: var(--muted); }
.as .pos { color: var(--up); } .as .neg { color: var(--down); }
.as-sec { font-weight: 700; font-size: 13px; margin: 0 0 6px; }

/* chart */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--f-body); }
.chart .lbl-ink { fill: var(--ink-2); }
.chart .grid line { stroke: var(--line); }
.chart .base { stroke: var(--axis); }
.chart .gx, .chart .gy { transition: opacity .2s; }
.chart svg:hover .gx, .chart svg:hover .gy { opacity: .55; }
.chart svg .gx.hov, .chart svg .gy.hov { opacity: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); margin: 0 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.cbar { display: flex; gap: 2px; height: 22px; margin-bottom: 10px; }
.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--ring);
  box-shadow: 0 10px 30px rgba(8,40,32,.22); border-radius: 12px; padding: 9px 11px; font-size: 12.5px; min-width: 150px; animation: popIn .15s var(--ease); }
.tip b { display: block; margin-bottom: 4px; font-family: var(--f-head); }
.tip .r { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.tip .r span:first-child { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); }

/* drawer & modal */
.drawer-bg, .modal-bg { position: fixed; inset: 0; background: rgba(4,20,16,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 50; animation: fadeIn .25s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 60;
  display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(4,20,16,.25); animation: slideIn .38s var(--ease); }
.dr-head { padding: 18px 18px 10px; border-bottom: 1px solid var(--line); }
.dr-head h3 { margin: 0; font-size: 18px; }
.dr-body { padding: 14px 18px; overflow: auto; flex: 1; }
.dr-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.x { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink-2); float: right; line-height: 1; width: 32px; height: 32px; border-radius: 50%;
  transition: background .2s, transform .3s var(--ease); }
.x:hover { background: var(--surface-2); transform: rotate(90deg); }
.tabs { display: flex; gap: 4px; margin-top: 10px; }
.tabs button { border: 0; background: none; padding: 7px 11px; border-bottom: 2px solid transparent; cursor: pointer; color: var(--ink-2); transition: color .2s, border-color .3s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { border-color: var(--gold); color: var(--ink); font-weight: 650; }
.modal-bg { display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 18px; width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 20px 22px; box-shadow: 0 24px 60px rgba(4,20,16,.35);
  animation: popIn .3s var(--ease); }
.modal.wide { width: min(980px, 100%); }
.modal h3 { margin: 0 0 10px; }
.fg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.fg .full { grid-column: 1 / -1; }
.f label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 3px; font-weight: 550; }
.f input, .f select, .f textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; transition: border-color .2s, box-shadow .2s; }
.f textarea { min-height: 60px; resize: vertical; }
.f .hint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.f.req label::after { content: " *"; color: var(--down); }
.box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.box h4 { margin: 0 0 8px; font-size: 13px; }
.luas-now { font-family: var(--f-head); font-size: 26px; font-weight: 750; }
.mut { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.mut .seg button { padding: 7px 12px; }
.mut input { width: 130px; }
.diff { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 13px; margin-top: 10px; animation: fadeUp .3s var(--ease); }
.diff div { display: flex; gap: 8px; } .diff s { color: var(--muted); }
.ev { border-left: 2px solid var(--line); padding: 6px 0 9px 14px; margin-left: 4px; position: relative; animation: fadeUp .45s var(--ease) both; }
.ev:nth-child(2) { animation-delay: .06s; } .ev:nth-child(3) { animation-delay: .12s; } .ev:nth-child(4) { animation-delay: .18s; }
.ev:nth-child(5) { animation-delay: .24s; } .ev:nth-child(6) { animation-delay: .3s; }
.ev::before { content: ""; position: absolute; left: -6px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }
.ev:first-child::before { background: var(--gold); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px rgba(217,168,91,.5); }
.ev.batal { opacity: .55; }
.ev .when { font-size: 12px; color: var(--muted); }
.ev .what { font-size: 13px; }
.chg { font-size: 12.5px; color: var(--ink-2); }
.chg s { color: var(--muted); }
.err { color: var(--down); font-size: 13px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--forest-2); color: #fff; padding: 11px 18px 11px 16px; border-radius: 14px; z-index: 200;
  font-size: 13.5px; max-width: 90vw; box-shadow: 0 12px 30px rgba(4,20,16,.35); border-left: 4px solid var(--gold); animation: toastIn .4s var(--ease); }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }

/* login */
.login { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; overflow: hidden; isolation: isolate;
  background: linear-gradient(140deg, #0d3b2e 0%, #082820 60%, #061d17 100%); }
.login::before, .login::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); z-index: -1; }
.login::before { width: 520px; height: 520px; left: -140px; top: -160px; background: #1f6b45; opacity: .6; animation: floatA 16s ease-in-out infinite; }
.login::after { width: 440px; height: 440px; right: -120px; bottom: -140px; background: rgba(217,168,91,.5); animation: floatB 19s ease-in-out infinite; }
.login-box { background: color-mix(in srgb, var(--surface) 94%, transparent); border-radius: 22px; padding: 28px 28px 22px; width: min(390px, 100%);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(232,201,138,.25); animation: riseIn .7s var(--ease) both; position: relative; }
.login-box::before { content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.login-box .f { margin-bottom: 12px; }
.login-box .f input { min-height: 42px; }
.login-box .btn.pri { min-height: 44px; font-size: 15px; }
.brand-l { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.brand-l img { width: 60px; height: 60px; object-fit: contain; border-radius: 50%; box-shadow: 0 8px 20px rgba(8,40,32,.25); animation: softFloat 5s ease-in-out infinite; }
.brand-l b { display: block; font-family: var(--f-head); font-size: 24px; font-weight: 800; letter-spacing: .06em; }
.brand-l small { color: var(--ink-2); }
.ro-note { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }

/* ---------- animasi ---------- */
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(30px) scale(.97); } }
@keyframes slideIn { from { transform: translateX(100%); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-100%); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } }
@keyframes titleIn { from { opacity: 0; transform: translateX(-10px); } }
@keyframes barIn { from { transform: scaleY(0); } }
@keyframes growX { from { transform: scaleX(0); } }
@keyframes growY { from { transform: scaleY(0); } }
@keyframes shimmer { from { transform: translateX(-130%); } to { transform: translateX(260%); } }
@keyframes pulseDot { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(2.4); opacity: 0; } }
@keyframes softFloat { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }
@keyframes floatA { 0%, 100% { transform: none; } 50% { transform: translate(60px, 40px) scale(1.1); } }
@keyframes floatB { 0%, 100% { transform: none; } 50% { transform: translate(-50px, -30px) scale(1.12); } }
@keyframes spinCW { to { transform: rotate(360deg); } }
@keyframes spinCCW { to { transform: rotate(-360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes radarPing { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }

/* masuk halaman: anak langsung #view muncul bergiliran; yang di bawah layar muncul saat di-scroll */
.view.enter > *:not(.rv) { animation: fadeUp .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.view.enter .tiles > * { animation: fadeUp .55s var(--ease) both; animation-delay: calc(120ms + var(--i, 0) * 60ms); }
.view > .rv { opacity: 0; transform: translateY(24px); }
.view > .rv.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease), box-shadow .35s var(--ease); }
/* grafik tumbuh dari sumbu */
.view.enter .gx { transform-box: fill-box; transform-origin: left center; animation: growX .9s var(--ease) both; animation-delay: calc(200ms + var(--i, 0) * 45ms); }
.view.enter .gy { transform-box: fill-box; transform-origin: center bottom; animation: growY .8s var(--ease) both; animation-delay: calc(150ms + var(--i, 0) * 16ms); }
.view.enter .vl { animation: fadeIn .5s ease both; animation-delay: calc(700ms + var(--i, 0) * 45ms); }
.view.enter .cbar > * { transform-origin: left center; animation: growX .9s var(--ease) both; animation-delay: calc(250ms + var(--i, 0) * 90ms); }
.view > .rv:not(.in) .gx, .view > .rv:not(.in) .gy, .view > .rv:not(.in) .vl, .view > .rv:not(.in) .cbar > * { animation-play-state: paused; }
.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .view > .rv { opacity: 1; transform: none; }
}

/* ---------- responsif ---------- */
html { -webkit-text-size-adjust: 100%; }
.as td.lbl { white-space: normal; }
.as tr.y td.lbl, .as td.lbl .tt { white-space: nowrap; }

/* layar besar: 1080p ke atas memakai ruang lebih lebar; 2K / 4K huruf sedikit lebih besar */
@media (min-width: 1700px) { .view { max-width: 2000px; } }
@media (min-width: 2200px) { body { font-size: 15px; } .view { max-width: 2400px; padding: 24px 32px 56px; } .top { padding: 14px 32px; }
  .tile .v { font-size: 29px; } .as { font-size: 13.5px; } table { font-size: 14px; } .side { width: 270px; } .hero-st b { font-size: 28px; } }
@media (min-width: 3200px) { body { font-size: 17px; } .view { max-width: 3000px; } table { font-size: 15.5px; } .as { font-size: 15px; } }

/* laptop kecil & tablet lanskap */
@media (max-width: 1250px) { .hero { grid-template-columns: minmax(0, 1fr) auto; } .radar { display: none; } }
@media (max-width: 1100px) { .g2, .g32 { grid-template-columns: 1fr; } .hero { grid-template-columns: 1fr; gap: 16px; } }

/* tablet potret & HP: sidebar jadi menu geser */
@media (max-width: 820px) {
  .side { position: fixed; left: -270px; z-index: 70; transition: left .3s var(--ease); box-shadow: none; }
  .side.open { left: 0; box-shadow: 8px 0 32px rgba(0,0,0,.35); }
  .burger { display: block; }
  .top { padding: 8px 12px; gap: 8px; }
  .top h1 { font-size: 17px; min-width: max-content; }
  .view { padding: 14px 12px 40px; }
  .asof { padding: 8px 12px; }
  .fg { grid-template-columns: 1fr; }
  .as td.lbl { min-width: 150px; max-width: 46vw; }
  .modal { padding: 16px; }
  .hero { padding: 20px 18px; border-radius: 16px; }
}

/* HP */
@media (max-width: 600px) {
  .top { display: grid; grid-template-columns: auto 1fr auto; }
  .top h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .top-ctl { display: contents; }
  .top-ctl .ctl { grid-column: 1 / 3; grid-row: 2; }
  .top-ctl .ctl input { flex: 1; min-width: 0; }
  .top-ctl .seg { grid-column: 3; grid-row: 2; }
  .top-ctl .seg button { padding: 5px 8px; font-size: 12.5px; }
  .top-act { grid-column: 3; grid-row: 1; justify-self: end; gap: 6px; }
  .top-ctl .ctl-t { display: none; }
  .top-ctl .ctl input { font-size: 14px !important; padding: 5px 6px; }
  .u-tx { display: none; }
  .user { padding: 6px 10px; }
  .hero h2 { font-size: 22px; }
  .hero p { font-size: 12.5px; }
  .hero-st { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
  .hero-st b { font-size: 18px; }
  .hero-st div { padding-left: 8px; }
  .filters { gap: 8px; }
  .filters > select, .filters > input.inp, .filters > .ctl { flex: 1 1 150px; min-width: 0; }
  .filters > .ctl input { flex: 1; min-width: 0; }
  .filters .sp { display: none; }
  .filters .seg { flex: 1 1 100%; overflow-x: auto; }
  .filters .seg button { flex: 1; white-space: nowrap; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { padding: 11px 12px; border-radius: 14px; }
  .tile .v { font-size: 19px; }
  .tile .k { font-size: 11.5px; }
  .card { padding: 13px 12px; border-radius: 14px; }
  .as { font-size: 11.5px; }
  .as th, .as td { padding: 3px 5px; }
  .as td.lbl { min-width: 118px; }
  .as .tt { width: 36px; } .as .um { width: 22px; }
  table { font-size: 12.5px; }
  th, td { padding: 5px 6px; }
  .bt th:nth-child(4), .bt td:nth-child(4), .bt th:nth-child(8), .bt td:nth-child(8),
  .bt th:nth-child(9), .bt td:nth-child(9), .bt th:nth-child(10), .bt td:nth-child(10) { display: none; }
  .lrow .lold { display: none; }
  .lrow input { width: 96px !important; }
  .lrow .ld { min-width: 54px !important; }
  .drawer { width: 100vw; }
  .dr-head, .dr-body, .dr-foot { padding-left: 14px; padding-right: 14px; }
  .dr-foot { flex-wrap: wrap; }
  .luas-now { font-size: 22px; }
  .mut input { flex: 1; width: auto; }
  /* cegah zoom otomatis iPhone saat mengetik */
  input, select, textarea { font-size: 16px !important; }
  .pager { justify-content: center; }
}
@media (max-width: 360px) { .tiles { grid-template-columns: 1fr; } .hero-st { grid-template-columns: 1fr 1fr; } }

/* layar pendek (HP lanskap) */
@media (max-height: 500px) and (orientation: landscape) {
  .top { position: static; }
  .drawer .dr-head { padding-top: 8px; padding-bottom: 6px; }
}
@media print {
  .side, .top, .filters, .btn, .asof, .hero { display: none !important; }
  .view { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .card::before, .tile::before, .tile::after { display: none; }
  .tw { overflow: visible; border: 0; }
  .as { font-size: 8.5px; }
  .as thead th { background: #eee; color: #000; }
  .as td.lbl { position: static; min-width: 0; }
  body { background: #fff; color: #000; }
  * { animation: none !important; }
  .view > .rv { opacity: 1; transform: none; }
}
