/* AvioBull design system — dark navy, electric blue/cyan, green up / red down. */
:root {
  --bg: #04070f;
  --bg-2: #070c18;
  --panel: #0b1324;
  --panel-2: #101a30;
  --line: #18233b;
  --line-2: #22304d;
  --text: #e9eefb;
  --muted: #8693ad;
  --dim: #5d6a85;
  --blue: #1e6bff;
  --blue-2: #3d8bff;
  --cyan: #26d0f0;
  --up: #17c27f;
  --up-bg: rgba(23, 194, 127, .14);
  --down: #f0464f;
  --down-bg: rgba(240, 70, 79, .14);
  --warn: #f2b33d;
  --warn-bg: rgba(242, 179, 61, .13);
  --info-bg: rgba(38, 208, 240, .12);
  --r-s: 8px;
  --r: 12px;
  --r-l: 18px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Manrope", system-ui, sans-serif;
  --nav-h: 64px;
  color-scheme: dark;
}
*, *::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; font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-2); text-decoration: none; }
a:hover { color: var(--cyan); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.up { color: var(--up); }
.down { color: var(--down); }
.neutral { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; letter-spacing: .02em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  font: 600 .92rem var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--blue); color: var(--text); }
.btn-primary { background: linear-gradient(180deg, var(--blue-2), var(--blue)); border-color: transparent; color: #fff; }
.btn-primary:hover { background: linear-gradient(180deg, #5a9dff, var(--blue-2)); color: #fff; }
.btn-buy { background: var(--up); border-color: transparent; color: #04140d; }
.btn-sell { background: var(--down); border-color: transparent; color: #fff; }
.btn-danger { background: transparent; border-color: var(--down); color: var(--down); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: .84rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: transparent; color: var(--text); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.dot-badge {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--down); color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center;
}
label { display: block; font-size: .84rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field { margin-bottom: 14px; }
.hint { font-size: .8rem; color: var(--dim); margin-top: 4px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url],
input[type=datetime-local], input[type=date], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); font: 500 .95rem var(--font); font-feature-settings: "tnum" 1;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(30, 107, 255, .2); }
input[type=file] { color: var(--muted); font-size: .88rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--text); font-weight: 500; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.input-group { display: flex; align-items: stretch; }
.input-group input { border-radius: var(--r) 0 0 var(--r); }
.input-group .suffix { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-2); border-left: 0; border-radius: 0 var(--r) var(--r) 0; background: var(--panel); color: var(--muted); font-size: .85rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 4px; margin: 0 0 16px; }
legend { padding: 0 6px; color: var(--muted); font-size: .84rem; font-weight: 700; }

/* ---------- Feedback ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); margin-bottom: 14px; font-size: .9rem; border: 1px solid; }
.flash-success { background: var(--up-bg); border-color: rgba(23,194,127,.35); }
.flash-error { background: var(--down-bg); border-color: rgba(240,70,79,.35); }
.flash-warning { background: var(--warn-bg); border-color: rgba(242,179,61,.35); }
.flash-info { background: var(--info-bg); border-color: rgba(38,208,240,.3); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--up-bg); color: var(--up); }
.badge-bad { background: var(--down-bg); color: var(--down); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-info { background: var(--info-bg); color: var(--cyan); }
.badge-muted { background: var(--panel-2); color: var(--muted); }
.pill-chg { display: inline-block; min-width: 76px; text-align: center; padding: 6px 10px; border-radius: 8px; font-weight: 700; font-size: .86rem; }
.pill-chg.up { background: var(--up); color: #032015; }
.pill-chg.down { background: var(--down); color: #fff; }
.pill-chg.neutral { background: var(--panel-2); color: var(--muted); }
.fresh { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; color: var(--muted); }
.fresh::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.fresh-live::before { background: var(--up); box-shadow: 0 0 0 3px rgba(23,194,127,.18); }
.fresh-stale::before { background: var(--warn); }
.fresh-closed::before { background: var(--muted); }
.fresh-unavailable::before { background: var(--down); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty .ic { width: 32px; height: 32px; color: var(--dim); margin: 0 auto 8px; display: block; }
.notice { padding: 12px 14px; border-radius: var(--r); background: var(--panel); border: 1px dashed var(--line-2); color: var(--muted); font-size: .88rem; }

/* ---------- Panels & tables ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; }
.panel + .panel { margin-top: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h2, .panel-head h3 { margin: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: .88rem; }
.t th { text-align: left; color: var(--dim); font-weight: 600; font-size: .78rem; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t .r { text-align: right; }
.t a.rowlink { color: var(--text); font-weight: 600; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.stat .label { font-size: .78rem; color: var(--muted); }
.stat .value { font-size: 1.25rem; font-weight: 700; font-family: var(--display); }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .88rem; white-space: nowrap; border: 1px solid transparent; background: none; cursor: pointer; font-family: var(--font); }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--text); color: var(--bg); }
.tabs-line .tab { border-radius: 0; padding: 6px 4px; margin-right: 12px; }
.tabs-line .tab.is-active { background: none; color: var(--text); border-bottom: 2px solid var(--blue); }
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 14px; font-size: .88rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--line-2); margin-left: 6px; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid var(--bg); }
.timeline li:last-child { border-left-color: transparent; }
meter { width: 100%; height: 8px; }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .3em; }
dialog.modal { border: 1px solid var(--line-2); border-radius: var(--r-l); background: var(--panel); color: var(--text); padding: 0; width: min(440px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(2, 5, 12, .72); }
.modal-body { padding: 18px; }
.modal-foot { display: flex; gap: 10px; padding: 0 18px 18px; }
.modal-foot .btn { flex: 1; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.brand img.wordmark { height: 30px; width: auto; }
.brand img.mark { height: 34px; width: 34px; object-fit: contain; }

/* ---------- Public site ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(4, 7, 15, .86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 20px; height: 64px; padding: 0 20px; }
.site-nav { display: flex; gap: 4px; flex: 1; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: .9rem; padding: 8px 10px; border-radius: 8px; }
.site-nav a:hover, .site-nav a.is-active { color: var(--text); background: var(--panel); }
.site-actions { display: flex; gap: 8px; align-items: center; }
.menu-toggle { display: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head p { color: var(--muted); }
.hero { padding: 56px 0 40px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.04; letter-spacing: -.03em; margin-bottom: 18px; }
.hero .lede { font-size: 1.08rem; color: var(--muted); max-width: 52ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 18px; }
.hero-cta .btn { min-height: 48px; padding: 0 22px; }
.trust-row { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .86rem; }
.trust-row span { display: inline-flex; gap: 6px; align-items: center; }
.board { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line-2); border-radius: 22px; padding: 18px; box-shadow: 0 30px 80px -40px rgba(30, 107, 255, .55); }
.board-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.board-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line); }
.board-row:first-of-type { border-top: 0; }
.sym { font-weight: 700; }
.sym small { color: var(--dim); font-weight: 600; }
.ticker { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.tick-card { flex: 0 0 auto; min-width: 180px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; }
.feature .ic { width: 26px; height: 26px; color: var(--cyan); margin-bottom: 12px; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }
.product-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.product { padding: 24px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; }
.product p { color: var(--muted); flex: 1; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 10px 0 0; }
.risk-banner { border-top: 1px solid var(--line); background: var(--bg-2); padding: 14px 0; font-size: .8rem; color: var(--dim); }
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 24px; color: var(--muted); font-size: .88rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.footer-grid h4 { color: var(--text); font-size: .9rem; margin-bottom: 10px; }
.footer-grid a { display: block; color: var(--muted); padding: 3px 0; }
.page-head { padding: 40px 0 10px; }
.plan-card { display: flex; flex-direction: column; gap: 10px; }
.plan-card .price { font-family: var(--display); font-size: 1.6rem; font-weight: 700; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(800px 400px at 50% -10%, rgba(30, 107, 255, .2), transparent 70%); }
.auth-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; padding: 26px; }
.auth-card .brand { margin: 0 auto 18px; display: flex; justify-content: center; }
.auth-card h1 { font-size: 1.4rem; text-align: center; }
.auth-foot { text-align: center; margin-top: 14px; font-size: .88rem; color: var(--muted); }

/* ---------- App shell ---------- */
.app { min-height: 100vh; display: grid; grid-template-columns: 236px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: var(--bg-2); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .brand { padding: 4px 10px 18px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.side-link:hover { color: var(--text); background: var(--panel); }
.side-link.is-active { color: var(--text); background: var(--panel-2); box-shadow: inset 3px 0 0 var(--blue); }
.side-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.app-main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: rgba(4, 7, 15, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .brand-m { display: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; color: #fff; background: linear-gradient(135deg, var(--blue), var(--cyan)); flex: none; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input { border-radius: 999px; padding-left: 40px; min-height: 40px; background: var(--panel); border-color: var(--line); }
.search .ic { position: absolute; left: 13px; top: 10px; color: var(--muted); }
.search-results { position: absolute; top: 46px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; z-index: 40; }
.search-results a { display: flex; justify-content: space-between; padding: 10px 14px; color: var(--text); border-top: 1px solid var(--line); }
.search-results a:first-child { border-top: 0; }
.search-results a:hover, .search-results a.is-focus { background: var(--panel-2); }
.top-actions { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.content { padding: 18px 20px 40px; max-width: 1280px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: .9rem; cursor: pointer; font-family: var(--font); }
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

.balance { position: relative; overflow: hidden; }
.balance-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.balance .label { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.balance .label button { background: none; border: 0; color: var(--muted); padding: 2px; cursor: pointer; }
.balance .amount { font-family: var(--display); font-size: clamp(2rem, 7vw, 2.6rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 4px 0; }
.balance .amount small { font-size: .95rem; color: var(--muted); font-weight: 600; margin-left: 4px; font-family: var(--font); }
.balance .pnl { font-size: .92rem; color: var(--muted); }
.balance .split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .8rem; }
.balance .split b { display: block; color: var(--text); font-size: .95rem; }
.balance .btn-deposit { min-height: 46px; padding: 0 24px; font-size: 1rem; }
.is-masked .maskable { filter: blur(7px); user-select: none; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; margin: 18px 0; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--text); font-size: .8rem; font-weight: 600; text-align: center; }
.quick .qi { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); }
.quick .qi .ic { width: 24px; height: 24px; }
.quick a:hover .qi { border-color: var(--blue); color: var(--cyan); }

.cards2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.mcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; color: var(--text); display: block; }
.mcard:hover { border-color: var(--line-2); color: var(--text); }
.mcard .t { font-weight: 800; font-size: 1rem; display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.mcard .t .ic { width: 14px; height: 14px; color: var(--muted); }
.mcard .row { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .88rem; }
.mcard .chg { padding: 3px 7px; border-radius: 6px; font-weight: 700; font-size: .82rem; }
.mcard .chg.up { background: var(--up-bg); }
.mcard .chg.down { background: var(--down-bg); }
.coin { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; flex: none; color: #fff; background: var(--panel-2); border: 1px solid var(--line-2); }
.coin.c-crypto { background: linear-gradient(135deg, #f7931a, #c56d00); border: 0; }
.coin.c-forex { background: linear-gradient(135deg, #1e6bff, #0f3ea8); border: 0; }
.coin.c-commodities { background: linear-gradient(135deg, #e6b422, #9b7410); border: 0; color: #1d1400; }
.coin.c-indices { background: linear-gradient(135deg, #7c5cff, #4527c9); border: 0; }
.coin.c-stocks { background: linear-gradient(135deg, #26d0f0, #0f8fa8); border: 0; color: #00222b; }

.mlist { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 12px 14px 4px; }
.mrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); color: var(--text); }
.mrow:first-of-type { border-top: 0; }
.mrow:hover { color: var(--text); }
.mrow .name { min-width: 0; }
.mrow .name b { font-size: 1rem; }
.mrow .name b span { color: var(--dim); font-weight: 600; font-size: .86rem; }
.mrow .name .sub { color: var(--dim); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 8px; align-items: center; }
.mrow .px { text-align: right; font-weight: 700; font-size: 1rem; }
.lev { font-size: .7rem; padding: 1px 6px; border-radius: 5px; background: var(--panel-2); color: var(--muted); margin-left: 4px; vertical-align: 2px; }
.watch { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 4px; }
.watch.is-on { color: var(--warn); }

.bottom-nav { display: none; }

/* ---------- Trade ---------- */
.trade-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.trade-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.trade-head .px-big { font-family: var(--display); font-size: 1.8rem; font-weight: 700; }
.inst-select { max-width: 220px; }
.chart-box { position: relative; height: 340px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
.chart-box canvas { width: 100%; height: 100%; display: block; }
.chart-box .chart-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .9rem; text-align: center; padding: 20px; }
.side-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg-2); padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.side-toggle label { margin: 0; }
.side-toggle input { position: absolute; opacity: 0; }
.side-toggle span { display: block; text-align: center; padding: 9px; border-radius: 9px; font-weight: 800; color: var(--muted); cursor: pointer; }
.side-toggle input:checked + span.buy { background: var(--up); color: #03170e; }
.side-toggle input:checked + span.sell { background: var(--down); color: #fff; }
.side-toggle input:focus-visible + span { outline: 2px solid var(--cyan); }
.est { background: var(--bg-2); border-radius: var(--r); padding: 12px; font-size: .86rem; margin-bottom: 14px; }
.est div { display: flex; justify-content: space-between; padding: 3px 0; }
.est span { color: var(--muted); }
.lev-row { display: flex; gap: 10px; align-items: center; }
.lev-row input[type=range] { flex: 1; accent-color: var(--blue); }
.lev-row output { min-width: 44px; text-align: right; font-weight: 800; }

/* ---------- Admin ---------- */
.admin .sidebar { width: 236px; overflow-y: auto; }
.admin .side-group { font-size: .7rem; color: var(--dim); font-weight: 800; padding: 12px 12px 4px; letter-spacing: .04em; }
.admin .side-link { padding: 7px 12px; font-size: .88rem; }
.admin .count { margin-left: auto; background: var(--down); color: #fff; font-size: .7rem; border-radius: 9px; padding: 0 6px; font-weight: 800; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.toolbar input, .toolbar select { min-height: 38px; width: auto; min-width: 160px; }
.danger-zone { border-color: rgba(240,70,79,.35); }
.code { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; white-space: pre-wrap; word-break: break-word; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .dash-grid, .trade-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
  .product-band { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .site-nav.is-open { display: flex; }
  .menu-toggle { display: inline-grid; }
  .site-actions .btn-ghost { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .app:not(.admin) .sidebar { display: none; }
  .admin .sidebar { position: fixed; z-index: 50; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; }
  .admin .sidebar.is-open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .topbar { padding: 10px 14px; gap: 6px; }
  .topbar .brand-m { display: inline-flex; }
  .topbar .brand-m img { height: 32px; width: 32px; }
  .search { max-width: none; min-width: 0; }
  .content { padding: 14px 14px calc(var(--nav-h) + 28px); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(7, 12, 24, .97); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; backdrop-filter: blur(10px);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--dim); font-size: .7rem; font-weight: 700; }
  .bottom-nav a .ic { width: 23px; height: 23px; }
  .bottom-nav a.is-active { color: var(--text); }
  .hide-m { display: none !important; }
  .admin .content { padding-bottom: 40px; }
}
@media (min-width: 861px) { .show-m { display: none !important; } }
@media (max-width: 420px) {
  .topbar .icon-btn.optional { display: none; }
  .balance .btn-deposit { padding: 0 18px; }
  .quick .qi { width: 48px; height: 48px; }
  .footer-grid { grid-template-columns: 1fr; }
  .mrow { gap: 10px; }
  .pill-chg { min-width: 70px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.sidebar button.side-link { width: 100%; border: 0; background: none; cursor: pointer; font: 600 .92rem var(--font); text-align: left; }
.stack > * + * { margin-top: 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline { display: inline; }
.dest-box { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; word-break: break-all; font-weight: 600; }
.strength { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.grow { flex: 1; min-width: 0; }
.grow .mrow { border-top: 0; }
.mlist > .row-between { border-top: 1px solid var(--line); flex-wrap: nowrap; }
.mlist > .row-between:first-child { border-top: 0; }
.h3 { font-size: 1.05rem; margin: 0; }
.notif .sub { white-space: normal; }
.notif.unread b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); margin-right: 6px; vertical-align: 2px; }
.mrow-lite { padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); }
.mrow-lite:first-of-type { border-top: 0; }
.method-list { display: grid; gap: 10px; }
.method { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); color: var(--text); }
.method:hover, .method.is-active { border-color: var(--blue); color: var(--text); }
.logo-preview { height: 56px; width: auto; margin-bottom: 12px; background: var(--bg-2); padding: 8px; border-radius: 8px; }
textarea.tall { min-height: 420px; }
.mrow .name > b { white-space: nowrap; display: inline; }
.mrow .name .sub { margin-top: 2px; }
@media (max-width: 420px) { .mrow .name > b span { font-size: .8rem; } .mrow .lev { display: none; } .mrow .px { font-size: .95rem; } }
/* Grid tracks must be allowed to shrink below their content's min-width (chips, tables) */
.app { grid-template-columns: 236px minmax(0, 1fr); }
.dash-grid { grid-template-columns: minmax(0, 1fr) 360px; }
.trade-grid { grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 1080px) { .dash-grid, .trade-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .app { grid-template-columns: minmax(0, 1fr); } }
html, body { overflow-x: hidden; }
/* v1.2 */
.signal-panel { margin: 14px 0; }
.gauge { display: flex; align-items: center; gap: 16px; }
.gauge svg { max-width: 220px; flex: none; }
.gauge-text { display: flex; flex-direction: column; gap: 2px; }
.gauge-tone { font-size: 1.15rem; font-family: var(--display); }
.gauge-up { color: var(--up); } .gauge-warn { color: var(--warn); } .gauge-down { color: var(--down); }
@media (max-width: 420px) { .gauge { flex-direction: column; text-align: center; } .gauge svg { max-width: 240px; } }
.configured { border-color: rgba(242,179,61,.35); margin-bottom: 16px; }
.banner-persistent { position: relative; }
.copy-head { display: inline-flex; align-items: center; gap: 10px; }
.copy-head h3, .copy-head h1 { margin: 0; }
.copy-head-lg .copy-avatar { width: 64px; height: 64px; font-size: 1.2rem; }
.copy-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line-2); }
.copy-avatar-default { display: inline-grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--blue), var(--cyan)); }
.qr-box { display: flex; justify-content: center; margin: 10px 0; }
.qr-box canvas { border-radius: 10px; background: #fff; width: 200px; height: 200px; }
.chat-fab { position: fixed; right: 16px; bottom: 16px; z-index: 35; display: flex; flex-direction: column; gap: 10px; }
.chat-fab-app { bottom: 24px; }
@media (max-width: 860px) { .chat-fab-app { bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); } }
.chat-btn { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.chat-btn .ic { width: 26px; height: 26px; }
.chat-btn:hover { color: #fff; transform: translateY(-2px); }
.chat-whatsapp { background: #25d366; } .chat-telegram { background: #229ed9; } .chat-signal { background: #3a76f0; }
dialog.popup { border-width: 2px; }
dialog.popup-success { border-color: var(--up); } dialog.popup-warning { border-color: var(--warn); } dialog.popup-danger { border-color: var(--down); } dialog.popup-info { border-color: var(--cyan); }
.captcha strong { color: var(--text); font-size: 1.05rem; }
.code-input { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; min-height: 160px; }
.rich-content p { margin: 0 0 .6em; }
.rich-content p:last-child { margin-bottom: 0; }
.rich-content h2, .rich-content h3, .rich-content h4 { margin: .4em 0; font-size: 1.05rem; }
.rich-content ul, .rich-content ol { margin: .3em 0 .6em; padding-left: 1.3em; }
.rich-content a { text-decoration: underline; }
.rich-content img { max-width: 100%; height: auto; border-radius: 8px; }
.rich-content table { border-collapse: collapse; } .rich-content td, .rich-content th { border: 1px solid var(--line-2); padding: 4px 8px; }
.banner-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
/* Summernote Lite in the dark admin theme */
.note-editor.note-frame { border-color: var(--line-2) !important; border-radius: var(--r); overflow: hidden; }
.note-editor .note-editing-area .note-editable { background: #fff; color: #1b2333; }
.note-toolbar { background: var(--panel-2) !important; border-bottom: 1px solid var(--line-2) !important; }
.note-btn { background: var(--panel) !important; color: var(--text) !important; border-color: var(--line-2) !important; }
.note-dropdown-menu, .note-modal-content { background: var(--panel) !important; color: var(--text) !important; }
.sgauge { max-width: 320px; margin: 0 auto; text-align: center; }
.sgauge svg { width: 100%; height: auto; display: block; }
.sgauge-caption { margin: 2px 0 0; font-size: .78rem; color: var(--dim); }
.signal-panel { padding: 12px; }
.gauge-admin { max-width: 220px; margin: 0 auto 10px; }
/* Signal strength: compact button + pop-up */
.signal-btn { display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0 4px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: 700 .95rem var(--font); cursor: pointer; text-align: left; }
.signal-btn:hover { border-color: var(--blue); }
.signal-btn-text { flex: 1; }
.signal-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; }
.signal-bars i { display: block; width: 4px; border-radius: 1px; background: var(--line-2); }
.signal-bars i:nth-child(1) { height: 5px; } .signal-bars i:nth-child(2) { height: 8px; } .signal-bars i:nth-child(3) { height: 11px; } .signal-bars i:nth-child(4) { height: 14px; } .signal-bars i:nth-child(5) { height: 18px; }
.signal-up .on { background: var(--up); } .signal-warn .on { background: var(--warn); } .signal-down .on { background: var(--down); }
.signal-pill { min-width: 42px; text-align: center; padding: 3px 10px; border-radius: 999px; font-weight: 800; font-size: .9rem; }
.signal-pill.signal-up { background: var(--up-bg); color: var(--up); } .signal-pill.signal-warn { background: var(--warn-bg); color: var(--warn); } .signal-pill.signal-down { background: var(--down-bg); color: var(--down); }
dialog.signal-modal { width: min(340px, calc(100vw - 32px)); }
.signal-modal .modal-body h3 { margin: 0; }
.signal-modal .sgauge { max-width: 230px; margin-top: 6px; }
.signal-modal .modal-foot .btn { flex: 1; }
.kyc-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kyc-docs figure { margin: 0; }
.kyc-docs img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; }
a.kyc-prompt { color: var(--text); text-decoration: none; }
/* Header: menu button pinned right on mobile; Log in available in the mobile menu */
.site-actions { margin-left: auto; }
.site-nav .nav-login { display: none; }
@media (max-width: 900px) { .site-nav .nav-login { display: block; color: var(--text); } }
/* Detail lists: long values (transaction IDs, addresses) wrap instead of pushing values off-screen */
.kv { grid-template-columns: minmax(90px, max-content) minmax(0, 1fr); }
.kv dd { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.kv dd .mono-ref, .kv dd.mono-ref { overflow-wrap: anywhere; }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dt { margin-top: 8px; } .kv dd { text-align: left; } }
.amount-group input { min-width: 0; }
.amount-group select { width: auto; min-width: 84px; border-radius: 0 var(--r) var(--r) 0; border-left: 0; }
.pos-actions summary { display: inline-flex; list-style: none; cursor: pointer; }
.pos-actions summary::-webkit-details-marker { display: none; }
.pos-actions-body { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); min-width: 240px; }
.pos-actions-body form { display: flex; flex-direction: column; gap: 6px; }
.settle-row { display: flex; gap: 6px; }
.settle-row select, .settle-row input { min-height: 36px; }
.phone-group { display: flex; gap: 8px; }
.phone-group select { width: auto; flex: 0 0 auto; max-width: 42%; }
.phone-group input { flex: 1; min-width: 0; }
.user-picker { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); }
.user-picker-bar { display: flex; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid var(--line); }
.user-picker-bar input { min-height: 38px; }
.user-picker-count { flex: none; white-space: nowrap; }
.user-picker-list { max-height: 280px; overflow-y: auto; }
.user-picker-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-top: 1px solid var(--line); cursor: pointer; margin: 0; }
.user-picker-row:first-child { border-top: 0; }
.user-picker-row:hover { background: var(--panel-2); }
.user-picker-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.user-picker-name { min-width: 0; overflow-wrap: anywhere; }
.vat-field input { letter-spacing: .4em; font-size: 1.15rem; text-align: center; font-weight: 700; }
.vat-request { margin-top: 14px; }
/* VAT help pop-up contact options */
.vat-help-modal { width: min(400px, calc(100vw - 32px)); }
.vat-contact-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.vat-contact { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); color: var(--text); text-align: left; cursor: pointer; text-decoration: none; width: 100%; }
.vat-contact:hover { border-color: var(--blue); color: var(--text); }
.vat-contact .ic { width: 22px; height: 22px; flex: none; color: var(--blue); }
.vat-contact span { display: flex; flex-direction: column; min-width: 0; }
.vat-request-form { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.vat-gen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vat-gen label { width: 100%; color: var(--dim); }
.vat-gen input { width: 150px; }
.vat-gen .hint { width: 100%; }
.vat-reveal { display: flex; flex-direction: column; gap: 4px; padding: 14px; margin: 10px 0; border: 1px solid var(--up); border-radius: 12px; background: var(--up-bg); }
.vat-reveal-code { font-size: 1.8rem; font-weight: 800; letter-spacing: .35em; color: var(--up); font-family: var(--mono, monospace); }
.imp-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: #3a1d1d; border: 1px solid var(--down); color: #ffd7d7; }
.imp-banner .btn { margin-left: auto; }
.imp-banner .ic { flex: none; }
.colour-row { display: flex; gap: 10px; align-items: center; }
.colour-row input[type="color"] { width: 54px; height: 44px; padding: 2px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; }
.colour-row input[type="text"] { flex: 1; min-width: 0; font-family: var(--mono, monospace); }
.rowmenu { position: relative; display: inline-block; }
.rowmenu summary { list-style: none; cursor: pointer; }
.rowmenu summary::-webkit-details-marker { display: none; }
.rowmenu-list { position: absolute; right: 0; z-index: 30; margin-top: 4px; min-width: 190px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); overflow: hidden; display: flex; flex-direction: column; }
.rowmenu-item { display: block; width: 100%; text-align: left; padding: 11px 14px; background: none; border: 0; border-top: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; text-decoration: none; }
.rowmenu-item:first-child { border-top: 0; }
.rowmenu-item:hover { background: var(--panel-2); color: var(--text); }
.rowmenu form { margin: 0; }
@media (max-width: 860px) { .rowmenu-list { right: auto; left: 0; } }
.actions-bar { margin: 14px 0; }
.rowmenu-lg .rowmenu-list { min-width: 230px; }
.rowmenu-danger { color: var(--down); }
.modal-form { padding: 20px; position: relative; max-width: 560px; }
.modal-x { position: absolute; top: 12px; right: 12px; background: none; border: 0; color: var(--muted); cursor: pointer; }
dialog.modal { border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); color: var(--text); padding: 0; width: min(560px, calc(100vw - 28px)); }
dialog.modal::backdrop { background: rgba(2,5,12,.7); }
dialog.modal h3 { margin-top: 0; }
