/* ---------- fxtrack base theme ---------- */
:root {
  --bg: #0b0f1a;
  --bg-elev: #121829;
  --bg-elev-2: #1a2238;
  --border: #232b44;
  --border-strong: #2f3a5c;
  --text: #e7ecf5;
  --text-dim: #98a3bf;
  --text-mute: #6b7596;

  --brand: #6c8cff;
  --brand-2: #4b6cf5;
  --brand-soft: rgba(108, 140, 255, 0.12);

  --green: #2dd4a4;
  --green-soft: rgba(45, 212, 164, 0.12);
  --red: #ff5d7a;
  --red-soft: rgba(255, 93, 122, 0.12);
  --amber: #ffb547;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow:    0 6px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);

  --gap: 16px;
  --gap-lg: 24px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-elev: #ffffff;
  --bg-elev-2: #eef1f8;
  --border: #e2e6ef;
  --border-strong: #c9d0dd;
  --text: #161b2a;
  --text-dim: #4a5575;
  --text-mute: #8590ad;

  --brand: #4b6cf5;
  --brand-2: #2c4dd8;
  --brand-soft: rgba(75, 108, 245, 0.10);

  --green: #16a37b;
  --green-soft: rgba(22, 163, 123, 0.10);
  --red: #d8344f;
  --red-soft: rgba(216, 52, 79, 0.10);

  --shadow:    0 6px 24px rgba(20, 30, 60, 0.06);
  --shadow-lg: 0 16px 48px rgba(20, 30, 60, 0.10);
}

[data-theme="light"] body {
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(75,108,245,0.06), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(22,163,123,0.05), transparent 60%),
    var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* --- a11y: visible focus ring for keyboard users only --- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn:focus-visible, .input:focus-visible, .chips button:focus-visible, .theme-toggle button:focus-visible {
  outline-offset: 3px;
}

/* --- respect reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* screen-reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

body {
  background: radial-gradient(1200px 600px at 20% -10%, rgba(75,108,245,0.10), transparent 60%),
              radial-gradient(900px 500px at 100% 0%, rgba(45,212,164,0.07), transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: #8ea7ff; text-decoration: underline; text-underline-offset: 3px; }

button { font-family: inherit; }
input, select, textarea { font-family: inherit; color: var(--text); }

/* ---------- layout ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.app-shell > main { padding: 28px 32px 64px; }

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-shell > main { padding: 16px 16px 80px; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; overflow-x: auto; }
  .topbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .topbar h1 { font-size: 20px; }
  .topbar .row { justify-content: flex-start; flex-wrap: wrap; }
  .kpi .value { font-size: 22px; }
  .chart-wrap { height: 220px; }
  .chart-wrap.sm { height: 160px; }
  table.t th, table.t td { padding: 8px 10px; font-size: 12px; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .chips button { padding: 6px 8px; font-size: 11px; }
  .topbar h1 { font-size: 18px; }
}

/* ---------- sidebar ---------- */
.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px;
  padding: 4px 8px 16px;
}
.sidebar .brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--green));
  display: grid; place-items: center; color: #0b0f1a; font-weight: 800;
}
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-dim);
  font-weight: 500;
}
.sidebar nav a:hover { background: var(--bg-elev-2); color: var(--text); text-decoration: none; }
.sidebar nav a.active {
  background: var(--brand-soft); color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(108,140,255,0.25);
}
.sidebar .spacer { flex: 1; }
.sidebar .user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 10px;
  background: var(--bg-elev-2);
  cursor: pointer;
}
.sidebar .user-card .avatar { width: 32px; height: 32px; border-radius: 999px; background: var(--brand); display: grid; place-items: center; color: #0b0f1a; font-weight: 700; }
.sidebar .user-card .meta { display: flex; flex-direction: column; line-height: 1.2; }
.sidebar .user-card .meta .name { font-weight: 600; }
.sidebar .user-card .meta .sub { font-size: 12px; color: var(--text-mute); }

/* mobile bottom nav */
.mobile-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding: 8px 12px;
  gap: 4px;
  z-index: 10;
}
.mobile-nav a {
  flex: 1; text-align: center; padding: 8px 4px;
  color: var(--text-mute); font-size: 12px;
  border-radius: 8px;
}
.mobile-nav a.active { color: var(--text); background: var(--brand-soft); }

/* ---------- top bar in main ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.topbar h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.topbar .subtitle { color: var(--text-mute); font-size: 13px; margin-top: 4px; }

/* ---------- generic cards ---------- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.card h3 { margin: 0 0 12px; font-size: 14px; color: var(--text-dim); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }

.grid { display: grid; gap: var(--gap); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-12 { grid-template-columns: repeat(12, minmax(0,1fr)); }
.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .col-8, .col-4, .col-6, .col-12 { grid-column: span 12; }
}

/* ---------- KPI ---------- */
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi .label { color: var(--text-mute); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi .value { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.kpi .delta { font-size: 13px; font-weight: 600; }
.delta.pos { color: var(--green); }
.delta.neg { color: var(--red); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 6px; vertical-align: middle; }
.dot.green { background: var(--green); }
.dot.red { background: var(--red); }
.dot.amber { background: var(--amber); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev-2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { background: #1f284200; border-color: #3b4870; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #0b0f1a;
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108,140,255,0.2); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }

/* ---------- table ---------- */
.table-wrap { overflow: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table.t {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: var(--bg-elev);
}
table.t th, table.t td {
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.t th { color: var(--text-mute); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg-elev-2); position: sticky; top: 0; }
table.t tbody tr:hover { background: rgba(255,255,255,0.02); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.pill.buy  { background: var(--green-soft); color: var(--green); }
.pill.sell { background: var(--red-soft);   color: var(--red); }
.pill.verified {
  background: linear-gradient(180deg, rgba(45,212,164,0.18), rgba(45,212,164,0.10));
  color: var(--green);
  border: 1px solid rgba(45,212,164,0.35);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pill.tag {
  background: rgba(108,140,255,0.10);
  color: var(--brand);
  border: 1px solid rgba(108,140,255,0.20);
  font-size: 10px;
  padding: 1px 7px;
  vertical-align: middle;
}
.tag-editor { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 6px; border: 1px solid var(--border-strong); border-radius: 10px; min-height: 40px; background: var(--bg); }
.tag-editor input { flex: 1; min-width: 100px; border: 0; background: transparent; color: var(--text); padding: 6px 4px; outline: none; font-size: 13px; font-family: inherit; }
.tag-editor .tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid rgba(108,140,255,0.25);
}
.tag-editor .tag-chip button {
  background: transparent; border: 0; color: var(--brand); cursor: pointer;
  padding: 0; font-size: 14px; line-height: 1; font-family: inherit;
  opacity: 0.7;
}
.tag-editor .tag-chip button:hover { opacity: 1; }
.pill.high   { background: var(--red-soft);   color: var(--red); }
.pill.medium { background: rgba(255,181,71,0.15); color: var(--amber); }
.pill.low    { background: var(--green-soft); color: var(--green); }

/* ---------- chart ---------- */
.chart-wrap { position: relative; height: 320px; }
.chart-wrap.sm { height: 180px; }

/* ---------- landing ---------- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}
.hero h1 { font-size: 56px; line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero h1 .grad { background: linear-gradient(90deg, var(--brand), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-dim); font-size: 18px; max-width: 640px; margin: 0 auto 28px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.nav-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.nav-top .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.nav-top .brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--green)); }
.nav-top nav a { color: var(--text-dim); margin-left: 22px; font-weight: 500; }
.nav-top nav a:hover { color: var(--text); text-decoration: none; }

/* feature grid */
.features { padding: 60px 0; }
.feature { padding: 24px; }
.feature .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; margin-bottom: 12px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--text-dim); font-size: 14px; }

footer.foot {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-mute);
  text-align: center;
  font-size: 13px;
}

/* ---------- auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.auth-card h2 { margin: 0 0 4px; font-size: 22px; }
.auth-card .muted { color: var(--text-mute); font-size: 13px; margin: 0 0 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }

.alert { padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.4; }
.alert.err  { background: var(--red-soft); color: var(--red); border: 1px solid rgba(255,93,122,0.3); }
.alert.ok   { background: var(--green-soft); color: var(--green); border: 1px solid rgba(45,212,164,0.3); }
.alert.warn { background: rgba(255,181,71,0.10); color: var(--amber); border: 1px solid rgba(255,181,71,0.3); }
.alert.info { background: var(--brand-soft); color: var(--brand); border: 1px solid rgba(108,140,255,0.3); }
.alert a { color: currentColor; text-decoration: underline; text-underline-offset: 3px; }

/* Delivery status chip (email digest send-test etc.) */
.status-line {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 12px; line-height: 1.5;
  border: 1px solid var(--border);
}
.status-line .dot {
  width: 8px; height: 8px; border-radius: 999px;
  margin-top: 6px; flex: 0 0 auto;
}
.status-line.ok   { background: var(--green-soft); border-color: rgba(45,212,164,0.3); color: var(--green); }
.status-line.warn { background: rgba(255,181,71,0.10); border-color: rgba(255,181,71,0.3); color: var(--amber); }
.status-line.err  { background: var(--red-soft); border-color: rgba(255,93,122,0.3); color: var(--red); }
.status-line .dot.ok   { background: var(--green); }
.status-line .dot.warn { background: var(--amber); }
.status-line .dot.err  { background: var(--red); }
.status-line strong { color: inherit; font-weight: 700; }

/* select pretty */
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

/* chip group (filter pills) */
.chips { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-elev-2); border-radius: 10px; border: 1px solid var(--border); }
.chips button {
  background: transparent; border: 0; color: var(--text-dim);
  padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.chips button:hover { color: var(--text); }
.chips button.active { background: var(--brand-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(108,140,255,0.3); }

/* theme toggle */
.theme-toggle {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--bg-elev-2); border-radius: 999px; border: 1px solid var(--border);
}
.theme-toggle button {
  background: transparent; border: 0; color: var(--text-mute); cursor: pointer;
  width: 28px; height: 28px; border-radius: 999px; font-size: 14px; font-family: inherit;
  display: grid; place-items: center;
}
.theme-toggle button.active { background: var(--bg); color: var(--text); }

/* modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(4, 8, 20, 0.65);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 20px;
  animation: modalFadeIn 0.18s ease-out;
}
[data-theme="light"] .modal-backdrop { background: rgba(20, 30, 60, 0.35); }
.modal {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow: auto;
  animation: modalPopIn 0.18s ease-out;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 24px 8px;
}
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 8px 24px 20px; }
.modal-close {
  background: transparent; border: 0; color: var(--text-mute);
  width: 32px; height: 32px; border-radius: 999px;
  font-size: 18px; cursor: pointer; font-family: inherit;
  display: grid; place-items: center;
}
.modal-close:hover { background: var(--bg-elev-2); color: var(--text); }
.detail-grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 13px; }
.detail-grid dt { color: var(--text-mute); text-transform: uppercase; font-size: 11px; letter-spacing: 0.04em; align-self: center; }
.detail-grid dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPopIn  { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* clickable table rows */
table.t tr[data-clickable] { cursor: pointer; }
table.t tr[data-clickable]:hover { background: var(--bg-elev-2); }

/* ============ Password field with eye toggle ============ */
.pwd-wrap { position: relative; display: block; }
.pwd-wrap .input { padding-right: 42px; }         /* space for the eye button */
.pwd-wrap .pwd-toggle {
  position: absolute; top: 50%; right: 6px;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; padding: 0;
  color: var(--text-mute); cursor: pointer;
  border-radius: 8px; font: inherit;
}
.pwd-wrap .pwd-toggle:hover { color: var(--text); background: var(--bg-elev-2); }
.pwd-wrap .pwd-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pwd-wrap .pwd-toggle svg { width: 20px; height: 20px; display: block; pointer-events: none; }

/* strength meter */
.pwd-strength {
  display: flex; gap: 4px; margin-top: 8px; height: 4px;
}
.pwd-strength span {
  flex: 1; border-radius: 999px; background: var(--bg-elev-2);
  transition: background 0.15s ease;
}
.pwd-strength[data-score="1"] span:nth-child(-n+1) { background: var(--red); }
.pwd-strength[data-score="2"] span:nth-child(-n+2) { background: var(--amber); }
.pwd-strength[data-score="3"] span:nth-child(-n+3) { background: #6c8cff; }
.pwd-strength[data-score="4"] span:nth-child(-n+4) { background: var(--green); }
.pwd-hint {
  margin-top: 4px; font-size: 11px; color: var(--text-mute);
  min-height: 14px;
}
.pwd-hint.match  { color: var(--green); }
.pwd-hint.mismatch { color: var(--red); }

/* ============ Comments + search ============ */
.comment {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: 0; }
.comment .avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--green));
  color: #0b0f1a; display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.comment .meta { font-size: 13px; }
.comment .meta .name { font-weight: 600; color: var(--text); }
.comment .meta .ago { color: var(--text-mute); font-size: 12px; margin-left: 6px; }
.comment .body { color: var(--text-dim); font-size: 14px; margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
.comment .delete {
  background: transparent; border: 0; color: var(--text-mute); cursor: pointer;
  font-size: 16px; padding: 0; opacity: 0.5;
}
.comment .delete:hover { color: var(--red); opacity: 1; }

.trader-result {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  align-items: center;
  cursor: pointer; color: inherit; text-decoration: none;
}
.trader-result:hover { background: var(--bg-elev-2); }
.trader-result .avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--green));
  color: #0b0f1a; display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.trader-result .name { font-weight: 600; }
.trader-result .sub  { color: var(--text-mute); font-size: 12px; }
.trader-result .followers { color: var(--text-dim); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }

/* ============ Prop firm mode ============ */
.prop-card { position: relative; }
.prop-card .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.prop-card .preset-name { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.prop-card .worst { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid; }
.prop-card .worst.ok      { color: var(--green); border-color: rgba(45,212,164,0.35); background: var(--green-soft); }
.prop-card .worst.near    { color: var(--amber); border-color: rgba(255,181,71,0.35); background: rgba(255,181,71,0.10); }
.prop-card .worst.warn    { color: var(--red); border-color: rgba(255,93,122,0.45); background: var(--red-soft); }
.prop-card .worst.breach  { color: white; border-color: var(--red); background: var(--red); }
.prop-card .worst.info    { color: var(--text-mute); border-color: var(--border); background: var(--bg-elev-2); }

.prop-rules { display: grid; gap: 10px; }
.prop-rule { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg-elev-2); border: 1px solid var(--border); }
.prop-rule .lbl { font-weight: 600; font-size: 13px; color: var(--text); }
.prop-rule .sub { font-size: 11px; color: var(--text-mute); }
.prop-rule .val { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.prop-rule .bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.prop-rule .bar > span { display: block; height: 100%; border-radius: 999px; transition: width .35s ease, background .2s ease; }
[data-theme="light"] .prop-rule .bar { background: rgba(20,30,60,0.08); }
.prop-rule.status-ok     .bar > span { background: var(--green); }
.prop-rule.status-near   .bar > span { background: var(--amber); }
.prop-rule.status-warn   .bar > span { background: var(--red); animation: propPulse 1.6s ease-in-out infinite; }
.prop-rule.status-breach .bar > span { background: var(--red); box-shadow: 0 0 12px var(--red); }
.prop-rule.status-info   .bar > span { background: var(--brand); }
@keyframes propPulse { 0%,100% { opacity: 1 } 50% { opacity: 0.55 } }
.prop-rule .reset { font-size: 11px; color: var(--text-mute); }

/* ============ Notifications ============ */
.bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer; font-family: inherit; font-size: 16px;
}
.bell:hover { color: var(--text); border-color: var(--border-strong); }
.bell .count {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--red); color: white;
  font-size: 10px; font-weight: 800; line-height: 18px; text-align: center;
  border: 2px solid var(--bg-elev);
}

.notif-panel {
  position: absolute; z-index: 500;
  width: min(380px, calc(100vw - 32px));
  max-height: 70vh; overflow: auto;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: modalPopIn 0.18s ease-out;
}
.notif-panel .head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: var(--bg-elev); z-index: 1;
}
.notif-panel .head h4 { margin: 0; font-size: 14px; font-weight: 700; }
.notif-panel .head button {
  background: transparent; border: 0; color: var(--brand);
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.notif-panel .head button:hover { text-decoration: underline; }

.notif-item {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; align-items: start;
}
.notif-item:hover { background: var(--bg-elev-2); }
.notif-item.unread { background: rgba(108,140,255,0.05); }
.notif-item.unread::before {
  content: ""; position: absolute; margin-left: 4px; margin-top: 8px;
  width: 6px; height: 6px; border-radius: 999px; background: var(--brand);
}
.notif-item .glyph {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-size: 14px;
  background: var(--bg-elev-2); color: var(--text-dim);
}
.notif-item.good  .glyph { background: var(--green-soft); color: var(--green); }
.notif-item.warn  .glyph { background: rgba(255,181,71,0.15); color: var(--amber); }
.notif-item.bad   .glyph { background: var(--red-soft); color: var(--red); }
.notif-item .title { font-weight: 600; font-size: 13px; line-height: 1.35; color: var(--text); }
.notif-item .body  { color: var(--text-dim); font-size: 12px; line-height: 1.5; margin-top: 3px; }
.notif-item .ago   { color: var(--text-mute); font-size: 11px; white-space: nowrap; }
.notif-empty { padding: 40px 20px; text-align: center; color: var(--text-mute); font-size: 13px; }
.notif-panel .foot {
  padding: 10px 16px; text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-mute); font-size: 11px;
}

/* ============ Landing page ============ */
.land-hero {
  padding: 96px 0 72px; text-align: center; position: relative; overflow: hidden;
}
.land-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 22px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid rgba(108,140,255,0.25);
}
.land-hero h1 {
  font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -0.025em;
  margin: 0 0 20px; font-weight: 800;
}
.land-hero h1 .grad {
  background: linear-gradient(90deg, var(--brand), var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.land-hero .lede {
  color: var(--text-dim); font-size: 18px; max-width: 640px; margin: 0 auto 32px; line-height: 1.55;
}
.land-hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.land-hero .cta .btn { padding: 14px 22px; font-size: 15px; border-radius: 12px; }

.land-vis {
  max-width: 980px; margin: 56px auto 0;
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-elev), var(--bg));
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  position: relative;
}
.land-vis .caption {
  position: absolute; left: 16px; top: 14px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(0,0,0,0.4); color: var(--text-dim);
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
}
.land-vis svg { display: block; width: 100%; height: auto; }

.land-trustbar {
  padding: 22px 0 6px; color: var(--text-mute);
  font-size: 13px; text-align: center;
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
}
.land-trustbar span { display: inline-flex; align-items: center; gap: 6px; }
.land-trustbar .dot-sep::before { content: "·"; color: var(--text-mute); margin-right: 20px; }

.land-section { padding: 96px 0; }
.land-section h2 {
  font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.02em;
  margin: 0 0 12px; text-align: center; font-weight: 700;
}
.land-section .lead-sub {
  color: var(--text-dim); text-align: center; max-width: 640px;
  margin: 0 auto 48px; font-size: 16px; line-height: 1.55;
}

.feature-tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .feature-tri { grid-template-columns: 1fr; } }
.feature-tri .card { padding: 28px; border-radius: 16px; }
.feature-tri .glyph {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-size: 20px; background: var(--brand-soft); color: var(--brand); margin-bottom: 16px;
}
.feature-tri h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--text); }
.feature-tri p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.6; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.steps .step {
  padding: 24px; border-radius: 16px;
  background: var(--bg-elev); border: 1px solid var(--border);
  position: relative;
}
.steps .step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -14px; left: 22px;
  width: 32px; height: 32px; border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  color: #0b0f1a; font-weight: 800; display: grid; place-items: center; font-size: 15px;
  box-shadow: 0 4px 14px rgba(75,108,245,0.35);
}
.steps h3 { margin: 6px 0 6px; font-size: 16px; }
.steps p  { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.6; }

.compare-table { border-collapse: separate; border-spacing: 0; width: 100%; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.compare-table thead th { background: var(--bg-elev-2); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); }
.compare-table td.us { color: var(--green); font-weight: 600; }
.compare-table td.them { color: var(--text-mute); }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table th:not(:first-child), .compare-table td:not(:first-child) { text-align: center; }
.compare-table th.us-col { color: var(--brand); }

.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 800px; margin: 0 auto; }
@media (max-width: 720px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  padding: 28px; border-radius: 18px;
  background: var(--bg-elev); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
}
.price-card.featured {
  background: linear-gradient(180deg, rgba(108,140,255,0.10), var(--bg-elev));
  border-color: rgba(108,140,255,0.35);
  box-shadow: 0 30px 80px rgba(75,108,245,0.15);
}
.price-card .plan { color: var(--text-mute); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.price-card .amount { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }
.price-card .amount small { font-size: 15px; color: var(--text-mute); font-weight: 500; margin-left: 4px; }
.price-card ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-dim); }
.price-card ul li::before { content: "✓"; color: var(--green); margin-right: 8px; font-weight: 700; }
.price-card .btn { margin-top: 12px; justify-content: center; }
.price-card .soon { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--bg-elev-2); color: var(--text-mute); font-size: 11px; font-weight: 600; margin-left: 8px; letter-spacing: 0.04em; }

.land-final {
  padding: 96px 0; text-align: center;
  background: radial-gradient(600px 300px at 50% 50%, rgba(75,108,245,0.12), transparent 70%);
}
.land-final h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 12px; letter-spacing: -0.02em; }
.land-final p { color: var(--text-dim); margin: 0 0 24px; font-size: 16px; }

/* animated hero curve */
@keyframes drawCurve { from { stroke-dashoffset: 2400; } to { stroke-dashoffset: 0; } }
.hero-curve path.line {
  stroke-dasharray: 2400; stroke-dashoffset: 2400;
  animation: drawCurve 2.2s ease-out 0.2s forwards;
}
@media (prefers-reduced-motion: reduce) {
  .hero-curve path.line { animation: none; stroke-dashoffset: 0; }
}

/* onboarding wizard cards */
.onb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
@media (max-width: 720px) { .onb-grid { grid-template-columns: 1fr; } }
.onb-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px; border-radius: 14px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  text-align: left; cursor: pointer; color: inherit;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  font-family: inherit;
}
.onb-card:hover, .onb-card:focus-visible {
  transform: translateY(-2px); border-color: var(--brand);
  background: linear-gradient(180deg, var(--bg-elev-2), var(--bg-elev));
}
.onb-card .glyph {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; font-size: 20px;
  background: var(--brand-soft); color: var(--brand);
}
.onb-card h4 { margin: 0; font-size: 15px; font-weight: 700; }
.onb-card p  { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.onb-card .foot { margin-top: auto; color: var(--brand); font-weight: 600; font-size: 13px; }

/* utility */
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted { color: var(--text-mute); }
.dim { color: var(--text-dim); }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

/* Legal pages (terms, privacy) */
.legal-wrap { max-width: 820px; margin: 0 auto; padding: 24px 20px 40px; }
.legal-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 32px;
}
.legal-topbar a { color: var(--text-dim); text-decoration: none; font-size: 14px; }
.legal-topbar a:hover { color: var(--text); }
.legal { font-size: 15px; line-height: 1.65; color: var(--text); }
.legal h1 { font-size: 32px; margin: 0 0 6px; letter-spacing: -0.02em; }
.legal h2 { font-size: 18px; margin: 32px 0 10px; letter-spacing: -0.01em; }
.legal p, .legal ul { margin: 0 0 12px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--brand); }
.legal code { background: var(--bg-elev-2); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.legal .tpl {
  background: rgba(255, 181, 71, 0.12); color: var(--yellow, #ffb547);
  padding: 1px 6px; border-radius: 4px; font-weight: 600; font-size: 13px;
}

/* Landing: top traders preview */
.top-traders-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
@media (max-width: 900px) { .top-traders-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .top-traders-grid { grid-template-columns: 1fr; } }
.trader-card {
  display: flex; gap: 12px; padding: 14px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; color: inherit; transition: transform 0.12s, border-color 0.12s;
}
.trader-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.trader-card .rank {
  font-size: 12px; font-weight: 700; color: var(--text-mute);
  min-width: 26px;
}
.trader-card .body { flex: 1; min-width: 0; }
.trader-card .growth { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 2px 0; }
.trader-card .meta { font-size: 11px; color: var(--text-mute); }
