/* Trade Automation — Pro terminal theme */
:root {
  --bg: #090C10;
  --panel: #0F141A;
  --panel-2: #141A22;
  --bar: #0B0F14;
  --line: #1F2731;
  --line-soft: #161D26;
  --control: #2A3441;
  --ink: #E8ECF1;
  --ink-2: #C3CAD3;
  --muted: #8C96A3;
  --accent: #D4B483;
  --accent-ink: #090C10;
  --up: #3E9BFF;
  --down: #F2683C;
  --ok: #4CC38A;
  --radius: 8px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.up { color: var(--up); }
.down { color: var(--down); }
.ok { color: var(--ok); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.strong { font-weight: 600; }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.desk-only { display: none !important; }
[hidden] { display: none !important; }

/* ---------- Screen + top bar ---------- */
.screen { min-height: 100dvh; display: flex; flex-direction: column; }
.content { flex: 1; padding: 0 0 16px; }
.top {
  background: var(--bar); border-bottom: 1px solid var(--line);
  padding: calc(14px + var(--safe-top)) 16px 12px; display: flex; flex-direction: column; gap: 12px;
}
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 30px; }
.top h1 { margin: 0; font-size: 17px; font-weight: 600; }
.top .meta { font-size: 12px; color: var(--muted); }
.top a.top-action, .top button.top-action { color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; background: none; border: 0; padding: 8px 0; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand strong { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; }
.brand span { font-size: 11px; color: var(--muted); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.dot.off { background: var(--muted); }
.icon-link { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius); color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12px; }
.stats div { display: flex; flex-direction: column; gap: 2px; }
.stats span:first-child { color: var(--muted); font-size: 11px; }
.stats span:last-child { font-size: 15px; font-weight: 600; }
.top .note { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.top .link-light { color: var(--accent); font-weight: 600; font-size: 14px; }

/* ---------- Navigation ---------- */
.nav { position: sticky; bottom: 0; display: flex; background: var(--bar); border-top: 1px solid var(--line); padding-bottom: var(--safe-bottom); z-index: 5; }
.nav a { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; color: var(--muted); text-decoration: none; }
.nav a[aria-current='page'] { color: var(--ink); font-weight: 600; }
.nav a[aria-current='page'] svg { stroke: var(--accent); }
.nav svg { width: 20px; height: 20px; }
.nav .nav-extra { display: none; }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-body { padding: 12px 14px; }
.pad { padding: 0 16px; }
.mt { margin-top: 12px; }
.label { font-size: 10.5px; color: var(--muted); letter-spacing: 0.6px; text-transform: uppercase; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tile { background: var(--panel); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tile .v { font-size: 15px; font-weight: 600; }
.tile .s { font-size: 11px; color: var(--muted); }
.hero-eq { padding: 16px 16px 4px; display: flex; flex-direction: column; gap: 4px; }
.hero-eq .big { font-size: 32px; font-weight: 600; letter-spacing: -0.5px; }
.meter { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.meter > div { height: 4px; background: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--line); color: var(--ink-2); }
.pill.buy { color: var(--up); border-color: rgba(62,155,255,0.4); background: rgba(62,155,255,0.08); }
.pill.sell { color: var(--down); border-color: rgba(242,104,60,0.4); background: rgba(242,104,60,0.08); }
.pill.gold { color: var(--accent); border-color: rgba(212,180,131,0.4); background: rgba(212,180,131,0.08); }
.pill.okp { color: var(--ok); border-color: rgba(76,195,138,0.4); background: rgba(76,195,138,0.08); }

/* ---------- Rows, tables, groups ---------- */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bar { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.bar .title { font-size: 14px; font-weight: 600; }
.bar .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.thead, .trow { display: grid; align-items: center; padding: 0 16px; }
.thead { padding-top: 8px; padding-bottom: 8px; font-size: 10.5px; letter-spacing: 0.5px; color: var(--muted); border-bottom: 1px solid var(--line); text-transform: uppercase; }
.trow { min-height: 50px; padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.cols-quotes { grid-template-columns: 1.3fr 1fr 1fr 0.8fr; }
.cols-signals { grid-template-columns: 1.25fr 0.8fr 1fr 1fr; }
.cell-stack { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cell-stack .sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bias { font-size: 12px; font-weight: 700; }
.section-head { padding: 18px 16px 8px; display: flex; justify-content: space-between; align-items: baseline; }
.section-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.section-head a, .section-head button { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; background: none; border: 0; padding: 4px 0; }
.group-label { padding: 18px 16px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.group { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.list { padding: 0 14px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; min-height: 44px; }
.list-row:last-child { border-bottom: 0; }
button.item { width: 100%; text-align: left; background: var(--panel); border: 0; border-bottom: 1px solid var(--line-soft); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; color: var(--ink); }
button.item:last-child { border-bottom: 0; }
.item .name { font-size: 14px; font-weight: 600; }
.item .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.item .end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; flex-shrink: 0; }
.scroll-x { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; font-size: 10.5px; letter-spacing: 0.5px; color: var(--muted); text-transform: uppercase; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: var(--panel-2); }

/* ---------- Forms ---------- */
.field-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 16px; min-height: 52px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.field-row:last-child { border-bottom: 0; }
.field-row label, .field-row > span:first-child { flex: 1 1 auto; min-width: 0; }
.field-row .hint { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.field-row input, .field-row select { text-align: right; border: 0; background: transparent; color: var(--ink-2); font-size: 14px; min-width: 0; flex: 1; height: 44px; padding: 0; }
.field-row input[type='number'] { flex: 0 0 64px; }
.field-row select { text-align-last: right; appearance: none; -webkit-appearance: none; }
.field-row select option { background: var(--panel); }
.field-row input:focus, .field-row select:focus { color: var(--ink); outline: none; }
.field-row:focus-within { background: var(--panel-2); }
.suffix { color: var(--muted); font-size: 14px; }
.stack { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--muted); }
.field input, .field select { height: 46px; padding: 0 12px; border: 1px solid var(--control); border-radius: 6px; background: var(--bg); font-size: 15px; color: var(--ink); }
.field input:focus, .field select:focus { border-color: var(--accent); outline: none; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 6px; padding: 2px; gap: 2px; }
.segmented button { flex: 1; height: 34px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; padding: 0 12px; }
.segmented button[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); }
.segmented.dark { border-color: var(--line); }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); background: var(--panel); padding: 0 16px; overflow-x: auto; }
.tabs button { flex: 0 0 auto; height: 44px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; padding: 0; }
.tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--accent); }
.radio-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 16px; min-height: 56px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.radio-row:last-child { border-bottom: 0; }
.radio-row .name { font-size: 14px; font-weight: 600; }
.radio-row .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.radio-row input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 2px solid var(--control); border-radius: 50%; margin: 0; display: grid; place-items: center; flex-shrink: 0; }
.radio-row input:checked { border-color: var(--accent); }
.radio-row input:checked::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.switch { width: 46px; height: 26px; border: 0; border-radius: 999px; background: var(--control); position: relative; padding: 0; flex-shrink: 0; transition: background 0.15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: transform 0.15s; }
.switch[aria-checked='true'] { background: var(--accent); }
.switch[aria-checked='true']::after { transform: translateX(20px); background: var(--accent-ink); }
.switch:disabled { opacity: 0.5; }

/* ---------- Buttons ---------- */
.btn { height: 46px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 600; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; gap: 8px; }
.btn.outline { background: transparent; color: var(--ink); border-color: var(--control); }
.btn.danger { background: rgba(242,104,60,0.08); color: var(--down); border-color: rgba(242,104,60,0.45); }
.btn.small { height: 34px; font-size: 12px; padding: 0 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-row { display: flex; gap: 8px; padding: 16px; }
.btn-row .btn { flex: 1; }
.text-btn { background: none; border: 0; color: var(--accent); font-size: 14px; font-weight: 600; padding: 12px 0; min-height: 44px; }
.text-btn.danger { color: var(--down); }

/* ---------- Notices, empty states ---------- */
.notice { margin: 12px 16px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.notice.warn { border-color: rgba(242,104,60,0.4); background: rgba(242,104,60,0.06); }
.notice.gold { border-color: rgba(212,180,131,0.4); background: rgba(212,180,131,0.06); }
.empty { padding: 36px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; max-width: 340px; }
.empty .title { font-size: 16px; font-weight: 600; color: var(--ink); }
.fineprint { margin: 12px 16px 0; font-size: 11.5px; line-height: 1.55; color: var(--muted); }
.loading { padding: 22px 16px; font-size: 13px; color: var(--muted); }
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 16px; }
.results div { display: flex; flex-direction: column; gap: 2px; }
.results span:first-child { font-size: 11px; color: var(--muted); }
.results span:last-child { font-size: 16px; font-weight: 600; }
.trust { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 14px 16px 4px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* ---------- Chart ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; }
.chart-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chart-head .sym { font-size: 15px; font-weight: 600; }
.chart-head select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; height: 32px; padding: 0 8px; color: var(--ink); }
.tf { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; margin-left: auto; }
.tf button { height: 26px; padding: 0 9px; border: 0; border-radius: 4px; font-size: 12px; font-weight: 600; background: transparent; color: var(--muted); }
.tf button[aria-pressed='true'] { background: var(--panel-2); color: var(--ink); }

/* ---------- Signal cards ---------- */
.sig { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 16px 12px; overflow: hidden; }
.sig-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; }
.sig-top .sym { font-size: 16px; font-weight: 600; }
.sig-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sig-levels div { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; border-right: 1px solid var(--line); min-width: 0; }
.sig-levels div:last-child { border-right: 0; }
.sig-levels .v { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.sig-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.5; }
.checks { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.checks div { display: flex; justify-content: space-between; gap: 10px; }
.checks .tick { color: var(--ok); margin-right: 6px; }
details.why summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; list-style: none; }
details.why summary::-webkit-details-marker { display: none; }
details.why[open] summary { margin-bottom: 8px; }
.sig.locked .sig-lock { padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.blur-lines { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.blur-lines span { height: 10px; border-radius: 3px; background: linear-gradient(90deg, var(--panel-2), var(--line)); }
.steps { display: flex; flex-direction: column; gap: 10px; }
.steps div { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.steps b.n { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font-size: 12px; display: grid; place-items: center; flex-shrink: 0; }

/* ---------- Plans ---------- */
.plans { display: grid; gap: 12px; padding: 0 16px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.plan.current { border-color: var(--accent); }
.plan.featured { border-color: rgba(212,180,131,0.55); box-shadow: inset 0 0 0 1px rgba(212,180,131,0.25); }
.plan .price { font-size: 28px; font-weight: 600; letter-spacing: -0.5px; }
.plan .price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.plan li::before { content: '✓'; color: var(--ok); margin-right: 8px; }

/* ---------- Install + auth ---------- */
.hero { background: var(--bg); color: var(--ink); min-height: 100dvh; display: flex; flex-direction: column; }
.wordmark { padding: calc(28px + var(--safe-top)) 24px 0; display: flex; justify-content: space-between; align-items: center; }
.wordmark strong { font-size: 12px; letter-spacing: 3px; font-weight: 700; }
.wordmark span { font-size: 11px; color: var(--muted); }
.hero-copy { padding: 72px 24px 32px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.hero-copy .rule { width: 32px; height: 2px; background: var(--accent); }
.hero-copy h1 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 600; max-width: 360px; }
.hero-copy p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 360px; }
.sheet-static { background: var(--panel); border-top: 1px solid var(--line); padding: 24px 24px calc(28px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 16px; }
.sheet-static h2 { margin: 0; font-size: 16px; font-weight: 600; }
.sheet-static p { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.sheet-static .divided { font-size: 12px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 14px; }
.auth-head { padding: 40px 24px 24px; display: flex; flex-direction: column; gap: 8px; }
.auth-head h1 { margin: 0; font-size: 26px; font-weight: 600; }
.auth-head p { margin: 0; font-size: 14px; color: var(--ink-2); }
.auth-body { background: var(--panel); border-top: 1px solid var(--line); flex: 1; padding: 24px 24px calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; }
.auth-body a { color: var(--accent) !important; }
.form-error { font-size: 13px; color: var(--down); min-height: 18px; }

/* ---------- Sheet + toast ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; max-height: 90dvh; overflow-y: auto; padding-bottom: var(--safe-bottom); animation: rise 0.18s ease-out; }
.sheet-head { padding: 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.sheet-body { padding: 16px; font-size: 14px; line-height: 1.5; display: flex; flex-direction: column; gap: 12px; }
.icon-btn { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; margin-right: -12px; color: var(--muted); }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } .switch, .switch::after { transition: none; } }
.toast { position: fixed; left: 50%; bottom: calc(76px + var(--safe-bottom)); transform: translateX(-50%); width: calc(100% - 32px); max-width: 488px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 500; line-height: 1.4; padding: 12px 14px; border-radius: 6px; z-index: 30; }
.toast.error { background: var(--down); color: #FFFFFF; }

/* ---------- Home ---------- */
.home-wrap { padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.home-wrap > .hero-eq { padding: 16px 0 4px; }
.home-grid { display: flex; flex-direction: column; gap: 12px; padding: 0; }
@media (max-width: 899px) {
  .sig-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sig-levels div:nth-child(2) { border-right: 0; }
  .sig-levels div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .home .tiles.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.home-side { display: flex; flex-direction: column; gap: 12px; }
.terminal-bar { display: none; }

/* ---------- Desktop (900px and wider) ---------- */
@media (min-width: 900px) {
  #app { max-width: none; }
  .desk-only { display: revert !important; }
  .phone-only { display: none !important; }
  .screen { margin-left: 72px; }
  .content { padding: 0 0 24px; }
  .top { padding: 16px 28px; }
  .nav {
    position: fixed; top: 0; bottom: 0; left: 0; width: 72px; flex-direction: column; justify-content: flex-start;
    gap: 4px; padding: 16px 0; border-top: 0; border-right: 1px solid var(--line);
  }
  .nav a { flex: 0 0 auto; min-height: 56px; margin: 0 8px; border-radius: 8px; font-size: 10px; }
  .nav a:hover { background: var(--panel-2); color: var(--ink); }
  .nav a[aria-current='page'] { background: var(--panel-2); }
  .nav .nav-extra { display: flex; }
  .nav .nav-spacer { flex: 1; }
  .terminal-bar { display: flex; align-items: center; gap: 22px; height: 58px; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--bar); white-space: nowrap; overflow: hidden; }
  .terminal-bar .kv { display: flex; flex-direction: column; gap: 1px; }
  .terminal-bar .kv span:first-child { font-size: 10px; color: var(--muted); letter-spacing: 0.6px; text-transform: uppercase; }
  .terminal-bar .kv span:last-child { font-weight: 600; font-size: 13.5px; }
  .terminal-bar .chip { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); font-size: 13px; }
  .home .tiles.kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .home .tile .v { font-size: 20px; }
  .home-wrap { padding: 16px 24px 0; display: flex; flex-direction: column; gap: 16px; }
  .home-grid { flex-direction: row; padding: 0; gap: 16px; align-items: stretch; }
  .home-grid > .panel { flex: 1; min-width: 0; }
  .home-side { width: 380px; flex-shrink: 0; }
  .wide { max-width: 1180px; margin: 0 auto; width: 100%; }
  .sig-feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0 24px; }
  .sig-feed .sig { margin: 0; }
  .plans { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 24px; }
  .toast { left: calc(50% + 36px); bottom: 24px; }
  .backdrop { align-items: center; }
  .sheet { border-radius: 10px; border-bottom: 1px solid var(--line); max-width: 540px; }
  .hero { align-items: center; justify-content: center; padding: 40px 0; }
  .hero .wordmark, .hero .hero-copy, .hero .auth-head { width: min(480px, 100%); }
  .hero .sheet-static, .hero .auth-body { width: min(480px, 100%); flex: 0 0 auto; border: 1px solid var(--line); border-radius: 10px; }
  .hero-copy { padding-top: 40px; flex: 0 0 auto; }
  .content > .group, .content > .notice, .content > .group-label, .content > .fineprint, .content > form, .content > .tabs, .content > .stack, .content > .section-head, .content > .list, .content > .empty, .content > .btn-row, .content > .results, .content > div:not(.home-wrap):not(.sig-feed):not(.plans) { max-width: 980px; margin-left: auto; margin-right: auto; }
  .group { border: 1px solid var(--line); border-radius: var(--radius); }
}

/* =====================================================================
   Trade Automation 2026 theme — obsidian, glass and aurum
   ===================================================================== */
:root {
  --bg: #070A13;
  --panel: rgba(20, 26, 46, 0.72);
  --panel-solid: #10152A;
  --panel-2: #171D36;
  --bar: rgba(8, 11, 22, 0.82);
  --line: rgba(255, 255, 255, 0.075);
  --line-soft: rgba(255, 255, 255, 0.045);
  --control: rgba(255, 255, 255, 0.14);
  --ink: #EEF1F8;
  --ink-2: #C5CCDD;
  --muted: #8D96AE;
  --accent: #F7A63F;
  --accent-ink: #140C02;
  --up: #22D3A6;
  --down: #FF5C7A;
  --ok: #22D3A6;
  --info: #8B97FF;
  --brand: linear-gradient(135deg, #FFD58A 0%, #F7A63F 55%, #FF6A2B 100%);
  --radius: 14px;
  --glow: 0 10px 30px rgba(255, 122, 47, 0.22);
}
body {
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(91, 76, 255, 0.18), transparent 60%),
    radial-gradient(700px 480px at -10% 10%, rgba(255, 138, 61, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
#app { background: transparent; }
h1, h2, .brand strong, .hero-copy h1, .auth-head h1, .hero-eq .big, .plan .price, .wordmark-text { font-family: Manrope, Inter, system-ui, sans-serif; }

/* glass surfaces */
.panel, .sig, .plan, .group, .tiles, .notice, button.item, .tile, .sheet, .sheet-static, .auth-body {
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.panel, .sig, .plan { background: var(--panel); border-color: var(--line); border-radius: var(--radius); }
.tiles { background: var(--line); border-radius: var(--radius); }
.tile { background: var(--panel-solid); }
.group { background: var(--panel); }
.thead { color: var(--muted); }
.top { background: var(--bar); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom-color: var(--line); }
.top h1 { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: -0.2px; }
.top h1::before { content: ''; width: 26px; height: 26px; border-radius: 8px; background: url('/icons/logo-mark.svg') center/contain no-repeat; flex-shrink: 0; }

/* buttons */
.btn { background: var(--brand); border: 0; color: var(--accent-ink); font-weight: 700; border-radius: 12px; box-shadow: var(--glow); }
.btn.outline { background: rgba(255,255,255,0.04); border: 1px solid var(--control); color: var(--ink); box-shadow: none; }
.btn.danger { background: rgba(255, 92, 122, 0.10); border: 1px solid rgba(255, 92, 122, 0.45); color: var(--down); box-shadow: none; }
.segmented { border-color: var(--line); border-radius: 12px; background: rgba(255,255,255,0.03); }
.segmented button { border-radius: 9px; }
.segmented button[aria-pressed='true'] { background: var(--brand); color: var(--accent-ink); }
.switch[aria-checked='true'] { background: var(--brand); }
.tabs { background: transparent; }
.tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: transparent; background-image: var(--brand); background-size: 100% 2px; background-repeat: no-repeat; background-position: bottom; }
.tf button[aria-pressed='true'] { background: rgba(247, 166, 63, 0.16); color: #FFD58A; }
.pill.gold { color: #FFD58A; border-color: rgba(247,166,63,0.45); background: rgba(247,166,63,0.10); }
.pill.buy { color: var(--up); border-color: rgba(34,211,166,0.4); background: rgba(34,211,166,0.10); }
.pill.sell { color: var(--down); border-color: rgba(255,92,122,0.4); background: rgba(255,92,122,0.10); }
.notice.gold { border-color: rgba(247,166,63,0.4); background: linear-gradient(135deg, rgba(247,166,63,0.12), rgba(255,106,43,0.05)); }
.toast { border-radius: 12px; }

/* brand lockup */
.brandlock { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brandlock img { width: 34px; height: 34px; border-radius: 10px; box-shadow: var(--glow); flex-shrink: 0; }
.brandlock .wm { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brandlock .wm b { font-family: Manrope, Inter, sans-serif; font-weight: 800; font-size: 15px; letter-spacing: -0.2px; white-space: nowrap; }
.brandlock .wm b span { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brandlock .wm small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* asset icons */
.asset { position: relative; width: 36px; height: 36px; flex-shrink: 0; }
.asset .c { position: absolute; width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; box-shadow: 0 0 0 2px var(--panel-solid); font-family: Manrope, Inter, sans-serif; }
.asset .c.a { left: 0; top: 0; }
.asset .c.b { right: 0; bottom: 0; z-index: 1; }
.asset .c.a { z-index: 2; }
.asset.single .c { width: 36px; height: 36px; font-size: 14px; position: static; box-shadow: none; }

/* market rows (IQ Option style) */
.qrow { display: grid; grid-template-columns: 36px minmax(0, 1fr) 76px minmax(84px, auto); gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); }
.qrow:last-child { border-bottom: 0; }
.qrow .nm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qrow .nm b { font-size: 14.5px; font-weight: 700; }
.qrow .nm span { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .px { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.qrow .px b { font-size: 14.5px; font-weight: 700; }
.chg { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.chg.up { color: var(--up); background: rgba(34,211,166,0.12); }
.chg.down { color: var(--down); background: rgba(255,92,122,0.12); }
.chg.flat { color: var(--muted); background: rgba(255,255,255,0.06); }
.spark { display: block; width: 76px; height: 30px; }

/* market pulse cards */
.movers { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.movers::-webkit-scrollbar { display: none; }
.mover { flex: 0 0 158px; scroll-snap-align: start; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; position: relative; overflow: hidden; }
.mover::after { content: ''; position: absolute; inset: auto -20% -40% -20%; height: 70%; background: radial-gradient(closest-side, var(--mover-glow, rgba(34,211,166,0.18)), transparent); pointer-events: none; }
.mover .row1 { display: flex; align-items: center; gap: 8px; }
.mover .row1 b { font-size: 13.5px; }
.mover .p { font-size: 17px; font-weight: 800; font-family: Manrope, Inter, sans-serif; }
.mover .spark { width: 100%; height: 34px; }

/* hero equity card */
.hero-card { position: relative; border-radius: 20px; padding: 18px; background: linear-gradient(160deg, rgba(41, 36, 90, 0.85), rgba(16, 21, 42, 0.9) 55%, rgba(60, 30, 18, 0.6)); border: 1px solid rgba(255,255,255,0.09); overflow: hidden; }
.hero-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(255,213,138,0.6), transparent 40%, rgba(139,151,255,0.4)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.hero-card .lbl { font-size: 12px; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hero-card .big { font-family: Manrope, Inter, sans-serif; font-size: 34px; font-weight: 800; letter-spacing: -0.8px; margin-top: 6px; }
.hero-card .area { display: block; width: 100%; height: 64px; margin-top: 10px; }
.hero-card .actions { display: flex; gap: 8px; margin-top: 14px; }
.hero-card .actions .btn { flex: 1; height: 44px; }

/* signal cards */
.sig { border-left: 3px solid var(--line); }
.sig.buy { border-left-color: var(--up); }
.sig.sell { border-left-color: var(--down); }
.sig.locked { border-left-color: var(--accent); }
.score-ring { --p: 70; width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(#F7A63F calc(var(--p) * 1%), rgba(255,255,255,0.08) 0); display: grid; place-items: center; flex-shrink: 0; }
.score-ring span { width: 36px; height: 36px; border-radius: 50%; background: var(--panel-solid); display: grid; place-items: center; font-size: 12px; font-weight: 800; }

/* auth + install with photo */
.hero.photo { background: linear-gradient(180deg, rgba(7,10,19,0.35) 0%, rgba(7,10,19,0.75) 45%, #070A13 78%), var(--hero-img) center/cover no-repeat, #070A13; }
.hero .credit { position: absolute; right: 12px; top: calc(10px + var(--safe-top)); font-size: 10px; color: rgba(255,255,255,0.55); }
.hero .credit a { color: rgba(255,255,255,0.75); }
.hero { position: relative; }
.hero-copy h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.6px; }
.hero-copy h1 span { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy .rule { background: var(--brand); width: 44px; height: 3px; border-radius: 2px; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-badges span { font-size: 11.5px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: var(--ink-2); }

/* phone navigation: floating glass pill */
@media (max-width: 899px) {
  .nav { margin: 0 10px calc(10px + var(--safe-bottom)); padding: 6px; border: 1px solid var(--line); border-radius: 22px; background: rgba(12, 16, 32, 0.86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); bottom: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.45); }
  .nav a { min-height: 50px; border-radius: 16px; }
  .nav a[aria-current='page'] { background: rgba(247,166,63,0.12); color: #FFD58A; }
  .nav a[aria-current='page'] svg { stroke: #FFD58A; }
}
@media (min-width: 900px) {
  .nav { background: rgba(8, 11, 22, 0.9); backdrop-filter: blur(18px); }
  .nav::before { content: ''; position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 38px; height: 38px; border-radius: 11px; background: url('/icons/logo-mark.svg') center/contain no-repeat; box-shadow: var(--glow); }
  .nav { padding-top: 76px; }
  .nav a[aria-current='page'] { background: rgba(247,166,63,0.12); color: #FFD58A; }
  .nav a[aria-current='page'] svg { stroke: #FFD58A; }
  .terminal-bar { background: rgba(8, 11, 22, 0.82); backdrop-filter: blur(16px); }
  .mover { flex-basis: 190px; }
  .hero.photo { background: linear-gradient(90deg, rgba(7,10,19,0.2), #070A13 70%), var(--hero-img) left center/cover no-repeat, #070A13; }
}
