/* ==================================================================
   crypto tech — theme
   Colours taken from the reference screenshots.
   ================================================================== */
:root {
  --bg:            #1c1d21;   /* page background */
  --nav:           #1c1d21;   /* top bar */
  --surface:       #0e0e10;   /* big cards / sidebar */
  --surface-2:     #17181b;   /* inner cards, inputs */
  --surface-3:     #232428;   /* hover, active menu item, dark buttons */
  --border:        #26272b;
  --border-strong: #34353a;

  --text:          #ffffff;
  --text-2:        #c9cacf;
  --muted:         #8b8d93;
  --faint:         #5f6167;

  --accent:        #f4511e;   /* deposit button orange */
  --accent-hover:  #ff6a3a;
  --accent-soft:   rgba(244, 81, 30, .14);
  --accent-ring:   rgba(244, 81, 30, .35);

  --green:         #20c46b;
  --green-soft:    rgba(32, 196, 107, .14);
  --red:           #f0414c;
  --red-soft:      rgba(240, 65, 76, .14);
  --purple:        #6366f1;
  --yellow:        #f3ba2f;

  --radius-lg: 20px;
  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 20px 50px rgba(0, 0, 0, .45);
  --nav-h:     68px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="light"] {
  --bg:            #f3f4f6;
  --nav:           #ffffff;
  --surface:       #ffffff;
  --surface-2:     #f6f7f9;
  --surface-3:     #eceef1;
  --border:        #e6e7ea;
  --border-strong: #d6d8dc;
  --text:          #111214;
  --text-2:        #3b3d42;
  --muted:         #6b6e75;
  --faint:         #9a9ca2;
  --shadow:        0 20px 50px rgba(17, 18, 20, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.up   { color: var(--green); }
.down { color: var(--red); }

/* ---------- Icons ---------- */
.ic { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 24px; height: 24px; }

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; font-size: 25px; font-weight: 300; letter-spacing: -.3px; white-space: nowrap; }
.logo-mark { width: 30px; height: 30px; }

/* ==================================================================
   Top navigation
   ================================================================== */
.topnav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--nav);
  display: flex; align-items: center; gap: 28px;
  padding: 0 24px;
  border-bottom: 1px solid transparent;
}
.topnav.scrolled { border-bottom-color: var(--border); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 8px;
  font-weight: 600; font-size: 16px;
  background: none; border: 0; cursor: pointer;
  transition: color .15s;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link .caret { width: 14px; height: 14px; transition: transform .2s; }
.nav-item.open .caret { transform: rotate(180deg); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; color: var(--text);
  transition: background .15s, color .15s;
}
.icon-btn:hover, .nav-item.open > .icon-btn { background: var(--surface-3); }
.menu-toggle { display: none; }

/* Dropdown menus */
.dropdown {
  position: absolute; top: calc(100% + 10px); left: 0;
  min-width: 260px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.dropdown.right { left: auto; right: 0; }
.dropdown::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* hover bridge */
.nav-item.open > .dropdown { opacity: 1; visibility: visible; transform: none; }
.dd-link {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 12px; border-radius: 10px;
  font-weight: 500;
}
.dd-link:hover { background: var(--surface-3); }
.dd-link .dd-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; color: var(--accent); }
.dd-link small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.dd-head { padding: 12px 12px 14px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dd-head strong { display: block; font-size: 15px; word-break: break-all; }
.dd-sep { height: 1px; background: var(--border); margin: 6px 0; }

/* ==================================================================
   Buttons, badges
   ================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: var(--radius-sm); border: 0;
  font-weight: 700; font-size: 16px; cursor: pointer;
  transition: background .15s, transform .1s, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--surface-3); color: var(--text); }
.btn-dark:hover { background: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; border-radius: 9px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.loading { pointer-events: none; opacity: .8; }
.btn.loading::after { content: ''; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.badge-green  { background: var(--green-soft); color: var(--green); }
.badge-red    { background: var(--red-soft); color: var(--red); }
.badge-orange { background: var(--accent-soft); color: var(--accent); }
.badge-gray   { background: var(--surface-3); color: var(--muted); }

/* ==================================================================
   Alerts
   ================================================================== */
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 16px; border-radius: 12px; margin-bottom: 18px;
  font-size: 14px; border: 1px solid;
}
.alert .ic { margin-top: 1px; }
.alert-error   { background: var(--red-soft);   border-color: rgba(240,65,76,.3);  color: #ff8b92; }
.alert-success { background: var(--green-soft); border-color: rgba(32,196,107,.3); color: #4ade8a; }
.alert-info    { background: var(--accent-soft); border-color: var(--accent-ring); color: #ffa483; }
[data-theme="light"] .alert-error   { color: #c81e2a; }
[data-theme="light"] .alert-success { color: #12814a; }
[data-theme="light"] .alert-info    { color: #c2410c; }
.alert code { background: rgba(0,0,0,.3); padding: 1px 7px; border-radius: 5px; font-weight: 700; letter-spacing: 2px; color: #fff; }

/* ==================================================================
   Auth pages (login / sign up / verify / reset)
   ================================================================== */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-top { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.auth-top .switch { color: var(--muted); font-size: 15px; }
.auth-top .switch a { color: var(--text); font-weight: 600; margin-left: 6px; }
.auth-top .switch a:hover { color: var(--accent); }

.auth-wrap {
  flex: 1;
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 24px; padding: 8px 24px 24px; align-items: start;
}
.auth-hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 380px at 15% 10%, rgba(244,81,30,.16), transparent 60%),
    radial-gradient(500px 400px at 90% 100%, rgba(99,102,241,.14), transparent 60%),
    #0d0d0f;
  padding: 56px 52px;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: sticky; top: 8px;
  height: calc(100vh - var(--nav-h) - 82px); min-height: 600px;
}
.auth-hero::before {   /* orbit lines like the landing page */
  content: ''; position: absolute; right: -220px; top: 40px;
  width: 640px; height: 640px; border-radius: 50%;
  border: 1px solid rgba(244,81,30,.18);
  box-shadow: 0 0 0 90px rgba(255,255,255,.012), 0 0 0 180px rgba(255,255,255,.01);
}
.hero-pill {
  position: absolute; top: 40px; left: 52px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  font-weight: 500; font-size: 15px; color: #fff;
}
.hero-pill .ic { color: var(--yellow); }
.coin-float {
  position: absolute; border-radius: 50%;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  animation: float 6s ease-in-out infinite;
}
.coin-float img { width: 100%; height: 100%; }
.coin-float.btc { width: 92px; height: 92px; right: 60px; top: 110px; }
.coin-float.eth { width: 64px; height: 64px; left: 70px; top: 190px; animation-delay: -2s; }
.coin-float.sol { width: 48px; height: 48px; left: 230px; top: 300px; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-14px); } }
.spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px 4px rgba(244,81,30,.6); }

.hero-title { position: relative; font-size: clamp(36px, 4.4vw, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -1.5px; margin: 0 0 14px; color: #fff; }
.hero-sub { position: relative; color: #a0a2a8; font-size: 17px; max-width: 460px; margin: 0 0 36px; }
.hero-stats { position: relative; display: flex; gap: 0; }
.hero-stats div { padding-right: 36px; margin-right: 36px; border-right: 1px solid rgba(255,255,255,.1); }
.hero-stats div:last-child { border: 0; margin: 0; padding: 0; }
.hero-stats strong { display: block; font-size: 34px; font-weight: 600; color: #fff; letter-spacing: -.5px; }
.hero-stats span { color: #8b8d93; font-size: 15px; }
.hero-ticker {
  position: absolute; right: 48px; top: 230px; width: 300px;
  background: rgba(20,20,22,.85); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.06); border-radius: 16px; padding: 8px;
}
.hero-ticker .row { display: flex; align-items: center; gap: 10px; padding: 10px; font-weight: 700; color: #fff; }
.hero-ticker .row img { width: 22px; height: 22px; }
.hero-ticker .row .pair span { color: #8b8d93; font-weight: 500; }
.hero-ticker .row .px { margin-left: auto; }
.hero-ticker .chg { padding: 4px 10px; border-radius: 6px; font-size: 13px; min-width: 70px; text-align: center; color: #fff; }
.hero-ticker .chg.neg { background: var(--red); }
.hero-ticker .chg.pos { background: var(--green); }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 24px 8px; }
.auth-card { width: 100%; max-width: 480px; }
.auth-card.wide { max-width: 560px; }
.auth-card h1 { font-size: 32px; font-weight: 800; letter-spacing: -.6px; margin: 0 0 6px; }
.auth-card .lead { color: var(--muted); margin: 0 0 28px; font-size: 15px; }
.auth-card .lead strong { color: var(--text); font-weight: 600; }
.auth-foot { text-align: center; color: var(--muted); margin-top: 22px; font-size: 15px; }
.auth-foot a { color: var(--accent); font-weight: 600; }

.step-icon {
  width: 60px; height: 60px; border-radius: 16px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 22px;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label, .label { display: block; font-size: 14px; font-weight: 500; color: var(--text-2); margin-bottom: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input, .select {
  width: 100%; height: 50px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder { color: var(--faint); }
.input:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.field.has-error .input, .field.has-error .select, .field.has-error .input-group { border-color: var(--red); }
.field-error { color: var(--red); font-size: 13px; margin-top: 6px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8d93' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
  padding-right: 42px;
}
.select option { background: var(--surface-2); color: var(--text); }
input[type="date"].input { color-scheme: dark; }
[data-theme="light"] input[type="date"].input { color-scheme: light; }

.input-group {
  display: flex; align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input-group .input { border: 0; background: transparent; box-shadow: none !important; }
.input-group .prefix { padding-left: 16px; color: var(--muted); font-weight: 600; white-space: nowrap; min-width: 54px; }
.input-group .pw-toggle { background: none; border: 0; padding: 0 14px; height: 48px; cursor: pointer; color: var(--muted); }
.input-group .pw-toggle:hover { color: var(--text); }

.strength { display: flex; gap: 6px; margin-top: 10px; }
.strength span { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); transition: background .2s; }
.strength[data-score="1"] span:nth-child(-n+1) { background: var(--red); }
.strength[data-score="2"] span:nth-child(-n+2) { background: #f59e0b; }
.strength[data-score="3"] span:nth-child(-n+3) { background: #eab308; }
.strength[data-score="4"] span:nth-child(-n+4) { background: var(--green); }
.pw-rules { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); list-style: none; padding: 0; }
.pw-rules li { display: flex; align-items: center; gap: 5px; }
.pw-rules li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.pw-rules li.ok { color: var(--green); }
.pw-rules li.ok::before { background: var(--green); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong); background: var(--surface-2); flex-shrink: 0; cursor: pointer; display: grid; place-items: center; margin: 0; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ''; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check a { color: var(--accent); font-weight: 500; }
.field .check { display: flex; margin: 0; }
.form-between { display: flex; justify-content: space-between; align-items: center; margin: -2px 0 22px; }
.link-accent { color: var(--accent); font-weight: 600; font-size: 14px; }
.link-accent:hover { text-decoration: underline; }

.otp { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 22px; }
.otp input {
  width: 100%; max-width: 64px; height: 64px;
  text-align: center; font-size: 26px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.otp input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.otp input.filled { border-color: var(--border-strong); }
.resend { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }
.resend button { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; }
.resend button[disabled] { color: var(--muted); cursor: default; }

.steps { display: flex; gap: 8px; margin-bottom: 26px; }
.steps span { height: 4px; flex: 1; border-radius: 4px; background: var(--surface-3); }
.steps span.on { background: var(--accent); }

/* ==================================================================
   App shell (dashboard): sidebar + main
   ================================================================== */
.shell {
  display: grid; grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px; align-items: start;
  padding: 24px 38px 60px;
  max-width: 1720px; margin: 0 auto;
}
.sidebar {
  position: sticky; top: calc(var(--nav-h) + 20px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  max-height: calc(100vh - var(--nav-h) - 40px);
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent;
}
.side-label { font-size: 14px; color: var(--muted); padding: 18px 18px 8px; }
.side-label:first-child { padding-top: 4px; }
.side-link {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; border-radius: 12px;
  color: var(--text-2); font-weight: 600; font-size: 16px;
  transition: background .15s, color .15s;
}
.side-link .ic { color: var(--muted); }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: var(--surface-3); color: var(--text); }
.side-link.active .ic { color: var(--accent); }
.side-link .tag { margin-left: auto; font-size: 11px; padding: 2px 7px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.side-user {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; margin-bottom: 8px;
  background: var(--surface-2); border-radius: 14px;
}
.avatar { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), #ff9a62); display: grid; place-items: center; font-weight: 800; color: #fff; flex-shrink: 0; }
.side-user .who { min-width: 0; }
.side-user strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { color: var(--muted); font-size: 12px; }
.side-backdrop { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; gap: 24px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border-radius: var(--radius-lg); padding: 30px 36px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.card-title { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.2px; }
.card-sub { color: var(--muted); margin: 4px 0 0; font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }

/* Balance hero */
.balance-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.balance-label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 18px; }
.balance-label button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; }
.balance-label button:hover { color: var(--text); }
.balance-value { display: flex; align-items: baseline; gap: 14px; margin-top: 8px; }
.balance-value .amt { font-size: 50px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; }
.balance-value .cur { font-size: 22px; font-weight: 700; color: var(--text-2); }
.balance-meta { display: flex; gap: 18px; margin-top: 10px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.balance-meta b { font-weight: 600; }
.balance-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.balance-actions .btn { height: 56px; padding: 0 30px; font-size: 18px; }
.masked .mask-me { filter: blur(9px); user-select: none; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.stat { background: var(--surface); border-radius: var(--radius-lg); padding: 24px 26px; display: flex; flex-direction: column; gap: 14px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.stat-label { color: var(--muted); font-size: 15px; }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.stat-foot { font-size: 13px; color: var(--muted); }
.stat-foot b { font-weight: 700; }

/* My accounts list */
.acct { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-radius: 12px; transition: background .15s; }
.acct:hover { background: var(--surface-2); margin: 0 -14px; padding: 16px 14px; }
.acct-ic { width: 62px; height: 62px; border-radius: 14px; background: rgba(244,81,30,.12); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.acct-body { flex: 1; min-width: 0; }
.acct-body strong { display: block; font-size: 19px; font-weight: 700; }
.acct-body span { color: var(--muted); font-size: 15px; }
.acct-val { text-align: right; }
.acct-val strong { display: block; font-size: 19px; font-weight: 700; white-space: nowrap; }
.acct-val span { color: var(--muted); font-size: 15px; }
.acct .chev { color: var(--faint); }

/* Donut / allocation */
.alloc { display: flex; align-items: center; gap: 36px; }
.donut { position: relative; width: 230px; height: 230px; flex-shrink: 0; }
.donut canvas { width: 100% !important; height: 100% !important; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.donut-center strong { display: block; font-size: 21px; font-weight: 800; }
.donut-center span { color: var(--muted); font-size: 14px; }
.legend { flex: 1; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.legend-row { display: flex; justify-content: space-between; gap: 10px; }
.legend-row .nm { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; }
.legend-row .dot { width: 14px; height: 14px; border-radius: 4px; }
.legend-row .sub { color: var(--muted); font-size: 15px; padding-left: 26px; font-weight: 400; }
.legend-row .pct { font-weight: 700; font-size: 17px; }

/* Chart */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 11px; }
.tab { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface-3); color: var(--text); }
.chart-box { position: relative; height: 320px; }
.pf-card { display: flex; flex-direction: column; }
.pf-card .chart-box { flex: 1; min-height: 320px; height: auto; }
.chart-summary { display: flex; gap: 40px; margin-bottom: 18px; flex-wrap: wrap; }
.chart-summary div span { display: block; color: var(--muted); font-size: 14px; }
.chart-summary div strong { font-size: 22px; font-weight: 800; }

/* Earn products */
.products { display: grid; gap: 14px; }
.product { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 14px; background: var(--surface-2); }
.product .p-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.product .p-body { flex: 1; min-width: 0; }
.product strong { display: block; font-size: 16px; }
.product span { color: var(--muted); font-size: 14px; }
.product .p-val { text-align: right; }
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; border-radius: 6px; background: var(--accent); }

/* Tables (markets, transactions) */
.table-wrap { overflow-x: auto; margin: 0 -8px; }
.table { width: 100%; border-collapse: collapse; min-width: 680px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 15px; padding: 0 8px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 18px 8px; border-bottom: 1px solid var(--border); font-weight: 600; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.pair { display: flex; align-items: center; gap: 12px; }
.pair img, .coin-fallback { width: 36px; height: 36px; border-radius: 50%; }
.coin-fallback { display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; }
.pair b { font-weight: 700; }
.pair span { color: var(--muted); font-weight: 500; }
.spark-cell canvas { width: 120px; height: 40px; }
.tx-type { display: flex; align-items: center; gap: 12px; }
.tx-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; }

/* Empty state (like "No open orders") */
.empty { text-align: center; padding: 56px 20px; }
.empty .ic { width: 52px; height: 52px; margin: 0 auto 16px; color: var(--faint); stroke-width: 1.3; }
.empty strong { display: block; font-size: 18px; color: var(--text-2); margin-bottom: 6px; }
.empty p { color: var(--muted); margin: 0 auto; max-width: 440px; }

/* Market mini tiles (Hot / Gainer / Loser) */
.mkt-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mkt-col { background: var(--surface-2); border-radius: 16px; padding: 22px; }
.mkt-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mkt-col-head h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; }
.mkt-col-head h3 i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; color: #fff; }
.mkt-col-head a { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 2px; }
.mkt-row { display: grid; grid-template-columns: 20px 1fr auto 72px; align-items: center; gap: 12px; padding: 11px 0; font-weight: 600; }
.mkt-row .rank { color: var(--muted); font-weight: 500; }
.mkt-row img, .mkt-row .coin-fallback { width: 22px; height: 22px; }
.mkt-row .chg { text-align: right; }

/* ---------- Live market ---------- */
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--muted); }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.live-pill[data-kind="live"], .live-pill[data-kind="poll"] { color: var(--green); }
.live-pill[data-kind="live"] i, .live-pill[data-kind="poll"] i { background: var(--green); box-shadow: 0 0 0 0 rgba(32,196,107,.6); animation: pulse 1.6s infinite; }
.live-pill[data-kind="delayed"] { color: #f59e0b; }
.live-pill[data-kind="delayed"] i { background: #f59e0b; }
.live-pill[data-kind="offline"] { color: var(--red); }
.live-pill[data-kind="offline"] i { background: var(--red); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(32,196,107,0); } 100% { box-shadow: 0 0 0 0 rgba(32,196,107,0); } }

.flash-up   { animation: flashUp .9s ease-out; }
.flash-down { animation: flashDown .9s ease-out; }
@keyframes flashUp   { 0% { color: var(--green); background: var(--green-soft); } 100% { background: transparent; } }
@keyframes flashDown { 0% { color: var(--red);   background: var(--red-soft); }   100% { background: transparent; } }
[data-px], [data-lc-price], #liveTotal { border-radius: 6px; transition: color .3s; font-variant-numeric: tabular-nums; }

.mkt-row { cursor: pointer; border-radius: 10px; margin: 0 -8px; padding: 11px 8px; transition: background .15s; }
.mkt-row:hover { background: var(--surface-3); }
.mkt-row .pair { gap: 8px; min-width: 0; }
.mkt-row .pair b { font-weight: 700; }
.mkt-row .pair span { color: var(--muted); font-weight: 500; }
.mkt-row .px { text-align: right; font-variant-numeric: tabular-nums; }
.mkt-row .chg { font-variant-numeric: tabular-nums; }
.mkt-table tbody tr { cursor: pointer; transition: background .15s; }
.mkt-table tbody tr:hover { background: var(--surface-2); }

.live-chart-card { padding-bottom: 24px; }
.pair-pick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pair-pick::-webkit-scrollbar { display: none; }
.pair-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.pair-btn img, .pair-btn .coin-fallback { width: 22px; height: 22px; border-radius: 50%; }
.pair-btn:hover { border-color: var(--border-strong); }
.pair-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }

.lc-ticker { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 36px; padding: 22px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.lc-name { display: flex; align-items: center; gap: 12px; }
.lc-icon img, .lc-icon .coin-fallback { width: 40px; height: 40px; border-radius: 50%; }
.lc-name strong { display: block; font-size: 19px; }
.lc-name span { color: var(--muted); font-size: 13px; }
.lc-price strong { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; padding: 0 4px; margin-left: -4px; }
.lc-price span { font-size: 14px; font-weight: 600; }
.lc-stat span { display: block; color: var(--muted); font-size: 13px; }
.lc-stat b { font-weight: 600; font-variant-numeric: tabular-nums; }
.lc-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.lc-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); min-height: 20px; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.lc-legend b { font-weight: 600; }
.lc-chart { position: relative; height: 440px; }
.lc-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; z-index: 2; }
.lc-msg[hidden] { display: none; }

/* ==================================================================
   Live chat widget
   ================================================================== */
.chat-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: #fff; border: 0; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(244,81,30,.45);
  transition: transform .15s;
}
.chat-fab:hover { transform: scale(1.06); }
.chat-fab .chat-ic-close { display: none; }
.chat-fab.is-open .chat-ic-open { display: none; }
.chat-fab.is-open .chat-ic-close { display: block; }
.chat-fab .dot { position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #d4141f; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.chat-fab .dot[hidden] { display: none; }

.chat-panel {
  position: fixed; right: 26px; bottom: 104px; z-index: 90;
  width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 140px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow);
  overflow: hidden; display: none; flex-direction: column;
}
.chat-panel.open { display: flex; animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 16px 18px; background: linear-gradient(135deg, var(--accent), #ff7a45); color: #fff; }
.chat-agent { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chat-avatar { width: 42px; height: 42px; border-radius: 12px; background: rgba(0,0,0,.25); display: grid; place-items: center; flex-shrink: 0; }
.chat-avatar .logo-mark { width: 26px; height: 26px; color: #fff; }
.chat-agent strong { display: block; font-size: 16px; }
.chat-agent span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; opacity: .9; }
.chat-agent .online { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.chat-x { background: rgba(0,0,0,.18); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.chat-x:hover { background: rgba(0,0,0,.3); }

.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.chat-body[hidden] { display: none; }
.chat-loading { color: var(--muted); text-align: center; margin: auto; font-size: 14px; }
.chat-day { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; margin: 4px 0; }
.chat-msg { display: flex; flex-direction: column; max-width: 82%; align-self: flex-start; }
.chat-msg .bubble { padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface-3); color: var(--text); font-size: 14px; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; }
.chat-msg .bubble a { color: var(--accent); text-decoration: underline; }
.chat-msg time { font-size: 11px; color: var(--faint); margin: 4px 6px 0; }
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-msg.me .bubble { background: var(--accent); color: #fff; border-radius: 16px 16px 4px 16px; }
.chat-msg.me .bubble a { color: #fff; }
.chat-msg.sys .bubble { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.chat-msg.pending { opacity: .6; }
.chat-msg.failed .bubble { background: var(--red); }
.chat-msg.failed time { color: var(--red); cursor: pointer; }
.chat-who { font-size: 12px; color: var(--accent); font-weight: 600; margin: 0 6px 4px; }

.chat-intro { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.chat-intro[hidden] { display: none; }
.chat-intro p { margin: 0 0 6px; color: var(--text-2); font-size: 14px; }
.chat-intro .input { height: 46px; }
.chat-err { color: var(--red); font-size: 13px; min-height: 18px; }

.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-compose[hidden] { display: none; }
.chat-compose textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 11px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); outline: none; font-size: 14px; line-height: 1.45; }
.chat-compose textarea:focus { border-color: var(--accent); }
.chat-send { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.chat-send:hover { background: var(--accent-hover); }

/* ==================================================================
   Site footer
   ================================================================== */
.site-footer { background: #0f1013; margin-top: 40px; padding: 70px 24px 20px; }
[data-theme="light"] .site-footer { background: #ffffff; border-top: 1px solid var(--border); }
.sf-inner { max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.sf-logo { font-size: 34px; margin-bottom: 40px; }
.sf-logo .logo-mark { width: 42px; height: 42px; }
.sf-cta { border: 2px solid var(--text); border-radius: 999px; height: 50px; padding: 0 26px; font-size: 17px; background: transparent; color: var(--text); }
.sf-cta:hover { background: var(--text); color: var(--bg); }
.site-footer h4 { font-size: 26px; font-weight: 700; margin: 0 0 26px; }
.sf-brand h4 { margin-top: 50px; margin-bottom: 18px; }
.sf-social { display: flex; gap: 12px; }
.sf-social a { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.sf-social svg { width: 18px; height: 18px; }
.sf-col a { display: flex; align-items: center; gap: 14px; color: var(--text-2); font-size: 17px; font-weight: 500; padding: 7px 0; }
.sf-col a:hover { color: var(--accent); }
.sf-col .ic { color: var(--text-2); }
.sf-bottom { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; margin-top: 70px; color: var(--muted); font-size: 15px; }
.sf-conn { display: inline-flex; align-items: center; gap: 8px; color: var(--green); }
.sf-conn b { font-weight: 500; }
.sf-conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.sf-conn.bad { color: var(--red); } .sf-conn.bad i { background: var(--red); }

/* Wide layout (no desktop sidebar) — Markets page */
.layout-wide .shell { grid-template-columns: minmax(0, 1fr); max-width: 1520px; padding-top: 24px; }
@media (min-width: 981px) { .layout-wide .sidebar { display: none; } }

.demo-note { text-align: center; color: var(--faint); font-size: 12px; padding: 16px; }


/* ==================================================================
   Markets page
   ================================================================== */
.mk-overview .mkt-col { background: var(--surface-2); }
.mk-table-card { padding-top: 34px; }
.mk-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.mk-tabs { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; }
.mk-tab { position: relative; background: none; border: 0; padding: 6px 0 12px; font-size: 24px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.mk-tab:hover { color: var(--text-2); }
.mk-tab.active { color: var(--text); font-weight: 700; }
.mk-tab.active::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 18px; height: 3px; border-radius: 3px; background: var(--text); transform: translateX(-50%); }
.mk-search { display: flex; align-items: center; gap: 10px; width: 340px; max-width: 100%; height: 46px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 12px; color: var(--muted); transition: border-color .15s; }
.mk-search:focus-within { border-color: var(--accent); }
.mk-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; color: var(--text); }
.mk-search input::placeholder { color: var(--muted); }
.mk-chips { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 22px; padding-bottom: 2px; }
.mk-chips::-webkit-scrollbar, .mk-tabs::-webkit-scrollbar { display: none; }
.mk-chips[hidden] { display: none; }
.chip { flex-shrink: 0; background: none; border: 0; padding: 7px 12px; border-radius: 8px; font-size: 16px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--surface-3); color: var(--text); }
.chip.sm { font-size: 13px; padding: 5px 10px; }
.mk-expiry { display: inline-flex; align-items: center; gap: 4px; margin-left: 14px; color: var(--muted); font-size: 14px; white-space: nowrap; }

.mk-table { min-width: 980px; }
.mk-table th { font-size: 15px; padding-bottom: 18px; }
.mk-table th.sortable { cursor: pointer; user-select: none; }
.mk-table th.sortable:hover { color: var(--text); }
.sort { display: inline-flex; flex-direction: column; gap: 2px; margin-left: 6px; vertical-align: middle; }
.sort i { width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; }
.sort i:first-child { border-bottom: 4px solid var(--faint); }
.sort i:last-child { border-top: 4px solid var(--faint); }
.sort.asc i:first-child { border-bottom-color: var(--accent); }
.sort.desc i:last-child { border-top-color: var(--accent); }
.mk-table td { padding: 16px 8px; font-size: 16px; font-variant-numeric: tabular-nums; }
.mk-table tbody tr { transition: background .15s; }
.mk-table tbody tr:hover { background: var(--surface-2); }
.mk-table .pair { gap: 12px; }
.mk-table .col-pair { width: 24%; }
.mk-table .pair-ic, .mk-table .pair .coin-fallback { width: 40px; height: 40px; border-radius: 50%; }
.pair-txt { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 2px; }
.pair-txt small { flex-basis: 100%; color: var(--faint); font-size: 12px; font-weight: 500; }
.pair-txt .perp { margin-left: 6px; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--surface-3); color: var(--muted); }
.star { background: none; border: 0; color: var(--faint); font-size: 16px; cursor: pointer; padding: 4px; line-height: 1; }
.star:hover { color: var(--text-2); }
.star.on { color: #f3ba2f; }
.trade-btn { border-radius: 999px; padding: 0 18px; }
.opt-sym { font-weight: 700; }
.mk-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 18px; font-size: 13px; color: var(--muted); }
.pager { display: flex; gap: 6px; }
.pager button { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--border); background: transparent; color: var(--text-2); font-weight: 600; cursor: pointer; }
.pager button:hover:not([disabled]) { background: var(--surface-3); color: var(--text); }
.pager button.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.pager button[disabled] { opacity: .35; cursor: default; }

.spinner { display: block; width: 34px; height: 34px; margin: 0 auto 14px; border: 3px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.sk { display: inline-block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3), var(--border-strong), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.sk-ic { width: 22px; height: 22px; border-radius: 50%; }
@keyframes shimmer { to { background-position: -200% 0; } }
a.mkt-row { color: inherit; }

.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 100; background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; font-weight: 500; }
.toast[hidden] { display: none; }

@media (max-width: 640px) {
  .mk-tab { font-size: 19px; }
  .mk-tabs { gap: 18px; }
  .mk-search { width: 100%; }
  .chip { font-size: 14px; }
}


/* ---------- Auth: bold form style (matches reference) ---------- */
.auth-actions { display: flex; align-items: center; gap: 6px; }
.pill-white { white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 8px; background: #fff; color: #111; font-weight: 600; font-size: 15px; margin-right: 8px; transition: opacity .15s; }
.pill-white:hover { opacity: .88; }
[data-theme="light"] .pill-white { background: #111; color: #fff; }
.auth-wrap {
  max-width: 1560px; width: calc(100% - 48px); margin: 8px auto 24px; padding: 24px;
  border: 1px solid var(--border); border-radius: 26px;
  background: radial-gradient(900px 500px at 80% 0%, rgba(255,255,255,.035), transparent 60%), var(--bg);
  align-items: center;
}
.auth-panel { align-self: center; }
.auth-wrap > .auth-hero { align-self: start; top: 16px; }
.auth-card h1 { font-size: 44px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin: 0 0 8px; }
.auth-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.auth-title-row h1 { margin: 0; }
.auth-title-row + .lead { margin-top: -16px; }
.qr-btn { width: 48px; height: 48px; border-radius: 10px; border: 0; background: var(--surface-3); color: var(--text); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.qr-btn:hover { background: var(--border-strong); }
.qr-btn .ic { width: 24px; height: 24px; }

.form-bold .field { margin-bottom: 20px; }
.form-bold .field > label, .form-bold .ref-toggle summary { color: var(--text); font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.form-bold .input, .form-bold .select { height: 56px; border-radius: 8px; background: #141416; border: 1px solid #27272b; font-size: 17px; font-weight: 600; color: var(--text); }
.form-bold .input::placeholder { color: #6d6f75; font-weight: 500; }
.form-bold .input-group { border-radius: 8px; background: #141416; border-color: #27272b; }
.form-bold .input-group .input { height: 54px; }
.form-bold .input-group .pw-toggle { height: 54px; padding: 0 16px; border-left: 1px solid #27272b; }
.form-bold .input:focus, .form-bold .select:focus, .form-bold .input-group:focus-within { border-color: #8b8d93; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.form-bold .input-group:focus-within .input { box-shadow: none; }
.form-bold .prefix { color: var(--text); }
[data-theme="light"] .form-bold .input, [data-theme="light"] .form-bold .select, [data-theme="light"] .form-bold .input-group { background: #fff; border-color: #d6d8dc; }
[data-theme="light"] .form-bold .input-group .pw-toggle { border-left-color: #d6d8dc; }
.form-bold .check, .form-bold .field > label.check { font-size: 15px; font-weight: 500; color: var(--text-2); margin: 0; }
.form-bold .check a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.form-bold .otp input { border-radius: 10px; background: #141416; border-color: #27272b; }

.btn-white { background: #fff; color: #0b0b0c; height: 56px; border-radius: 8px; font-size: 19px; font-weight: 600; }
.btn-white:hover { background: #e9e9ec; }
.btn-white .ic { width: 20px; height: 20px; }
[data-theme="light"] .btn-white { background: #111214; color: #fff; }
[data-theme="light"] .btn-white:hover { background: #2a2b2f; }
.link-bold { color: var(--text); font-weight: 700; font-size: 15px; }
.link-bold:hover { text-decoration: underline; }

.auth-foot { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); }
.auth-foot a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.auth-foot a:hover { color: var(--accent); }
.auth-foot .ic { color: var(--text); }

.ref-toggle summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; user-select: none; }
.ref-toggle summary::-webkit-details-marker { display: none; }
.ref-toggle[open] summary .ic { transform: rotate(180deg); }
.ref-toggle .input { margin-top: 2px; }

.or-divider { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 15px; margin: 26px 0 22px; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-strong); }
.social-row { display: flex; justify-content: center; gap: 12px; }
.social-btn { width: 48px; height: 48px; border-radius: 10px; border: 0; background: var(--surface-3); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .1s; }
.social-btn:hover { background: var(--border-strong); }
.social-btn:active { transform: scale(.96); }
.social-btn svg { width: 24px; height: 24px; }


/* ==================================================================
   Funding pages (deposit / withdraw / transfer) + assets
   ================================================================== */
.fund-card { padding: 34px 36px; }
.fund-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.fund-head h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.fund-tabs { display: flex; gap: 6px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.fund-tabs a { display: flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.fund-tabs a:hover { color: var(--text); }
.fund-tabs a.active { background: var(--surface-3); color: var(--text); }
.fund-tabs a.active .ic { color: var(--accent); }
.fund-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 40px; align-items: start; }
.fund-main { min-width: 0; }

.fstep { position: relative; display: flex; gap: 18px; padding-bottom: 30px; }
.fstep::before { content: ''; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: var(--border); }
.fstep:last-child::before { display: none; }
.fstep-n { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--surface-3); color: var(--muted); }
.fstep.current .fstep-n { background: var(--text); color: var(--bg); }
.fstep.done .fstep-n { background: var(--accent); color: #fff; }
.fstep-body { flex: 1; min-width: 0; padding-top: 3px; }
.fstep-body h3 { margin: 0 0 14px; font-size: 18px; }
.fstep .alert { margin: 0 0 16px !important; }

.coin-picker { position: relative; }
.cp-btn { width: 100%; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: border-color .15s; }
.cp-btn:hover, .cp-btn[aria-expanded="true"] { border-color: var(--border-strong); }
.cp-coin { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.cp-coin img, .cp-coin .coin-fallback { width: 28px; height: 28px; border-radius: 50%; }
.cp-coin span { color: var(--muted); }
.cp-placeholder { color: var(--faint); }
.cp-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; }
.cp-pop[hidden] { display: none; }
.cp-search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 10px; background: var(--surface); color: var(--muted); margin-bottom: 6px; }
.cp-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); }
.cp-list { max-height: 300px; overflow-y: auto; }
.cp-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; }
.cp-item:hover, .cp-item.active { background: var(--surface-3); }
.cp-item[hidden] { display: none; }
.cp-item img, .cp-item .coin-fallback { width: 30px; height: 30px; border-radius: 50%; }
.cp-names { flex: 1; display: flex; gap: 8px; align-items: baseline; }
.cp-names span { color: var(--muted); font-size: 14px; }
.cp-bal { font-weight: 600; font-variant-numeric: tabular-nums; }
.cp-empty { padding: 16px; text-align: center; color: var(--muted); }

.quick-coins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quick-coins a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.quick-coins a:hover { border-color: var(--border-strong); }
.quick-coins a.active { border-color: var(--accent); background: var(--accent-soft); }
.quick-coins img, .quick-coins .coin-fallback { width: 20px; height: 20px; border-radius: 50%; }

.net-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.net-opt { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); transition: border-color .15s; }
.net-opt:hover { border-color: var(--border-strong); }
.net-opt.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.net-opt b { font-size: 16px; }
.net-opt span { color: var(--text-2); font-size: 14px; }
.net-opt small { color: var(--muted); font-size: 12px; margin-top: 4px; }

.addr-card { display: flex; gap: 24px; align-items: flex-start; padding: 20px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.qr { width: 160px; height: 160px; flex-shrink: 0; background: #fff; border-radius: 12px; padding: 6px; }
.qr svg { width: 100%; height: 100%; display: block; }
.addr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.addr-row { display: flex; align-items: center; gap: 10px; }
.addr-row code, code.mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.addr-row code { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; word-break: break-all; color: var(--text); }
.kv { margin: 14px 0 0; display: grid; gap: 8px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.kv.summary { margin: 0 0 20px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); }

.fund-form .field label { color: var(--text-2); }
.amount-group .suffix { padding: 0 16px 0 6px; font-weight: 700; color: var(--text-2); }
.amount-group .input { font-size: 17px; font-weight: 600; }
.input-group.invalid { border-color: var(--red); }
.max-btn { background: none; border: 0; color: var(--accent); font-weight: 800; font-size: 13px; cursor: pointer; padding: 0 10px; }
.max-btn:hover { text-decoration: underline; }
.get-code { background: none; border: 0; border-left: 1px solid var(--border); color: var(--accent); font-weight: 700; padding: 0 16px; height: 48px; cursor: pointer; white-space: nowrap; }
.get-code[disabled] { color: var(--muted); cursor: default; }
.dev-code { color: #f59e0b; }
.avail-line { margin-top: 12px; color: var(--muted); font-size: 14px; }
.avail-line b { color: var(--text); }

.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 22px; border: 1.5px dashed var(--border-strong); border-radius: 14px; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--green); color: var(--text-2); }
.dropzone b { color: var(--text); }

.fund-aside { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--nav-h) + 20px); }
.aside-box { background: var(--surface-2); border-radius: 16px; padding: 20px; }
.aside-box h3 { margin: 0 0 12px; font-size: 17px; }
.aside-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.aside-head h3 { margin: 0; }
.mini-tx { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.mini-tx:last-child { border-bottom: 0; }
.mini-tx img, .mini-tx .coin-fallback { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.mini-tx > div:nth-child(2) { flex: 1; min-width: 0; }
.mini-tx b { display: block; font-size: 14px; }
.mini-tx span { color: var(--muted); font-size: 12px; }
.mini-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--red); font-size: 12px; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.howto { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 14px; display: grid; gap: 8px; }

.xfer-accounts { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.xfer-box { display: flex; flex-direction: column; gap: 8px; }
.xfer-box .muted { font-size: 14px; font-weight: 600; }
.xfer-swap { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); transition: transform .2s, background .15s; }
.xfer-swap:hover { background: var(--border-strong); transform: rotate(180deg); }
.acct-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 28px; }
.acct-mini { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; }
.acct-mini.is-from { border-color: var(--accent); }
.acct-mini.is-to { border-color: var(--green); }
.acct-mini b { display: block; font-size: 14px; }
.acct-mini span { color: var(--muted); font-size: 12px; }
.acct-mini em { position: absolute; top: -9px; right: 10px; font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--accent); color: #fff; }
.acct-mini.is-to em { background: var(--green); }
.acct-ic.sm { width: 36px; height: 36px; border-radius: 10px; }

/* Assets */
.acct-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.acct-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid transparent; transition: border-color .15s; }
.acct-card:hover { border-color: var(--border-strong); }
.acct-card.active { border-color: var(--accent); }
.acct-card .acct-ic { width: 46px; height: 46px; border-radius: 12px; }
.acct-card div > span { display: block; color: var(--muted); font-size: 14px; }
.acct-card b { font-size: 18px; font-variant-numeric: tabular-nums; }
.assets-tools { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.mk-search.sm { width: 220px; height: 40px; }
.assets-table td { vertical-align: top; }
.acct-split { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0 48px; font-size: 12px; color: var(--muted); font-weight: 500; }
.acct-split b { color: var(--text-2); }
.incoming { margin: 4px 0 0 48px; font-size: 12px; color: #f59e0b; font-weight: 600; }
.row-actions { display: flex; justify-content: flex-end; gap: 14px; }
.row-actions a { color: var(--accent); font-weight: 600; font-size: 14px; }
.row-actions a:hover { text-decoration: underline; }
tr[hidden] { display: none; }

/* History */
.hist-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.hist-filters .select { width: auto; min-width: 160px; height: 42px; }
.hist-table td { vertical-align: top; }
.hist-detail { white-space: normal !important; font-weight: 500 !important; font-size: 13px; }
.hist-detail > * { display: block; }
.hist-detail code { font-size: 12px; }
.pager a.pg { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--border); display: grid; place-items: center; font-weight: 600; color: var(--text-2); }
.pager a.pg.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.pager a.pg[aria-disabled="true"] { opacity: .35; pointer-events: none; }

@media (max-width: 1200px) {
  .fund-grid { grid-template-columns: 1fr; }
  .fund-aside { position: static; }
  .acct-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .fund-card { padding: 22px 16px; }
  .fund-head h1 { font-size: 24px; }
  .fund-tabs { width: 100%; }
  .fund-tabs a { flex: 1; justify-content: center; padding: 9px 6px; font-size: 14px; }
  .fstep { gap: 12px; }
  .addr-card { flex-direction: column; align-items: center; }
  .addr-row { flex-direction: column; align-items: stretch; }
  .xfer-accounts { grid-template-columns: 1fr; }
  .xfer-swap { justify-self: center; transform: rotate(90deg); }
  .acct-strip { grid-template-columns: repeat(2, 1fr); }
  .acct-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .acct-card { padding: 14px; gap: 10px; }
  .acct-card .acct-ic { width: 38px; height: 38px; }
  .acct-card b { font-size: 15px; }
  .mk-search.sm { width: 100%; }
}


/* ==================================================================
   Earn: investment plans, staking, mining, referrals, bonuses
   ================================================================== */
.earn-hero { padding: 34px 36px 28px; }
.earn-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.earn-stats > div { background: var(--surface-2); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.card.earn-stats > div { background: var(--surface-2); }
.earn-stats span { color: var(--muted); font-size: 14px; }
.earn-stats b { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.earn-stats a { font-size: 13px; }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.plan-grid.mining, .plan-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plan-card { position: relative; background: var(--surface); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 18px; border: 1px solid transparent; transition: transform .15s, border-color .15s; }
.plan-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.plan-card.featured { border-color: var(--accent); background: radial-gradient(400px 200px at 100% 0%, rgba(244,81,30,.12), transparent 70%), var(--surface); }
.plan-badge { position: absolute; top: -12px; right: 20px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: #fff; }
.plan-top { display: flex; gap: 12px; align-items: flex-start; }
.plan-top img, .plan-top .coin-fallback { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.plan-top h3 { margin: 0 0 3px; font-size: 19px; }
.plan-top span { color: var(--muted); font-size: 13px; }
.plan-rate { display: flex; align-items: baseline; gap: 8px; }
.plan-rate b { white-space: nowrap; font-size: 42px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.plan-rate span { color: var(--muted); font-weight: 600; }
.plan-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; }
.plan-facts li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.plan-facts span { color: var(--muted); }
.plan-facts b { font-weight: 600; text-align: right; }
.plan-card .btn-white { height: 48px; font-size: 16px; }
.apr-big { font-size: 18px; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 600; }
.pos-table td { vertical-align: middle; }

dialog.sheet { border: 0; padding: 0; background: transparent; max-width: 480px; width: calc(100% - 24px); color: var(--text); }
dialog.sheet::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.sheet-inner { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.sheet-head h3 { margin: 2px 0 0; font-size: 22px; }
.sheet-head .chat-x { background: var(--surface-3); color: var(--text); }
.est-box { display: grid; gap: 8px; padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--border-strong); }
.est-box div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.est-box span { color: var(--muted); }

.ref-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px;
  background: radial-gradient(600px 300px at 90% 10%, rgba(244,81,30,.14), transparent 60%), var(--surface); }
.ref-copy h1 { font-size: 40px; line-height: 1.1; letter-spacing: -1px; margin: 16px 0 12px; }
.accent-text { color: var(--accent); }
.ref-box { margin-top: 26px; padding: 20px; border-radius: 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.ref-code { font-size: 22px !important; letter-spacing: 3px; }
.share-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.share { padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; color: #fff; }
.share.wa { background: #25d366; } .share.x { background: #000; border: 1px solid #333; } .share.tg { background: #29a9eb; }
.ref-art { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ref-circle { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 16px rgba(244,81,30,.06), 0 0 0 32px rgba(244,81,30,.03); }
.ref-circle .ic { width: 46px; height: 46px; }
.ref-steps { display: grid; gap: 10px; width: 100%; max-width: 320px; }
.ref-steps div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.ref-steps b { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }

.bonus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.bonus-card { background: var(--surface); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 14px; border: 1px solid transparent; }
.bonus-card.is-active { border-color: #f59e0b; }
.bonus-card.is-credited { border-color: var(--green); }
.bonus-card h3 { margin: 0; font-size: 20px; }
.bonus-card p { margin: 0; color: var(--muted); font-size: 14px; }
.bonus-pct { display: flex; align-items: baseline; gap: 6px; }
.bonus-pct b { font-size: 46px; font-weight: 800; letter-spacing: -1px; line-height: 1; background: linear-gradient(135deg, var(--accent), #ffb547); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bonus-pct span { color: var(--muted); font-weight: 600; }
.bonus-state { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; font-weight: 600; color: #f59e0b; }
.bonus-state.ok { color: var(--green); }
.bonus-state.muted { color: var(--muted); }

@media (max-width: 1600px) { .plan-grid.mining, .plan-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
  .plan-grid, .bonus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-hero { grid-template-columns: 1fr; }
  .earn-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .plan-grid, .plan-grid.mining, .plan-grid.four, .bonus-grid { grid-template-columns: 1fr; gap: 14px; }
  .earn-hero, .ref-hero { padding: 22px 16px; }
  .earn-stats b { font-size: 17px; }
  .ref-copy h1 { font-size: 28px; }
}


/* ==================================================================
   Spot trading page
   ================================================================== */
.layout-trade .shell { max-width: none; padding: 0 0 40px; gap: 0; }
.layout-trade .main { gap: 0; }
.layout-trade .main > .alert { margin: 8px 8px 0 !important; }
.layout-trade .chat-fab { bottom: 48px; }
.layout-trade .chat-panel { bottom: 124px; }
.trade { display: flex; flex-direction: column; gap: 4px; padding: 4px; background: var(--bg); }
.tr-panel { background: var(--surface); border-radius: 6px; }
.tr-ticker { display: flex; align-items: center; gap: 18px; height: 42px; padding: 0 12px; background: var(--surface); border-radius: 6px; overflow: hidden; }
.tr-tick-tabs { display: flex; gap: 4px; flex-shrink: 0; }
.tr-tick-tabs button { display: flex; align-items: center; gap: 5px; background: none; border: 0; padding: 5px 10px; border-radius: 6px; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.tr-tick-tabs button.active { background: var(--surface-3); color: var(--text); }
.tr-tick-tabs button.active .ic { color: var(--accent); }
.tr-tick-strip { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; font-size: 13px; font-variant-numeric: tabular-nums; }
.tr-tick-strip::-webkit-scrollbar { display: none; }
.tr-tick-strip a { display: flex; gap: 6px; color: var(--text-2); }
.tr-tick-strip a b { color: var(--text); }
.tr-tick-strip a.cur b { color: var(--accent); }

.tr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 4px; align-items: start; }
.tr-left, .tr-right { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.tr-pairbar { display: flex; align-items: center; gap: 30px; padding: 10px 16px; flex-wrap: wrap; }
.tr-pair-pick { position: relative; }
.tr-pair-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; text-align: left; padding: 0; }
.tr-pair-btn img, .tr-pair-btn .coin-fallback { width: 30px; height: 30px; border-radius: 50%; }
.tr-pair-btn b { font-size: 19px; }
.tr-pn { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.tr-pair-btn small { display: block; color: var(--muted); font-size: 13px; }
.tr-pair-pop { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: 340px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; }
.tr-pair-pop[hidden] { display: none; }
.tr-pair-head, .tr-pair-row { display: grid; grid-template-columns: 1.3fr 1fr 70px; gap: 8px; padding: 8px 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.tr-pair-head { color: var(--muted); }
.tr-pair-head span:not(:first-child), .tr-pair-row > span:not(:first-child) { text-align: right; }
.tr-pair-row { border-radius: 8px; font-weight: 600; }
.tr-pair-row:hover, .tr-pair-row.active { background: var(--surface-3); }
.tr-pair-row .pair { gap: 6px; }
.tr-pair-row img { width: 20px; height: 20px; }
.tr-last b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; border-radius: 4px; }
.tr-last span { font-size: 13px; font-weight: 700; }
.tr-stat span { display: block; color: var(--muted); font-size: 13px; }
.tr-stat em { font-style: normal; }
.tr-stat b { font-size: 14px; font-variant-numeric: tabular-nums; }
.tr-fav { margin-left: auto; color: var(--muted); }
.tr-fav.on { color: #f3ba2f; }
.tr-fav.on .ic { fill: #f3ba2f; }

.tr-mid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 4px; }
.tr-chart, .tr-book { height: 640px; display: flex; flex-direction: column; min-width: 0; }
.tr-tabs { display: flex; gap: 22px; padding: 12px 16px 0; overflow-x: auto; scrollbar-width: none; }
.tr-tabs::-webkit-scrollbar { display: none; }
.tr-tabs button { position: relative; background: none; border: 0; padding: 4px 0 10px; font-size: 17px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tr-tabs button.active { color: var(--text); }
.tr-tabs button.active::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 16px; height: 3px; border-radius: 3px; background: var(--text); transform: translateX(-50%); }
.tr-tabs .count { font-size: 13px; color: var(--accent); }
.tr-toolbar { display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.tr-toolbar.dim > *:not([data-fullscreen]) { opacity: .35; pointer-events: none; }
.tr-intervals { display: flex; gap: 2px; }
.tr-intervals button, .tr-tool { background: none; border: 0; padding: 5px 8px; border-radius: 6px; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tr-intervals button:hover, .tr-tool:hover { color: var(--text); background: var(--surface-2); }
.tr-intervals button.active, .tr-tool.active { color: var(--text); background: var(--surface-3); }
.tr-sep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 6px; }
.tr-ind { position: relative; }
.tr-ind-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; min-width: 150px; box-shadow: var(--shadow); }
.tr-ind-pop[hidden] { display: none; }
.tr-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 14px 0; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 26px; }
.tr-legend[hidden] { display: none; }
.tr-legend b { font-weight: 600; margin-left: 2px; }
.lg-name { color: var(--text-2); font-size: 14px; font-weight: 600; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.tr-chart-box { position: relative; flex: 1; min-height: 0; }
.tr-chart-box[hidden] { display: none; }
.tr-depth { flex: 1; width: 100%; min-height: 0; }
.tr-depth[hidden] { display: none; }
.tr-chart:fullscreen { height: 100vh; border-radius: 0; }

.tr-book { font-variant-numeric: tabular-nums; }
.tr-book [data-book-view] { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tr-book [data-book-view][hidden] { display: none; }
.tr-book-tools { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 4px; }
.tr-book-modes { display: flex; gap: 6px; }
.tr-book-modes button { background: none; border: 1px solid transparent; border-radius: 5px; padding: 3px; cursor: pointer; opacity: .55; }
.tr-book-modes button.active { opacity: 1; border-color: var(--border-strong); }
.tr-book-modes i { display: block; width: 14px; height: 14px; border-radius: 2px; }
.m-both { background: linear-gradient(var(--red) 50%, var(--green) 50%); }
.m-bids { background: var(--green); }
.m-asks { background: var(--red); }
.tr-group { background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; }
.tr-group option { background: var(--surface-2); }
.tr-book-head, .ob-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 0 14px; font-size: 13px; }
.tr-book-head { color: var(--muted); padding-top: 6px; padding-bottom: 6px; }
.tr-book-head em { font-style: normal; }
.tr-book-head span:not(:first-child), .ob-row span:not(:first-child) { text-align: right; }
.ob-row { position: relative; line-height: 24px; cursor: pointer; font-weight: 600; }
.ob-row::before { content: ''; position: absolute; top: 1px; bottom: 1px; right: 0; width: var(--w, 0); opacity: .14; pointer-events: none; }
.ob-row.ask::before { background: var(--red); }
.ob-row.bid::before { background: var(--green); }
.ob-row.ask span:first-child { color: var(--red); }
.ob-row.bid span:first-child { color: var(--green); }
.ob-row:hover { background: var(--surface-2); }
.ob-row.tr { cursor: default; }
.ob-row.tr::before { display: none; }
.tr-asks, .tr-bids { flex: 1; min-height: 0; overflow: hidden; }
.tr-asks { display: flex; flex-direction: column; justify-content: flex-end; }
.tr-asks[hidden], .tr-bids[hidden] { display: none; }
.tr-mid-price { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tr-mid-price b { font-size: 20px; font-weight: 800; }
.tr-mid-price .arr { font-size: 15px; }
.tr-mid-price span { font-size: 13px; }
.tr-trades { flex: 1; overflow-y: auto; scrollbar-width: thin; }
.tr-ratio { display: flex; align-items: center; gap: 6px; padding: 10px 14px 12px; font-size: 12px; font-weight: 700; }
.tr-ratio > .b, .tr-ratio > .s { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 5px; border: 1px solid; }
.tr-ratio > .b { color: var(--green); border-color: var(--green); }
.tr-ratio > .s { color: var(--red); border-color: var(--red); }
.tr-ratio .bar { position: relative; flex: 1; display: flex; height: 24px; gap: 3px; }
.tr-ratio .bar i { display: block; height: 100%; transition: width .4s; }
.tr-ratio .bar i:first-child { background: var(--green-soft); clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.tr-ratio .bar i:nth-child(2) { background: var(--red-soft); clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%); }
.tr-ratio .bar em { position: absolute; top: 4px; font-style: normal; }
.tr-ratio .bar em:nth-of-type(1) { left: 8px; color: var(--green); }
.tr-ratio .bar em:nth-of-type(2) { right: 8px; color: var(--red); }

.tr-orders { min-height: 320px; padding-bottom: 10px; }
.tr-orders-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-right: 16px; border-bottom: 1px solid var(--border); }
.tr-orders-tools { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.tr-otable { min-width: 760px; }
.tr-otable th { padding: 12px 16px; font-size: 13px; }
.tr-otable td { padding: 12px 16px; font-size: 14px; font-variant-numeric: tabular-nums; }

.tr-form { padding: 16px 16px 18px; }
.tr-title { position: relative; margin: 0 0 16px; font-size: 18px; font-weight: 700; padding-bottom: 8px; }
.tr-title::after { content: ''; position: absolute; left: 50px; bottom: 0; width: 16px; height: 3px; border-radius: 3px; background: var(--text); }
.tr-side { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 8px; padding: 3px; margin-bottom: 16px; }
.tr-side button { height: 40px; border: 0; border-radius: 6px; background: none; font-weight: 700; font-size: 16px; color: var(--muted); cursor: pointer; }
.tr-side .buy.active { background: var(--green); color: #fff; }
.tr-side .sell.active { background: var(--red); color: #fff; }
.tr-types { display: flex; gap: 20px; margin-bottom: 14px; }
.tr-types button { position: relative; background: none; border: 0; padding: 2px 0 8px; font-weight: 700; font-size: 15px; color: var(--muted); cursor: pointer; }
.tr-types button.active { color: var(--text); }
.tr-types button.active::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 14px; height: 3px; border-radius: 3px; background: var(--text); transform: translateX(-50%); }
.tr-field { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); transition: border-color .15s; }
.tr-field:focus-within { border-color: var(--text-2); }
.tr-field[hidden] { display: none; }
.tr-field span { color: var(--muted); font-size: 14px; }
.tr-field input { flex: 1; min-width: 0; text-align: right; background: none; border: 0; outline: none; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tr-field em, .tr-field b { font-style: normal; font-weight: 600; }
.tr-market-note b { flex: 1; text-align: right; color: var(--muted); }
.tr-slider { position: relative; margin: 6px 4px 18px; padding-right: 44px; }
.tr-slider input[type=range] { width: 100%; appearance: none; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--green) var(--p, 0%), var(--border-strong) var(--p, 0%)); outline: none; margin: 10px 0; position: relative; z-index: 2; }
.tr-slider input.sell { background: linear-gradient(90deg, var(--red) var(--p, 0%), var(--border-strong) var(--p, 0%)); }
.tr-slider input::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; transform: rotate(45deg); background: var(--surface); border: 2px solid var(--green); cursor: pointer; }
.tr-slider input.sell::-webkit-slider-thumb { border-color: var(--red); }
.tr-slider input::-moz-range-thumb { width: 12px; height: 12px; transform: rotate(45deg); border-radius: 0; background: var(--surface); border: 2px solid var(--green); cursor: pointer; }
.tr-ticks { position: absolute; left: 0; right: 44px; top: 50%; display: flex; justify-content: space-between; transform: translateY(-50%); z-index: 3; pointer-events: none; }
.tr-ticks button { width: 9px; height: 9px; transform: rotate(45deg); background: var(--surface); border: 2px solid var(--border-strong); padding: 0; cursor: pointer; pointer-events: auto; }
.tr-ticks button.on { border-color: var(--text-2); }
.tr-pct { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); font-weight: 600; }
.tr-kv { margin: 4px 0 16px; display: grid; gap: 10px; }
.tr-kv div { display: flex; justify-content: space-between; font-size: 14px; }
.tr-kv dt { color: var(--muted); }
.tr-kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.tr-submit { height: 50px; font-size: 17px; color: #fff; border-radius: 8px; }
.tr-submit.buy { background: var(--green); }
.tr-submit.sell { background: var(--red); }
.tr-submit:hover { filter: brightness(1.08); }
.tr-hint { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.tr-hint:empty { display: none; }

.tr-account { padding: 16px; }
.tr-acct-coin { padding: 4px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tr-acct-coin h4 { margin: 0 0 10px; font-size: 16px; }
.tr-acct-coin div { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; }
.tr-acct-coin span { color: var(--muted); }
.tr-acct-coin b { font-variant-numeric: tabular-nums; }
.tr-acct-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-acct-actions .btn { border-radius: 999px; height: 44px; font-size: 15px; }

.tr-status { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: var(--surface); border-top: 1px solid var(--border); font-size: 13px; }
.tr-status-links { display: flex; gap: 20px; }
.tr-status-links a { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.tr-status-links a:hover { color: var(--text); }
.toast.bad { border-color: var(--red); color: #ff8b92; }

@media (max-width: 1280px) {
  .tr-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .tr-mid { grid-template-columns: minmax(0, 1fr) 290px; }
  .tr-pairbar .hide-sm { display: none; }
}
@media (max-width: 1080px) {
  .tr-grid { grid-template-columns: minmax(0, 1fr); }
  .tr-right { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; }
}
@media (max-width: 760px) {
  .tr-mid { grid-template-columns: minmax(0, 1fr); }
  .tr-chart { height: 440px; }
  .tr-book { height: 560px; }
  .tr-right { grid-template-columns: minmax(0, 1fr); }
  .tr-pairbar { gap: 14px 22px; }
  .tr-status-links { display: none; }
  .tr-toolbar { overflow-x: auto; }
}


/* ==================================================================
   Profile & KYC · Security · Support
   ================================================================== */
.profile-hero { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.avatar.xl { width: 84px; height: 84px; border-radius: 22px; font-size: 30px; }
.ph-main { flex: 1; min-width: 240px; }
.ph-main h1 { margin: 0 0 8px; font-size: 28px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 14px; }
.ph-meta b { color: var(--text); }
.ph-level { padding: 14px 18px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.ref-mini { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; }
.ref-mini b { letter-spacing: 2px; }
.ref-mini a { margin-left: auto; }
.kyc-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.kyc-levels div { padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; display: flex; flex-direction: column; gap: 4px; }
.kyc-levels div.cur { border-color: var(--accent); }
.kyc-levels span { color: var(--muted); font-size: 13px; }
.kyc-state { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 14px; background: var(--surface-2); }
.kyc-state b { display: block; font-size: 17px; }
.kyc-state span { color: var(--muted); font-size: 14px; }
.kyc-state.ok { color: var(--green); } .kyc-state.ok b { color: var(--green); }
.kyc-state.pending .ic { color: #f59e0b; }
.doc-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.doc-type input { position: absolute; opacity: 0; pointer-events: none; }
.doc-type span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.doc-type input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.doc-type input:focus-visible + span { outline: 2px solid var(--accent); }
.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.upload-grid .dropzone { padding: 16px 10px; font-size: 13px; }
.upload-grid .dropzone[hidden] { display: none; }
.kyc-tips { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; display: grid; gap: 4px; }

.sec-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.sec-score { display: flex; align-items: center; gap: 20px; }
.sec-ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--surface-3) 0); }
.sec-ring b { width: 60px; height: 60px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 17px; }
.sec-checks { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.sec-checks span { display: flex; align-items: center; gap: 8px; }
.sec-checks .ok { color: var(--text); } .sec-checks .ok .ic { color: var(--green); }
.sec-checks span:not(.ok) .ic { color: #f59e0b; }
.sec-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.sec-steps { display: grid; gap: 10px; margin: 6px 0 20px; }
.sec-steps div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.sec-steps b { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; }
.sec-grid { align-items: start; }

.support-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 30px; align-items: center; padding: 36px;
  background: radial-gradient(500px 260px at 100% 0%, rgba(244,81,30,.12), transparent 60%), var(--surface); }
.support-hero h1 { font-size: 34px; letter-spacing: -.6px; margin: 14px 0 18px; }
.support-search { width: 100%; height: 54px; }
.support-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.support-quick a { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; background: var(--surface-2); font-weight: 600; transition: background .15s; }
.support-quick a:hover { background: var(--surface-3); }
.support-quick .ic { color: var(--accent); }
.support-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(340px, 1fr); gap: 24px; align-items: start; }
.faq-cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.faq-list { display: flex; flex-direction: column; }
.faq { border-bottom: 1px solid var(--border); }
.faq[hidden] { display: none; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 2px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { color: var(--muted); transition: transform .2s; flex-shrink: 0; }
.faq[open] summary .ic { transform: rotate(180deg); }
.faq p { margin: 0 0 16px; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.support-chat { position: sticky; top: calc(var(--nav-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
.chat-panel.chat-inline { position: relative; inset: auto; width: 100%; max-width: none; height: 600px; max-height: calc(100vh - 220px); display: flex; z-index: 1; box-shadow: none; animation: none; }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 0; scrollbar-width: none; }
.chat-quick button { flex-shrink: 0; border: 1px solid var(--border-strong); background: none; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.chat-quick button:hover { border-color: var(--accent); color: var(--text); }
.support-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px 20px; }
.support-contact div { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; font-size: 13px; }
.support-contact .ic { grid-row: span 2; color: var(--accent); }
.support-contact span { color: var(--muted); }

/* ==================================================================
   Futures & Options
   ================================================================== */
.fu-mode { display: flex; gap: 6px; margin: -6px 0 14px; }
.fu-lev { margin-bottom: 16px; }
.fu-lev-top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.fu-lev-top b { font-size: 18px; color: var(--accent); }
.fu-lev input[type=range] { width: 100%; appearance: none; height: 4px; border-radius: 4px; outline: none; background: linear-gradient(90deg, var(--accent) var(--p, 20%), var(--border-strong) var(--p, 20%)); }
.fu-lev input::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: pointer; }
.fu-lev input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: pointer; }
.fu-lev-marks { display: flex; gap: 6px; margin-top: 10px; }
.fu-lev-marks button { flex: 1; border: 1px solid var(--border); background: var(--surface-2); border-radius: 7px; padding: 5px 0; font-size: 12px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.fu-lev-marks button:hover { border-color: var(--accent); color: var(--text); }
.fu-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fu-btns .tr-submit { width: 100%; }
.fu-tpsl[hidden] { display: none; }

.op-bar { gap: 26px; }
.op-unds { display: flex; gap: 6px; flex-wrap: wrap; }
.op-unds button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-weight: 700; font-size: 14px; cursor: pointer; }
.op-unds button img, .op-unds button .coin-fallback { width: 20px; height: 20px; border-radius: 50%; }
.op-unds button.active { border-color: var(--accent); background: var(--accent-soft); }
.op-bar .live-pill { margin-left: auto; }
.op-chain-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px 6px; }
.op-expiries { display: flex; gap: 4px; flex-wrap: wrap; }
.op-wrap { max-height: 560px; overflow: auto; margin: 0; }
.op-table { min-width: 860px; font-variant-numeric: tabular-nums; }
.op-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; padding: 10px 10px; font-size: 12.5px; }
.op-table .op-sides th { top: 0; font-size: 14px; font-weight: 700; color: var(--text); border-bottom: 0; padding-bottom: 4px; }
.op-table .op-sides .calls { color: var(--green); text-align: left; }
.op-table .op-sides .puts { color: var(--red); text-align: right; }
.op-table thead tr:nth-child(2) th { top: 30px; }
.op-table td { padding: 9px 10px; font-size: 13.5px; }
.op-table td[data-buy] { cursor: pointer; border-radius: 4px; }
.op-table td[data-buy]:hover { background: var(--surface-3); }
.op-table td.bid { color: var(--green); } .op-table td.ask { color: var(--red); }
.op-table td.itm { background: rgba(244,81,30,.05); }
.op-table td.sel { background: var(--accent-soft); box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.op-table .strike { text-align: center; background: var(--surface-2); font-weight: 700; min-width: 100px; }
.op-table .strike small { display: block; font-size: 10px; color: var(--accent); }
.op-table tr.atm td { border-top: 1px solid var(--accent); }
.op-pick { text-align: center; color: var(--muted); padding: 30px 10px; }
.op-pick .ic { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--faint); }
.op-contract { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 15px; word-break: break-all; }

@media (max-width: 1200px) {
  .support-grid, .support-hero { grid-template-columns: minmax(0, 1fr); }
  .support-chat { position: static; }
}
@media (max-width: 640px) {
  .doc-types, .upload-grid, .kyc-levels { grid-template-columns: 1fr; }
  .support-hero { padding: 22px 16px; }
  .support-hero h1 { font-size: 26px; }
  .chat-panel.chat-inline { height: 520px; }
}

/* ==================================================================
   Responsive
   ================================================================== */
@media (max-width: 1400px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alloc { flex-direction: column; align-items: stretch; }
  .donut { margin: 0 auto; }
}
@media (max-width: 1200px) {
  .nav-links .nav-link { font-size: 15px; padding: 8px 9px; }
  .shell { grid-template-columns: 260px minmax(0, 1fr); padding: 20px 24px 60px; gap: 24px; }
  .grid-2, .grid-3-1 { grid-template-columns: minmax(0, 1fr); }
  .alloc { flex-direction: row; }
  .mkt-cols { grid-template-columns: 1fr; }
}
@media (max-height: 820px) { .hero-ticker, .coin-float.sol { display: none; } }
@media (max-width: 1080px) {
  .sf-inner { grid-template-columns: 1fr 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}
@media (max-width: 980px) {
  .nav-links, .nav-right .hide-md { display: none; }
  .menu-toggle { display: grid; }
  .topnav { gap: 12px; padding: 0 14px; }
  .shell { grid-template-columns: 1fr; padding: 16px 16px 100px; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 80;
    width: 300px; max-width: 86vw; max-height: none;
    border-radius: 0 20px 20px 0;
    transform: translateX(-105%); transition: transform .25s ease;
  }
  body.side-open .sidebar { transform: none; }
  .side-backdrop { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.55); opacity: 0; visibility: hidden; transition: opacity .2s; }
  body.side-open .side-backdrop { opacity: 1; visibility: visible; }
  .side-mobile-nav { display: block !important; }
}
@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  .logo { font-size: 21px; }
  .logo-mark { width: 26px; height: 26px; }
  .card { padding: 22px 18px; border-radius: 16px; }
  .stats { gap: 12px; }
  .stat { padding: 18px; border-radius: 16px; }
  .stat-value { font-size: 21px; }
  .stat-ic { width: 38px; height: 38px; }
  .balance-value .amt { font-size: 38px; }
  .balance-actions { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .balance-actions .btn { height: 50px; padding: 0 10px; font-size: 15px; }
  .alloc { flex-direction: column; }
  .donut { width: 200px; height: 200px; }
  .acct-ic { width: 48px; height: 48px; }
  .acct-body strong, .acct-val strong { font-size: 16px; }
  .acct-body span, .acct-val span { font-size: 13px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .auth-top { padding: 0 16px; }
  .auth-top .switch span { display: none; }
  .auth-wrap { padding: 8px 16px 24px; }
  .auth-card h1 { font-size: 32px; }
  .auth-wrap { width: auto; margin: 0 0 16px; border: 0; padding: 8px 16px 24px; background: none; }
  .pill-white { padding: 0 12px; margin-right: 2px; font-size: 14px; }
  .auth-actions .icon-btn { width: 36px; height: 36px; }
  .auth-actions [data-auth-toast] { display: none; }
  .pill-white { white-space: nowrap; height: 34px; }
  .otp { gap: 7px; }
  .otp input { height: 54px; font-size: 22px; border-radius: 12px; }
  .chart-box { height: 240px; }
  .lc-chart { height: 340px; }
  .lc-ticker { gap: 12px 22px; }
  .lc-price strong { font-size: 24px; }
  .mkt-col { padding: 16px; }
  .mkt-row { grid-template-columns: 16px minmax(0,1fr) auto 64px; gap: 8px; font-size: 14px; }
  .mkt-row .pair span { display: none; }
  .balance-actions .btn { font-size: 14px; gap: 6px; padding: 0 6px; }
  .balance-actions .btn .ic { width: 16px; height: 16px; }
  .pf-card .chart-box { min-height: 240px; }
  .chat-fab { width: 56px; height: 56px; right: 16px; bottom: 16px; }
  .chat-panel { right: 8px; left: 8px; width: auto; max-width: none; bottom: 84px; height: calc(100vh - 100px); }
  .sf-inner { grid-template-columns: 1fr; gap: 30px; }
  .site-footer h4 { font-size: 22px; margin-bottom: 14px; }
  .sf-logo { margin-bottom: 24px; }
}
.side-mobile-nav { display: none; }

/* ---------- Admin-controlled branding ---------- */
.logo-img { height: 30px; width: auto; max-width: 140px; object-fit: contain; }
.chat-avatar .logo-img { height: 22px; max-width: 22px; }
.auth-hero.has-img { background: linear-gradient(180deg, rgba(13,13,15,.35), rgba(13,13,15,.85)), var(--hero-img) center / cover no-repeat, #0d0d0f; }
.alert.announce { border: 1px solid var(--accent-ring); }

/* ---------- Anniversary ticker (above the member top bar) ---------- */
.anniv {
  position: relative; z-index: 51; height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 10px 0 14px; overflow: hidden;
  background: linear-gradient(90deg, #2a1208 0%, #3a1708 35%, #2b1a06 65%, #2a1208 100%);
  border-bottom: 1px solid rgba(244, 81, 30, .35); color: #ffe7dc; font-size: 14px; font-weight: 600;
}
.anniv::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 200, 120, .14) 50%, transparent 70%) -100% 0 / 60% 100% no-repeat;
  animation: anniv-shine 6s ease-in-out infinite; }
.anniv-badge { flex-shrink: 0; display: flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px 0 7px; border-radius: 7px;
  background: linear-gradient(135deg, #f3ba2f, #f4511e); color: #1a0c04; box-shadow: 0 0 14px rgba(244, 81, 30, .45); }
.anniv-badge b { font-size: 17px; font-weight: 900; line-height: 1; }
.anniv-badge span { font-size: 9px; font-weight: 900; letter-spacing: .8px; line-height: 1; }
.anniv-track { flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.anniv-run { display: flex; width: max-content; animation: anniv-scroll var(--anniv-dur, 40s) linear infinite; }
.anniv:hover .anniv-run { animation-play-state: paused; }
.anniv-seg { display: flex; align-items: center; flex-shrink: 0; white-space: nowrap; }
.tk-item { padding: 0 6px; }
.tk-sep { color: #f3ba2f; padding: 0 18px; font-size: 12px; }
.anniv-cta { flex-shrink: 0; height: 28px; padding: 0 12px; border-radius: 7px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; }
.anniv-cta:hover { background: var(--accent-hover); }
.anniv-x { flex-shrink: 0; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #ffcfbb; font-size: 20px; line-height: 1; cursor: pointer; }
.anniv-x:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.anniv.closing { height: 0; border-bottom-width: 0; transition: height .25s ease; }
[data-theme="light"] .anniv { background: linear-gradient(90deg, #fff1e8, #ffe2cf 40%, #fff3d6 70%, #fff1e8); color: #7a2a0a; border-bottom-color: #f8c4ad; }
[data-theme="light"] .anniv-x { color: #a3471f; }
@keyframes anniv-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes anniv-shine { 0%, 40% { background-position: -100% 0; } 100% { background-position: 250% 0; } }
@media (max-width: 640px) {
  .anniv { height: 36px; font-size: 13px; gap: 8px; padding: 0 4px 0 8px; }
  .anniv-cta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .anniv-run { animation: none; }
  .anniv-seg + .anniv-seg { display: none; }
  .anniv-track { overflow-x: auto; }
  .anniv::before { animation: none; }
}
.lc-top { min-width: 0; } .lc-top > .pair-pick { min-width: 0; max-width: 100%; } .live-chart-card { min-width: 0; }
.pf-card .card-head { flex-wrap: wrap; } .pf-card .tabs { max-width: 100%; overflow-x: auto; }

/* trading pages: tables scroll inside their panel instead of the page */
.trade .table-wrap { margin: 0; }
.tr-panel { min-width: 0; }
.faq-cats { flex-wrap: wrap; max-width: 100%; }

/* ---------- Page entrance (member app + admin) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .main > *, .auth-card, .auth-hero { animation: page-in .65s cubic-bezier(.16, 1, .3, 1) backwards; }
  .main > :nth-child(2) { animation-delay: .06s; }
  .main > :nth-child(3) { animation-delay: .12s; }
  .main > :nth-child(4) { animation-delay: .18s; }
  .main > :nth-child(5) { animation-delay: .24s; }
  .main > :nth-child(n+6) { animation-delay: .3s; }
  .auth-hero { animation-name: page-in-fade; animation-duration: .9s; animation-delay: .1s; }
  .sidebar { animation: side-in .55s cubic-bezier(.16, 1, .3, 1) backwards; }
  .stats > .stat, .acct-tiles > div { animation: page-in .6s cubic-bezier(.16, 1, .3, 1) backwards; }
  .stats > .stat:nth-child(2), .acct-tiles > div:nth-child(2) { animation-delay: .08s; }
  .stats > .stat:nth-child(3), .acct-tiles > div:nth-child(3) { animation-delay: .16s; }
  .stats > .stat:nth-child(4), .acct-tiles > div:nth-child(4) { animation-delay: .24s; }
  .layout-trade .main > * { animation-duration: .45s; }
}
@keyframes page-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes page-in-fade { from { opacity: 0; transform: scale(.98); } }
@keyframes side-in { from { opacity: 0; transform: translateX(-14px); } }

/* Market overview rows: keep pair name and price from overlapping in narrow columns */
.mkt-row { grid-template-columns: 20px minmax(0, 1fr) auto 64px; }
.mkt-row .pair { min-width: 0; overflow: hidden; white-space: nowrap; }
.mkt-row .pair span { color: var(--muted); font-weight: 500; }
@media (max-width: 1500px) { .mkt-row .pair span { display: none; } }
@media (max-width: 1440px) {
  .mkt-cols { gap: 14px; }
  .mkt-col { padding: 16px 14px; }
  .mkt-row { grid-template-columns: 14px minmax(0, 1fr) auto 54px; gap: 8px; font-size: 14px; }
  .mkt-row .pair { gap: 7px; }
  .mkt-row .chg { font-size: 13px; }
}
@media (max-width: 1180px) and (min-width: 981px) {
  .mkt-cols { grid-template-columns: minmax(0, 1fr); }
}
