/* EagleOne UI — light by default, dark via [data-theme="dark"] or the OS setting */
:root {
  --bg: #f3f5f9;
  --panel: #ffffff;
  --panel-2: #f7f8fb;
  --line: #e4e7ee;
  --line-2: #eef0f5;
  --text: #1a2233;
  --muted: #6c7588;
  --faint: #9aa2b3;
  --primary: #1e6cf0;
  --primary-ink: #ffffff;
  --buy: #1e6cf0;
  --sell: #f0312e;
  --pos: #0b9b6a;
  --neg: #e5343f;
  --warn: #f29d0b;
  --navy: #1f2a5c;
  --navy-ink: #ffffff;
  --dark-btn: #111318;
  --chip: #eef2fb;
  --shadow: 0 6px 24px rgba(20, 30, 60, .08);
  --radius: 10px;
  --rail: 56px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e131d; --panel: #151b27; --panel-2: #1a2130; --line: #263042; --line-2: #1f2737;
    --text: #e4e9f2; --muted: #8e98ab; --faint: #667085; --primary: #3b82f6; --buy: #2f7cf6; --sell: #f2453d;
    --pos: #1fbf86; --neg: #f25560; --navy: #26346f; --dark-btn: #2a3346; --chip: #1e2740;
    --shadow: 0 6px 24px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e131d; --panel: #151b27; --panel-2: #1a2130; --line: #263042; --line-2: #1f2737;
  --text: #e4e9f2; --muted: #8e98ab; --faint: #667085; --primary: #3b82f6; --buy: #2f7cf6; --sell: #f2453d;
  --pos: #1fbf86; --neg: #f25560; --navy: #26346f; --dark-btn: #2a3346; --chip: #1e2740;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
/* Installed app: the page can be drawn under the phone's status bar (viewport-fit=cover); keep content below it */
body { padding-top: env(safe-area-inset-top, 0px); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.25; }
h1 { font-size: 20px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.mono { font-variant-numeric: tabular-nums; }
.hidden, [hidden] { display: none !important; }
.ic { flex: none; display: block; }

/* ---------- forms ---------- */
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px; font: inherit; font-size: 14px;
  color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; outline: none;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
input[type="checkbox"], input[type="radio"] { display: inline-block; width: auto; margin: 0 6px 0 0; vertical-align: middle; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form label { margin: 0; min-width: 120px; flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 6px;
  border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
  background: var(--panel-2); color: var(--text); text-decoration: none !important; line-height: 1.2;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-dark { background: var(--dark-btn); color: #fff; }
.btn-danger { background: var(--sell); color: #fff; }
.btn-success { background: var(--pos); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--panel-2); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 4px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat small { display: block; color: var(--muted); font-size: 12px; }
.stat b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

.flash { margin: 12px 16px 0; padding: 10px 14px; border-radius: 8px; font-size: 13px; }
.flash-ok { background: color-mix(in srgb, var(--pos) 12%, var(--panel)); color: var(--pos); border: 1px solid color-mix(in srgb, var(--pos) 30%, transparent); }
.flash-err { background: color-mix(in srgb, var(--neg) 10%, var(--panel)); color: var(--neg); border: 1px solid color-mix(in srgb, var(--neg) 30%, transparent); }

.badge { display: inline-block; padding: 3px 9px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.badge-ok { background: #19a463; color: #fff; }
.badge-bad { background: #d9363e; color: #fff; }
.badge-warn { background: #f4a21f; color: #fff; }
.badge-navy { background: var(--navy); color: #fff; }
.badge-muted { background: var(--line); color: var(--muted); }
.badge-buy { background: color-mix(in srgb, var(--buy) 14%, transparent); color: var(--buy); text-transform: uppercase; }
.badge-sell { background: color-mix(in srgb, var(--sell) 14%, transparent); color: var(--sell); text-transform: uppercase; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 600; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .acts { white-space: nowrap; text-align: right; }

/* ---------- auth ---------- */
.auth-body { background: var(--panel); min-height: 100vh; display: flex; flex-direction: column; }
.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 340px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 26px 26px 20px; box-shadow: var(--shadow); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 22px; text-decoration: none !important; }
.auth-card .field { margin-bottom: 14px; }
.auth-card input:not([type="checkbox"]), .auth-card select {
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 9px 2px; margin: 0; background: transparent; font-size: 13px;
}
.auth-card input:focus, .auth-card select:focus { box-shadow: none; border-bottom-color: var(--primary); }
.auth-card .btn { padding: 10px; border-radius: 3px; font-weight: 500; }
.auth-card .alt { text-align: center; font-size: 12px; color: var(--muted); margin: 16px 0 0; }
.auth-card .err { color: var(--neg); font-size: 12px; margin: -6px 0 12px; }
.auth-card .check { font-size: 12px; color: var(--muted); margin: 10px 0 18px; display: flex; align-items: center; }
.phone-field { display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid var(--line); }
.phone-field select { width: 92px; border: 0 !important; flex: none; padding-right: 0; }
.phone-field input { border: 0 !important; }
.phone-field:focus-within { border-bottom-color: var(--primary); }
.steps { display: flex; gap: 6px; justify-content: center; margin: -10px 0 18px; }
.steps i { width: 26px; height: 3px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--primary); }
.auth-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 14px max(16px, 16%); font-size: 11px; color: var(--muted); }
.auth-foot a { color: var(--muted); }

.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); font-size: 17px; letter-spacing: -.01em; }
.logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #f7c948, #e08a00); color: #4a2a00; font-weight: 800; font-size: 15px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
.logo-lg { font-size: 22px; }
.logo-lg .logo-mark { width: 36px; height: 36px; font-size: 18px; }
.logo-text { background: linear-gradient(90deg, #e08a00, #c2410c); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- terminal shell ---------- */
.term { overflow: hidden; height: 100vh; height: 100dvh; box-sizing: border-box; }
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; z-index: 30; }
.rail-logo { padding: 12px 0 8px; }
.rail nav { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; border-top: 1px solid var(--line); padding-top: 6px; }
.rail a, .rail button { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: none !important; }
.rail a:hover, .rail button:hover { color: var(--primary); background: var(--chip); }
.rail a.on { color: var(--primary); background: var(--chip); }
.rail a.on::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--primary); }
.rail [data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 48px; top: 50%; transform: translateY(-50%); background: #111827; color: #fff; padding: 5px 9px; border-radius: 5px; font-size: 12px; white-space: nowrap; pointer-events: none; z-index: 50; }
.rail-bottom { margin-top: auto; padding-bottom: 10px; display: flex; flex-direction: column; gap: 2px; }
.theme-toggle .ic:last-child { display: none; }
:root[data-theme="dark"] .theme-toggle .ic:first-child { display: none; }
:root[data-theme="dark"] .theme-toggle .ic:last-child { display: block; }
.term-main { margin-left: var(--rail); height: 100%; overflow: auto; }
.tabbar { display: none; }

.page { max-width: 1100px; margin: 0 auto; padding: 18px 20px 40px; }
.page-narrow { max-width: 560px; margin: 0 auto; padding: 18px 16px 60px; }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 2px 0 0; font-size: 13px; }
.back-link { display: none; color: var(--muted); transform: rotate(180deg); }

/* ---------- trade layout ---------- */
.trade-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; height: 100%; }
.wl { grid-row: 1 / span 2; border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.acc-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.acc-chip .acc-type { font-size: 10px; font-weight: 700; letter-spacing: .05em; padding: 3px 7px; border-radius: 4px; color: #fff; }
.acc-type.demo { background: var(--warn); }
.acc-type.real { background: var(--pos); }
.acc-chip b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.acc-chip small { color: var(--muted); font-size: 11px; }
.acc-chip form { margin-left: auto; }
.acc-switch { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.acc-switch button { border: 0; background: transparent; padding: 5px 9px; font: inherit; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; }
.acc-switch button.on { background: var(--primary); color: #fff; }
.wl-search { position: relative; padding: 8px 10px 4px; }
.wl-search .ic { position: absolute; right: 20px; top: 50%; transform: translateY(-35%); color: var(--faint); }
.wl-search input { margin: 0; padding: 7px 30px 7px 10px; font-size: 12px; border-radius: 5px; background: var(--panel-2); }
.wl-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.wl-tabs button { border: 0; background: none; padding: 9px 0; font: inherit; font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.wl-tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.wl-cats { display: flex; gap: 4px; padding: 6px 10px; overflow-x: auto; border-bottom: 1px solid var(--line-2); }
.wl-cats button { border: 1px solid var(--line); background: none; border-radius: 20px; padding: 2px 9px; font: inherit; font-size: 11px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.wl-cats button.on { background: var(--chip); color: var(--primary); border-color: transparent; }
.wl-list { flex: 1; overflow-y: auto; }
.wl-row { display: grid; grid-template-columns: 18px 1fr auto auto; gap: 4px 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line-2); cursor: pointer; font-variant-numeric: tabular-nums; }
.wl-row:hover { background: var(--panel-2); }
.wl-row.on { background: var(--chip); }
.wl-row .star { color: var(--faint); background: none; border: 0; padding: 0; cursor: pointer; grid-row: span 2; }
.wl-row .star.on { color: #f5b100; }
.wl-row .star.on svg { fill: currentColor; }
.wl-row .nm { font-weight: 600; font-size: 12px; }
.wl-row .ch { font-size: 10px; }
.wl-row .bid { color: var(--buy); font-weight: 600; font-size: 13px; text-align: right; }
.wl-row .ask { color: var(--sell); font-weight: 600; font-size: 13px; text-align: right; }
.wl-row .lo, .wl-row .hi { font-size: 10px; color: var(--faint); text-align: right; }
.wl-row .bid.up, .wl-row .ask.up { animation: flashUp .6s; }
.wl-row .bid.dn, .wl-row .ask.dn { animation: flashDn .6s; }
@keyframes flashUp { from { background: color-mix(in srgb, var(--pos) 25%, transparent); } }
@keyframes flashDn { from { background: color-mix(in srgb, var(--neg) 25%, transparent); } }
.wl-row { position: relative; }
.wl-act { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: none; gap: 4px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); z-index: 2; }
.wl-row:hover .wl-act, .wl-row:focus-within .wl-act { display: flex; animation: waIn .12s ease-out; }
@media (hover: none) { .wl-row.on .wl-act { display: flex; } }
@keyframes waIn { from { opacity: 0; transform: translate(6px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
.wa { width: 26px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 5px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }
.wa:hover { color: var(--text); background: var(--panel-2); }
.wa.b { background: var(--buy); border-color: var(--buy); color: #fff; }
.wa.s { background: var(--sell); border-color: var(--sell); color: #fff; }
.wa.b:hover, .wa.s:hover { filter: brightness(1.1); color: #fff; }
.wa.cht { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.wa.cht:hover { filter: brightness(1.1); color: #fff; background: #4f46e5; }
.wa.del:hover { color: var(--sell); }
.wa:disabled { opacity: .5; cursor: wait; }
.wl-menu { position: fixed; display: block; z-index: 1000; }
.wl-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 12px; }

.chart-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); }
.chart-bar { display: flex; align-items: center; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--line); min-height: 40px; overflow-x: auto; }
.chart-bar .sym-btn { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; border: 0; background: none; color: var(--text); padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.chart-bar .sym-btn:hover, .chart-bar .tb:hover { background: var(--panel-2); }
.chart-bar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; flex: none; }
.chart-bar .tb { border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.chart-bar .tb.on { color: var(--primary); }
.tfs { display: flex; }
.dd { position: relative; }
.dd-menu { position: absolute; top: 100%; left: 0; z-index: 40; min-width: 170px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 4px; display: none; }
.dd.open .dd-menu { display: block; }
.dd-menu button, .dd-menu label { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 10px; font: inherit; font-size: 13px; color: var(--text); border-radius: 5px; cursor: pointer; text-align: left; margin: 0; }
.dd-menu button:hover, .dd-menu label:hover { background: var(--panel-2); }
.dd-menu button.on { color: var(--primary); font-weight: 600; }
.chart-wrap { position: relative; flex: 1; min-height: 240px; }
#chart-box { position: absolute; inset: 0; }
.legend { position: absolute; left: 10px; top: 8px; z-index: 5; font-size: 12px; pointer-events: none; font-variant-numeric: tabular-nums; }
.legend .t { font-weight: 600; font-size: 13px; color: var(--text); }
.legend .t i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pos); margin-left: 6px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos) 25%, transparent); }
.legend .t i.off { background: var(--faint); box-shadow: none; }
.legend .ohlc { color: var(--muted); font-size: 11px; }
.legend .ohlc b { font-weight: 500; }
.quick { position: absolute; left: 10px; top: 52px; z-index: 6; display: flex; align-items: stretch; height: 34px; box-shadow: var(--shadow); border-radius: 3px; }
.quick .qb { border: 0; color: #fff; font: inherit; font-weight: 600; font-size: 12px; padding: 0 12px; min-width: 74px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; line-height: 1.1; }
.quick .qb small { font-weight: 500; font-size: 10px; opacity: .9; font-variant-numeric: tabular-nums; }
.quick .qb.buy { background: var(--buy); border-radius: 3px 0 0 3px; }
.quick .qb.sell { background: var(--sell); border-radius: 0 3px 3px 0; }
.quick .lots { display: flex; align-items: center; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quick .lots input { width: 54px; margin: 0; border: 0; text-align: center; padding: 0; height: 100%; border-radius: 0; font-weight: 600; font-size: 13px; background: transparent; -moz-appearance: textfield; }
.quick .lots input::-webkit-inner-spin-button { -webkit-appearance: none; }
.quick .lots button { border: 0; background: none; color: var(--muted); width: 22px; height: 100%; cursor: pointer; display: grid; place-items: center; }
.quick .more { margin-left: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); width: 34px; border-radius: 3px; cursor: pointer; display: grid; place-items: center; }

/* bottom panel */
.bottom { grid-column: 2; border-top: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; height: 250px; min-height: 0; }
.bottom.collapsed { height: auto; }
.bottom.collapsed .bp-body { display: none; }
.bp-tabs { display: flex; align-items: center; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.bp-tabs button.t { border: 0; background: none; padding: 8px 12px; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.bp-tabs button.t.on { color: var(--text); font-weight: 600; border-bottom-color: var(--primary); background: var(--panel); }
.bp-tabs .sp { flex: 1; }
.bp-body { flex: 1; overflow: auto; }
.bp-body .tbl th { position: sticky; top: 0; background: var(--panel); z-index: 1; font-size: 10px; padding: 6px 10px; }
.bp-body .tbl td { padding: 6px 10px; font-size: 12px; }
.bp-empty { padding: 30px; text-align: center; color: var(--muted); font-size: 12px; }
.statusbar { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; padding: 6px 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.statusbar b { color: var(--primary); font-weight: 600; margin-left: 3px; }
.statusbar .total { margin-left: auto; font-size: 13px; font-weight: 700; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 15, 30, .45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 400px; background: var(--panel); border-radius: 12px; box-shadow: var(--shadow); max-height: 92vh; overflow: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 15px; }
.modal-body { padding: 16px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 3px; margin-bottom: 14px; }
.seg button { flex: 1; border: 0; background: none; padding: 7px; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--chip); color: var(--primary); }
.side-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.side-btns .btn { padding: 12px; flex-direction: column; gap: 2px; }
.side-btns .btn small { font-weight: 500; font-size: 11px; opacity: .9; }
.btn-buy { background: var(--buy); color: #fff; }
.btn-sell { background: var(--sell); color: #fff; }
.calc { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 8px 0; border-top: 1px dashed var(--line); margin-top: 4px; }
.calc b { color: var(--text); }
.durs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.durs button { border: 1px solid var(--line); background: none; color: var(--text); border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.durs button.on { border-color: var(--primary); color: var(--primary); background: var(--chip); }

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 4px; color: #fff; font-size: 12px; box-shadow: var(--shadow); background: #16a36a; animation: toastIn .2s; }
.toast.err { background: #d9363e; }
.toast button { margin-left: auto; background: none; border: 0; color: #fff; cursor: pointer; padding: 0; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

/* ---------- wallet pages ---------- */
.wallet-card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 18px; margin-bottom: 16px; }
.wallet-card > h2 { font-size: 13px; font-weight: 500; color: var(--muted); text-align: center; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.methods { display: flex; flex-direction: column; gap: 6px; }
.method { border-radius: 3px; overflow: hidden; border: 1px solid var(--line); }
.method summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; font-size: 13px; background: color-mix(in srgb, var(--primary) 7%, var(--panel)); }
.method:nth-child(3n+2) summary { background: color-mix(in srgb, var(--pos) 8%, var(--panel)); }
.method:nth-child(3n) summary { background: color-mix(in srgb, var(--navy) 10%, var(--panel)); }
.method summary::-webkit-details-marker { display: none; }
.method summary .ic { transition: transform .15s; color: var(--muted); }
.method[open] summary > .ic:first-child { transform: rotate(90deg); }
.method summary .min { margin-left: auto; font-size: 12px; color: var(--muted); }
.method .body { padding: 12px; font-size: 13px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.method .qr { max-width: 180px; border-radius: 6px; border: 1px solid var(--line); margin-top: 8px; display: block; }
.copy-line { display: flex; gap: 6px; align-items: center; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 130px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 12px; text-align: center; padding: 16px; cursor: pointer; margin-bottom: 14px; }
.dropzone.drag { border-color: var(--primary); background: var(--chip); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.dropzone .ic { width: 34px; height: 34px; color: var(--faint); }
.dropzone .fname { color: var(--text); font-weight: 600; }
.hist-empty { text-align: center; color: var(--muted); padding: 22px 0 6px; font-size: 12px; }
.hist-empty .ic { width: 48px; height: 48px; margin: 0 auto 6px; color: var(--faint); }
.hist-list { display: flex; flex-direction: column; }
.hist-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.hist-item:last-child { border-bottom: 0; }
.hist-item .amt { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.hist-item small { display: block; color: var(--muted); font-size: 11px; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; font-variant-numeric: tabular-nums; }
.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.doc-slot { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.doc-slot h3 { font-size: 13px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.doc-slot .dropzone { min-height: 90px; margin: 8px 0; }
.menu-list a { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line-2); color: var(--text); font-size: 14px; text-decoration: none; }
.menu-list a .ic:last-child { margin-left: auto; color: var(--faint); }

/* account types */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tier { position: relative; border-radius: 16px; padding: 26px 22px; background: linear-gradient(160deg, #1b2440, #111729); color: #e7ebf5; border: 1px solid #2a3554; }
.tier.cur { outline: 2px solid var(--primary); outline-offset: 2px; }
.tier .tlabel { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,.1); margin-bottom: 14px; }
.tier.vip .tlabel { background: linear-gradient(90deg, #f7c948, #e08a00); color: #3a2200; }
.tier.pop .tlabel { background: var(--primary); color: #fff; }
.tier h3 { font-size: 22px; margin: 0 0 2px; color: #fff; }
.tier .tag { color: #9ba7c2; font-size: 13px; margin-bottom: 16px; }
.tier .price { font-size: 30px; font-weight: 700; color: #fff; }
.tier .price small { font-size: 13px; color: #9ba7c2; font-weight: 500; }
.tier ul { list-style: none; padding: 0; margin: 18px 0 0; }
.tier li { padding: 6px 0 6px 24px; position: relative; font-size: 13px; color: #c9d1e3; }
.tier li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 10px; height: 6px; border-left: 2px solid #3ddc97; border-bottom: 2px solid #3ddc97; transform: rotate(-45deg); }
.tier .lev { display: flex; gap: 10px; margin-top: 12px; }
.tier .lev span { flex: 1; background: rgba(255,255,255,.06); border-radius: 8px; padding: 8px; font-size: 11px; color: #9ba7c2; }
.tier .lev b { display: block; color: #fff; font-size: 15px; }

/* ---------- admin ---------- */
.admin-body { min-height: 100vh; }
.adm-side { position: fixed; inset: 0 auto 0 0; width: 240px; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; z-index: 40; transition: transform .2s; }
.adm-side .brand { display: flex; align-items: center; height: 64px; padding: 0 20px; }
.adm-side .sec { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 10px 20px 4px; }
.adm-nav { padding: 6px 0 30px; }
.adm-nav > a, .adm-nav summary { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; list-style: none; text-decoration: none !important; }
.adm-nav summary::-webkit-details-marker { display: none; }
.adm-nav summary .ic.chev { margin-left: auto; width: 15px; height: 15px; transition: transform .15s; color: var(--muted); }
.adm-nav details[open] summary .ic.chev { transform: rotate(90deg); }
.adm-nav > a:hover, .adm-nav summary:hover { color: var(--primary); }
.adm-nav .sub a { display: flex; align-items: center; gap: 8px; padding: 10px 20px 10px 44px; color: var(--text); font-size: 13px; font-weight: 500; text-decoration: none !important; }
.adm-nav .sub a::before { content: "↳"; color: var(--muted); }
.adm-nav .sub a:hover { color: var(--primary); }
.adm-nav a.on, .adm-nav .sub a.on { background: var(--navy); color: var(--navy-ink); }
.adm-nav .sub a.on::before { color: var(--navy-ink); }
.adm-nav details.on > summary { color: var(--primary); }
.adm-nav .count { margin-left: auto; background: var(--sell); color: #fff; font-size: 10px; border-radius: 10px; padding: 1px 6px; }
.adm-main { margin-left: 240px; min-height: 100vh; display: flex; flex-direction: column; }
.adm-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 22px; background: var(--panel); border-bottom: 1px solid var(--line); }
.adm-top .sp { flex: 1; }
.adm-top .bell { position: relative; }
.adm-top .bell .dot { position: absolute; top: 2px; right: 2px; background: var(--sell); color: #fff; font-size: 9px; border-radius: 8px; min-width: 15px; height: 15px; display: grid; place-items: center; padding: 0 3px; }
.adm-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.adm-user .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--primary); font-weight: 700; }
.adm-content { padding: 22px; flex: 1; }
.adm-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.adm-head h1 { margin: 0; flex: 1; font-size: 18px; }
.adm-card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 18px; margin-bottom: 18px; }
.adm-card > h2 { font-size: 15px; }
.dt-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; font-size: 13px; }
.dt-tools .sp { flex: 1; }
.dt-tools select, .dt-tools input { display: inline-block; width: auto; margin: 0 4px; padding: 5px 8px; font-size: 13px; }
.dt-tools input[type="search"] { width: 180px; }
.dt-export { display: inline-flex; background: #6b7385; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.dt-export button { border: 0; background: none; color: #fff; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.dt-export button:hover { background: rgba(255,255,255,.12); }
.dt-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 12px; color: var(--muted); }
.dt-pager .pg { display: flex; gap: 4px; }
.dt-pager button { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 4px 10px; border-radius: 4px; cursor: pointer; font: inherit; font-size: 12px; }
.dt-pager button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.dt-pager button:disabled { opacity: .5; cursor: default; }
.atbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.atbl thead th { background: var(--navy); color: #fff; text-align: left; padding: 12px 12px; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; user-select: none; }
.atbl thead th.nosort { cursor: default; }
.atbl thead th[data-sort]::after { content: " ⇅"; opacity: .45; font-size: 10px; }
.atbl thead th[data-sort="asc"]::after { content: " ↑"; opacity: 1; }
.atbl thead th[data-sort="desc"]::after { content: " ↓"; opacity: 1; }
.atbl td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.atbl tbody tr:hover { background: var(--panel-2); }
.atbl .acts { white-space: nowrap; }
.atbl .acts a, .atbl .acts button { color: var(--text); }
.date-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.date-filter input { display: inline-block; width: auto; margin: 0; padding: 5px 8px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; gap: 14px; align-items: center; }
.stat-card .si { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--chip); color: var(--primary); }
.stat-card small { color: var(--muted); font-size: 12px; display: block; }
.stat-card b { font-size: 20px; font-variant-numeric: tabular-nums; }
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs-line a { padding: 9px 14px; color: var(--muted); font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none !important; }
.tabs-line a.on { color: var(--primary); border-bottom-color: var(--primary); }
.adm-overlay { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .trade-grid { grid-template-columns: 250px minmax(0, 1fr); }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .rail { display: none; }
  .term-main { margin-left: 0; padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 8px; font-size: 11px; color: var(--muted); text-decoration: none !important; }
  .tabbar a.on { color: var(--text); font-weight: 600; }
  .back-link { display: block; }
  .trade-grid { display: block; height: 100%; }
  .trade-grid > section { display: none; height: 100%; }
  .trade-grid[data-view="watchlist"] .wl,
  .trade-grid[data-view="chart"] .chart-col,
  .trade-grid[data-view="positions"] .bottom { display: flex; }
  .wl { border-right: 0; }
  .bottom { height: 100%; border-top: 0; }
  .bottom .statusbar { order: -1; border-top: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; font-size: 12px; gap: 6px 14px; }
  .quick { position: static; height: 46px; box-shadow: none; border-bottom: 1px solid var(--line); border-radius: 0; }
  .chart-wrap > .quick { position: relative; z-index: 7; }
  .quick .qb { flex: 1; font-size: 15px; border-radius: 0 !important; }
  .quick .lots { flex: 1.2; border: 0; }
  .quick .lots input { flex: 1; width: auto; font-size: 16px; }
  .quick .lots button { width: 44px; }
  .quick .more { margin: 0; border-radius: 0; border-width: 0 0 0 1px; width: 44px; }
  .legend { top: 6px; }
  .grid2, .grid3, .tiers, .doc-grid { grid-template-columns: 1fr; }
  .toasts { bottom: 74px; left: 16px; right: 16px; max-width: none; }
  .adm-side { transform: translateX(-100%); }
  .admin-body.side-open .adm-side { transform: none; box-shadow: var(--shadow); }
  .admin-body.side-open .adm-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
  .adm-main { margin-left: 0; }
  .adm-content { padding: 14px; }
  .adm-top { padding: 0 12px; }
  .adm-user span { display: none; }
}
@media (max-width: 520px) {
  .row2, .row3, .grid4 { grid-template-columns: 1fr; }
  .page { padding: 14px 16px 30px; }
  .dt-tools input[type="search"] { width: 130px; }
}

/* TradingView widget mode: keep the order bar clear of its toolbars */
.ptags { position: absolute; inset: 0 70px 0 0; pointer-events: none; z-index: 4; }
.ptag { position: absolute; transform: translateY(-50%); display: inline-flex; align-items: stretch; height: 20px; font-size: 11px; font-weight: 600; border: 1px solid var(--c); border-radius: 3px; background: var(--panel); box-shadow: 0 1px 3px rgba(0,0,0,.12); pointer-events: auto; cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; --c: var(--buy); }
.ptag.sell { --c: var(--sell); }
.ptag.ord { --c: #f59e0b; }
.ptag > * { display: flex; align-items: center; padding: 0 6px; }
.ptag b { background: var(--c); color: #fff; font-size: 10px; letter-spacing: .02em; }
.ptag .v { color: var(--c); border-right: 1px solid var(--line); }
.ptag .pl { border-right: 1px solid var(--line); }
.ptag button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; line-height: 1; cursor: pointer; padding: 0 6px; }
.ptag button:hover { background: var(--sell); color: #fff; }
.ptag button:disabled { opacity: .5; }

/* ---------- drawing tools (assets/draw.js) ---------- */
.dlayer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 3; pointer-events: none; overflow: hidden; touch-action: none; }
.dlayer .dw * { pointer-events: none; }
.dlayer .dw .hit { stroke: transparent; stroke-width: 12; fill: none; pointer-events: stroke; cursor: pointer; }
.dlayer .dw .hitf { pointer-events: all; cursor: move; }
.dlayer .hd { pointer-events: all; cursor: grab; }
.dlayer.locked .dw .hitf, .dlayer.locked .dw .hit { cursor: pointer; }
.dlayer.drawing { pointer-events: all; cursor: crosshair; }
.dlayer.drawing .dw *, .dlayer.drawing .hd { pointer-events: none; }
.dlayer.dragging { pointer-events: all; cursor: grabbing; }
.dlayer.pass, .dlayer.pass * { pointer-events: none !important; }
.dlayer text { user-select: none; -webkit-user-select: none; }
.chart-wrap.has-tools #chart-box, .chart-wrap.has-tools .dlayer { left: 38px; }
.chart-wrap.has-tools .legend { left: 48px; }
.chart-wrap.has-tools .quick { left: 48px; }
.chart-wrap.has-tools .ptags { left: 38px; }
.chart-wrap[data-cursor="arrow"] #chart-box * { cursor: default !important; }
.dtools { position: absolute; left: 0; top: 0; bottom: 0; width: 38px; z-index: 7; display: none; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; border-right: 1px solid var(--line); background: var(--panel); overflow-y: auto; scrollbar-width: none; }
.dtools::-webkit-scrollbar { display: none; }
.has-tools .dtools { display: flex; }
.dt-g { position: relative; flex: none; }
.dtools .dtb { width: 32px; height: 30px; flex: none; display: grid; place-items: center; border: 0; background: none; color: var(--text); border-radius: 5px; cursor: pointer; padding: 0; }
.dtools .dtb:hover { background: var(--panel-2); }
.dtools .dtb.on { color: var(--primary); background: var(--chip); }
.dt-more { position: absolute; right: 0; bottom: 1px; width: 10px; height: 10px; border: 0; padding: 0; background: none; color: var(--faint); cursor: pointer; display: grid; place-items: center; opacity: .45; }
.dt-g:hover .dt-more, .dt-more:focus-visible { opacity: 1; color: var(--text); }
.dt-sep { display: block; width: 22px; height: 1px; background: var(--line); margin: 5px 0; flex: none; }
.dt-fly { position: fixed; z-index: 1000; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 4px; min-width: 200px; }
.dt-fly[hidden] { display: none; }
.dt-fly button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 6px 10px; font: inherit; font-size: 13px; color: var(--text); border-radius: 5px; cursor: pointer; text-align: left; }
.dt-fly button:hover { background: var(--panel-2); }
.dt-fly button.on { color: var(--primary); }
.dsel { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 3px; padding: 4px 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); max-width: calc(100% - 16px); overflow-x: auto; }
.dsel[hidden] { display: none; }
.dsel .sw { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.dsel .sw.on { box-shadow: 0 0 0 2px var(--primary); }
.dsel .lw, .dsel .tg { width: 26px; height: 26px; flex: none; border: 0; background: none; border-radius: 5px; cursor: pointer; display: grid; place-items: center; color: var(--text); padding: 0; }
.dsel .lw i { display: block; width: 14px; background: currentColor; border-radius: 2px; }
.dsel .lw.on, .dsel .tg.on { background: var(--chip); color: var(--primary); }
.dsel .lw:hover, .dsel .tg:hover { background: var(--panel-2); }
.dsel .del:hover { color: var(--sell); }
.dsel .sp { width: 1px; height: 18px; background: var(--line); margin: 0 3px; flex: none; }
.go-rt { position: absolute; right: 78px; bottom: 36px; z-index: 6; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; padding: 0; }
.go-rt[hidden] { display: none; }
.chart-foot { display: flex; align-items: center; gap: 2px; height: 30px; padding: 0 8px; border-top: 1px solid var(--line); font-size: 12px; flex: none; overflow-x: auto; scrollbar-width: none; background: var(--panel); }
.chart-foot .rng, .chart-foot #ps { display: flex; gap: 1px; }
.chart-foot button { border: 0; background: none; color: var(--text); font: inherit; font-size: 12px; padding: 3px 7px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.chart-foot button:hover { background: var(--panel-2); }
.chart-foot button.on { color: var(--primary); }
.chart-foot .sp { flex: 1; }
.chart-foot .clock { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 6px; }
.chart-foot .sep { width: 1px; height: 16px; background: var(--line); margin: 0 4px; flex: none; }

/* ---------- mobile order screen ---------- */
.osheet { position: fixed; inset: 0; z-index: 55; background: var(--panel); display: flex; flex-direction: column; overflow-y: auto; animation: osIn .16s ease-out; }
.osheet[hidden] { display: none; }
@keyframes osIn { from { transform: translateX(24px); } to { transform: none; } }
body.os-open { overflow: hidden; }
body.os-open .tabbar { display: none; }
.osheet header { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 48px; border-bottom: 1px solid var(--line); flex: none; }
.osheet header b { text-align: center; font-size: 15px; }
.os-back { border: 0; background: none; color: var(--text); height: 48px; cursor: pointer; display: grid; place-items: center; }
.os-m { display: flex; justify-content: space-between; padding: 10px 14px; font-size: 12px; color: var(--muted); }
.os-m b { color: var(--text); font-weight: 600; }
.os-tabs { margin: 4px 14px 10px; }
.os-tabs button.on { background: var(--primary); color: #fff; }
.os-f { padding: 0 14px; }
.os-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.os-row[hidden] { display: none; }
.os-row label { margin: 0; font-size: 13px; color: var(--text); font-weight: 500; }
.stp { display: flex; align-items: center; gap: 4px; }
.stp button { width: 34px; height: 34px; border: 0; background: none; color: var(--primary); font-size: 22px; line-height: 1; cursor: pointer; border-radius: 6px; }
.stp button:active { background: var(--chip); }
.stp input { width: 120px; margin: 0; text-align: center; padding: 7px 6px; font-weight: 600; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stp input::-webkit-inner-spin-button { -webkit-appearance: none; }
.os-px { display: grid; grid-template-columns: 1fr 1fr; text-align: center; padding: 14px 0 8px; margin-top: 10px; background: var(--panel-2); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.os-px .neg { color: var(--sell); }
.os-px .buy { color: var(--buy); }
.os-btns { display: grid; grid-template-columns: 1fr 1fr; flex: none; }
.os-btns button { border: 0; color: #fff; font: inherit; font-weight: 700; font-size: 15px; height: 50px; cursor: pointer; }
.os-btns .sell { background: var(--sell); }
.os-btns .buy { background: var(--buy); }
.os-btns button:disabled { opacity: .6; }
.os-note { padding: 12px 14px; margin: 0; font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- payment pages (admin + user) ---------- */
.flash-info { background: color-mix(in srgb, var(--primary) 8%, var(--panel)); color: var(--text); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); }
.flag-on { color: var(--pos); font-weight: 500; }
.flag-off { color: var(--neg); font-weight: 500; }
.row-acts { display: flex; align-items: center; gap: 2px; }
.row-acts form { margin: 0; display: inline; }
.icon-btn.del:hover { color: var(--neg); }
.tbl-img { width: 44px; height: 44px; object-fit: contain; border-radius: 4px; display: block; background: #fff; }
.atbl td.break, .atbl .break { word-break: break-all; max-width: 320px; }
.atbl tr.row-pending td { background: color-mix(in srgb, #f59e0b 7%, transparent); }
.acct-box { white-space: pre-wrap; word-break: break-word; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font: 13px/1.5 ui-monospace, Consolas, monospace; margin: 10px 0; }
.doc-link { font-size: 12px; word-break: break-all; }
.doc-link.doc-ok { color: var(--pos); }
.doc-link.doc-wait { color: #d97706; }
.doc-link.doc-bad { color: var(--neg); }
.doc-review { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.doc-review select { width: auto; margin: 0; padding: 5px 8px; }
.badge-btn { border: 0; cursor: pointer; font: inherit; font-size: 11px; }
.badge-btn:hover { filter: brightness(.95); }
.dt-filter { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.modal label.check, .adm-card label.check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 4px 0 10px; }
.modal label.check input { width: auto; margin: 0; }
.modal { max-width: 460px; }
.adm-head .refresh { border: 0; font-size: 16px; font-weight: 600; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 6px 0 14px; }
.method summary .m-icon { width: 22px; height: 22px; object-fit: contain; border-radius: 4px; }
.method.tint-0 summary { background: color-mix(in srgb, #0ea5e9 16%, var(--panel)); }
.method.tint-1 summary { background: color-mix(in srgb, var(--primary) 8%, var(--panel)); }
.method.tint-2 summary { background: color-mix(in srgb, var(--pos) 10%, var(--panel)); }
.method.tint-3 summary { background: color-mix(in srgb, var(--navy) 12%, var(--panel)); }
.code-row { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px dashed var(--line); border-radius: 6px; padding: 8px 10px; }
.code-row code { flex: 1; word-break: break-all; font-size: 13px; }
.bank-rows .kv b { display: inline-flex; align-items: center; gap: 6px; word-break: break-all; }
.copy-mini { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; display: inline-grid; }
.copy-mini:hover { color: var(--primary); }
.m-details { margin: 0; color: var(--muted); }
.m-disc { margin: 0; font-size: 12px; color: #d97706; }
.modal.wide { max-width: 640px; }

/* ---------- email verification ---------- */
.trade-page .term-main { display: flex; flex-direction: column; }
.trade-page .trade-grid { flex: 1; min-height: 0; height: auto; }
.verify-bar { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 16px; font-size: 13px; background: color-mix(in srgb, #f59e0b 14%, var(--panel)); border-bottom: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); color: var(--text); flex: none; }
.verify-bar .ic { color: #d97706; flex: none; }
.verify-bar span { flex: 1; min-width: 0; }
.verify-bar b { word-break: break-all; }
.verify-box { text-align: center; padding: 6px 0 4px; }
.verify-box h1 { font-size: 20px; margin: 10px 0 6px; }
.verify-box p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.verify-box .v-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; color: #fff; background: var(--pos); }
.verify-box.bad .v-ic { background: var(--neg); }
@media (max-width: 900px) { .verify-bar { font-size: 12px; padding: 6px 10px; } }

/* order window: header extras (desktop popup only) */
.os-hpx, .os-side, .os-x, .os-bg { display: none; }
@media (min-width: 901px) {
  .os-bg { display: block; position: fixed; inset: 0; z-index: 54; background: rgba(10, 15, 30, .35); }
  .os-bg[hidden] { display: none; }
  .osheet { inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 400px; max-width: calc(100vw - 32px); max-height: 90vh; border-radius: 8px; box-shadow: 0 18px 50px rgba(0, 0, 0, .28); animation: none; }
  .osheet header { display: flex; align-items: center; gap: 14px; padding: 0 10px 0 16px; height: 46px; background: var(--primary); color: #fff; border: 0; }
  .osheet header b { text-align: left; font-size: 14px; }
  .os-back { display: none; }
  .os-hpx { display: inline; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
  .os-side { display: inline-flex; margin-left: auto; background: rgba(255, 255, 255, .18); border-radius: 4px; padding: 2px; gap: 2px; }
  .os-side button { border: 0; background: none; color: rgba(255, 255, 255, .8); font: inherit; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 3px; cursor: pointer; }
  .os-side button.on[data-sd="buy"] { background: #fff; color: var(--buy); }
  .os-side button.on[data-sd="sell"] { background: var(--sell); color: #fff; }
  .os-x { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(255, 255, 255, .6); background: none; color: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; }
  .os-x:hover { background: rgba(255, 255, 255, .15); }
  .osheet .os-tabs { margin: 12px 16px 6px; }
  .osheet .os-f { padding: 0 16px; }
  .osheet .os-px { display: none; }
  .osheet .os-note { order: 7; text-align: left; padding: 10px 16px 0; }
  .osheet .os-m { order: 8; flex-direction: column; gap: 2px; padding: 8px 16px 10px; color: var(--primary); }
  .osheet .os-m b { color: var(--primary); }
  .osheet .os-btns { order: 9; grid-template-columns: 1fr; padding: 0 16px 16px; }
  .osheet .os-btns button { height: 42px; border-radius: 4px; }
  .osheet[data-side="buy"] .os-btns [data-os="sell"], .osheet[data-side="sell"] .os-btns [data-os="buy"] { display: none; }
}

/* All symbols: grouped list */
.wl-grp { border-bottom: 1px solid var(--line); }
.wl-grp summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--panel-2); cursor: pointer; font-size: 12px; font-weight: 600; user-select: none; }
.wl-grp summary::-webkit-details-marker { display: none; }
.wl-grp summary small { color: var(--faint); font-weight: 500; }
.wl-grp summary .chev { margin-left: auto; color: var(--muted); transition: transform .15s; }
.wl-grp[open] summary .chev { transform: rotate(180deg); }
.wl-arow { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-top: 1px solid var(--line-2); cursor: pointer; font-size: 12px; }
.wl-arow:hover { background: var(--panel-2); }
.wl-arow.on { background: var(--chip); }
.wl-arow b { font-weight: 600; }
.wl-arow span { color: var(--faint); font-size: 10px; flex: 1; }
.wl-add { width: 22px; height: 22px; border: 0; border-radius: 3px; background: #16a34a; color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.wl-add:hover { filter: brightness(1.1); }
.wl-add.in { background: var(--chip); color: var(--primary); }

/* account panel (rail logo) */
button.rail-logo { border: 0; background: none; cursor: pointer; border-radius: 10px; }
button.rail-logo:hover .logo-mark, button.rail-logo[aria-expanded="true"] .logo-mark { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent); }
.acc-panel-bg { position: fixed; inset: 0; z-index: 44; background: rgba(10, 15, 30, .2); }
.acc-panel-bg[hidden], .acc-panel[hidden] { display: none; }
.acc-panel { position: fixed; top: 8px; left: calc(var(--rail) + 6px); z-index: 45; width: 270px; max-height: calc(100vh - 16px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .2); padding: 14px; animation: apIn .14s ease-out; }
@keyframes apIn { from { transform: translateX(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.ap-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: 10px; }
.ap-head small { color: var(--muted); font-size: 12px; }
.ap-acc { border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 8px 0; margin: 0 0 10px; }
.ap-acc label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.ap-acc select { width: auto; margin: 0; padding: 4px 6px; font-size: 12px; font-weight: 600; border: 0; background: var(--panel-2); }
.ap-kv { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 3px 0; }
.ap-kv b { color: var(--text); }
.ap-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.ap-tiles a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 8px; font-size: 12px; color: var(--text); text-decoration: none; border: 1px solid var(--line-2); }
.ap-tiles a .ic { color: var(--primary); }
.ap-tiles a:hover { background: var(--panel-2); border-color: var(--line); }
.ap-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; padding: 6px 0; }
.ap-row > span { display: inline-flex; align-items: center; gap: 6px; }
.ap-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.ap-seg button { border: 0; background: none; color: var(--text); font: inherit; font-size: 11px; padding: 5px 9px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.ap-seg button.on { background: var(--navy); color: #fff; }
.ap-logout { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--neg); text-decoration: none; padding: 8px 2px 2px; border-top: 1px solid var(--line-2); margin-top: 6px; }

/* orders / reports */
.modal.xl { max-width: min(1400px, calc(100vw - 32px)); }
.ol-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 18px; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.ol-head > div { display: flex; flex-direction: column; gap: 4px; }
.ol-head b { color: var(--text); }
.atbl-sm { font-size: 12px; }
.atbl-sm thead th { padding: 9px 8px; font-size: 11px; }
.atbl-sm td { padding: 8px; white-space: nowrap; }
.btn-gray { background: #6b7385; color: #fff; }
.btn-gray:hover { filter: brightness(1.1); }
.btn-warn { background: #f5a623; color: #fff; }
.report-filter { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; align-items: end; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.report-filter label { margin: 0; }
.report-filter .rf-btns { display: flex; gap: 6px; }
.report-sum { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.report-sum b { color: var(--text); }
.online-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px color-mix(in srgb, #16a34a 25%, transparent); vertical-align: middle; margin-left: 4px; }
.online-dot.idle { background: #f59e0b; box-shadow: none; }
@media (max-width: 700px) { .ol-head { grid-template-columns: 1fr; } }

/* copy trading (user) */
.page-wide { max-width: 1100px; margin: 0 auto; padding: 18px 16px 60px; }
.copy-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 10px 14px; border-radius: 8px; background: color-mix(in srgb, #f59e0b 10%, var(--panel)); border: 1px solid color-mix(in srgb, #f59e0b 30%, transparent); margin-bottom: 16px; }
.copy-note .ic { color: #d97706; flex: none; margin-top: 1px; }
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.fm-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.fm-card.on { border-color: color-mix(in srgb, var(--pos) 50%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos) 12%, transparent); }
.fm-card header { display: flex; align-items: center; gap: 10px; }
.fm-card header > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fm-card header small { color: var(--muted); font-size: 12px; }
.fm-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--primary); font-weight: 700; font-size: 16px; flex: none; }
.fm-desc { margin: 0; font-size: 13px; color: var(--muted); }
.fm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: var(--panel-2); border-radius: 8px; padding: 8px; text-align: center; }
.fm-stats small { display: block; font-size: 10px; color: var(--muted); }
.fm-stats b { font-size: 13px; font-variant-numeric: tabular-nums; }
.fm-mine { color: var(--muted); }
.fm-acts { display: flex; gap: 6px; align-items: center; margin-top: auto; }
.fm-acts form { margin: 0; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; margin: 6px 0 8px; }
@media (max-width: 600px) { .perm-grid { grid-template-columns: 1fr; } }

/* branding + install */
.logo-img { max-height: 34px; max-width: 180px; object-fit: contain; display: block; }
.logo-lg .logo-img { max-height: 44px; }
img.logo-mark-img { object-fit: cover; background: none; box-shadow: none; padding: 0; }
.brand-up { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.brand-up .lbl { color: var(--muted); font-size: 12px; }
.brand-prev { min-height: 76px; display: flex; align-items: center; padding: 10px; border: 1px dashed var(--line); border-radius: 8px; background: var(--panel-2); }
.ap-install { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--line); background: var(--chip); color: var(--primary); font: inherit; font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 8px; cursor: pointer; margin-top: 6px; }
.ap-install[hidden], .menu-list a[hidden] { display: none; }
.install-steps { margin: 0 0 12px; padding-left: 20px; line-height: 1.9; font-size: 14px; }
input[type="color"] { height: 40px; padding: 4px; width: 90px; }

/* two-step verification */
.auth-title { font-size: 19px; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; justify-content: center; }
.auth-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.otp-input { text-align: center; font-size: 22px; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.tfa-steps { margin: 0 0 12px; padding-left: 20px; font-size: 13px; line-height: 1.8; }
.tfa-qr { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
#tfa-qr { padding: 8px; background: #fff; border-radius: 8px; border: 1px solid var(--line); line-height: 0; }
.tfa-key { display: block; font-size: 15px; letter-spacing: .05em; margin: 4px 0; word-break: break-all; }
.tfa-form { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.codes-box { background: color-mix(in srgb, #f59e0b 10%, var(--panel)); border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); border-radius: 8px; padding: 12px; font-size: 13px; margin-bottom: 12px; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0; }
.codes code { background: var(--panel); padding: 6px 8px; border-radius: 5px; text-align: center; font-size: 14px; }

/* Trading / MAM / PAMM manager lists (user) */
.cm-tabs { display: flex; margin-bottom: 10px; }
.cm-tabs a { min-width: 170px; text-align: center; padding: 14px 18px; font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--text); text-decoration: none; border-radius: 6px 6px 0 0; }
.cm-tabs a.on { background: color-mix(in srgb, var(--primary) 12%, var(--panel)); color: var(--navy); }
[data-theme="dark"] .cm-tabs a.on { color: var(--text); }
.cm-table { display: flex; flex-direction: column; gap: 6px; }
.cm-head, .cm-row { display: grid; grid-template-columns: 1.6fr .6fr 1.3fr .7fr .8fr .8fr .9fr .8fr 1fr; align-items: center; gap: 8px; padding: 10px 14px; text-align: center; font-size: 12px; }
.cm-head.cm-subs, .cm-row.cm-subs { grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr 1fr; }
.cm-head { background: color-mix(in srgb, var(--primary) 12%, var(--panel)); border-radius: 4px; font-weight: 600; text-transform: uppercase; font-size: 11px; color: var(--muted); }
.cm-row { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.03); font-variant-numeric: tabular-nums; }
.cm-name { font-weight: 500; }
.cm-act { display: flex; justify-content: flex-end; }
.cm-act form { margin: 0; }
.cm-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--primary); color: var(--primary); background: var(--panel); border-radius: 4px; padding: 4px 10px; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.cm-btn:hover { background: var(--primary); color: #fff; }
.cm-btn.un { border-color: var(--sell); color: var(--sell); }
.cm-btn.un:hover { background: var(--sell); color: #fff; }
.cm-empty { text-align: center; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.spark { display: inline-flex; align-items: flex-end; gap: 4px; }
.spark b { font-size: 10px; font-weight: 600; }
@media (max-width: 900px) {
  .cm-head { display: none; }
  .cm-row, .cm-row.cm-subs { grid-template-columns: 1fr 1fr; text-align: left; }
  .cm-row .cm-name { grid-column: 1 / -1; font-weight: 700; font-size: 14px; }
  .cm-row [data-l]::before { content: attr(data-l) ": "; color: var(--muted); }
  .cm-act { grid-column: 1 / -1; justify-content: stretch; }
  .cm-act .cm-btn, .cm-act form { width: 100%; justify-content: center; }
  .cm-tabs a { min-width: 0; flex: 1; }
}

/* admin: expandable Followers List rows */
.atbl tr.sub-row > td { padding: 0; background: var(--panel-2); }
.sub-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.sub-tbl th { background: color-mix(in srgb, var(--muted) 28%, var(--panel)); color: var(--text); text-align: left; padding: 7px 10px; font-weight: 600; }
.sub-tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); }
.sub-empty { padding: 12px 14px; font-size: 12px; color: var(--muted); }
[data-sub].on { filter: brightness(.85); }
.adm-nav details.sub2 summary { padding: 10px 20px 10px 44px; font-size: 13px; font-weight: 500; }
.adm-nav details.sub2 summary::before { content: "↳"; color: var(--muted); }
.adm-nav details.sub2 summary .ic { margin-left: auto; transition: transform .15s; color: var(--muted); }
.adm-nav details.sub2[open] summary .ic { transform: rotate(90deg); }
.adm-nav details.sub2 a { padding-left: 64px; }
.book-sum { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: -6px 0 12px; font-size: 13px; font-weight: 600; }
.book-sum b.pri { color: var(--primary); }
.edit-demo { padding: 12px 14px; }
.edit-demo .ed-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.edit-demo .ed-grid { display: grid; grid-template-columns: repeat(2, minmax(160px, 1fr)); gap: 8px 14px; max-width: 640px; margin: 0 0 8px; }
.edit-demo .ed-grid label { margin: 0; font-size: 12px; }
.edit-demo .ed-btns { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.edit-open { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 10px 12px; }
.edit-open form { margin: 0; }
.edit-open label { margin: 0; font-size: 12px; }
.edit-open input { width: 130px; margin: 0; padding: 5px 8px; }

/* phone positions: summary list + swipe cards */
@media (max-width: 900px) {
  .bottom .statusbar { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 14px; font-size: 13px; color: var(--text); }
  .bottom .statusbar > span:not(.total) { display: flex; justify-content: space-between; }
  .bottom .statusbar > span:not(.total) b { color: var(--primary); }
  .bottom .statusbar .total { margin: 6px 0 0; text-align: center; font-size: 14px; }
  .bottom .statusbar .total::before { content: "Profit : "; color: var(--muted); font-weight: 500; }
}
.pc-list { display: flex; flex-direction: column; }
.pc { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-2); background: var(--panel-2); }
.pc-acts { position: absolute; top: 0; right: 0; bottom: 0; display: flex; }
.pc-acts button { width: 72px; border: 0; color: #fff; font: inherit; font-size: 12px; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.pc-acts .pc-edit { background: var(--primary); }
.pc-acts .pc-close { background: var(--sell); }
.pc-main { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.pc.open .pc-main { box-shadow: 4px 0 10px rgba(0,0,0,.08); }
.pc-l { min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.pc-l small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.pc-side { font-size: 12px; font-weight: 600; }
.pc-side.buy { color: var(--buy); }
.pc-side.sell { color: var(--sell); }
.pc-r { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.pc-hint { margin: 0; padding: 10px; text-align: center; font-size: 11px; color: var(--faint); }
/* swipe hint: the card slides left and a hand follows it */
.pc-hand { position: absolute; top: 50%; right: 20%; z-index: 2; margin-top: -6px; pointer-events: none; opacity: 0; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.pc.hinting .pc-main { animation: pc-hint-card 1.8s ease-in-out 2; }
.pc.hinting .pc-hand { animation: pc-hint-hand 1.8s ease-in-out 2; }
@keyframes pc-hint-card { 0%, 15% { transform: none; } 45%, 70% { transform: translateX(var(--hint-x, -144px)); } 95%, 100% { transform: none; } }
@keyframes pc-hint-hand { 0% { opacity: 0; transform: translateX(30px) scale(1.1); } 15% { opacity: 1; transform: translateX(0) scale(.95); } 45% { opacity: 1; transform: translateX(-130px) scale(.95); } 60% { opacity: 0; transform: translateX(-140px) scale(1.05); } 100% { opacity: 0; transform: translateX(-140px); } }
@media (prefers-reduced-motion: reduce) { .pc.hinting .pc-main, .pc.hinting .pc-hand { animation-iteration-count: 1; } }

/* phone: the bottom tabs row scrolls by itself; the page never scrolls sideways */
.bottom, .chart-col, .wl { min-width: 0; }
.bp-tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.bp-tabs::-webkit-scrollbar { display: none; }
.bp-tabs > * { flex: none; }
@media (max-width: 900px) {
  .term-main { overflow-x: hidden; }
  .trade-grid { max-width: 100vw; }
  #bp-toggle { display: none; }
  .bp-tabs .sp { flex: 1 0 8px; }
}

/* ---------- Home ---------- */
.home { display: flex; flex-direction: column; gap: 14px; }
.hm-hero { display: flex; justify-content: space-between; gap: 16px; padding: 22px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, var(--panel)) 0%, var(--panel) 60%); }
.hm-hero h1 { margin: 10px 0 6px; font-size: clamp(22px, 4vw, 30px); line-height: 1.15; color: var(--navy); }
[data-theme="dark"] .hm-hero h1 { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hm-hero h1 { color: var(--text); } }
.hm-hero p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.hm-date { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--chip); color: var(--primary); font-size: 13px; font-weight: 600; }
.hm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 9px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.hm-chip.ok { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 35%, var(--line)); }
.hm-chip.warn { color: #d97706; border-color: color-mix(in srgb, #f59e0b 40%, var(--line)); }
.hm-avatar { width: 64px; height: 64px; flex: none; border-radius: 18px; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary), var(--navy)); box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent); }
.hm-wallet { border-radius: 16px; padding: 16px 20px 20px; color: #e8ecf6; background: radial-gradient(120% 140% at 100% 0%, #2a3a7a 0%, #172048 45%, #111733 100%); box-shadow: 0 14px 30px rgba(17, 23, 51, .25); }
.hm-tabs { display: flex; gap: 18px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.hm-tabs button { border: 0; background: none; color: rgba(232,236,246,.6); font: inherit; font-size: 14px; padding: 8px 0; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.hm-tabs button.on { color: #fff; font-weight: 600; border-bottom-color: #4f8cff; }
.hm-pane small { color: rgba(232,236,246,.65); font-size: 12px; }
.hm-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: clamp(26px, 6vw, 36px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.hm-big span { font-size: 15px; font-weight: 600; color: rgba(232,236,246,.75); }
.hm-big em { font-style: normal; font-size: 18px; color: rgba(232,236,246,.6); margin: 0 4px; }
.hm-refresh { color: rgba(232,236,246,.8); margin-left: 6px; display: inline-grid; }
.hm-refresh:hover { color: #fff; }
.hm-sub { font-size: 13px; color: rgba(232,236,246,.75); margin-bottom: 14px; }
.hm-sub .pos { color: #4ade80; } .hm-sub .neg { color: #f87171; }
.hm-kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.hm-kv.two { grid-template-columns: 1fr 1fr; margin: 10px 0 0; }
.hm-wallet .hm-kv > div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 9px 10px; }
.hm-kv small { display: block; font-size: 11px; }
.hm-kv b { font-size: 15px; font-variant-numeric: tabular-nums; }
.hm-wallet .hm-kv b.pos { color: #4ade80; } .hm-wallet .hm-kv b.neg { color: #f87171; }
.hm-acts { display: flex; justify-content: space-around; gap: 10px; }
.hm-acts > a, .hm-acts button { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; text-decoration: none; font: inherit; font-size: 13px; font-weight: 600; background: none; border: 0; cursor: pointer; }
.hm-acts form { margin: 0; }
.hm-acts span { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid rgba(255,255,255,.75); transition: transform .12s, background .12s; }
.hm-acts .pri span { background: #2f6fea; border-color: #2f6fea; }
.hm-acts > a:hover span, .hm-acts button:hover span { transform: translateY(-2px); background: rgba(255,255,255,.12); }
.hm-acts .pri:hover span { background: #3d7cf5; }
.hm-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 12px; background: var(--panel); border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--line)); color: var(--text); text-decoration: none; }
.hm-cta.info { border-style: solid; border-color: color-mix(in srgb, #f59e0b 45%, var(--line)); }
.hm-cta b { display: block; font-size: 15px; } .hm-cta small { color: var(--muted); font-size: 13px; }
.hm-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.hm-stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.hm-stats small { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.hm-stats b { font-size: 17px; font-variant-numeric: tabular-nums; }
.hm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hm-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.hm-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hm-card h2 { margin: 0; font-size: 15px; }
.hm-card header a { font-size: 12px; display: inline-flex; align-items: center; gap: 2px; }
.hm-mk, .hm-tx { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.hm-mk div, .hm-tx div { display: flex; flex-direction: column; min-width: 0; }
.hm-mk small, .hm-tx small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-mk .r { text-align: right; align-items: flex-end; }
.hm-mk:hover { background: var(--panel-2); }
.hm-ref p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.hm-ref-link { display: flex; gap: 8px; align-items: center; background: var(--panel-2); border: 1px dashed var(--line); border-radius: 8px; padding: 6px 6px 6px 10px; }
.hm-ref-link code { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ref .hm-kv > div { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; }
@media (max-width: 1100px) { .hm-grid { grid-template-columns: 1fr 1fr; } .hm-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) {
  .hm-hero { padding: 16px; } .hm-avatar { width: 48px; height: 48px; font-size: 22px; border-radius: 14px; }
  .hm-kv { grid-template-columns: 1fr 1fr; }
  .hm-grid { grid-template-columns: 1fr; }
  .hm-stats { grid-template-columns: repeat(2, 1fr); }
  .hm-wallet { padding: 12px 14px 16px; }
}

/* ---- Profile photo, Settings page, Support ---- */
.av-img { object-fit: cover; display: block; }
.hm-avatar.av-img { padding: 0; }
.ap-me { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; margin-top: 8px; }
.ap-av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--navy)); }
.adm-av { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.adm-av-img { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--primary), var(--navy)); }
.st-page { max-width: 560px; }
.st-profile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 22px 16px 18px; margin-bottom: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.st-photo label { position: relative; display: block; cursor: pointer; margin-bottom: 8px; }
.st-av { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary), var(--navy)); box-shadow: 0 0 0 4px var(--panel), 0 0 0 5px var(--line); }
.st-photo label.busy .st-av { opacity: .45; }
.st-photo label.busy::after { content: ''; position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 3px solid var(--primary); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.st-cam { position: absolute; right: -2px; bottom: 2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; border: 2px solid var(--panel); }
.st-name { font-size: 18px; }
.st-sub { font-size: 12px; color: var(--muted); }
.st-sub .acc-type { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; color: #fff; }
.st-meta { font-size: 13px; color: var(--muted); }
.st-meta b { color: var(--text); }
.st-hint { font-size: 11px; color: var(--faint); margin-top: 6px; }
.st-rm .linklike { background: none; border: 0; padding: 0; margin-top: 6px; font: inherit; font-size: 12px; color: var(--danger, #e5484d); cursor: pointer; }
.st-accs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.st-acc { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.st-acc.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.st-acc-top { display: flex; justify-content: space-between; align-items: center; }
.st-acc-top .acc-type { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; color: #fff; }
.st-acc-top small, .st-acc > small { color: var(--muted); font-size: 11px; }
.st-acc > b { font-size: 17px; margin-top: 4px; }
.st-acc-btn { margin-top: 8px; border: 0; border-radius: 8px; padding: 7px 8px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; background: var(--primary); color: #fff; text-align: center; }
.st-acc-btn.act { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); display: inline-flex; justify-content: center; align-items: center; gap: 4px; cursor: default; }
.st-menu { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.st-menu > a, .st-row, .st-row-form button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line-2); background: none; color: var(--text); font: inherit; font-size: 14px; text-decoration: none; text-align: left; cursor: pointer; }
.st-menu > :last-child, .st-menu > :last-child button { border-bottom: 0; }
.st-menu > a[hidden] { display: none; }
.st-menu > a:hover, .st-row-form button:hover { background: var(--panel-2); }
.st-menu > a > .ic:last-child, .st-row-form button > .ic:last-child { margin-left: auto; color: var(--faint); }
.st-l { flex: 1; min-width: 0; }
.st-l small { color: var(--faint); font-size: 11px; margin-left: 4px; }
.st-row select { width: auto; padding: 5px 8px; font-size: 13px; }
.st-ic { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.c-green { background: #16a34a; } .c-teal { background: #0d9488; } .c-orange { background: #f97316; } .c-purple { background: #7c3aed; }
.c-blue { background: #2563eb; } .c-red { background: #e5484d; } .c-yellow { background: #f5b301; } .c-gray { background: #64748b; }
.st-pw { padding: 12px 14px 14px; border-bottom: 1px solid var(--line-2); background: var(--panel-2); }
.st-pw[hidden] { display: none; }
.sup-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 34px 18px; }
.sup-wa { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: #25d366; box-shadow: 0 10px 24px rgba(37, 211, 102, .35); margin-bottom: 6px; }
.sup-card p { margin: 0; max-width: 340px; }
.sup-btn { background: #25d366; color: #fff; border-radius: 999px; padding: 10px 26px; font-weight: 600; }
.sup-btn:hover { background: #1ebe5a; color: #fff; }
@media (max-width: 420px) { .st-accs { gap: 8px; } .st-acc { padding: 10px; } .st-acc > b { font-size: 15px; } }

.wl-closed { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .3px; padding: 1px 6px; border-radius: 4px; color: var(--sell); background: color-mix(in srgb, var(--sell) 12%, transparent); }

/* ---- admin view of a user, online status, forgot password ---- */
.imp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; background: #7c3aed; color: #fff; font-size: 13px; }
.imp-bar .btn { margin-left: auto; background: #fff; color: #7c3aed; }
.online-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .4px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); vertical-align: middle; }
.online-badge i, .online-dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa3b2; display: inline-block; }
.online-badge.on { color: #15803d; background: color-mix(in srgb, #16a34a 12%, transparent); border-color: color-mix(in srgb, #16a34a 40%, var(--line)); }
.online-badge.on i, .online-dot.on { background: #16a34a; box-shadow: 0 0 0 3px color-mix(in srgb, #16a34a 25%, transparent); }
.online-dot { margin-right: 7px; vertical-align: middle; }
.forgot { text-align: right; margin: -2px 0 6px; font-size: 12px; }
.otp-input { letter-spacing: 8px; font-size: 22px; text-align: center; font-weight: 700; }

.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-right: 42px !important; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; border-radius: 6px; }
.pw-eye:hover { color: var(--text); }

/* ---- Settings › Profile / Documents ---- */
.pf-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.pf-tabs a { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 8px; font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none; }
.pf-tabs a.on { background: var(--navy); color: #fff; }
.pf-card label { display: block; margin-bottom: 12px; }
.pf-card label small { display: block; margin-top: 4px; font-weight: 400; }
.pf-card input[readonly] { background: var(--panel-2); color: var(--muted); }
.pf-h { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }

/* ---- KYC ---- */
.kyc-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; text-decoration: none; margin: 4px 0 2px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.kyc-chip.ok { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 40%, var(--line)); background: color-mix(in srgb, var(--pos) 10%, transparent); }
.kyc-chip.warn { color: #d97706; border-color: color-mix(in srgb, #f59e0b 45%, var(--line)); background: color-mix(in srgb, #f59e0b 10%, transparent); }
.kyc-chip.bad { color: var(--sell); border-color: color-mix(in srgb, var(--sell) 45%, var(--line)); background: color-mix(in srgb, var(--sell) 10%, transparent); }
.kyc-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.kyc-sum .kyc-chip { margin: 0; }
.doc-req { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: .3px; vertical-align: middle; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.doc-req.req { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.doc-req.off { text-decoration: line-through; opacity: .7; }
.kyc-need { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 26px 18px; }
.kyc-need p { margin: 0; }
.kyc-need-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #d97706; background: color-mix(in srgb, #f59e0b 15%, transparent); }
.kyc-rules { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 12px; }
.kyc-rules .doc-req { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11px; }
.kyc-set td:not(:first-child), .kyc-set th:not(:first-child) { text-align: center; width: 90px; }
.doc-card { display: flex; gap: 12px; padding: 10px; margin-bottom: 10px; border: 1px solid var(--line); border-left: 4px solid #f59e0b; border-radius: 8px; background: var(--panel); }
.doc-card.st-verified { border-left-color: var(--pos); }
.doc-card.st-rejected { border-left-color: var(--sell); }
.doc-thumb { width: 96px; height: 72px; flex: none; border-radius: 6px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; color: var(--muted); font-size: 11px; text-decoration: none; border: 1px solid var(--line-2); }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-thumb span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.doc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.doc-info small { font-size: 11px; }
.doc-info input { padding: 6px 8px; font-size: 12px; }
.doc-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.doc-btns .btn { display: inline-flex; align-items: center; gap: 4px; }
.doc-btns .btn[disabled] { opacity: .45; cursor: default; }
.doc-override { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line-2); }
@media (max-width: 480px) { .doc-thumb { width: 72px; height: 60px; } }
.doc-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .doc-title .badge { width: auto; }
/* ---- admin: import symbols ---- */
.imp-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; background: var(--panel); padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.imp-bar input { flex: 1; min-width: 180px; }
.imp-cat { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.imp-cat > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; flex-wrap: wrap; }
.imp-all { margin-left: auto; font-size: 12px; }
.imp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; padding: 0 12px 12px; }
.imp-item { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border: 1px solid var(--line-2); border-radius: 6px; cursor: pointer; font-size: 12px; }
.imp-item[hidden] { display: none; }
.imp-item.on { opacity: .55; cursor: default; }
.imp-item span { display: flex; flex-direction: column; min-width: 0; }
.imp-item small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-closed { font-style: normal; }
/* ---- email templates ---- */
.tpl-card { border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; margin-bottom: 10px; }
.tpl-card[open] { padding-bottom: 12px; }
.tpl-card > summary { display: flex; gap: 8px; align-items: center; padding: 12px 0; cursor: pointer; flex-wrap: wrap; }
.tpl-card textarea { font-family: inherit; }
.tpl-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tpl-foot .btn { margin-left: auto; }
.mail-tick { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 6px 0; }
.ok-msg { color: var(--pos); font-size: 13px; margin: 0 0 10px; }
.auth-title { font-size: 18px; margin: 4px 0 6px; }

/* ---- Withdraw ---- */
.wd-sum { padding: 16px 18px; margin-bottom: 12px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--navy), #2a3a7a); display: flex; flex-direction: column; gap: 8px; }
.wd-sum > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.wd-sum small { opacity: .8; font-size: 12px; }
.wd-sum b { font-size: 26px; }
.wd-sum b span { font-size: 13px; opacity: .8; font-weight: 600; }
.wd-sum-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; opacity: .9; }
.wd-sum-row b { font-size: 13px; }
.wd-sum-note { font-size: 11px !important; opacity: .7 !important; }
.dp-ic.wd { background: color-mix(in srgb, var(--primary) 14%, var(--panel)); color: var(--primary); }
.dp-warn.wd-avail { background: color-mix(in srgb, var(--primary) 9%, var(--panel)); }
.dp-warn.wd-avail .ic { color: var(--primary); }
.wd-nets { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.wd-net { margin: 0 !important; }
.wd-net input { position: absolute; opacity: 0; pointer-events: none; }
.wd-net span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 600; font-size: 13px; cursor: pointer; }
.wd-net input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.wd-net input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.wd-amt { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.wd-amt input { flex: 1; }

/* ---- Deposit: method cards, pay details, history ---- */
.dp-ic { position: relative; }
.dp-net-tag { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800; color: #fff; background: var(--primary); border: 2px solid var(--panel-2); }
.dp-ic { overflow: visible; }
.dp-ic > img { border-radius: 50%; }
.dp-net-tag.img { width: 22px; height: 22px; padding: 0; overflow: hidden; background: #fff; }
.dp-net-tag.img img { width: 100%; height: 100%; object-fit: cover; }
.net-ic-prev { display: inline-grid; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line); vertical-align: middle; margin-right: 6px; }
.net-ic-prev img { width: 100%; height: 100%; object-fit: cover; }
.net-box { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.net-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--panel); }
.net-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.net-head code { font-size: 12px; flex: 1; min-width: 160px; }
.net-item details summary { cursor: pointer; margin-top: 6px; color: var(--primary); }
.net-form { margin-top: 8px; }
.net-form label { font-size: 12px; }
.net-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.net-foot .btn { margin-left: auto; }
.dp-hist-link { display: flex; align-items: center; gap: 8px; padding: 11px 14px; margin-bottom: 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.dp-hist-link > .ic:last-child { margin-left: auto; color: var(--faint); }
.dp-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.dp-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--panel-2); border: 1px solid transparent; color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; }
.dp-card:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--panel)); }
.dp-card > .ic:last-child { margin-left: auto; color: var(--faint); flex: none; }
.dp-ic { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: color-mix(in srgb, var(--pos) 14%, var(--panel)); color: var(--pos); }
.dp-ic img { width: 100%; height: 100%; object-fit: cover; }
.dp-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dp-txt b { font-size: 15px; }
.dp-txt small { font-size: 12px; color: var(--muted); }
.dp-warn { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; margin-bottom: 12px; border-radius: 12px; background: color-mix(in srgb, #f97316 10%, var(--panel)); color: var(--text); }
.dp-warn .ic { color: #ea580c; flex: none; margin-top: 2px; }
.dp-warn div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.dp-pay { display: flex; flex-direction: column; gap: 10px; }
.dp-qr { align-self: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; line-height: 0; }
.dp-qr img, .dp-qr canvas { width: 180px; height: 180px; display: block; }
.dp-lbl { font-size: 12px; color: var(--muted); margin: 4px 0 -4px; }
.dp-addr { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.dp-addr code { flex: 1; min-width: 0; font-size: 13px; word-break: break-all; background: none; padding: 0; }
.dp-notes { font-size: 13px; }
.dp-notes ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.dp-form h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 12px; }
.dp-form label { display: block; margin-bottom: 12px; }
.dp-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line-2); }
.dp-row:last-child { border-bottom: 0; }
.dp-row-ic { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); }
.dp-row-ic.pos { color: var(--pos); background: color-mix(in srgb, var(--pos) 12%, transparent); }
.dp-row-ic.neg { color: var(--sell); background: color-mix(in srgb, var(--sell) 12%, transparent); }
.dp-row-ic.warn { color: #d97706; background: color-mix(in srgb, #f59e0b 14%, transparent); }
.dp-row-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dp-row-txt small { font-size: 11px; color: var(--muted); }
.dp-row-txt small.neg { color: var(--sell); }
.dp-row-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; white-space: nowrap; }

/* ---------- KYC page ---------- */
.st-kyc { margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: color-mix(in srgb, #f59e0b 14%, transparent); color: #d97706; }
.st-kyc.verified { background: color-mix(in srgb, var(--pos) 14%, transparent); color: var(--pos); }
.st-kyc.rejected { background: color-mix(in srgb, var(--sell) 14%, transparent); color: var(--sell); }
.st-menu > a .st-kyc + svg { margin-left: 6px; }
.kyc-head { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.kyc-head-top { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.kyc-head-top b { display: block; font-size: 15px; }
.kyc-head-top small { color: var(--muted); font-size: 12px; }
.kyc-head-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, #f59e0b 15%, transparent); color: #d97706; }
.kyc-verified .kyc-head-ic { background: color-mix(in srgb, var(--pos) 15%, transparent); color: var(--pos); }
.kyc-rejected .kyc-head-ic { background: color-mix(in srgb, var(--sell) 15%, transparent); color: var(--sell); }
.kyc-pending .kyc-head-ic { background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); }
.kyc-bar { height: 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); overflow: hidden; }
.kyc-bar span { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #22c55e, #16a34a); transition: width .4s; }
.kyc-bar-txt { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.kyc-bar-txt b { color: var(--text); }
.kyc-steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: kyc; }
.kyc-step { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.kyc-step-h { display: flex; gap: 12px; align-items: center; }
.kyc-step-h > div { flex: 1; min-width: 0; }
.kyc-step-h b { display: block; font-size: 14px; }
.kyc-step-h small { color: var(--muted); font-size: 12px; }
.kyc-num { flex: none; position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--primary); }
.kyc-step.st-verified .kyc-num { background: color-mix(in srgb, var(--pos) 15%, transparent); color: var(--pos); }
.kyc-step.st-verified .kyc-num::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--panel); background: var(--pos) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 9px no-repeat; }
.kyc-step.st-rejected .kyc-num { background: color-mix(in srgb, var(--sell) 14%, transparent); color: var(--sell); }
.kyc-pd { display: flex; justify-content: space-between; gap: 10px; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); font-size: 13px; }
.kyc-pd span { color: var(--muted); }
.kyc-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--primary); text-decoration: none; }
.kyc-docs { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.kyc-doc { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; margin: 0; }
.kyc-doc.st-verified { border-style: solid; border-color: color-mix(in srgb, var(--pos) 35%, var(--line)); }
.kyc-doc.st-rejected { border-style: solid; border-color: color-mix(in srgb, var(--sell) 40%, var(--line)); }
.kyc-doc.busy { opacity: .55; pointer-events: none; }
.kyc-thumb { flex: none; width: 72px; height: 52px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); }
.kyc-doc[data-frame="face"] .kyc-thumb { width: 52px; border-radius: 50%; }
.kyc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.kyc-doc-b { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.kyc-doc-b small { flex-basis: 100%; font-size: 12px; }
.kyc-st { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 20px; background: var(--panel-2); color: var(--muted); }
.kyc-st.verified { background: color-mix(in srgb, var(--pos) 14%, transparent); color: var(--pos); }
.kyc-st.pending { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.kyc-st.rejected { background: color-mix(in srgb, var(--sell) 14%, transparent); color: var(--sell); }
.kyc-btns { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.kyc-btns .btn { margin: 0; }

/* camera screen */
html.cam-open, html.cam-open body { overflow: hidden; }
.cam { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #0b0f17; color: #fff; padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0); }
.cam-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; font-size: 15px; }
.cam-ic { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.cam-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.cam-stage video, .cam-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-shot { object-fit: contain; background: #0b0f17; z-index: 2; }
.cam-stage video.mirror { transform: scaleX(-1); }
.cam-mask { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); border: 3px solid #fff; box-shadow: 0 0 0 200vmax rgba(11,15,23,.62); }
.cam-face .cam-mask { width: min(62vw, 300px); aspect-ratio: 3 / 4; border-radius: 50%; }
.cam-card .cam-mask { width: min(88vw, 520px); aspect-ratio: 1.586; border-radius: 14px; border-style: dashed; }
.cam-face .cam-mask::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 3px solid #22c55e; opacity: 0; animation: cam-pulse 1.8s ease-out infinite; }
@keyframes cam-pulse { 0% { opacity: .9; transform: scale(.97); } 100% { opacity: 0; transform: scale(1.08); } }
.cam-msg { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; background: #0b0f17; }
.cam-msg p { margin: 0; max-width: 320px; font-size: 14px; color: #cbd5e1; }
.cam-tip { padding: 12px 20px 4px; text-align: center; }
.cam-tip b { display: block; font-size: 15px; }
.cam-tip small { color: #94a3b8; font-size: 12px; }
.cam-bar { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 14px 16px 22px; }
.cam-bar[hidden] { display: none; }
.cam-bar2 .btn { flex: 1; max-width: 200px; }
.cam-bar2 .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }
.cam-shoot { width: 70px; height: 70px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 4px; cursor: pointer; }
.cam-shoot span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .1s; }
.cam-shoot:active span { transform: scale(.88); }

/* admin: per-user KYC steps */
.kyc-adm { margin-bottom: 16px; }
.kyc-adm-h { display: flex; align-items: center; gap: 10px; }
.kyc-adm-h h2 { margin: 0; }
.kyc-rows { display: flex; flex-direction: column; margin: 10px 0 14px; max-width: 640px; }
.kyc-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.kyc-row > b { flex: 1; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.kyc-row.off > b, .kyc-row.off .kyc-req, .kyc-row.off .kyc-row-st { opacity: .45; }
.kyc-row .kyc-req { margin: 0; font-size: 12px; }
.kyc-row-st { min-width: 74px; text-align: right; }
.tg { position: relative; display: inline-block; flex: none; width: 36px; height: 20px; margin: 0; }
.tg input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.tg span { position: absolute; inset: 0; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--line); transition: background .15s; }
.tg span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #9ca3af; transition: transform .15s, background .15s; }
.tg input:checked + span { background: #22c55e; border-color: #22c55e; }
.tg input:checked + span::after { transform: translateX(16px); background: #fff; }
.tg input:disabled + span { opacity: .6; }
.kyc-prog { max-width: 640px; margin-bottom: 12px; font-size: 13px; }
.kyc-prog .kyc-bar { margin-top: 6px; }
.kyc-adm-btns { display: flex; gap: 8px; }

/* Admin holds (trading / withdrawal paused) */
.hold-adm { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.hold-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.hold-row.on { border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 7%, transparent); }
.hold-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hold-txt input { margin-top: 4px; width: 100%; max-width: none; }
.hold-row:not(.on) .hold-txt input { opacity: .55; }
.hold-need .kyc-need-ic { color: #dc2626; background: color-mix(in srgb, #ef4444 14%, transparent); }
.hold-reason { width: 100%; max-width: 360px; text-align: left; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #ef4444 9%, transparent); border: 1px solid color-mix(in srgb, #ef4444 30%, transparent); }
.hold-reason small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #dc2626; font-weight: 600; }
.hold-reason p { margin: 3px 0 0; font-size: 14px; }
.hold-bar { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; font-size: 13px; line-height: 1.35; color: #b91c1c; background: color-mix(in srgb, #ef4444 11%, var(--panel, #fff)); border-bottom: 1px solid color-mix(in srgb, #ef4444 30%, transparent); }
.hold-bar svg { flex: none; margin-top: 1px; }
[data-theme="dark"] .hold-bar { color: #fca5a5; }

/* App-like phone pages: no double-tap zoom, no text auto-resize; iOS zooms into inputs under 16px, so use 16px there */
body.term, body.auth-body { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 760px) {
  body.term input:not([type="checkbox"]):not([type="radio"]), body.term select, body.term textarea,
  body.auth-body input:not([type="checkbox"]):not([type="radio"]), body.auth-body select { font-size: 16px; }
}

/* Admin › user: email this user */
.um-mail { display: flex; flex-direction: column; }
.um-to { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); font-size: 13px; }
.um-to span { color: var(--muted); font-size: 12px; }
.um-mail button { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }
.um-sent { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.um-sent div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-2); }

/* Deposit coupons */
.dp-offers { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.dp-offer { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; border: 1px dashed #f59e0b; border-radius: 12px; color: var(--text); font: inherit; cursor: pointer;
  background: linear-gradient(135deg, color-mix(in srgb, #f59e0b 16%, var(--panel)), color-mix(in srgb, #ef4444 10%, var(--panel))); }
.dp-offer-ic { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #f59e0b, #ef4444); }
.dp-offer-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dp-offer-t small { color: var(--muted); }
.dp-offer-t code { font-weight: 700; color: var(--text); letter-spacing: .04em; }
.dp-offer-copy { flex: none; font-size: 12px; font-weight: 600; color: #d97706; }
.dp-coupon { display: flex; gap: 8px; align-items: center; margin-top: 5px; }
.dp-coupon input { margin: 0; text-transform: uppercase; letter-spacing: .04em; }
.dp-coupon-msg { display: block; margin-top: 6px; font-size: 12px; }
.dp-row-cp { display: inline-flex; align-items: center; gap: 4px; color: #d97706; }
.cp-code { display: flex; gap: 8px; align-items: center; margin-top: 5px; }
.cp-code input { margin: 0; }
.cp-eg { color: var(--primary); margin: 0 0 12px; }
.cp-tag { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }

/* Offer popup styles: assets/promo.css */

/* Admin › Popups & Ads */
.pm-aud-extra[hidden] { display: none; }
.pm-prev { width: 120px; border-radius: 10px; display: block; margin: 6px 0; }
.pm-master { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 14px; border-left: 4px solid var(--line); }
.pm-master.on { border-left-color: #22c55e; }
.pm-master div { display: flex; flex-direction: column; gap: 2px; }
.cp-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 12px; }
.cp-sum div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.cp-sum small { color: var(--muted); font-size: 11px; }
.cp-sum b { font-size: 18px; }

/* Admin › Website */
.ws-logo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.ws-logo img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(247,185,40,.35)); }
.ws-logo label { flex: 1; min-width: 220px; margin: 0; }
.ws-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.ws-item > div:first-of-type { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ws-item.off { opacity: .5; }
.ws-thumb { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; }
.lic { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; margin-bottom: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); }
.lic > div { display: flex; flex-direction: column; gap: 3px; }
.lic-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #d97706; background: color-mix(in srgb, #f59e0b 15%, transparent); }
.lic-valid { border-color: color-mix(in srgb, #22c55e 45%, transparent); }
.lic-valid .lic-ic { color: #16a34a; background: color-mix(in srgb, #22c55e 15%, transparent); }
.lic-invalid .lic-ic, .lic-expired .lic-ic, .lic-domain .lic-ic { color: #dc2626; background: color-mix(in srgb, #ef4444 14%, transparent); }

/* Rate us (client review) */
.rv-status { padding: 16px 18px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; border-left: 4px solid #f59e0b; }
.rv-status.rv-approved { border-left-color: #22c55e; }
.rv-status.rv-rejected { border-left-color: #ef4444; }
.rv-status p { margin: 0; }
.rv-stars { color: #f5b70a; letter-spacing: 2px; }
.rv-stars span { color: var(--line); }
.rv-form { display: flex; flex-direction: column; }
.rv-pick { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin: 6px 0 14px; }
.rv-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-pick label { font-size: 38px; line-height: 1; color: var(--line); cursor: pointer; margin: 0; transition: color .15s, transform .15s; }
.rv-pick input:checked ~ label, .rv-pick label:hover, .rv-pick label:hover ~ label { color: #f5b70a; }
.rv-pick label:hover { transform: scale(1.12); }
.rv-pick input:focus-visible + label { outline: 2px solid #f5b70a; border-radius: 6px; }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; }
.rv-adm, .ct-adm { align-items: flex-start; }
.rv-adm p, .ct-adm p { margin: 6px 0 0; white-space: normal; }
.ws-flags { display: flex; gap: 6px; margin-top: 4px; }
.ws-flags form { margin: 0; }
.ws-flag { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); background: none; color: var(--muted); font: 600 11px inherit; cursor: pointer; }
.ws-flag.on { color: #fff; background: #2563eb; border-color: #2563eb; }

/* Website dashboard */
.sd-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 170px; margin: 8px 0 6px; }
.sd-bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.sd-bar span { width: 100%; min-height: 3px; display: flex; align-items: flex-end; border-radius: 5px 5px 0 0; background: color-mix(in srgb, #2563eb 28%, transparent); overflow: hidden; }
.sd-bar span > i { display: block; width: 100%; background: #2563eb; }
.sd-bar small { font-size: 10px; color: var(--muted); }
.sd-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 8px; vertical-align: -1px; }
.sd-key.v { background: color-mix(in srgb, #2563eb 30%, transparent); }
.sd-key.u { background: #2563eb; }
.sd-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.sd-links a { display: flex; flex-direction: column; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.sd-links a:hover { border-color: #2563eb; background: color-mix(in srgb, #2563eb 6%, transparent); }
.sd-links svg { color: #2563eb; margin-bottom: 4px; }
.sd-links small { color: var(--muted); font-size: 12px; }
.ws-payic { width: 42px; height: 42px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: #d97706; }
.ws-payic img { max-width: 34px; max-height: 30px; object-fit: contain; }
.ws-paylogo { display: flex; align-items: center; gap: 12px; margin: -4px 0 12px; }
.ws-paylogo img { height: 40px; max-width: 120px; object-fit: contain; padding: 6px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); }

/* ---------- sign-in pages (client + admin): glass card, light + dark ---------- */
.auth-glass { --ag-gold: #f5b82e; --ag-gold-2: #f59e0b; --ag-ink: #3a2400;
  --ag-bg: #eef2f8; --ag-card: rgba(255,255,255,.62); --ag-edge: rgba(255,255,255,.85); --ag-in: rgba(255,255,255,.7); --ag-in-line: rgba(20,30,60,.12);
  --ag-blob1: rgba(245,184,46,.38); --ag-blob2: rgba(59,130,246,.28); --ag-blob3: rgba(236,72,153,.16); --ag-grid: rgba(20,30,60,.05);
  background: var(--ag-bg); position: relative; overflow-x: hidden; }
[data-theme="dark"] .auth-glass { --ag-bg: #07090f; --ag-card: rgba(22,26,36,.58); --ag-edge: rgba(255,255,255,.08); --ag-in: rgba(0,0,0,.28); --ag-in-line: rgba(255,255,255,.1);
  --ag-blob1: rgba(245,158,11,.20); --ag-blob2: rgba(37,99,235,.20); --ag-blob3: rgba(168,85,247,.10); --ag-grid: rgba(255,255,255,.03); }
.ag-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--ag-grid) 1px, transparent 1px), linear-gradient(90deg, var(--ag-grid) 1px, transparent 1px); background-size: 46px 46px; }
.ag-bg i { position: absolute; border-radius: 50%; filter: blur(70px); }
.ag-bg i:nth-child(1) { width: 46vmax; height: 46vmax; right: -12vmax; top: -14vmax; background: var(--ag-blob1); }
.ag-bg i:nth-child(2) { width: 40vmax; height: 40vmax; left: -14vmax; bottom: -16vmax; background: var(--ag-blob2); }
.ag-bg i:nth-child(3) { width: 24vmax; height: 24vmax; left: 30%; top: 55%; background: var(--ag-blob3); }
.auth-glass .auth-wrap, .auth-glass .auth-foot { position: relative; z-index: 1; }
.ag-theme { position: fixed; z-index: 2; top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--ag-edge); background: var(--ag-card); color: var(--text); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.ag-theme .ic:last-child, [data-theme="dark"] .ag-theme .ic:first-child { display: none; }
[data-theme="dark"] .ag-theme .ic:last-child { display: block; }
.auth-card.ag-card { max-width: 390px; position: relative; margin-top: 46px; padding: 62px 30px 26px; text-align: center; border-radius: 22px;
  background: var(--ag-card); border: 1px solid var(--ag-edge); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 30px 70px -20px rgba(15,23,42,.35), inset 0 1px 0 rgba(255,255,255,.12); }
.ag-mark { position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); padding: 6px; border-radius: 50%; line-height: 0;
  background: linear-gradient(145deg, #ffe08a, #d98a00); box-shadow: 0 12px 30px -6px rgba(245,158,11,.55); }
.ag-mark .logo-mark { width: 80px; height: 80px; font-size: 38px; box-shadow: inset 0 0 0 4px rgba(255,255,255,.35); }
.ag-eyebrow { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ag-gold-2); margin-bottom: 8px; }
.ag-title { font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.ag-gold { background: linear-gradient(90deg, var(--ag-gold), var(--ag-gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ag-sub { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 0 auto 20px; max-width: 290px; }
.ag-card .err { text-align: left; background: color-mix(in srgb, var(--neg) 12%, transparent); border: 1px solid color-mix(in srgb, var(--neg) 30%, transparent); padding: 8px 10px; border-radius: 10px; margin: 0 0 12px; }
.ag-card .ok-msg { border-radius: 10px; }
.ag-card .field { margin-bottom: 12px; }
.ag-field { display: block; text-align: left; font-size: 12px; font-weight: 600; margin-bottom: 14px; }
.auth-card.ag-card input:not([type="checkbox"]), .auth-card.ag-card select { display: block; width: 100%; margin: 0; padding: 11px 13px; font-size: 14px; color: var(--text);
  background: var(--ag-in); border: 1px solid var(--ag-in-line); border-radius: 11px; transition: border-color .15s, box-shadow .15s; }
.auth-card.ag-card input:focus, .auth-card.ag-card select:focus { outline: 0; border-color: var(--ag-gold-2); box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.auth-card.ag-card input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 40px var(--ag-in) inset; transition: background-color 9999s; }
.ag-field > input, .ag-field > .pw-wrap { margin-top: 6px !important; }
.auth-card.ag-card .pw-wrap > input { padding-right: 44px; }
.ag-card .pw-eye { right: 5px; }
/* phone: country code + number in one box */
.ag-card .phone-field { display: flex; align-items: center; gap: 0; border: 1px solid var(--ag-in-line); border-radius: 11px; background: var(--ag-in); }
.ag-card .phone-field:focus-within { border-color: var(--ag-gold-2); box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.auth-card.ag-card .phone-field select, .auth-card.ag-card .phone-field input { background: transparent; border: 0 !important; box-shadow: none; }
.auth-card.ag-card .phone-field select { width: 104px; flex: none; padding-right: 4px; border-right: 1px solid var(--ag-in-line) !important; border-radius: 11px 0 0 11px; }
.ag-btn { width: 100%; margin-top: 6px; padding: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  border: 0; border-radius: 12px; font: 700 14px var(--font); color: var(--ag-ink); background: linear-gradient(180deg, #ffd25e, var(--ag-gold-2));
  box-shadow: 0 10px 24px -8px rgba(245,158,11,.6), inset 0 1px 0 rgba(255,255,255,.5); transition: transform .12s, filter .12s; }
.ag-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.ag-btn:active { transform: none; }
.ag-card .row2 .ag-btn, .ag-card .row2 .ag-ghost { margin-top: 0; }
.ag-ghost { padding: 12px; border-radius: 12px; font-weight: 600; color: var(--text); background: var(--ag-in); border: 1px solid var(--ag-in-line); }
.ag-ghost:hover { border-color: var(--ag-gold-2); }
.ag-card .btn-primary { border-radius: 12px; border: 0; padding: 12px; font-weight: 700; color: var(--ag-ink); background: linear-gradient(180deg, #ffd25e, var(--ag-gold-2)); box-shadow: 0 10px 24px -8px rgba(245,158,11,.6); }
.ag-card .steps { margin: 0 0 16px; }
.ag-card .steps i { width: 32px; height: 4px; background: var(--ag-in-line); }
.ag-card .steps i.on { background: var(--ag-gold-2); }
.ag-card .check { text-align: left; }
.ag-card .check a, .ag-card .forgot a, .ag-card .alt a { color: var(--ag-gold-2); font-weight: 600; }
.ag-card .forgot { text-align: right; }
.ag-note { display: flex; gap: 6px; align-items: center; justify-content: center; font-size: 11.5px; color: var(--muted); margin: 14px 0 0; }
.ag-back { margin: 10px 0 0; font-size: 12px; }
.ag-back a { color: var(--muted); }
.ag-card .auth-title { justify-content: center; }
.ag-card .otp-input { text-align: center; letter-spacing: .3em; }
.ag-card .verify-box { padding-top: 0; }
.ag-foot { justify-content: center; gap: 6px 18px; }
@media (max-width: 480px) { .auth-card.ag-card { padding: 58px 20px 22px; } .ag-title { font-size: 22px; } }

/* Admin › Website › SEO: Google result preview */
.gp { padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid #e5e7eb; font-family: Arial, Helvetica, sans-serif; }
.gp-site { display: flex; align-items: center; gap: 10px; }
.gp-site img { width: 28px; height: 28px; border-radius: 50%; background: #f1f3f4; padding: 2px; }
.gp-site b { display: block; font-size: 14px; color: #202124; font-weight: 400; }
.gp-site small { display: block; font-size: 12px; color: #4d5156; }
.gp-title { margin-top: 6px; font-size: 20px; line-height: 1.3; color: #1a0dab; }
.gp-desc { margin-top: 3px; font-size: 14px; line-height: 1.58; color: #4d5156; }
.gp-steps { padding-left: 18px; display: grid; gap: 8px; }
.gp-steps code { word-break: break-all; }

/* Admin › Client reviews: add-review form (collapsible) */
.vr-add-wrap { margin: 0 0 14px; }
.vr-add-wrap > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.vr-add-wrap > summary::-webkit-details-marker { display: none; }
.vr-add-wrap[open] > summary { margin-bottom: 10px; }
.rv-photo { flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-weight: 800; color: #4a2a00; background: radial-gradient(circle at 30% 30%, #f7c948, #e08a00); }
.rv-photo img { width: 100%; height: 100%; object-fit: cover; }
.rv-photo-form { display: inline; }
.rv-photo-form label { cursor: pointer; margin: 0; }
.rv-edit { margin: -4px 0 14px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--panel-2); }

/* PC: the Positions icon shows only the positions panel (tabs + balance bar) on the whole page */
@media (min-width: 901px) {
  .trade-grid[data-view="positions"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .trade-grid[data-view="positions"] .wl, .trade-grid[data-view="positions"] .chart-col { display: none; }
  .trade-grid[data-view="positions"] .bottom { grid-column: 1; grid-row: 1; height: 100%; border-top: 0; }
  .trade-grid[data-view="positions"] .bottom.collapsed .bp-body { display: block; }
  .trade-grid[data-view="positions"] #bp-toggle { display: none; }
}

/* ---------- P2P (client page) ---------- */
.p2p-tabs { display: flex; gap: 6px; margin: 4px 0 14px; overflow-x: auto; }
.p2p-tabs a { flex: none; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); text-decoration: none; }
.p2p-tabs a.on { color: #fff; background: var(--primary); border-color: var(--primary); }
.p2p-curs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.p2p-curs a { padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--text); background: var(--chip); text-decoration: none; }
.p2p-curs a.on { background: var(--primary); color: #fff; }
.p2p-open { display: flex; align-items: center; gap: 8px; padding: 11px 14px; margin-bottom: 12px; border-radius: 12px; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; text-decoration: none; }
.p2p-open b { margin-right: auto; }
.p2p-agent { padding: 0; overflow: hidden; }
.p2p-agent > summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 14px; cursor: pointer; }
.p2p-agent > summary::-webkit-details-marker { display: none; }
.p2p-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #4a2a00; background: radial-gradient(circle at 30% 30%, #f7c948, #e08a00); }
.p2p-who b { display: flex; align-items: center; gap: 6px; }
.p2p-who small, .p2p-price small { display: block; font-size: 12px; color: var(--muted); }
.p2p-on { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; }
.p2p-price { text-align: right; }
.p2p-price b { font-size: 18px; }
.p2p-form { padding: 0 14px 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.p2p-calc { margin: 4px 0 10px; font-size: 15px; }
.p2p-calc b { font-size: 18px; }
.p2p-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.p2p-row small { display: block; color: var(--muted); font-size: 12px; }
.p2p-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; margin-bottom: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--primary); }
.p2p-status small { display: block; color: var(--muted); margin-top: 2px; }
.p2p-status.st-completed { border-left-color: #16a34a; }
.p2p-status.st-cancelled { border-left-color: #94a3b8; }
.p2p-status.st-disputed { border-left-color: #dc2626; }
.p2p-status.st-paid { border-left-color: #f59e0b; }
.p2p-timer { font: 800 22px ui-monospace, Menlo, Consolas, monospace; color: #dc2626; }
.p2p-big { font-size: 20px; }
.p2p-h { margin: 0 0 10px; font-size: 15px; }
.p2p-paid { margin-top: 12px; }
.p2p-cancel { margin: -4px 0 12px; text-align: right; }
.p2p-appeal summary { cursor: pointer; font-weight: 600; color: #dc2626; }
.p2p-msgs { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 10px; }
.p2p-msg { max-width: 82%; padding: 8px 12px; border-radius: 12px; background: var(--chip); font-size: 14px; }
.p2p-msg p { margin: 2px 0 0; }
.p2p-msg small { font-size: 11px; color: var(--muted); }
.p2p-msg.me { align-self: flex-end; background: var(--primary); color: #fff; }
.p2p-msg.me small { color: rgba(255,255,255,.75); }
.p2p-msg.me a { color: #fff; }
.p2p-msg.sys { align-self: center; max-width: 100%; background: none; color: var(--muted); font-size: 12px; text-align: center; padding: 2px 8px; }
.p2p-msg.adm { border: 1px solid #f59e0b; }
.p2p-send { display: flex; gap: 6px; align-items: center; }
.p2p-send input[name=body] { flex: 1; margin: 0; }
.p2p-att { cursor: pointer; margin: 0; }
.p2p-desk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.p2p-desk-top small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.p2p-curl { align-self: center; }
.p2p-curl small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.p2p-card { margin-bottom: 12px; border: 1px solid var(--primary); }
.p2p-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.p2p-adm-chat { max-height: 220px; overflow-y: auto; margin: 8px 0; padding: 8px; border-radius: 8px; background: var(--panel-2); font-size: 12px; }
.p2p-adm-chat p { margin: 0 0 6px; }
@media (max-width: 600px) {
  .p2p-agent > summary { grid-template-columns: auto 1fr auto; }
  .p2p-agent > summary .btn { grid-column: 1 / -1; }
}

/* P2P v2 */
.p2p-name { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--chip); }
.p2p-name span { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.p2p-name b { font-size: 15px; color: var(--text); }
.p2p-name.warn { background: #fff7ed; border: 1px solid #fed7aa; }
[data-theme="dark"] .p2p-name.warn { background: rgba(249,115,22,.12); border-color: rgba(249,115,22,.35); }
.p2p-tick { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 10px; font-size: 13px; }
.p2p-own { display: flex; align-items: center; gap: 6px; margin: -4px 0 8px; color: var(--muted); }
.p2p-desk-btns { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.p2p small.pre { white-space: pre-line; }
.p2p-lim .atbl input { width: 110px; margin: 0; }

/* Mobile app: admin preview + client download page */
.app-phone { width: 170px; margin: 4px auto 14px; padding: 10px; border-radius: 26px; background: #111827; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.app-screen { height: 220px; border-radius: 18px; padding: 18px 12px; background: linear-gradient(160deg, var(--app-c), #0b1020); }
.app-ic { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.app-ic img { width: 56px; height: 56px; border-radius: 14px; background: #fff; object-fit: cover; }
.app-ic span { font-size: 11px; color: #fff; text-align: center; line-height: 1.2; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-run { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--chip); }
.app-run small { display: block; color: var(--muted); }
.app-run .spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin 1s linear infinite; flex: none; }
.app-get { text-align: center; }
.app-get-ic { border-radius: 20px; box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.app-get h1 { margin: 12px 0 4px; font-size: 22px; }
.app-get-box { text-align: left; margin-top: 16px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.app-get-box h2 { margin: 0 0 10px; font-size: 16px; }
.app-get-box .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.app-steps { margin: 10px 0 0 18px; padding: 0; font-size: 13px; line-height: 1.7; }
.app-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; }
.app-qr-wrap #app-qr { padding: 8px; background: #fff; border-radius: 10px; }
.app-dl-link a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
@media (max-width: 900px) { .app-qr-wrap { display: none; } }

/* App notifications */
.nt-dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; font: 700 10px/16px var(--font, sans-serif); font-style: normal; color: #fff; background: #ef4444; text-align: center; }
.rail nav a { position: relative; }
.nt-push { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.nt-push small { display: block; color: var(--muted); }
.nt-push.on { border-color: #22c55e; }
.nt-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.nt-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px; margin-bottom: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; }
.nt-item.unread { border-left: 4px solid var(--primary); }
.nt-emoji { font-size: 22px; }
.nt-txt small { display: block; color: var(--muted); font-size: 11px; }
.nt-txt b { display: block; margin: 2px 0; }
.nt-txt span { color: var(--muted); font-size: 13px; }
.nt-txt img { display: block; max-width: 100%; margin-top: 8px; border-radius: 10px; }
.nt-pop { position: fixed; z-index: 500; top: 14px; left: 50%; width: min(420px, calc(100% - 24px)); transform: translate(-50%, -140%); transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; color: #fff; text-decoration: none;
  background: linear-gradient(160deg, rgba(24,33,74,.96), rgba(9,13,30,.97)); border: 1px solid rgba(247,185,40,.4); border-top: 3px solid #f5b21b; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.nt-pop.show { transform: translate(-50%, 0); }
.nt-pop-ic { font-size: 26px; line-height: 1; }
.nt-pop-t { flex: 1; min-width: 0; }
.nt-pop-t small { display: block; font-size: 11px; color: #ffc93c; text-transform: uppercase; letter-spacing: .06em; }
.nt-pop-t b { display: block; margin: 2px 0; }
.nt-pop-t > span { font-size: 13px; color: #d7ddf0; }
.nt-pop-x { border: 0; background: none; color: #c9d1ea; font-size: 20px; cursor: pointer; line-height: 1; }

.hm-bell { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; margin-right: 8px; color: var(--text); background: var(--chip); }
.hm-bell .nt-dot { top: -2px; right: -2px; }
.push-ask { position: fixed; z-index: 300; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(440px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; color: #fff; background: linear-gradient(160deg, #18214a, #090d1e); border-top: 3px solid #f5b21b; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.push-ask > span { color: #ffc93c; }
.push-ask div { flex: 1; min-width: 0; }
.push-ask small { display: block; color: #c9d1ea; font-size: 12px; }
.push-later { border: 0; background: none; color: #c9d1ea; font-size: 20px; cursor: pointer; }
@media (min-width: 901px) { .push-ask { bottom: 20px; } }
.nt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.nt-stats .adm-card { margin: 0; }
.nt-stats b { display: block; font-size: 22px; margin-top: 4px; }
.nt-kinds { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.nt-kind input { display: none; }
.nt-kind span { display: inline-block; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: 13px; }
.nt-kind input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); }
.nt-preview { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 6px 0 14px; border-radius: 18px; color: #fff;
  background: linear-gradient(160deg, rgba(24,33,74,.96), rgba(9,13,30,.97)); border-top: 3px solid #f5b21b; }

#nt-pv-img { display: block; width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px; margin-top: 8px; }
#nt-ad-note { display: block; margin-top: 4px; font-weight: 400; }

/* ---------- P2P v3: exchange-style layout (P2P / Orders / Ads / Profile) ---------- */
.tabbar.tabbar-4 { grid-template-columns: repeat(4, 1fr); }
.p2p .p2p-pcnav { display: flex; }
@media (max-width: 900px) {
  .p2p .p2p-pcnav { display: none; }
  .p2p-orderpage .tabbar, .p2p-chatpage .tabbar, .p2p-helppage .tabbar { display: none; }
  .p2p-ov { padding-bottom: 110px; }
}
.p2p-buy { color: var(--pos); }
.p2p-sell { color: var(--sell); }
.p2p-coin { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #26a17b; color: #fff; font-size: 12px; font-weight: 800; margin-right: 6px; }
.p2p-vf { width: 16px; height: 16px; fill: var(--primary); vertical-align: -3px; flex: none; }
.p2p-av { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: 15px; color: var(--text); background: var(--chip); }
.p2p-av .p2p-on { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border: 2px solid var(--panel); }
.p2p-top { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.p2p-top h1 { margin: 0; font-size: 20px; flex: 1; }
.p2p-top > div { flex: 1; min-width: 0; }
.p2p-top small { display: block; }
.p2p-back { display: block; }
.p2p-tok { border: 0; background: var(--chip); color: var(--muted); border-radius: 8px; padding: 5px 9px; font-size: 12px; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.p2p-title { margin: 0 0 12px; font-size: 22px; }

/* P2P home */
.p2p-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.p2p-seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--chip); }
.p2p-seg a { padding: 8px 22px; border-radius: 999px; font-weight: 700; color: var(--muted); text-decoration: none !important; }
.p2p-seg a.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.p2p-seg a.on.buy { color: var(--pos); }
.p2p-seg a.on.sell { color: var(--sell); }
.p2p-cur select { margin: 0; min-width: 92px; font-weight: 700; border-radius: 10px; }
.p2p-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; overflow-x: auto; padding-bottom: 2px; }
.p2p-filter > * { flex: none; margin: 0 !important; }
.p2p-filter input, .p2p-filter select { width: auto; max-width: 150px; padding: 7px 10px; font-size: 13px; font-weight: 600; border-radius: 10px; }
.p2p-filter input { max-width: 130px; }
.p2p-asset { display: inline-flex; align-items: center; font-weight: 700; font-size: 14px; }
.p2p-lim { margin: 0 0 10px; }
.p2p-ad { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px 16px; margin-bottom: 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.p2p-ad-who { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.p2p-ad-st { margin: 6px 0 4px; font-size: 12px; color: var(--muted); }
.p2p-ad-price { font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.p2p-ad-price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.p2p-ad-lim { font-size: 12px; color: var(--text); margin-top: 2px; }
.p2p-ad-lim span { color: var(--muted); margin-right: 4px; }
.p2p-ad-r { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 6px; text-align: right; }
.p2p-ad-ms { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.p2p-ad-ms span, .p2p-det .kv b, .p2p-pm-h b { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.p2p-mbar { display: inline-block; width: 3px; height: 12px; border-radius: 2px; flex: none; }
.p2p-ad-t { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.p2p-ad-r .btn { min-width: 96px; font-weight: 700; }
.p2p-empty { text-align: center; }

/* bottom sheets */
.p2p-sheet { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.p2p-sheet[hidden] { display: none; }
.p2p-sheet-bg { position: absolute; inset: 0; background: rgba(8,12,24,.55); backdrop-filter: blur(3px); }
.p2p-sheet-card { position: relative; width: min(520px, 100%); max-height: 90vh; overflow-y: auto; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: var(--panel); animation: p2pUp .22s ease-out; }
.p2p-sheet-card h3 { margin: 0 0 6px; }
.p2p-sheet-card .btn-block + .btn-block { margin-top: 8px; }
.p2p-sheet-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.p2p-sheet-h > div { flex: 1; }
.p2p-sheet-h small { display: block; }
@media (min-width: 901px) { .p2p-sheet { align-items: center; } .p2p-sheet-card { border-radius: 18px; } }
@keyframes p2pUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
body.p2p-sheet-open { overflow: hidden; }

/* orders */
.p2p-ordhead { display: flex; align-items: center; justify-content: space-between; }
.p2p-ordhead h1 { margin: 0; font-size: 22px; }
.p2p-dl svg { transform: rotate(180deg); }
.p2p-under { display: flex; gap: 22px; margin: 10px 0 12px; border-bottom: 1px solid var(--line); }
.p2p-under a { padding: 8px 0; color: var(--muted); font-weight: 700; text-decoration: none !important; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.p2p-under a.on { color: var(--text); border-bottom-color: var(--primary); }
.p2p-chips { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; }
.p2p-chips a { flex: none; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--chip); text-decoration: none !important; }
.p2p-chips a.on { color: var(--text); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.p2p-search { display: flex; gap: 8px; margin-bottom: 10px; }
.p2p-search[hidden] { display: none; }
.p2p-search input { margin: 0; flex: 1; }
.p2p-note { display: flex; align-items: center; gap: 8px; padding: 11px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--chip); color: var(--text); font-weight: 600; text-decoration: none !important; }
.p2p-note svg:last-child { margin-left: auto; }
.p2p-ocard { display: block; padding: 14px 16px; margin-bottom: 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; }
.p2p-ocard .kv, .p2p-myad .kv { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 14px; }
.p2p-ocard .kv > span:first-child, .p2p-myad .kv > span:first-child { color: var(--muted); }
.p2p-oc-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 16px; }
.p2p-ost { margin-left: auto; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--chip); color: var(--muted); }
.p2p-ost.st-completed { color: var(--pos); }
.p2p-ost.st-pending, .p2p-ost.st-paid { color: #d97706; }
.p2p-ost.st-disputed { color: var(--sell); }
.p2p-oc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.p2p-oc-who { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--chip); font-size: 13px; font-weight: 600; }
.p2p-unread { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sell); color: #fff; font: 700 11px/18px system-ui, sans-serif; text-align: center; font-style: normal; }

/* order page */
.p2p-hero { text-align: center; padding: 18px 10px 20px; }
.p2p-hero-ic { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; margin-bottom: 10px; color: #fff; background: linear-gradient(140deg, #f59e0b, #d97706); box-shadow: 0 10px 24px rgba(217,119,6,.28); }
.p2p-hero.st-paid .p2p-hero-ic { background: linear-gradient(140deg, #3b82f6, #1e6cf0); box-shadow: 0 10px 24px rgba(30,108,240,.28); }
.p2p-hero.st-completed .p2p-hero-ic { background: linear-gradient(140deg, #22c55e, #0b9b6a); box-shadow: 0 10px 24px rgba(11,155,106,.28); }
.p2p-hero.st-cancelled .p2p-hero-ic { background: linear-gradient(140deg, #94a3b8, #64748b); box-shadow: none; }
.p2p-hero.st-disputed .p2p-hero-ic { background: linear-gradient(140deg, #f87171, #dc2626); box-shadow: 0 10px 24px rgba(220,38,38,.28); }
.p2p-hero h2 { margin: 0 0 6px; font-size: 22px; }
.p2p-hero p { margin: 0 auto; max-width: 380px; color: var(--muted); }
.p2p-hero .p2p-timer { display: block; margin-top: 6px; font: 800 22px ui-monospace, Menlo, Consolas, monospace; color: #d97706; }
.p2p-party { display: flex; align-items: center; gap: 10px; }
.p2p-party > div { flex: 1; min-width: 0; }
.p2p-party small { display: block; }
.p2p-btn-y { position: relative; background: var(--primary); color: #fff; font-weight: 700; }
.p2p-btn-y:hover { color: #fff; filter: brightness(1.05); }
.p2p-det summary { list-style: none; display: flex; align-items: center; font-weight: 700; cursor: pointer; margin-bottom: 4px; }
.p2p-det summary::-webkit-details-marker { display: none; }
.p2p-det summary svg { margin-left: auto; transition: transform .15s; }
.p2p-det:not([open]) summary svg { transform: rotate(-90deg); }
.p2p-det .kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.p2p-det .kv > span { color: var(--muted); }
.p2p-det .kv b { text-align: right; }
.p2p-nm { font-size: 13px; max-width: 62%; }
.p2p-actbar { display: flex; gap: 10px; margin: 14px 0; }
.p2p-actbar form { margin: 0; }
.p2p-actbar .p2p-main { flex: 1; font-weight: 700; padding: 13px; }
.p2p-actbar .p2p-main:disabled { opacity: .45; }
@media (max-width: 900px) {
  .p2p-actbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
}
.p2p-help-fab { position: fixed; right: 14px; bottom: 96px; z-index: 61; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 12px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.12); text-decoration: none !important; }
@media (min-width: 901px) { .p2p-help-fab { bottom: 28px; right: 28px; } }

/* help */
.p2p-faq details { border-bottom: 1px solid var(--line); }
.p2p-faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 2px; font-weight: 600; cursor: pointer; }
.p2p-faq summary::-webkit-details-marker { display: none; }
.p2p-faq summary svg { flex: none; color: var(--muted); transition: transform .15s; }
.p2p-faq details[open] summary svg { transform: rotate(180deg); }
.p2p-faq p { margin: -4px 2px 16px; color: var(--muted); }
.p2p-help-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.p2p-help-btns .btn { padding: 13px; font-weight: 700; }
.p2p-help-btns .p2p-appeal summary { list-style: none; }
.p2p-help-btns .p2p-appeal form { margin-top: 10px; }

/* chat */
.p2p-chatv { display: flex; flex-direction: column; min-height: calc(100vh - 20px); min-height: calc(100dvh - 20px); padding-bottom: 0; }
.p2p-chatv .p2p-msgs { flex: 1; max-height: none; min-height: 50vh; padding: 6px 2px 12px; }
.p2p-chatv .p2p-send { position: sticky; bottom: 0; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: var(--bg); }
.p2p-chatv .p2p-top small { font-size: 12px; }

/* ads */
.p2p-become { text-align: center; }
.p2p-become form { text-align: left; margin-top: 12px; }
.p2p-become-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; color: #fff; background: var(--primary); margin-bottom: 8px; }
.p2p-become h2 { margin: 0 0 6px; }
.p2p-myads { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.p2p-myads .wallet-card { margin: 0 0 12px; }

/* profile */
.p2p-prof { display: flex; align-items: flex-start; gap: 14px; margin: 4px 0 16px; }
.p2p-prof .p2p-av { width: 56px; height: 56px; font-size: 22px; }
.p2p-prof-n { flex: 1; min-width: 0; }
.p2p-nickrow { display: flex; align-items: center; gap: 6px; font-size: 20px; }
.p2p-nickform { display: flex; gap: 6px; margin: 6px 0; }
.p2p-nickform[hidden] { display: none; }
.p2p-nickform input { margin: 0; }
.p2p-prof-n small { display: block; margin-top: 2px; }
.p2p-vchip { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--pos); background: rgba(11,155,106,.1); }
.p2p-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.p2p-stats b { display: block; font-size: 22px; }
.p2p-stats small { color: var(--muted); font-size: 12px; }
.p2p-more { grid-column: 1 / -1; }
.p2p-more summary { list-style: none; text-align: center; font-weight: 600; cursor: pointer; display: flex; justify-content: center; gap: 4px; align-items: center; }
.p2p-more summary::-webkit-details-marker { display: none; }
.p2p-more .kv { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.p2p-more .kv span { color: var(--muted); }
.p2p-merchant { display: flex; align-items: flex-start; gap: 10px; padding: 14px; margin-bottom: 12px; border-radius: 14px; background: rgba(30,108,240,.08); border: 1px solid rgba(30,108,240,.18); }
.p2p-merchant[hidden] { display: none; }
.p2p-merchant > span { color: var(--primary); }
.p2p-merchant div { flex: 1; }
.p2p-merchant small { display: block; color: var(--muted); }
.p2p-merchant a { font-weight: 700; }
.p2p-links { padding: 4px 0; }
.p2p-links a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text); text-decoration: none !important; border-bottom: 1px solid var(--line); }
.p2p-links a:last-child { border-bottom: 0; }
.p2p-links a span { flex: 1; font-weight: 600; }
.p2p-links a b { color: var(--muted); font-weight: 600; }
.p2p-pm-h { display: flex; align-items: center; justify-content: space-between; }
.p2p-pm-h form { margin: 0; }
.p2p-pm p { margin: 6px 0 2px; }
.p2p-addpm summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: 6px; }
.p2p-addpm summary::-webkit-details-marker { display: none; }
.p2p-addpm[open] summary { margin-bottom: 12px; }

/* ---------- P2P v4: chat tab, pictures / PDF, WhatsApp, admin-managed agents ---------- */
.tabbar.tabbar-3 { grid-template-columns: repeat(3, 1fr); }
.tabbar.tabbar-5 { grid-template-columns: repeat(5, 1fr); }
.p2p-btn-wa { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #25d366; color: #fff; font-weight: 700; }
.p2p-btn-wa:hover { color: #fff; filter: brightness(1.05); }
.p2p-party .btn + .btn { margin-left: 6px; }
.p2p-conv { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none !important; }
.p2p-conv > div { flex: 1; min-width: 0; }
.p2p-conv .p2p-av { width: 42px; height: 42px; }
.p2p-conv-t { display: flex; justify-content: space-between; gap: 8px; }
.p2p-conv-m { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.p2p-conv-m span { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p2p-conv-m span.on { color: var(--text); font-weight: 600; }
.p2p-conv-m .p2p-unread { position: static; }
.p2p-conv small { font-size: 11px; }
.p2p-pic { display: block; margin: 4px 0; }
.p2p-pic img { display: block; max-width: 220px; max-height: 260px; border-radius: 10px; object-fit: cover; background: var(--chip); }
.p2p-file { display: flex; align-items: center; gap: 8px; margin: 4px 0; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.06); color: inherit !important; text-decoration: none !important; max-width: 240px; }
.p2p-file span { flex: none; padding: 3px 6px; border-radius: 6px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 800; }
.p2p-file b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p2p-msg.me .p2p-file { background: rgba(255,255,255,.18); }
.p2p-chatv .p2p-send { flex-direction: column; align-items: stretch; gap: 6px; }
.p2p-sendrow { display: flex; gap: 6px; align-items: center; }
.p2p-sendrow input[name=body] { flex: 1; margin: 0; }
.p2p-attach { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--chip); font-size: 13px; }
.p2p-attach[hidden] { display: none; }
.p2p-attach span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p2p-lock { margin-left: auto; color: var(--muted); }
.p2p-locked .acct-box { margin: 4px 0 10px; }
.p2p-bal { margin-bottom: 12px; }
@media (max-width: 900px) { .p2p-chatpage .term-main, .p2p-helppage .term-main { padding-bottom: 0; } .p2p-chatpage .p2p-chatv { min-height: calc(100vh - 60px); min-height: calc(100dvh - 60px); } }

.p2p-fund { grid-column: 1 / -1; display: flex; gap: 8px; margin: 0; }
.p2p-fund .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* P2P v6: profile photos */
.p2p-av { overflow: visible; }
.p2p-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.p2p-photo { position: relative; margin: 0; }
.p2p-photo label { position: relative; display: inline-block; cursor: pointer; margin: 0; }
.p2p-cam { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; border: 2px solid var(--bg); }
.p2p-photo-x { position: absolute; left: -4px; top: -4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--sell); color: #fff; font-weight: 700; cursor: pointer; line-height: 1; }

/* bonus lock on home */
.hm-lock { position: relative; margin-top: 10px; padding: 8px 10px 10px; border-radius: 10px; background: rgba(245,178,27,.12); font-size: 13px; overflow: hidden; }
.hm-lock i { position: absolute; left: 0; bottom: 0; height: 3px; background: #f5b21b; }
/* admin P2P chats */
.p2pc { display: grid; grid-template-columns: 340px 1fr; gap: 14px; align-items: start; }
.p2pc-list { max-height: 78vh; overflow-y: auto; padding: 12px; }
.p2pc-search { display: flex; gap: 6px; }
.p2pc-search input { margin: 0; flex: 1; }
.p2pc-item { display: block; padding: 10px; border-radius: 10px; color: var(--text); text-decoration: none !important; border-bottom: 1px solid var(--line); }
.p2pc-item:hover { background: var(--panel-2); }
.p2pc-item.on { background: rgba(30,108,240,.1); }
.p2pc-item.appeal { border-left: 3px solid var(--sell); }
.p2pc-item small, .p2pc-item span { display: block; font-size: 12px; }
.p2pc-item span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p2pc-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.p2pc-msgs { height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 4px; }
.p2pc-msg { max-width: 72%; padding: 8px 12px; border-radius: 12px; font-size: 14px; background: var(--chip); }
.p2pc-msg p { margin: 2px 0 0; }
.p2pc-msg small { font-size: 11px; color: var(--muted); }
.p2pc-msg.agent { align-self: flex-end; background: rgba(30,108,240,.12); }
.p2pc-msg.admin { align-self: flex-end; background: rgba(168,85,247,.14); border: 1px solid rgba(168,85,247,.35); }
.p2pc-msg.sys { align-self: center; background: none; color: var(--muted); font-size: 12px; text-align: center; max-width: 100%; }
.p2pc-img { display: block; max-width: 240px; max-height: 260px; border-radius: 8px; margin: 4px 0; }
.p2pc-send textarea { width: 100%; margin: 8px 0; }
@media (max-width: 900px) { .p2pc { grid-template-columns: 1fr; } .p2pc-list { max-height: 40vh; } }

.adm-av-up { margin: 0; }
.adm-av-up label { margin: 0; cursor: pointer; }
.adm-av a img { cursor: zoom-in; }

/* popup viewer for photos and documents */
.lb { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lb-bg { position: absolute; inset: 0; background: rgba(8,12,24,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lb-card { position: relative; display: flex; flex-direction: column; max-width: min(960px, 96vw); max-height: 94vh; border-radius: 16px; background: var(--panel); box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden; animation: lbIn .18s ease-out; }
.lb-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.lb-t { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-new { font-size: 13px; white-space: nowrap; }
.lb-x { border: 0; background: var(--chip); color: var(--text); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.lb-body { display: grid; place-items: center; min-width: min(320px, 90vw); min-height: 160px; overflow: auto; background: var(--panel-2); }
.lb-img { display: block; max-width: min(940px, 94vw); max-height: 82vh; object-fit: contain; }
.lb-pdf { display: block; width: min(940px, 94vw); height: 76vh; border: 0; background: #fff; }
.lb-load, .lb-err { padding: 30px; color: var(--muted); }
body.lb-open { overflow: hidden; }
@keyframes lbIn { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.lb-tip { margin: 0; padding: 8px 12px; font-size: 13px; color: var(--muted); text-align: center; }
.lb-body:has(.lb-pdf) { display: block; }

/* featured agents */
.p2p-ad { position: relative; }
.p2p-ad.featured { border-color: rgba(245,178,27,.55); background: linear-gradient(180deg, rgba(245,178,27,.07), var(--panel) 60%); }
.p2p-pick { position: absolute; top: 0; right: 0; padding: 3px 10px; border-radius: 0 13px 0 10px; font-size: 11px; font-weight: 700; color: #92400e; background: #fde68a; }
.p2p-ad.featured .p2p-ad-r { padding-top: 14px; }

/* P2P: way back to the app (not for P2P-only agents) */
.p2p-appbar { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; }
.p2p-appbar b { flex: 1; text-align: center; font-size: 17px; }
.p2p-ab-back, .p2p-ab-home { display: inline-flex; align-items: center; gap: 4px; min-width: 64px; padding: 6px 8px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.p2p-ab-back svg { transform: rotate(180deg); }
.p2p-ab-back span { font-weight: 600; font-size: 14px; }
.p2p-ab-home { justify-content: flex-end; }
.p2p-ab-back:hover, .p2p-ab-home:hover { background: var(--chip); }
@media (min-width: 901px) { .p2p-appbar b { visibility: hidden; } }

/* Account types page: tabs, compact cards, swipe on phones, compare table */
.tier-tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 16px; width: max-content; max-width: 100%; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }
.tier-tabs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 13px; padding: 8px 16px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.tier-tabs button[aria-selected="true"] { background: var(--primary); color: #fff; }
[data-acc-pane][hidden] { display: none; }
.tier-note { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.tier { display: flex; flex-direction: column; }
.tier-more summary { cursor: pointer; list-style: none; color: #f7c948; font-size: 12px; font-weight: 700; padding: 4px 0 0 24px; }
.tier-more summary::-webkit-details-marker { display: none; }
.tier-more ul { margin-top: 4px; }
.tier-btn { margin-top: auto; padding-top: 16px; }
.tiers[style*="--n:1"] { grid-template-columns: minmax(0, 360px); }
.tiers[style*="--n:2"] { grid-template-columns: repeat(2, minmax(0, 360px)); }
@media (min-width: 1400px) { .tiers[style*="--n:4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tiers[style*="--n:5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); } .tiers[style*="--n:5"] .tier { padding: 22px 16px; } }
.tier-compare { margin-top: 20px; }
.tier-compare > summary { display: inline-block; cursor: pointer; list-style: none; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; font-size: 13px; }
.tier-compare > summary::-webkit-details-marker { display: none; }
.tier-compare[open] > summary { margin-bottom: 12px; }
.acc-dots { display: none; justify-content: center; gap: 7px; margin-top: 10px; }
.acc-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--line); cursor: pointer; transition: width .2s, background .2s; }
.acc-dots button.on { width: 22px; background: var(--primary); }
@media (max-width: 900px) {
  .tiers, .tiers[style] { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -16px; padding: 4px 16px 8px; scroll-padding: 0 16px; scrollbar-width: none; }
  .tiers::-webkit-scrollbar { display: none; }
  .tiers > .tier { flex: 0 0 min(84%, 330px); scroll-snap-align: center; padding: 22px 18px; }
  .tiers[style*="--n:1"] > .tier { flex-basis: 100%; }
  .acc-dots { display: flex; }
  .tiers[style*="--n:1"] + .acc-dots { display: none; }
}
.tier > * { flex-shrink: 0; }
.tier ul { min-height: max-content; }
@media (min-width: 1400px) { .tiers[style*="--n:5"] .price { font-size: 26px; } .tiers[style*="--n:5"] .price small { display: block; font-size: 12px; } }

/* two-step code field + security page */
.tfa-box { margin: 4px 0 12px; padding: 10px 12px; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--line)); background: color-mix(in srgb, var(--primary) 5%, transparent); }
.tfa-box label { display: block; margin: 0; font-weight: 600; font-size: 13px; }
.tfa-box label svg { vertical-align: -2px; color: var(--primary); }
.tfa-in { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.tfa-in input { flex: 1; min-width: 0; letter-spacing: .25em; font-weight: 700; text-align: center; }
.tfa-in .btn { white-space: nowrap; }
.tfa-msg { display: block; margin-top: 6px; font-size: 12px; }
.tfa-msg.pos { color: var(--pos); } .tfa-msg.neg { color: var(--neg, #e5484d); }
.sec-act { display: flex !important; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sec-act input { width: auto !important; margin: 0 !important; }
.st-2fa { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--muted); }
.st-2fa.on { background: color-mix(in srgb, var(--pos) 18%, transparent); color: var(--pos); }

/* offers: swipe cards on the deposit page, "offers for you" strip on home */
.dp-offers-wrap { margin: 0 0 12px; }
.dp-offers-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.dp-offers-h b { font-size: 14px; display: flex; align-items: center; gap: 6px; } .dp-offers-h b svg { color: #f59e0b; }
.dp-offers-h small { color: var(--muted); font-size: 12px; text-align: right; }
.dp-offers { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0; padding: 2px 2px 6px; scrollbar-width: none; }
.dp-offers::-webkit-scrollbar { display: none; }
.dp-offers > .dp-offer { flex: 0 0 min(86%, 330px); scroll-snap-align: start; position: relative; align-items: flex-start; }
.dp-offers[style*="--n:1"] > .dp-offer { flex-basis: 100%; }
.dp-offer.on { border-style: solid; border-color: var(--pos); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pos) 25%, transparent); }
.dp-offer.on .dp-offer-copy { color: var(--pos); }
.dp-offer-pct { font-size: 20px; font-weight: 800; color: #d97706; line-height: 1.1; }
.dp-offer-badge { position: absolute; top: -1px; right: 12px; transform: translateY(-50%); font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--primary); color: #fff; }
.dp-offer-badge.imp { background: linear-gradient(90deg, #fde68a, #f59e0b); color: #78350f; }
.dp-offer-calc { font-weight: 700; } .dp-offer-calc.pos { color: var(--pos); } .dp-offer-calc.neg { color: var(--neg, #e5484d); }
.dp-offers { padding-top: 10px; }
.dp-offer-none { display: block; margin: 4px 0 0 auto; background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.hm-offers { margin: 0 0 14px; }
.hm-offers-h { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; font-size: 14px; }
.hm-offers-h b { display: flex; gap: 6px; align-items: center; } .hm-offers-h b svg { color: #f59e0b; }
.hm-offers-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.hm-offers-row::-webkit-scrollbar { display: none; }
.hm-offer { flex: 0 0 min(78%, 280px); scroll-snap-align: start; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 6px 18px rgba(239, 68, 68, .18); }
.hm-offer b { display: block; font-size: 18px; line-height: 1.1; } .hm-offer small { display: block; opacity: .92; font-size: 12px; }
.hm-offer .hm-offer-go { margin-left: auto; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,.22); white-space: nowrap; }
.hm-offers-row > .hm-offer:only-child { flex-basis: 100%; }

/* legal documents */
.legal-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 10px 0 14px; }
.legal-list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 14px; }
.legal-list a:last-child { border-bottom: 0; }
.legal-list a.on { background: color-mix(in srgb, var(--primary) 10%, transparent); font-weight: 600; }
.legal-note { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #f59e0b 12%, transparent); font-size: 13px; margin: 0 0 10px; }
.legal-note p { margin: 4px 0 0; }
.su-legal { align-items: flex-start !important; gap: 8px; line-height: 1.45; }
.su-legal input { margin-top: 3px !important; flex: none; }
.su-legal a { text-decoration: underline; }

/* Continue with Google */
.g-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: 12px; }
.g-or::before, .g-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.g-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid #dadce0;
  background: #fff; color: #3c4043; font-weight: 600; font-size: 14px; text-decoration: none; }
.g-btn:hover { background: #f8f9fa; }

.hm-setup { border-left: 4px solid #f59e0b; }
.hm-setup small .done { color: var(--pos); }

.h-edit { margin-left: 4px; font-size: 9px; font-weight: 600; color: #b45309; text-transform: lowercase; }

.trade-toast { border-left: 4px solid var(--pos, #16a34a); }
.trade-toast.demo { border-left-color: #94a3b8; }
.trade-toast a { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; min-width: 0; }
.trade-toast small { opacity: .85; }

.rb-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 0 0 12px; border-radius: 14px; text-decoration: none; color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, #f59e0b 16%, var(--panel)), var(--panel)); border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--line)); }
.rb-ic { flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, #f59e0b 22%, transparent); color: #b45309; }
.rb-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rb-txt > small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.rb-txt > b { font-size: 22px; font-variant-numeric: tabular-nums; }
.rb-txt > span { font-size: 13px; }
.rb-left b { color: #b45309; font-variant-numeric: tabular-nums; }
.rb-txt > .rb-terms { color: var(--muted); font-size: 11px; text-transform: none; letter-spacing: 0; }
.rb-go { display: flex; align-items: center; gap: 2px; font-weight: 600; color: var(--primary); white-space: nowrap; }
