/*!
 * Bitcovix design system — exchange-style dark UI.
 * Brand colour comes from the Bitcovix logo (#FE7C24). No third-party brand assets.
 * Naming: bx-<component>, bx-<component>__<part>, bx-<component>--<variant>.
 */
:root {
  --bx-bg: #0b0d12;
  --bx-bg-2: #101319;
  --bx-panel: #15181f;
  --bx-panel-2: #1b1f28;
  --bx-panel-3: #232834;
  --bx-line: #252a35;
  --bx-line-2: #303644;
  --bx-text: #eaecef;
  --bx-text-2: #a7adbb;
  --bx-muted: #6f7686;
  --bx-brand: #fe7c24;
  --bx-brand-2: #ff9a52;
  --bx-brand-ink: #1a0d03;
  --bx-brand-soft: rgba(254, 124, 36, .12);
  --bx-up: #20b26c;
  --bx-up-soft: rgba(32, 178, 108, .12);
  --bx-down: #ef454a;
  --bx-down-soft: rgba(239, 69, 74, .12);
  --bx-warn: #f0b90b;
  --bx-warn-soft: rgba(240, 185, 11, .12);
  --bx-info: #3c8cf6;
  --bx-info-soft: rgba(60, 140, 246, .12);
  --bx-radius: 8px;
  --bx-radius-lg: 12px;
  --bx-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --bx-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bx-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --bx-header-h: 56px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bx-bg); color: var(--bx-text);
  font: 14px/1.5 var(--bx-font); -webkit-font-smoothing: antialiased;
}
a { color: var(--bx-brand); text-decoration: none; }
a:hover { color: var(--bx-brand-2); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 600; }
h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 17px; } h4 { font-size: 15px; }
p { margin: 0 0 .75rem; }
hr { border: 0; border-top: 1px solid var(--bx-line); margin: 16px 0; }
code, .mono { font-family: var(--bx-mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; font-family: var(--bx-mono); }
::selection { background: var(--bx-brand); color: var(--bx-brand-ink); }
:focus-visible { outline: 2px solid var(--bx-brand); outline-offset: 2px; }

/* ---------- utilities ---------- */
.text-up { color: var(--bx-up) !important; }
.text-down { color: var(--bx-down) !important; }
.text-muted { color: var(--bx-muted) !important; }
.text-2 { color: var(--bx-text-2) !important; }
.text-brand { color: var(--bx-brand) !important; }
.text-warn { color: var(--bx-warn) !important; }
.text-right { text-align: right; } .text-center { text-align: center; }
.small { font-size: 12px; } .tiny { font-size: 11px; } .big { font-size: 20px; } .huge { font-size: 30px; font-weight: 700; }
.bold { font-weight: 600; } .nowrap { white-space: nowrap; } .break { word-break: break-all; }
.flex { display: flex; } .flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; } .items-end { align-items: flex-end; } .justify-between { justify-content: space-between; } .justify-end { justify-content: flex-end; }
.wrap { flex-wrap: wrap; } .grow { flex: 1 1 auto; min-width: 0; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-main { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.bx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px;
  border: 1px solid var(--bx-line-2); border-radius: var(--bx-radius); background: var(--bx-panel-2); color: var(--bx-text);
  font: 500 14px/1 var(--bx-font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.bx-btn:hover { background: var(--bx-panel-3); color: var(--bx-text); }
.bx-btn:disabled, .bx-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.bx-btn--primary { background: var(--bx-brand); border-color: var(--bx-brand); color: var(--bx-brand-ink); font-weight: 600; }
.bx-btn--primary:hover { background: var(--bx-brand-2); border-color: var(--bx-brand-2); color: var(--bx-brand-ink); }
.bx-btn--up { background: var(--bx-up); border-color: var(--bx-up); color: #fff; }
.bx-btn--up:hover { background: #23c477; color: #fff; }
.bx-btn--down { background: var(--bx-down); border-color: var(--bx-down); color: #fff; }
.bx-btn--down:hover { background: #ff5a5f; color: #fff; }
.bx-btn--ghost { background: transparent; }
.bx-btn--link { background: none; border: 0; padding: 0; height: auto; color: var(--bx-brand); }
.bx-btn--sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.bx-btn--lg { height: 44px; padding: 0 22px; font-size: 15px; }
.bx-btn--block { width: 100%; }
.bx-icon-btn { background: none; border: 0; color: var(--bx-text-2); cursor: pointer; padding: 6px; border-radius: 6px; display: inline-flex; position: relative; }
.bx-icon-btn:hover { color: var(--bx-text); background: var(--bx-panel-2); }
form.inline { display: inline; }

/* ---------- header ---------- */
.bx-header {
  position: sticky; top: 0; z-index: 50; height: var(--bx-header-h); display: flex; align-items: center; gap: 24px;
  padding: 0 20px; background: rgba(11, 13, 18, .96); border-bottom: 1px solid var(--bx-line); backdrop-filter: blur(8px);
}
.bx-logo { display: flex; align-items: center; gap: 8px; color: var(--bx-text); font-weight: 800; letter-spacing: .06em; font-size: 17px; }
.bx-logo img { width: 30px; height: 30px; }
.bx-logo:hover { color: var(--bx-text); }
.bx-logo b { color: var(--bx-brand); font-weight: 800; }
.bx-nav { display: flex; align-items: center; gap: 2px; height: 100%; }
.bx-nav a { display: flex; align-items: center; height: 100%; padding: 0 12px; color: var(--bx-text-2); font-weight: 500; border-bottom: 2px solid transparent; }
.bx-nav a:hover { color: var(--bx-text); }
.bx-nav a.is-active { color: var(--bx-text); border-bottom-color: var(--bx-brand); }
.bx-header__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bx-badge-dot { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bx-down); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.bx-burger { display: none; }
@media (max-width: 980px) {
  .bx-burger { display: inline-flex; }
  .bx-nav { position: fixed; inset: var(--bx-header-h) 0 auto 0; flex-direction: column; height: auto; background: var(--bx-bg-2); border-bottom: 1px solid var(--bx-line); padding: 8px 0; display: none; }
  .bx-nav.is-open { display: flex; }
  .bx-nav a { width: 100%; height: 44px; padding: 0 20px; border-bottom: 0; }
  .bx-nav a.is-active { border-left: 3px solid var(--bx-brand); }
  .bx-header__right .hide-sm { display: none; }
}

/* ---------- dropdown (details) ---------- */
.bx-dropdown { position: relative; }
.bx-dropdown > summary { list-style: none; cursor: pointer; }
.bx-dropdown > summary::-webkit-details-marker { display: none; }
.bx-dropdown__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; z-index: 60; padding: 6px;
  background: var(--bx-panel); border: 1px solid var(--bx-line-2); border-radius: var(--bx-radius-lg); box-shadow: var(--bx-shadow);
  transform-origin: top right;
}
details.bx-dropdown[open]:not(.is-closing) > .bx-dropdown__menu {
  animation: bx-navdrop-in .18s ease forwards;
}
details.bx-dropdown.is-closing > .bx-dropdown__menu {
  animation: bx-navdrop-out .16s ease forwards;
}
.bx-dropdown__menu > a, .bx-dropdown__menu > button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; color: var(--bx-text); border-radius: 6px; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.bx-dropdown__menu > a:hover, .bx-dropdown__menu > button:hover { background: var(--bx-panel-2); }
.bx-dropdown__head { padding: 10px; border-bottom: 1px solid var(--bx-line); margin-bottom: 6px; }
.bx-dropdown__badges { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bx-dropdown__badges a { display: inline-flex; width: auto; padding: 0; color: inherit; }
.bx-notif { display: block !important; padding: 10px !important; }
.bx-notif.is-unread { background: var(--bx-brand-soft); }
.bx-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--bx-brand-soft); color: var(--bx-brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; text-transform: uppercase; font-size: 13px; overflow: hidden; }
.bx-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- ticker strip ---------- */
.bx-ticker { display: flex; gap: 28px; overflow-x: auto; padding: 8px 20px; border-bottom: 1px solid var(--bx-line); background: var(--bx-bg-2); font-size: 12px; scrollbar-width: none; }
.bx-ticker::-webkit-scrollbar { display: none; }
.bx-ticker a { display: flex; gap: 8px; color: var(--bx-text-2); white-space: nowrap; }
.bx-ticker a b { color: var(--bx-text); font-weight: 600; }

/* ---------- page shell ---------- */
.bx-main { padding: 24px; max-width: 1440px; margin: 0 auto; }
.bx-main--full { max-width: none; padding: 0; }
.bx-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.bx-page-head h1 { margin: 0; font-size: 24px; }
.bx-page-head p { margin: 4px 0 0; color: var(--bx-text-2); }
.bx-uid-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: 1.3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.bx-uid-copy:hover { color: var(--bx-brand); }
.bx-uid-copy:focus-visible { outline: 2px solid var(--bx-brand); outline-offset: 2px; border-radius: 4px; }
.bx-crumbs { font-size: 12px; color: var(--bx-muted); margin-bottom: 6px; }
.bx-crumbs a { color: var(--bx-muted); }
.bx-with-side { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
.bx-side-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--bx-header-h) + 16px); align-self: start; }
.bx-side-nav__title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--bx-muted); padding: 12px 12px 6px; }
.bx-side-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--bx-radius); color: var(--bx-text-2); }
.bx-side-nav a:hover { background: var(--bx-panel); color: var(--bx-text); }
.bx-side-nav a.is-active { background: var(--bx-panel-2); color: var(--bx-text); font-weight: 600; }
@media (max-width: 900px) {
  .bx-with-side { grid-template-columns: 1fr; }
  .bx-side-nav { position: static; flex-direction: row; overflow-x: auto; }
  .bx-side-nav__title { display: none; }
  .bx-side-nav a { white-space: nowrap; }
  .bx-main { padding: 16px; }
}

/* ---------- cards ---------- */
.bx-card { background: var(--bx-panel); border: 1px solid var(--bx-line); border-radius: var(--bx-radius-lg); }
.bx-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--bx-line); }
.bx-card__head h3, .bx-card__head h2 { margin: 0; font-size: 15px; }
.bx-card__body { padding: 18px; }
.bx-card__body--flush { padding: 0; }
.bx-card__foot { padding: 12px 18px; border-top: 1px solid var(--bx-line); }
.bx-card--brand { border-color: rgba(254, 124, 36, .45); background: linear-gradient(160deg, rgba(254, 124, 36, .10), transparent 55%), var(--bx-panel); }
:not(.grid) > .bx-card + .bx-card, .bx-stack > * + * { margin-top: 16px; }

/* ---------- stat blocks ---------- */
.bx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--bx-line); border: 1px solid var(--bx-line); border-radius: var(--bx-radius-lg); overflow: hidden; }
.bx-stat { background: var(--bx-panel); padding: 16px 18px; }
.bx-stat__label { font-size: 12px; color: var(--bx-muted); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.bx-stat__value { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bx-stat__sub { font-size: 12px; color: var(--bx-text-2); margin-top: 2px; }
.bx-balance { font-size: 32px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.bx-balance small { font-size: 15px; color: var(--bx-text-2); font-weight: 500; margin-left: 4px; }

/* ---------- tables ---------- */
.bx-table-wrap { overflow-x: auto; }
.bx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bx-table th { text-align: left; font-weight: 500; color: var(--bx-muted); padding: 10px 14px; border-bottom: 1px solid var(--bx-line); white-space: nowrap; font-size: 12px; }
.bx-table td { padding: 11px 14px; border-bottom: 1px solid var(--bx-line); vertical-align: middle; }
.bx-table tr:last-child td { border-bottom: 0; }
.bx-table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.bx-table .r { text-align: right; } .bx-table .c { text-align: center; }
.bx-table--compact td, .bx-table--compact th { padding: 6px 10px; }
.bx-coin { display: flex; align-items: center; gap: 10px; }
.bx-coin__icon { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; background: var(--bx-panel-3); color: var(--bx-text); flex: 0 0 auto; }
.bx-coin b { font-weight: 600; } .bx-coin span { color: var(--bx-muted); font-size: 12px; }

/* ---------- pills, badges ---------- */
.bx-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 500; background: var(--bx-panel-3); color: var(--bx-text-2); white-space: nowrap; }
.bx-pill--up { background: var(--bx-up-soft); color: var(--bx-up); }
.bx-pill--down { background: var(--bx-down-soft); color: var(--bx-down); }
.bx-pill--warn { background: var(--bx-warn-soft); color: var(--bx-warn); }
.bx-pill--info { background: var(--bx-info-soft); color: var(--bx-info); }
.bx-pill--brand { background: var(--bx-brand-soft); color: var(--bx-brand); }
.bx-mode { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.bx-mode::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bx-mode--paper { background: var(--bx-info-soft); color: var(--bx-info); }
.bx-mode--live { background: var(--bx-up-soft); color: var(--bx-up); }
.bx-mode--live::before { animation: bx-pulse 1.6s infinite; }
.bx-mode--off { background: var(--bx-panel-3); color: var(--bx-muted); }
@keyframes bx-pulse { 50% { opacity: .25; } }
.bx-tag { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 11px; background: var(--bx-panel-3); color: var(--bx-text-2); }

/* ---------- forms ---------- */
.bx-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.bx-field > label, .bx-label { font-size: 13px; color: var(--bx-text-2); font-weight: 500; }
.bx-hint { font-size: 12px; color: var(--bx-muted); }
.bx-error { font-size: 12px; color: var(--bx-down); }
/* Google reCAPTCHA — modern, left-aligned with form fields, responsive scale on narrow screens */
.bx-captcha {
  --bx-captcha-w: 304px;
  --bx-captcha-h: 78px;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 16px;
  overflow: visible;
  line-height: 0;
  min-height: var(--bx-captcha-h);
}
.bx-captcha.mb-3 { margin-bottom: 16px !important; }
.bx-captcha .g-recaptcha {
  display: inline-block;
  max-width: none;
  transform-origin: left top;
}
.bx-captcha .g-recaptcha > div { margin: 0 !important; }
.bx-captcha iframe {
  border: 0 !important;
  outline: none;
}
/* Dark theme: clip Google's light iframe chrome (bottom/right) without cropping controls */
.bx-captcha--dark {
  width: 298px;
  max-width: 100%;
  height: 74px;
  min-height: 74px;
  background: #222;
  border: 0;
  border-radius: 2px;
  box-shadow: none;
  outline: none !important;
  overflow: hidden;
}
.bx-captcha--dark .g-recaptcha {
  margin: -2px 0 0 -3px;
  background: #222 !important;
}
.bx-captcha--dark .g-recaptcha > div,
.bx-captcha--dark .g-recaptcha iframe {
  background: #222 !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}
.bx-captcha.is-scaled {
  overflow: hidden;
}
.bx-captcha #g-recaptcha-error,
.bx-captcha + #g-recaptcha-error,
#g-recaptcha-error {
  display: block;
  margin-top: 8px;
  line-height: 1.4;
  font-size: 12px;
  color: var(--bx-down);
}
.bx-input, .bx-select, .bx-textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--bx-line-2); border-radius: var(--bx-radius);
  background: var(--bx-bg-2); color: var(--bx-text); font: 14px var(--bx-font); transition: border-color .15s;
}
.bx-textarea { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.bx-input:hover, .bx-select:hover, .bx-textarea:hover { border-color: var(--bx-muted); }
.bx-input:focus, .bx-select:focus, .bx-textarea:focus { outline: none; border-color: var(--bx-brand); }
.bx-input.is-invalid, .bx-select.is-invalid, .bx-textarea.is-invalid { border-color: var(--bx-down); }
.bx-input[readonly] { color: var(--bx-text-2); }
.bx-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--bx-muted) 50%), linear-gradient(135deg, var(--bx-muted) 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.bx-input-group { display: flex; align-items: stretch; border: 1px solid var(--bx-line-2); border-radius: var(--bx-radius); background: var(--bx-bg-2); }
.bx-input-group:focus-within { border-color: var(--bx-brand); }
.bx-input-group .bx-input { border: 0; background: transparent; }
.bx-input-group__addon { display: flex; align-items: center; padding: 0 12px; color: var(--bx-muted); font-size: 13px; white-space: nowrap; }
.bx-input-group .bx-btn { border: 0; border-radius: 0 var(--bx-radius) var(--bx-radius) 0; height: auto; }
.bx-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 13px; color: var(--bx-text-2); }
.bx-check input { margin-top: 3px; accent-color: var(--bx-brand); width: 16px; height: 16px; flex: 0 0 auto; }
.bx-radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.bx-radio-card { position: relative; display: block; padding: 14px; border: 1px solid var(--bx-line-2); border-radius: var(--bx-radius); cursor: pointer; background: var(--bx-bg-2); }
.bx-radio-card input { position: absolute; opacity: 0; }
.bx-radio-card:has(input:checked) { border-color: var(--bx-brand); background: var(--bx-brand-soft); }
.bx-radio-card:has(input:focus-visible) { outline: 2px solid var(--bx-brand); }
.bx-range { width: 100%; accent-color: var(--bx-brand); }
.bx-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.bx-form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .bx-form-row--3 { grid-template-columns: 1fr; }
}

/* ---------- profile avatar dropzone ---------- */
.bx-profile-form { max-width: 100%; }
.bx-avatar-drop {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px dashed var(--bx-line-2);
  border-radius: var(--bx-radius-lg);
  background: var(--bx-bg-2);
  transition: border-color .15s, background .15s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bx-avatar-drop.is-dragover {
  border-color: var(--bx-brand);
  background: var(--bx-brand-soft);
}
.bx-avatar-drop__preview { flex: 0 0 auto; }
.bx-avatar-drop__preview .bx-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bx-line-2);
  display: block;
  background: var(--bx-panel-3);
}
.bx-avatar-drop__body { min-width: 0; flex: 1 1 auto; }
.bx-avatar-drop__title { font-size: 14px; font-weight: 600; color: var(--bx-text); margin: 0 0 4px; }
.bx-avatar-drop__text { margin: 0 0 10px; font-size: 12px; color: var(--bx-muted); line-height: 1.4; }
.bx-avatar-drop__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bx-avatar-drop__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.bx-avatar-drop { position: relative; }
@media (max-width: 560px) {
  .bx-avatar-drop {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .bx-avatar-drop__preview { display: flex; justify-content: center; }
  .bx-avatar-drop__actions { justify-content: center; }
}
.bx-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: 0 0 auto; }
.bx-switch input { opacity: 0; width: 0; height: 0; }
.bx-switch span { position: absolute; inset: 0; background: var(--bx-panel-3); border-radius: 11px; transition: .2s; cursor: pointer; }
.bx-switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.bx-switch input:checked + span { background: var(--bx-brand); }
.bx-switch input:checked + span::before { transform: translateX(16px); }

/* ---------- alerts ---------- */
.bx-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--bx-radius); border: 1px solid var(--bx-line-2); background: var(--bx-panel-2); font-size: 13px; margin-bottom: 16px; }
.bx-alert--up { border-color: rgba(32, 178, 108, .35); background: var(--bx-up-soft); }
.bx-alert--down { border-color: rgba(239, 69, 74, .35); background: var(--bx-down-soft); }
.bx-alert--warn { border-color: rgba(240, 185, 11, .35); background: var(--bx-warn-soft); }
.bx-alert--info { border-color: rgba(60, 140, 246, .35); background: var(--bx-info-soft); }
.bx-alert ul { margin: 0; padding-left: 18px; }
.bx-alert b { color: var(--bx-text); }

/* ---------- tabs ---------- */
.bx-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--bx-line); margin-bottom: 16px; overflow-x: auto; }
.bx-tabs a, .bx-tabs button { padding: 10px 14px; color: var(--bx-text-2); background: none; border: 0; border-bottom: 2px solid transparent; font: 500 14px var(--bx-font); cursor: pointer; white-space: nowrap; }
.bx-tabs a:hover, .bx-tabs button:hover { color: var(--bx-text); }
.bx-tabs .is-active { color: var(--bx-text); border-bottom-color: var(--bx-brand); }
.bx-tabs--pill { border: 0; gap: 6px; }
.bx-tabs--pill a, .bx-tabs--pill button { border: 0; border-radius: 6px; padding: 6px 12px; font-size: 13px; }
.bx-tabs--pill .is-active { background: var(--bx-panel-3); }
[data-tab-panel]:not(.is-active) { display: none; }

/* ---------- empty state ---------- */
.bx-empty { text-align: center; padding: 40px 20px; color: var(--bx-muted); }
.bx-empty svg { width: 48px; height: 48px; margin: 0 auto 10px; opacity: .5; }
.bx-empty b { display: block; color: var(--bx-text-2); margin-bottom: 4px; }

/* ---------- steps / checklist ---------- */
.bx-steps { display: flex; flex-direction: column; gap: 4px; }
.bx-step { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--bx-radius); color: var(--bx-text); }
.bx-step:hover { background: var(--bx-panel-2); color: var(--bx-text); }
.bx-step__dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--bx-line-2); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--bx-muted); }
.bx-step.is-done .bx-step__dot { border-color: var(--bx-up); background: var(--bx-up); color: #fff; }
.bx-step.is-done .bx-step__title { color: var(--bx-text-2); text-decoration: line-through; }
.bx-step__desc { font-size: 12px; color: var(--bx-muted); }
.bx-progress { height: 6px; border-radius: 3px; background: var(--bx-panel-3); overflow: hidden; }
.bx-progress > span { display: block; height: 100%; background: var(--bx-brand); border-radius: 3px; }
.bx-progress--up > span { background: var(--bx-up); }

/* ---------- key/value list ---------- */
.bx-kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; margin: 0; }
.bx-kv dt { color: var(--bx-muted); }
.bx-kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.bx-kv--left dd { text-align: left; }

/* ---------- rewards Team card (expandable paid L/R) ---------- */
.bx-team-kv { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.bx-team-kv__row { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; align-items: baseline; }
.bx-team-kv__label { color: var(--bx-muted); }
.bx-team-kv__value { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.bx-team-paid { margin: 0; }
.bx-team-paid__summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    align-items: baseline;
    cursor: pointer;
    list-style: none;
}
.bx-team-paid__summary::-webkit-details-marker { display: none; }
.bx-team-paid__summary::marker { content: ''; }
.bx-team-paid__label { color: var(--bx-muted); display: inline-flex; align-items: center; gap: 6px; }
.bx-team-paid__marker {
    display: inline-flex;
    width: 12px;
    justify-content: center;
    color: var(--bx-text-2);
    font-weight: 600;
    line-height: 1;
}
.bx-team-paid__marker::before { content: '+'; }
.bx-team-paid[open] > .bx-team-paid__summary .bx-team-paid__marker::before { content: '−'; }
.bx-team-paid__value { text-align: right; font-variant-numeric: tabular-nums; color: var(--bx-text); }
.bx-team-paid__plans {
    margin-top: 8px;
    padding: 8px 0 2px 14px;
    border-left: 1px solid var(--bx-line);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bx-team-paid__plan {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    align-items: baseline;
}
.bx-team-paid__plan-label { color: var(--bx-muted); padding-left: 4px; }
.bx-team-paid__plan-value { text-align: right; font-variant-numeric: tabular-nums; }
.bx-team-paid__empty { padding-left: 4px; }

/* ---------- modal (dialog) ---------- */
.bx-modal { border: 1px solid var(--bx-line-2); border-radius: var(--bx-radius-lg); background: var(--bx-panel); color: var(--bx-text); padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: var(--bx-shadow); }
.bx-modal::backdrop { background: rgba(0, 0, 0, .65); }
.bx-modal__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--bx-line); }
.bx-modal__head h3 { margin: 0; }
.bx-modal__body { padding: 20px; max-height: 70vh; overflow: auto; }
.bx-modal__foot { padding: 14px 20px; border-top: 1px solid var(--bx-line); display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- toast ---------- */
.bx-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.bx-toast { min-width: 280px; max-width: 380px; padding: 12px 16px; border-radius: var(--bx-radius); background: var(--bx-panel-2); border: 1px solid var(--bx-line-2); border-left: 3px solid var(--bx-up); box-shadow: var(--bx-shadow); font-size: 13px; animation: bx-in .2s ease-out; }
.bx-toast--down { border-left-color: var(--bx-down); }
@keyframes bx-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- pagination ---------- */
.bx-pager { display: flex; gap: 4px; justify-content: flex-end; align-items: center; padding: 12px 18px; flex-wrap: wrap; }
.bx-pager a, .bx-pager span { min-width: 32px; height: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--bx-text-2); font-size: 13px; }
.bx-pager a:hover { background: var(--bx-panel-2); color: var(--bx-text); }
.bx-pager .is-active { background: var(--bx-brand-soft); color: var(--bx-brand); font-weight: 600; }
.bx-pager .is-disabled { opacity: .35; }
.bx-pager__info { margin-right: auto; color: var(--bx-muted); font-size: 12px; }

/* ---------- markets ---------- */
.bx-market-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.bx-market-card { padding: 16px; border-radius: var(--bx-radius-lg); background: var(--bx-panel); border: 1px solid var(--bx-line); color: var(--bx-text); display: block; }
.bx-market-card:hover { border-color: var(--bx-line-2); color: var(--bx-text); }
.bx-market-card__price { font-size: 20px; font-weight: 600; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.flash-up { animation: bx-flash-up .8s; } .flash-down { animation: bx-flash-down .8s; }
@keyframes bx-flash-up { from { background: var(--bx-up-soft); } }
@keyframes bx-flash-down { from { background: var(--bx-down-soft); } }

/* ---------- terminal ---------- */
.bx-terminal { display: grid; grid-template-columns: 280px minmax(0, 1fr) 320px; grid-template-rows: auto minmax(420px, 1fr) auto; gap: 1px; background: var(--bx-line); min-height: calc(100vh - var(--bx-header-h)); }
.bx-terminal > * { background: var(--bx-bg); min-width: 0; }
.bx-term-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 28px; padding: 10px 16px; flex-wrap: wrap; }
.bx-term-bar__sym { font-size: 18px; font-weight: 700; }
.bx-term-bar__stat { display: flex; flex-direction: column; font-size: 12px; }
.bx-term-bar__stat span { color: var(--bx-muted); font-size: 11px; }
.bx-term-list { grid-row: 2 / 4; display: flex; flex-direction: column; }
.bx-term-list .bx-input { margin: 10px; width: auto; height: 32px; font-size: 13px; }
.bx-term-list__rows { overflow-y: auto; flex: 1; }
.bx-term-list a { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 7px 12px; font-size: 12px; color: var(--bx-text); }
.bx-term-list a:hover { background: var(--bx-panel); }
.bx-term-list a.is-active { background: var(--bx-panel-2); }
.bx-term-list a .bot { color: var(--bx-brand); font-size: 10px; }
.bx-term-chart { position: relative; display: flex; flex-direction: column; grid-column: 2; grid-row: 2; }
.bx-term-chart__tools { display: flex; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--bx-line); align-items: center; }
.bx-term-chart__tools button { background: none; border: 0; color: var(--bx-muted); padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.bx-term-chart__tools button.is-active, .bx-term-chart__tools button:hover { color: var(--bx-text); background: var(--bx-panel-2); }
.bx-chart { flex: 1; min-height: 380px; }
.bx-term-side { grid-row: 2 / 4; grid-column: 3; display: flex; flex-direction: column; overflow-y: auto; }
.bx-term-side section { padding: 14px; border-bottom: 1px solid var(--bx-line); }
.bx-term-side h4 { font-size: 13px; margin-bottom: 10px; }
.bx-term-bottom { grid-column: 2; grid-row: 3; min-height: 260px; }
.bx-term-bottom .bx-tabs { padding: 0 10px; margin: 0; }
.bx-term-bottom__body { max-height: 320px; overflow: auto; }
@media (max-width: 1200px) { .bx-terminal { grid-template-columns: minmax(0, 1fr) 300px; } .bx-term-list { display: none; } .bx-term-chart, .bx-term-bottom { grid-column: 1; } .bx-term-side { grid-column: 2; } }
@media (max-width: 820px) { .bx-terminal { grid-template-columns: 1fr; grid-template-rows: auto; } .bx-term-chart, .bx-term-side, .bx-term-bottom { grid-column: 1; grid-row: auto; } }

/* ---------- coin picker / allocation ---------- */
.bx-coin-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.bx-coin-picker label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--bx-line-2); border-radius: var(--bx-radius); cursor: pointer; font-size: 13px; background: var(--bx-bg-2); }
.bx-coin-picker input { accent-color: var(--bx-brand); }
.bx-coin-picker label:has(input:checked) { border-color: var(--bx-brand); background: var(--bx-brand-soft); }
.bx-coin-picker label:has(input:disabled:not(:checked)) { opacity: .4; cursor: not-allowed; }
.bx-alloc { display: grid; grid-template-columns: 90px 1fr 70px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.bx-alloc .bx-input { height: 32px; text-align: right; padding: 0 8px; }

/* ---------- plans ---------- */
.bx-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.bx-plan { position: relative; display: flex; flex-direction: column; padding: 24px; border-radius: var(--bx-radius-lg); background: var(--bx-panel); border: 1px solid var(--bx-line); }
.bx-plan--featured { border-color: var(--bx-brand); background: linear-gradient(180deg, rgba(254, 124, 36, .10), transparent 45%), var(--bx-panel); }
.bx-plan--off { opacity: .6; }
.bx-plan__ribbon { position: absolute; top: 14px; right: 14px; }
.bx-plan__price { font-size: 34px; font-weight: 700; margin: 10px 0 2px; }
.bx-plan__price small { font-size: 14px; color: var(--bx-text-2); font-weight: 500; }
.bx-plan ul { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--bx-text-2); }
.bx-plan li::before { content: "✓"; color: var(--bx-up); margin-right: 8px; font-weight: 700; }
.bx-plan__foot { margin-top: auto; }
.bx-levels { width: 100%; font-size: 12px; border-collapse: collapse; margin: 8px 0 16px; }
.bx-levels td { padding: 5px 0; border-bottom: 1px dashed var(--bx-line); }
.bx-levels td:last-child { text-align: right; font-weight: 600; }

/* ---------- binary tree ---------- */
.bx-tree { display: grid; grid-template-columns: repeat(8, minmax(90px, 1fr)); gap: 24px 8px; overflow-x: auto; padding: 8px 0 16px; }
.bx-tree__node { position: relative; text-align: center; padding: 10px 6px; border-radius: var(--bx-radius); background: var(--bx-panel-2); border: 1px solid var(--bx-line-2); font-size: 12px; color: var(--bx-text); min-width: 0; }
.bx-tree__node:hover { border-color: var(--bx-brand); color: var(--bx-text); }
.bx-tree__node.is-empty { background: transparent; border-style: dashed; color: var(--bx-muted); }
.bx-tree__node.is-root { border-color: var(--bx-brand); }
.bx-tree__node .bx-avatar { margin: 0 auto 6px; }
.bx-tree__node b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-tree__node small { color: var(--bx-muted); display: block; }
.bx-tree__l1 { grid-column: 1 / -1; justify-self: center; width: 160px; }
.bx-tree__l2 { grid-column: span 4; justify-self: center; width: 150px; }
.bx-tree__l3 { grid-column: span 2; justify-self: center; width: 140px; }
.bx-tree__l4 { grid-column: span 1; }

/* ---------- auth ---------- */
.bx-auth { min-height: 100vh; display: grid; grid-template-columns: 1fr minmax(380px, 480px); }
.bx-auth__art { display: flex; flex-direction: column; justify-content: center; padding: 64px; background: radial-gradient(ellipse at 20% 30%, rgba(254, 124, 36, .18), transparent 60%), var(--bx-bg-2); border-right: 1px solid var(--bx-line); }
.bx-auth__art h1 { font-size: 40px; max-width: 520px; }
.bx-auth__art p { color: var(--bx-text-2); max-width: 480px; font-size: 16px; }
.bx-auth__panel { display: flex; flex-direction: column; justify-content: center; padding: 48px 40px; }
.bx-auth__panel h2 { font-size: 26px; }
@media (max-width: 900px) { .bx-auth { grid-template-columns: 1fr; } .bx-auth__art { display: none; } .bx-auth__panel { padding: 32px 20px; } }

/* ---------- public site ---------- */
.bx-hero { padding: 88px 24px 64px; text-align: center; background: radial-gradient(ellipse at 50% -10%, rgba(254, 124, 36, .22), transparent 60%); }
.bx-hero h1 { font-size: clamp(32px, 5vw, 56px); max-width: 900px; margin: 0 auto 16px; letter-spacing: -.02em; }
.bx-hero h1 em { color: var(--bx-brand); font-style: normal; }
.bx-hero p { font-size: 18px; color: var(--bx-text-2); max-width: 680px; margin: 0 auto 28px; }
.bx-section { padding: 56px 24px; max-width: 1200px; margin: 0 auto; }
.bx-section__head { text-align: center; margin-bottom: 32px; }
.bx-section__head p { color: var(--bx-text-2); }
.bx-feature { padding: 22px; border-radius: var(--bx-radius-lg); background: var(--bx-panel); border: 1px solid var(--bx-line); }
.bx-feature__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--bx-brand-soft); color: var(--bx-brand); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.bx-feature p { color: var(--bx-text-2); font-size: 13px; margin: 0; }
.bx-footer { border-top: 1px solid var(--bx-line); padding: 40px 24px; color: var(--bx-muted); font-size: 13px; background: var(--bx-bg-2); }
.bx-footer__inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.bx-footer h4 { color: var(--bx-text); font-size: 13px; }
.bx-footer a { display: block; color: var(--bx-muted); padding: 3px 0; }
.bx-footer a:hover { color: var(--bx-text); }
.bx-risk { max-width: 1200px; margin: 24px auto 0; padding-top: 16px; border-top: 1px solid var(--bx-line); font-size: 12px; line-height: 1.6; }
@media (max-width: 760px) { .bx-footer__inner { grid-template-columns: 1fr 1fr; } }
.bx-prose { max-width: 820px; color: var(--bx-text-2); line-height: 1.7; }
.bx-prose h2, .bx-prose h3 { color: var(--bx-text); margin-top: 28px; }
.bx-faq details { border-bottom: 1px solid var(--bx-line); padding: 16px 0; }
.bx-faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.bx-faq summary::after { content: "+"; color: var(--bx-brand); font-size: 18px; }
.bx-faq details[open] summary::after { content: "−"; }
.bx-faq p { margin: 10px 0 0; color: var(--bx-text-2); }

/* ---------- admin shell ---------- */
.bx-admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--bx-bg-2) 240px, var(--bx-line) 240px, var(--bx-line) 241px, var(--bx-bg) 241px); }
.bx-admin__side { background: var(--bx-bg-2); border-right: 1px solid var(--bx-line); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding-bottom: 24px; }
.bx-admin__brand { height: var(--bx-header-h); display: flex; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--bx-line); }
.bx-admin__side .bx-side-nav { position: static; padding: 8px; }
.bx-admin__side .bx-side-nav a { padding: 8px 12px; font-size: 13px; }
.bx-admin__top { height: var(--bx-header-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--bx-line); background: var(--bx-bg); position: sticky; top: 0; z-index: 40; }
.bx-admin .bx-main { max-width: none; }
@media (max-width: 980px) {
  .bx-admin { grid-template-columns: 1fr; background: var(--bx-bg); }
  .bx-admin__side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 70; transform: translateX(-100%); transition: transform .2s; }
  .bx-admin__side.is-open { transform: none; }
}

/* ---------- misc ---------- */
.bx-qr { background: #fff; padding: 10px; border-radius: var(--bx-radius); display: inline-block; line-height: 0; }
.bx-qr img, .bx-qr svg { width: 168px; height: 168px; }
.bx-copy { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: var(--bx-bg-2); border: 1px solid var(--bx-line-2); border-radius: var(--bx-radius); font-family: var(--bx-mono); font-size: 12px; word-break: break-all; }
.bx-copy span { flex: 1; }
.bx-divider-label { display: flex; align-items: center; gap: 12px; color: var(--bx-muted); font-size: 12px; margin: 16px 0; }
.bx-divider-label::before, .bx-divider-label::after { content: ""; flex: 1; border-top: 1px solid var(--bx-line); }
.bx-chat { display: flex; flex-direction: column; gap: 12px; }
.bx-chat__msg { max-width: 80%; padding: 12px 14px; border-radius: var(--bx-radius-lg); background: var(--bx-panel-2); font-size: 13px; white-space: pre-wrap; }
.bx-chat__msg.is-me { align-self: flex-end; background: var(--bx-brand-soft); }
.bx-chat__meta { font-size: 11px; color: var(--bx-muted); margin-bottom: 4px; white-space: normal; }
.bx-legend { display: flex; gap: 16px; font-size: 12px; color: var(--bx-muted); flex-wrap: wrap; }
.bx-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.bx-skeleton { background: linear-gradient(90deg, var(--bx-panel-2), var(--bx-panel-3), var(--bx-panel-2)); background-size: 200% 100%; animation: bx-sk 1.4s infinite; border-radius: 4px; color: transparent !important; }
@keyframes bx-sk { to { background-position: -200% 0; } }
.bx-month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
.bx-month-grid div { padding: 10px; border-radius: 6px; background: var(--bx-panel-2); text-align: center; font-size: 12px; }
.bx-month-grid div b { display: block; font-size: 14px; margin-top: 2px; }
.bx-perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 16px; }
.bx-footer a.bx-logo { display: flex; }
.grid > *, .bx-with-side > *, .bx-stack > * { min-width: 0; }
@media (max-width: 760px) { .bx-page-head h1 { font-size: 20px; } .bx-balance { font-size: 26px; } .bx-header { gap: 12px; padding: 0 12px; } }
