/* FINOX — user app. Mobile-first: base targets 360–430px, scales up at 640 / 1024. */
:root {
  --bg: #060d1f;
  --bg-deep: #02060f;
  --card: #0d1a35;
  --card2: #11224a;
  --input: #0b1730;
  --nav: #0a1430;
  --line: #16264a;
  --line2: #1b2c52;
  --line3: #1d3466;
  --gold: #f5b301;
  --gold-hi: #ffcc33;
  --gold-lo: #e09a00;
  --grad-gold: linear-gradient(180deg, #ffcc33, #e09a00);
  --on-gold: #1a1200;
  --text: #fff;
  --text2: #e6eaf5;
  --text3: #c3cbe0;
  --muted: #8a97b5;
  --ph: #5d6a8a;
  --green: #16c784;
  --red: #ea3943;
  --blue: #2a6df4;
  --blue-hi: #6f9bff;
  --r-card: 14px;
  --r-input: 10px;
  --r-btn: 12px;
  --f: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fh: Poppins, Inter, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 62px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.45 var(--f); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
a { color: var(--gold); text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
input::placeholder, textarea::placeholder { color: var(--ph); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- app shell ---------- */
.app { position: relative; width: 100%; max-width: 430px; margin: 0 auto; min-height: 100dvh; background: var(--bg); }
.app-main { min-height: 100dvh; }
.app.has-nav .app-main { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 12px); }
.page { padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.page-tight { gap: 10px; }
.view-banner { position: sticky; top: 0; z-index: 30; display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 12px; background: #3a2a00; color: #ffe08a; font: 600 12px var(--f); }
.view-banner button { min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #ffcc33; background: transparent; color: #ffcc33; font-weight: 600; cursor: pointer; }

@media (min-width: 640px) {
  body { display: flex; align-items: center; justify-content: center; padding: 24px 0; background: radial-gradient(ellipse at 50% 0%, #0b1838 0%, #02060f 60%) fixed; }
  .app { width: 430px; height: min(900px, calc(100dvh - 48px)); min-height: 0; border: 10px solid #141b2c; border-radius: 44px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px #2a3550; transform: translateZ(0); display: flex; flex-direction: column; }
  .app-main { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
  .app-main::-webkit-scrollbar { display: none; }
}

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--bg); display: grid; grid-template-columns: 88px 1fr 88px; align-items: center; min-height: 56px; padding: 0 8px; }
.topbar-title { text-align: center; font: 600 18px/1.2 var(--fh); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-sub { display: block; font: 400 11px var(--f); color: var(--muted); margin-top: 2px; }
.topbar-right { display: flex; justify-content: flex-end; }
img.logo-mark { display: inline-block; flex: none; object-fit: contain; }
.splash-logo { display: block; width: min(320px, 82vw); height: auto; margin: 0 auto 6px; filter: drop-shadow(0 10px 30px rgba(245,179,1,.18)); }
.topbar-logo { display: flex; align-items: center; justify-content: center; gap: 8px; font: 800 24px/1 var(--fh); letter-spacing: 1px; color: var(--gold); }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 12px; position: relative; flex: none; }
.icon-btn:active { background: var(--card); }
.dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.count-badge { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font: 700 10px/18px var(--f); text-align: center; }

/* ---------- home header ---------- */
.hello { position: sticky; top: 0; z-index: 10; background: var(--bg); display: flex; align-items: center; gap: 12px; padding: 8px 16px 10px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #2a6df4, #11224a); border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; font: 700 15px var(--fh); flex: none; overflow: hidden; color: #fff; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 84px; height: 84px; font-size: 26px; border-width: 3px; }
.avatar-sm { width: 36px; height: 36px; font-size: 13px; border-width: 1.5px; }
.hello-name { font: 600 16px var(--fh); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello-id { font: 12px var(--f); color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-tight { padding: 12px 14px; gap: 10px; }
.card-hi { border-color: var(--line3); }
.card-hero { border: 1px solid var(--line3); border-radius: var(--r-card); padding: 16px; background: linear-gradient(135deg, #11224a, #0d1a35); color: #fff; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.card-gold { border: 1px solid rgba(245,179,1,.35); background: linear-gradient(90deg, rgba(245,179,1,.14), var(--card) 70%); }
.box { background: var(--card2); border-radius: var(--r-input); padding: 10px; min-width: 0; }
.card-title { font: 600 16px var(--fh); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 600 15px var(--fh); }
.section-title a { font: 600 13px var(--f); }
.divider { height: 1px; background: var(--line2); border: 0; margin: 0; }

/* ---------- typography ---------- */
.h-xl { font: 700 30px/1.15 var(--fh); }
.h-lg { font: 700 24px/1.2 var(--fh); }
.h-md { font: 600 18px/1.3 var(--fh); }
.h-sm { font: 600 15px/1.3 var(--fh); }
.lbl { font: 500 13px var(--f); color: var(--text3); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.green { color: var(--green); }
.red { color: var(--red); }
.gold { color: var(--gold); }
.blue { color: var(--blue-hi); }
.center { text-align: center; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .5px; }
.disclaimer { font: 12px/1.5 var(--f); color: var(--muted); }

/* ---------- layout utils ---------- */
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.row-top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gap-lg { gap: 14px; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.kv-k { font: 11px var(--f); color: var(--muted); }
.kv-v { font: 600 13px var(--f); overflow-wrap: anywhere; }
.list { display: flex; flex-direction: column; gap: 8px; }
.mt-8 { margin-top: 8px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 18px; border: 0; border-radius: var(--r-btn); font: 600 16px var(--fh); cursor: pointer; text-align: center; transition: transform .1s, opacity .2s, background .2s; white-space: nowrap; user-select: none; }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-block { width: 100%; }
.btn-gold { background: var(--grad-gold); color: var(--on-gold); box-shadow: 0 8px 24px rgba(245,179,1,.18); }
.btn-gold:hover { color: var(--on-gold); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:active { background: #1f58cc; }
.btn-green { background: var(--green); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-ghost { background: var(--card2); color: var(--text2); border: 1px solid var(--line2); }
.btn-ghost:hover { color: var(--text2); }
.btn-outline { background: transparent; color: var(--text2); border: 1px solid var(--line2); }
.btn-dashed { background: rgba(42,109,244,.08); color: var(--blue-hi); border: 1px dashed var(--blue); }
.btn-danger-ghost { background: rgba(234,57,67,.1); color: #ff7b83; border: 1px solid rgba(234,57,67,.35); }
.btn-sm { min-height: 40px; padding: 0 14px; border-radius: 10px; font: 600 13px var(--f); }
.btn-xs { min-height: 44px; padding: 0 12px; border-radius: 8px; font: 700 12px var(--f); }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.link-btn { border: 0; background: transparent; padding: 6px 2px; color: var(--gold); font: 600 13px var(--f); cursor: pointer; min-height: 36px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font: 500 13px var(--f); color: var(--text3); }
.input, .select, .textarea { width: 100%; min-width: 0; height: 48px; background: var(--input); border: 1px solid var(--line2); border-radius: var(--r-input); color: #fff; font: 16px var(--f); padding: 0 14px; outline: none; transition: border-color .15s; -webkit-appearance: none; appearance: none; }
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.select { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a97b5' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); }
.input.has-error, .select.has-error, .textarea.has-error { border-color: var(--red); }
.input[readonly] { color: var(--text3); }
input[type="date"].input { color-scheme: dark; }
.input-strong { font-weight: 600; }
.input-spaced { letter-spacing: 1px; text-transform: uppercase; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .icon-btn { position: absolute; right: 2px; top: 2px; color: var(--muted); }
.input-group { display: flex; gap: 8px; }
.input-prefix { flex: none; height: 48px; padding: 0 12px; display: flex; align-items: center; gap: 8px; background: var(--input); border: 1px solid var(--line2); border-radius: var(--r-input); font: 600 15px var(--f); }
.flag-in { width: 20px; height: 14px; display: flex; flex-direction: column; border-radius: 2px; overflow: hidden; }
.flag-in i { flex: 1; display: flex; align-items: center; justify-content: center; }
.flag-in i:nth-child(1) { background: #ff9933; } .flag-in i:nth-child(2) { background: #fff; } .flag-in i:nth-child(3) { background: #138808; }
.flag-in i:nth-child(2)::after { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #000080; }
.hint { font: 12px var(--f); color: var(--muted); }
.err { font: 12px var(--f); color: var(--red); }
.check { display: flex; gap: 10px; align-items: flex-start; font: 13px/1.4 var(--f); color: var(--text3); min-height: 44px; padding-top: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--gold); flex: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font: 600 12px var(--f); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; font: 12px var(--f); color: var(--muted); }

/* file picker */
.file-pick { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px; border: 1px dashed var(--line3); border-radius: 12px; background: var(--input); cursor: pointer; }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-pick .thumb { width: 44px; height: 44px; border-radius: 10px; background: var(--card2); display: flex; align-items: center; justify-content: center; color: var(--gold); flex: none; overflow: hidden; }
.file-pick .thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-pick.has-file { border-style: solid; border-color: rgba(22,199,132,.5); }

/* OTP boxes */
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input { width: 100%; height: 54px; text-align: center; font: 700 22px var(--fh); background: var(--input); border: 1px solid var(--line2); border-radius: var(--r-input); color: #fff; outline: none; padding: 0; }
.otp input:focus { border-color: var(--gold); }

/* quick amount chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line2); background: var(--card); color: var(--text3); font: 600 13px var(--f); display: inline-flex; align-items: center; cursor: pointer; white-space: nowrap; }
.chip.active, .chip:active { border-color: var(--gold); color: var(--gold); background: rgba(245,179,1,.08); }

/* ---------- segmented tabs ---------- */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a, .seg button { flex: 1 0 auto; scroll-snap-align: start; min-width: 72px; min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--text3); font: 600 14px var(--f); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 10px; white-space: nowrap; transition: background .2s; }
.seg a.active, .seg button.active { background: var(--grad-gold); color: var(--on-gold); }
.seg-blue a, .seg-blue button { color: var(--muted); min-height: 40px; font-size: 13px; }
.seg-blue a.active, .seg-blue button.active { background: var(--blue); color: #fff; }
.sticky-tabs { position: sticky; top: 56px; z-index: 9; background: var(--bg); padding: 0 16px 10px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; font: 600 11px/1.3 var(--f); white-space: nowrap; flex: none; }
.b-green { background: rgba(22,199,132,.15); color: var(--green); }
.b-red { background: rgba(234,57,67,.15); color: #ff6b74; }
.b-gold { background: rgba(245,179,1,.15); color: var(--gold); }
.b-blue { background: rgba(42,109,244,.18); color: var(--blue-hi); }
.b-muted { background: rgba(138,151,181,.15); color: var(--text3); }
.b-solid-gold { background: var(--grad-gold); color: var(--on-gold); font-weight: 700; }

/* ---------- list items ---------- */
.item { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text); min-width: 0; min-height: 56px; }
a.item:hover { color: var(--text); border-color: var(--line3); }
.item-title { font: 600 14px var(--f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { font: 11px var(--f); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-end { text-align: right; flex: none; }
.ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(245,179,1,.12); border: 1px solid rgba(245,179,1,.3); color: var(--gold); display: flex; align-items: center; justify-content: center; flex: none; }
.ic-green { background: rgba(22,199,132,.12); border-color: rgba(22,199,132,.3); color: var(--green); }
.ic-red { background: rgba(234,57,67,.12); border-color: rgba(234,57,67,.3); color: #ff6b74; }
.ic-blue { background: rgba(42,109,244,.14); border-color: rgba(42,109,244,.35); color: var(--blue-hi); }
.flag { flex: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 700 10px var(--f); color: #fff; }
.menu { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 14px; color: var(--text); border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; width: 100%; cursor: pointer; font: 500 14px var(--f); }
.menu > :last-child { border-bottom: 0; }
.menu .chev { margin-left: auto; color: var(--muted); }
.menu .ic { width: 36px; height: 36px; border-radius: 10px; }

/* ---------- home ---------- */
.wallet-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.tile { grid-column: span 2; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--text); }
.tile.w3 { grid-column: span 3; }
.tile-k { font: 500 11px var(--f); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-v { font: 600 15px var(--fh); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 6px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text2); font: 500 12px var(--f); min-height: 44px; text-align: center; }
.quick .qi { width: 48px; height: 48px; border-radius: 14px; background: rgba(245,179,1,.12); border: 1px solid rgba(245,179,1,.3); color: var(--gold); display: flex; align-items: center; justify-content: center; }
.quick a:active { opacity: .7; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 32px; flex: none; }
.bars i { width: 6px; background: var(--gold); border-radius: 2px; }
.promo { display: flex; align-items: center; gap: 14px; border-radius: var(--r-card); padding: 14px 16px; color: #fff; }
.promo-title { font: 700 17px var(--fh); color: var(--gold); }
.promo-sub { font: 12px var(--f); color: var(--text3); }

/* ---------- progress ---------- */
.progress { height: 8px; border-radius: 4px; background: var(--line2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #16c784, #2ee59d); transition: width .6s; }
.progress.gold > span { background: var(--grad-gold); }

/* ---------- KYC stepper ---------- */
.steps { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 10px 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); }
.step::after { content: ""; position: absolute; top: 13px; left: calc(50% + 16px); right: calc(-50% + 16px); height: 2px; background: #2a3a62; }
.step:last-child::after { display: none; }
.step.done::after { background: var(--blue); }
.step-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #2a3a62; display: flex; align-items: center; justify-content: center; font: 700 13px var(--f); color: var(--muted); }
.step.done .step-dot { background: var(--blue); border-color: var(--blue); color: #fff; }
.step.current .step-dot { background: rgba(42,109,244,.15); border-color: var(--blue); color: #fff; }
.step-label { font: 500 11px/1.25 var(--f); text-align: center; }
.step.current .step-label { color: #fff; }

/* ---------- status hero ---------- */
.status-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 24px 16px; }
.status-icon { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.status-icon.ok { background: rgba(22,199,132,.14); color: var(--green); }
.status-icon.wait { background: rgba(245,179,1,.14); color: var(--gold); }
.status-icon.bad { background: rgba(234,57,67,.14); color: var(--red); }

/* ---------- trading ---------- */
.pair { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 10px 12px; min-width: 0; }
.pair-main { flex: 1; min-width: 0; color: var(--text); }
.pair-sym { font: 600 14px var(--f); }
.pair-px { text-align: right; min-width: 64px; }
.pair-px b { display: block; font: 600 14px var(--f); font-variant-numeric: tabular-nums; transition: color .3s; }
.pair-px small { font: 600 12px var(--f); font-variant-numeric: tabular-nums; }
.up { color: #5fe3ad !important; }
.down { color: #ff7b83 !important; }
.bs { display: flex; gap: 6px; flex: none; }
.bs .btn-xs { width: 48px; padding: 0; }
.pl-bar { display: flex; justify-content: space-between; align-items: center; background: var(--card2); border-radius: 12px; padding: 12px 14px; }
.chart-box { position: relative; background: #0a1530; border: 1px solid var(--line); border-radius: 12px; height: 260px; overflow: hidden; }
.chart-box canvas { width: 100%; height: 100%; display: block; }
.chart-box .skeleton { position: absolute; inset: 0; border-radius: 0; }
.side-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-toggle label { position: relative; }
.side-toggle input { position: absolute; opacity: 0; }
.side-toggle span { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); font: 700 15px var(--f); color: var(--text3); cursor: pointer; }
.side-toggle input:checked + span.buy { background: var(--green); border-color: var(--green); color: #fff; }
.side-toggle input:checked + span.sell { background: var(--red); border-color: var(--red); color: #fff; }
.side-toggle input:focus-visible + span { outline: 2px solid var(--gold); }
.stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: 8px; }
.stepper .input { text-align: center; font-weight: 600; }
.stepper button { height: 48px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card2); color: #fff; font: 600 20px var(--f); cursor: pointer; }

/* ---------- network ---------- */
.ref-box { display: flex; align-items: center; gap: 8px; background: var(--input); border: 1px dashed rgba(245,179,1,.5); border-radius: 12px; padding: 6px 6px 6px 14px; }
.ref-code { flex: 1; min-width: 0; font: 700 18px var(--fh); letter-spacing: 1px; color: var(--gold); }
.share-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.share-row a, .share-row button { min-height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; font: 600 13px var(--f); border: 0; cursor: pointer; color: #fff; }
.share-wa { background: #1fa855; } .share-tg { background: #229ed9; } .share-more { background: var(--card2); border: 1px solid var(--line2) !important; }
.level-card { text-align: center; padding: 12px 6px; }
.level-card b { display: block; font: 700 22px var(--fh); }
.tree { list-style: none; margin: 0; padding: 0; }
.tree ul { list-style: none; margin: 0; padding-left: 18px; border-left: 1px dashed var(--line3); margin-left: 18px; }
.tree li { margin-top: 8px; }
.tree-node { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-height: 52px; min-width: 0; }
.tree-toggle { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line2); background: var(--card2); color: var(--text2); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; transition: transform .2s; }
.tree-toggle[aria-expanded="true"] { transform: rotate(90deg); }
.tree-toggle[disabled] { visibility: hidden; }

/* ---------- income chart ---------- */
.spark { width: 100%; height: 150px; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font: 12px var(--f); color: var(--text3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.stack-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line2); }
.stack-bar span { height: 100%; }

/* ---------- table (statements) ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
.tbl { width: 100%; border-collapse: collapse; font: 13px var(--f); }
.tbl th { text-align: left; font: 600 11px var(--f); color: var(--muted); text-transform: uppercase; letter-spacing: .4px; padding: 10px 12px; background: var(--card2); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); white-space: nowrap; }

/* ---------- accordion (FAQ) ---------- */
.acc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.acc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 12px 14px; font: 600 14px var(--f); cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary svg { transition: transform .2s; flex: none; color: var(--muted); }
.acc[open] summary svg { transform: rotate(180deg); }
.acc .acc-body { padding: 0 14px 14px; color: var(--text3); font: 13px/1.6 var(--f); }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; gap: 8px; padding: 8px 16px 96px; }
.bubble { max-width: 82%; padding: 10px 12px; border-radius: 14px; font: 14px/1.45 var(--f); overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble small { display: block; margin-top: 4px; font-size: 10px; opacity: .7; }
.bubble.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; background: var(--card2); border-bottom-left-radius: 4px; }
.composer { position: fixed; left: 0; right: 0; bottom: 0; max-width: 430px; margin: 0 auto; z-index: 20; display: flex; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b)); background: var(--nav); border-top: 1px solid var(--line); }
.composer .input { height: 46px; }
.composer .btn { min-height: 46px; padding: 0 16px; }

/* ---------- empty / error / skeleton ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 28px 16px; color: var(--muted); font: 13px var(--f); }
.empty-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.empty b { color: var(--text2); font: 600 15px var(--fh); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font: 13px/1.45 var(--f); }
.alert-warn { background: rgba(245,179,1,.1); border: 1px solid rgba(245,179,1,.35); color: #ffe08a; }
.alert-error { background: rgba(234,57,67,.1); border: 1px solid rgba(234,57,67,.35); color: #ffb3b8; }
.alert-ok { background: rgba(22,199,132,.1); border: 1px solid rgba(22,199,132,.35); color: #9ff0cf; }
.alert-info { background: rgba(42,109,244,.1); border: 1px solid rgba(42,109,244,.35); color: #bcd2ff; }
.alert svg { flex: none; margin-top: 1px; }
.skeleton { background: linear-gradient(90deg, var(--card) 0%, var(--card2) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; }
.sk-row { height: 56px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- pagination ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 4px; }
.pager a, .pager span { min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--line); color: var(--text2); font: 600 13px var(--f); }
.pager span.cur { background: transparent; border-color: transparent; color: var(--muted); font-weight: 500; }
.pager .off { opacity: .4; pointer-events: none; }

/* ---------- bottom nav ---------- */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-width: 430px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--nav); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b)); }
.bnav a { min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font: 600 11px var(--f); }
.bnav a.active { color: var(--gold); }
.bnav a:active { opacity: .7; }

/* ---------- toast ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 34px); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; width: calc(100% - 32px); max-width: 398px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 100%; padding: 12px 16px; border-radius: 12px; background: #f2f4fa; color: var(--bg); font: 600 13px/1.4 var(--f); box-shadow: 0 10px 30px rgba(0,0,0,.4); text-align: center; animation: toastIn .25s ease-out; }
.toast.error { background: #ffe3e5; color: #7a0710; }
.toast.success { background: #dff8ee; color: #064a30; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- modal (native dialog) ---------- */
dialog.modal { width: min(400px, calc(100% - 32px)); border: 1px solid var(--line3); border-radius: 18px; padding: 0; background: var(--card); color: var(--text); }
dialog.modal::backdrop { background: rgba(2,6,15,.72); }
.modal-body { padding: 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.modal-title { font: 600 17px var(--fh); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 18px 18px; }

/* ---------- top loading bar ---------- */
.loadbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad-gold); z-index: 100; transition: width 8s cubic-bezier(.1,.7,.2,1); }
.loadbar.on { width: 85%; }

/* ---------- auth / splash ---------- */
.splash { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 32px 24px calc(28px + var(--safe-b)); background: radial-gradient(circle at 50% 30%, rgba(245,179,1,.14) 0%, rgba(6,13,31,0) 55%); }
@media (min-width: 640px) { .splash { min-height: 100%; } }
.splash-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding-top: 40px; }
.wordmark { font: 800 52px/1 var(--fh); letter-spacing: 2px; background: linear-gradient(180deg, #ffe07a, #f5b301 55%, #c98400); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { display: flex; gap: 8px; font: 600 12px var(--f); letter-spacing: 2px; color: var(--text2); }
.tagline i { color: var(--gold); font-style: normal; }
.splash-bottom { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.splash-h1 { text-align: center; font: 600 24px/1.3 var(--fh); text-wrap: balance; }
.trust { display: flex; gap: 10px; align-items: center; font: 500 13px var(--f); color: var(--text3); }
.trust i { color: var(--gold); font-style: normal; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; width: 100%; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 12px 8px; }
.slide-art { width: 180px; height: 180px; border-radius: 40px; background: radial-gradient(circle at 50% 40%, rgba(245,179,1,.22), rgba(13,26,53,1) 70%); border: 1px solid var(--line3); display: flex; align-items: center; justify-content: center; color: var(--gold); }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line3); transition: width .2s, background .2s; }
.dots i.on { width: 22px; background: var(--gold); }

/* ---------- prose (terms etc.) ---------- */
.prose { color: var(--text3); font: 14px/1.65 var(--f); display: flex; flex-direction: column; gap: 12px; }
.prose h2 { color: #fff; font: 600 16px var(--fh); margin-top: 6px; }
.prose ul { margin: 0; padding-left: 20px; }

/* ---------- system pages ---------- */
.sys { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px 24px; text-align: center; }
@media (min-width: 640px) { .sys { min-height: 100%; } }
.sys-code { font: 800 64px/1 var(--fh); background: linear-gradient(180deg, #ffe07a, #f5b301 55%, #c98400); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- larger screens ---------- */
@media (min-width: 1024px) {
  .app { height: min(920px, calc(100dvh - 48px)); }
}
@media (hover: hover) {
  .btn-gold:hover { filter: brightness(1.05); }
  .item:hover, .pair:hover { border-color: var(--line3); }
}
/* ---------- coin picker (USDT / test coin) ---------- */
.coin-pick { display: flex; gap: 8px; }
.coin-opt { flex: 1; cursor: pointer; }
.coin-opt input { position: absolute; opacity: 0; pointer-events: none; }
.coin-opt span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; border: 1px solid var(--line3); border-radius: var(--r-input); background: var(--input); transition: border-color .15s, background .15s; }
.coin-opt b { font: 700 15px var(--fh); color: var(--text); }
.coin-opt small { font: 500 11px var(--f); color: var(--muted); }
.coin-opt input:checked + span { border-color: var(--gold); background: rgba(245,179,1,.10); }
.coin-opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- payment success (first view after the gateway credited it) ---------- */
.celebrate { position: relative; overflow: hidden; }
.celebrate .status-icon { position: relative; animation: pay-pop .6s cubic-bezier(.2, 1.5, .4, 1) both; }
.celebrate .status-icon::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: pay-ring 1.2s .35s ease-out 2; }
.celebrate .h-xl { animation: pay-rise .5s .25s both; }
.celebrate-title { font: 700 22px var(--fh); color: var(--green); animation: pay-rise .5s .4s both; }
.celebrate-sub { animation: pay-rise .5s .55s both; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -14px; left: var(--x); width: 7px; height: 12px; border-radius: 2px; background: var(--c); opacity: 0; animation: pay-fall 1.9s var(--d) ease-in both; }
@keyframes pay-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pay-ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }
@keyframes pay-rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pay-fall { 0% { opacity: 1; transform: translateY(0) rotate(var(--r)); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(300px) rotate(calc(var(--r) + 540deg)); } }

/* ---------- payment waiting: pulse on the open payment page + overlay while the checkout popup is open ---------- */
.status-hero.waiting .status-icon { position: relative; }
.status-hero.waiting .status-icon::before, .status-hero.waiting .status-icon::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--gold); opacity: 0; animation: pw-wave 2.4s ease-out infinite; }
.status-hero.waiting .status-icon::after { animation-delay: 1.2s; }
body.paywait-open { overflow: hidden; }
.paywait { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(2,6,15,.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: pw-fade .25s ease-out both; }
.paywait-card { width: min(380px, 100%); background: var(--card); border: 1px solid var(--line3); border-radius: 20px; padding: 22px 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.45); animation: pw-up .35s cubic-bezier(.2,1.2,.4,1) both; }
.pw-anim { position: relative; width: 112px; height: 112px; display: grid; place-items: center; margin: 4px 0 2px; }
.pw-ring { position: absolute; inset: 18px; border-radius: 50%; border: 2px solid var(--gold); opacity: 0; animation: pw-wave 2.4s ease-out infinite; }
.pw-ring.r2 { animation-delay: .8s; }
.pw-ring.r3 { animation-delay: 1.6s; }
.pw-core { position: relative; width: 72px; height: 72px; border-radius: 50%; display: none; place-items: center; }
.pw-core-wait { display: grid; background: rgba(245,179,1,.14); color: var(--gold); animation: pw-bob 1.6s ease-in-out infinite; }
.pw-core-done { background: rgba(22,199,132,.16); color: var(--green); animation: pay-pop .55s cubic-bezier(.2,1.5,.4,1) both; }
.pw-core-fail { background: rgba(234,57,67,.14); color: var(--red); }
.paywait[data-state="confirming"] .pw-ring { border-color: var(--blue-hi); animation-duration: 1.4s; }
.paywait[data-state="confirming"] .pw-core-wait { background: rgba(42,109,244,.16); color: var(--blue-hi); }
.paywait[data-state="done"] .pw-core-wait, .paywait[data-state="failed"] .pw-core-wait { display: none; }
.paywait[data-state="done"] .pw-core-done, .paywait[data-state="failed"] .pw-core-fail { display: grid; }
.paywait[data-state="done"] .pw-ring { border-color: var(--green); animation-iteration-count: 1; }
.paywait[data-state="failed"] .pw-ring, .paywait[data-state="done"] .pw-timer, .paywait[data-state="failed"] .pw-timer,
.paywait[data-state="done"] [data-pw-open], .paywait[data-state="failed"] [data-pw-open] { display: none; }
.pw-title { font: 700 19px var(--fh); color: var(--text); }
.paywait[data-state="done"] .pw-title { color: var(--green); }
.pw-amount { font: 700 26px var(--fh); color: var(--gold); }
.pw-text { margin: 0; max-width: 300px; min-height: 2.6em; }
.pw-steps { list-style: none; display: flex; gap: 6px; margin: 2px 0; padding: 0; width: 100%; }
.pw-steps li { flex: 1; font: 600 11px var(--f); color: var(--muted); padding-top: 8px; border-top: 3px solid var(--line3); transition: color .3s, border-color .3s; }
.paywait[data-state="waiting"] [data-step="waiting"],
.paywait[data-state="confirming"] [data-step="waiting"], .paywait[data-state="confirming"] [data-step="confirming"],
.paywait[data-state="done"] li { color: var(--text2); border-top-color: var(--gold); }
.paywait[data-state="done"] li { border-top-color: var(--green); }
.paywait[data-state="confirming"] [data-step="confirming"] { animation: pw-blink 1.2s ease-in-out infinite; }
.pw-blocked [data-pw-open] { animation: trade-pulse 1.6s ease-in-out infinite; }
.pw-close { margin-top: 2px; color: var(--muted); }
/* embedded checkout (iframe), like a video player over the page */
.pw-frame { display: none; }
.paywait.pw-embed { padding: 12px; }
.paywait.pw-embed .paywait-card { display: none; }
.paywait.pw-embed .pw-frame { display: flex; flex-direction: column; width: min(460px, 100%); height: min(780px, 100%); background: var(--card); border: 1px solid var(--line3); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.5); animation: pw-up .35s cubic-bezier(.2,1.2,.4,1) both; }
.pw-bar { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--line2); font: 500 13px var(--f); color: var(--text2); }
.pw-bar-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-bar-amt { color: var(--gold); font-weight: 700; margin-left: 4px; }
.pw-bar-timer { font: 700 13px var(--f); color: var(--muted); }
.pw-x { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--text3); cursor: pointer; }
.pw-x:hover { background: var(--card2); }
.pw-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); flex: none; box-shadow: 0 0 0 0 rgba(245,179,1,.6); animation: pw-dot 1.6s ease-out infinite; }
.paywait[data-state="confirming"] .pw-dot { background: var(--blue-hi); }
.paywait[data-state="done"] .pw-dot { background: var(--green); animation: none; }
.paywait[data-state="done"] .pw-bar b { color: var(--green); }
.pw-frame-box { position: relative; flex: 1; background: var(--bg-deep); }
.pw-frame-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .35s; }
.pw-ready .pw-frame-box iframe { opacity: 1; }
.pw-frame-loading { position: absolute; inset: 0; display: grid; place-items: center; }
.pw-frame-loading .pw-ring { inset: calc(50% - 46px); }
.pw-ready .pw-frame-loading { display: none; }
.pw-frame-foot { padding: 8px 14px calc(8px + var(--safe-b)); border-top: 1px solid var(--line2); text-align: center; }
@media (max-width: 520px) {
  .paywait.pw-embed { padding: 0; }
  .paywait.pw-embed .pw-frame { width: 100%; height: 100%; border: 0; border-radius: 0; }
}
@keyframes pw-dot { 0% { box-shadow: 0 0 0 0 rgba(245,179,1,.55); } 100% { box-shadow: 0 0 0 9px rgba(245,179,1,0); } }
@keyframes pw-wave { 0% { transform: scale(.75); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes pw-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pw-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pw-up { from { transform: translateY(16px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pw-blink { 50% { opacity: .45; } }

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

/* ---------- selectable cards ---------- */
.plan-opt { display: block; cursor: pointer; }
.plan-opt .card { transition: border-color .15s, background .15s; }
.plan-opt input:checked + .card { border-color: var(--gold); background: rgba(245,179,1,.08); }
.plan-opt input:focus-visible + .card { outline: 2px solid var(--gold); outline-offset: 2px; }
label.item.plan-opt:has(input:checked) { border-color: var(--gold); }

/* ellipsis only works on block-level boxes */
.item-title, .item-sub { display: block; }
.item > .grow { overflow: hidden; }

/* ---------- Bot / ROI program ---------- */
.bot-card { display: flex; align-items: center; gap: 12px; border-radius: var(--r-card); padding: 14px 16px; border: 1px solid var(--line3); background: linear-gradient(135deg, rgba(42,109,244,.18), var(--card) 65%); color: var(--text); }
.bot-card.off { border-color: rgba(234,57,67,.4); background: linear-gradient(135deg, rgba(234,57,67,.14), var(--card) 65%); }
.bot-card .bot-ic { width: 46px; height: 46px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center; background: rgba(42,109,244,.18); border: 1px solid rgba(42,109,244,.4); color: var(--blue-hi); }
.bot-card.off .bot-ic { background: rgba(234,57,67,.14); border-color: rgba(234,57,67,.4); color: #ff7b83; }
.bot-days { font: 700 22px/1 var(--fh); }
.money-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.money-grid .box { display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.money-grid .v { font: 700 18px var(--fh); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inc-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.inc-row .box { text-align: center; }
.inc-row .v { font: 700 15px var(--fh); }

/* TRADE button + simulated run */
.trade { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 16px; border-radius: var(--r-card); border: 1px solid rgba(245,179,1,.35); background: radial-gradient(ellipse at 50% 0%, rgba(245,179,1,.16), var(--card) 70%); text-align: center; overflow: hidden; }
.trade-btn { width: 100%; min-height: 64px; border: 0; border-radius: 16px; background: var(--grad-gold); color: var(--on-gold); font: 800 22px/1 var(--fh); letter-spacing: .18em; cursor: pointer; box-shadow: 0 10px 30px rgba(245,179,1,.28); display: inline-flex; align-items: center; justify-content: center; gap: 10px; animation: trade-pulse 2.4s ease-in-out infinite; }
.trade-btn:active { transform: scale(.98); }
.trade-btn[disabled] { opacity: .45; animation: none; cursor: not-allowed; }
.trade-sub { font: 12px var(--f); color: var(--text3); }
.trade-done .trade-btn { background: rgba(22,199,132,.16); color: var(--green); box-shadow: none; animation: none; letter-spacing: .02em; font-size: 18px; border: 1px solid rgba(22,199,132,.45); cursor: default; }
.trade-stage { width: 100%; display: none; flex-direction: column; align-items: center; gap: 8px; }
.trade.running .trade-stage, .trade.result .trade-stage { display: flex; }
.trade.running .trade-btn, .trade.result .trade-btn { display: none; }
.trade-chart { width: 100%; height: 92px; border-radius: 12px; background: #0a1530; border: 1px solid var(--line2); overflow: hidden; }
.trade-chart polyline { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 420; stroke-dashoffset: 420; }
.trade.running .trade-chart polyline { animation: trade-draw 2.4s ease-out forwards; }
.trade.result .trade-chart polyline { stroke-dashoffset: 0; }
.trade-chart rect { transform-box: fill-box; transform-origin: center bottom; transform: scaleY(0); }
.trade.running .trade-chart rect { animation: trade-candle .5s ease-out forwards; }
.trade.result .trade-chart rect { transform: scaleY(1); }
.trade-status { display: flex; align-items: center; gap: 8px; font: 700 16px var(--fh); }
.trade-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--gold); border-right-color: transparent; animation: spin .7s linear infinite; }
.trade.result .trade-spin { display: none; }
.trade.result .trade-status { color: var(--green); }
.trade-roi { font: 700 24px var(--fh); color: var(--green); }
.countdown { font: 600 13px var(--f); color: var(--text3); font-variant-numeric: tabular-nums; }
@keyframes trade-draw { to { stroke-dashoffset: 0; } }
@keyframes trade-candle { to { transform: scaleY(1); } }
@keyframes trade-pulse { 0%, 100% { box-shadow: 0 10px 30px rgba(245,179,1,.22); } 50% { box-shadow: 0 10px 38px rgba(245,179,1,.5); } }

/* investments */
.inv-card { display: flex; flex-direction: column; gap: 12px; }
.inv-head { display: flex; align-items: center; gap: 10px; }
.inv-code { font: 700 15px var(--fh); }
.roi-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.roi-credited { background: var(--green); }
.roi-missed_no_trade { background: var(--gold); }
.roi-missed_no_bot { background: var(--red); }
.locked { display: inline-flex; align-items: center; gap: 6px; }

/* rank cards — slot-artwork style: tinted gradient, emblem, shine */
.rank-card { --rc: #2a6df4; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--line3); background: var(--card); border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--rc) 30%, #0d1a35) 0%, #0d1a35 62%); }
.rank-card::after { content: ""; position: absolute; inset: -40% auto auto -30%; width: 60%; height: 180%; transform: rotate(22deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); pointer-events: none; }
.rank-card.locked-card { filter: saturate(.55); opacity: .82; }
.rank-top { display: flex; align-items: center; gap: 12px; }
.rank-emblem { width: 48px; height: 48px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--rc); background: var(--card2); border: 1px solid var(--line3); background: color-mix(in srgb, var(--rc) 18%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); }
.rank-name { font: 800 18px/1.1 var(--fh); color: #fff; }
.rank-no { font: 600 11px var(--f); color: var(--text3); letter-spacing: .08em; text-transform: uppercase; }
.rank-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; position: relative; z-index: 1; }
.rank-stats .box { background: rgba(2,6,15,.35); }
.rank-stats .v { font: 700 14px var(--fh); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-card .progress > span { background: linear-gradient(90deg, var(--rc), color-mix(in srgb, var(--rc) 60%, #fff)); }

/* legs */
.leg-ok { color: var(--green); display: inline-flex; align-items: center; gap: 4px; font: 700 12px var(--f); }
.leg-no { color: var(--muted); font: 600 12px var(--f); }
.calc-skip { display: flex; align-items: center; gap: 10px; }
.calc-skip input[type=range] { flex: 1; accent-color: var(--gold); }

/* Test clock (test installs only) */
.test-clock { display: block; text-align: center; font-size: 12px; font-weight: 700; padding: 6px 10px; background: #f5b301; color: #1a1300; }
