:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #f2f0ea;
  --ink: #1b1a17;
  --ink-2: #55534c;
  --ink-3: #6e6c64;
  --line: #e7e4dc;
  --accent: #8a6100;
  --accent-soft: #fbf3dc;
  --gold: #d9a520;
  --on-gold: #1c1606;
  --side-bg: #16150f;
  --side-ink: #e8e4d8;
  --side-ink-2: #a9a497;
  --side-ink-3: #8f8b7f;
  --side-line: #2a2820;
  --side-hover: #201e17;
  --side-active: #2b2513;
  --up: #008300;
  --up-soft: #e3f3e3;
  --down: #d03b3b;
  --down-soft: #fbe9e9;
  --warn: #8a5a00;
  --warn-soft: #fdf1d3;
  --candle-up: #008300;
  --candle-down: #e34948;
  --ema-fast: #eb6834;
  --ema-slow: #2a78d6;
  --chart-grid: #efeeea;
  --chart-axis: #6f6f6a;
  --shadow: 0 1px 2px rgba(20, 18, 10, .04), 0 12px 32px rgba(20, 18, 10, .05);
  --radius: 16px;
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
html.dark {
  --bg: #0f0f0d;
  --surface: #181816;
  --surface-2: #22211e;
  --ink: #f1efe8;
  --ink-2: #b4b1a8;
  --ink-3: #8f8c83;
  --line: #2b2a26;
  --accent: #e0b23a;
  --accent-soft: #2b2412;
  --gold: #e0b23a;
  --on-gold: #1c1606;
  --side-bg: #0b0b09;
  --side-line: #1f1e1a;
  --side-hover: #16150f;
  --side-active: #231e10;
  --up: #0ca30c;
  --up-soft: #10260f;
  --down: #e66767;
  --down-soft: #331717;
  --warn: #d9a514;
  --warn-soft: #2e2508;
  --candle-up: #0ca30c;
  --candle-down: #e66767;
  --ema-fast: #d95926;
  --ema-slow: #3987e5;
  --chart-grid: #252523;
  --chart-axis: #8f8e88;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h2, h3, p, dl, dd, ul, ol { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.up { color: var(--up); }
.down { color: var(--down); }
.warn { color: var(--warn); }
.muted { color: var(--ink-3); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── kerangka: menu samping + isi ── */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 14px 16px;
  background: var(--side-bg); color: var(--side-ink);
  scrollbar-width: thin; scrollbar-color: var(--side-line) transparent;
}
.side-head { padding: 2px 6px 4px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand .logo { flex: none; }
.brand b { display: block; font-size: 16px; font-weight: 750; letter-spacing: .02em; line-height: 1.2; }
.brand span { display: block; font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.side .brand b { color: var(--side-ink); }
.side .brand span { color: var(--side-ink-3); }
.side-acct .seg { display: flex; width: 100%; background: var(--side-hover); border-radius: 11px; }
.side-acct .seg button { flex: 1; color: var(--side-ink-2); padding: 7px 8px; }
.side-acct .seg button:hover { color: var(--side-ink); }
.side-acct .seg button.on { background: var(--gold); color: var(--on-gold); box-shadow: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--side-ink-3); padding: 14px 10px 6px; }
.nav-group:first-child { padding-top: 4px; }
.nav button {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%;
  border: 0; background: none; color: var(--side-ink-2);
  padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; text-align: left;
}
.nav button svg { flex: none; opacity: .9; }
.nav button:hover { background: var(--side-hover); color: var(--side-ink); }
.nav button.on { background: var(--side-active); color: var(--gold); }
.nav button.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav button:focus-visible { outline-color: var(--gold); }
.side-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 12px 10px 0; border-top: 1px solid var(--side-line); font-size: 12px; color: var(--side-ink-3); }
.side-foot a { color: var(--side-ink-2); text-decoration: none; margin-left: auto; font-weight: 600; }
.side-foot a:hover { color: var(--gold); }
.scrim { position: fixed; inset: 0; z-index: 25; background: rgba(10, 9, 6, .45); }

.content { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 28px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; min-width: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ticker { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.ticker b { color: var(--ink); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.menu-btn { display: none !important; }
.pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--warn);
  background: var(--warn-soft);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill.real { color: #fff; background: var(--down); }
.pill.live { color: var(--up); background: var(--up-soft); }
.gate { border-color: var(--accent); }
.gate-head { margin-bottom: 16px; }
.gate-head h2 { font-size: 17px; color: var(--ink); margin-bottom: 6px; }
.mt5-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mt5-form label { display: flex; flex-direction: column; gap: 6px; }
.mt5-form input { width: 100%; font-size: 15px; }
.mt5-form label small { font-weight: 400; color: var(--ink-3); }
.mt5-more { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.mt5-more[open] { padding-bottom: 12px; }
.mt5-more > summary { cursor: pointer; padding: 10px 0; font-size: 13.5px; font-weight: 600; }
.mt5-more label { margin-top: 10px; }
.mt5-form .form-actions { grid-column: 1 / -1; margin-top: 0; }
.acct-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.acct-box .kv { align-content: start; }
.checklist { list-style: none; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.checklist li b { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.checklist li.ok b { background: var(--up-soft); color: var(--up); }
.checklist li.no b { background: var(--down-soft); color: var(--down); }
.realbox { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--down); border-radius: 12px; background: var(--down-soft); }
.realbox h3 { margin-top: 0; color: var(--down); }
.realbox label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; color: var(--ink); margin: 8px 0; }
.realbox input[type="text"] { width: 220px; }
.keyval { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; letter-spacing: .02em; }
.note-warn { padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; font-weight: 600; }
.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  color: var(--ink-2);
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.icon-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 14px 0 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-2);
}
.switch .track { width: 34px; height: 20px; border-radius: 999px; background: var(--ink-3); position: relative; transition: background .15s; flex: none; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { color: var(--ink); }
.switch.on .track { background: var(--up); }
.switch.on .knob { transform: translateX(14px); }
.switch:disabled { opacity: .5; cursor: default; }

.banner {
  width: calc(100% - 56px);
  max-width: 1184px;
  margin: 14px auto 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--down-soft);
  color: var(--down);
  font-weight: 600;
  font-size: 14px;
}

main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 20px 28px 36px; display: grid; gap: 16px; }
.views { display: grid; gap: 16px; min-width: 0; }
#tab-overview { display: grid; gap: 14px; min-width: 0; }
.views > .tab:not(.view-plain) {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; min-width: 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card h2, .eyebrow { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .01em; }
.count { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border-radius: 999px; padding: 2px 9px; }

/* ── hero: saldo + posisi ── */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; }
.balance { display: flex; flex-direction: column; }
.hero-num { font-size: clamp(38px, 5.2vw, 54px); font-weight: 650; letter-spacing: -.03em; line-height: 1.1; margin-top: 6px; }
.delta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13.5px; color: var(--ink-3); min-height: 26px; }
.delta { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.delta.up { background: var(--up-soft); color: var(--up); }
.delta.down { background: var(--down-soft); color: var(--down); }
.mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: auto; padding-top: 22px; }
.mini div { min-width: 0; }
.mini dt { font-size: 12px; color: var(--ink-3); }
.mini dd { font-size: 17px; font-weight: 650; letter-spacing: -.01em; margin-top: 2px; }
.mini small { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }

.pos + .pos { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.pos-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pos-id { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.pos-id b { color: var(--ink); font-weight: 600; }
.pos-pl { text-align: right; }
.pos-pl b { display: block; font-size: 28px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pos-pl span { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.meter { position: relative; height: 8px; border-radius: 999px; background: var(--surface-2); margin: 22px 7px 8px; }
.meter .fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.meter .fill.up { background: var(--up); }
.meter .fill.down { background: var(--down); }
.meter .tick { position: absolute; top: -5px; width: 2px; height: 18px; margin-left: -1px; background: var(--ink-2); border-radius: 1px; }
.meter .tick.sl { background: var(--down); width: 3px; margin-left: -1.5px; }
.meter .tick.goal { background: var(--accent); top: -3px; height: 14px; }
.meter .safe { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px 0 0 999px; background: repeating-linear-gradient(135deg, var(--line) 0 3px, var(--surface) 3px 6px); }
.meter-key { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--ink-3); margin: 0 0 12px; }
.meter-key i { display: inline-block; width: 2px; height: 10px; background: var(--accent); vertical-align: -1px; margin-right: 5px; }
.meter .now { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.levels div:nth-child(2) { text-align: center; }
.levels div:nth-child(3) { text-align: right; }
.levels span { display: block; font-size: 12px; color: var(--ink-3); }
.levels b { display: block; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.levels small { display: block; font-size: 12px; color: var(--ink-2); }
.pos-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pos-foot p { font-size: 13.5px; color: var(--ink-2); flex: 1 1 260px; }
.pos-foot p b { color: var(--ink); font-weight: 600; }
.empty { color: var(--ink-3); font-size: 14px; padding: 6px 0; }
.empty strong { display: block; color: var(--ink); font-size: 17px; font-weight: 650; margin-bottom: 4px; }
.empty b { color: var(--ink); font-weight: 600; }
.empty p + p { margin-top: 8px; }

/* ── tag ── */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.buy, .tag.good { background: var(--up-soft); color: var(--up); }
.tag.sell, .tag.bad { background: var(--down-soft); color: var(--down); }

/* ── baris status ── */
.statusline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
.statusline.run .dot, .dot.live { background: var(--up); }
.statusline.wait .dot, .dot.idle { background: var(--warn); }
.statusline.off .dot, .dot.bad { background: var(--down); }
.statusline.run .dot { box-shadow: 0 0 0 0 var(--up); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(12, 163, 12, .45); } 70%, 100% { box-shadow: 0 0 0 8px rgba(12, 163, 12, 0); } }
@media (prefers-reduced-motion: reduce) { .statusline.run .dot { animation: none; } .switch .track, .switch .knob { transition: none; } }
.status-text { flex: 1 1 220px; min-width: 0; color: var(--ink-2); }
.status-text b { color: var(--ink); font-weight: 600; margin-right: 8px; }
.status-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip b { font-weight: 600; color: var(--ink); }

/* ── chart ── */
.chart-card { padding-bottom: 16px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.quote { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.sym { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.price { font-size: 26px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.feed { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 5px 13px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.chart-wrap { position: relative; height: 400px; }
.chart-wrap canvas, .bt-chart canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.tip {
  position: absolute;
  top: 8px;
  z-index: 2;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-2);
  white-space: nowrap;
}
.tip b { color: var(--ink); font-weight: 600; }
.tip .t { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.tip .r { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.tip i { display: inline-block; width: 10px; height: 2px; vertical-align: middle; margin-right: 5px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 8px; height: 12px; border-radius: 2px; }
.sw.c-up { border: 1.5px solid var(--candle-up); }
.sw.c-down { background: var(--candle-down); }
.sw.line { width: 16px; height: 2px; border-radius: 1px; }
.sw.ema-f { background: var(--ema-fast); }
.sw.ema-s { background: var(--ema-slow); }
.sw.dash { width: 16px; height: 0; border-radius: 0; border-top: 2px dashed; }
.sw.tp { border-color: var(--candle-up); }
.sw.sl { border-color: var(--candle-down); }

/* ── isi menu ── */
.tab h3 { font-size: 14px; font-weight: 650; margin: 24px 0 8px; }
.tab h3.first, .tab .first { margin-top: 0; }
.hint { font-size: 13.5px; color: var(--ink-2); margin-bottom: 12px; }
.tab-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--down); }
.btn.danger:hover { border-color: var(--down); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.small { height: 32px; font-size: 13px; padding: 0 12px; }
.btn.armed { background: var(--down); border-color: var(--down); color: #fff; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.table-wrap.tall { max-height: 420px; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { position: sticky; top: 0; background: var(--surface); font-size: 12px; font-weight: 600; color: var(--ink-3); z-index: 1; }
th.num, td.num { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
td { font-variant-numeric: tabular-nums; }
td.empty { text-align: center; padding: 28px 12px; white-space: normal; }

.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 22px; }
.kv div { min-width: 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.kv dt { font-size: 12px; color: var(--ink-3); }
.kv dd { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.kv .wide { grid-column: 1 / -1; }
.kv .wide dd { font-weight: 400; color: var(--ink-2); }

.log { list-style: none; padding: 0; max-height: 380px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.log.short { max-height: 230px; }
.log li { display: flex; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.log li:last-child { border-bottom: 0; }
.log time { flex: none; width: 96px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.log span { min-width: 0; overflow-wrap: anywhere; }
.log li.open span, .log li.hit span { color: var(--accent); font-weight: 600; }
.log li.win span { color: var(--up); font-weight: 600; }
.log li.loss span { color: var(--down); font-weight: 600; }

/* ── pengaturan ── */
label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
label small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); }
input[type="number"], input[type="text"], input[type="password"], select {
  height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 0 10px;
  min-width: 0;
}
input[type="checkbox"] { width: 18px; height: 18px; flex: none; accent-color: var(--gold); }
input[type="file"] { font-size: 13.5px; max-width: 100%; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label, .kv-form .checks label { display: inline-flex; flex-direction: row; align-items: center; gap: 7px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.kv-form .checks input[type="checkbox"] { width: 18px; }
.sub { border: 1px solid var(--line); border-radius: 14px; padding: 18px; min-width: 0; }
.sub > :first-child { margin-top: 0; }
.sub h3 { display: flex; align-items: center; gap: 8px; }
.acct-box > .sub { align-self: start; }
.step { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--on-gold); font-size: 12px; font-weight: 700; flex: none; }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.quick label { display: flex; flex-direction: column; gap: 2px; }
.quick input, .quick select { margin-top: 6px; width: 100%; font-size: 16px; font-weight: 600; }
.quick label.dim { opacity: .5; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.msg { font-size: 13.5px; color: var(--ink-2); }
.msg.up { color: var(--up); }
.msg.down { color: var(--down); }
.msg.warn { color: var(--warn); }
.adv { margin-top: 22px; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.adv[open] { padding-bottom: 16px; }
.adv > summary { cursor: pointer; padding: 13px 0; font-weight: 600; font-size: 14px; }
.adv > summary span { font-weight: 400; font-size: 13px; margin-left: 6px; }
.settings { display: grid; gap: 8px; }
.group { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.group[open] { padding-bottom: 12px; }
.group > summary { cursor: pointer; padding: 10px 0; font-size: 13.5px; font-weight: 600; }
.group > summary span { font-weight: 400; font-size: 12.5px; color: var(--ink-3); margin-left: 6px; }
.group > summary .chg { color: var(--accent); font-weight: 600; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px 18px; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.field label { font-weight: 400; color: var(--ink-2); min-width: 0; }
.field input[type="number"], .field input[type="text"] { width: 92px; height: 32px; flex: none; text-align: right; }
.field.changed label { color: var(--accent); font-weight: 600; }
.reset-box { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.reset-box h3 { margin: 0 0 2px; }
.reset-box .hint { margin: 0; }
.row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.row label { display: flex; flex-direction: column; gap: 6px; }
.row .msg { align-self: center; }

/* ── uji data lama ── */
#btResult { margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.stat .label { font-size: 12px; color: var(--ink-3); }
.stat .value { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin-top: 2px; }
.stat .sub { font-size: 12px; color: var(--ink-3); }
.bt-note { font-size: 13.5px; color: var(--ink-2); margin: 14px 0 6px; }
.bt-chart { position: relative; height: 240px; margin-top: 8px; }
.bt-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 18px; }

/* ── cara kerja ── */
.prose { max-width: 760px; font-size: 14.5px; color: var(--ink-2); }
.prose p { margin-bottom: 10px; }
.prose h3 { color: var(--ink); font-size: 15px; }
.prose b { color: var(--ink); font-weight: 600; }
.prose ol, .prose ul { padding-left: 20px; margin-bottom: 10px; }
.prose li { margin-bottom: 6px; }
.prose .table-wrap { max-width: 520px; margin-bottom: 8px; }
.prose td:first-child, .prose th:first-child { white-space: normal; }


.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 20; max-width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .16); padding: 10px 14px; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.toast b { display: block; color: var(--ink); font-weight: 600; }
.toast.win { border-left-color: var(--up); }
.toast.loss { border-left-color: var(--down); }

@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .bt-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 30; width: min(280px, 86vw); height: auto; transform: translateX(-104%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  body.nav-open .side { transform: none; }
  .menu-btn { display: grid !important; flex: none; }
  .topbar { padding: 10px 16px; gap: 10px; }
  main { padding: 16px 16px 28px; }
  .banner { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topbar h1 { font-size: 17px; flex: 1 1 0; }
  .topbar-meta { order: 4; flex: 1 1 100%; justify-content: space-between; }
  .top-actions { gap: 6px; }
  .hide-sm { display: none; }
  .switch { padding-right: 10px; }
  #autoLabel { font-size: 13px; }
  main { padding: 12px 12px 24px; gap: 12px; }
  .views, #tab-overview { gap: 12px; }
  .views > .tab:not(.view-plain) { padding: 16px; border-radius: 14px; }
  .card { padding: 16px; border-radius: 14px; }
  .mini { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .chart-wrap { height: 300px; }
  .price { font-size: 22px; }
  .quick { grid-template-columns: minmax(0, 1fr); }
  .mt5-form, .acct-box { grid-template-columns: minmax(0, 1fr); }
  .pos-top { flex-direction: column; gap: 8px; }
  .pos-pl { text-align: left; }
  .pos-pl b { font-size: 26px; }
  .status-chips { flex-basis: 100%; }
  .levels b { font-size: 14.5px; }
  .log time { width: 78px; }
  .prose th, .prose td { padding: 8px 10px; }
}

/* ── akun user (teman) ── */
.kv-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.kv-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.kv-form input, .kv-form select { width: 100%; font-size: 15px; }
.kv-form .form-actions { grid-column: 1 / -1; margin-top: 0; }
.role-user [data-close] { display: none; }
#tab-me .acct-box + h3 { margin-top: 18px; }
@media (max-width: 720px) { .kv-form { grid-template-columns: 1fr; } }
