/* Inter (SIL OFL 1.1), self-hosted from @fontsource/inter 5.0.8 */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-vietnamese-400-normal.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-vietnamese-500-normal.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-vietnamese-600-normal.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-vietnamese-700-normal.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  color-scheme: dark;
  --bg: #070b16; --bg-2: #0b1122; --panel: #0f1730; --panel-2: #152044; --line: #1c2748; --grid: #1a2442;
  --text: #e8edf9; --muted: #7d8bb0; --accent: #12b886; --accent-ink: #02130d;
  --up: #14c78b; --down: #ff4565; --warn: #f5b301; --tag: #f5b301; --tag-ink: #1b1300;
  --ma-fast: #e6458a; --ma-slow: #2dc4b6;
  --radius: 12px; --shadow: 0 10px 40px rgba(0,0,0,.5);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.2; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.1rem; }
h3 { font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.mono { font-family: var(--font); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .up { color: var(--up); } .down { color: var(--down); } .warn { color: var(--warn); }

#env-banner { background: var(--warn); color: #1b1300; text-align: center; font-size: .72rem; font-weight: 800; padding: 3px 8px; letter-spacing: .08em; }
main { max-width: 1280px; margin: 0 auto; padding: 20px; outline: none; }
main.wide { max-width: none; padding: 10px 12px 16px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 14px; }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 5px; font-size: .78rem; color: var(--muted); font-weight: 600; }
input, select, textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button { font: inherit; font-weight: 700; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: 9px 14px; cursor: pointer; transition: filter .12s, border-color .12s; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
button.small { padding: 4px 10px; font-size: .78rem; }
button.ghost { background: transparent; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 11px; color: var(--muted); border-radius: 7px; font-size: .8rem; }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

.stat { display: grid; gap: 2px; } .stat .v { font-size: 1.5rem; font-weight: 800; } .stat .k { color: var(--muted); font-size: .76rem; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .72rem; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); }
.badge.ok { color: var(--up); } .badge.bad { color: var(--down); } .badge.wait { color: var(--warn); }
.notice { padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-2); font-size: .86rem; }
.notice.warn { border-color: #6b5200; } .notice.err { border-color: #7a2133; }
code, .secret { font-family: var(--mono); background: var(--bg); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }

/* ---------- trading terminal ---------- */
.terminal { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.chart-card { padding: 0; overflow: hidden; display: grid; grid-template-rows: auto 1fr; background: #060a14; }
.chart-top { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.asset-pick { position: relative; display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px 4px 6px; }
.asset-pick .coin { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; background: #f7931a; color: #fff; }
.asset-pick .coin.fx { background: var(--accent); }
.asset-pick select { width: auto; border: 0; background: transparent; padding: 4px 2px; font-weight: 700; appearance: none; cursor: pointer; }
.last-price { font-size: 1.25rem; font-weight: 800; }
.signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.signal i { width: 3px; background: var(--line); border-radius: 1px; }
.signal i:nth-child(1) { height: 5px; } .signal i:nth-child(2) { height: 8px; } .signal i:nth-child(3) { height: 11px; } .signal i:nth-child(4) { height: 14px; }
.signal[data-q="good"] i { background: var(--up); }
.signal[data-q="ok"] i:nth-child(-n+2) { background: var(--warn); }
.signal[data-q="bad"] i:nth-child(1) { background: var(--down); }
.spacer { flex: 1; }
.chart-wrap { position: relative; height: clamp(380px, 62vh, 640px); background: #060a14; isolation: isolate; }
.chart-wrap::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url('/world.png') center / contain no-repeat; opacity: .34; pointer-events: none; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.readout { position: absolute; left: 12px; top: 10px; display: flex; gap: 12px; font: 11px var(--font); color: var(--muted); pointer-events: none; }
.readout b { color: var(--text); font-weight: 600; }
.status-pill { position: absolute; right: 90px; top: 10px; font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: rgba(245,179,1,.12); color: var(--warn); border: 1px solid rgba(245,179,1,.3); }
.status-pill.live { background: rgba(20,199,139,.1); color: var(--up); border-color: rgba(20,199,139,.3); }

.ticket { display: grid; gap: 12px; position: sticky; top: 56px; }
.ticket .balance { display: flex; justify-content: space-between; align-items: baseline; }
.ticket .balance .v { font-size: 1.15rem; font-weight: 800; }
.amount { display: grid; grid-template-columns: 1fr; gap: 8px; }
.amount-input { position: relative; }
.amount-input input { font-size: 1.1rem; font-weight: 700; padding: 11px 12px; font-family: var(--font); }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quick button { padding: 6px 0; font-size: .78rem; color: var(--muted); }
.durations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.durations button { padding: 8px 0; background: var(--bg); }
.durations button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: var(--panel-2); }
.payout-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg-2); display: grid; gap: 4px; }
.payout-box .pct { font-size: 1.7rem; font-weight: 800; color: var(--up); line-height: 1; }
.payout-box .gain { font-size: 1rem; font-weight: 700; color: var(--up); font-family: var(--font); }
.trade-btns { display: grid; gap: 10px; }
.trade-btn { padding: 15px 10px; font-size: 1.05rem; letter-spacing: .04em; border: 0; color: #031a10; display: flex; justify-content: space-between; align-items: center; }
.trade-btn small { font-weight: 600; opacity: .8; font-size: .75rem; letter-spacing: 0; }
.trade-btn.up-btn { background: var(--up); } .trade-btn.down-btn { background: var(--down); color: #fff; }
.trade-btn:hover:not(:disabled) { filter: brightness(1.1); }

.orders-card { margin-top: 12px; }
.orders-card .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

.auth { max-width: 420px; margin: 8vh auto 0; }
.auth h1 { text-align: center; } .auth .tabs { margin-bottom: 14px; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 30; }
.toast { background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 9px; box-shadow: var(--shadow); max-width: 340px; }
.toast.err { border-left-color: var(--down); } .toast.win { border-left-color: var(--up); }
.modal-back { position: fixed; inset: 0; background: rgba(2,5,12,.7); display: grid; place-items: center; z-index: 20; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; width: min(440px, 100%); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: slide .18s ease-out; } @keyframes slide { from { transform: translateY(8px); opacity: 0; } } }

@media (max-width: 960px) {
  .terminal { grid-template-columns: 1fr; }
  .ticket { position: static; }
  .chart-wrap { height: 52vh; min-height: 320px; }
    main { padding: 14px; } main.wide { padding: 8px; }
  .status-pill { display: none; }
}

/* ---------- app shell: left sidebar + top bar ---------- */
.app { display: block; }
body.authed .app { display: grid; grid-template-columns: 84px minmax(0, 1fr); min-height: 100vh; }
.content { min-width: 0; }
#sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 8px; background: var(--bg-2); border-right: 1px solid var(--line); }
#sidebar[hidden], #topbar[hidden] { display: none; }
#sidebar .logo { width: 40px; height: 40px; margin: 2px auto 14px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-weight: 900; font-size: 1.15rem; }
#sidebar a, .side-btn { display: grid; justify-items: center; gap: 3px; padding: 10px 2px 8px; border-radius: 11px; color: var(--muted); font-size: .68rem; font-weight: 600; background: transparent; border: 0; cursor: pointer; }
#sidebar a:hover, .side-btn:hover { color: var(--text); background: var(--panel); }
#sidebar a[aria-current="page"] { color: var(--accent); background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
#sidebar .grow { flex: 1; }
#topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; background: var(--bg-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-title { font-weight: 800; font-size: 1.05rem; }
.top-right { display: flex; align-items: center; gap: 12px; }
.balance-chip { display: grid; text-align: right; line-height: 1.15; padding: 4px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.balance-chip .acct { font-size: .68rem; color: var(--muted); font-weight: 600; }
.balance-chip .amt { font-size: 1.05rem; font-weight: 800; color: var(--up); }
.deposit-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink); border: 0; padding: 9px 16px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-weight: 800; }

/* ---------- trading ticket (sample structure) ---------- */
.ticket { display: grid; gap: 14px; position: sticky; top: 64px; }
.field { display: grid; gap: 8px; }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.stepper > button { border: 0; border-radius: 0; background: var(--panel-2); display: grid; place-items: center; padding: 0; height: 46px; }
.stepper-in { display: flex; align-items: center; padding: 0 8px; gap: 4px; }
.stepper-in .cur { color: var(--muted); font-weight: 700; }
.stepper-in input { border: 0; background: transparent; font-size: 1.25rem; font-weight: 800; font-family: var(--font); padding: 8px 2px; text-align: left; }
.quick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.quick button { padding: 7px 0; font-size: .74rem; color: var(--muted); background: var(--bg); }
.payout-box .payout-line { display: flex; justify-content: space-between; align-items: baseline; }
.payout-box .pct { font-size: 1.9rem; font-weight: 800; color: var(--up); line-height: 1; }
.payout-box .gain { font-size: 1.05rem; font-weight: 800; color: var(--up); }
.small-note { font-size: .74rem; }
.trade-btns { display: grid; gap: 10px; }
.trade-btn { padding: 0 18px; height: 54px; font-size: 1.1rem; letter-spacing: .02em; border: 0; color: #031a10; display: flex; justify-content: space-between; align-items: center; border-radius: 12px; }
.trade-btn .arrow { font-size: 1.1rem; }
.trade-btn.up-btn { background: var(--up); } .trade-btn.down-btn { background: var(--down); color: #fff; }
.pending { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.pending[hidden] { display: none; }
.pend-row { display: grid; grid-template-columns: 20px 1fr auto auto; gap: 8px; align-items: center; font-size: .86rem; }

.recent { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--bg-2); overflow-x: auto; font-size: .78rem; white-space: nowrap; }
.recent-label { color: var(--muted); font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.chip { padding: 2px 9px; border-radius: 99px; font: 700 .75rem var(--font); border: 1px solid var(--line); background: var(--panel); }
.chip.win { color: var(--up); border-color: rgba(20,199,139,.4); } .chip.lose { color: var(--down); border-color: rgba(255,69,101,.4); } .chip.tie, .chip.void { color: var(--muted); }
.chart-card { grid-template-rows: auto 1fr auto; }
.tabs-lite { display: inline-flex; gap: 4px; }
.tabs-lite button { background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); padding: 4px 12px; font-size: .78rem; letter-spacing: .06em; }
.tabs-lite button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--accent); }
td.empty { text-align: center; padding: 22px; }
.readout b { margin-right: 4px; }

@media (max-width: 960px) {
  body.authed .app { grid-template-columns: 1fr; padding-bottom: 66px; }
  #sidebar { position: fixed; inset: auto 0 0 0; height: 62px; flex-direction: row; padding: 4px 8px; z-index: 12; border-right: 0; border-top: 1px solid var(--line); gap: 2px; }
  #sidebar .logo, #sidebar .grow { display: none; }
  #sidebar a, .side-btn { flex: 1; padding: 6px 2px; }
  #topbar { padding: 8px 12px; }
  .top-title { display: none; }
  .top-right { width: 100%; justify-content: space-between; }
  .ticket { position: static; }
}

/* ---------- layout v2: full-bleed chart + narrow ticket column (matches reference layout) ---------- */
main.wide { padding: 0; }
.terminal { display: grid; grid-template-columns: minmax(0, 1fr) 214px; gap: 0; align-items: stretch; min-height: calc(100vh - 66px); }
.stage { display: grid; grid-template-rows: 1fr auto; min-width: 0; }
.chart-card { padding: 0; border: 0; border-radius: 0; background: #060a14; display: block; overflow: hidden; }
.chart-wrap { height: clamp(420px, calc(100vh - 66px - 190px), 820px); }
.overlay { position: absolute; left: 10px; top: 8px; display: grid; gap: 6px; pointer-events: none; z-index: 2; }
.overlay > * { pointer-events: auto; }
.overlay-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.overlay .readout { position: static; pointer-events: none; margin-top: 2px; }
.overlay .seg { background: rgba(8,12,26,.72); backdrop-filter: blur(4px); }
.asset-pick { background: rgba(15,23,48,.85); }
.status-pill { right: 90px; }
.panel { background: var(--bg-2); border-top: 1px solid var(--line); min-height: 170px; }
.panel .tabs-lite { padding: 0 8px; border-bottom: 1px solid var(--line); display: flex; }
.panel .tabs-lite button { padding: 12px 16px; font-size: .82rem; letter-spacing: 0; }
.panel-body { padding: 8px 12px 14px; }
.panel-body .recent { background: transparent; border: 0; flex-wrap: wrap; padding: 10px 0; white-space: normal; }
.panel-body .recent[hidden], .panel-body .table-wrap[hidden] { display: none; }

.ticket { position: static; display: flex; flex-direction: column; gap: 14px; padding: 14px 14px 18px; background: var(--bg); border-left: 1px solid var(--line); }
.ticket .stepper { grid-template-columns: 38px 1fr 38px; }
.ticket .stepper > button { height: 40px; font-size: 1.2rem; font-weight: 700; }
.ticket .stepper-in input { font-size: 1.05rem; }
.ticket .quick { grid-template-columns: repeat(3, 1fr); }
.ticket .quick button { padding: 9px 0; font-size: .82rem; background: var(--panel); }
.payout-box { text-align: center; background: transparent; border: 0; padding: 4px 0; }
.payout-box .payout-line { justify-content: center; gap: 8px; align-items: baseline; color: var(--text); font-weight: 600; }
.payout-box .pct { font-size: 1.25rem; color: #ff3f7a; line-height: 1.2; }
.payout-box .gain { font-size: 2rem; font-weight: 800; color: var(--up); line-height: 1.15; margin: 4px 0; }
.trade-btn { height: 56px; font-size: 1.15rem; justify-content: center; gap: 8px; }
.waitbox { display: grid; gap: 2px; justify-items: center; padding: 10px 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
.waitbox .wt { font-size: .82rem; font-weight: 600; }
.waitbox .wv { font-size: 1.15rem; font-weight: 800; }
.ticket .small-note { text-align: center; }

/* top bar like the reference: yellow quick-deposit button */
.deposit-btn { background: var(--tag); color: var(--tag-ink); }
.balance-chip { background: var(--panel); }
.balance-chip .amt { color: var(--text); }
#sidebar { width: 96px; }
body.authed .app { grid-template-columns: 96px minmax(0, 1fr); }

@media (max-width: 960px) {
  body.authed .app { grid-template-columns: 1fr; }
  .terminal { grid-template-columns: 1fr; min-height: 0; }
  .chart-wrap { height: 54vh; min-height: 340px; }
  .ticket { border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .ticket .field { grid-column: 1 / -1; }
  .payout-box { grid-column: 1 / -1; }
  .ticket > .trade-btn, .waitbox { grid-column: auto; }
  .ticket > .down-btn { grid-column: 1 / -1; }
  .waitbox { grid-column: 1 / -1; }
  .ticket > .down-btn { order: 3; } .ticket > .up-btn { order: 1; } .waitbox { order: 2; }
}

.top-link { display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 8px; } .top-link:hover { color: var(--text); }

@media (max-width: 960px) {
  #sidebar { width: 100%; }
  .ticket > .up-btn, .ticket > .down-btn, .waitbox { grid-column: 1 / -1; }
  main.wide { padding-bottom: 8px; }
}

@media (max-width: 960px) { #sidebar a, .side-btn { flex: 1 1 0; min-width: 0; } }

@media (max-width: 960px) {
  body.authed .app { grid-template-columns: minmax(0, 1fr); }
  .terminal { grid-template-columns: minmax(0, 1fr); }
  .stage, .chart-card, .panel, .panel-body, .content { min-width: 0; max-width: 100%; }
  html, body { overflow-x: hidden; }
}

@media (max-width: 960px) { #toasts { bottom: 76px; left: 12px; right: 12px; } .toast { max-width: none; } }

/* amount stepper: three separate rounded pieces */
.stepper, .ticket .stepper { gap: 8px; border: 0; border-radius: 0; overflow: visible; background: transparent; }
.stepper > button, .ticket .stepper > button { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.stepper-in { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 0 12px; transition: border-color .12s, box-shadow .12s; }
.stepper-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(18,184,134,.18); }
.stepper-in input, .stepper-in input:focus { border: 0; outline: none; background: transparent; border-radius: 0; box-shadow: none; }

/* chart corner: asset badge, signal box, OHLC readout (reference layout) */
.overlay { gap: 8px; left: 12px; top: 10px; }
.asset-pick { width: max-content; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 12px; background: rgba(28,36,60,.92); border: 0; }
.asset-pick .coin { width: 32px; height: 32px; border-radius: 9px; font-size: 1rem; }
.asset-pick select { font-size: .95rem; padding: 4px 0; color: var(--text); }
.asset-pick select option { color: #111; }
.sig-box { width: max-content; display: flex; align-items: center; padding: 5px 9px; border-radius: 8px; background: rgba(28,36,60,.92); }
.readout, .overlay .readout { display: grid; grid-template-columns: repeat(3, max-content); gap: 5px 26px; margin-top: 6px; font: 400 .92rem var(--font); font-variant-numeric: tabular-nums; color: var(--text); letter-spacing: .01em; }
.readout b { font-weight: 700; margin: 0; }
.chart-tools { position: absolute; right: 84px; top: 10px; z-index: 2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chart-tools .seg { background: rgba(8,12,26,.72); backdrop-filter: blur(4px); }
.chart-tools .status-pill { position: static; }
@media (max-width: 960px) {
  .chart-tools { right: 8px; top: 10px; flex-wrap: nowrap; }
  .chart-tools .status-pill { display: none; }
  .chart-tools .seg button { padding: 4px 8px; }
  .readout, .overlay .readout { font-size: .8rem; gap: 3px 16px; }
}

.readout, .overlay .readout { width: max-content; padding: 4px 8px; margin-left: -2px; border-radius: 8px; background: rgba(6,10,20,.55); }

/* numbers use the same typeface as text (tabular figures), like the reference */
.mono, .stat .v, .price-big, .last-price { font-family: var(--font); font-variant-numeric: tabular-nums; }
.stepper-in input, .amount-input input { font-family: var(--font); font-variant-numeric: tabular-nums; }
.badge, .chip { font-family: var(--font); font-variant-numeric: tabular-nums; }
input, select, textarea, button { font-family: inherit; }



/* ---------- wallet page (reference layout) ---------- */
.wallet-page .wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.wallet-banner { background: #f2b90c; color: #1b1300; padding: 22px 0 26px; }
.wallet-banner .lbl { font-size: .95rem; opacity: .8; }
.wallet-banner .total { font-size: 2.6rem; font-weight: 800; line-height: 1.15; margin-top: 6px; }
.hide-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0; color: #1b1300; font-size: .85rem; padding: 4px 6px; }
.hide-btn:hover:not(:disabled) { background: rgba(0,0,0,.08); border-color: transparent; }
.wallet-tabs { background: #1b2a3b; border-bottom: 1px solid var(--line); }
.wallet-tabs .wrap { display: flex; gap: 4px; }
.wallet-tabs button, .hist-tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: var(--muted); padding: 16px 16px 13px; font-weight: 700; }
.wallet-tabs button[aria-selected="true"], .hist-tabs button[aria-selected="true"] { color: #f2b90c; border-bottom-color: #f2b90c; }
.wallet-body { padding-top: 26px; padding-bottom: 40px; }
.asset-card { max-width: 480px; background: #14182a; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.asset-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; }
.asset-coin { width: 2.7rem; height: 2.7rem; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(145deg, #2fb98f, #1f9a76); color: #fff; font-size: 1.55rem; font-weight: 800; line-height: 1; }
.asset-name, .asset-amt { display: grid; line-height: 1.25; }
.asset-amt { text-align: right; }
.asset-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); background: #10142a; }
.act { display: flex; align-items: center; gap: 8px; border: 0; border-radius: 0; background: transparent; padding: 14px 16px; font-size: .9rem; }
.act.dep svg { color: var(--up); } .act.wd svg { color: var(--down); }
.act:hover:not(:disabled) { background: var(--panel); }
.hist-title { margin: 38px 0 14px; font-size: 1.5rem; }
.hist-card { background: #14182a; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.hist-tabs { display: flex; border-bottom: 1px solid var(--line); }
.hist-tabs button { color: var(--text); }
.empty-state { text-align: center; padding: 18px; color: var(--text); font-size: .9rem; }
.hist-card .table-wrap { padding: 4px 12px 12px; }
@media (max-width: 960px) { .wallet-banner .total { font-size: 2rem; } .asset-card { max-width: none; } }

/* ---------- dashboard / statistics (reference layout) ---------- */
.dash { padding: 14px 6px 40px; }
.dash-title { font-size: 1.7rem; margin: 6px 0 16px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-card { background: #14182a; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.donut-card { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: center; min-height: 262px; }
.donut-col, .legend-col { display: grid; justify-items: center; gap: 14px; }
.legend-col { border-left: 1px solid var(--line); padding-left: 18px; }
.donut { position: relative; width: 150px; height: 150px; }
.donut-svg { width: 100%; height: 100%; display: block; }
.donut-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: .85rem; }
.donut-in b { font-size: 1.6rem; }
.mini { display: grid; justify-items: center; font-size: .9rem; } .mini b { font-size: 1.35rem; }
.legend { display: grid; gap: 12px; width: 100%; }
.lg-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; }
.lg-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid; }
.lg-dot[data-c="win"] { border-color: var(--up); } .lg-dot[data-c="tie"] { border-color: #8a93b2; } .lg-dot[data-c="lose"] { border-color: var(--down); }
.dash-right { display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.kpi { display: flex; align-items: center; justify-content: center; gap: 14px; border-radius: 8px; padding: 26px 16px; color: #1b1300; }
.kpi div { display: grid; line-height: 1.2; } .kpi span { font-size: 1.05rem; opacity: .85; } .kpi b { font-size: 1.9rem; }
.kpi.gold { background: #f2b90c; } .kpi.green { background: #14c78b; color: #03180f; }
.center { text-align: center; } .dash-right h3 { font-size: 1.15rem; text-transform: none; letter-spacing: 0; color: var(--muted); margin: 6px 0 0; }
.dirbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: #1d2440; }
.dirbar .buy { background: var(--up); } .dirbar .sell { background: var(--down); }
.hist-head { margin: 26px 0 12px; }
.hist-head h2 { font-size: 1.5rem; margin: 0; }
.hist-head input { width: 150px; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 4px; color-scheme: dark; }
.gold-btn { background: #f2b90c; color: #1b1300; border: 0; padding: 10px 18px; }
.dash .hist-card { background: #14182a; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.dash .hist-card th { text-align: center; padding: 14px 8px; } .dash .hist-card td { text-align: center; }
@media (max-width: 960px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); } .donut-card { grid-template-columns: 1fr; } .legend-col { border-left: 0; padding-left: 0; }
  .kpis { grid-template-columns: 1fr; } .hist-head { flex-direction: column; align-items: flex-start; gap: 10px; }
}


/* ---------- dashboard v2: closer to the reference ---------- */
.dash { padding: 12px 8px 40px; }
.dash-title { font-size: 1.55rem; font-weight: 700; margin: 4px 0 14px; }
.dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.donut-card { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 0; align-items: center; min-height: 0; padding: 14px 10px 12px; }
.donut-cell, .legend-cell { display: grid; justify-items: center; padding: 4px 0 10px; }
.legend-cell { justify-items: start; padding-left: 28%; }
.donut { width: 104px; height: 104px; }
.donut-in { font-size: .72rem; } .donut-in b { font-size: 1.25rem; }
.mini-cell { padding: 6px 0 0; gap: 2px; }
.mini-cell span { font-size: .78rem; } .mini-cell b { font-size: 1.2rem; }
.mini-cell.divided { border-left: 1px solid var(--line); }
.legend { gap: 10px; width: auto; }
.lg-row { grid-template-columns: 20px auto; gap: 8px; font-size: .84rem; }
.lg-dot { width: 15px; height: 15px; }
.lg-dot[data-c="win"] { border-color: #3b6cff; }
.lg-n { margin-left: 8px; color: var(--muted); font-weight: 600; }
.dash-right { gap: 8px; align-content: start; }
.kpis { gap: 12px; }
.kpi { justify-content: center; padding: 14px 18px; border-radius: 6px; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.22); }
.kpi svg { width: 34px; height: 34px; flex: none; }
.kpi div { text-align: left; }
.kpi span { font-size: .95rem; opacity: .8; } .kpi b { font-size: 1.35rem; }
.kpi.gold { background: #f1b90c; } .kpi.green { background: #11c48b; color: #fff; }
.dash-right h3 { font-size: 1.05rem; color: #7f8aa3; font-weight: 500; margin: 14px 0 4px; }
.dirbar { height: 6px; background: #20283f; }
.dash-right .row.between { font-size: .85rem; }
.hist-head { margin: 22px 0 8px; }
.hist-head h2 { font-size: 1.4rem; }
.hist-head form { gap: 14px; }
.hist-head input[type="date"] { width: 138px; font-size: .78rem; padding: 6px 2px; border-bottom: 1px solid #2b3552; }
.hist-head input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; filter: invert(33%) sepia(98%) saturate(3300%) hue-rotate(335deg) brightness(1.05); }
.gold-btn { background: #f1b90c; color: #1b1300; padding: 9px 14px; font-size: .78rem; border-radius: 4px; }
.dash .hist-card { background: #14182a; border: 1px solid #1d2440; border-radius: 4px; margin-top: 18px; }
.dash .hist-card table { border-collapse: collapse; }
.dash .hist-card th { background: #151a2d; color: #8f99b3; font-size: .72rem; font-weight: 500; letter-spacing: 0; text-transform: none; border: 1px solid #1f2742; padding: 12px 8px; }
.dash .hist-card td { border: 0; border-top: 1px solid #1f2742; font-size: .78rem; padding: 10px 8px; }
.dash .empty-state { font-size: .78rem; padding: 12px; border-top: 1px solid #1f2742; }
@media (max-width: 960px) { .legend-cell { padding-left: 12%; } .dash-grid { grid-template-columns: minmax(0, 1fr); } .kpis { grid-template-columns: 1fr 1fr; } }

.donut { width: 118px; height: 118px; } .donut-in { font-size: .66rem; padding: 0 22px; line-height: 1.2; } .donut-in b { font-size: 1.3rem; }

/* pre-divided columns (widths measured from the reference history table) */
table.fixed-cols { table-layout: fixed; width: 100%; min-width: 880px; }
.fixed-cols th, .fixed-cols td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash .fixed-cols th:nth-child(1) { width: 11.6%; } .dash .fixed-cols th:nth-child(2) { width: 20.2%; }
.dash .fixed-cols th:nth-child(3) { width: 12.5%; } .dash .fixed-cols th:nth-child(4) { width: 11.6%; }
.dash .fixed-cols th:nth-child(5) { width: 10.3%; } .dash .fixed-cols th:nth-child(6) { width: 12.2%; }
.dash .fixed-cols th:nth-child(7) { width: 9.2%; }  .dash .fixed-cols th:nth-child(8) { width: 12.4%; }
.dash .hist-card .empty-row { text-align: center; color: var(--text); padding: 12px; border-top: 1px solid #1f2742; font-size: .78rem; }

/* ---------- bottom panel: indicator gauges (reference layout) ---------- */
.gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 210px)); justify-content: center; gap: 28px 90px; padding: 22px 8px 12px; }
.gauges[hidden] { display: none; }
.gauge { display: grid; justify-items: center; gap: 4px; }
.gauge-title { font-size: .8rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.help { width: 14px; height: 14px; border: 1px solid var(--muted); border-radius: 50%; display: inline-grid; place-items: center; font-size: .6rem; color: var(--muted); cursor: help; }
.gauge-body { position: relative; width: 168px; }
.gauge-svg { width: 100%; display: block; }
.gauge-label { text-align: center; font-weight: 700; font-size: .78rem; margin-top: -26px; }
.gauge-counts { display: flex; justify-content: space-between; padding: 2px 6px 0; font-size: .75rem; }
.gauge-counts b:nth-child(2) { color: var(--text); }
.gauge-note { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: .72rem; margin: 6px 0 0; }
.panel .fixed-cols th:nth-child(1) { width: 8%; } .panel .fixed-cols th:nth-child(2) { width: 12%; } .panel .fixed-cols th:nth-child(3) { width: 12%; } .panel .fixed-cols th:nth-child(4) { width: 12%; }
.panel .fixed-cols th:nth-child(5) { width: 16%; } .panel .fixed-cols th:nth-child(6) { width: 16%; } .panel .fixed-cols th:nth-child(7) { width: 12%; } .panel .fixed-cols th:nth-child(8) { width: 12%; }
.panel .fixed-cols th, .panel .fixed-cols td { border-left: 1px solid #1a2240; } .panel .fixed-cols th:first-child, .panel .fixed-cols td:first-child { border-left: 0; }
@media (max-width: 960px) { .gauges { grid-template-columns: 1fr; gap: 14px; } }

/* layout fix: the chart fills the space above the panel (no blank gap on tall screens) */
.stage { grid-template-rows: minmax(0, 1fr) auto; }
.chart-card { display: flex; flex-direction: column; }
.chart-card .chart-wrap { flex: 1; height: auto; min-height: 420px; }

.gauge-label { margin-top: -4px; } .gauge-counts { margin-top: 0; }

/* history table: no inherited wallet padding, no doubled borders */
.dash .hist-card .table-wrap { padding: 0; }
.dash .hist-card table { margin: 0; }
.dash .hist-card th { border: 0; border-left: 1px solid #1f2742; border-bottom: 1px solid #1f2742; }
.dash .hist-card th:first-child { border-left: 0; }
.dash .hist-card tbody tr:last-child td { border-bottom: 0; }
.dash .hist-card .empty-row { border-top: 0; padding: 14px 12px; }

/* dashboard KPI cards + summary: one step larger */
.kpi { padding: 22px 20px; gap: 16px; border-radius: 8px; }
.kpi svg { width: 46px; height: 46px; }
.kpi span { font-size: 1.1rem; }
.kpi b { font-size: 1.85rem; line-height: 1.15; }
.dash-right { gap: 10px; }
.dash-right h3 { font-size: 1.3rem; margin: 18px 0 8px; }
.dirbar { height: 9px; }
.dash-right .row.between { font-size: 1.05rem; margin-top: 4px; }

/* KPI cards: match the reference (solid pale icon, tinted label, plain white value) */
.kpis { gap: 28px; }
.kpi { min-height: 122px; padding: 24px 20px; gap: 16px; border-radius: 8px; text-shadow: none; }
.kpi.gold { background: #f2ba0c; --kpi-hole: #f2ba0c; }
.kpi.green { background: #07c896; --kpi-hole: #07c896; }
.kpi .kpi-ico { width: 58px; height: 58px; flex: none; color: rgba(255, 255, 255, .62); }
.kpi div { gap: 0; }
.kpi span { font-size: 1.3rem; font-weight: 600; opacity: 1; }
.kpi.gold span { color: #ffe28e; } .kpi.green span { color: #b4f3df; }
.kpi b { font-size: 2.1rem; font-weight: 500; color: #fff; line-height: 1.2; }
.dash-right h3 { font-size: 1.45rem; font-weight: 500; color: #6f7690; margin: 20px 0 10px; }
.dirbar { height: 8px; background: #141726; }
.dash-right .row.between { font-size: 1.05rem; font-weight: 700; }
@media (max-width: 960px) { .kpis { grid-template-columns: 1fr; gap: 14px; } .kpi { min-height: 96px; } .kpi b { font-size: 1.7rem; } }

/* ---------- overall scale: everything in rem grows with the screen ---------- */
html { font-size: clamp(16px, 0.62vw + 7px, 22px); }
html, body { font-size: 1rem; line-height: 1.5; }
body.authed .app { grid-template-columns: 6.2rem minmax(0, 1fr); }
#sidebar { width: 6.2rem; }
#sidebar a, .side-btn { font-size: .78rem; padding: .7rem .15rem .55rem; }
#sidebar .logo { width: 2.7rem; height: 2.7rem; font-size: 1.25rem; }
#topbar { padding: .65rem 1.2rem; }
.balance-chip .acct { font-size: .75rem; } .balance-chip .amt { font-size: 1.15rem; }
.deposit-btn { font-size: .95rem; padding: .6rem 1.1rem; }
.top-link { font-size: .78rem; }
th { font-size: .82rem; } td { font-size: .92rem; }
.dash .hist-card th { font-size: .85rem; } .dash .hist-card td { font-size: .92rem; } .dash .empty-state, .dash .hist-card .empty-row { font-size: .92rem; }
.mini-cell span { font-size: .9rem; } .mini-cell b { font-size: 1.4rem; }
.lg-row { font-size: .95rem; } .donut-in { font-size: .72rem; } .donut-in b { font-size: 1.45rem; }
.donut { width: 7.4rem; height: 7.4rem; }
.hist-head h2 { font-size: 1.55rem; } .hist-head input[type="date"] { font-size: .88rem; width: 9rem; } .gold-btn { font-size: .88rem; }
.dash-title { font-size: 1.75rem; }
.tabs-lite button, .panel .tabs-lite button { font-size: .95rem; }
.gauge-title { font-size: .92rem; } .gauge-label { font-size: .9rem; } .gauge-counts { font-size: .88rem; } .gauge-body { width: 11rem; }
.ticket h3, h3 { font-size: .8rem; }
.ticket .quick button { font-size: .9rem; } .stepper-in input { font-size: 1.25rem; }
.payout-box .gain { font-size: 2.1rem; } .payout-box .pct { font-size: 1.35rem; }
.trade-btn { height: 3.4rem; font-size: 1.2rem; }
.waitbox .wt { font-size: .92rem; } .waitbox .wv { font-size: 1.25rem; }
.readout, .overlay .readout { font-size: 1.02rem; }
.asset-pick select { font-size: 1.02rem; } .seg button { font-size: .9rem; }
.ticket { width: auto; } .terminal { grid-template-columns: minmax(0, 1fr) 15.5rem; }
.wallet-banner .total { font-size: 2.9rem; } .asset-card { max-width: 32rem; } .asset-head { font-size: 1rem; }
.chip { font-size: .85rem; } .badge { font-size: .8rem; }
@media (max-width: 960px) {
  html { font-size: 16px; }
  body.authed .app { grid-template-columns: minmax(0, 1fr); }
  #sidebar { width: 100%; }
  .terminal { grid-template-columns: minmax(0, 1fr); }
}

.donut { width: 8.4rem; height: 8.4rem; } .donut-in { padding: 0 1.1rem; font-size: .68rem; white-space: nowrap; }

/* KPI icons: same box on both cards so the text starts at the same place */
.kpi .kpi-ico { width: 4.2rem; height: 4.2rem; flex: none; color: rgba(255, 255, 255, .66); }
.kpi { align-items: center; }

/* statistics card: larger text */
.donut { width: 10rem; height: 10rem; }
.donut-in { font-size: .86rem; padding: 0 1.2rem; } .donut-in b { font-size: 2.1rem; line-height: 1.1; }
.lg-row { grid-template-columns: 1.6rem auto; gap: .7rem; font-size: 1.2rem; }
.lg-dot { width: 1.25rem; height: 1.25rem; border-width: 2.5px; }
.lg-n { font-size: 1.1rem; margin-left: .6rem; }
.legend { gap: 1rem; }
.mini-cell span { font-size: 1.1rem; } .mini-cell b { font-size: 1.85rem; }
.donut-card { padding: 1.3rem .8rem 1.1rem; }
.donut-cell, .legend-cell { padding-bottom: 1rem; }

/* dashboard: breathing room from the sidebar and right edge */
.dash { padding: 1rem 2rem 2.5rem; }
@media (max-width: 960px) { .dash { padding: .8rem 1rem 2rem; } }

/* donut centre: keep the label well inside the ring */
.donut-in { font-size: .74rem; padding: 0 1.6rem; gap: .1rem; } .donut-in b { font-size: 1.55rem; line-height: 1.15; }

/* statistics card text: a touch smaller */
.lg-row { font-size: 1.07rem; } .lg-n { font-size: 1rem; }
.lg-dot { width: 1.1rem; height: 1.1rem; } .lg-row { grid-template-columns: 1.4rem auto; }
.legend { gap: .9rem; }
.mini-cell span { font-size: .98rem; } .mini-cell b { font-size: 1.65rem; }
.donut-in { font-size: .7rem; } .donut-in b { font-size: 1.45rem; }

/* ---------- themed date picker ---------- */
.dp { position: relative; }
.date-field { display: inline-flex; align-items: center; justify-content: space-between; gap: .6rem; min-width: 9.6rem; background: transparent; border: 0; border-bottom: 1px solid #2b3552; border-radius: 0; padding: .45rem .25rem; font-size: .92rem; font-weight: 500; color: var(--text); }
.date-field:hover:not(:disabled) { border-color: #2b3552; border-bottom-color: var(--tag); }
.date-field svg { color: #ff4565; flex: none; }
.dp-pop { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 40; width: 19.5rem; background: #141a30; border: 1px solid #263055; border-radius: 12px; padding: .8rem .8rem .6rem; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); }
.dp-pop[hidden] { display: none; }
.dp-head { display: grid; grid-template-columns: 2rem 2rem 1fr 2rem 2rem; align-items: center; gap: .15rem; margin-bottom: .5rem; }
.dp-title { text-align: center; font-size: .98rem; }
.dp-nav { background: transparent; border: 0; color: var(--muted); padding: .25rem 0; font-size: 1.15rem; border-radius: 8px; line-height: 1; }
.dp-nav:hover:not(:disabled) { background: var(--panel-2); color: var(--text); border-color: transparent; }
.dp-week, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.dp-week span { text-align: center; color: var(--muted); font-size: .78rem; font-weight: 600; padding: .3rem 0; }
.dp-grid { gap: 2px; }
.dp-day { background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 0; height: 2.25rem; font-size: .92rem; font-weight: 500; color: var(--text); }
.dp-day.out { color: #4d577a; }
.dp-day:hover:not(:disabled) { background: var(--panel-2); border-color: transparent; }
.dp-day.today { border-color: #3a4573; }
.dp-day.sel, .dp-day.sel:hover { background: #f2b90c; color: #1b1300; font-weight: 700; border-color: transparent; }
.dp-foot { display: flex; justify-content: space-between; margin-top: .5rem; border-top: 1px solid #222b4d; padding-top: .45rem; }
.dp-link { background: transparent; border: 0; color: #f2b90c; font-size: .85rem; padding: .3rem .5rem; border-radius: 6px; }
.dp-link.muted { color: var(--muted); }
.dp-link:hover:not(:disabled) { background: var(--panel-2); border-color: transparent; }
@media (max-width: 960px) { .dp-pop { right: auto; left: 0; } }

/* wallet banner: white text on the yellow band */
.wallet-banner, .wallet-banner .total, .hide-btn { color: #fff; }
.wallet-banner .lbl { color: rgba(255, 255, 255, .85); opacity: 1; }
.wallet-banner .total { text-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.hide-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }

/* wallet: space between the tab bar and the first card (the .wrap padding shorthand was overriding it) */
.wallet-page .wallet-body { padding-top: 2rem; padding-bottom: 3rem; }

/* wallet Nạp / Rút buttons: round badge icons, airier lighter label */
.act { gap: .85rem; padding: .95rem 1.1rem; }
.act-ico { width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1px solid; transition: transform .15s, background .15s; }
.act-ico svg { stroke-width: 2.1; }
.act-ico.dep { color: #14c78b; background: rgba(20, 199, 139, .14); border-color: rgba(20, 199, 139, .38); }
.act-ico.wd { color: #ff4565; background: rgba(255, 69, 101, .13); border-color: rgba(255, 69, 101, .38); }
.act:hover:not(:disabled) .act-ico { transform: translateY(-1px); }
.act:hover:not(:disabled) .act-ico.dep { background: rgba(20, 199, 139, .24); }
.act:hover:not(:disabled) .act-ico.wd { background: rgba(255, 69, 101, .22); }
.act .act-label { font-size: 1rem; font-weight: 500; letter-spacing: .04em; word-spacing: .12em; }
.act.dep svg, .act.wd svg { color: inherit; }

.act.dep .act-ico svg { color: #19d79a; } .act.wd .act-ico svg { color: #ff5a78; } .act-ico svg { stroke-width: 2.3; }

/* ---------- account switcher (Thực / Demo) ---------- */
.acct-wrap { position: relative; }
.balance-chip { cursor: pointer; text-align: right; font: inherit; color: var(--text); display: grid; gap: 0; }
.balance-chip:hover { border-color: var(--tag); }
.balance-chip .amt { display: inline-flex; align-items: baseline; gap: .3rem; justify-content: flex-end; }
.balance-chip .caret { color: var(--muted); font-size: .8rem; }
body[data-mode="demo"] .balance-chip .acct { color: #38d6c4; }
body[data-mode="demo"] .balance-chip { border-color: #1d6f69; }
.acct-menu { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 30; min-width: 17rem; background: #141a30; border: 1px solid #263055; border-radius: 12px; padding: .4rem; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); display: grid; gap: .15rem; }
.acct-row { display: grid; grid-template-columns: 1.1rem 1fr auto; gap: .7rem; align-items: center; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: .65rem .7rem; font-size: .95rem; color: var(--text); }
.acct-row:hover:not(:disabled) { background: var(--panel-2); border-color: transparent; }
.acct-row .dot { width: .9rem; height: .9rem; border-radius: 50%; border: 2px solid var(--muted); }
.acct-row.on .dot { border-color: var(--tag); background: radial-gradient(circle, var(--tag) 45%, transparent 50%); }
.acct-link { display: block; text-align: center; padding: .5rem; margin-top: .2rem; border-top: 1px solid #222b4d; color: var(--tag); font-size: .88rem; }

.mode-tag { display: inline-block; padding: .15rem .65rem; border-radius: 99px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: #38d6c4; background: rgba(56, 214, 196, .12); border: 1px solid rgba(56, 214, 196, .4); }
.mode-tag.inline { margin-left: .9rem; vertical-align: middle; letter-spacing: .02em; font-size: .8rem; }
body[data-mode="real"] .dash-title .mode-tag { color: #f2b90c; background: rgba(242, 185, 12, .1); border-color: rgba(242, 185, 12, .4); }

.partner-app { display: grid; gap: .6rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .5rem 1.4rem; }
.kv { display: grid; font-size: .88rem; } .kv span { color: var(--muted); font-size: .76rem; } .kv b { font-weight: 600; word-break: break-word; }

/* mobile: keep the top-bar button on one line and the bottom-bar labels whole */
@media (max-width: 960px) {
  #sidebar a, .side-btn { font-size: .62rem; gap: 2px; padding: .4rem .1rem; overflow: hidden; }
  #sidebar a span, .side-btn span { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 100%; }
  .deposit-btn { white-space: nowrap; padding: .5rem .85rem; font-size: .85rem; }
  .top-right { gap: .6rem; }
  .top-link span { font-size: .65rem; }
}

#env-banner.mfa-off { background: #ff4565; color: #fff; }

/* preset avatars */
.avatar-c { display: inline-grid; place-items: center; border-radius: 50%; color: rgba(255, 255, 255, .92); flex: none; overflow: hidden; background: #b4b6bc; }
.avatar-c.av-x { background: #b4b6bc; color: #e9eaee; }
.avatar-c.av-0 { background: linear-gradient(135deg, #f2b90c, #d98a00); } .avatar-c.av-1 { background: linear-gradient(135deg, #14c78b, #0a8f68); }
.avatar-c.av-2 { background: linear-gradient(135deg, #4a8cff, #2c55d8); } .avatar-c.av-3 { background: linear-gradient(135deg, #8b5cf6, #5b32c9); }
.avatar-c.av-4 { background: linear-gradient(135deg, #ff4565, #c4203c); } .avatar-c.av-5 { background: linear-gradient(135deg, #22d3ee, #0e8aa3); }
.avatar-c.av-6 { background: linear-gradient(135deg, #fb923c, #d1550b); } .avatar-c.av-7 { background: linear-gradient(135deg, #64748b, #334155); }
.avatar-c svg { fill: currentColor; stroke: currentColor; }
.top-link .avatar-c { margin: 0 auto; }

/* ---------- Hồ sơ / settings (reference layout) ---------- */
.settings { max-width: 76rem; margin: 0 auto; padding: .4rem 0 3rem; display: grid; gap: 1.1rem; }
.set-card { background: #1a1b20; border: 1px solid #2a2c33; border-radius: 6px; }
.set-head { margin: 0; padding: 1rem 1.3rem; font-size: 1.15rem; font-weight: 500; border-bottom: 1px solid #2a2c33; }
.set-body { padding: 1.4rem 1.3rem 1.6rem; display: grid; gap: 1.6rem; }
.avatar-row { display: flex; align-items: center; gap: 1.6rem; }
.gold-btn.big { padding: 1rem 2.4rem; font-size: 1.05rem; border-radius: 4px; }
.field-row { display: flex; flex-wrap: wrap; gap: 2rem; }
.fld { display: grid; gap: .45rem; width: min(23rem, 100%); font-size: .85rem; color: var(--muted); }
.fld input { background: #2b2c32; border: 1px solid #3a3c44; border-radius: 6px; padding: .8rem .9rem; color: #c9ccd6; font-size: .95rem; }
.fld input[readonly] { color: #9da1ad; }
.fld-inline { display: flex; gap: .5rem; }
.fld-inline input { flex: 1; min-width: 0; }
.small-btn { padding: .5rem 1rem; font-size: .85rem; border-radius: 6px; }
.set-row { display: grid; grid-template-columns: 17rem minmax(0, 1fr) auto; gap: 2rem; padding: 1.3rem 1.3rem; align-items: start; }
.set-row + .set-row { border-top: 0; }
.set-label { font-size: .98rem; color: #fff; }
.set-desc { color: #9da1ad; font-size: .95rem; line-height: 1.6; }
.set-action { display: grid; justify-items: end; gap: .5rem; min-width: 11rem; }
.set-note { color: #ff4565; font-size: .8rem; font-style: italic; text-align: right; margin-top: .4rem; }
.set-desc .set-note { text-align: left; font-style: normal; }
.set-action .gold-btn:disabled { opacity: .45; background: #8a6a0c; color: #1b1300; }
.set-action .badge { font-size: .85rem; padding: .3rem .8rem; }

.sw { position: relative; width: 3.6rem; height: 1.75rem; border-radius: 99px; background: #bdbfc6; border: 0; padding: 0; display: flex; align-items: center; justify-content: flex-end; transition: background .15s; }
.sw .sw-knob { position: absolute; left: .18rem; top: .18rem; width: 1.39rem; height: 1.39rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .15s; }
.sw .sw-txt { font-size: .62rem; font-weight: 700; color: #fff; margin-right: .5rem; }
.sw.on { background: var(--up); justify-content: flex-start; }
.sw.on .sw-knob { transform: translateX(1.85rem); }
.sw.on .sw-txt { margin: 0 0 0 .5rem; }
.sw:hover:not(:disabled) { border-color: transparent; filter: brightness(1.05); }
.sw:disabled { opacity: .5; }

.av-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; justify-items: center; }
.av-opt { background: transparent; border: 2px solid transparent; border-radius: 50%; padding: 3px; }
.av-opt.on { border-color: var(--tag); }
@media (max-width: 960px) {
  .set-row { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .set-action { justify-items: start; } .set-note { text-align: left; }
  .avatar-row { flex-wrap: wrap; } .av-grid { grid-template-columns: repeat(3, 1fr); }
}

/* lighter button text (was 700, felt heavy) */
button { font-weight: 600; }
.gold-btn, .deposit-btn, .gold-wide { font-weight: 500; letter-spacing: .01em; }
.gold-btn.big { font-weight: 500; }

/* ---------- 2FA enable dialog ---------- */
.modal.modal-wide { width: min(52rem, 100%); position: relative; padding: 1.8rem 2rem 1.6rem; background: #1a1b20; border-color: #2c2e36; }
.modal-x { position: absolute; right: .9rem; top: .8rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; padding: 0; background: transparent; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; }
.modal-x:hover:not(:disabled) { background: #2a2c33; color: #fff; border-color: transparent; }
.mfa-title { margin: 0 0 .4rem; font-size: 1.5rem; font-weight: 600; }
.mfa-lead { margin: 0 0 1.4rem; color: #9da1ad; line-height: 1.55; max-width: 40rem; }
.mfa-grid { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.mfa-left { display: grid; gap: 1rem; }
.qr-box { background: #fff; border-radius: 12px; padding: .5rem; box-shadow: 0 6px 22px rgba(0, 0, 0, .35); }
.qr { display: block; width: 100%; height: auto; }
.keywrap { display: grid; gap: .4rem; }
.fld-l-text { font-size: .78rem; color: #9da1ad; }
.keyrow { display: flex; gap: .4rem; align-items: stretch; }
.keybox { flex: 1; min-width: 0; font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; line-height: 1.5; background: #26282f; border: 1px solid #343741; border-radius: 8px; padding: .55rem .7rem; color: #e4e6ee; word-break: break-word; }
.icon-btn { flex: none; width: 2.5rem; padding: 0; display: grid; place-items: center; border-radius: 8px; background: #26282f; border: 1px solid #343741; color: #cfd2dc; }
.mfa-right { display: grid; gap: 1.1rem; }
.mfa-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: .5rem; color: #c3c7d3; font-size: .92rem; line-height: 1.5; }
.mfa-steps li::marker { color: #f2b90c; font-weight: 700; }
.mfa-form { display: grid; gap: 1rem; }
.fld-l { display: grid; gap: .45rem; font-size: .82rem; color: #9da1ad; font-weight: 500; }
.fld-l input[type="password"] { background: #26282f; border: 1px solid #343741; border-radius: 8px; padding: .75rem .85rem; }
.otp { display: flex; gap: .5rem; }
.otp-box { width: 3rem; height: 3.3rem; padding: 0; text-align: center; font-size: 1.5rem; font-weight: 600; border-radius: 10px; background: #26282f; border: 1px solid #343741; caret-color: var(--tag); }
.otp-box:focus { border-color: var(--tag); box-shadow: 0 0 0 3px rgba(242, 185, 12, .18); outline: none; }
.mfa-warn { margin: 0; font-size: .82rem; line-height: 1.5; color: #d9a441; background: rgba(217, 164, 65, .08); border: 1px solid rgba(217, 164, 65, .25); border-radius: 8px; padding: .65rem .8rem; }
button.wide { min-width: 9rem; padding: .75rem 1.4rem; }
.mfa-done { display: grid; justify-items: center; text-align: center; gap: .5rem; margin-bottom: 1.2rem; }
.mfa-done h2 { margin: 0; font-size: 1.4rem; } .mfa-done p { margin: 0; max-width: 34rem; line-height: 1.55; }
.mfa-check { width: 3.4rem; height: 3.4rem; border-radius: 50%; display: grid; place-items: center; color: #0a7a52; background: rgba(20, 199, 139, .16); border: 1px solid rgba(20, 199, 139, .4); }
.mfa-check svg { stroke: var(--up); stroke-width: 2.6; }
.codes.big { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.codes.big code { padding: .65rem .8rem; text-align: center; font-size: 1rem; letter-spacing: .08em; background: #26282f; border: 1px solid #343741; border-radius: 8px; }
.check-row { display: flex; align-items: center; gap: .6rem; margin: 1rem 0 .4rem; font-size: .92rem; color: #e4e6ee; font-weight: 500; }
.check-row input { width: auto; accent-color: var(--accent); }
.row.end { justify-content: flex-end; margin-top: .6rem; }
@media (max-width: 960px) {
  .modal.modal-wide { padding: 1.4rem 1.1rem; max-height: 92vh; overflow-y: auto; }
  .mfa-grid { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .mfa-left { max-width: 16rem; margin-inline: auto; width: 100%; }
  .otp-box { width: 2.5rem; height: 3rem; font-size: 1.3rem; } .codes.big { grid-template-columns: minmax(0, 1fr); }
}

/* Email confirmation code: same field look as the password box, "Gửi mã" sits inside it on the right */
.code-wrap { position: relative; }
.code-wrap input { width: 100%; box-sizing: border-box; background: #26282f; border: 1px solid #343741; border-radius: 8px; padding: .75rem 7.5rem .75rem .85rem; letter-spacing: .12em; }
.code-wrap input::placeholder { letter-spacing: 0; }
.code-send { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); background: transparent; border: 0; padding: .45rem .7rem; font-size: .85rem; font-weight: 600; color: var(--accent); border-radius: 6px; cursor: pointer; white-space: nowrap; }
.code-send:hover:not(:disabled) { background: rgba(255, 255, 255, .06); }
.code-send:disabled { color: #7c8190; cursor: default; }
.email-code .muted { line-height: 1.4; margin: 0; }
.email-code .muted:empty { display: none; }

/* Change-password dialog */
.modal.pw-box { position: relative; width: min(28rem, 100%); padding: 1.7rem 1.8rem 1.5rem; background: #1a1b20; border-color: #2c2e36; max-height: 94vh; overflow-y: auto; }
.pw-form { display: grid; gap: 1rem; }
.pw-title { margin: 0; font-size: 1.25rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: #e8eaf0; }
.pw-lead { margin: -.5rem 0 .2rem; color: #9da1ad; font-size: .86rem; line-height: 1.5; }
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; box-sizing: border-box; background: #26282f; border: 1px solid #343741; border-radius: 8px; padding: .75rem 2.8rem .75rem .85rem; font-size: .92rem; font-weight: 400; }
.pw-wrap input:focus { border-color: #f2b90c; outline: none; box-shadow: 0 0 0 3px rgba(242, 185, 12, .15); }
.pw-eye { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); width: 2.2rem; height: 2.2rem; padding: 0; display: grid; place-items: center; background: transparent; border: 0; border-radius: 6px; color: #8d93a3; cursor: pointer; }
.pw-eye:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.pw-group { display: grid; gap: .6rem; }
.pw-meter-row { display: flex; align-items: center; gap: .7rem; min-height: 1rem; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; flex: 1; }
.pw-meter i { height: 4px; border-radius: 2px; background: #31333b; transition: background .2s; }
.pw-meter i.on.s1 { background: #e5484d; } .pw-meter i.on.s2 { background: #f2b90c; } .pw-meter i.on.s3 { background: #9ccf3a; } .pw-meter i.on.s4 { background: #12b886; }
.pw-meter-l { min-width: 4.8rem; text-align: right; font-size: .76rem; color: #9da1ad; }
.pw-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem .8rem; font-size: .76rem; color: #7c8190; }
.pw-rules li { position: relative; padding-left: 1.1rem; }
.pw-rules li::before { content: ''; position: absolute; left: 0; top: .32em; width: .55rem; height: .55rem; border-radius: 50%; border: 1.5px solid #4a4d58; box-sizing: border-box; }
.pw-rules li.ok { color: #cfd2dc; }
.pw-rules li.ok::before { background: #12b886; border-color: #12b886; }
@media (max-width: 520px) { .modal.pw-box { padding: 1.4rem 1.1rem 1.2rem; } .pw-rules { grid-template-columns: 1fr; } }

/* Toast: dark card, round status icon, close button */
#toasts { gap: 10px; }
.toast { display: flex; align-items: center; gap: .85rem; background: #17181d; border: 1px solid #2a2c34; border-left: 1px solid #2a2c34; border-radius: 12px; padding: .8rem .9rem .8rem .8rem; min-width: 17rem; max-width: 24rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); color: #f1f3f8; }
.toast-ic { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: #19b57a; color: #fff; }
.toast.err .toast-ic { background: #e5484d; }
.toast-txt { flex: 1; min-width: 0; }
.toast-msg { font-size: 1.02rem; font-weight: 500; line-height: 1.35; }
.toast-detail { margin-top: .15rem; font-size: .8rem; color: #98a0b4; font-variant-numeric: tabular-nums; }
.toast-x { flex: none; width: 1.8rem; height: 1.8rem; padding: 0; display: grid; place-items: center; background: transparent; border: 0; border-radius: 50%; color: #8a90a2; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.toast-x:hover { background: rgba(255, 255, 255, .08); color: #fff; }
/* Trade history (Thống kê): Mua/Bán chip, two-line choice cell, pager */
.dash .hist-card td { color: #e4e8f4; }
.cell-two { display: grid; gap: 1px; justify-items: center; line-height: 1.25; }
.cell-two small { font-size: .68rem; color: #7d8bb0; }
.dir-ch { display: inline-flex; align-items: center; gap: .45rem; }
.dir-sq { width: 1.35rem; height: 1.35rem; border-radius: 4px; display: inline-grid; place-items: center; color: #fff; font-style: normal; }
.dir-ch.up .dir-sq { background: #16c784; } .dir-ch.down .dir-sq { background: #f0265f; }
.dir-ch b { font-weight: 600; color: #e4e8f4; }
.dash .hist-card tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.pager { display: flex; justify-content: center; align-items: center; gap: .35rem; margin: 1rem 0 .4rem; }
.pg-num, .pg-arrow { min-width: 2.1rem; height: 2.1rem; padding: 0 .4rem; border-radius: 50%; display: grid; place-items: center; background: transparent; border: 0; color: #9aa4c0; font-size: .92rem; cursor: pointer; }
.pg-arrow { font-size: 1.3rem; line-height: 1; }
.pg-num:hover, .pg-arrow:hover:not(:disabled) { background: rgba(255, 255, 255, .07); color: #fff; }
.pg-num.on { background: #f2b90c; color: #1b1300; font-weight: 700; }
.pg-arrow:disabled { opacity: .3; cursor: default; }
/* History table: visible column dividers (header and rows) like the reference */
.dash .hist-card table { border-collapse: collapse; }
.dash .hist-card th, .dash .hist-card td { border-left: 1px solid #1e2849; }
.dash .hist-card th:first-child, .dash .hist-card td:first-child { border-left: 0; }
.dash .hist-card td { border-top: 1px solid #242b40; padding: 13px 8px; }
.dash .hist-card .empty-row { border-left: 0; }
/* History payout colours (exact values from the reference) */
.dash .hist-card td b.up { color: rgb(39, 200, 106); font-size: 14px; font-weight: 400; }
.dash .hist-card td b.down { color: rgb(238, 71, 93); font-size: 14px; font-weight: 400; }
/* History table: compact sizing (reference rows are ~39px tall) */
.dash .hist-card th { font-size: 12px; padding: 11px 8px; }
.dash .hist-card td { font-size: 12px; padding: 10px 8px; }
.dash .hist-card td b.up, .dash .hist-card td b.down { font-size: 12px; }
.dash .hist-card .empty-row { font-size: 12px; }
.dir-ch { gap: .4rem; } .dir-ch b { font-size: 12px; }
.dir-sq { width: 1.1rem; height: 1.1rem; border-radius: 3px; }
.dir-sq svg { width: 11px; height: 11px; }
.cell-two small { font-size: 10px; }
.pager { margin: .8rem 0 .2rem; gap: .25rem; }
.pg-num, .pg-arrow { min-width: 1.7rem; height: 1.7rem; font-size: .78rem; }
.pg-arrow { font-size: 1.1rem; color: #4a5470; }.cell-two { display: inline-flex; align-items: baseline; gap: .45rem; }
.cell-two small { font-size: 10px; letter-spacing: .02em; }
/* Toasts sit at the top (below the status banner), newest first, never blocking clicks around them */
#toasts { top: 52px; bottom: auto; right: 16px; left: auto; pointer-events: none; }
.toast { pointer-events: auto; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: toast-in .2s ease-out; } @keyframes toast-in { from { transform: translateY(-10px); opacity: 0; } } }
@media (max-width: 960px) { #toasts { top: 44px; bottom: auto; left: 12px; right: 12px; } .toast { max-width: none; } }
/* Toast v3: slim, top-centre, translucent */
#toasts { top: 10px; left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 24px); justify-items: center; gap: 6px; }
.toast { min-width: 0; max-width: min(26rem, calc(100vw - 24px)); gap: .6rem; padding: .5rem .5rem .5rem .55rem; border-radius: 999px; background: rgba(23, 24, 29, .94); border: 1px solid #2f323c; box-shadow: 0 6px 22px rgba(0, 0, 0, .4); backdrop-filter: blur(6px); }
.toast-ic { width: 1.55rem; height: 1.55rem; }
.toast-ic svg { width: 14px; height: 14px; }
.toast-txt { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.toast-msg { font-size: .88rem; font-weight: 500; }
.toast-detail { margin: 0; font-size: .74rem; }
.toast-x { width: 1.5rem; height: 1.5rem; font-size: 1.1rem; }
@media (max-width: 960px) { #toasts { top: 8px; left: 50%; right: auto; } .toast { max-width: calc(100vw - 24px); } }#toasts { top: 34px; }
@media (max-width: 960px) { #toasts { top: 34px; } }
/* Toast v4 (reference): top-right, slides in from the right edge, at most 2 visible */
#toasts { top: 34px; right: 12px; left: auto; transform: none; width: auto; justify-items: end; gap: 10px; }
.toast { border-radius: 10px; padding: .65rem .75rem .65rem .7rem; gap: .8rem; min-width: 15rem; max-width: min(22rem, calc(100vw - 24px)); background: #17181d; backdrop-filter: none; }
.toast-ic { width: 2.1rem; height: 2.1rem; }
.toast-ic svg { width: 17px; height: 17px; }
.toast-txt { display: block; }
.toast-msg { font-size: 1rem; font-weight: 500; }
.toast-detail { margin-top: .12rem; font-size: .78rem; }
.toast-x { width: 1.7rem; height: 1.7rem; font-size: 1.25rem; }
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: toast-slide .32s cubic-bezier(.2, .8, .2, 1); }
  @keyframes toast-slide { from { transform: translateX(calc(100% + 24px)); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (max-width: 960px) { #toasts { top: 34px; right: 12px; left: auto; } .toast { max-width: calc(100vw - 24px); } }
/* ---- Trade screen v2: chart | ticket | order list (reference layout) ---- */
.terminal { grid-template-columns: minmax(0, 1fr) 15.5rem 17rem; }
.coin.sm { width: 1.35rem; height: 1.35rem; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; background: #f7931a; color: #fff; }
.coin.sm.fx { background: var(--accent); }

.trade-btn:disabled { background: #9b9ca4; color: #fff; opacity: 1; filter: none; cursor: not-allowed; }
.waitbox { cursor: default; }
.waitbox.busy { background: #12162a; border-color: #232a48; }
.waitbox.busy .wv { color: #f2b90c; }

.mood { display: grid; gap: .45rem; text-align: center; }
.mood h4 { margin: 0; font-size: .85rem; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; }
.mood-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #2a2f47; }
.mood-bar .buy { background: var(--up); transition: width .4s; } .mood-bar .sell { background: var(--down); transition: width .4s; }
.mood-nums { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.mood-up { color: var(--up); } .mood-down { color: var(--down); }

.orders-side { background: var(--bg); border-left: 1px solid var(--line); padding: 0 .9rem 1rem; position: sticky; top: 0; align-self: start; max-height: calc(100vh - 66px); overflow-y: auto; }
.side-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #232a48; position: sticky; top: 0; background: var(--bg); z-index: 1; }
.side-tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .95rem 0 .8rem; color: #cfd5e8; font-size: .92rem; font-weight: 600; letter-spacing: .08em; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.side-tabs button[aria-selected="true"] { color: #f2b90c; border-bottom-color: #f2b90c; }
.side-badge { min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 99px; background: #ee475d; color: #fff; font-size: .68rem; line-height: 1.15rem; text-align: center; letter-spacing: 0; align-self: flex-start; margin-top: -.5rem; }
.side-day { margin: 1rem 0 .65rem; font-size: 1.05rem; font-weight: 700; text-transform: none; letter-spacing: 0; color: #eef1fb; }
.side-empty { margin: 1.4rem 0; text-align: center; font-size: .86rem; }
.ord-card { background: #1b2037; border: 1px solid #2a3150; border-radius: 8px; padding: .6rem .75rem .55rem; margin-bottom: .6rem; display: grid; gap: .4rem; }
.oc-top, .oc-mid, .oc-bot { display: flex; justify-content: space-between; align-items: center; }
.oc-top b { font-size: .74rem; font-weight: 600; color: #dfe4f5; }
.oc-stake { font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.oc-mid .dir-ch b { font-size: .95rem; }
.oc-mid .dir-sq { width: 1.4rem; height: 1.4rem; border-radius: 5px; }
.oc-mid .dir-sq svg { width: 14px; height: 14px; }
.oc-time { font-size: .76rem; color: #7f8cab; font-variant-numeric: tabular-nums; }
.oc-out { font-size: .92rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.oc-out.win { color: rgb(39, 200, 106); } .oc-out.lose { color: rgb(238, 71, 93); } .oc-out.wait { color: #f2b90c; } .oc-out.tie, .oc-out.void { color: #9aa4c0; }

@media (max-width: 1280px) { .terminal { grid-template-columns: minmax(0, 1fr) 15.5rem; } .orders-side { grid-column: 1 / -1; position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 960px) { .terminal { grid-template-columns: minmax(0, 1fr); } }
/* Order-list toggle in the top bar (trade screen) */
.side-toggle { position: relative; width: 2.6rem; height: 2.6rem; padding: 0; display: grid; place-items: center; border-radius: 8px; background: #151a2d; border: 1px solid #3a3410; color: #f2b90c; cursor: pointer; margin-left: .3rem; }
.side-toggle .ic-open { display: none; } .side-toggle .ic-closed { display: grid; }
.side-toggle.on { background: #f2b90c; border-color: #f2b90c; color: #1b1300; }
.side-toggle.on .ic-open { display: grid; } .side-toggle.on .ic-closed { display: none; }
.side-toggle:hover { filter: brightness(1.12); }
.side-toggle-badge { position: absolute; top: -.4rem; right: -.4rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .28rem; border-radius: 99px; background: #ee475d; color: #fff; font-size: .66rem; font-weight: 700; line-height: 1.1rem; text-align: center; }
body[data-side="closed"] .orders-side { display: none; }
body[data-side="closed"] .terminal { grid-template-columns: minmax(0, 1fr) 15.5rem; }
@media (max-width: 960px) { body[data-side="closed"] .terminal { grid-template-columns: minmax(0, 1fr); } }
/* Top bar (reference): Cài đặt · Hồ sơ · Thông báo | list toggle */
.top-item { position: relative; display: flex; }
button.top-link { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-family: inherit; }
button.top-link:hover { color: var(--text); background: transparent; }
.top-link svg { color: #e6e9f5; }
.top-link:hover svg { color: #f2b90c; }
.top-link > span:not(.ic-wrap) { font-size: .78rem; }
.ic-wrap { position: relative; display: grid; }
.top-badge { position: absolute; top: -.35rem; right: -.55rem; min-width: 1rem; height: 1rem; padding: 0 .25rem; border-radius: 99px; background: #ee475d; color: #fff; font-size: .62rem; font-weight: 700; line-height: 1rem; text-align: center; }
.top-sep { width: 1px; height: 2.4rem; background: #2a3050; margin: 0 .4rem; }
.top-pop { position: absolute; right: 0; top: calc(100% + .6rem); width: 18rem; max-width: calc(100vw - 24px); background: #17181d; border: 1px solid #2f323c; border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, .5); padding: .8rem .9rem; z-index: 40; text-align: left; }
.top-pop h4 { margin: 0 0 .6rem; font-size: .9rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: #eef1fb; }
.pop-row { display: flex; justify-content: space-between; align-items: center; padding: .35rem 0; font-size: .88rem; color: #cfd5e8; }
.pop-link { display: block; margin-top: .5rem; padding-top: .6rem; border-top: 1px solid #2a2d38; color: #f2b90c; font-size: .86rem; }
.pop-empty { margin: .4rem 0; font-size: .85rem; }
.notif-list { list-style: none; margin: 0; padding: 0; max-height: 18rem; overflow-y: auto; display: grid; gap: .1rem; }
.notif-list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid #23262f; font-size: .82rem; }
.notif-list li:first-child { border-top: 0; }
.n-main { display: grid; color: #dfe4f5; }
.n-main small { color: #7f8cab; font-size: .7rem; }
.n-out { font-variant-numeric: tabular-nums; font-weight: 600; }
.n-out.win { color: rgb(39, 200, 106); } .n-out.lose { color: rgb(238, 71, 93); } .n-out.tie, .n-out.void { color: #9aa4c0; }
@media (max-width: 960px) { .top-settings { display: none; } .top-sep { display: none; } .top-link > span:not(.ic-wrap) { font-size: .65rem; } }
/* Stake field: white box with dark text (reference) */
.ticket .stepper-in, .stepper-in { background: #fff; border-color: #fff; border-radius: 8px; }
.stepper-in:focus-within { border-color: #f2b90c; box-shadow: 0 0 0 3px rgba(242, 185, 12, .25); }
.stepper-in .cur { color: #7d8396; }
.stepper-in input, .stepper-in input:focus { color: #11151f; caret-color: #11151f; font-weight: 600; }
/* Ticket headings: plain sentence case, white (no spaced-out caps) */
.ticket h3, .ticket .field h3 { text-transform: none; letter-spacing: 0; color: #fff; font-size: .95rem; font-weight: 600; margin: 0 0 .5rem; }
/* Stake buttons (-, +, +5 ... All): flat slate tiles with white text, as on the reference */
.ticket .stepper > button, .ticket .quick button { background: #1e2336; border: 0; border-radius: 8px; color: #fff; font-weight: 500; box-shadow: none; }
.ticket .stepper > button { height: 2.55rem; font-size: 1.25rem; }
.ticket .quick button { height: 2.45rem; padding: 0; font-size: .92rem; }
.ticket .stepper > button:hover:not(:disabled), .ticket .quick button:hover:not(:disabled) { background: #2a3150; }
.ticket .stepper > button:active:not(:disabled), .ticket .quick button:active:not(:disabled) { background: #343c60; }
/* No divider line between the chart and the order ticket */
.ticket { border-left: 0; }
.chart-card, .stage { border-right: 0; }
/* Trade screen on desktop: exactly one window tall, no page scrolling.
   Chart takes the free height; the indicator panel below has a fixed height and scrolls inside itself. */
@media (min-width: 1281px) {
  body.trade-page { overflow: hidden; }
  body.trade-page.authed .app { height: calc(100vh - var(--banner-h, 0px)); min-height: 0; }
  body.trade-page #sidebar { height: 100%; }
  body.trade-page .content { display: flex; flex-direction: column; height: 100%; min-height: 0; }
  body.trade-page #view { flex: 1; min-height: 0; overflow: hidden; }
  body.trade-page .terminal { height: 100%; min-height: 0; align-items: stretch; }
  body.trade-page .stage { min-height: 0; overflow: hidden; grid-template-rows: minmax(0, 1fr) clamp(150px, 26vh, 250px); }
  body.trade-page .chart-card { min-height: 0; display: flex; flex-direction: column; }
  body.trade-page .chart-card .chart-wrap { flex: 1; height: auto; min-height: 0; }
  body.trade-page .panel { min-height: 0; overflow-y: auto; }
  body.trade-page .ticket { overflow-y: auto; min-height: 0; }
  body.trade-page .orders-side { position: static; height: 100%; max-height: none; min-height: 0; }
}
/* Trade screen: in the flex-column .content, main's auto margins shrink it to its content and centre it; fill the width instead. */
body.trade-page main { width: 100%; margin: 0; }
/* Indicators panel: same background as the chart, no visible scrollbar (still scrolls if the window is short). */
.stage > .panel { background: #060a14; scrollbar-width: none; }
.stage > .panel::-webkit-scrollbar { display: none; }
/* Under the chart: no divider above the indicators panel nor under its tabs (the active tab keeps its own underline). */
.stage > .panel { border-top: 0; }
.stage > .panel .tabs-lite { border-bottom: 0; }
/* Last Results: boards of 5 x 4 dots, one dot per finished round. */
.panel-body .recent.results { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 18px 18px 12px; overflow: hidden; }
.recent.results .rboard { display: grid; grid-template-rows: repeat(4, 18px); grid-auto-flow: column; grid-auto-columns: 18px; gap: 2px; }
.recent.results .rd { width: 18px; height: 18px; border-radius: 50%; display: block; }
.recent.results .rd.up { background: var(--up); } .recent.results .rd.down { background: var(--down); } .recent.results .rd.none { background: #1a1b26; }
/* Indicators panel a bit taller (and less top padding) so the gauges and their counts are not cut off at the bottom. */
body.trade-page .stage { grid-template-rows: minmax(0, 1fr) clamp(220px, 33vh, 290px); }
.panel-body .gauges { padding-top: 10px; }.panel-body .gauges { padding-bottom: 0; }
/* "Hãy đặt lệnh" box: flat grey like the reference (no border), lighter title, bold value. */
.waitbox { background: #22232e; border: 0; border-radius: 9px; padding: 8px 6px; }
.waitbox .wt { font-weight: 500; color: #cfd1da; }
.waitbox .wv { font-weight: 700; font-size: 1.1rem; color: #fff; }.waitbox.busy { background: #22232e; }
/* Payout block a little smaller. */
.payout-box .gain { font-size: 1.8rem; } .payout-box .pct { font-size: 1.2rem; }
.payout-box .payout-line { font-size: .95rem; }
/* Top-bar account chip like the reference: grey box, left-aligned label + amount, round chevron button on the right. */
.balance-chip { display: flex; align-items: center; gap: 16px; text-align: left; background: #23242f; border: 0; border-radius: 12px; padding: 7px 10px 7px 16px; }
.balance-chip:hover { border: 0; filter: brightness(1.12); }
.balance-chip .bc-text { display: grid; gap: 2px; justify-items: start; }
.balance-chip .acct { font-size: .75rem; font-weight: 500; color: #c9cbd6; }
.balance-chip .amt { font-size: 1.3rem; font-weight: 700; color: #fff; justify-content: flex-start; gap: 0; }
.balance-chip .caret { width: 30px; height: 30px; border-radius: 50%; background: #4a4b57; color: #e4e6ee; display: grid; place-items: center; font-size: 0; }
body[data-mode="demo"] .balance-chip { border: 0; }.balance-chip .amt { font-size: 1.12rem; font-weight: 600; }
/* Account dropdown like the reference: dark panel, two rows (radio, label over amount, action on the right). */
.acct-menu { min-width: 17.5rem; background: #1b1c25; border: 1px solid #32333e; border-radius: 8px; padding: 0; gap: 0; box-shadow: 0 14px 36px rgba(0, 0, 0, .55); overflow: hidden; }
.acct-row { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 0; border-radius: 0; background: transparent; }
.acct-row + .acct-row { border-top: 1px solid #32333e; }
.acct-pick { flex: 1; display: flex; align-items: center; gap: 14px; text-align: left; background: transparent; border: 0; border-radius: 0; padding: 14px 8px 14px 16px; color: #fff; font: inherit; cursor: pointer; }
.acct-pick:hover { background: rgba(255, 255, 255, .04); }
.acct-pick .dot { flex: none; width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 0; background: #d4d5da; }
.acct-row.on .acct-pick .dot { background: #f5b301; }
.acct-txt { display: grid; gap: 3px; }
.acct-txt .nm { font-size: .78rem; color: #8d8f9c; font-weight: 500; }
.acct-txt b { font-size: 1.1rem; font-weight: 600; color: #fff; }
.acct-act { flex: none; display: grid; place-items: center; width: 32px; height: 28px; border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; }
.acct-act.real { background: #f5b301; color: #14151c; }
.acct-act.demo { background: transparent; color: #b9bbc6; width: 32px; }
.acct-act.demo:hover { color: #fff; }
/* Account dropdown: smaller. */
.acct-menu { min-width: 14.5rem; }
.acct-pick { gap: 11px; padding: 10px 6px 10px 13px; }
.acct-pick .dot { width: 1rem; height: 1rem; }
.acct-txt { gap: 2px; }
.acct-txt .nm { font-size: .68rem; }
.acct-txt b { font-size: .95rem; }
.acct-row { gap: 6px; padding-right: 11px; }
.acct-act { width: 28px; height: 24px; border-radius: 5px; }
.acct-act svg { width: 14px; height: 14px; }
/* Top-bar account chip: smaller, thinner text. */
.balance-chip .acct { font-size: .68rem; font-weight: 400; }
.balance-chip .amt { font-size: 1rem; font-weight: 500; }
.balance-chip { padding: 6px 9px 6px 14px; gap: 14px; }
.balance-chip .caret { width: 26px; height: 26px; }
/* Chip = same fill as the +5/+10 quick buttons; dropdown = same fill as the chart/page background. */
.balance-chip { background: #1e2336; }
.acct-menu { background: #060a14; }.panel-body .recent.results[hidden] { display: none; }
/* Top bar: more room between the account chip, Nạp nhanh, Cài đặt, Hồ sơ and Thông báo. */
.top-right { gap: 24px; }
/* Cài đặt, Hồ sơ, Thông báo sit closer to each other than to the rest of the top bar. */
.top-right > .top-settings, .top-right > .top-link { margin-right: -14px; }
.top-right .top-item .top-link { margin-right: 0; } /* the negative margin must not apply twice (item + the button inside it) */
/* Top-bar links (Cài đặt, Hồ sơ, Thông báo): same icon box, same text size/weight/colour, so labels line up. */
.top-link { gap: 4px; align-content: start; }
.top-link > :first-child { width: 24px; height: 24px; display: grid; place-items: center; margin: 0 auto; }
.top-link > :first-child > svg { width: 20px; height: 20px; }
.top-link .avatar-c { width: 24px !important; height: 24px !important; }
.top-link > span:not(.ic-wrap) { font-size: .78rem; font-weight: 600; line-height: 1.2; }.status-pill[hidden] { display: none; }
/* No divider under the top bar, none between the order ticket and the order list. */
#topbar { border-bottom: 0; }
.orders-side { border-left: 0; }
/* Trade screen: one background colour everywhere (chart, indicators panel, ticket, order list, page). */
body.trade-page, body.trade-page .ticket, body.trade-page .orders-side { background-color: #060a14; }
/* MUA / BÁN: white text and icon. */
.trade-btn, .trade-btn.up-btn, .trade-btn.down-btn { color: #fff; }
/* Chart: normal mouse pointer. */
.chart-wrap, .chart-wrap canvas { cursor: default; }
/* Sidebar "Đăng xuất": a thin line above, icon over a muted label. */
#sidebar .side-btn:last-child { position: relative; margin-top: 10px; padding-top: 14px; }
#sidebar .side-btn:last-child::before { content: ""; position: absolute; top: 0; left: 14%; right: 14%; height: 1px; background: #d3d6e0; }
/* Sidebar icons a bit larger. */
#sidebar a svg, #sidebar .side-btn svg { width: 26px; height: 26px; }
/* Sidebar hover: frosted-glass tile (translucent, blurred, light edge). */
#sidebar a:not(.logo), #sidebar .side-btn { border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s; }
#sidebar a:not(.logo):hover, #sidebar .side-btn:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .06));
  border-color: rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff;
}
/* Order-list toggle: the column slides shut/open and fades, the button icon pops. (Wide layout only; narrower screens keep the instant switch.) */
@keyframes tglpop { from { transform: scale(.55) rotate(-25deg); opacity: .2; } to { transform: none; opacity: 1; } }
.side-toggle .ic-open, .side-toggle .ic-closed { animation: tglpop .24s ease-out; }
.side-toggle { transition: background-color .2s, border-color .2s, color .2s, transform .12s; }
.side-toggle:active { transform: scale(.93); }
@media (min-width: 1281px) {
  .terminal { transition: grid-template-columns .3s ease; }
  .orders-side { overflow: hidden; min-width: 0; transition: opacity .22s ease, padding .3s ease, visibility 0s; }
  body[data-side="closed"] .orders-side { display: block; opacity: 0; visibility: hidden; padding-left: 0; padding-right: 0; transition: opacity .18s ease, padding .3s ease, visibility 0s .3s; pointer-events: none; }
  body[data-side="closed"] .terminal { grid-template-columns: minmax(0, 1fr) 15.5rem 0rem; }
}
@media (prefers-reduced-motion: reduce) { .terminal, .orders-side, .side-toggle .ic-open, .side-toggle .ic-closed { transition: none; animation: none; } }
/* Order-list toggle, smoother: long ease-out slide, content glides in from the right and the cards follow one after another; the icon springs. */
@keyframes tglpop { 0% { transform: scale(.5) rotate(-35deg); opacity: 0; } 60% { transform: scale(1.12) rotate(6deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
.side-toggle .ic-open, .side-toggle .ic-closed { animation: tglpop .38s cubic-bezier(.34, 1.4, .64, 1); }
.side-toggle { transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .15s ease; }
@media (min-width: 1281px) {
  .terminal { transition: grid-template-columns .45s cubic-bezier(.22, 1, .36, 1); }
  .orders-side { transition: padding .45s cubic-bezier(.22, 1, .36, 1), visibility 0s; }
  body[data-side="closed"] .orders-side { opacity: 1; transition: padding .45s cubic-bezier(.22, 1, .36, 1), visibility 0s .45s; }
  .orders-side > * { transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .3s ease; }
  body[data-side="closed"] .orders-side > * { transform: translateX(34px); opacity: 0; }
  .side-list > * { transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .35s ease; }
  body[data-side="closed"] .side-list > * { transform: translateX(34px); opacity: 0; transition-delay: 0s; }
  body:not([data-side="closed"]) .side-list > :nth-child(1) { transition-delay: .08s; }
  body:not([data-side="closed"]) .side-list > :nth-child(2) { transition-delay: .13s; }
  body:not([data-side="closed"]) .side-list > :nth-child(3) { transition-delay: .18s; }
  body:not([data-side="closed"]) .side-list > :nth-child(4) { transition-delay: .23s; }
  body:not([data-side="closed"]) .side-list > :nth-child(5) { transition-delay: .28s; }
  body:not([data-side="closed"]) .side-list > :nth-child(n+6) { transition-delay: .32s; }
}
@media (prefers-reduced-motion: reduce) { .terminal, .orders-side, .orders-side > *, .side-list > *, .side-toggle .ic-open, .side-toggle .ic-closed { transition: none !important; animation: none !important; } }
/* MỞ <-> ĐÓNG: the yellow underline slides between the tabs, the list slides in from the side of the tab you picked, cards one after another. */
.side-tabs { position: relative; }
.side-tabs button, .side-tabs button[aria-selected="true"] { border-bottom-color: transparent; transition: color .25s ease; }
.side-tabs::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 50%; height: 2px; background: #f2b90c; transition: transform .38s cubic-bezier(.22, 1, .36, 1); }
.side-tabs[data-on="closed"]::after { transform: translateX(100%); }
@keyframes rowin-next { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes rowin-prev { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.side-list.swap[data-dir="next"] > * { animation: rowin-next .42s cubic-bezier(.22, 1, .36, 1) both; }
.side-list.swap[data-dir="prev"] > * { animation: rowin-prev .42s cubic-bezier(.22, 1, .36, 1) both; }
.side-list.swap > :nth-child(2) { animation-delay: .04s; }
.side-list.swap > :nth-child(3) { animation-delay: .08s; }
.side-list.swap > :nth-child(4) { animation-delay: .12s; }
.side-list.swap > :nth-child(5) { animation-delay: .16s; }
.side-list.swap > :nth-child(n+6) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) { .side-tabs::after, .side-list.swap > * { transition: none !important; animation: none !important; } }
/* Toasts: a little lower and further from the right edge (desktop). */
@media (min-width: 961px) { #toasts { top: 100px; right: 56px; } }
/* Bell: admin notices (title, text, time) next to the deposit / withdrawal lines. */
.notif-list .n-notice { display: block; }
.n-notice .n-main b { color: #fff; font-size: .86rem; margin-bottom: .15rem; }
.n-notice .n-body { color: #c4cadb; font-size: .8rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.n-notice .n-main small { margin-top: .25rem; }
.top-pop:has(.notif-list) { width: 21rem; }
/* Gauges: the needle glides (long ease-out) instead of jumping. */
.gauge-svg .needle { transform-box: view-box; transform-origin: 80px 80px; transition: transform 1.2s cubic-bezier(.22, 1, .36, 1); }

/* Switching section: the new screen fades and slides up a little. */
@keyframes viewin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
#view.enter > * { animation: viewin .38s cubic-bezier(.22, 1, .36, 1) both; }
/* Sidebar items: icon eases up slightly on hover. */
#sidebar a:not(.logo) svg, #sidebar .side-btn svg { transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
#sidebar a:not(.logo):hover svg, #sidebar .side-btn:hover svg { transform: translateY(-2px) scale(1.06); }

/* Top-bar menus (account, Cài đặt, Thông báo): drop in from their corner; the account chevron turns over. */
@keyframes popin { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: none; } }
.acct-menu, .top-pop { transform-origin: top right; animation: popin .24s cubic-bezier(.22, 1, .36, 1); }
.balance-chip .caret svg { transition: transform .25s cubic-bezier(.22, 1, .36, 1); }
.balance-chip[aria-expanded="true"] .caret svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .gauge-svg .needle, #view.enter > *, .acct-menu, .top-pop, .balance-chip .caret svg, #sidebar a svg, #sidebar .side-btn svg { transition: none !important; animation: none !important; } }
/* Order list: scrolls by itself (the animation block above had set overflow: hidden) and never passes the scroll on to the page. */
.orders-side { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.side-list { overscroll-behavior: contain; }.side-tabs { position: sticky; top: 0; z-index: 2; } /* sticky again (an earlier rule had made it relative) so MỞ / ĐÓNG stay in view while the list scrolls */
/* Deposit dialog: USDT (BEP20) tab. */
.bsc-pane[hidden] { display: none; }
.bsc-pane .qr-box { justify-self: center; width: 11rem; }
.bsc-addr-row { display: flex; gap: .6rem; align-items: center; }
.bsc-addr { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; color: #eef1fb; background: #11131c; border: 1px solid #2a2c34; border-radius: 8px; padding: .6rem .7rem; overflow-wrap: anywhere; user-select: all; }.stack[hidden], form[hidden] { display: none; }
/* Chart overlay text (O/C/H/L, pair tag) follows the window size smoothly instead of the root font steps. */
.readout, .overlay .readout { font-size: clamp(.74rem, .45vw + .42rem, .98rem); gap: 4px clamp(14px, 1.6vw, 26px); }
.overlay .asset-pick .coin { width: clamp(24px, 2vw, 32px); height: clamp(24px, 2vw, 32px); }
/* Withdraw menu (two options) and the recipient card of the internal transfer dialog. */
.wd-option { display: grid; gap: .25rem; text-align: left; width: 100%; padding: .9rem 1rem; border-radius: 12px; background: #1b1c25; border: 1px solid #32333e; color: #fff; cursor: pointer; font: inherit; }
.wd-option b { font-size: 1rem; }
.wd-option:hover { border-color: #f5b301; }
.p2p-who { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: 10px; background: #11131c; border: 1px solid #2a2c34; }
.p2p-who[hidden] { display: none; }
/* Cashier dialog: Nạp tiền | Rút tiền, as in the reference. */
.modal.cashier { width: min(30rem, calc(100vw - 24px)); padding: 0; background: #1b1c25; border: 1px solid #32333e; border-radius: 14px; overflow: hidden; }
.cash-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #32333e; }
.cash-tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 1rem 0 .9rem; color: #c4c8d8; font-weight: 600; font-size: 1rem; cursor: pointer; }
.cash-tabs button[aria-selected="true"] { color: #fff; border-bottom-color: #f5b301; }
.cash-body { padding: 1.1rem 1.2rem 1.3rem; max-height: calc(100vh - 7rem); overflow-y: auto; }
.cash-balance { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border: 1px solid #2a2c34; border-radius: 10px; background: #14151d; }
.cash-balance b { font-size: 1.05rem; color: #fff; }
.cash-coin { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #26a17b; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.cash-lbl { font-size: .85rem; color: #c4c8d8; margin-top: .2rem; }
.cash-nets { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.cash-net { position: relative; display: grid; gap: .15rem; justify-items: center; padding: .85rem .5rem; border-radius: 10px; background: #2a2c36; border: 0; color: #9da1ad; cursor: pointer; }
.cash-net b { font-size: .95rem; } .cash-net small { font-size: .78rem; color: #f5b301; font-weight: 600; }
.cash-net.on { background: #f5b301; color: #14151c; } .cash-net.on small { color: #14151c; }
.cash-tick { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: #2b7fff; color: #fff; display: grid; place-items: center; }
.cash-warn { padding: .7rem .9rem; border-radius: 8px; background: #3a3217; border: 1px solid #6b5a1b; color: #f2d77a; font-size: .82rem; line-height: 1.45; }
.fld { position: relative; display: flex; align-items: center; gap: .6rem; padding: .95rem .9rem .8rem; border: 1px solid #3a3c48; border-radius: 10px; background: transparent; margin-top: .35rem; }
.fld-lbl { position: absolute; top: -.62rem; left: .8rem; padding: 0 .35rem; background: #1b1c25; color: #c4c8d8; font-size: .78rem; }
.fld input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font-size: 1rem; padding: 0; }
.fld input::placeholder { color: #7d8196; }
.fld:focus-within { border-color: #f5b301; }
.fld-btn { flex: none; background: transparent; border: 0; color: #f5b301; font-weight: 700; cursor: pointer; padding: .25rem .4rem; border-radius: 6px; }
.fld-btn:hover { background: rgba(245, 179, 1, .12); }
.cash-pane .fld-btn:first-of-type { }
.cash-banner { padding: .75rem 1rem; border-radius: 10px; border: 1px solid #c2334d; background: rgba(238, 71, 93, .1); color: #ff6b81; text-align: center; font-size: .9rem; }
.cash-banner[hidden], .cash-warn[hidden] { display: none; }
.cash-banner a { color: #ff9aa8; text-decoration: underline; }
.cash-submit { width: 100%; padding: .9rem; border: 0; border-radius: 10px; background: #ff3b5c; color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer; }
.cash-submit:disabled { opacity: .55; cursor: not-allowed; }
.fld-btn.max, .fld .fld-btn[onclick] { }
/* VIP dashboard (#/vip) */
.vip-page { display: grid; gap: 16px; max-width: 1240px; margin: 0 auto; padding: 8px 4px 24px; }
.vip-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.vip-mid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.vip-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; }
.vip-card h2 { margin: 0 0 12px; font-size: 1.15rem; font-weight: 600; }
.vip-card h3 { margin: 0 0 8px; font-size: .95rem; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; }
.vip-level { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.vip-pill { padding: 9px 22px; border: 1px solid #f1b90c; border-radius: 999px; color: #f1b90c; font-size: .9rem; }
.vip-tag { padding: 4px 8px; border: 1px solid #5a4a14; border-radius: 6px; color: #a8902c; font-size: .74rem; background: #2a2410; }
.vip-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.vip-stat { display: grid; gap: 4px; }
.vip-stat span { color: var(--muted); font-size: .8rem; }
.vip-stat b { font-size: 1.3rem; font-weight: 500; }
.vip-stat b.c1 { color: #19c9c4; } .vip-stat b.dim { color: var(--muted); font-size: .95rem; font-weight: 400; }
.vip-ref { display: flex; align-items: baseline; gap: 10px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.vip-ref b { color: var(--text); font-size: 1.1rem; font-weight: 600; }
.vip-note { margin: 14px 0 0; color: var(--muted); font-size: .8rem; }
.vip-copy + .vip-copy { margin-top: 14px; }
.vip-input { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--bg); }
.vip-input input { flex: 1; min-width: 0; padding: 9px 12px; background: transparent; border: 0; color: var(--text); font: inherit; font-size: .88rem; }
.vip-input .gold-btn { border-radius: 0; padding: 0 14px; white-space: nowrap; }
.vip-tabs { display: flex; gap: 8px; margin: -20px -20px 16px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.vip-tabs button { padding: 14px 18px 12px; background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: var(--muted); font-size: .95rem; cursor: pointer; }
.vip-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: #f1b90c; font-weight: 600; }
.vip-chartrow { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr); gap: 20px; align-items: center; }
.vip-legend p { margin: 0 0 14px; font-size: .9rem; } .vip-legend p.c1 { color: #19c9c4; } .vip-legend p.c2 { color: #3b9bff; } .vip-legend p.dim { color: var(--muted); font-size: .8rem; }
.vip-plot { background: var(--bg); border-radius: 8px; padding: 8px; min-width: 0; }
.vip-chart { display: block; width: 100%; height: auto; }
.vip-grid { stroke: #2a3050; stroke-dasharray: 3 4; } .vip-base { stroke: #3a4266; }
.vip-axis { fill: #c8d0ea; font-size: 11px; }
.vip-line { stroke: #19c9c4; stroke-width: 1.5; } .vip-dot { fill: #19c9c4; }
.vip-klgd { padding-bottom: 0; overflow: hidden; }
.vip-table { border: 1px solid var(--line); border-radius: 6px; background: var(--bg); max-height: 260px; overflow-y: auto; }
.vip-tr { display: grid; grid-template-columns: 1fr 1fr; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.vip-tr.head { color: var(--text); font-weight: 600; position: sticky; top: 0; background: var(--bg); }
.vip-empty { padding: 48px 12px; text-align: center; color: var(--muted); }
.vip-total { display: flex; justify-content: space-between; margin: 20px -20px 0; padding: 14px 32px; background: #f1b90c; color: #1b1300; font-size: 1.15rem; font-weight: 600; }
.vip-contact { max-width: 420px; }
.vip-contact a { color: var(--text); text-decoration: underline; }
@media (max-width: 1000px) { .vip-top, .vip-mid { grid-template-columns: 1fr; } .vip-chartrow { grid-template-columns: 1fr; } }

.vip-stat b.c3 { color: #f1b90c; }
.vip-comm { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.vip-crow { display: flex; justify-content: space-between; font-size: .88rem; color: var(--muted); }
.vip-crow b { color: var(--text); font-weight: 500; }
.vip-comm .gold-btn { justify-self: start; }
.vip-comm .gold-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Animate the list itself when switching MỞ / ĐÓNG, including empty lists. */
@keyframes order-tab-next {
  from { opacity: .2; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes order-tab-prev {
  from { opacity: .2; transform: translateX(-22px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes order-tab-fade {
  from { opacity: .35; }
  to { opacity: 1; }
}
.orders-side .side-list.swap { will-change: transform, opacity; }
.orders-side .side-list.swap[data-dir="next"] { animation: order-tab-next .42s cubic-bezier(.22, 1, .36, 1) both; }
.orders-side .side-list.swap[data-dir="prev"] { animation: order-tab-prev .42s cubic-bezier(.22, 1, .36, 1) both; }
.orders-side .side-list.swap > * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .orders-side .side-list.swap[data-dir] { animation: order-tab-fade .2s ease-out both !important; will-change: opacity; }
}

/* Yellow button: animate the whole order panel before removing it from layout. */
body.trade-page .orders-side {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity .26s ease, transform .36s cubic-bezier(.22, 1, .36, 1), padding .36s ease, visibility 0s, display .36s allow-discrete !important;
}
body.trade-page[data-side="closed"] .orders-side {
  display: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(28px);
  pointer-events: none;
  transition: opacity .26s ease, transform .36s cubic-bezier(.22, 1, .36, 1), padding .36s ease, visibility 0s .36s, display .36s allow-discrete !important;
}
/* The panel moves as one piece; old child transitions must not hide its content early. */
body.trade-page .orders-side > * {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
@starting-style {
  body.trade-page:not([data-side="closed"]) .orders-side { opacity: 0; transform: translateX(28px); }
}
@media (min-width: 1281px) {
  body.trade-page .terminal { grid-template-columns: minmax(0, 1fr) 15.5rem 17rem; transition: grid-template-columns .36s cubic-bezier(.22, 1, .36, 1) !important; }
  body.trade-page[data-side="closed"] .terminal { grid-template-columns: minmax(0, 1fr) 15.5rem 0rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.trade-page .terminal { transition: none !important; }
  body.trade-page .orders-side,
  body.trade-page[data-side="closed"] .orders-side {
    transform: none;
    transition: opacity .18s ease, visibility 0s .18s, display .18s allow-discrete !important;
  }
  @starting-style {
    body.trade-page:not([data-side="closed"]) .orders-side { opacity: 0; transform: none; }
  }
}
/* Reduced-motion: finish the short fade before collapsing the chart's third column. */
@media (prefers-reduced-motion: reduce) {
  body.trade-page .orders-side { transition: opacity .18s ease, visibility 0s, display .18s allow-discrete !important; }
  body.trade-page[data-side="closed"] .orders-side { transition: opacity .18s ease, visibility 0s .18s, display .18s allow-discrete !important; }
  @media (min-width: 1281px) {
    body.trade-page .terminal { transition: grid-template-columns 0s !important; }
    body.trade-page[data-side="closed"] .terminal { transition: grid-template-columns 0s linear .18s !important; }
  }
}
/* Yellow toggle: one compositor transition for panel, chart and order ticket. */
html.orders-panel-transition body.trade-page .terminal,
html.orders-panel-transition body.trade-page .orders-side,
html.orders-panel-transition body.trade-page[data-side="closed"] .terminal,
html.orders-panel-transition body.trade-page[data-side="closed"] .orders-side {
  transition: none !important;
}
html.orders-panel-transition body.trade-page .orders-side,
html.orders-panel-transition body.trade-page[data-side="closed"] .orders-side {
  opacity: 1;
  transform: none;
}
html.orders-panel-transition body.trade-page .stage { view-transition-name: trade-chart-stage; }
html.orders-panel-transition body.trade-page .ticket { view-transition-name: trade-order-ticket; }
html.orders-panel-transition body.trade-page .orders-side { view-transition-name: trade-order-panel; }
html.orders-panel-transition::view-transition-old(root),
html.orders-panel-transition::view-transition-new(root) { animation: none; }
html.orders-panel-transition::view-transition-group(trade-chart-stage),
html.orders-panel-transition::view-transition-group(trade-order-ticket),
html.orders-panel-transition::view-transition-group(trade-order-panel) {
  animation-duration: .46s;
  animation-timing-function: cubic-bezier(.22, 1, .36, 1);
}
html.orders-panel-transition::view-transition-old(trade-chart-stage),
html.orders-panel-transition::view-transition-new(trade-chart-stage),
html.orders-panel-transition::view-transition-old(trade-order-ticket),
html.orders-panel-transition::view-transition-new(trade-order-ticket) {
  width: 100%;
  height: 100%;
  object-fit: fill;
  animation-duration: .46s;
}
@keyframes order-panel-enter {
  from { transform: translateX(100%); opacity: .25; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes order-panel-exit {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}
html.orders-panel-transition::view-transition-new(trade-order-panel) {
  animation: order-panel-enter .46s cubic-bezier(.22, 1, .36, 1) both;
}
html.orders-panel-transition::view-transition-old(trade-order-panel) {
  animation: order-panel-exit .36s cubic-bezier(.4, 0, 1, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  html.orders-panel-transition::view-transition-group(trade-chart-stage),
  html.orders-panel-transition::view-transition-group(trade-order-ticket),
  html.orders-panel-transition::view-transition-group(trade-order-panel) { animation-duration: .14s; }
  html.orders-panel-transition::view-transition-old(trade-chart-stage),
  html.orders-panel-transition::view-transition-new(trade-chart-stage),
  html.orders-panel-transition::view-transition-old(trade-order-ticket),
  html.orders-panel-transition::view-transition-new(trade-order-ticket) { animation-duration: .14s; }
  html.orders-panel-transition::view-transition-old(trade-order-panel) { animation: order-panel-fade-out .14s ease both; }
  html.orders-panel-transition::view-transition-new(trade-order-panel) { animation: order-tab-fade .14s ease both; }
}
@keyframes order-panel-fade-out { to { opacity: 0; } }
/* Keep the chart live and sharp: slide a fixed-width panel, never fade page snapshots. */
body.trade-page .orders-side {
  display: block;
  padding: 0 !important;
  opacity: 1 !important;
  visibility: visible;
  transform: translateX(0);
  transition: transform .44s cubic-bezier(.22, 1, .36, 1), visibility 0s, display .44s allow-discrete !important;
}
body.trade-page[data-side="closed"] .orders-side {
  display: none;
  opacity: 1 !important;
  visibility: hidden;
  transform: translateX(100%);
  transition: transform .44s cubic-bezier(.22, 1, .36, 1), visibility 0s .44s, display .44s allow-discrete !important;
}
.orders-side-inner { box-sizing: border-box; width: 100%; min-height: 100%; padding: 0 .9rem 1rem; }
@starting-style {
  body.trade-page:not([data-side="closed"]) .orders-side { opacity: 1; transform: translateX(100%); }
}
@media (min-width: 1281px) {
  body.trade-page .terminal { grid-template-columns: minmax(0, 1fr) 15.5rem 17rem; transition: grid-template-columns .44s cubic-bezier(.22, 1, .36, 1) !important; }
  body.trade-page[data-side="closed"] .terminal { grid-template-columns: minmax(0, 1fr) 15.5rem 0rem; }
  body.trade-page .orders-side,
  body.trade-page[data-side="closed"] .orders-side {
    display: block;
    min-width: 0;
    overflow-x: hidden;
    transform: none;
  }
  body.trade-page .orders-side { transition: visibility 0s !important; }
  body.trade-page[data-side="closed"] .orders-side { transition: visibility 0s .44s !important; }
  body.trade-page .orders-side-inner { width: 17rem; }
  @starting-style {
    body.trade-page:not([data-side="closed"]) .orders-side { opacity: 1; transform: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  body.trade-page .terminal { transition: grid-template-columns .2s ease-out !important; }
  body.trade-page .orders-side { transition-duration: .2s, 0s, .2s !important; }
  body.trade-page[data-side="closed"] .orders-side { transition-duration: .2s, 0s, .2s !important; transition-delay: 0s, .2s, 0s !important; }
  @media (min-width: 1281px) {
    body.trade-page .orders-side { transition: visibility 0s !important; }
    body.trade-page[data-side="closed"] .orders-side { transition: visibility 0s .2s !important; }
  }
}
@media (prefers-reduced-motion: reduce) {
  body.trade-page .terminal,
  body.trade-page[data-side="closed"] .terminal { transition: grid-template-columns .2s ease-out !important; }
}