/* Tampilan "Nature": sidebar hijau tua penuh, ilustrasi alam, kartu membulat. Dimuat paling akhir. */
:root { --side-w: 188px; --radius: 18px; }
:root[data-theme="light"] { --bg: #eaf4f1; --line: #e3eeea; --shadow: 0 2px 6px rgba(19,66,74,.05), 0 12px 30px rgba(19,66,74,.08); }
body { background: linear-gradient(180deg, #d9effa 0, var(--bg) 360px) fixed, var(--bg); }
[data-theme="dark"] body { background: var(--bg); }
.card { border-radius: var(--radius); }
.btn { border-radius: 999px; }
.btn.primary { background: linear-gradient(180deg, #25b05f, #11763f); border-color: transparent; box-shadow: 0 6px 16px rgba(23,130,74,.28); }
.input, select.input, textarea.input { border-radius: 12px; }
.tabs button.on, .cur-tog button.on { background: linear-gradient(180deg, #25b05f, #11763f); }

/* ---- kerangka: sidebar penuh + topbar melayang ---- */
@media (min-width: 861px) {
  .app { grid-template-rows: var(--top-h) 1fr; }
  .top { grid-column: 2; grid-row: 1; display: block; position: relative; background: transparent; border: 0; }
  [data-theme] .top .topbar { background: transparent; height: 100%; padding: 10px 26px 0; }
  [data-theme] .top .brand { position: fixed; left: 8px; top: 8px; width: calc(var(--side-w) - 16px); height: 128px; padding: 0 42px; flex-direction: column; justify-content: center; gap: 6px; background: transparent; border: 0; color: #fff; font-size: 19px; line-height: 1.15; text-align: center; z-index: 35; }
  .side { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 8px; height: calc(100vh - 16px); margin: 8px 0 8px 8px; padding-top: 128px; border: 0; border-radius: 22px; }
  .search { flex: 0 1 430px; margin-right: auto; }
}
[data-theme] .side { background: linear-gradient(180deg, #0f4a4b 0, #14605a 45%, #1c6d63 100%); }
[data-theme] .side nav a, [data-theme] .side nav button { color: #e4f3ef; border-radius: 14px; }
[data-theme] .side nav a:hover, [data-theme] .side nav button:hover { background: rgba(255,255,255,.1); color: #fff; }
[data-theme] .side nav a.on { background: linear-gradient(180deg, #2aa862, #157a46); color: #fff; box-shadow: 0 6px 14px rgba(0,0,0,.2); }
.side .art { background: url(nature/side.webp) center bottom / cover no-repeat; }
[data-theme] .side .status { margin: 0 12px 12px; position: absolute; left: 0; right: 0; bottom: 0; justify-content: center; border: 0; border-radius: 999px; background: rgba(8,50,44,.88); color: #fff; font-weight: 700; padding: 11px; }
.search input { border-radius: 999px; height: 44px; padding-right: 52px; }
.search svg { top: 13px; left: 15px; }
.search input { padding-left: 42px; }
.search kbd { position: absolute; right: 12px; top: 11px; font: 600 11px/1 var(--sans); color: var(--muted); background: var(--bg2); border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; pointer-events: none; }
.top .tagline { font-size: 0; flex: 0 0 auto; order: 1; }
.top .tagline .pill { font-size: 11px; display: inline-block; padding: 7px 12px; }
.top .topbar > .cur-tog, .top .topbar > .icon-btn, .top .topbar > .avatar { order: 2; }
.avatar { background: linear-gradient(150deg, #137a6b, #0d4f47); }

/* ---- dashboard ---- */
.dash-page main.wrap { gap: 16px; padding-top: 14px; max-width: 1600px; }
@media (min-width: 861px) {
  .dash-page .app { background: linear-gradient(90deg, #dbf0fb 24%, rgba(219,240,251,0) 46%) left top / 100% 230px no-repeat, linear-gradient(180deg, transparent 150px, var(--bg) 285px) left top / 100% 100% no-repeat, url(nature/hero.webp) right top / min(1240px, 78%) auto no-repeat; }
  [data-theme="dark"] .dash-page .app { background: linear-gradient(90deg, var(--bg) 24%, rgba(12,19,23,.55) 60%, rgba(12,19,23,.55)) top / 100% 260px no-repeat, linear-gradient(180deg, transparent 150px, var(--bg) 300px), url(nature/hero.webp) right top / min(1240px, 78%) auto no-repeat; }
}
.dash-page .page-head h1 { font-size: 36px; text-shadow: 0 1px 12px rgba(255,255,255,.7); }
[data-theme="dark"] .dash-page .page-head h1 { text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.dash-page .page-head { flex-direction: column; gap: 4px; min-height: 108px; justify-content: flex-end; }
.dash-page .head-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dash-page .head-chips .chip { border-radius: 999px; font-weight: 700; }
.dash-page .page-head .sub { margin: 0; color: var(--text2); font-size: 15px; max-width: 520px; }
.dash-page .clockline { padding: 0; font-size: 12.5px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; min-width: 0; min-height: 106px; }
.stat .ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--forest-bg); color: var(--forest-t); }
.stat.blue .ic { background: var(--river-bg); color: var(--river-t); }
.stat .tx { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.stat .l { font-size: 13px; font-weight: 600; color: var(--text2); }
.stat .v { font-size: 22px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v.pos, .stat .s.pos { color: var(--forest-t); } .stat .v.neg, .stat .s.neg { color: var(--red-t); }
.stat .spark { width: 84px; height: 46px; flex: 0 0 auto; }
.meter { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #0f7a43, #3ecb74); }
.meter.warn i { background: #e7a417; } .meter.bad i { background: #d94141; }

.nat-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.nat-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.nat-grid .card, .dash-page .wrap > .card { margin: 0; min-width: 0; }
#open { position: relative; overflow: hidden; }
#open::before { content: ''; position: absolute; right: 0; top: 0; width: 260px; height: 150px; background: url(nature/formart.webp) center / cover no-repeat; -webkit-mask-image: radial-gradient(ellipse at 100% 0, #000 30%, transparent 72%); mask-image: radial-gradient(ellipse at 100% 0, #000 30%, transparent 72%); pointer-events: none; }
[data-theme="dark"] #open::before { opacity: .3; }
#open > * { position: relative; }
#open .card-head .sub { max-width: 430px; }
.dash-page .card-head .bi { width: 46px; height: 46px; border-radius: 50%; }
.dash-page #open .card-head .bi { background: linear-gradient(160deg, #2bb865, #0f6f3a); }
.dash-page #open .card-head .bi svg { stroke: #fff; filter: none; }
.dash-page .open-form .btn.primary { min-height: 52px; min-width: 220px; font-size: 15px; font-weight: 800; }
.card-head .more-link { font-size: 13px; font-weight: 700; color: var(--forest-t); }

/* Treasury terang (mode gelap tetap memakai layar TV) */
.dash-page .tv-card .tv .tv-screen { justify-content: flex-start; }
:root[data-theme="light"] .dash-page .tv-card .tv .tv-screen { background: linear-gradient(180deg, #f6fbf9, #eef7f3); color: var(--text); padding: 14px 16px; }
:root[data-theme="light"] .dash-page .tv-big { color: var(--text); font-size: 34px; }
:root[data-theme="light"] .dash-page .tv-sub, :root[data-theme="light"] .dash-page .tv-pnl { color: var(--text2); }
:root[data-theme="light"] .dash-page .tv-pnl.pos, :root[data-theme="light"] .dash-page .tv-row .pos { color: var(--forest-t); }
:root[data-theme="light"] .dash-page .tv-pnl.neg, :root[data-theme="light"] .dash-page .tv-row .neg { color: var(--red-t); }
:root[data-theme="light"] .dash-page .tv-pnl small, :root[data-theme="light"] .dash-page .tv-row span:first-child, :root[data-theme="light"] .dash-page .tv-row.dim span, :root[data-theme="light"] .dash-page .tv-dim, :root[data-theme="light"] .dash-page .tv-foot { color: var(--muted); }
:root[data-theme="light"] .dash-page .tv-h { color: var(--forest-t); }
:root[data-theme="light"] .dash-page .tv-cols { border-top-color: var(--line); }
:root[data-theme="light"] .dash-page .tv-mode { background: var(--amber-bg); color: var(--amber-t); }
:root[data-theme="light"] .dash-page .tv-mode.live { background: var(--forest-bg); color: var(--forest-t); }
.tv-chart { margin: 0 0 10px; }
.tv-chart svg { display: block; width: 100%; height: 64px; }
.tv-chart small { font-size: 11.5px; color: var(--muted); }

.mini-list { display: flex; flex-direction: column; }
.mini-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); color: var(--text); }
.mini-row:first-child { border-top: 0; }
a.mini-row:hover { color: var(--text); background: var(--bg2); }
.mini-row .tok-av.sm { width: 34px; height: 34px; }
.mini-row b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row small { color: var(--muted); font-size: 12px; }
.mini-row .val { text-align: right; font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.mini-row .val small { display: block; font-weight: 600; }
.mini-empty { color: var(--muted); font-size: 13px; padding: 4px 0; }

.ai-banner { position: relative; display: flex; align-items: center; gap: 14px; min-height: 108px; padding: 0 18px 0 10px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(100deg, #12645a, #2a8a70 60%, #5aa88a); color: #fff; box-shadow: var(--shadow); }
.ai-banner img { width: 124px; height: auto; align-self: flex-end; -webkit-mask-image: radial-gradient(ellipse at 50% 65%, #000 52%, transparent 74%); mask-image: radial-gradient(ellipse at 50% 65%, #000 52%, transparent 74%); }
.ai-banner div { flex: 1 1 auto; min-width: 0; }
.ai-banner b { display: block; font-size: 19px; }
.ai-banner span { font-size: 12.5px; opacity: .92; }
.ai-banner a { flex: 0 0 auto; background: #fff; color: #11463c; font-weight: 800; border-radius: 999px; padding: 10px 18px; }

@media (max-width: 1280px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .nat-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  [data-theme] .top .brand { color: var(--text); }
  [data-theme] .side { background: #14605a; }
  .top .tagline, .search kbd { display: none; }
  .dash-page .page-head { min-height: 0; }
  .dash-page .page-head h1 { font-size: 27px; }
}
@media (max-width: 600px) { .stats { gap: 10px; } .stat { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; min-height: 0; } .stat .ic { width: 36px; height: 36px; } .stat .spark, .stat .s { display: none; } .stat .v { font-size: 18px; } .ai-banner img { display: none; } .ai-banner { padding: 14px; flex-wrap: wrap; } }
@media (max-width: 1500px) { .stat { gap: 10px; padding: 14px 12px; } .stat .ic { width: 42px; height: 42px; } .stat .spark { width: 52px; } .stat .v { font-size: 19px; } }
@media (max-width: 1360px) { .stat .spark { display: none; } }
@media (max-width: 600px) { #open::before { display: none; } .stat { gap: 6px; padding: 12px; } }
