/* DompetKu — Premium fintech: dark navy & charcoal, aksen emerald.
   Desktop: sidebar minimalis. Mobile: layout khusus HP + bottom navigation. */
:root {
  --bg: #0a0f1a;
  --bg-soft: #0c1322;
  --card: #101827;
  --card-2: #151f31;
  --surface-3: #1a2639;
  --border: rgba(148, 163, 184, 0.10);
  --border-strong: rgba(148, 163, 184, 0.18);
  --text: #edf2f8;
  --muted: #8b98ad;
  --muted-2: #5f6d84;
  --green: #10b981;
  --green-bright: #34d399;
  --green-dark: #059669;
  --green-soft: rgba(16, 185, 129, 0.12);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.10);
  --amber: #fbbf24;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 12px 32px rgba(2, 6, 17, 0.35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.25; margin: 0; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(16, 185, 129, 0.35); }
.is-green { color: var(--green-bright) !important; }
.is-red { color: var(--red) !important; }

/* ---------- Shell & sidebar (desktop) ---------- */
.shell { display: block; }
.sidebar { display: none; }
.main-wrap { min-width: 0; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--green-bright), var(--green-dark));
  color: #04241a; border-radius: 13px;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font-weight: 800; font-size: 1.22rem; letter-spacing: -0.01em; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-tag { font-size: 0.74rem; color: var(--muted); font-weight: 500; }

@media (min-width: 1024px) {
  .sidebar {
    display: flex; flex-direction: column;
    position: fixed; inset: 0 auto 0 0; width: 266px; z-index: 30;
    padding: 26px 20px 22px;
    background: #0b111e;
    border-right: 1px solid var(--border);
  }
  .main-wrap { margin-left: 266px; }
  .brand-mobile { display: none !important; }
}
.side-label {
  margin: 34px 10px 10px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2);
}
.sidenav { display: flex; flex-direction: column; gap: 4px; }
.sidenav .nav-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 14px;
  background: transparent; border: 1px solid transparent; border-radius: 13px;
  color: var(--muted); font-weight: 600; font-size: 0.95rem; text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidenav .nav-btn svg { width: 21px; height: 21px; flex: 0 0 auto; }
.sidenav .nav-btn:hover { color: var(--text); background: rgba(148, 163, 184, 0.06); }
.sidenav .nav-btn.is-active {
  color: var(--green-bright);
  background: var(--green-soft);
}
.side-foot { margin-top: auto; }
.side-user {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 12px; border-radius: var(--radius-sm);
  background: var(--card);
}
.side-avatar {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: 700;
  background: var(--surface-3); color: var(--green-bright);
}
.side-user-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.side-user-name { font-weight: 700; font-size: 0.92rem; }
.side-user-sub { font-size: 0.76rem; color: var(--muted); }
.side-note { margin: 12px 4px 0; font-size: 0.74rem; color: var(--muted-2); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 25;
  background: rgba(10, 15, 26, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 13px 30px;
  display: flex; align-items: center; gap: 16px;
}
.topbar-tag { color: var(--muted); font-size: 0.88rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.rate-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--muted);
  background: var(--card); border: 1px solid var(--border);
  padding: 8px 13px; border-radius: 999px; white-space: nowrap;
}
.rate-chip #rate-chip-value { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.rate-label { font-weight: 600; letter-spacing: 0.02em; }
.rate-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-bright); flex: 0 0 auto;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: pulse-dot 2.2s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.lock-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  padding: 8px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  white-space: nowrap; transition: background 0.15s ease;
}
.lock-btn svg { width: 16px; height: 16px; }
.lock-btn:hover { background: var(--card-2); }

/* ---------- Konten & halaman ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 28px 30px 60px; }
.page { display: none; }
.page.is-active { display: block; animation: page-in 0.25s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.page-head { margin-bottom: 22px; }
.page-title { font-size: 1.65rem; font-weight: 800; letter-spacing: -0.02em; }
.page-sub { margin-top: 4px; color: var(--muted); font-size: 0.92rem; }

/* ---------- Kartu & tipografi umum ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 20px; }
.dash-col .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card-title { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; }
.card-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted);
}
.card-sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 6px; }
.card-note { color: var(--muted); font-size: 0.82rem; margin-top: 12px; }
.card-value { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.hint { color: var(--muted); font-size: 0.86rem; margin-top: 14px; }
.empty-note { color: var(--muted-2); font-size: 0.88rem; padding: 14px 0 6px; }
.mini-title { font-size: 0.92rem; font-weight: 700; margin: 20px 0 8px; }
.text-link {
  background: none; border: none; padding: 4px 2px;
  color: var(--green-bright); font-weight: 600; font-size: 0.86rem;
}
.text-link:hover { text-decoration: underline; }
.live-note { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 0.8rem; font-weight: 600; }

/* ---------- Tombol & form ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; border: 1px solid transparent;
  padding: 11px 18px; font-weight: 600; font-size: 0.92rem;
  transition: filter 0.15s ease, background 0.15s ease;
  min-height: 44px;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--green); color: #032117; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--card-2); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--red); }
.btn-danger-ghost:hover { background: var(--red-soft); }
.btn-small { padding: 8px 13px; min-height: 38px; font-size: 0.85rem; border-radius: 10px; }
.btn[disabled] { opacity: 0.55; cursor: default; }
input, select {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
  min-height: 46px;
  font-variant-numeric: tabular-nums;
}
input::placeholder { color: var(--muted-2); }
input:focus, select:focus { outline: 2px solid rgba(16, 185, 129, 0.55); outline-offset: 0; border-color: var(--green-dark); }
label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
label > input, label > select { margin-top: 6px; color: var(--text); font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; gap: 10px; align-items: center; grid-column: span 2; flex-wrap: wrap; }
.filter-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 12px; margin: 16px 0 6px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.file-btn { position: relative; overflow: hidden; }
.alert { border-radius: var(--radius-sm); padding: 13px 16px; font-size: 0.9rem; margin-bottom: 20px; }
.alert-danger { background: var(--red-soft); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.25); }
.disclaimer {
  margin-top: 20px; padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.06); color: #d8c58d;
  border: 1px solid rgba(251, 191, 36, 0.16); font-size: 0.85rem;
}

/* ---------- Progress ---------- */
.progress { height: 9px; background: rgba(148, 163, 184, 0.12); border-radius: 999px; overflow: hidden; }
.progress-slim { height: 7px; }
.progress-bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green-dark), var(--green-bright));
  transition: width 0.35s ease;
}
.progress-bar.is-over { background: var(--red); }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (min-width: 1200px) {
  .dash-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); }
}
@media (min-width: 700px) and (max-width: 1199px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dash-col:last-child { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .dash-col:last-child .card:first-child { grid-column: span 2; }
}

.hero {
  background:
    radial-gradient(560px 240px at 88% -30%, rgba(16, 185, 129, 0.16), transparent 62%),
    linear-gradient(150deg, #122036, var(--card) 62%);
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-chip {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  color: var(--green-bright); background: var(--green-soft);
  padding: 5px 10px; border-radius: 999px;
}
.hero-value {
  margin-top: 8px;
  font-size: clamp(2rem, 5.4vw, 2.65rem); font-weight: 800; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.hero-stats { display: flex; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.hero-stat {
  display: flex; align-items: center; gap: 11px;
  flex: 1 1 180px;
  background: rgba(10, 15, 26, 0.45);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
}
.stat-ico {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.stat-ico svg { width: 21px; height: 21px; }
.stat-ico.is-in { background: var(--green-soft); color: var(--green-bright); }
.stat-ico.is-out { background: var(--red-soft); color: var(--red); }
.stat-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.stat-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.06rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-divider { height: 1px; background: var(--border); margin: 20px 0 16px; }
.hero-budget-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.hero-budget-total { font-size: 1.12rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-budget-note { margin-top: 9px; color: var(--muted); font-size: 0.85rem; }
.hero-budget-note strong { color: var(--text); }
.hero-check { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 16px 0 9px; }
.hero-check-value { font-weight: 800; font-variant-numeric: tabular-nums; }

/* Pratinjau checklist di dashboard */
.plan-preview { list-style: none; margin: 6px 0 0; padding: 0; }
.pv-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.pv-item + .pv-item { border-top: 1px solid var(--border); }
.pv-check {
  width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
}
.pv-check svg { width: 13px; height: 13px; }
.pv-item.is-done .pv-check { background: var(--green); border-color: var(--green); color: #032117; }
.pv-main { flex: 1 1 auto; min-width: 0; }
.pv-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-item.is-done .pv-name { color: var(--muted); text-decoration: line-through; }
.pv-meta { color: var(--muted-2); font-size: 0.79rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-amount { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.pv-item.is-done .pv-amount { color: var(--muted); }
.add-btn {
  margin-top: 14px; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border-strong);
  background: transparent; color: var(--muted); font-weight: 600; font-size: 0.9rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.add-btn svg { width: 17px; height: 17px; }
.add-btn:hover { color: var(--green-bright); border-color: var(--green-dark); }

/* Harga Binance di dashboard */
.price-rows { list-style: none; margin: 4px 0 0; padding: 0; }
.pr-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; }
.pr-row + .pr-row { border-top: 1px solid var(--border); }
.coin-mark {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem;
  background: var(--surface-3); color: var(--text);
}
.coin-mark.coin-BTC { background: rgba(247, 147, 26, 0.14); color: #f0a840; }
.coin-mark.coin-SOL { background: rgba(148, 108, 255, 0.15); color: #b79cff; }
.coin-mark.coin-ZEC { background: rgba(244, 183, 40, 0.13); color: #ecc25f; }
.pr-main { flex: 1 1 auto; min-width: 0; }
.pr-name { font-weight: 700; font-size: 0.95rem; }
.pr-pair { color: var(--muted-2); font-size: 0.78rem; }
.pr-right { text-align: right; }
.pr-price { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.chg-badge {
  display: inline-block; margin-top: 3px;
  font-size: 0.74rem; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 2.5px 8px; border-radius: 999px;
  background: rgba(148, 163, 184, 0.10); color: var(--muted);
}
.chg-badge.is-up { background: var(--green-soft); color: var(--green-bright); }
.chg-badge.is-down { background: var(--red-soft); color: var(--red); }

/* Portofolio */
.portfolio-total { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.donut-wrap { display: flex; justify-content: center; padding: 14px 0 4px; }
.donut-wrap canvas { max-width: 168px; width: 168px; }
.legend-list { margin-top: 8px; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.lg-pct { color: var(--muted); font-size: 0.8rem; font-weight: 600; }

/* ---------- Daftar umum ---------- */
.list { list-style: none; margin: 6px 0 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.list li + li { border-top: 1px solid var(--border); }
.li-main { flex: 1 1 auto; min-width: 0; }
.li-name { font-weight: 600; font-size: 0.94rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-meta { color: var(--muted-2); font-size: 0.79rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-amount { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.94rem; white-space: nowrap; }
.icon-row { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.icon-row .btn { min-height: 36px; padding: 7px 9px; }
.tx-ico {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-2); color: var(--muted);
}
.tx-ico svg { width: 19px; height: 19px; }
.chip {
  font-size: 0.72rem; font-weight: 700;
  background: var(--card-2); color: var(--muted);
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}

/* ---------- Strip statistik ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 22px; margin-bottom: 20px; }
.stat-strip-3 { grid-template-columns: repeat(3, 1fr); }
.stat-strip-in { margin-bottom: 0; padding: 0; }
.card.stat-strip { margin-bottom: 20px; }
.stat-big { font-size: 1.32rem; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; margin-top: 5px; }
.stat-cell .progress { margin-top: 10px; }

/* ---------- Plan Harian ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.plan-list { list-style: none; margin: 8px 0 0; padding: 0; }
.plan-item { padding: 16px 0; }
.plan-item + .plan-item { border-top: 1px solid var(--border); }
.plan-row { display: flex; align-items: center; gap: 13px; }
.plan-check {
  appearance: none; -webkit-appearance: none;
  width: 26px; height: 26px; flex: 0 0 auto; margin: 0;
  border-radius: 50%; border: 2px solid var(--border-strong);
  background: transparent; cursor: pointer; position: relative;
  min-height: 0; padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.plan-check:checked {
  background: var(--green); border-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23032117' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 14px; background-position: center; background-repeat: no-repeat;
}
.plan-check:focus { outline: 2px solid rgba(16, 185, 129, 0.55); outline-offset: 2px; }
.plan-item.is-done .li-name { color: var(--muted); text-decoration: line-through; }
.plan-amount { text-align: right; flex: 0 0 auto; }
.pa-value { display: block; font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; }
.pa-label { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); margin-top: 1px; }
.plan-item.is-done .pa-value { color: var(--muted); }
.plan-sub {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  margin: 13px 0 0 39px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.plan-sub label { flex: 0 1 170px; }
.plan-sub .icon-row { margin-left: auto; }

/* ---------- Aset ---------- */
.price-status-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.price-status { display: flex; align-items: center; gap: 9px; font-weight: 600; margin-top: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); flex: 0 0 auto; }
.dot-live { background: var(--green-bright); }
.dot-stale { background: var(--amber); }
.dot-error { background: var(--red); }
.asset-grid { grid-template-columns: repeat(3, 1fr); margin-bottom: 20px; }
.asset-head { display: flex; align-items: center; gap: 12px; }
.asset-head .coin-mark { width: 46px; height: 46px; font-size: 1.15rem; }
.asset-name { font-size: 1.05rem; font-weight: 800; }
.asset-pair { color: var(--muted-2); font-size: 0.78rem; font-weight: 600; }
.asset-price { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 16px; }
.asset-change {
  display: inline-block; margin-top: 8px;
  font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(148, 163, 184, 0.10);
}
.asset-change.is-green { background: var(--green-soft); }
.asset-change.is-red { background: var(--red-soft); }
.asset-change:empty { display: none; }
.asset-card canvas { width: 100%; display: block; margin-top: 10px; }
.hold-rows { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 8px; }
.hold-row { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; color: var(--muted); font-size: 0.87rem; }
.hold-row strong { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.asset-target { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.asset-target .progress { margin-top: 10px; }

/* ---------- Bottom navigation (mobile) ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex;
  background: rgba(10, 15, 26, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.bottomnav .nav-btn {
  flex: 1 1 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px 5px;
  background: none; border: none; border-radius: 12px;
  color: var(--muted-2); font-size: 0.7rem; font-weight: 600;
}
.bottomnav .nav-btn svg { width: 23px; height: 23px; }
.bottomnav .nav-btn.is-active { color: var(--green-bright); }
@media (min-width: 1024px) { .bottomnav { display: none; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%) translateY(16px);
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 12px 18px; border-radius: 13px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60; max-width: 92vw; text-align: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); font-size: 0.9rem;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 1024px) { .toast { bottom: 30px; } }

/* ---------- Layar kunci PIN ---------- */
html.boot-locked .shell, html.boot-locked .bottomnav,
body.is-locked .shell, body.is-locked .bottomnav { visibility: hidden; }
body.is-locked { overflow: hidden; }
.pin-lock {
  position: fixed; inset: 0; z-index: 100;
  background:
    radial-gradient(620px 320px at 50% -60px, rgba(16, 185, 129, 0.13), transparent 65%),
    var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; overflow-y: auto;
}
.pin-lock[hidden] { display: none !important; }
.pin-box { width: 100%; max-width: 330px; text-align: center; }
.pin-box.shake { animation: pin-shake 0.4s ease; }
@keyframes pin-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
.pin-logo {
  width: 68px; height: 68px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px;
  background: var(--green-soft); color: var(--green-bright);
}
.pin-logo svg { width: 32px; height: 32px; }
.pin-title { margin: 18px 0 5px; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; }
.pin-sub { margin: 0 0 24px; color: var(--muted); font-size: 0.92rem; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin-bottom: 12px; }
.pin-dot {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--border-strong); background: transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.pin-dot.is-filled { background: var(--green-bright); border-color: var(--green-bright); }
.pin-msg { min-height: 1.5em; margin: 0 0 16px; color: var(--red); font-size: 0.92rem; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; max-width: 272px; margin: 0 auto; }
.pin-pad.is-disabled { opacity: 0.4; pointer-events: none; }
.pin-key {
  height: 60px; border-radius: 50%; cursor: pointer;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); font-size: 1.35rem; font-weight: 600;
  transition: background 0.12s ease;
}
.pin-key:active { background: var(--green-soft); border-color: var(--green-dark); }
.pin-key-back { font-size: 1.1rem; color: var(--muted); }
.pin-key-spacer { display: block; }

/* ---------- Responsif: layout khusus HP ---------- */
@media (max-width: 1023px) {
  .topbar-tag { display: none; }
  .topbar-inner { padding: 11px 16px; }
  .brand-mobile .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-mobile .brand-mark svg { width: 20px; height: 20px; }
  .brand-mobile .brand-name { font-size: 1.08rem; }
  .rate-chip { padding: 7px 11px; font-size: 0.78rem; }
  .rate-label { display: none; }
  .lock-btn span { display: none; }
  .lock-btn { padding: 8px 10px; }
  .container { padding: 20px 16px 118px; }
  .page-title { font-size: 1.42rem; }
  .card { padding: 19px 17px; border-radius: 18px; }
  .hero-value { letter-spacing: -0.025em; }
  .hero-stat { flex: 1 1 140px; padding: 12px 13px; }
  .stat-value { font-size: 0.99rem; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .filter-grid .filter-search { grid-column: span 2; }
  .form-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-strip-3 { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .stat-big { font-size: 1.12rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: 1fr; }
  .plan-sub { margin-left: 0; }
  .li-meta { white-space: normal; }
  .pv-meta { white-space: normal; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-actions { grid-column: span 1; }
  .stat-strip-3 { grid-template-columns: 1fr; gap: 14px; }
  .hero-stats { flex-direction: column; }
  .hero-stat { flex: 1 1 auto; }
  .toolbar .btn { flex: 1 1 auto; }
  .price-status-card { align-items: stretch; }
  .price-status-card .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .page.is-active { animation: none; }
  .rate-dot { animation: none; }
  .progress-bar { transition: none; }
}

/* ---------- Grafik arus kas & grafik harga besar ---------- */
.cash-card { margin-top: 20px; }
.cash-card canvas, .big-chart-card canvas { width: 100%; display: block; }
.cash-legend { display: flex; gap: 18px; flex-wrap: wrap; }
.legend-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.legend-chip strong { color: var(--text); font-variant-numeric: tabular-nums; }
.chart-head { align-items: flex-start; flex-wrap: wrap; }
.chart-head .card-sub { margin: 3px 0 0; }
.chart-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.seg {
  display: inline-flex; gap: 2px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px;
}
.seg-btn {
  border: none; background: transparent; cursor: pointer;
  padding: 7px 15px; border-radius: 999px;
  color: var(--muted); font-weight: 700; font-size: 0.82rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.is-active { background: var(--green-soft); color: var(--green-bright); }
.big-chart-stats { display: flex; align-items: center; gap: 13px; margin: 10px 0 6px; flex-wrap: wrap; }
.big-price { font-size: 1.65rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.big-chart-stats .chg-badge { margin-top: 0; font-size: 0.82rem; padding: 4px 11px; }
.big-chart-card { margin-bottom: 20px; }
@media (max-width: 1023px) {
  .chart-controls { width: 100%; }
  .chart-controls .seg { flex: 1 1 auto; }
  .chart-controls .seg-btn { flex: 1 1 0; }
  .cash-legend { gap: 12px; }
  .big-price { font-size: 1.4rem; }
}

.ohlc-row {
  display: flex; gap: 10px 20px; flex-wrap: wrap;
  margin: 0 0 8px; color: var(--muted);
  font-size: 0.82rem; font-weight: 600;
}
.ohlc-row strong { color: var(--text); font-variant-numeric: tabular-nums; margin-left: 4px; }

.tv-chart {
  height: 460px; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--bg-soft);
}
.tv-chart iframe { border: 0; }
#big-chart[hidden] { display: none; }
@media (max-width: 1023px) { .tv-chart { height: 400px; } }
