/* =========================================================================
   Design tokens
   ========================================================================= */
:root {
  --bg: #070b14;
  --bg-2: #0a1020;
  --panel: #0f1629;
  --panel-2: #151d35;
  --panel-3: #1b2542;
  --line: rgba(148, 163, 184, 0.12);
  --line-2: rgba(148, 163, 184, 0.2);
  --grid: rgba(148, 163, 184, 0.14);
  --text: #e8edf7;
  --muted: #8a96b3;
  --dim: #5d6a88;
  --brand: #ff444f;
  --brand-2: #ff8a4c;
  --blue: #4f8cff;
  --violet: #9b7bff;
  --up: #16c784;
  --down: #f6465d;
  --warn: #f5b942;
  --pos: var(--up);
  --neg: var(--down);
  --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.55);
  --glow: 0 10px 30px -8px rgba(255, 68, 79, 0.55);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-size: 14px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 13.5px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* guard against stray horizontal scroll */
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; }
code { background: var(--panel-2); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; font-size: .88em; word-break: break-all; }
pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; overflow: auto; font-size: .8rem; }
[hidden] { display: none !important; }

/* Scrollbars: 8px, rounded, no arrow buttons */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background-color: #26314f; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #3a4a74; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: #26314f transparent; }
}
::selection { background: rgba(255, 68, 79, .35); }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.pos { color: var(--up) !important; }
.neg { color: var(--down) !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font: 600 .9rem/1.2 var(--font);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, opacity .2s;
}
.btn:hover { text-decoration: none; border-color: rgba(148, 163, 184, .35); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 14px 34px -8px rgba(255, 68, 79, .7); filter: brightness(1.05); }
.btn-danger { background: linear-gradient(135deg, #f6465d, #c8243a); border-color: transparent; color: #fff; box-shadow: 0 10px 28px -10px rgba(246, 70, 93, .7); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--panel-2); }
.btn-light { background: #fff; color: #111827; border-color: transparent; }
.btn-sm { padding: 7px 14px; font-size: .82rem; border-radius: 10px; }
.btn-lg { padding: 13px 24px; font-size: .98rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid var(--muted); border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); cursor: pointer; transition: .2s; }
.logout-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); font: 500 .78rem var(--font); cursor: pointer; transition: .2s; }
.logout-btn svg { color: var(--down); }
.logout-btn:hover { color: var(--text); border-color: rgba(246, 70, 93, .5); background: rgba(246, 70, 93, .08); }
.acct-row { display: flex; align-items: center; gap: 8px; }
.mode-note { display: none !important; }
.icon-btn:hover { color: var(--text); border-color: rgba(246, 70, 93, .5); background: rgba(246, 70, 93, .08); }

/* =========================================================================
   Forms (admin + dashboard)
   ========================================================================= */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .88rem; }
.form label small { font-weight: 400; }
input, select, textarea {
  width: 100%; padding: 10px 13px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font: 400 .92rem var(--font); transition: border-color .2s, box-shadow .2s;
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a96b3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 140, 255, .18); }
input:disabled, select:disabled { opacity: .55; }
input[type="checkbox"] { width: auto; accent-color: var(--brand); }
input[type="number"]::-webkit-inner-spin-button { opacity: .4; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0; }
legend { padding: 0 6px; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.switch { display: flex !important; align-items: center; gap: 10px; cursor: pointer; }
.form label.inline { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-top: 6px; }
.help { color: var(--muted); font-size: .8rem; margin: 6px 0 0; }
.error-text { color: var(--down); font-size: .84rem; margin: 6px 0 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--down); }
.form-actions { padding-top: 6px; }

/* =========================================================================
   Alerts, cards, tables (shared)
   ========================================================================= */
.alert { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; margin: 0 0 14px; border: 1px solid; font-size: .9rem; }
.alert-success { background: rgba(22, 199, 132, .08); border-color: rgba(22, 199, 132, .35); }
.alert-error { background: rgba(246, 70, 93, .08); border-color: rgba(246, 70, 93, .4); }
.alert-warning { background: rgba(245, 185, 66, .08); border-color: rgba(245, 185, 66, .4); }
.alert-info { background: rgba(79, 140, 255, .08); border-color: rgba(79, 140, 255, .35); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; min-width: 0; }
.card.narrow { max-width: 480px; }
.card.note ol { margin: 8px 0; padding-left: 20px; }
.card.note li { margin: 4px 0; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.table th { color: var(--muted); font-weight: 500; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.table th.num, .table td.num { text-align: right; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--panel-2); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .72rem; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); }
.tag-real { color: var(--up); border-color: rgba(22, 199, 132, .4); background: rgba(22, 199, 132, .08); }
.badge { font-size: .66rem; font-weight: 600; background: var(--grad); color: #fff; padding: 2px 8px; border-radius: 99px; vertical-align: middle; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 4px; position: relative; overflow: hidden; }
.stat::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 120px; height: 120px; background: radial-gradient(circle, rgba(255, 68, 79, .12), transparent 70%); }
.stat span { color: var(--muted); font-size: .8rem; }
.stat strong { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.card .stat { background: var(--panel-2); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li.done { color: var(--up); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.filters input, .filters select { width: auto; min-width: 160px; }
.filters label { display: grid; gap: 4px; font-size: .82rem; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 4px 0 20px; }
.pager-size label { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); }
.pager-size select { width: auto; padding: 6px 32px 6px 10px; font-size: .82rem; border-radius: 9px; }
.pager-info { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pagination { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 0 auto; }
.pagination a, .pagination span { min-width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 9px; color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.pagination a:hover { color: var(--text); text-decoration: none; border-color: rgba(148, 163, 184, .35); }
.pagination a.active { background: var(--grad); border-color: transparent; color: #fff; }
.pagination .disabled { opacity: .35; }
.pagination .gap { border-color: transparent; }

.data-grid { align-items: start; }
.stat strong.stat-sm { font-size: 1.1rem; padding-top: 6px; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.action-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.action-card b { font-size: .88rem; font-weight: 600; }
.action-card .help { margin-top: 2px; }
.action-card.danger { border-color: rgba(246, 70, 93, .35); background: rgba(246, 70, 93, .04); }
.inline-input { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.inline-input input { width: 110px; padding: 6px 9px; font-size: .82rem; border-radius: 8px; }

/* =========================================================================
   Brand
   ========================================================================= */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1rem; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo { display: block; width: 32px; height: 32px; border-radius: 10px; object-fit: cover; flex: none; box-shadow: 0 6px 18px -6px rgba(255, 68, 79, .55); }

/* =========================================================================
   Auth / installer
   ========================================================================= */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(800px 400px at 50% -10%, rgba(255, 68, 79, .14), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 410px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 660px; }
.auth-card h1 { font-size: 1.45rem; }

/* =========================================================================
   Admin
   ========================================================================= */
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 0 8px; }
.sidebar nav { display: grid; gap: 3px; }
.sidebar nav a { color: var(--muted); padding: 10px 12px; border-radius: 11px; font-weight: 500; transition: .15s; }
.sidebar nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.sidebar nav a.active { background: linear-gradient(90deg, rgba(255, 68, 79, .16), rgba(255, 68, 79, .02)); color: var(--text); box-shadow: inset 3px 0 0 var(--brand); }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; padding: 0 12px; font-size: .88rem; }
.admin-main { min-width: 0; }
.admin-top { display: flex; align-items: center; gap: 12px; padding: 20px 28px; border-bottom: 1px solid var(--line); background: rgba(7, 11, 20, .6); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 5; }
.admin-top h1 { margin: 0; font-size: 1.3rem; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; padding: 4px 11px; font-size: 1.1rem; cursor: pointer; }
.admin-content { padding: 26px 28px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--text); border-bottom-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.settings-form { max-width: 740px; }

/* =========================================================================
   Public site shell
   ========================================================================= */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(7, 11, 20, .72); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 12px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links > a { color: var(--muted); font-weight: 500; font-size: .9rem; }
.nav-links > a:hover { color: var(--text); text-decoration: none; }
.nav-links > a.btn { color: #fff; }
.nav-auth { display: inline-flex; gap: 8px; }
.site-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 28px 0; background: var(--bg-2); font-size: .82rem; color: var(--muted); }
.risk { margin: 0 0 16px; max-width: 900px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand .logo { width: 24px; height: 24px; border-radius: 7px; box-shadow: none; }
.footer-links { display: flex; gap: 16px; }
.maintenance-box, .center-box { text-align: center; padding: 100px 16px; }
.spinner { width: 42px; height: 42px; border: 3px solid var(--line-2); border-top-color: var(--brand); border-radius: 50%; margin: 0 auto 22px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================================
   Landing
   ========================================================================= */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: rgba(22, 199, 132, .08); border: 1px solid rgba(22, 199, 132, .25); color: #7ee2b8; font-size: .8rem; font-weight: 500; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; position: relative; flex: none; }
.pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: currentColor; opacity: .35; animation: ping 1.6s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(1.8); opacity: 0; } }
.pill .pulse { color: var(--up); }

.hero { position: relative; padding: 80px 0 56px; overflow: hidden; }
.hero-glow { position: absolute; inset: 0; pointer-events: none; mask-image: linear-gradient(#000 60%, transparent); -webkit-mask-image: linear-gradient(#000 60%, transparent);
  background:
    radial-gradient(600px 320px at 85% 10%, rgba(255, 68, 79, .18), transparent 70%),
    radial-gradient(500px 300px at 10% 90%, rgba(79, 140, 255, .14), transparent 70%); }
.hero-glow::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); opacity: .5; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(1.85rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -.03em; margin: 18px 0 16px;
  background: linear-gradient(180deg, #fff 30%, #b9c3da); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.06rem; color: var(--muted); max-width: 560px; margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 22px; }
.hero-cta > span { display: contents; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .85rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 16px; height: 16px; color: var(--up); }

.hero-card { background: linear-gradient(180deg, rgba(21, 29, 53, .92), rgba(15, 22, 41, .92)); border: 1px solid var(--line-2); border-radius: 22px; padding: 20px; box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .02) inset; display: grid; gap: 16px; transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: perspective(1200px) rotateY(-6deg) rotateX(2deg) translateY(-8px); } }
.hc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hc-sym { color: var(--muted); font-size: .8rem; }
.hc-price { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hc-price span { color: var(--muted); }
.hc-price .chip { font-size: .72rem; vertical-align: middle; }
.hc-chart { width: 100%; height: 130px; display: block; overflow: visible; }
.hc-chart line { stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hc-chart .up { stroke: var(--up); }
.hc-chart .down { stroke: var(--down); }
.hc-dot { fill: var(--up); filter: drop-shadow(0 0 6px var(--up)); }
.hc-digits { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.hcd { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--blue) var(--p), var(--panel-3) 0); position: relative; }
.hcd b { position: absolute; inset: 3px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-size: .72rem; font-weight: 600; }
.hcd.hi { background: conic-gradient(var(--up) var(--p), var(--panel-3) 0); }
.hcd.lo { background: conic-gradient(var(--down) var(--p), var(--panel-3) 0); }
.hcd.cur b { background: var(--blue); color: #fff; }
.hc-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hc-foot div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; display: grid; }
.hc-foot span { font-size: .7rem; color: var(--muted); }
.hc-foot b { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-top: 8px; padding: 0; width: calc(100% - 32px); max-width: 1168px; }
.stats-strip div { background: var(--panel); padding: 20px; display: grid; gap: 2px; text-align: center; }
.stats-strip b { font-size: 1.4rem; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats-strip span { color: var(--muted); font-size: .82rem; }

.section { padding-top: 72px; }
.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 700; }
.eyebrow { display: inline-block; color: var(--brand); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; margin-bottom: 10px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; transition: transform .2s, border-color .2s; }
.feature:hover { transform: translateY(-4px); border-color: rgba(255, 68, 79, .35); }
.f-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: rgba(255, 68, 79, .1); color: var(--brand); margin-bottom: 14px; }
.feature h3 { font-size: 1rem; font-weight: 600; }
.feature p { color: var(--muted); margin: 0; font-size: .88rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 6px; }
.steps li::before { content: counter(s, decimal-leading-zero); font-size: 1.6rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-bottom: 8px; }
.steps b { font-weight: 600; }
.steps span { color: var(--muted); font-size: .88rem; }
.cta-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 34px 36px; border-radius: 22px; background: var(--grad); box-shadow: var(--glow); margin-bottom: 72px; }
.cta-banner h2 { color: #fff; font-size: 1.5rem; margin-bottom: 4px; }
.cta-banner p { margin: 0; color: rgba(255, 255, 255, .85); }

/* =========================================================================
   Dashboard: header controls
   ========================================================================= */
.dashboard .site-header .container, .dashboard .site-footer .container, .dash { max-width: none; padding-left: clamp(16px, 2vw, 32px); padding-right: clamp(16px, 2vw, 32px); }
.tpsl input { -moz-appearance: textfield; appearance: textfield; }
.tpsl input::-webkit-inner-spin-button, .tpsl input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.nav-dash { display: flex; align-items: center; gap: 10px; }
.conn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-size: .76rem; color: var(--muted); }
.conn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); position: relative; }
.conn.ok .dot { background: var(--up); box-shadow: 0 0 0 3px rgba(22, 199, 132, .18); }
.conn.bad .dot { background: var(--down); }
.conn.wait .dot { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.acct-switch { position: relative; }
.acct-btn { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 7px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; transition: .2s; }
.acct-btn:hover, .acct-switch.open .acct-btn { border-color: rgba(79, 140, 255, .5); }
.acct-switch.open .chev { transform: rotate(180deg); }
.chev { color: var(--muted); transition: transform .2s; }
.acct-type { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 5px 8px; border-radius: 9px; }
.acct-type.demo { background: rgba(79, 140, 255, .14); color: #8db3ff; }
.acct-type.real { background: rgba(22, 199, 132, .14); color: #5fe0aa; }
.acct-meta { display: grid; text-align: left; line-height: 1.2; }
.acct-bal { font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.acct-id { font-size: .7rem; color: var(--muted); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 260px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 6px; box-shadow: var(--shadow); z-index: 40; animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.acct-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 11px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.acct-opt .acct-meta { flex: 1; }
.acct-opt:hover { background: var(--panel-3); }
.acct-opt.on { background: rgba(79, 140, 255, .1); }
.acct-opt svg { color: var(--blue); }

/* =========================================================================
   Dashboard: layout & panels
   ========================================================================= */
.dash { padding-top: 20px; padding-bottom: 36px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.dash-main { display: grid; gap: 18px; min-width: 0; }
.dash-side { position: sticky; top: 84px; }
.panel { background: linear-gradient(180deg, var(--panel), rgba(15, 22, 41, .85)); border: 1px solid var(--line); border-radius: 20px; padding: 18px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.count { font-size: .72rem; font-weight: 600; background: var(--panel-3); color: var(--muted); padding: 2px 8px; border-radius: 99px; }

/* Segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.seg button { border: 0; background: none; color: var(--muted); font: 500 .8rem var(--font); padding: 6px 12px; border-radius: 9px; cursor: pointer; transition: .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-3); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.seg-sm button { padding: 4px 9px; font-size: .74rem; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: .76rem; font-weight: 600; background: var(--panel-3); color: var(--muted); font-variant-numeric: tabular-nums; }
.chip-up { background: rgba(22, 199, 132, .12); color: var(--up); }
.chip-down { background: rgba(246, 70, 93, .12); color: var(--down); }

/* Chart */
.chart-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.market-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.select-pill { width: auto; max-width: 100%; font-weight: 600; background-color: var(--panel-2); border-radius: 12px; padding-top: 9px; padding-bottom: 9px; }
.price-box { display: flex; align-items: baseline; gap: 10px; }
.price { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; border-radius: 8px; padding: 0 4px; margin: 0 -4px; }
.flash-up { animation: flashUp .6s ease-out; }
.flash-down { animation: flashDown .6s ease-out; }
@keyframes flashUp { 0% { color: var(--up); background: rgba(22, 199, 132, .15); } }
@keyframes flashDown { 0% { color: var(--down); background: rgba(246, 70, 93, .15); } }
.chart-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.chart-wrap { position: relative; height: 340px; margin: 0 -6px; }
#chart { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: pan-y; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .9rem; pointer-events: none; }
.chart-tip { position: absolute; pointer-events: none; background: rgba(21, 29, 53, .96); border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 10px; font-size: .74rem; display: grid; gap: 1px; box-shadow: var(--shadow); white-space: nowrap; backdrop-filter: blur(6px); }
.chart-tip b { font-size: .88rem; }
.chart-tip span { color: var(--muted); }

/* Digit rings */
.digit-rings { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.dr { display: grid; justify-items: center; gap: 6px; }
.dr-ring { --c: var(--blue); width: 100%; max-width: 54px; aspect-ratio: 1; border-radius: 50%; position: relative; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--panel-3) 0); transition: background .3s; }
.dr-ring b { position: absolute; inset: 4px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-size: 1rem; font-weight: 700; transition: .2s; }
.dr span { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.dr.hi .dr-ring { --c: var(--up); }
.dr.hi span { color: var(--up); font-weight: 600; }
.dr.lo .dr-ring { --c: var(--down); }
.dr.lo span { color: var(--down); font-weight: 600; }
.dr.bar .dr-ring b { box-shadow: inset 0 0 0 2px var(--warn); }
.dr.cur .dr-ring { box-shadow: 0 0 0 3px rgba(79, 140, 255, .25), 0 6px 20px -4px rgba(79, 140, 255, .6); }
.dr.cur .dr-ring b { background: var(--blue); color: #fff; }
.dr { position: relative; }
.dr.cur::after { content: ''; position: absolute; bottom: -9px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.splits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.split { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.split-lbl { display: flex; justify-content: space-between; gap: 6px; font-size: .74rem; color: var(--muted); margin-bottom: 7px; }
.split-lbl b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.split-lbl em { font-style: normal; color: var(--warn); font-weight: 600; }
.bar { height: 6px; border-radius: 99px; background: var(--violet); overflow: hidden; }
.bar i { display: block; height: 100%; width: 50%; background: var(--blue); border-radius: 99px 0 0 99px; transition: width .4s ease; }
.bar-rf, .bar-ou { background: var(--down); }
.bar-rf i, .bar-ou i { background: var(--up); }
.stream { display: flex; justify-content: flex-end; gap: 5px; margin-top: 14px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 18%); }
.sd { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: .74rem; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); }
.sd.even { color: #8db3ff; }
.sd.odd { color: #c2acff; }
.sd:last-child { background: var(--blue); color: #fff; border-color: transparent; animation: pop .25s ease-out; }

/* Trades list */
.trade-sum { display: flex; align-items: center; gap: 10px; font-size: .8rem; font-weight: 600; }
.trades { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.trade { display: grid; grid-template-columns: 30px minmax(0, 1.4fr) minmax(0, 1.3fr) 70px 80px; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: .84rem; }
.trade.new { animation: slideIn .45s ease-out; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } }
.t-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: .72rem; }
.win .t-ico { background: rgba(22, 199, 132, .12); color: var(--up); }
.loss .t-ico { background: rgba(246, 70, 93, .12); color: var(--down); }
.t-main { display: grid; min-width: 0; }
.t-main b { font-weight: 600; }
.t-main small, .t-stake small { color: var(--muted); font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-spots { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-spots i { font-style: normal; color: var(--dim); }
.t-stake { display: grid; text-align: right; font-variant-numeric: tabular-nums; }
.t-pl { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.win .t-pl { color: var(--up); }
.loss .t-pl { color: var(--down); }
.empty-state { text-align: center; padding: 30px 10px; color: var(--muted); display: grid; justify-items: center; gap: 4px; }
.empty-state svg { color: var(--dim); }
.empty-state p { margin: 0; font-size: .88rem; }

/* =========================================================================
   Dashboard: bot panel
   ========================================================================= */
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; font-size: .74rem; font-weight: 600; background: var(--panel-3); color: var(--muted); max-width: 100%; }
.status-pill .pulse { color: var(--dim); }
.status-pill .pulse::after { animation: none; opacity: 0; }
.status-pill.running { background: rgba(22, 199, 132, .12); color: var(--up); }
.status-pill.running .pulse { color: var(--up); }
.status-pill.running .pulse::after { animation: ping 1.4s ease-out infinite; opacity: .35; }
.status-pill.stopping { background: rgba(245, 185, 66, .12); color: var(--warn); }
.status-pill.stopping .pulse { color: var(--warn); }
.status-pill.error { background: rgba(246, 70, 93, .12); color: var(--down); }
.status-pill.error .pulse { color: var(--down); }
.status-pill.done { background: rgba(22, 199, 132, .12); color: var(--up); }
.status-pill.done .pulse { color: var(--up); }
.status-pill > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#bot-form { display: grid; gap: 16px; }
.strat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.strat { cursor: pointer; position: relative; }
.strat input, .toggle input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.strat-card { display: grid; gap: 2px; padding: 11px 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); transition: .2s; height: 100%; }
.strat-card svg { color: var(--muted); margin-bottom: 4px; transition: .2s; }
.strat-card b { font-size: .84rem; font-weight: 600; }
.strat-card small { font-size: .7rem; color: var(--muted); }
.strat:hover .strat-card { border-color: var(--line-2); }
.strat input:checked + .strat-card { border-color: rgba(255, 68, 79, .6); background: linear-gradient(135deg, rgba(255, 68, 79, .12), rgba(255, 138, 76, .04)); box-shadow: 0 0 0 1px rgba(255, 68, 79, .25) inset; }
.strat input:checked + .strat-card svg { color: var(--brand); }
.strat input:focus-visible + .strat-card { outline: 2px solid var(--blue); outline-offset: 2px; }
.strat input:disabled + .strat-card { opacity: .6; cursor: not-allowed; }

.fld { display: grid; gap: 7px; }
.fld-lbl { display: flex; justify-content: space-between; align-items: baseline; font-size: .78rem; font-weight: 500; color: var(--muted); }
.fld-lbl b { color: var(--text); font-weight: 600; }
.predict { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pred { padding: 11px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); font: 600 .9rem var(--font); cursor: pointer; transition: .2s; }
.pred:hover:not(:disabled) { color: var(--text); }
.pred.p-up.on { background: rgba(22, 199, 132, .14); border-color: var(--up); color: var(--up); box-shadow: 0 8px 22px -12px var(--up); }
.pred.p-down.on { background: rgba(246, 70, 93, .14); border-color: var(--down); color: var(--down); box-shadow: 0 8px 22px -12px var(--down); }
.pred:disabled { cursor: not-allowed; opacity: .7; }
.digit-pick { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.digit-pick button { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: 600 .84rem var(--font); cursor: pointer; transition: .15s; padding: 0; }
.digit-pick button:hover:not(:disabled) { border-color: var(--warn); }
.digit-pick button.on { background: var(--warn); border-color: var(--warn); color: #1b1300; }
.digit-pick button:disabled { opacity: .3; cursor: not-allowed; }
.digit-pick button.on:disabled { opacity: .8; }

.range { -webkit-appearance: none; appearance: none; height: 6px; padding: 0; border: 0; border-radius: 99px; --fill: 0%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)) 0 / var(--fill) 100% no-repeat, var(--panel-3); }
.range:focus { box-shadow: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--brand); box-shadow: 0 2px 10px rgba(255, 68, 79, .5); cursor: pointer; }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--brand); cursor: pointer; }

.stepper { display: grid; grid-template-columns: 44px 1fr 44px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.stepper button { border: 0; background: var(--panel-2); color: var(--text); font-size: 1.2rem; cursor: pointer; transition: .15s; }
.stepper button:hover:not(:disabled) { background: var(--panel-3); }
.stepper button:disabled { opacity: .5; cursor: not-allowed; }
.stepper input { border: 0; border-radius: 0; text-align: center; font-weight: 700; font-size: 1.05rem; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { box-shadow: none; }
.stepper:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 140, 255, .18); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button { flex: 1; min-width: 44px; padding: 5px 0; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font: 500 .76rem var(--font); cursor: pointer; transition: .15s; }
.quick button:hover:not(:disabled) { color: var(--text); border-color: var(--line-2); }
.quick button.on { color: var(--text); border-color: var(--brand); background: rgba(255, 68, 79, .08); }
.quick button:disabled { opacity: .5; cursor: not-allowed; }

.payout { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--line-2); font-size: .8rem; color: var(--muted); }
.payout b { color: var(--text); font-size: .95rem; text-align: right; }
.payout small { color: var(--up); font-weight: 600; margin-left: 4px; }
.payout.ok { border-style: solid; border-color: rgba(22, 199, 132, .3); background: rgba(22, 199, 132, .05); }
.payout.err b { color: var(--down); font-size: .76rem; font-weight: 500; }

.tpsl input { font-weight: 600; }
.tp .fld-lbl { color: var(--up); }
.sl .fld-lbl { color: var(--down); }
.tp input:focus { border-color: var(--up); box-shadow: 0 0 0 3px rgba(22, 199, 132, .15); }
.sl input:focus { border-color: var(--down); box-shadow: 0 0 0 3px rgba(246, 70, 93, .15); }

.advanced { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.advanced summary { list-style: none; cursor: pointer; padding: 10px 14px; font-size: .82rem; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::after { content: '+'; font-size: 1.1rem; transition: transform .2s; }
.advanced[open] summary::after { transform: rotate(45deg); }
.adv-body { display: grid; gap: 12px; padding: 0 14px 14px; }
[data-martingale] { display: grid; gap: 12px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .85rem; position: relative; }
.toggle .track { width: 40px; height: 22px; border-radius: 99px; background: var(--panel-3); position: relative; transition: .2s; flex: none; }
.toggle .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle input:checked + .track { background: var(--brand); }
.toggle input:checked + .track::after { transform: translateX(18px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--blue); outline-offset: 2px; }

.bot-actions { display: grid; gap: 8px; }
.bot-on #stop { animation: glowPulse 1.8s ease-in-out infinite; }
@keyframes glowPulse { 50% { box-shadow: 0 10px 34px -6px rgba(246, 70, 93, .9); } }

.session { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.session-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.session .k { display: block; font-size: .76rem; color: var(--muted); }
.pl { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ring { --p: 0; width: 70px; height: 70px; border-radius: 50%; display: grid; place-content: center; text-align: center; position: relative;
  background: conic-gradient(var(--up) calc(var(--p) * 1%), rgba(246, 70, 93, .35) 0); flex: none; transition: background .4s; }
.ring.empty { background: var(--panel-3); }
.ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--panel); }
.ring span, .ring small { position: relative; line-height: 1.1; }
.ring span { font-weight: 700; font-size: .95rem; }
.ring small { font-size: .58rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
#plchart { width: 100%; height: 48px; display: block; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.kpis div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 8px 9px; display: grid; min-width: 0; }
.kpis span { font-size: .66rem; color: var(--muted); }
.kpis b { font-size: .9rem; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }

/* =========================================================================
   Toasts & modal
   ========================================================================= */
.toasts { position: fixed; right: 18px; top: 78px; z-index: 60; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 36px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: .86rem; transform: translateY(-12px); opacity: 0; transition: .3s cubic-bezier(.2, .9, .3, 1.2); }
.toast.in { transform: none; opacity: 1; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; }
.toast-success .toast-dot { background: var(--up); }
.toast-error .toast-dot { background: var(--down); }
.toast-warn .toast-dot { background: var(--warn); }
.toast-success { border-color: rgba(22, 199, 132, .35); }
.toast-error { border-color: rgba(246, 70, 93, .4); }
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(3, 6, 12, .6); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.modal.in { opacity: 1; }
.modal-card { width: 100%; max-width: 380px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2); border-radius: 22px; padding: 28px 24px 22px; box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .03) inset; transform: translateY(10px) scale(.96); transition: transform .25s cubic-bezier(.2, .9, .3, 1.2); text-align: center; }
.modal-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; color: var(--blue); background: rgba(79, 140, 255, .12); box-shadow: 0 0 0 8px rgba(79, 140, 255, .06); }
.modal[data-tone="danger"] .modal-icon { color: var(--down); background: rgba(246, 70, 93, .12); box-shadow: 0 0 0 8px rgba(246, 70, 93, .06); }
.modal[data-tone="warn"] .modal-icon { color: var(--warn); background: rgba(245, 185, 66, .12); box-shadow: 0 0 0 8px rgba(245, 185, 66, .06); }
.modal.in .modal-card { transform: none; }
.modal-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.modal-card p { color: var(--muted); margin: 0 0 22px; font-size: .88rem; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr) 350px; }
  .trade { grid-template-columns: 30px minmax(0, 1fr) 64px 76px; }
  .t-spots { display: none; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { transform: none; animation: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-side { position: static; order: -1; }
  .dash-main { display: contents; }
  .chart-panel { order: -2; }
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 20; width: 270px; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .menu-btn { display: inline-block; }
  .admin-content { padding: 18px 16px; }
  .admin-top { padding: 16px; }
}
@media (max-width: 640px) {
  html { font-size: 13.5px; }
  body { font-size: 13px; }
  .grid-2, .features { grid-template-columns: 1fr; }
  .tpsl { grid-template-columns: 1fr 1fr; }
  .nav-links > a:not(.btn) { display: none; }
  .hero { padding-top: 44px; }
  .brand > span:last-child { max-width: 45vw; overflow: hidden; text-overflow: ellipsis; }
  .icon-btn { width: 36px; height: 36px; }

  /* Dashboard header: brand · live dot · logout; below it a floating card with the mode note + account switcher */
  .dashboard .nav { position: relative; }
  .dashboard .nav .brand { margin-right: auto; }
  .dashboard .nav-dash { gap: 8px; }
  .dashboard .conn { padding: 6px 10px; }
  .dashboard .acct-row { position: absolute; top: calc(100% + 10px); left: 16px; right: 16px; z-index: 35; justify-content: space-between; gap: 10px;
    padding: 5px 5px 5px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(21, 29, 53, .92); backdrop-filter: blur(10px); box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .7); }
  .dashboard .mode-note { display: flex !important; align-items: center; gap: 7px; min-width: 0; font-size: .7rem; font-weight: 500; color: var(--muted); line-height: 1.25; }
  .dashboard .mode-note i { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--blue); box-shadow: 0 0 0 3px rgba(79, 140, 255, .18); }
  .dashboard .mode-note span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
  .dashboard .mode-note.real { color: #ffd27a; }
  .dashboard .mode-note.real i { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 185, 66, .2); animation: blink 1.4s infinite; }
  .dashboard .mode-note.blocked { color: #ff9aa6; }
  .dashboard .mode-note.blocked i { background: var(--down); box-shadow: 0 0 0 3px rgba(246, 70, 93, .2); }
  .dashboard .acct-switch { flex: none; }
  .dashboard .acct-btn { padding: 4px 8px 4px 4px; gap: 8px; border-color: transparent; background: var(--bg-2); }
  .dashboard .acct-btn .acct-id { display: none; }
  .dashboard .acct-bal { font-size: .86rem; }
  .dashboard .dash { padding-top: 66px; }
  .dashboard #banner [data-key="real"] { display: none; }
  .acct-menu { right: -5px; min-width: min(270px, calc(100vw - 32px)); }
  .toasts { top: 128px; right: 16px; left: 16px; max-width: none; justify-items: end; }
  .chart-wrap { height: 250px; }
  .price { font-size: 1.2rem; }
  .digit-rings { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
  .splits { grid-template-columns: 1fr; gap: 8px; }
  .panel { padding: 14px; border-radius: 18px; }
  .trade { grid-template-columns: 28px minmax(0, 1fr) 72px; }
  .t-stake { display: none; }
  .cta-banner { padding: 26px 22px; }
  .filters input, .filters select { min-width: 0; flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Branding tab previews */
.brand-previews { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-end; margin: 6px 0 18px; }
.brand-previews figure { margin: 0; display: grid; justify-items: center; gap: 8px; }
.brand-previews figcaption { font-size: .72rem; color: var(--muted); }
.pv-nav { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-weight: 700; }
.pv-circle { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 4px #fff; }
.pv-app { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .7); }
.pv-tab { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px 10px 0 0; background: #dee1e6; color: #1f2937; font-size: .78rem; font-weight: 500; }
.pv-tab img { width: 16px; height: 16px; }
.logo-field { display: grid; gap: 10px; }
.logo-field input[type=file] { padding: 9px; }
.og-preview { max-width: 460px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-2); }
.og-preview img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.og-meta { display: grid; gap: 2px; padding: 10px 14px 12px; }
.og-meta small { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.og-meta b { font-size: .9rem; }
.og-meta span { color: var(--muted); font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* =========================================================================
   PWA install sheet (mobile landing page)
   ========================================================================= */
.pwa-sheet { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.pwa-backdrop { position: absolute; inset: 0; background: rgba(3, 6, 12, .55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .3s; }
.pwa-card { position: relative; width: 100%; max-width: 480px; margin: 0 10px calc(10px + env(safe-area-inset-bottom)); padding: 12px 20px 18px; border-radius: 26px;
  background: linear-gradient(180deg, #19223d, var(--panel)); border: 1px solid var(--line-2); box-shadow: 0 -10px 50px -10px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  transform: translateY(110%); transition: transform .45s cubic-bezier(.2, .9, .25, 1.15); }
.pwa-sheet.in .pwa-backdrop { opacity: 1; }
.pwa-sheet.in .pwa-card { transform: none; }
.pwa-grab { display: block; width: 40px; height: 4px; border-radius: 99px; background: var(--line-2); margin: 0 auto 16px; }
.pwa-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pwa-head img { width: 60px; height: 60px; border-radius: 16px; flex: none; box-shadow: 0 10px 26px -8px rgba(255, 68, 79, .65); }
.pwa-head h3 { margin: 0 0 2px; font-size: 1.12rem; }
.pwa-head p { margin: 0; font-size: .78rem; color: var(--up); font-weight: 500; }
.pwa-perks { list-style: none; margin: 0 0 16px; padding: 12px 14px; display: grid; gap: 9px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.pwa-perks li { display: flex; align-items: center; gap: 11px; font-size: .84rem; color: var(--text); }
.pwa-perks b { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: .8rem; background: rgba(255, 68, 79, .12); color: var(--brand); }
.pwa-later { display: block; width: 100%; margin-top: 6px; padding: 10px; border: 0; background: none; color: var(--muted); font: 500 .86rem var(--font); cursor: pointer; }
.pwa-ios { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.pwa-ios li { counter-increment: s; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .86rem; }
.pwa-ios li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; background: var(--grad); color: #fff; margin-right: 4px; }
.pwa-key { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px; background: var(--panel-3); font-weight: 600; font-size: .8rem; }
.pwa-key svg { color: var(--blue); }
