/* ==========================================================================
   Vantix — design system
   Matte dark surfaces, hairline borders, restrained violet accent.
   No glows, no glossy gradients: depth comes from surface steps and borders.
   ========================================================================== */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
}

:root {
  --bg: #0a0a0b;
  --surface: #111113;
  --surface-2: #161618;
  --surface-3: #1c1c1f;
  --surface-4: #24242a;
  --border: #1f1f23;
  --border-strong: #2a2a30;
  --border-hover: #3a3a42;
  --text: #ececef;
  --text-2: #a1a1aa;
  --muted: #71717a;

  --up: #2ebd85;
  --up-hover: #29a877;
  --up-soft: rgba(46, 189, 133, 0.1);
  --down: #f6465d;
  --down-hover: #e03e54;
  --down-soft: rgba(246, 70, 93, 0.1);
  --accent: #7c5cfc;
  --accent-hover: #6e4ef0;
  --accent-text: #a995ff;
  --accent-soft: rgba(124, 92, 252, 0.12);
  --warn: #e9a23b;

  /* Matte violet used for the one highlighted card per screen */
  --featured: linear-gradient(150deg, #5d47d6 0%, #3d2d99 58%, #2a2070 100%);

  --r-sm: 8px;
  --r: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --pill: 999px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: var(--font);
  --pop: 0 16px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: #c3b6ff; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
strong, b { font-weight: 600; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
[hidden] { display: none !important; }
::selection { background: rgba(124, 92, 252, 0.35); }
* { scrollbar-width: thin; scrollbar-color: #2a2a30 transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; font-weight: 500; }
.up-text { color: var(--up); }
.down-text { color: var(--down); }
.right { text-align: right; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 18px; border-radius: var(--pill);
  border: 1px solid transparent; font-weight: 600; font-size: 13.5px;
  white-space: nowrap; transition: background .15s, border-color .15s, color .15s; text-decoration: none !important;
}
.btn-primary { background: var(--accent); color: #fff !important; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-up { background: var(--up); color: #fff !important; }
.btn-up:hover { background: var(--up-hover); }
.btn-down { background: var(--down); color: #fff !important; }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text) !important; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-hover); }
.btn-lg { height: 46px; font-size: 14.5px; padding: 0 24px; }
.btn-block { width: 100%; }
.btn-sm { height: 30px; padding: 0 13px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 50%; border: 1px solid var(--border-strong); background: transparent; color: var(--text-2);
  transition: .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-hover); }
.icon-btn svg, .side-item svg, .trade-btn svg, .seg svg, .chev, .dir, .chip-ico svg, .pill-nav svg, .ico {
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn svg { width: 17px; height: 17px; }

.chip-ico {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-2);
}
.chip-ico svg { width: 15px; height: 15px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 12px; color: var(--text-2); font-weight: 500; }
.field input, .field select, .field textarea, .search {
  height: 44px; padding: 0 14px; width: 100%;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r);
  outline: none; transition: border-color .15s; font-weight: 500;
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field select option { background: var(--surface-2); }
.field input::placeholder, .search::placeholder { color: var(--muted); }
.field input:hover, .field select:hover, .search:hover { border-color: var(--border-hover); }
.field input:focus, .field select:focus, .search:focus { border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); }
.check input { margin-top: 3px; accent-color: var(--accent); }

.alert { padding: 11px 14px; border-radius: var(--r); font-size: 13px; margin: 14px 0; }
.alert-err { background: var(--down-soft); color: #ff8a99; border: 1px solid rgba(246,70,93,.22); }
.alert-ok { background: var(--up-soft); color: #6fd8ad; border: 1px solid rgba(46,189,133,.22); }
.note { font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: 11px 14px; border-radius: var(--r); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: var(--pill); text-transform: capitalize; }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill-pending { background: rgba(233,162,59,.1); color: var(--warn); }
.pill-approved, .pill-win, .pill-active { background: var(--up-soft); color: var(--up); }
.pill-rejected, .pill-loss, .pill-blocked { background: var(--down-soft); color: var(--down); }
.pill-open, .pill-draw { background: var(--accent-soft); color: var(--accent-text); }
.pill-demo { background: rgba(233,162,59,.1); color: var(--warn); }
.pill-real { background: var(--up-soft); color: var(--up); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text) !important; font-weight: 700; font-size: 17px; letter-spacing: -.02em; text-decoration: none !important; }
.brand-mark { flex-shrink: 0; }

.card, .glass { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 100; width: min(340px, calc(100vw - 32px)); }
.toast {
  background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: var(--r-md);
  padding: 12px 14px 12px 16px; font-size: 13px; box-shadow: var(--pop);
  transform: translateY(8px); opacity: 0; transition: .2s ease; position: relative; overflow: hidden;
}
.toast::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.toast.show { transform: none; opacity: 1; }
.toast.win::before { background: var(--up); }
.toast.loss::before, .toast.err::before { background: var(--down); }
.toast-sub { color: var(--text-2); font-size: 12px; }
.toast-main { font-size: 16px; font-weight: 600; margin-top: 2px; }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 400px; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; }
.auth-brand { margin-bottom: 28px; }
.auth-title { font-size: 22px; margin: 0 0 6px; letter-spacing: -.025em; font-weight: 600; }
.auth-card .form { margin-top: 22px; }
.auth-alt { margin-top: 20px; text-align: center; font-size: 13px; }
.quick-demo { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); }
.quick-btns { display: flex; gap: 6px; }

/* ==========================================================================
   Trading terminal
   ========================================================================== */
.terminal { overflow: hidden; height: 100vh; height: 100dvh; }
.app {
  display: grid; height: 100%;
  grid-template-columns: 72px minmax(0, 1fr) 288px;
  grid-template-rows: 64px minmax(0, 1fr);
  grid-template-areas: "top top top" "side chart panel";
  position: relative;
}

.topbar { grid-area: top; display: flex; align-items: center; gap: 12px; padding: 0 16px; min-width: 0; border-bottom: 1px solid var(--border); background: var(--bg); }
.topbar .brand { margin-right: 4px; flex-shrink: 0; }
.asset-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 3px; border-radius: var(--pill); border: 1px solid var(--border); }
.asset-tabs:empty { display: none; }
.asset-tabs::-webkit-scrollbar { display: none; }
.asset-tab {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 14px;
  border-radius: var(--pill); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; flex-shrink: 0; user-select: none; color: var(--text-2); transition: .15s;
}
.asset-tab:hover { color: var(--text); }
.asset-tab.active { color: var(--text); background: var(--surface-3); border-color: var(--border-strong); }
.tab-sym { font-weight: 600; font-size: 13px; }
.tab-pay { font-size: 11.5px; color: var(--up); font-weight: 600; }
.tab-x { width: 22px; height: 22px; border: 0; background: none; color: var(--muted); border-radius: 50%; font-size: 15px; line-height: 1; }
.tab-x:hover { background: var(--surface-4); color: var(--text); }
.asset-tab:not(:has(.tab-x)) { padding-right: 14px; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.account-switch { position: relative; }
.account-btn {
  display: grid; grid-template-columns: auto 14px; column-gap: 12px; text-align: left; align-items: center;
  background: transparent; border: 1px solid var(--border-strong); border-radius: var(--pill);
  padding: 3px 14px 4px 18px; height: 44px; transition: .15s;
}
.account-btn:hover { border-color: var(--border-hover); background: var(--surface); }
.account-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--warn); font-weight: 600; display: flex; align-items: center; gap: 6px; line-height: 1.3; }
.account-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.is-real .account-label { color: var(--up); }
.account-balance { grid-row: 2; font-weight: 600; font-size: 15px; letter-spacing: -.01em; line-height: 1.3; }
.chev { grid-row: 1 / span 2; grid-column: 2; width: 14px; height: 14px; color: var(--muted); }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 270px; z-index: 30; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 6px; box-shadow: var(--pop); }
.acct-option { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--r); background: none; border: 0; font-weight: 500; }
.acct-option:hover { background: var(--surface-3); }
.acct-option.active { background: var(--surface-3); }
.acct-option strong { font-weight: 600; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 10px; }
.dot-real { background: var(--up); }
.dot-demo { background: var(--warn); }
.dropdown-sep { height: 1px; background: var(--border-strong); margin: 6px 4px; }
.dropdown-link { width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: var(--r); color: var(--text-2); font-size: 13px; }
.dropdown-link:hover { background: var(--surface-3); color: var(--text); }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer;
}
.avatar.lg { width: 52px; height: 52px; font-size: 17px; cursor: default; }

/* side nav */
.sidenav { grid-area: side; display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px; z-index: 20; border-right: 1px solid var(--border); background: var(--bg); }
.side-item {
  width: 56px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0;
  border-radius: var(--r-md); border: 0; background: none; color: var(--muted);
  font-size: 10.5px; font-weight: 500; text-decoration: none !important; transition: .15s;
}
.side-item svg { width: 20px; height: 20px; }
.side-item:hover { color: var(--text); background: var(--surface); }
.side-item.active { color: var(--text); background: var(--surface-2); }

/* drawer */
.drawer {
  position: absolute; left: 72px; top: 64px; bottom: 0; width: 370px; z-index: 15;
  background: var(--surface); border-right: 1px solid var(--border-strong);
  display: flex; flex-direction: column; transform: translateX(-12px); opacity: 0; transition: .2s ease;
  box-shadow: 24px 0 48px rgba(0,0,0,.4);
}
.drawer.open { transform: none; opacity: 1; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.drawer-body { padding: 18px 20px 24px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 24px 0 10px; font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 2px; }
.stat span { font-size: 11.5px; color: var(--muted); }
.stat strong { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.stat small { font-weight: 500; }
.acct-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; color: var(--warn); }
.acct-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.acct-pill.real { color: var(--up); }

.hist-row { padding: 12px 0; border-bottom: 1px solid var(--border); display: grid; gap: 3px; }
.hist-main, .hist-sub { display: flex; justify-content: space-between; gap: 10px; }
.hist-sub { font-size: 12px; }
#histMore { margin-top: 14px; }

.wallet-bal { display: grid; gap: 2px; margin-bottom: 16px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--featured); }
.wallet-bal .muted { color: rgba(255,255,255,.7); }
.wallet-bal strong { font-size: 28px; font-weight: 600; letter-spacing: -.03em; color: #fff; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.method { position: relative; }
.method input { position: absolute; opacity: 0; }
.method span { display: grid; place-items: center; height: 42px; border: 1px solid var(--border-strong); border-radius: var(--r); font-size: 12.5px; font-weight: 500; cursor: pointer; text-align: center; padding: 0 6px; transition: .15s; color: var(--text-2); }
.method span:hover { border-color: var(--border-hover); color: var(--text); }
.method input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.method input:focus-visible + span { outline: 2px solid var(--accent); }
.chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: -6px; }
.chip { height: 32px; padding: 0 4px; border-radius: var(--pill); border: 1px solid var(--border-strong); background: transparent; font-size: 12px; font-weight: 500; color: var(--text-2); }
.chip:hover { border-color: var(--border-hover); color: var(--text); }
.tx-row { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tx-row strong { font-weight: 500; }
.profile-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.logout { margin-top: 24px; color: var(--down) !important; }
.help ol { padding-left: 18px; color: var(--text-2); margin: 0; display: grid; gap: 8px; }
.kbd-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
kbd { font-family: var(--font); font-weight: 500; font-size: 11px; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 5px; padding: 1px 6px; color: var(--text); }

/* chart */
.chart-area { grid-area: chart; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.chart-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px 4px; position: relative; z-index: 2; }
.chart-asset { display: flex; align-items: baseline; gap: 12px; margin-right: auto; min-width: 0; }
.chart-symbol { font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.chart-price { font-size: 15px; font-weight: 500; color: var(--text-2); padding: 1px 6px; border-radius: 6px; transition: color .3s; }
.chart-price.tick-up { color: var(--up); }
.chart-price.tick-down { color: var(--down); }
.chart-tools { display: flex; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--pill); padding: 3px; gap: 1px; flex-shrink: 0; }
.seg button { border: 0; background: none; height: 28px; min-width: 34px; padding: 0 10px; border-radius: var(--pill); color: var(--muted); font-size: 12px; font-weight: 500; display: grid; place-items: center; transition: .15s; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface-3); color: var(--text); }
.seg svg { width: 16px; height: 16px; }
.seg-wide { display: flex; margin-bottom: 16px; }
.seg-wide button { flex: 1; height: 34px; font-size: 13px; }
.chart { flex: 1; min-height: 0; position: relative; }
.chart-status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.chart-area::after { content: ""; position: absolute; inset: 56px 70px 30px 0; pointer-events: none; opacity: 0; transition: opacity .2s; }
.chart-area.hint-up::after { opacity: 1; background: linear-gradient(to bottom, rgba(46,189,133,.07), transparent 50%); }
.chart-area.hint-down::after { opacity: 1; background: linear-gradient(to top, rgba(246,70,93,.07), transparent 50%); }

/* trade panel */
.trade-panel { grid-area: panel; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 0; border-left: 1px solid var(--border); background: var(--bg); }
.tp-row { display: grid; gap: 12px; }
.ctl { position: relative; }
.ctl-label { font-size: 12px; color: var(--muted); margin: 0 0 6px 2px; font-weight: 500; }
.ctl-box { display: grid; grid-template-columns: 40px 1fr 40px; height: 48px; padding: 3px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--pill); transition: border-color .15s; }
.ctl-box:hover { border-color: var(--border-hover); }
.ctl-box:focus-within { border-color: var(--accent); }
.ctl-step { border: 0; background: var(--surface-3); color: var(--text-2); font-size: 17px; border-radius: 50%; transition: .15s; }
.ctl-step:hover { background: var(--surface-4); color: var(--text); }
.ctl-value { border: 0; background: none; text-align: center; font-size: 17px; font-weight: 600; width: 100%; outline: none; min-width: 0; }
.presets { position: absolute; z-index: 25; left: 0; right: 0; top: calc(100% + 6px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--pop); }
.presets button { height: 34px; border: 0; border-radius: var(--r-sm); background: transparent; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.presets button:hover { background: var(--surface-4); color: var(--text); }
.payout-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 4px 4px; color: var(--text-2); }
.payout-row strong { color: var(--up); font-weight: 600; }
.payout-amount { font-size: 13px; font-weight: 500; }
.tp-actions { display: grid; gap: 8px; }
.trade-btn {
  height: 60px; border: 0; border-radius: var(--r-md); color: #fff !important; font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, transform .06s; text-decoration: none !important;
}
.trade-btn svg { width: 20px; height: 20px; stroke-width: 2.2; }
.trade-btn.up { background: var(--up); }
.trade-btn.up:hover { background: var(--up-hover); }
.trade-btn.down { background: var(--down); }
.trade-btn.down:hover { background: var(--down-hover); }
.trade-btn:active { transform: scale(.99); }
.trade-btn.busy { opacity: .7; pointer-events: none; }

.tp-trades { flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--border); margin: 4px -16px -16px; }
.tabs-mini { display: flex; gap: 2px; padding: 10px 12px 4px; }
.tabs-mini button { border: 0; background: none; height: 30px; padding: 0 12px; font-size: 12.5px; font-weight: 500; color: var(--muted); border-radius: var(--pill); }
.tabs-mini button:hover { color: var(--text); }
.tabs-mini button.active { color: var(--text); background: var(--surface-2); }
.count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: var(--pill); background: var(--surface-4); color: var(--text-2); font-size: 10.5px; }
.trade-list { overflow-y: auto; padding: 6px 12px 12px; flex: 1; overscroll-behavior: contain; }
.trade-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 6px; display: grid; gap: 7px; }
.trade-item.is-win { box-shadow: inset 2px 0 0 var(--up); }
.trade-item.is-loss { box-shadow: inset 2px 0 0 var(--down); }
.ti-top, .ti-bot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; }
.ti-sym { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.ti-amt { font-weight: 500; }
.dir { width: 15px; height: 15px; stroke-width: 2.4; }
.dir.up { color: var(--up); }
.dir.down { color: var(--down); }
.ti-bar { height: 3px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.ti-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .25s linear; }
.empty { text-align: center; color: var(--text-2); padding: 28px 12px; font-size: 13px; line-height: 1.7; }

/* asset modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 50; display: grid; place-items: start center; padding: 72px 16px 16px; }
.modal-card { width: 100%; max-width: 580px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: var(--pop); overflow: hidden; }
.modal-head { display: flex; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border); align-items: center; }
.modal-head .search { border-radius: var(--pill); height: 42px; }
.cat-tabs { display: flex; gap: 4px; padding: 12px 14px; overflow-x: auto; scrollbar-width: none; }
.cat-tabs button { border: 1px solid var(--border-strong); background: none; height: 30px; padding: 0 13px; border-radius: var(--pill); font-size: 12.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.cat-tabs button:hover { color: var(--text); }
.cat-tabs button.active { background: var(--surface-3); border-color: var(--border-hover); color: var(--text); }
.asset-table-head, .asset-row { display: grid; grid-template-columns: 1fr 110px 72px 62px; gap: 8px; align-items: center; }
.asset-table-head { font-size: 11px; color: var(--muted); font-weight: 500; margin: 0 14px; padding: 9px 12px; border-radius: var(--pill); background: var(--surface-2); }
.asset-table-head span:not(:first-child), .asset-row > span:not(:first-child) { text-align: right; }
.asset-list { max-height: min(60vh, 520px); overflow-y: auto; padding: 6px 14px 12px; }
.asset-row { width: 100%; border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: var(--r); }
.asset-row:hover { background: var(--surface-2); }
.asset-row.active { background: var(--surface-3); }
.asset-row strong { font-weight: 600; }
.asset-row small { display: block; color: var(--muted); font-size: 11.5px; }
.pay-badge { color: var(--up); font-weight: 600; font-size: 13px; }

/* ==========================================================================
   Public site
   ========================================================================== */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.site-nav { position: sticky; top: 0; z-index: 20; background: rgba(10,10,11,.9); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.nav-links { display: flex; gap: 2px; padding: 3px; border-radius: var(--pill); border: 1px solid var(--border); margin-left: 12px; }
.nav-links a { color: var(--text-2); font-size: 13.5px; font-weight: 500; padding: 7px 15px; border-radius: var(--pill); }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-actions { margin-left: auto; display: flex; gap: 8px; }

/* live price strip under the nav */
.ticker { border-bottom: 1px solid var(--border); overflow: hidden; height: 38px; display: flex; align-items: center; background: var(--bg); }
.ticker-track { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; }
.tick { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; font-size: 12.5px; white-space: nowrap; border-right: 1px solid var(--border); }
.tick b { font-weight: 600; }
.tick .tp { color: var(--text-2); }
@keyframes ticker { to { transform: translateX(-50%); } }

.hero { padding: 72px 0 80px; border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.06; letter-spacing: -.04em; margin: 0 0 20px; font-weight: 600; max-width: 560px; }
.hero p.lead { font-size: 16.5px; color: var(--text-2); max-width: 470px; margin: 0 0 30px; line-height: 1.65; }
.hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.text-link { color: var(--text) !important; font-weight: 500; font-size: 14.5px; }
.text-link span { display: inline-block; transition: transform .15s; }
.text-link:hover span { transform: translateX(3px); }
.hero-facts { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 14px; height: 14px; flex-shrink: 0; background: no-repeat center/14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232ebd85' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

/* product preview: a slice of the real terminal */
.preview { border-radius: 20px; border: 1px solid var(--border-strong); background: var(--surface); overflow: hidden; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.pv-asset { display: flex; align-items: baseline; gap: 10px; }
.preview-head .sym { font-weight: 600; font-size: 14.5px; }
.preview-head .px { font-weight: 500; color: var(--text-2); font-size: 14px; }
.preview-head .pay { font-size: 12.5px; color: var(--up); font-weight: 600; }
.preview-chart { height: 300px; }
.preview-foot { padding: 14px; border-top: 1px solid var(--border); display: grid; gap: 12px; }
.pv-ticket { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--r); }
.pv-ticket div { display: grid; gap: 1px; padding: 9px 12px; }
.pv-ticket div + div { border-left: 1px solid var(--border); }
.pv-ticket span { font-size: 11.5px; color: var(--muted); }
.pv-ticket b { font-size: 14px; font-weight: 600; }
.pv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pv-actions .trade-btn { height: 48px; font-size: 14.5px; border-radius: var(--r); }

.section { padding: 88px 0; border-bottom: 1px solid var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section h2 { font-size: 32px; letter-spacing: -.035em; margin: 0; line-height: 1.15; font-weight: 600; }
.section .sub { color: var(--text-2); margin: 8px 0 0; max-width: 540px; font-size: 15px; }

.table-shell { border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); padding: 6px; overflow-x: auto; }
.market-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.market-table th, .market-table td { padding: 14px 16px; text-align: left; white-space: nowrap; }
.market-table td { border-bottom: 1px solid var(--border); }
.market-table th { font-size: 12px; color: var(--muted); font-weight: 500; background: var(--surface-2); }
.market-table th:first-child { border-radius: var(--r) 0 0 var(--r); }
.market-table th:last-child { border-radius: 0 var(--r) var(--r) 0; }
.market-table tr:last-child td { border-bottom: 0; }
.market-table tbody tr:hover td { background: rgba(255,255,255,.012); }
.market-table td.num, .market-table th.num { text-align: right; }
.market-table td.num { font-weight: 500; }
.market-table strong { font-weight: 600; }
.market-table .name { color: var(--muted); font-size: 12.5px; margin-left: 10px; }
.mt-ico { display: inline-flex; vertical-align: middle; margin-right: 12px; }
.pv-asset { align-items: center; }
.pv-asset .mt-ico { margin-right: 0; }
.market-table .cat { font-size: 12.5px; text-transform: capitalize; color: var(--text-2); }
.market-table .pay-tag { color: var(--up); font-weight: 600; }
.show-all { display: none; width: 100%; height: 44px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.show-all:hover { color: var(--text); }

/* how it works: three real controls in one strip */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.how-step { padding: 26px; }
.how-step + .how-step { border-left: 1px solid var(--border); }
.how-ui { display: flex; align-items: center; gap: 8px; height: 44px; margin-bottom: 22px; }
.ui-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--pill); font-size: 13px; font-weight: 600; background: var(--surface-2); }
.ui-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: var(--r); font-size: 13.5px; font-weight: 600; color: #fff; }
.ui-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ui-btn.up { background: var(--up); }
.ui-btn.down { background: var(--down); }
.ui-result { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.ui-note { font-size: 12.5px; color: var(--muted); }
.how-step h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.how-step p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }

.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.spec { border-top: 1px solid var(--border-strong); padding-top: 18px; }
.spec h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 600; }
.spec p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }

.faq { max-width: 800px; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 500; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--text-2); font-size: 15px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); margin: 10px 0 0; line-height: 1.65; max-width: 680px; }

.cta-band { padding: 72px 0; border-bottom: 1px solid var(--border); }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-row h2 { font-size: 28px; margin: 0 0 6px; letter-spacing: -.03em; font-weight: 600; }
.cta-row p { color: var(--text-2); margin: 0; font-size: 15px; }

.site-footer { padding: 56px 0 32px; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.footer-grid a:not(.brand) { display: block; color: var(--text-2); font-size: 14px; padding: 4px 0; }
.footer-grid a:not(.brand):hover { color: var(--text); }
.risk { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); line-height: 1.75; }
.risk strong { color: var(--text-2); font-weight: 500; }

/* ==========================================================================
   Admin back office
   ========================================================================== */
.admin { min-height: 100vh; }
.admin-top { display: flex; align-items: center; gap: 12px; padding: 14px 28px; position: sticky; top: 0; z-index: 20; background: rgba(10,10,11,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.brand-circle { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); flex-shrink: 0; }
.pill-nav { display: flex; gap: 2px; padding: 3px; border-radius: var(--pill); border: 1px solid var(--border-strong); overflow-x: auto; scrollbar-width: none; min-width: 0; }
.pill-nav::-webkit-scrollbar { display: none; }
.pill-nav button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 15px; white-space: nowrap; border: 1px solid transparent; background: none; border-radius: var(--pill); color: var(--text-2); font-size: 13.5px; font-weight: 500; transition: .15s; }
.pill-nav button svg { width: 15px; height: 15px; }
.pill-nav button:hover { color: var(--text); }
.pill-nav button.active { color: var(--text); border-color: var(--border-hover); background: var(--surface-2); }
.pill-nav .badge { background: var(--warn); color: #1a1100; font-size: 10.5px; font-weight: 600; border-radius: var(--pill); padding: 0 6px; line-height: 17px; }
.admin-top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.user-pill { display: flex; align-items: center; gap: 10px; height: 44px; padding: 3px 16px 3px 3px; border-radius: var(--pill); border: 1px solid var(--border-strong); }
.user-pill .avatar { width: 36px; height: 36px; cursor: default; font-size: 12px; }
.user-pill strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-pill small { display: block; font-size: 11px; color: var(--muted); }
.admin-main { padding: 24px 28px 56px; min-width: 0; max-width: 1480px; margin: 0 auto; }
.admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 4px 0 20px; flex-wrap: wrap; }
.admin-head h1 { margin: 0; font-size: 24px; letter-spacing: -.03em; font-weight: 600; }
.admin-head .sub { color: var(--muted); font-size: 13px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi { padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.kpi-top { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--text); }
.kpi-label { font-size: 12px; color: var(--muted); margin-top: 18px; }
.kpi strong { display: block; font-size: 26px; font-weight: 600; margin-top: 2px; letter-spacing: -.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi small { color: var(--text-2); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.kpi .trend { display: inline-flex; align-items: center; padding: 0 7px; border-radius: var(--pill); font-size: 11px; font-weight: 600; background: var(--surface-3); line-height: 18px; }
.kpi.featured { background: var(--featured); border-color: transparent; }
.kpi.featured .chip-ico { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
.kpi.featured .kpi-label, .kpi.featured small { color: rgba(255,255,255,.72); }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.card-head .hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.card-body { padding: 4px 18px 18px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 12px; }

.table-wrap { overflow-x: auto; padding: 0 8px 4px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th, .table td { padding: 12px 14px; text-align: left; white-space: nowrap; }
.table td { border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td { border-bottom: 0; }
.table th { font-size: 12px; color: var(--muted); font-weight: 500; background: var(--surface-2); }
.table th:first-child { border-radius: var(--r) 0 0 var(--r); }
.table th:last-child { border-radius: 0 var(--r) var(--r) 0; }
.table td.num, .table th.num { text-align: right; }
.table td strong { font-weight: 500; }
.table tbody tr:hover td { background: rgba(255,255,255,.012); }
.table .sub { color: var(--muted); font-size: 12px; }
.table td.empty { text-align: center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select, .filters input { height: 34px; padding: 0 14px; background: transparent; border: 1px solid var(--border-strong); border-radius: var(--pill); outline: none; font-size: 13px; max-width: 100%; }
.filters select option { background: var(--surface-2); }
.filters input:focus, .filters select:focus { border-color: var(--accent); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.inline-input { width: 72px; height: 32px; padding: 0 12px; background: transparent; border: 1px solid var(--border-strong); border-radius: var(--pill); }
.switch { position: relative; display: inline-block; width: 36px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--surface-4); border-radius: var(--pill); transition: .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(14px); }
.mini-list .row { display: grid; grid-template-columns: 1fr auto 90px; align-items: center; gap: 12px; padding: 12px 2px; font-size: 13px; border-bottom: 1px solid var(--border); }
.mini-list .row:last-child { border-bottom: 0; }
.mini-list .row span:last-child { text-align: right; font-weight: 500; }
.mini-list .row span:nth-child(2) { color: var(--muted); }

.dlg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 60; padding: 16px; }
.dlg-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px; padding: 22px; box-shadow: var(--pop); }
.dlg-card h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }

/* volume chart */
.vchart { position: relative; }
.vchart svg { display: block; max-width: 100%; }
.vchart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.vchart .bubble { position: absolute; transform: translate(-50%, -100%); pointer-events: none; padding: 4px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-4); border: 1px solid var(--border-hover); }
.vchart .tipbox { position: absolute; pointer-events: none; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 9px 12px; font-size: 12px; white-space: nowrap; box-shadow: var(--pop); line-height: 1.7; }

/* ==========================================================================
   Terminal: account pill, asset header, controls, compact chart menu
   ========================================================================== */
.account-btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 8px; }
.acct-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: #f2a93b; color: #1d1200; }
.is-real .acct-badge { background: var(--up); color: #03140c; }
.account-btn .account-balance { font-size: 15px; font-weight: 600; }
.account-btn .chev { width: 16px; height: 16px; }
.deposit-sq { display: none; }

.tab-ico, .chart-ico { display: inline-flex; flex-shrink: 0; }
.aico { display: block; flex-shrink: 0; }
.asset-tab { padding-left: 8px; }

.chart-asset { background: none; border: 0; padding: 4px 8px 4px 2px; border-radius: var(--r); display: flex; align-items: center; gap: 10px; color: var(--text); text-align: left; }
.chart-asset:hover { background: var(--surface); }
.chart-pay { color: var(--up); font-weight: 600; font-size: 14px; }
.chart-pay::before { content: "•"; color: var(--muted); margin-right: 6px; }
.chart-price { margin-left: 4px; }
.chart-quick { position: relative; display: none; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px; border: 1px solid var(--border-strong); border-radius: var(--pill); background: transparent; font-size: 13px; font-weight: 600; }
.tool-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chart-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 236px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--pop); }
.cm-label { font-size: 11.5px; color: var(--muted); margin: 0 0 8px; }
.cm-types, .cm-tfs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cm-types { margin-bottom: 14px; }
.chart-menu button { height: 34px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: transparent; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.chart-menu button.active { background: var(--surface-4); border-color: var(--border-hover); color: var(--text); }

/* amount / duration: label sits inside the box above the value */
.ctl-box { grid-template-columns: 44px 1fr 44px; height: 60px; padding: 4px; border-radius: var(--r-md); background: var(--surface); }
.ctl-step { background: transparent; border-radius: var(--r); font-size: 22px; font-weight: 300; color: var(--text-2); }
.ctl-step:hover { background: var(--surface-3); }
.ctl-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; cursor: text; }
.ctl-mid .ctl-label { margin: 0; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.ctl-mid .ctl-value { height: auto; padding: 0; font-size: 17px; font-weight: 600; line-height: 1.3; cursor: pointer; }
.ctl-mid .ctl-input { cursor: text; }

.tp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-top: -2px; }
.how-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; color: var(--up); font-size: 12.5px; font-weight: 500; }
.how-link .q { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--up); color: #03140c; font-size: 10.5px; font-weight: 700; }
.tp-foot .payout-amount { font-size: 12.5px; }
.sheet-handle { display: none; }
.ar-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ti-sym .aico { margin-right: 2px; }
.ti-sym .dir { margin-left: 2px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
  .app { grid-template-columns: 68px minmax(0, 1fr) 264px; }
  .drawer { left: 68px; }
  .side-item { width: 54px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .user-pill div { display: none; }
  .user-pill { padding-right: 3px; }
  .hero-grid { gap: 40px; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* tablet + phone: terminal stacks, chart on top, controls below, nav at the bottom */
@media (max-width: 900px) {
  .hide-sm { display: none; }
  .terminal { overflow: auto; height: auto; }
  .app {
    height: auto; min-height: 100dvh;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 58px auto auto;
    grid-template-areas: "top" "chart" "panel";
    padding-bottom: 64px;
  }
  .topbar { padding: 0 12px; gap: 8px; position: sticky; top: 0; z-index: 25; }
  .topbar .brand { margin-right: 0; }
  .asset-tabs { padding: 2px; }
  .asset-tab { height: 34px; padding-left: 12px; }
  .add-asset { width: 36px; height: 36px; }
  .deposit-btn { display: none; }
  .account-btn { height: 42px; padding: 2px 10px 3px 14px; column-gap: 8px; }
  .account-balance { font-size: 14px; }
  .avatar { width: 38px; height: 38px; }
  .chart-area { height: 48vh; height: 48svh; min-height: 300px; }
  .chart-toolbar { flex-wrap: wrap; padding: 10px 12px 2px; row-gap: 8px; }
  .chart-asset { flex: 1 1 100%; }
  .chart-tools { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .chart-tools::-webkit-scrollbar { display: none; }
  .sidenav {
    flex-direction: row; justify-content: space-around; position: fixed; bottom: 0; left: 0; right: 0; height: 64px;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--border); background: rgba(10,10,11,.96);
  }
  .side-item { flex: 1; width: auto; padding: 5px 0; }
  .trade-panel { border-left: 0; border-top: 1px solid var(--border); padding: 14px 12px; }
  .tp-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ctl-box { grid-template-columns: 36px 1fr 36px; height: 46px; }
  .ctl-value { font-size: 16px; }
  .tp-actions { grid-template-columns: 1fr 1fr; }
  .trade-btn { height: 54px; }
  .tp-trades { min-height: 200px; margin: 4px -12px -14px; }
  .drawer { position: fixed; left: 0; right: 0; top: 58px; bottom: 64px; width: auto; z-index: 30; border-right: 0; box-shadow: none; }
  .toasts { bottom: 76px; }
  .modal { padding-top: 24px; }

  .nav-links { display: none; }
  .hero { padding: 40px 0 48px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .section { padding: 56px 0; }
  .cta-band { padding: 48px 0; }
  .section h2 { font-size: 26px; }
  .market-table .hide-m, .market-table .name { display: none; }
  .market-table th, .market-table td { padding: 12px 10px; }
  .market-table tbody.is-collapsed tr:nth-child(n+7) { display: none; }
  .show-all { display: block; }
  .how { grid-template-columns: minmax(0, 1fr); }
  .how-step { padding: 22px 20px; }
  .how-step + .how-step { border-left: 0; border-top: 1px solid var(--border); }
  .how-ui { margin-bottom: 16px; }

  .auth-page { place-items: start center; padding: 0; }
  .auth-card { max-width: none; min-height: 100dvh; border: 0; border-radius: 0; background: var(--bg); padding: 28px 20px 32px; }

  .admin-top { padding: 10px 14px; flex-wrap: wrap; row-gap: 10px; }
  .pill-nav { order: 3; flex: 1 1 100%; }
  .admin-main { padding: 18px 14px 40px; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .site-nav .btn { height: 36px; padding: 0 16px; }
  .nav-inner { height: 58px; }
  .hero h1 { font-size: 31px; }
  .hero p.lead { font-size: 15.5px; margin-bottom: 26px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-cta { gap: 18px; }
  .hero-facts { margin-top: 26px; display: grid; gap: 8px; }
  .preview { border-radius: 16px; }
  .preview-head { padding: 12px 14px; }
  .preview-chart { height: 220px; }
  .preview-foot { padding: 12px; }
  .pv-ticket div { padding: 8px 10px; }
  .pv-ticket b { font-size: 13.5px; }
  .specs { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .cta-row .btn { width: 100%; }

  .asset-tab .tab-pay, .asset-tab .tab-x { display: none; }
  .asset-tab, .asset-tab:not(:has(.tab-x)) { padding: 0 12px; }
  .chart-tools { gap: 6px; }
  .seg { padding: 2px; }
  .seg button { min-width: 30px; padding: 0 8px; height: 28px; font-size: 11.5px; }
  .market-filter button { padding: 0 9px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 14px; }
  .kpi-top { font-size: 12.5px; gap: 8px; line-height: 1.25; }
  .kpi-top .chip-ico { width: 28px; height: 28px; }
  .kpi-label { margin-top: 12px; }
  .kpi strong { font-size: 19px; }
  .kpi small { font-size: 11.5px; }
  .asset-table-head, .asset-row { grid-template-columns: 1fr 96px 54px; }
  .asset-table-head span:nth-child(3), .asset-row > span:nth-child(3) { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .account-label { font-size: 9px; }
  .mini-list .row { grid-template-columns: 1fr auto 80px; }
}

@media (max-width: 380px) {
  .seg button { min-width: 28px; padding: 0 6px; }
  .account-btn { padding: 2px 8px 3px 12px; }
  .account-balance { font-size: 13px; }
  .avatar { display: none; }
}

/* ---------- Phone terminal, modelled on native trading apps ---------- */
@media (max-width: 900px) {
  .app { grid-template-rows: auto auto auto; }
  .topbar {
    display: grid; height: auto; padding: 10px 12px 8px; row-gap: 10px; column-gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand acct dep" "tabs tabs add";
    border-bottom: 0;
  }
  .topbar .brand { grid-area: brand; }
  .topbar .brand span { display: none; }
  .topbar-right { display: contents; }
  .account-switch { grid-area: acct; justify-self: center; }
  .account-btn { border: 0; height: 40px; padding: 0 6px; gap: 10px; }
  .account-btn:hover { background: transparent; }
  .account-btn .account-balance { font-size: 17px; }
  .dropdown { right: 50%; transform: translateX(50%); }
  .deposit-sq { grid-area: dep; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--up); color: #03140c; }
  .deposit-sq svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .topbar .avatar, .deposit-btn { display: none; }
  .asset-tabs { grid-area: tabs; border: 0; padding: 0; gap: 4px; }
  .add-asset { grid-area: add; width: 38px; height: 38px; }
  .asset-tab { height: 38px; padding: 0 12px 0 8px; gap: 7px; color: var(--muted); }
  .asset-tab.active { background: var(--surface-2); border-color: transparent; color: var(--text); }
  .asset-tab .tab-sym { font-size: 13.5px; font-weight: 500; }

  .chart-area { margin: 0 8px; height: 50vh; height: 50svh; min-height: 300px; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface); }
  .chart-toolbar { flex-wrap: nowrap; padding: 10px 10px 4px 8px; }
  .chart-asset { flex: 1 1 auto; min-width: 0; padding-left: 4px; gap: 8px; }
  .chart-symbol { font-size: 15.5px; font-weight: 600; white-space: nowrap; }
  .chart-pay { font-size: 14px; }
  .chart-price { display: none; }
  .chart-tools { display: none; }
  .chart-quick { display: block; flex-shrink: 0; }

  .trade-panel { margin-top: 10px; border: 1px solid var(--border); border-bottom: 0; border-radius: 22px 22px 0 0; background: var(--surface); padding: 8px 14px 14px; gap: 12px; }
  .sheet-handle { display: block; width: 38px; height: 4px; border-radius: 4px; background: var(--border-hover); margin: 0 auto 4px; }
  .tp-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ctl-box { height: 60px; grid-template-columns: 40px 1fr 40px; background: var(--surface-2); border-color: var(--border-strong); }
  .ctl-mid .ctl-value { font-size: 17px; }
  .trade-btn { height: 56px; font-size: 16px; }
  .tp-trades { margin: 2px -14px -14px; }

  .sidenav { height: calc(66px + env(safe-area-inset-bottom)); padding: 6px 4px env(safe-area-inset-bottom); background: rgba(10,10,11,.97); }
  .side-item { gap: 5px; padding: 6px 0; font-size: 11.5px; color: var(--muted); background: none !important; border-radius: 0; }
  .side-item svg { width: 25px; height: 25px; stroke-width: 1.7; }
  .side-item.active { color: var(--text); }
  .drawer { top: 0; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 40; }
  .app { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .account-btn .account-balance { font-size: 15px; }
  .asset-tab .tab-sym { font-size: 12.5px; }
}

/* Asset picker: single-line names everywhere, bottom sheet on phones */
.ar-name > span { min-width: 0; }
.asset-row strong, .asset-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) {
  .modal { place-items: end center; padding: 0; }
  .modal-card { max-width: none; height: 88dvh; border-radius: 22px 22px 0 0; border-bottom: 0; display: flex; flex-direction: column; }
  .asset-list { max-height: none; flex: 1; }
  .asset-row { padding: 11px 10px; }
}

/* ==========================================================================
   Terminal v3: chart overlay, trade cards, results, wallet & history polish
   ========================================================================== */
.chart-wrap { flex: 1; min-height: 0; position: relative; }
.chart-wrap .chart { position: absolute; inset: 0; }
.chart-chg { font-size: 12.5px; font-weight: 500; }
.chart-clock { font-size: 12px; color: var(--muted); margin-right: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.chart-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.ov-band { position: absolute; left: 0; top: 0; background: linear-gradient(90deg, rgba(124,92,252,0), rgba(124,92,252,.07)); }
.ov-line { position: absolute; left: 0; top: 0; width: 0; border-left: 1px dashed rgba(255,255,255,.28); }
.ov-line.sel { border-left: 1px solid rgba(169,149,255,.55); }
.ov-line.trade.win { border-left-color: rgba(46,189,133,.7); }
.ov-line.trade.loss { border-left-color: rgba(246,70,93,.7); }
.ov-tag {
  position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 11px; font-weight: 600; line-height: 1;
  padding: 6px 9px; border-radius: var(--pill); background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ov-tag.sel { background: #211b45; border-color: #3d3385; color: #d6ccff; }
.ov-tag.trade.win { background: #0f2a20; border-color: rgba(46,189,133,.45); color: #6fe0b2; }
.ov-tag.trade.loss { background: #2f1418; border-color: rgba(246,70,93,.45); color: #ff8e9c; }

/* traders' choice, Quotex-style vertical gauge at the left edge of the chart */
.sent { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sent-bar { width: 4px; height: 120px; border-radius: 4px; background: var(--down); position: relative; overflow: hidden; }
.sent-bar i { position: absolute; left: 0; right: 0; top: 0; background: var(--up); transition: height .4s ease; }
.sent-up, .sent-down { font-size: 10.5px; font-weight: 600; }
.sent-up { color: var(--up); }
.sent-down { color: var(--down); }

/* balance count-up flash */
.account-balance.bal-up { animation: balUp 1s ease; }
.account-balance.bal-down { animation: balDown 1s ease; }
@keyframes balUp { 0%, 40% { color: var(--up); } }
@keyframes balDown { 0%, 40% { color: var(--down); } }

/* trade cards */
.tcard {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px;
  padding: 10px 12px; margin-bottom: 6px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border);
  transition: border-color .3s, background .3s;
}
.tcard.enter { animation: cardIn .3s cubic-bezier(.2,.8,.2,1); }
@keyframes cardIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.tcard.open.win { border-color: rgba(46,189,133,.35); background: linear-gradient(90deg, rgba(46,189,133,.06), transparent 65%), var(--surface); }
.tcard.open.loss { border-color: rgba(246,70,93,.3); background: linear-gradient(90deg, rgba(246,70,93,.05), transparent 65%), var(--surface); }
.tc-ring { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.tc-ring svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.tc-ring circle { fill: none; stroke-width: 2.6; }
.rg-bg { stroke: var(--surface-4); }
.rg-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.tcard.win .rg-fg { stroke: var(--up); }
.tcard.loss .rg-fg { stroke: var(--down); }
.tc-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tc-ico { display: flex; }
.tc-main { min-width: 0; display: grid; gap: 2px; }
.tc-title { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.tc-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tc-side { display: grid; justify-items: end; gap: 2px; }
.tc-pnl { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tc-res { font-size: 11px; color: var(--muted); white-space: nowrap; }
.tcard.win .tc-pnl { color: var(--up); }
.tcard.loss .tc-pnl { color: var(--down); }
.dchip { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; flex-shrink: 0; }
.dchip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.dchip.up { background: var(--up-soft); color: var(--up); }
.dchip.down { background: var(--down-soft); color: var(--down); }

.empty-state { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 30px 16px; font-size: 13px; color: var(--muted); }
.empty-state b { color: var(--text); font-weight: 600; font-size: 13.5px; }
.es-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong); margin-bottom: 8px; color: var(--text-2); }
.es-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* result toast */
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: .25; transform-origin: left; animation: life var(--life, 4s) linear forwards; }
.toast.win::after { color: var(--up); opacity: .6; }
.toast.loss::after { color: var(--down); opacity: .6; }
@keyframes life { to { transform: scaleX(0); } }
.tt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.tt-ico { display: flex; }
.tt-body { display: grid; gap: 1px; min-width: 0; }
.tt-body b { font-size: 13.5px; font-weight: 600; }
.tt-body span { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-amt { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* history summary */
.hist-sum { padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 10px; }
.hs-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.hs-top .acct-pill { margin: 0; }
.hist-sum > strong { display: block; font-size: 28px; font-weight: 600; letter-spacing: -.03em; margin: 4px 0 12px; }
.wl-bar { height: 6px; border-radius: 6px; background: var(--down); overflow: hidden; }
.wl-bar i { display: block; height: 100%; background: var(--up); border-right: 2px solid var(--surface-2); }
.hs-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.hs-meta b { font-weight: 600; }
#histList .tcard { background: transparent; border-color: transparent; border-bottom-color: var(--border); border-radius: 0; padding: 12px 2px; margin: 0; }

/* wallet */
.method span { flex-direction: column; gap: 6px; height: 72px; display: flex; align-items: center; justify-content: center; }
.method svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tx-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.tx-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); }
.tx-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tx-ico.deposit { background: var(--up-soft); color: var(--up); }
.tx-ico.withdrawal { background: var(--accent-soft); color: var(--accent-text); }
.tx-main { min-width: 0; }
.tx-row .right { display: grid; justify-items: end; gap: 3px; }

@media (max-width: 900px) {
  .chart-wrap .chart { inset: 0; }
  .sent { left: 8px; }
  .sent-bar { height: 90px; }
  .tc-ring, .tc-ring svg { width: 38px; height: 38px; }
}
.chart-tools { align-items: center; }
.sent-up, .sent-down { background: rgba(10,10,11,.85); padding: 2px 5px; border-radius: 5px; }
.toast { cursor: pointer; }
@media (max-width: 900px) {
  /* notifications drop in from the top so they never cover the trade buttons */
  .toasts { top: calc(10px + env(safe-area-inset-top)); bottom: auto; left: 10px; right: 10px; width: auto; z-index: 120; }
  .toast { transform: translateY(-10px); }
  .toast.show { transform: none; }
}

/* ==========================================================================
   Wallet
   ========================================================================== */
.wallet-bal { position: relative; overflow: hidden; padding: 20px; gap: 2px; min-height: 132px; }
.wallet-bal .wb-art { position: absolute; right: -14px; bottom: -18px; width: 168px; pointer-events: none; }
.wb-label { position: relative; font-size: 12.5px; color: rgba(255,255,255,.72); }
.wallet-bal strong { position: relative; font-size: 30px; }
.wb-meta { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wb-meta span { font-size: 11.5px; font-weight: 500; color: #fff; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.14); border-radius: var(--pill); padding: 3px 10px; }

.wallet-form { gap: 14px; }
.methods { display: grid; gap: 8px; }
.mcard { position: relative; display: block; cursor: pointer; }
.mcard input { position: absolute; opacity: 0; pointer-events: none; }
.mcard-in { display: grid; grid-template-columns: 40px minmax(0, 1fr) 22px; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); transition: border-color .15s, background .15s; }
.mcard:hover .mcard-in { border-color: var(--border-hover); }
.mcard input:checked + .mcard-in { border-color: var(--accent); background: linear-gradient(90deg, rgba(124,92,252,.08), transparent 70%), var(--surface-2); }
.mcard input:focus-visible + .mcard-in { outline: 2px solid var(--accent); outline-offset: 2px; }
.mlogo { width: 40px; height: 40px; display: block; }
.mc-text { display: grid; gap: 1px; min-width: 0; }
.mc-text b { font-size: 14px; font-weight: 600; }
.mc-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-hover); display: grid; place-items: center; color: transparent; transition: .15s; }
.mc-check svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mcard input:checked + .mcard-in .mc-check { background: var(--accent); border-color: var(--accent); color: #fff; }

.field > span .avail { float: right; font-style: normal; color: var(--muted); font-weight: 400; }
.link-btn { background: none; border: 0; padding: 0 0 0 6px; color: var(--accent-text); font-size: 12px; font-weight: 600; }
.amount-in { position: relative; }
.amount-in i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-weight: 600; font-size: 16px; }
.amount-in input { padding-left: 32px; font-size: 17px; font-weight: 600; height: 50px; }

.paybox { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.pb-qr { width: 112px; height: 112px; border-radius: 10px; overflow: hidden; background: #fff; }
.qr { width: 100%; height: 100%; display: block; }
.pb-info { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.pb-label { font-size: 11.5px; color: var(--muted); }
.pb-addr { font-size: 14px; font-weight: 600; word-break: break-all; line-height: 1.35; }
.mono-addr { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; font-weight: 500; }
.pb-sub { font-size: 11.5px; color: var(--muted); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--pill); background: transparent; font-size: 12px; font-weight: 600; color: var(--text); }
.copy-btn:hover { border-color: var(--border-hover); background: var(--surface-3); }
.copy-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.net-badge { font-size: 11px; font-weight: 700; color: #26a17b; background: rgba(38,161,123,.12); border: 1px solid rgba(38,161,123,.35); border-radius: 6px; padding: 2px 8px; }
.warn-note { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--r); background: rgba(233,162,59,.08); border: 1px solid rgba(233,162,59,.25); font-size: 12px; color: #f1c27d; margin-top: 8px; }
.warn-note svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wf-note { margin: -4px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

.tx-amt { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.empty-art { width: 56px; height: 56px; margin-bottom: 6px; }

.wallet-done { display: grid; justify-items: center; text-align: center; padding: 18px 4px 4px; }
.ok-art { width: 120px; height: 120px; animation: pop .45s cubic-bezier(.2,.9,.3,1.3); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.wallet-done h3 { margin: 8px 0 2px; font-size: 19px; font-weight: 600; }
.wd-amt { margin: 0 0 6px; font-size: 30px; font-weight: 600; letter-spacing: -.03em; }
.wallet-done > .muted { margin: 0 0 18px; font-size: 13px; max-width: 280px; }
.wd-rows { width: 100%; border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 18px; text-align: left; }
.wd-rows div { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px 14px; font-size: 13px; }
.wd-rows div + div { border-top: 1px solid var(--border); }
.wd-rows span { color: var(--muted); flex-shrink: 0; }
.wd-rows b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#payBox:empty { display: none; }

/* ==========================================================================
   Polish pass
   ========================================================================== */
/* FAQ aligned with the other sections */
.container.faq { max-width: 1180px; }
.faq details, .faq .section-head { max-width: 800px; }

/* custom checkbox */
.check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 1px 0 0; flex-shrink: 0; border: 1.5px solid var(--border-hover); border-radius: 5px; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; transition: .15s; }
.check input:checked { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/13px no-repeat; border-color: var(--accent); }
.check { cursor: pointer; }

/* account panel */
.acards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.acard { padding: 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); display: grid; gap: 6px; align-content: start; }
.acard .acct-pill { margin: 0; }
.acard > strong { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.ac-rows { display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid var(--border); }
.ac-rows div { display: flex; justify-content: space-between; font-size: 12px; }
.ac-rows span { color: var(--muted); }
.ac-rows b { font-weight: 600; }
.profile-head .avatar.lg { background: var(--featured); border: 0; color: #fff; }

/* admin: asset icons */
.sym-cell { display: inline-flex; align-items: center; gap: 10px; }

@media (max-width: 700px) {
  /* admin tables become cards */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table-wrap { padding: 0 10px 8px; }
  .table tbody tr { border: 1px solid var(--border); border-radius: var(--r-md); padding: 4px 14px; margin-bottom: 8px; background: var(--surface-2); }
  .table tbody tr:hover td { background: transparent; }
  .table td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); white-space: normal; text-align: right; }
  .table td.num { text-align: right; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 500; text-align: left; flex-shrink: 0; }
  .table td[data-label=""]::before { display: none; }
  .table td[data-label=""] { justify-content: flex-end; }
  .table tbody tr td:last-child { border-bottom: 0; }
  .table td.empty { display: block; text-align: center; }
  .table td.empty::before { display: none; }
  .table td div.sub { display: block; }
  .card-head .filters { width: 100%; }
  .card-head .filters input, .card-head .filters select { flex: 1; width: auto !important; }
}

@media (max-width: 560px) {
  /* KPI tiles: one featured card, then compact rows */
  .kpis { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .kpi:not(.featured) { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
  .kpi:not(.featured) .kpi-label, .kpi:not(.featured) small { display: none; }
  .kpi:not(.featured) strong { margin: 0; font-size: 17px; }
  .acards { grid-template-columns: 1fr; }
}

/* Account panel */
.pf-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 20px 18px; min-height: 120px; border-radius: var(--r-lg); background: var(--featured); margin-bottom: 10px; }
.pf-art { position: absolute; right: -6px; bottom: -4px; width: 220px; pointer-events: none; }
.pf-avatar { position: relative; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 18px; font-weight: 600; color: #fff; background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.35); }
.pf-id { position: relative; display: grid; gap: 1px; min-width: 0; }
.pf-id strong { font-size: 17px; font-weight: 600; color: #fff; }
.pf-id span { font-size: 12.5px; color: rgba(255,255,255,.78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-id .pf-since { font-size: 11.5px; color: rgba(255,255,255,.6); }
.pf-list { display: grid; gap: 6px; margin-top: 14px; }
.pf-item { display: block; width: 100%; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); text-align: left; text-decoration: none !important; color: var(--text) !important; padding: 0; }
.pf-item summary, .pf-link { display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.pf-item summary::-webkit-details-marker { display: none; }
.pf-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.pf-ico svg, .pf-chev { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pf-chev { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; }
.pf-item[open] .pf-chev { transform: rotate(90deg); }
.pf-item[open] { border-color: var(--border-strong); }
.pf-txt { display: grid; gap: 1px; min-width: 0; }
.pf-txt b { font-size: 13.5px; font-weight: 600; }
.pf-txt small { font-size: 12px; color: var(--muted); }
.pf-form { padding: 4px 14px 14px; gap: 12px; }
.pf-link:hover, .pf-item summary:hover { background: var(--surface-3); border-radius: var(--r-md); }
.pf-out .pf-ico { background: var(--down-soft); color: var(--down); }
.pf-out .pf-txt b { color: var(--down); }
.pf-art { width: 190px; right: -8px; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%); mask-image: linear-gradient(90deg, transparent 0%, #000 55%); opacity: .9; }
.pf-id { max-width: calc(100% - 130px); }

/* account balances: one card, two rows */
.arows { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); overflow: hidden; }
.arow { padding: 14px 16px; display: grid; gap: 4px; }
.arow + .arow { border-top: 1px solid var(--border); }
.arow.current { background: linear-gradient(90deg, rgba(124,92,252,.07), transparent 70%); }
.arow-top { display: flex; align-items: center; justify-content: space-between; }
.arow-top .acct-pill { margin: 0; }
.arow-now { font-size: 11px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); padding: 2px 8px; border-radius: var(--pill); }
.arow > strong { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.arow-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); }
.arow-meta span:first-child { font-weight: 600; }
.arow-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--border-hover); }
