:root {
  --bg: #0b0f17;
  --panel: #121826;
  --panel-2: #172033;
  --line: #222c40;
  --text: #e6ebf5;
  --muted: #8592ab;
  --accent: #4f8cff;
  --good: #22c55e;
  --bad: #f05252;
  --warn: #f5a524;
  --radius: 12px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { background:
  radial-gradient(1200px 600px at 85% -10%, rgba(109,140,255,.10), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(169,112,255,.08), transparent 60%), var(--bg);
  background-attachment: fixed; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; color: var(--muted); font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }

#app { display: flex; min-height: 100vh; }
#nav { width: 230px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; margin: 0 6px 24px; }
.logo { background: linear-gradient(135deg, #4f8cff, #a970ff); color: #fff; border-radius: 8px;
  padding: 4px 7px; font-size: 13px; }
#nav nav { display: flex; flex-direction: column; gap: 2px; }
#nav nav a { color: var(--muted); padding: 9px 10px; border-radius: 8px; }
#nav nav a:hover { color: var(--text); background: var(--panel-2); }
#nav nav a.active { color: var(--text); background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 0 6px; }
.mode-pill { align-self: flex-start; font-size: 11px; padding: 3px 8px; border-radius: 99px;
  background: rgba(245,165,36,.12); color: var(--warn); border: 1px solid rgba(245,165,36,.3); }

main#view { flex: 1; padding: 28px 32px 60px; max-width: 1280px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.banner { border: 1px solid rgba(245,165,36,.35); background: rgba(245,165,36,.07); color: #f3d6a0;
  border-radius: var(--radius); padding: 12px 16px; font-size: 13px; }
.banner.info { border-color: rgba(79,140,255,.35); background: rgba(79,140,255,.07); color: #c5d7ff; }
.banner.bad { border-color: rgba(240,82,82,.35); background: rgba(240,82,82,.07); color: #ffc9c9; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px; cursor: pointer;
  transition: border-color .15s, transform .15s; }
.card:hover { border-color: #33415e; transform: translateY(-1px); }
.card-head { display: flex; gap: 12px; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 700; color: #fff; flex-shrink: 0; }
.card-title { font-weight: 600; font-size: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--panel-2);
  color: var(--muted); border: 1px solid var(--line); }
.chip.long { background: rgba(34,197,94,.1); color: #86efac; border-color: rgba(34,197,94,.35); }
.chip.short { background: rgba(240,82,82,.1); color: #fca5a5; border-color: rgba(240,82,82,.35); }
.chip.sig { background: rgba(79,140,255,.12); color: #a9c5ff; border-color: rgba(79,140,255,.35); }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.metric .value { font-family: var(--mono); font-size: 18px; font-weight: 500; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.kpi .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-family: var(--mono); font-size: 20px; margin-top: 2px; }
.kpi .sub { font-size: 11px; color: var(--muted); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: default; white-space: nowrap; }
th.sortable { cursor: pointer; }
td { padding: 9px 10px; border-bottom: 1px solid #1a2233; white-space: nowrap; }
td.num, th.num { text-align: right; font-family: var(--mono); }
tr:hover td { background: rgba(255,255,255,.015); }
.table-wrap { overflow-x: auto; }

.bar { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; border-radius: 99px; }

.tabs { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 6px;
  font: inherit; cursor: pointer; }
.tabs button.on { background: var(--panel-2); color: var(--text); }

button.btn, a.btn { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px;
  font: 500 14px Inter, sans-serif; cursor: pointer; display: inline-block; }
button.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
button.btn.danger { background: rgba(240,82,82,.15); color: #ff9c9c; border: 1px solid rgba(240,82,82,.4); }
button.btn:disabled { opacity: .45; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--muted); padding: 0; text-align: left; cursor: pointer; font: inherit; }
button.link:hover { color: var(--text); }

form.form { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
input, select { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px;
  padding: 9px 11px; font: 14px Inter, sans-serif; }
input:focus, select:focus { outline: 2px solid rgba(79,140,255,.5); border-color: var(--accent); }

.auth { max-width: 400px; margin: 9vh auto; }
.auth .brand { justify-content: center; margin-bottom: 18px; font-size: 20px; }
.status { font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); }
.status.running { color: var(--good); border-color: rgba(34,197,94,.4); background: rgba(34,197,94,.08); }
.status.paused { color: var(--warn); border-color: rgba(245,165,36,.4); }
.status.suspended { color: var(--bad); border-color: rgba(240,82,82,.4); }
.status.stopped { color: var(--muted); }
.chart-box { position: relative; height: 280px; }
.spark { height: 46px; }
.heat td.cell { text-align: center; font-family: var(--mono); font-size: 12px; }
#toast { position: fixed; bottom: 20px; right: 20px; background: var(--panel-2); border: 1px solid var(--line);
  padding: 12px 16px; border-radius: 10px; max-width: 360px; z-index: 10; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }

@media (max-width: 900px) {
  #app { flex-direction: column; }
  #nav { width: 100%; height: auto; position: static; padding: 12px 16px; }
  #nav nav { flex-direction: row; overflow-x: auto; }
  #nav nav a { white-space: nowrap; }
  .nav-foot { flex-direction: row; align-items: center; margin-top: 10px; }
  main#view { padding: 20px 16px 40px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
}

label.check { flex-direction: row; align-items: flex-start; gap: 8px; color: var(--text); font-size: 13px; }
label.check input { margin-top: 3px; }
ul.news { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
ul.news li { border-bottom: 1px solid #1a2233; padding-bottom: 10px; }
ul.news a { color: var(--text); font-weight: 500; }
ul.news a:hover { color: var(--accent); }
.news-sum { color: #aab4c8; margin-top: 3px; }
.terms h2 { margin-top: 20px; }
.terms p { color: #c3cbe0; }

main.legal-page { max-width: 820px; margin: 0 auto; padding: 32px 16px 60px; }
main.legal-page ul { color: #c3cbe0; }

[hidden] { display: none !important; }

#market-switch select { width: 100%; }
.panel.plan { display: flex; flex-direction: column; gap: 8px; }
.panel.plan.current { border-color: var(--accent); }
.panel.plan .price { font-size: 26px; font-family: var(--mono); }
.panel.plan ul { margin: 0; padding-left: 18px; color: #c3cbe0; flex: 1; }

/* ---------------------------------------------------------------- polish */
.panel, .card, .kpi { box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.18); }
.card:hover { box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px rgba(0,0,0,.28); }
button.btn { transition: filter .15s, transform .05s; }
button.btn:hover:not(:disabled) { filter: brightness(1.08); }
button.btn:active:not(:disabled) { transform: translateY(1px); }
.logo { box-shadow: 0 4px 16px rgba(109,140,255,.35); }

/* ---------------------------------------------------------------- auth pages */
body.auth-mode main#view { padding: 0; max-width: none; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); min-height: 100vh; }
.auth-hero { position: relative; overflow: hidden; padding: 48px 56px; display: flex; flex-direction: column;
  background: linear-gradient(160deg, #111a33 0%, #0c1224 55%, #0b0f17 100%); border-right: 1px solid var(--line); }
.hero-glow { position: absolute; inset: -20% -10% auto auto; width: 70%; height: 70%;
  background: radial-gradient(closest-side, rgba(109,140,255,.28), transparent); filter: blur(10px); pointer-events: none; }
.hero-brand { font-size: 18px; margin: 0; position: relative; }
.hero-copy { position: relative; margin: auto 0; max-width: 560px; padding: 40px 0 120px; }
.hero-copy h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 16px; }
.grad { background: linear-gradient(90deg, #8aa2ff, #b18cff 60%, #6ee7c5); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.hero-copy > p { color: #aab4c8; font-size: 16px; margin: 0 0 28px; max-width: 520px; }
.hero-points { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.hero-points li { display: flex; gap: 14px; align-items: flex-start; }
.hero-points b { display: block; font-weight: 600; margin-bottom: 2px; }
.hero-points span:not(.hi) { color: var(--muted); font-size: 13px; }
.hi { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  background: rgba(109,140,255,.12); border: 1px solid rgba(109,140,255,.28); color: #a9bbff; }
.hi svg { width: 18px; height: 18px; }
.hero-markets { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-markets span { font-size: 12px; padding: 4px 10px; border-radius: 99px; color: #c3cbe0;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.hero-chart { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 160px; opacity: .9; }

.auth-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; gap: 20px; }
.auth-card { width: 100%; max-width: 400px; }
.card-brand { display: none; margin: 0 0 24px; font-size: 18px; }
.auth-title { font-size: 26px; letter-spacing: -.01em; margin: 0 0 6px; }
.auth-sub { color: var(--muted); margin: 0 0 24px; }
.auth-card form.form { gap: 14px; }
.auth-card label { color: #aab4c8; font-size: 13px; }
.auth-card input:not([type=checkbox]) { padding: 12px 14px; font-size: 15px; border-radius: 10px; background: #0d1320; }
.auth-card input::placeholder { color: #4c5770; }
.btn-lg { padding: 12px 16px !important; font-size: 15px !important; border-radius: 10px !important; margin-top: 4px; }
.btn-lg:not(.secondary) { background: linear-gradient(90deg, #4f8cff, #7a6cff) !important; }
.row-between { display: flex; justify-content: space-between; align-items: center; margin-top: -4px; }
.auth-switch { text-align: center; color: var(--muted); margin: 22px 0 0; }
.auth-legal { max-width: 400px; text-align: center; color: #5d6884; font-size: 12px; margin: 0; }
.auth-legal a { color: #7f8ba6; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .card-brand { display: flex; }
  .auth-side { min-height: 100vh; justify-content: flex-start; padding-top: 12vh; }
}

/* ---------------------------------------------------------------- landing page */
.landing { --maxw: 1160px; }
.landing a.brand { color: var(--text); }
.lp-nav { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 14px max(24px, calc((100vw - var(--maxw)) / 2));
  background: rgba(11,15,23,.72); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.05); }
.lp-nav .brand { margin: 0; font-size: 17px; }
.lp-links { display: flex; gap: 22px; margin-left: 24px; }
.lp-links a { color: var(--muted); font-size: 14px; }
.lp-links a:hover { color: var(--text); }
.lp-cta { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.link-btn { color: var(--text); font-weight: 500; }
a.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
a.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 10px; }
.lp-hero { position: relative; text-align: center; padding: 72px 24px 24px; max-width: var(--maxw); margin: 0 auto; }
.lp-hero .hero-glow { inset: -10% 10% auto 10%; width: 80%; height: 60%; }
.pill { display: inline-block; font-size: 12px; color: #c3cbe0; padding: 5px 12px; border-radius: 99px;
  background: rgba(109,140,255,.1); border: 1px solid rgba(109,140,255,.3); margin-bottom: 22px; position: relative; }
.lp-hero h1 { position: relative; font-size: clamp(34px, 5.4vw, 64px); line-height: 1.06; letter-spacing: -.03em; margin: 0 0 18px; }
.lead { position: relative; max-width: 680px; margin: 0 auto 28px; color: #aab4c8; font-size: 17px; }
.hero-ctas { position: relative; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.hero-shot { position: relative; max-width: 1000px; margin: 0 auto; }
.hero-shot::before { content: ""; position: absolute; inset: 8% 6% -6%; background: radial-gradient(closest-side, rgba(109,140,255,.35), transparent);
  filter: blur(40px); z-index: -1; }
.fine { color: #5d6884; font-size: 12px; margin-top: 12px; }
.shot { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid #26314a; background: #0c111c;
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02) inset; }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #111827; border-bottom: 1px solid #1f2940; }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3550; }
.shot-bar span { margin: 0 auto; font-size: 11px; color: #6b7690; padding-right: 36px; }
.shot img { display: block; width: 100%; height: auto; }
.lp-section { max-width: var(--maxw); margin: 0 auto; padding: 96px 24px 0; }
.lp-section.narrow { max-width: 760px; }
.lp-section h2, .lp-final h2 { text-align: center; font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -.02em; margin: 8px 0 14px; }
.kicker { display: block; color: #8aa2ff; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.center { text-align: center; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.step { background: linear-gradient(180deg, #131b2c, #0f1522); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.step b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #4f8cff, #a970ff);
  color: #fff; font-size: 14px; margin-bottom: 14px; }
.step h4, .trust h4, .plan-card h4 { margin: 0 0 6px; font-size: 16px; }
.step p, .trust p { margin: 0; color: var(--muted); }
.lp-features { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.feat { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: center; padding-top: 110px; }
.feat.flip .feat-copy { order: 2; }
.feat h3 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.02em; margin: 10px 0 12px; }
.feat p { color: #aab4c8; font-size: 15px; margin: 0; }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.trust > div { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: rgba(255,255,255,.02); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: 16px;
  border: 1px solid var(--line); background: linear-gradient(180deg, #131b2c, #0f1522); }
.plan-card.featured { border-color: rgba(109,140,255,.6); box-shadow: 0 0 0 1px rgba(109,140,255,.25), 0 20px 50px rgba(79,140,255,.15); }
.plan-card .badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: 11px; padding: 3px 10px;
  border-radius: 99px; background: linear-gradient(90deg, #4f8cff, #a970ff); color: #fff; white-space: nowrap; }
.plan-card .price { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.plan-card .price span { font-size: 14px; color: var(--muted); font-weight: 400; }
.plan-card ul { margin: 0; padding-left: 18px; color: #c3cbe0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.plan-card a.btn { text-align: center; }
.faq { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 18px; }
.faq[open] summary::after { content: "–"; }
.faq p { color: #aab4c8; margin: 10px 0 0; }
.lp-final { text-align: center; padding: 110px 24px 40px; }
.lp-final .btn { margin-top: 10px; }
.lp-footer { max-width: var(--maxw); margin: 40px auto 0; padding: 32px 24px 48px; border-top: 1px solid var(--line); color: #5d6884; font-size: 12px; }
.lp-footer .brand { margin: 0 0 12px; font-size: 15px; color: var(--text); }
.lp-footer a { color: #7f8ba6; }
@media (max-width: 900px) {
  .lp-links { display: none; }
  .lp-hero { padding-top: 48px; }
  .steps, .trust, .plans { grid-template-columns: 1fr; }
  .feat { grid-template-columns: 1fr; gap: 24px; padding-top: 72px; }
  .feat.flip .feat-copy { order: 0; }
  .lp-section { padding-top: 72px; }
}
