/* Tema default gelap; [data-theme="light"] untuk terang */
:root {
  --bg: #07090c;
  --card: #0e1116;
  --card-2: #151920;
  --card-3: #1b2029;
  --text: #f3f5f8;
  --muted: #8b93a3;
  --faint: #59616f;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .14);
  --accent: #c5f74f;
  --accent-text: #0b0d10;
  --up: #3ddc97;
  --up-bg: rgba(61, 220, 151, .12);
  --down: #ff5c7a;
  --down-bg: rgba(255, 92, 122, .12);
  --c-saham: #5b8cff;
  --c-crypto: #f7b23b;
  --c-bisnis: #a78bfa;
  --c-cash: #2dd4bf;
  --c-lainnya: #8b93a3;
  --glow: rgba(197, 247, 79, .07);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
  --radius: 20px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f4f6;
  --card: #ffffff;
  --card-2: #f5f6f8;
  --card-3: #eceef2;
  --text: #0b0d10;
  --muted: #5f6775;
  --faint: #9aa1ad;
  --border: rgba(11, 13, 16, .08);
  --border-strong: rgba(11, 13, 16, .18);
  --accent: #c5f74f;
  --accent-text: #0b0d10;
  --up: #0f9d63;
  --up-bg: rgba(15, 157, 99, .1);
  --down: #e0294f;
  --down-bg: rgba(224, 41, 79, .09);
  --glow: rgba(140, 200, 20, .10);
  --shadow: 0 1px 2px rgba(11, 13, 16, .04), 0 8px 24px rgba(11, 13, 16, .04);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.5 "Geist", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.hide-values .money { filter: blur(10px); user-select: none; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 500; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav-in { max-width: 1240px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: -.02em; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted); padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; margin-left: 6px; }
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.status.live .dot { background: var(--up); animation: pulse 2s infinite; }
.status.err .dot { background: var(--down); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 60%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.actions { display: flex; align-items: center; gap: 6px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card-2); font-weight: 600; white-space: nowrap;
  transition: transform .1s, filter .15s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn.accent { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.accent:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--card-2); }
.btn.danger { color: var(--down); }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 999px; border: 1px solid transparent;
  background: transparent; color: var(--muted); transition: color .15s, background .15s;
}
.icon-btn:hover { color: var(--text); background: var(--card-2); }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.wrap { max-width: 1240px; margin: 0 auto; padding: 20px 16px 40px; }

/* hero + chart */
.top-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; margin-bottom: 16px; }
.hero { padding: 26px 26px 18px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% auto auto -20%; width: 70%; height: 90%; background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; }
.hero > * { position: relative; }
.hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.total { font-size: clamp(38px, 6vw, 60px); font-weight: 500; letter-spacing: -.045em; line-height: 1.05; margin: 8px 0 12px; }
.total .cur { font-size: .45em; color: var(--muted); font-weight: 500; letter-spacing: -.01em; margin-right: 6px; vertical-align: .62em; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--card-2); }
.pill.up { background: var(--up-bg); }
.pill.down { background: var(--down-bg); }
.pill small { color: var(--muted); font-weight: 500; font-size: 12px; }
.hero-stats { display: flex; gap: 28px; padding-top: 6px; }
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats span { font-size: 12px; color: var(--muted); }
.hero-stats b { font-weight: 600; font-size: 15px; }

.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 12px; margin-top: 22px; flex-wrap: wrap; }
.chart-ctl { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.range-change { font-size: 13px; font-weight: 600; }
.range-change small { color: var(--muted); font-weight: 500; }
.ranges { display: flex; gap: 2px; background: var(--card-2); padding: 3px; border-radius: 999px; }
.ranges button { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 12px; padding: 5px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.ranges button:hover { color: var(--text); }
.ranges button.active { background: var(--card-3); color: var(--text); }
.chart { position: relative; height: 240px; margin: 10px -6px 0; touch-action: pan-y; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart.loading { opacity: .4; transition: opacity .2s; }
.chart-empty { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 0 16px; }
.chart-empty .btn { margin-top: 12px; height: 34px; font-size: 13px; }
.chart-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--card-3); border: 1px solid var(--border-strong); border-radius: 10px; padding: 6px 10px; font-size: 12px; white-space: nowrap; pointer-events: none; z-index: 2; }
.chart-tip b { display: block; font-size: 14px; font-weight: 600; }
.chart-note { font-size: 11.5px; color: var(--faint); margin-top: 6px; }

/* side panels */
.side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel { padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.panel-head .muted { font-size: 12px; }
.alloc { display: flex; gap: 18px; align-items: center; }
.donut-wrap { position: relative; width: 120px; height: 120px; flex: none; }
.donut { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 14; transition: stroke-dasharray .5s; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.donut-center span { font-size: 11px; color: var(--muted); }
.alloc-list { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.alloc-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.alloc-item i { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.alloc-item b { margin-left: auto; font-weight: 600; }
.mover { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); cursor: pointer; }
.mover:first-child { border-top: 0; padding-top: 0; }
.mover .asset-text { flex: 1; }
.mover .r { text-align: right; }
.panel-empty { font-size: 13px; color: var(--faint); padding: 8px 0; }

/* class cards */
.classes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.cls { padding: 16px; text-align: left; transition: border-color .15s, background .15s; border: 1px solid var(--border); }
.cls:hover { border-color: var(--border-strong); }
.cls.active { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 4%, var(--card)); }
.cls-top { display: flex; align-items: center; gap: 10px; }
.cls-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.cls-name { font-weight: 600; font-size: 13px; }
.cls-n { font-size: 11px; color: var(--faint); }
.cls-val { font-size: 19px; font-weight: 600; margin: 12px 0 2px; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cls-pnl { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.warn { background: var(--down-bg); color: var(--down); border-radius: 14px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }

/* holdings */
.holdings { overflow: hidden; }
.holdings-head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.tab { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; transition: color .15s, background .15s; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--card-3); color: var(--text); }
.tab small { color: var(--faint); font-weight: 500; margin-left: 4px; }

.rows-head, .row {
  display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.2fr) 110px minmax(0, 1.3fr) minmax(0, 1.3fr);
  gap: 16px; align-items: center; padding: 0 20px;
}
.rows-head { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); padding-top: 12px; padding-bottom: 10px; }
.r { text-align: right; }
.row { padding-top: 14px; padding-bottom: 14px; border-top: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.row:hover { background: var(--card-2); }
.asset { display: flex; align-items: center; gap: 12px; min-width: 0; }
.badge {
  position: relative; width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: -.02em; overflow: hidden;
}
.badge img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 5px; opacity: 0; transition: opacity .2s; }
.badge img.ok { opacity: 1; }
.badge:has(img.ok) .mono { visibility: hidden; }
.badge.coin img { background: transparent; padding: 0; border-radius: 50%; }
.asset-text { min-width: 0; }
.asset-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.asset-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-main { font-weight: 600; white-space: nowrap; }
.cell-sub { font-size: 12px; color: var(--muted); white-space: nowrap; margin-top: 2px; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--card-2); }
.chip.up { background: var(--up-bg); }
.chip.down { background: var(--down-bg); }
.spark { width: 110px; height: 34px; display: block; }
.weight { display: inline-flex; align-items: center; gap: 6px; }
.weight i { display: inline-block; width: 36px; height: 4px; border-radius: 4px; background: var(--card-3); position: relative; overflow: hidden; }
.weight i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--muted); border-radius: 4px; }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); border-top: 1px solid var(--border); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }
.foot { margin-top: 24px; text-align: center; font-size: 12px; color: var(--faint); }

/* modal */
dialog {
  border: 1px solid var(--border-strong); border-radius: 24px; padding: 0; width: min(480px, calc(100vw - 32px));
  background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
dialog[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
dialog::backdrop { background: rgba(3, 4, 6, .6); backdrop-filter: blur(4px); }
#form { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.seg { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 4px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--muted); transition: color .15s, background .15s; }
.seg button.active { background: var(--card-3); color: var(--text); }
.seg button:disabled { cursor: default; opacity: .5; }
.seg button.active:disabled { opacity: 1; }
.seg.small { display: inline-grid; grid-template-columns: repeat(2, auto); }
.seg.small button { padding: 3px 10px; font-size: 12px; }
#fields { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 500; color: var(--muted); display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.input, select.input {
  height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--card-2); outline: none;
  transition: border-color .15s, box-shadow .15s; width: 100%;
}
.input:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.input[readonly] { color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.inline { display: flex; gap: 8px; }
.inline .input { flex: 1; }
.inline .btn { height: 44px; border-radius: 12px; }
.hint { font-size: 12px; color: var(--muted); }
.found { padding: 10px 14px; border-radius: 12px; background: var(--card-2); font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.found b { font-weight: 700; }
.found > span:last-child { white-space: nowrap; font-weight: 600; }
.results { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; }
.result {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card-2); text-align: left; width: 100%;
}
.result:hover { border-color: var(--border-strong); }
.result.active { border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.result img { width: 22px; height: 22px; border-radius: 50%; }
.result .rk { margin-left: auto; font-size: 12px; color: var(--muted); text-align: right; }
.summary { padding: 12px 14px; border-radius: 12px; background: var(--card-2); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.summary div { display: flex; justify-content: space-between; }
.topup { border: 1px dashed var(--border-strong); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.topup summary { cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; }
.form-error { color: var(--down); font-size: 13px; background: var(--down-bg); padding: 8px 12px; border-radius: 10px; }
.modal-foot { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.spacer { flex: 1; }

@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* responsive */
@media (max-width: 1024px) {
  .top-grid { grid-template-columns: 1fr; }
  .side { display: grid; grid-template-columns: 1fr 1fr; }
  .classes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .status { display: none; }
  .btn.accent span { display: none; }
  #btnAdd { width: 38px; padding: 0; justify-content: center; }
  .hero { padding: 20px 18px 14px; }
  .hero-stats { gap: 20px; }
  .chart { height: 190px; }
  .side { grid-template-columns: 1fr; }
  .classes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .holdings-head { padding: 14px 16px; }
  .tabs { margin-left: 0; width: 100%; }
  .rows-head { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 16px; gap: 2px 12px; }
  .row .c-price, .row .c-spark { display: none; }
  .row .asset { grid-row: 1 / span 2; }
  .row .c-val { grid-column: 2; grid-row: 1; }
  .row .c-pnl { grid-column: 2; grid-row: 2; }
  .row .c-val .cell-sub { display: none; }
  .row .c-pnl .cell-main { font-size: 12.5px; }
  .row .c-pnl .cell-sub { margin-top: 0; }
  .seg button { font-size: 12px; }
}

/* light: tombol aktif di segmented control pakai kartu putih */
:root[data-theme="light"] .ranges button.active,
:root[data-theme="light"] .seg button.active { background: var(--card); box-shadow: 0 1px 3px rgba(11, 13, 16, .12); }

/* platform (sekuritas / exchange / bank) */
.plat-panel { margin-bottom: 16px; }
.plat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.plat { text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--card-2); transition: border-color .15s; min-width: 0; }
.plat:hover { border-color: var(--border-strong); }
.plat.active { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.plat-top { display: flex; align-items: center; gap: 10px; }
.plat-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.plat-val { font-size: 17px; font-weight: 600; letter-spacing: -.02em; margin-top: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plat-pnl { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plat-split { display: flex; gap: 2px; height: 5px; border-radius: 4px; background: var(--card-3); margin-top: 10px; overflow: hidden; }
.plat-split i { display: block; height: 100%; }
.plat-cash { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.plat-cash > span:first-child { display: inline-flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; }
.plat-cash i { width: 7px; height: 7px; border-radius: 2px; background: var(--c-cash); flex: none; }
.plat-cash b { color: var(--text); font-weight: 600; }
.plat-edit { color: var(--text); font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--card-3); cursor: pointer; }
.plat-edit:hover { background: var(--border-strong); }
.panel-head .muted b { color: var(--text); font-weight: 600; }

.holdings-ctl { display: flex; gap: 8px; align-items: center; }
select.input.select-sm { height: 34px; width: auto; padding: 0 30px 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; color: var(--muted); }
.btn-sm.active { color: var(--text); background: var(--card-3); border-color: transparent; }
.group-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px;
  background: var(--card-2); border-top: 1px solid var(--border); font-size: 13px; font-weight: 600;
}
.gh-name { display: flex; align-items: baseline; gap: 8px; }
.gh-name small { color: var(--faint); font-weight: 500; }
.group-head .r span + span { margin-left: 8px; }
@media (max-width: 720px) {
  .plat-grid { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
  .plat { flex: 0 0 200px; }
  .holdings-ctl { width: 100%; }
  .group-head { padding: 10px 16px; }
}

/* dividen */
.div-tag { font-size: 11px; font-weight: 600; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 85%, transparent); padding: 0 6px; border-radius: 999px; margin-left: 4px; }
:root[data-theme="light"] .div-tag { background: var(--accent); }
.div-list { display: flex; flex-direction: column; gap: 2px; max-height: 180px; overflow: auto; }
.div-item { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.div-item b { margin-left: auto; font-weight: 600; }
.icon-btn.sm { width: 28px; height: 28px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
input[type="date"].input { padding-right: 8px; }

/* ---------- mobile ---------- */
@media (max-width: 1024px) {
  .top-grid { grid-template-columns: minmax(0, 1fr); }
  .side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .wrap { padding: 12px 12px 32px; }
  .nav-in { padding: 10px 12px; }
  .actions { gap: 0; }
  .card { border-radius: 18px; }
  .top-grid { gap: 12px; margin-bottom: 12px; }
  .side { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hero-head { gap: 16px; }
  .hero-stats { gap: 18px; width: 100%; padding-top: 0; }
  .hero-stats b { font-size: 14px; }
  .pill { font-size: 12px; padding: 4px 10px; }
  .chart-head { margin-top: 16px; }
  .chart-ctl { margin-left: 0; width: 100%; justify-content: space-between; }
  .panel { padding: 16px; }
  .alloc { gap: 14px; }
  .donut-wrap { width: 96px; height: 96px; }
  .donut-center b { font-size: 16px; }
  .alloc-item { font-size: 12.5px; }
  .mover { gap: 10px; }
  .mover .r { flex: none; max-width: 48%; }
  .mover .cell-main { overflow: hidden; text-overflow: ellipsis; }

  /* kartu kelas jadi daftar baris: ikon+nama kiri, nilai+untung kanan */
  .classes { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 12px; }
  .cls { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 12px 14px; }
  .cls-top { grid-row: 1 / span 2; }
  .cls-val { margin: 0; font-size: 16px; text-align: right; }
  .cls-pnl { text-align: right; }
  .cls.is-empty { display: none; }

  .plat-panel { margin-bottom: 12px; }
  .plat-grid { margin: 0 -16px; padding: 0 16px 2px; }
  .plat { flex: 0 0 196px; padding: 12px; }
  .plat-val { font-size: 15px; }

  .holdings-head { gap: 10px; }
  .holdings-ctl { gap: 6px; }
  .holdings-ctl .select-sm { flex: 1; min-width: 0; }
  .row { padding: 12px 14px; column-gap: 10px; }
  .badge { width: 34px; height: 34px; border-radius: 10px; }
  .asset { gap: 10px; }
  .cell-main { font-size: 13.5px; }
  .group-head { padding: 9px 14px; font-size: 12.5px; }
  .group-head .r span + span { display: block; margin-left: 0; font-size: 12px; }

  /* modal jadi bottom sheet; font input 16px supaya iOS tidak zoom */
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 92dvh; border-bottom: 0; }
  dialog[open] { animation: sheet .22s ease-out; }
  #form { padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 92dvh; overflow-y: auto; }
  .input, select.input { font-size: 16px; }
  .seg button { padding: 7px 2px; }
  .grid2 { gap: 10px; }
  .modal-foot { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); background: var(--card); padding: 10px 0 2px; margin: 0; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: .6; } }
@media (max-width: 380px) {
  .hero-stats { gap: 14px; }
  .icon-btn { width: 34px; height: 34px; }
  #btnAdd { width: 34px; height: 34px; }
  .brand { font-size: 15px; }
}
