/* Dashboard mengikuti gambar referensi "Nature" (kanvas 1672 px, diskalakan dengan --z oleh dashboard.js). Dimuat paling akhir. */
:root { --side-w: 188px; --z: 1; }

@media (min-width: 1100px) {
  .dash-page .app { grid-template-columns: calc(188px * var(--z)) minmax(0, 1fr); grid-template-rows: calc(86px * var(--z)) auto; background: var(--bg); position: relative; isolation: isolate; }
  .dash-page .app::before { content: ''; position: absolute; z-index: -1; right: 0; top: 0; width: calc(940px * var(--z)); height: calc(232px * var(--z)); background: url(nature/hero.webp) center top / cover no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%), linear-gradient(180deg, #000 68%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 22%), linear-gradient(180deg, #000 68%, transparent); mask-composite: intersect; }
  .dash-page .app::after { content: ''; position: absolute; z-index: -2; left: 0; right: 0; top: 0; height: calc(420px * var(--z)); background: linear-gradient(180deg, #d6eefb, rgba(214,238,251,0)); }
  [data-theme="dark"] .dash-page .app::before { opacity: .35; }
  [data-theme="dark"] .dash-page .app::after { display: none; }
  .dash-page .top, .dash-page .side, .dash-page #nat-top { zoom: var(--z); }
  .dash-page .top { height: 86px; z-index: 30; position: relative; }
  [data-theme] .dash-page .top .topbar { padding: 24px 30px 0 33px; height: 86px; align-items: flex-start; gap: 18px; }
  [data-theme] .dash-page .top .brand { left: 0; top: 0; width: 188px; height: 130px; padding: 14px 40px 0; font-size: 18px; z-index: 35; }
  [data-theme] .dash-page .top .brand svg { width: 52px; height: 45px; }
  .dash-page .side { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 0; height: calc(100vh / var(--z)); margin: 0; padding-top: 134px; border-radius: 0 22px 22px 0; align-self: start; }
  .dash-page .side nav { padding: 10px 19px 10px 18px; gap: 0; }
  .dash-page .side nav a, .dash-page .side nav button { padding: 13px 14px; font-size: 13.5px; font-weight: 600; height: 46px; }
  .dash-page .side .art { -webkit-mask-image: linear-gradient(transparent, #000 18%); mask-image: linear-gradient(transparent, #000 18%); }
  [data-theme] .dash-page .side .status { margin: 0 22px 120px; }
  .dash-page .menu { top: 74px; }

  .dash-page .search { flex: 0 0 433px; }
  .dash-page .search input { height: 46px; box-shadow: 0 6px 18px rgba(19,66,74,.08); border-color: transparent; }
  .dash-page main.wrap { padding: 0 27px 40px 33px; max-width: none; gap: calc(20px * var(--z)); }
  .dash-page #nat-top { display: flex; flex-direction: column; }
  .dash-page .page-head { min-height: 0; height: 129px; gap: 0; justify-content: flex-start; padding: 4px 0 0; margin: 0; }
  .dash-page .head-chips { gap: 7px; margin-left: 4px; height: 30px; }
  .dash-page .page-head h1 { font-size: 38px; line-height: 46px; margin: 9px 0 0 4px; letter-spacing: -.02em; }
  .dash-page .page-head .sub { font-size: 14.5px; margin-left: 4px; max-width: 540px; line-height: 22px; }

  .dash-page .stats { grid-template-columns: 343fr 346fr 350fr 337fr; gap: 14px; margin: 0 0 17px 4px; }
  .dash-page .stat { height: 101px; min-height: 0; padding: 12px 10px 12px 16px; gap: 16px; flex-direction: row; align-items: center; }
  .dash-page .nat-grid { grid-template-columns: 840fr 570fr; grid-template-rows: 450px 112px; gap: 18px 14px; align-items: stretch; }
  .dash-page .nat-col { display: grid; grid-template-rows: 259px minmax(0, 1fr); gap: 15px; }
}

[data-theme] .dash-page .head-chips .chip, [data-theme] .dash-page .head-chips .pill { font-size: 12.5px; padding: 6px 13px; }
.dash-page .top .tagline { display: none; }
.dash-page .top .tagline.warn { display: block; }
.dash-page .top .topbar > .cur-tog { display: none; }
.cur-drop { order: 2; position: relative; display: flex; align-items: center; height: 46px; background: var(--panel); border-radius: 999px; padding: 0 14px 0 16px; gap: 10px; font-weight: 800; box-shadow: 0 6px 18px rgba(19,66,74,.08); }
.cur-drop .lead { width: 22px; height: 22px; }
.cur-drop select { appearance: none; border: 0; background: transparent; color: var(--text); font: 800 14px var(--sans); padding: 0 22px 0 0; cursor: pointer; min-width: 76px; }
.cur-drop i { position: absolute; right: 18px; top: 10px; font-style: normal; pointer-events: none; }
[data-theme] .dash-page .top .icon-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--panel); order: 2; box-shadow: 0 6px 18px rgba(19,66,74,.08); position: relative; }
.dash-page .top .avatar { width: 48px; height: 48px; font-size: 19px; order: 2; }

/* kartu umum */
.dash-page #nat-top .card { border: 1px solid rgba(255,255,255,.7); padding: 16px 18px; margin: 0; min-width: 0; box-shadow: 0 10px 28px rgba(19,66,74,.09); }
[data-theme="dark"] .dash-page #nat-top .card { border-color: var(--line); }
.dash-page #nat-top .card-head { margin: 0 0 8px; align-items: flex-start; flex-wrap: nowrap; }
.dash-page #nat-top .card-head .ttl { gap: 14px; align-items: center; }
.dash-page #nat-top .card-head h2 { font-size: 17px; margin: 0; line-height: 22px; }
.dash-page #nat-top .card-head .sub { font-size: 12px; margin: 1px 0 0; }
.dash-page #nat-top .card-head .bi { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--forest-bg); color: var(--forest-t); }
.dash-page #nat-top .card-head .bi.solid { width: 30px; height: 30px; background: none; color: #1f9d57; }
.dash-page .card-head .more-link { white-space: nowrap; font-size: 12.5px; padding-top: 6px; }

/* statistik */
.dash-page .stat { background: linear-gradient(100deg, var(--panel) 55%, var(--forest-bg)); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 10px 28px rgba(19,66,74,.1); }
.dash-page .stat.blue { background: linear-gradient(100deg, var(--panel) 55%, var(--river-bg)); }
[data-theme="dark"] .dash-page .stat { border-color: var(--line); }
.dash-page .stat .ic { width: 60px; height: 60px; }
.dash-page .stat .l { font-size: 13.5px; font-weight: 700; line-height: 18px; }
.dash-page .stat .v { font-size: 23px; line-height: 30px; }
.dash-page .stat .s { font-size: 11.5px; line-height: 17px; }
.dash-page .stat .spark { display: block; width: 104px; height: 56px; align-self: flex-end; }
.dash-page .stat .meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; height: 12px; background: none; margin-top: 8px; width: 100%; }
.dash-page .stat .meter span { background: var(--line); border-radius: 4px; overflow: hidden; }
.dash-page .stat .meter i { display: block; height: 100%; }

/* form */
.dash-page #open { padding: 14px 18px 16px 22px; overflow: hidden; }
.dash-page #open::before { width: 330px; height: 128px; opacity: .95; }
.dash-page #open .card-head { margin-bottom: 12px; }
.dash-page #nat-top #open .card-head .bi { width: 62px; height: 62px; background: linear-gradient(160deg, #2fc36b, #0e6b37); color: #fff; box-shadow: 0 8px 18px rgba(23,130,74,.3); }
.dash-page #open h2 { font-size: 20px; }
.dash-page .open-form { gap: 11px; }
.form-tabs { display: flex; background: var(--bg2); border-radius: 999px; width: max-content; max-width: 100%; }
.form-tabs button { display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 188px; height: 47px; border: 0; border-radius: 999px; background: transparent; color: var(--text2); font: 700 13.5px var(--sans); cursor: pointer; }
.form-tabs button.on { background: linear-gradient(180deg, #27b864, #0f7a40); color: #fff; box-shadow: 0 8px 18px rgba(23,130,74,.3); }
.dash-page .open-form .field label { color: var(--text); font-size: 12.5px; font-weight: 700; }
.row-top { display: grid; grid-template-columns: 435fr 340fr; gap: 24px; }
.dash-page .open-form .row-nums { display: grid; grid-template-columns: 194fr 192fr 186fr 175fr; gap: 18px; }
.inwrap { position: relative; display: flex; align-items: center; }
.dash-page .inwrap .input { height: 46px; border-radius: 14px; padding-left: 50px; font-weight: 700; font-family: var(--sans); min-width: 0; background-color: var(--panel); }
.dash-page .inwrap #o-pool { font-weight: 500; font-size: 13px; padding-right: 42px; }
.dash-page .inwrap select.input { font-size: 13px; }
.inwrap .lead { position: absolute; left: 15px; width: 24px; height: 24px; pointer-events: none; display: grid; place-items: center; font-style: normal; }
.inwrap .lead.down { color: #1f9d57; font-weight: 800; font-size: 20px; }
.inwrap .lead.stop { color: #e0484a; }
.inwrap .tail { position: absolute; right: 12px; color: var(--muted); display: grid; place-items: center; pointer-events: none; }
.inwrap .tail.unit { width: 26px; height: 24px; border-radius: 8px; background: var(--bg2); font-size: 12px; font-weight: 700; }
.inwrap input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.inwrap input[type=number]::-webkit-inner-spin-button { display: none; }
.dash-page .open-form .pool-pick:empty, .dash-page .open-form .picked:empty { display: none; }
.adv { border-radius: 18px; background: var(--bg2); }
.adv summary { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 20px 0 24px; cursor: pointer; list-style: none; color: var(--text2); font-size: 13px; }
.adv summary::-webkit-details-marker { display: none; }
.adv summary b { color: var(--text); margin-right: -6px; }
.adv summary i { margin-left: auto; font-style: normal; font-size: 18px; font-weight: 800; }
.adv[open] summary i { transform: rotate(180deg); }
.adv-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 18px 16px; }
.row-act { display: grid; grid-template-columns: 530fr 250fr; gap: 22px; align-items: center; }
.note-box { display: flex; align-items: center; gap: 14px; min-height: 55px; padding: 6px 12px 6px 20px; border-radius: 18px; background: var(--forest-bg); color: var(--forest-t); }
.note-box svg { flex: 0 0 auto; }
.note-box span { flex: 1 1 auto; font-size: 12px; font-weight: 600; color: var(--text2); }
.dash-page .note-box .input { width: 140px; flex: 0 0 auto; border-radius: 999px; text-align: center; min-height: 38px; }
.dash-page .open-form .row-act .btn.primary { display: flex; align-items: center; justify-content: center; gap: 14px; height: 57px; min-width: 0; width: 100%; font-size: 15px; font-weight: 800; border-radius: 999px; }
.tpl-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 16px; background: var(--bg2); font-size: 12.5px; }
.tpl-box[hidden] { display: none; }
.tpl-box span { flex: 1 1 260px; }

/* treasury */
.tv-hero { display: grid; grid-template-columns: minmax(0, 205px) minmax(0, 1fr); gap: 10px; height: 104px; align-items: end; margin-bottom: 12px; }
.tv-num .big { font-size: 36px; font-weight: 800; line-height: 44px; white-space: nowrap; letter-spacing: -.02em; }
.tv-num .delta { display: inline-block; margin: 8px 0 6px; padding: 4px 12px; border-radius: 999px; background: var(--forest-bg); color: var(--forest-t); font-size: 12px; font-weight: 800; white-space: nowrap; }
.tv-num .delta.neg { background: var(--red-bg); color: var(--red-t); }
.tv-hero .line { width: 100%; height: 102px; display: block; }
.coins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.coin-box { display: flex; align-items: center; gap: 12px; height: 70px; padding: 0 14px 0 18px; border-radius: 16px; background: var(--bg2); min-width: 0; }
.coin-box .coin, .coin-box .tok-av.sm { width: 36px; height: 36px; flex: 0 0 auto; }
.coin-box div:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.coin-box span { font-size: 12px; font-weight: 700; color: var(--text2); }
.coin-box b { font-size: 14.5px; white-space: nowrap; }
.coin-box small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* posisi ringkas */
.pos-mini { display: grid; grid-template-columns: 32px minmax(0, 1fr) 86px 92px 118px 10px; gap: 10px; align-items: center; height: 56px; color: var(--text); border-top: 1px solid var(--line); }
.pos-mini:first-child { border-top: 0; }
.pos-mini:hover { color: var(--text); }
.pos-mini .tok-av.sm { width: 32px; height: 32px; }
.pos-mini b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-mini small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pos-mini .tag { justify-self: start; padding: 6px 14px; border-radius: 999px; background: var(--bg2); font-size: 11.5px; font-weight: 800; color: var(--text2); }
.pos-mini .tag.ap { background: var(--forest-bg); color: var(--forest-t); }
.pos-mini .pn { line-height: 1.2; }
.pos-mini .pn span { font-size: 11px; color: var(--text2); }
.pos-mini .pn.pos b, .pos-mini .pn.pos small { color: var(--forest-t); }
.pos-mini .pn.neg b, .pos-mini .pn.neg small { color: var(--red-t); }
.mini-chart { height: 40px; background: var(--bg2); border-radius: 12px; padding: 4px 8px; }
.mini-chart .line { display: block; width: 100%; height: 100%; }
.pos-mini .chev { font-size: 22px; color: var(--muted); }

/* aktivitas & banner */
.dash-page #act-card { padding-top: 12px; padding-bottom: 6px; }
.dash-page #act-card .card-head { align-items: center; margin-bottom: 4px; }
.act-row { display: flex; align-items: center; gap: 14px; }
.act-row .dot-live { width: 8px; height: 8px; border-radius: 50%; background: #1f9d57; flex: 0 0 auto; }
.act-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--forest-bg); color: var(--forest-t); display: grid; place-items: center; flex: 0 0 auto; }
.act-row .nm { flex: 0 1 270px; min-width: 0; line-height: 1.3; }
.act-row b { display: block; font-size: 13px; }
.act-row small { font-size: 12px; color: var(--text2); white-space: nowrap; }
.act-row .when { border-left: 1px solid var(--line2); padding: 6px 0 6px 18px; font-size: 12.5px; color: var(--text2); }
.act-row .badge { margin-left: auto; padding: 7px 18px; border-radius: 999px; background: var(--bg2); font-weight: 800; font-size: 13px; }
.act-row .badge.pos { background: var(--forest-bg); color: var(--forest-t); }
.act-row .badge.neg { background: var(--red-bg); color: var(--red-t); }
.dash-page .ai-banner { min-height: 0; padding: 0 22px 0 14px; gap: 20px; background: linear-gradient(90deg, rgba(13,88,80,.88), rgba(20,100,90,.55) 60%, rgba(20,100,90,.15)), url(nature/hero.webp) right center / cover; }
.dash-page .ai-banner img { width: 136px; }

@media (max-width: 1099px) {
  .dash-page .nat-grid { grid-template-columns: minmax(0, 1fr); }
  .form-tabs { width: 100%; } .form-tabs button { min-width: 0; flex: 1; gap: 6px; }
}
@media (max-width: 700px) {
  .row-top, .row-act { grid-template-columns: minmax(0, 1fr); }
  .dash-page .open-form .row-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tv-hero { grid-template-columns: minmax(0, 1fr) 90px; }
  .tv-num .big { font-size: 28px; }
  .coins { gap: 6px; } .coin-box { padding: 0 8px; gap: 6px; } .coin-box .coin, .coin-box .tok-av.sm { width: 24px; height: 24px; }
  .pos-mini { grid-template-columns: 32px minmax(0, 1fr) auto auto; } .pos-mini .mini-chart, .pos-mini .chev { display: none; }
  .act-row .when, .act-row .dot-live { display: none; }
  .note-box { flex-wrap: wrap; }
  .dash-page .stat .spark { display: none; }
}
.dash-page .side nav a, .dash-page .side nav button { white-space: nowrap; }
.dash-page .side nav { padding-left: 14px; padding-right: 14px; }
.dash-page .stat { gap: 12px; padding-right: 8px; }
.dash-page .stat .spark { width: 76px; }
.dash-page .stat .ic { width: 56px; height: 56px; }
.dash-page .stat .v { font-size: 21px; }
.dash-page .stat .s { font-size: 11px; }
@media (min-width: 1100px) {
  .dash-page .nat-grid { grid-template-rows: minmax(450px, max-content) 112px; }
  .dash-page .nat-col { grid-template-rows: 259px 176px; align-self: start; }
}
.act-row small { display: block; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .cur-drop { height: 38px; padding: 0 8px 0 12px; gap: 0; }
  .cur-drop .lead { display: none; }
  .cur-drop select { min-width: 0; padding-right: 16px; font-size: 13px; }
  .cur-drop i { right: 9px; top: 6px; }
  [data-theme] .dash-page .top .icon-btn, .dash-page .top .avatar { width: 38px; height: 38px; flex: 0 0 38px; }
  .dash-page .top .icon-btn:not(.theme-btn) { display: none; }
  .dash-page .search { flex: 1 1 0; min-width: 0; }
  .dash-page .ai-banner { padding: 14px; flex-wrap: wrap; }
}
