@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Reset & tokens ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #07070a;
  --surface-1:   #0d0d11;
  --surface-2:   #111116;
  --surface-3:   #18181f;
  --border:      #1e1e28;
  --border-hover:#2e2e3d;
  --text-1:      #e8e8f0;
  --text-2:      #8888a0;
  --text-3:      #44445a;
  --accent:      #7c3aed;
  --accent-dim:  rgba(124,58,237,.12);
  --green:       #10b981;
  --green-dim:   rgba(16,185,129,.1);
  --red:         #ef4444;
  --red-dim:     rgba(239,68,68,.1);
  --amber:       #f59e0b;
  --amber-dim:   rgba(245,158,11,.1);
  --radius-sm:   4px;
  --radius:      8px;
  --radius-lg:   10px;
  --sidebar-w:   200px;
  --font:        'Inter', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;
}

html { font-size: 13px; }
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font);
  line-height: 1.5;
  height: 100dvh;
  overflow: hidden;
}

/* ── Layout shell ───────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100dvh;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 12px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  flex-shrink: 0;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand strong { display: block; font-size: 12px; color: var(--text-1); line-height: 1.3; }
.brand span   { display: block; font-size: 10px; color: var(--text-3); line-height: 1.3; }

nav { display: flex; flex-direction: column; gap: 1px; padding: 4px 8px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  color: var(--text-2);
  cursor: pointer;
  font: 12px/1 var(--font);
  height: 36px;
  padding: 0 10px;
  text-align: left;
  transition: background .12s, color .12s, border-color .12s;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.nav-item:hover { background: var(--surface-3); color: var(--text-1); }
.nav-item.active {
  background: var(--accent-dim);
  border-left-color: var(--accent);
  color: var(--text-1);
  font-weight: 500;
}

.mobile-nav {
  display: none;
  flex-direction: row;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  overflow-x: auto;
  flex-shrink: 0;
}
.mobile-nav-item {
  flex: 1 0 auto;
  min-width: 76px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-2);
  font: 12px/1 var(--font);
}
.mobile-nav-item.active {
  border-color: rgba(124,58,237,.55);
  background: var(--accent-dim);
  color: var(--text-1);
  font-weight: 600;
}

/* ── Main area ──────────────────────────────────────────── */
main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 44px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  flex-shrink: 0;
  gap: 12px;
}
.topbar h1   { font-size: 14px; font-weight: 600; letter-spacing: -.3px; }
.topbar .eyebrow { font-size: 10px; color: var(--text-3); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 1px; }
.account-picker {
  display: grid;
  grid-template-columns: auto minmax(142px, 178px);
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.account-picker-label {
  color: var(--text-3);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.account-select-wrap {
  position: relative;
  display: block;
  min-width: 0;
}
.account-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--text-2);
  border-bottom: 1.5px solid var(--text-2);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.account-picker select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-1);
  padding: 0 30px 0 10px;
  font: 500 11px/30px var(--font);
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-picker select:hover,
.account-picker select:focus {
  border-color: var(--border-hover);
  outline: none;
}
.account-picker select:disabled { opacity: .75; cursor: default; }
.actions { display: flex; gap: 6px; align-items: center; }

.header-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  margin-left: auto;
}
.header-balance-label {
  font-size: 9px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .6px;
}
.header-balance-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: -.3px;
}

/* ── Scroll body ────────────────────────────────────────── */
.view-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Views ──────────────────────────────────────────────── */
.view { display: none; flex-direction: column; gap: 16px; width: 100%; }
.view.active { display: flex; }

/* ── System health bar — clean inline strip ─────────────── */
.health-bar {
  display: flex;
  gap: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.health-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  padding: 9px 16px;
  flex: 1;
  min-width: 110px;
  transition: background .15s;
}
.health-card:last-child { border-right: none; }
.health-card:hover { background: var(--surface-2); }
.health-card.ok    {}
.health-card.error {}
.health-card.warn  {}
.market-clock-card {
  flex: 1.15;
}

.health-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-hover);
  flex-shrink: 0;
  transition: background .3s, box-shadow .3s;
}
.health-dot.ok, .health-dot.green {
  background: var(--green);
  box-shadow: 0 0 5px rgba(16,185,129,.5);
}
.health-dot.red, .health-dot.error { background: var(--red); }
.health-dot.amber, .health-dot.warn { background: var(--amber); }

.health-info { flex: 1; min-width: 0; }
.health-label { font-size: 11px; font-weight: 600; color: var(--text-1); display: block; white-space: nowrap; }
.health-sub   { font-size: 10px; color: var(--text-3); display: block; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Metrics grid ───────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.overview-metrics-grid {
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.metric-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color .2s;
}
.metric-card:hover { border-color: var(--border-hover); border-left-color: var(--accent); }
.metric-card .label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-3);
}
.metric-card .value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--text-1);
  line-height: 1.15;
}
.metric-card .sub {
  font-size: 11px;
  color: var(--text-3);
}
/* Legacy strong/span/small inside metric-card for backward compat */
.metric-card > span  { font-size: 10px; color: var(--text-3); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.metric-card > strong{ font-family: var(--font-mono); font-size: 22px; font-weight: 600; letter-spacing: -1px; line-height: 1.15; }
.metric-card > small { font-size: 11px; color: var(--text-3); }

/* ── Mono ───────────────────────────────────────────────── */
.mono { font-family: var(--font-mono); }
td.mono { font-family: var(--font-mono); }

/* ── Strategy compare ───────────────────────────────────── */
.strategy-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.strategy-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.strategy-panel.strategy-a { border-top: 2px solid var(--accent); }
.strategy-panel.strategy-c { border-top: 2px solid var(--green); }

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.panel-head .eyebrow { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }
.panel-head h2 { font-size: 13px; font-weight: 600; letter-spacing: -.2px; margin-top: 2px; }
.badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.stat-row:last-child { border-bottom: none; }
.stat-row span  { color: var(--text-2); }
.stat-row strong{ font-weight: 600; font-family: var(--font-mono); }

/* ── Panels (chart / info) ──────────────────────────────── */
.panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.panel canvas {
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,0));
  border-radius: 6px;
}
.combined-chart-wrap {
  position: relative;
  height: 260px;
}
.combined-chart-wrap canvas {
  height: 260px;
}
.chart-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 11px;
  color: var(--text-2);
}
.chart-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 999px;
}
.legend-dot.weekend { background: #8b5cf6; }
.legend-dot.daily { background: #10b981; }
.legend-dot.total { background: #60a5fa; }
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}
.section-head h2  { font-size: 13px; font-weight: 600; letter-spacing: -.2px; }
.section-head .eyebrow { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
.section-head > span  { font-size: 11px; color: var(--text-3); }

canvas { display: block; width: 100%; }

/* ── Rule panel ─────────────────────────────────────────── */
.rule-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.rule-title {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.info-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(124,58,237,.2);
}
.rule-title h2 { font-size: 13px; font-weight: 600; letter-spacing: -.2px; }
.rule-title .eyebrow { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }
.rule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.rule-grid p {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
}
.rule-grid p strong { color: var(--text-2); font-size: 10px; text-transform: uppercase; letter-spacing: .3px; font-weight: 600; }
.rule-grid p span   { color: var(--text-2); line-height: 1.5; }

/* ── Table section ──────────────────────────────────────── */
.table-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.table-header h2 { font-size: 13px; font-weight: 600; letter-spacing: -.2px; }
.heading-inline { display: flex; align-items: center; gap: 7px; }
.table-filters { display: flex; gap: 6px; align-items: center; }
.market-monitor-search {
  width: 140px;
  min-width: 120px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-1);
  font: inherit;
  font-size: 12px;
}
.market-monitor-search::placeholder { color: var(--text-3); }
.market-monitor-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, .18);
}

.table-wrap { overflow-x: auto; }
.hl-subview { display: none; }
.hl-subview.active { display: block; }
.hl-subtab { display: inline-flex; align-items: center; gap: 5px; }
.hl-subtab span {
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  color: var(--text-3);
  font-size: 10px;
  line-height: 1;
}
.hl-subtab.active { color: var(--text-1); border-color: var(--accent); background: rgba(124,58,237,.12); }
.hl-subtab.active span { color: var(--text-1); background: rgba(124,58,237,.22); }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 8px 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface-1);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-3); }
tbody td { padding: 8px 12px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
tbody td strong { color: var(--text-1); font-weight: 600; }
tbody td.positive { color: var(--green); font-weight: 500; }
tbody td.negative { color: var(--red); font-weight: 500; }
tbody td.warning { color: var(--amber); font-weight: 500; }
.no-data-row td { color: var(--text-3); text-align: center; padding: 24px; }

.market-radar-table {
  min-width: 920px;
  table-layout: fixed;
}
.market-radar-symbol-col { width: 15%; }
.market-radar-type-col { width: 16%; }
.market-radar-basis-col { width: 210px; }
.market-radar-table th:nth-child(n+3):nth-child(-n+6),
.market-radar-table td:nth-child(n+3):nth-child(-n+6) {
  text-align: right;
}
.market-radar-table th:nth-child(7) { text-align: center; }
.market-radar-basis-cell {
  width: 210px;
  max-width: 210px;
  font-family: var(--font-mono);
  vertical-align: middle;
  text-align: center;
}
.market-radar-basis-content {
  min-height: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.market-radar-basis-primary,
.market-radar-basis-secondary {
  display: inline-block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}
.market-radar-basis-primary { color: var(--text-2); }
.market-radar-basis-secondary {
  color: var(--text-3);
  font-size: 10px;
  min-height: 14px;
}

/* ── Pills ──────────────────────────────────────────────── */
.pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--text-2);
}
.pill-live  { background: rgba(124,58,237,.15); color: #a78bfa; }
.pill-paper { background: var(--surface-3); color: var(--text-3); }

.side-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
}
.side-pill.side-short { background: rgba(239,68,68,.15);  color: var(--red); }
.side-pill.side-long  { background: rgba(16,185,129,.15); color: var(--green); }

/* ── Buttons ────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s;
}
.button:hover { opacity: .88; }
.button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
}
.button.ghost:hover { color: var(--text-1); border-color: var(--border-hover); }

.text-button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: 500 11px/1 var(--font);
  padding: 0;
  text-decoration: none;
}
.text-button:hover { opacity: .75; }

/* Danger / ghost small action buttons */
.btn-sm { height: 26px; padding: 0 10px; font-size: 11px; }
.btn-danger {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--red);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: 500 11px/1 var(--font);
  display: inline-flex;
  align-items: center;
}
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: 500 11px/1 var(--font);
  display: inline-flex;
  align-items: center;
}
.btn-ghost:hover { color: var(--text-1); border-color: var(--border-hover); }

/* ── Forms ──────────────────────────────────────────────── */
.form-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.form-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-card.wide { grid-column: 1/-1; }

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
}
input, select, textarea {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font: 12px/1.4 var(--font);
  padding: 7px 10px;
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; font-family: var(--font); line-height: 1.5; }
select option { background: var(--surface-3); }
.input-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }

/* ── History / journal ──────────────────────────────────── */
.history-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.note {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}
.note strong { color: var(--text-1); font-size: 12px; }
.note p      { color: var(--text-2); line-height: 1.5; }

/* Positions */
.hl-position-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 6px; }
.hl-position {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 11px;
  display: flex; flex-direction: column; gap: 3px; font-size: 11px;
}
.hl-position strong { color: var(--text-1); font-size: 12px; }
.hl-position span   { color: var(--text-2); }
.account-status { padding: 0 16px 8px; }

/* ── HL-style table ─────────────────────────────────────── */
.hl-table { font-size: 12px; }
.hl-market-table {
  min-width: 1040px;
  table-layout: fixed;
}
.hl-orders-table { min-width: 840px; }
.hl-history-table { min-width: 900px; }
.hl-col-coin { width: 112px; }
.hl-col-size { width: 104px; }
.hl-col-money { width: 128px; }
.hl-col-price { width: 112px; }
.hl-col-pnl { width: 138px; }
.hl-col-margin { width: 128px; }
.hl-col-action { width: 92px; }
.hl-col-side { width: 104px; }
.hl-col-type { width: 140px; }
.hl-col-reduce { width: 140px; }
.hl-col-time { width: 170px; }
.hl-table th {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 10px;
  white-space: nowrap;
}
.hl-table td {
  padding: 10px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hl-market-table th:not(:first-child),
.hl-market-table td.hl-num {
  text-align: right;
}
.hl-market-table th:last-child,
.hl-action-cell {
  text-align: center;
}
.hl-orders-table th:nth-child(2),
.hl-orders-table th:nth-child(3),
.hl-orders-table td:nth-child(2),
.hl-orders-table td:nth-child(3) {
  text-align: center;
}
.hl-cell-coin {
  text-align: left;
  overflow: visible;
}
.hl-cell-coin strong {
  display: inline-block;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.hl-table tr.hl-pos-row:hover { background: var(--surface-2); }
.hl-table .hl-sub { font-size: 10px; color: var(--text-3); display: block; margin-top: 1px; line-height: 1.2; }

/* Sym dot indicator */
.hl-sym-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: middle; flex-shrink: 0; }
.hl-sym-dot.hl-long  { background: var(--green); }
.hl-sym-dot.hl-short { background: var(--red); }

/* Side colours */
.hl-long  { color: var(--green); }
.hl-short { color: var(--red); }

/* PnL colours */
.hl-pos  { color: var(--green); }
.hl-neg  { color: var(--red); }
.hl-warn { color: var(--amber); font-weight: 600; }
.hl-dim  { color: var(--text-3); font-size: 11px; }

/* Order type pills */
.hl-type-pill { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 4px; letter-spacing: .3px; }
.hl-limit-pill { background: rgba(99,102,241,.15); color: #818cf8; }
.hl-stop-pill  { background: rgba(239,68,68,.12);  color: var(--red); }
.hl-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: rgba(251,191,36,.12); color: var(--amber); }

/* Close button */
.hl-close-btn { font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 5px; border: 1px solid rgba(239,68,68,.4); color: var(--red); background: rgba(239,68,68,.08); cursor: pointer; transition: background .15s; }
.hl-close-btn:hover { background: rgba(239,68,68,.18); }

/* ── Combined performance section ──────────────────────── */
.combined-perf {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 2px;
  border-bottom: 1px solid var(--border);
}
.section-divider > span:first-child {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .6px;
}

/* ── Advanced stats grid ────────────────────────────────── */
.adv-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
}
.adv-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color .15s;
}
.adv-stat:hover { border-color: var(--border-hover); }
.adv-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.adv-val {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.3;
  letter-spacing: -.5px;
}
.adv-val.positive { color: var(--green); }
.adv-val.negative { color: var(--red); }
.adv-sub {
  font-size: 10px;
  color: var(--text-3);
  line-height: 1.4;
}

/* ── Two-column tables ──────────────────────────────────── */
.two-col-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.two-col-tables.single-column { grid-template-columns: 1fr; }
@media (max-width: 900px) { .two-col-tables { grid-template-columns: 1fr; } }

/* ── Chart tooltip ──────────────────────────────────────── */
.chart-tooltip {
  position: fixed;
  z-index: 200;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 11px;
  color: var(--text-1);
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
  display: none;
  max-width: min(320px, calc(100vw - 24px));
}
.chart-tooltip strong { display: block; margin-bottom: 3px; font-size: 12px; }
.chart-tooltip span   { display: block; color: var(--text-2); margin-top: 1px; }
.chart-tooltip code { font-family: var(--font-mono); font-size: 10px; }

/* ── KPI bar (weekend / daily bot stats) ───────────────── */
.kpi-bar {
  display: flex;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.kpi-bar-secondary {
  background: var(--surface-2);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.kpi-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px 12px;
  border-right: 1px solid var(--border);
  gap: 6px;
  text-align: center;
}
.kpi-cell:last-child { border-right: none; }
.kpi-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--text-1);
}
.kpi-bar-secondary .kpi-val { font-size: 18px; }
.kpi-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-3);
}
.kpi-sub {
  font-size: 10px;
  color: var(--text-3);
  line-height: 1;
}
.kpi-green  { color: var(--green); }
.kpi-amber  { color: var(--amber); }
.kpi-purple { color: #a78bfa; }
.kpi-red    { color: var(--red); }
.kpi-val.positive { color: var(--green); }
.kpi-val.negative { color: var(--red); }

/* ── Stat panel separator row ───────────────────────────── */
.stat-panel-sep {
  padding: 0 !important;
  height: 0;
  border: none;
  border-top: 1px solid var(--border) !important;
  pointer-events: none;
}

/* ── Stats hero bar ─────────────────────────────────────── */
.stats-hero {
  display: flex;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stats-hero-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 10px 14px;
  border-right: 1px solid var(--border);
  gap: 8px;
  text-align: center;
}
.stats-hero-item:last-child { border-right: none; }
.stats-hero-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}
.stats-hero-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ── Stat panels ────────────────────────────────────────── */
.stat-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stat-panel {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-panel-head {
  padding: 9px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.stat-panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.stat-panel-row:last-child { border-bottom: none; }
.stat-panel-row > span { color: var(--text-2); }
.stat-panel-row > strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
}
.stat-panel-row > strong.positive { color: var(--green); }
.stat-panel-row > strong.negative { color: var(--red); }
.stat-panel-row > strong.amber    { color: var(--amber); }

/* ── View page header (bot tabs) ────────────────────────── */
.view-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.view-page-header h2     { font-size: 15px; font-weight: 600; letter-spacing: -.3px; }
.view-page-header .eyebrow { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Info button (i icon) ───────────────────────────────── */
.info-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-3);
  font: 600 10px/1 var(--font-mono);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color .15s, color .15s;
  opacity: .65;
}
.info-btn:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.download-btn {
  height: 22px;
  min-width: 34px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-2);
  text-decoration: none;
  font: 700 10px/20px var(--font-mono);
  text-align: center;
  opacity: .75;
}
.download-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}
.compact-table-wrap {
  margin-top: 10px;
  max-height: 260px;
  overflow: auto;
}
.link-btn {
  border: 0;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  font: 600 10px/1 var(--font-mono);
}
.link-btn:hover { color: var(--red); }

/* ── Strategy modal ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
  backdrop-filter: blur(3px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--surface-1);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: min(520px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,.7);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-head h2       { font-size: 14px; font-weight: 600; margin-top: 2px; }
.modal-head .eyebrow { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }
.modal-close {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: none;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color .12s, color .12s;
}
.modal-close:hover { border-color: var(--border-hover); color: var(--text-1); }

/* ── Toast ──────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 300;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-1);
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
  transform: translateY(100px);
  transition: transform .22s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
#toast.show { transform: translateY(0); }

/* ── Warning / special notes ────────────────────────────── */
.warning-note { border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.05); }
.compact-note { padding: 7px 10px; }

code {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 10px;
  padding: 1px 5px;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ── Scrollbars ─────────────────────────────────────────── */
::-webkit-scrollbar             { width: 4px; height: 4px; }
::-webkit-scrollbar-track       { background: transparent; }
::-webkit-scrollbar-thumb       { background: var(--border-hover); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Login page ─────────────────────────────────────────── */
.login-root {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: var(--bg);
  background-image: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(124,58,237,.1) 0%, transparent 60%);
  padding: 24px;
}
.login-box {
  width: 100%;
  max-width: 340px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.02), 0 32px 64px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  text-align: center;
}
.login-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.login-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -.4px;
}
.login-sub {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .3px;
  text-transform: uppercase;
}
.login-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.login-error {
  font-size: 11px;
  color: var(--red);
  text-align: center;
  min-height: 16px;
  margin-top: 8px;
}
.login-footer {
  text-align: center;
  font-size: 10px;
  color: var(--text-3);
  margin-top: 18px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar   { display: none; }
  body { overflow: hidden; }
  .mobile-nav { display: flex; }
  .topbar {
    height: auto;
    min-height: 52px;
    padding: 9px 12px;
    align-items: flex-start;
  }
  .topbar .eyebrow { font-size: 9px; }
  .topbar h1 { font-size: 13px; }
  .actions { margin-left: auto; }
  .actions .button { height: 30px; padding: 0 9px; font-size: 11px; }
  .account-picker {
    grid-template-columns: minmax(130px, 166px);
    gap: 2px;
  }
  .account-picker-label { display: none; }
  .header-balance { display: none !important; }
  .view-body { padding: 8px 10px 72px; gap: 10px; }
  .strategy-compare { grid-template-columns: 1fr; }
  .rule-grid { grid-template-columns: 1fr; }
  .form-layout { grid-template-columns: 1fr; }
  .login-root { padding: 16px; }
  .health-bar {
    display: grid;
    grid-template-columns: repeat(8, minmax(90px, 1fr));
    overflow-x: auto;
  }
  .health-card {
    min-width: 90px;
    padding: 7px 9px;
    border-right: 1px solid var(--border);
    border-bottom: none;
  }
  .health-label { font-size: 10px; }
  .health-sub { font-size: 9px; }
  .overview-metrics-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { padding: 12px; }
  .metric-card > strong, .metric-card .value { font-size: 18px; letter-spacing: -.4px; }
  .table-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .table-filters { width: 100%; overflow-x: auto; justify-content: flex-start; }
  .panel { padding: 12px; }
  .combined-chart-wrap,
  .combined-chart-wrap canvas { height: 190px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .chart-tooltip {
    left: 12px !important;
    right: 12px;
    top: auto !important;
    bottom: 12px;
  }
}

@media (max-width: 520px) {
  html { font-size: 12px; }
  .metrics-grid,
  .overview-metrics-grid { grid-template-columns: 1fr 1fr; }
  .health-bar { grid-template-columns: repeat(8, 104px); }
  .topbar { gap: 8px; }
  .actions .button.ghost:first-child { display: none; }
  .account-picker { grid-template-columns: minmax(118px, 148px); }
}
/* Premium SaaS visual refresh */
/* Premium SaaS visual refresh */
:root {
  --bg: #080b0f;
  --surface-1: rgba(13, 18, 24, .84);
  --surface-2: rgba(18, 25, 33, .72);
  --surface-3: rgba(28, 38, 49, .76);
  --border: rgba(139, 155, 173, .16);
  --border-hover: rgba(125, 211, 252, .42);
  --text-1: #f2f6f8;
  --text-2: #9aa9b8;
  --text-3: #637386;
  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, .14);
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, .13);
  --red: #fb7185;
  --red-dim: rgba(251, 113, 133, .13);
  --amber: #fbbf24;
  --amber-dim: rgba(251, 191, 36, .13);
  --shadow-float: 0 18px 46px rgba(0, 0, 0, .34), 0 1px 0 rgba(255,255,255,.04) inset;
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, .24);
  --glass: saturate(150%) blur(18px);
  --radius-lg: 8px;
}

body {
  background:
    linear-gradient(135deg, #070a0f 0%, #0c1217 38%, #10130d 72%, #07100d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.85), rgba(0,0,0,.22));
}

.app-shell {
  position: relative;
  isolation: isolate;
}

.sidebar {
  background: rgba(7, 10, 15, .72);
  border-right-color: rgba(139,155,173,.18);
  backdrop-filter: var(--glass);
  box-shadow: 12px 0 38px rgba(0,0,0,.2);
}

.brand {
  min-height: 58px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0));
}

.brand-mark {
  background: linear-gradient(135deg, #38bdf8, #34d399 62%, #fbbf24);
  box-shadow: 0 0 24px rgba(56,189,248,.28);
  color: #061014;
}

.nav-item {
  border-left-width: 0;
  border-radius: var(--radius);
  margin: 1px 0;
  transition: transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.nav-item:hover {
  background: rgba(56,189,248,.09);
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(56,189,248,.18), rgba(52,211,153,.08));
  box-shadow: inset 3px 0 0 var(--accent), 0 10px 24px rgba(0,0,0,.18);
}

.mobile-nav,
.topbar {
  background: rgba(7, 10, 15, .72);
  backdrop-filter: var(--glass);
}

.topbar {
  height: 54px;
  border-bottom-color: rgba(139,155,173,.16);
  box-shadow: 0 10px 34px rgba(0,0,0,.18);
}
.topbar h1 { font-size: 15px; letter-spacing: 0; }
.topbar .eyebrow { color: var(--accent); }

.account-picker select,
.button,
.filter-btn,
.mobile-nav-item,
input,
select,
textarea {
  background: rgba(18, 25, 33, .78);
  border-color: rgba(139,155,173,.18);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}

.account-picker select:hover,
.account-picker select:focus,
.button:hover,
.filter-btn:hover,
.mobile-nav-item:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 3px rgba(56,189,248,.08), 0 1px 0 rgba(255,255,255,.06) inset;
}

.view-body {
  padding: 20px 24px 34px;
  gap: 18px;
}

.health-bar,
.panel,
.metric-card,
.strategy-panel,
.rule-panel,
.form-card,
.history-card,
.stat-panel,
.table-wrap,
.table-card,
.live-table-card,
.research-card,
.settings-card,
.modal-content {
  background: linear-gradient(180deg, rgba(24, 33, 43, .78), rgba(13, 18, 24, .72));
  border: 1px solid rgba(139,155,173,.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  backdrop-filter: var(--glass);
}

.health-bar {
  gap: 1px;
  overflow: visible;
  padding: 1px;
}
.health-card {
  border-right-color: rgba(139,155,173,.12);
  border-radius: 7px;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.health-card:hover {
  background: rgba(56,189,248,.07);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.2);
}
.health-dot.ok,
.health-dot.green {
  animation: livePulse 2.2s ease-in-out infinite;
}
.health-label { letter-spacing: 0; }
.health-sub { color: #718197; }

.metric-card,
.panel,
.strategy-panel,
.rule-panel,
.stat-panel,
.form-card,
.history-card {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.metric-card:hover,
.panel:hover,
.strategy-panel:hover,
.rule-panel:hover,
.stat-panel:hover,
.form-card:hover,
.history-card:hover {
  border-color: rgba(125,211,252,.34);
  transform: translateY(-2px);
  box-shadow: 0 24px 56px rgba(0,0,0,.38), 0 0 0 1px rgba(56,189,248,.05) inset;
}

.metric-card {
  position: relative;
  overflow: hidden;
  border-left: 1px solid rgba(139,155,173,.16);
}
.metric-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--green), var(--amber));
  opacity: .75;
}
.metric-card .value,
.metric-card > strong,
.header-balance-val,
.stat-panel-row > strong {
  letter-spacing: 0;
}
.metric-card .label,
.metric-card > span,
.stats-hero-label,
.stat-panel-head,
.panel-head .eyebrow,
.section-head .eyebrow {
  letter-spacing: .5px;
}

.panel canvas {
  background: rgba(3, 8, 12, .26);
  border: 1px solid rgba(139,155,173,.08);
}

.stat-panel-head {
  background: linear-gradient(90deg, rgba(56,189,248,.13), rgba(52,211,153,.06));
  color: #bae6fd;
}
.stat-panel-row {
  border-bottom-color: rgba(139,155,173,.11);
}
.stat-panel-row:hover {
  background: rgba(255,255,255,.025);
}

.badge,
.pill,
.status-pill {
  border-radius: 999px;
  background: rgba(56,189,248,.1);
  border-color: rgba(56,189,248,.22);
}

table thead th {
  background: rgba(7, 10, 15, .74);
  color: #b7c6d8;
}
table tbody tr {
  transition: background .14s ease;
}
table tbody tr:hover {
  background: rgba(56,189,248,.055);
}

.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.amber { color: var(--amber) !important; }

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,.32), 0 0 8px rgba(52,211,153,.45); }
  50% { box-shadow: 0 0 0 5px rgba(52,211,153,0), 0 0 14px rgba(52,211,153,.62); }
}

@media (max-width: 960px) {
  .topbar { min-height: 58px; }
  .view-body { padding: 12px 12px 76px; }
  .health-bar { overflow-x: auto; }
  .health-card:hover,
  .metric-card:hover,
  .panel:hover,
  .strategy-panel:hover,
  .rule-panel:hover,
  .stat-panel:hover,
  .form-card:hover,
  .history-card:hover {
    transform: none;
  }
}
/* ── Premium account switcher polish ────────────────────── */
/* ── Premium account switcher polish ────────────────────── */
.account-picker {
  grid-template-columns: auto minmax(184px, 236px);
  gap: 10px;
  padding: 5px 6px 5px 10px;
  border: 1px solid rgba(139,155,173,.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow: 0 12px 32px rgba(0,0,0,.22), 0 1px 0 rgba(255,255,255,.06) inset;
  backdrop-filter: var(--glass);
}
.account-picker-label {
  color: #8bdcff;
  letter-spacing: .7px;
}
.account-select-wrap::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52,211,153,.12), 0 0 14px rgba(52,211,153,.72);
  transform: translateY(-50%);
  z-index: 1;
}
.account-picker select {
  height: 34px;
  padding-left: 28px;
  border-radius: 7px;
  background: rgba(4, 10, 15, .62);
  color: #f6fbff;
  font-size: 12px;
  font-weight: 650;
}
.account-picker select option {
  background: #0b1118;
  color: #f2f6f8;
}
.account-picker select option:disabled {
  color: #738296;
}
.account-picker:hover {
  border-color: rgba(56,189,248,.36);
  box-shadow: 0 18px 42px rgba(0,0,0,.3), 0 0 0 1px rgba(56,189,248,.06) inset;
}

@media (max-width: 960px) {
  .account-picker {
    grid-template-columns: minmax(150px, 190px);
    padding: 4px;
  }
}
/* ── Executive terminal polish ───────────────────────────── */
/* ── Executive terminal polish ───────────────────────────── */
:root {
  --executive-line: rgba(184, 214, 236, .18);
  --executive-glow: 0 28px 90px rgba(0,0,0,.46), 0 0 0 1px rgba(255,255,255,.035) inset;
}

.topbar {
  background:
    linear-gradient(90deg, rgba(8,13,19,.88), rgba(13,24,28,.76)),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0));
}
.topbar .eyebrow:empty { display: none; }
.account-picker-label:empty { display: none; }
.account-picker { grid-template-columns: minmax(190px, 250px); }

.view.active {
  animation: viewRise .34s ease both;
}
.health-bar,
.metrics-grid,
.strategy-compare,
.panel,
.table-wrap,
.stat-panels {
  position: relative;
}
.health-bar::after,
.panel::after,
.table-wrap::after,
.stat-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.07), transparent 32%, rgba(52,211,153,.04) 74%, transparent);
  opacity: .72;
}
.market-radar-table tbody tr {
  background: linear-gradient(90deg, rgba(56,189,248,.025), transparent 32%);
}
.market-radar-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(56,189,248,.11), rgba(52,211,153,.045));
}
.market-radar-basis-content {
  background: rgba(3, 9, 14, .32);
  border: 1px solid rgba(139,155,173,.1);
  border-radius: 7px;
  padding: 5px 8px;
}
.market-radar-basis-primary { color: #d7eefc; }
.market-radar-basis-secondary { color: #7e92a7; }

.login-root {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(56,189,248,.20), transparent 24%),
    radial-gradient(circle at 78% 24%, rgba(251,191,36,.16), transparent 22%),
    radial-gradient(circle at 62% 78%, rgba(52,211,153,.16), transparent 26%),
    linear-gradient(135deg, #05070b, #0a1018 48%, #070d0b);
}
.login-cosmos {
  position: absolute;
  inset: -18%;
  pointer-events: none;
  opacity: .72;
  filter: blur(.15px) saturate(130%);
}
.solar-core {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,.75), rgba(56,189,248,.32) 28%, rgba(52,211,153,.12) 58%, transparent 72%);
  box-shadow: 0 0 80px rgba(56,189,248,.34), 0 0 150px rgba(52,211,153,.18);
  animation: solarBreathe 8s ease-in-out infinite;
}
.orbit {
  position: absolute;
  left: 50%;
  top: 48%;
  border: 1px solid rgba(184,214,236,.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: orbitSpin 28s linear infinite;
}
.orbit i {
  position: absolute;
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  left: 50%;
  top: -7px;
  background: #38bdf8;
  box-shadow: 0 0 24px currentColor;
}
.orbit-a { width: 360px; height: 210px; color: #38bdf8; }
.orbit-b { width: 560px; height: 330px; color: #34d399; animation-duration: 42s; animation-direction: reverse; }
.orbit-b i { background: #34d399; width: 10px; height: 10px; }
.orbit-c { width: 780px; height: 460px; color: #fbbf24; animation-duration: 64s; transform: translate(-50%, -50%) rotate(-11deg); }
.orbit-c i { background: #fbbf24; width: 16px; height: 16px; }
.login-box {
  position: relative;
  z-index: 1;
  width: min(410px, calc(100vw - 32px));
  border: 1px solid rgba(184,214,236,.18);
  background: linear-gradient(180deg, rgba(12,19,27,.82), rgba(7,12,18,.72));
  box-shadow: 0 34px 120px rgba(0,0,0,.54), 0 0 0 1px rgba(56,189,248,.06) inset;
  backdrop-filter: blur(22px) saturate(160%);
}
.login-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(56,189,248,.12), transparent 38%, rgba(251,191,36,.08));
}
.login-mark {
  background: linear-gradient(135deg, #38bdf8, #34d399 56%, #fbbf24);
  color: #051016;
  box-shadow: 0 0 34px rgba(56,189,248,.34);
}
.login-fields input {
  background: rgba(2,8,13,.58);
  border-color: rgba(184,214,236,.16);
}
.login-fields input:focus {
  border-color: rgba(56,189,248,.55);
  box-shadow: 0 0 0 4px rgba(56,189,248,.1);
  outline: none;
}

@keyframes orbitSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes solarBreathe { 0%,100% { transform: translate(-50%, -50%) scale(.92); opacity: .72; } 50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; } }
@keyframes viewRise { from { opacity: .85; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 960px) {
  .account-picker { grid-template-columns: minmax(158px, 200px); }
  .orbit-a { width: 270px; height: 170px; }
  .orbit-b { width: 420px; height: 260px; }
  .orbit-c { width: 590px; height: 350px; }
}
/* ── Full galaxy login scene ─────────────────────────────── */
/* ── Full galaxy login scene ─────────────────────────────── */
.login-root {
  background:
    radial-gradient(circle at 50% 48%, rgba(255,255,255,.08), transparent 18%),
    radial-gradient(circle at 16% 18%, rgba(56,189,248,.26), transparent 24%),
    radial-gradient(circle at 84% 20%, rgba(167,139,250,.22), transparent 22%),
    radial-gradient(circle at 74% 82%, rgba(52,211,153,.18), transparent 24%),
    linear-gradient(135deg, #03050a 0%, #07111b 42%, #0a0714 68%, #030807 100%);
}
.login-cosmos {
  --mx: 0;
  --my: 0;
  transform: translate(calc(var(--mx) * -18px), calc(var(--my) * -14px));
  transition: transform .35s ease-out;
}
.starfield,
.starfield::before,
.starfield::after {
  position: absolute;
  content: "";
  inset: 0;
  background-repeat: repeat;
  opacity: .72;
}
.starfield-a {
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(125,211,252,.8) 0 1px, transparent 1.5px);
  background-size: 91px 91px, 137px 137px;
  background-position: 12px 18px, 48px 74px;
  animation: starDrift 90s linear infinite;
}
.starfield-b {
  background-image:
    radial-gradient(circle, rgba(251,191,36,.7) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(196,181,253,.8) 0 1px, transparent 1.5px);
  background-size: 173px 173px, 221px 221px;
  background-position: 30px 90px, 110px 14px;
  animation: starDrift 140s linear infinite reverse;
  opacity: .48;
}
.galaxy-ribbon {
  position: absolute;
  left: -10%;
  right: -10%;
  top: 34%;
  height: 230px;
  border-radius: 50%;
  transform: rotate(-13deg);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.18), transparent 17%),
    linear-gradient(90deg, transparent, rgba(56,189,248,.14), rgba(167,139,250,.2), rgba(251,191,36,.12), transparent);
  filter: blur(18px);
  opacity: .78;
  animation: ribbonFloat 16s ease-in-out infinite;
}
.orbit {
  border-color: rgba(184,214,236,.16);
  box-shadow: 0 0 42px rgba(56,189,248,.035) inset;
}
.orbit i { transform-origin: center; }
.orbit-mercury { width: 190px; height: 116px; animation-duration: 14s; }
.orbit-mercury i { width: 8px; height: 8px; background: #cbd5e1; }
.orbit-venus { width: 270px; height: 164px; animation-duration: 21s; animation-direction: reverse; }
.orbit-venus i { width: 11px; height: 11px; background: #fbbf24; }
.orbit-earth { width: 360px; height: 218px; animation-duration: 28s; }
.orbit-earth i { width: 13px; height: 13px; background: #38bdf8; }
.orbit-earth i b {
  position: absolute;
  width: 5px;
  height: 5px;
  right: -8px;
  top: -4px;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: 0 0 10px rgba(226,232,240,.8);
}
.orbit-mars { width: 460px; height: 278px; animation-duration: 38s; animation-direction: reverse; }
.orbit-mars i { width: 10px; height: 10px; background: #fb7185; }
.orbit-jupiter { width: 600px; height: 362px; animation-duration: 54s; }
.orbit-jupiter i { width: 22px; height: 22px; background: linear-gradient(135deg, #fed7aa, #f97316, #fde68a); }
.orbit-saturn { width: 720px; height: 430px; animation-duration: 68s; animation-direction: reverse; }
.orbit-saturn i { width: 19px; height: 19px; background: #fde68a; }
.orbit-saturn i::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 7px;
  width: 35px;
  height: 8px;
  border: 1px solid rgba(253,230,138,.8);
  border-radius: 999px;
  transform: rotate(-18deg);
}
.orbit-uranus { width: 860px; height: 510px; animation-duration: 84s; }
.orbit-uranus i { width: 15px; height: 15px; background: #67e8f9; }
.orbit-neptune { width: 1010px; height: 594px; animation-duration: 110s; animation-direction: reverse; }
.orbit-neptune i { width: 15px; height: 15px; background: #818cf8; }
.solar-core {
  width: 116px;
  height: 116px;
  background: radial-gradient(circle, #fff7ed 0 8%, #fde68a 18%, rgba(251,146,60,.58) 34%, rgba(56,189,248,.18) 62%, transparent 74%);
  box-shadow: 0 0 70px rgba(251,191,36,.48), 0 0 160px rgba(56,189,248,.22), 0 0 240px rgba(167,139,250,.16);
}
.login-box {
  transform: translateZ(0);
  animation: loginPanelRise .7s ease both;
}
@keyframes starDrift { to { background-position: 260px 180px, -220px 310px; } }
@keyframes ribbonFloat { 0%,100% { transform: rotate(-13deg) translateY(-10px); opacity: .66; } 50% { transform: rotate(-11deg) translateY(14px); opacity: .9; } }
@keyframes loginPanelRise { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 720px) {
  .orbit-neptune { width: 720px; height: 430px; }
  .orbit-uranus { width: 620px; height: 370px; }
  .orbit-saturn { width: 540px; height: 322px; }
  .orbit-jupiter { width: 460px; height: 274px; }
}


/* Premium real solar-system login scene */
.login-root {
  isolation: isolate;
  background: #02040a;
}
.login-root::before {
  content: "";
  position: absolute;
  inset: -3%;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(1,4,10,.78) 0%, rgba(1,4,10,.28) 42%, rgba(1,4,10,.72) 100%),
    linear-gradient(180deg, rgba(1,4,10,.24) 0%, rgba(1,4,10,.04) 44%, rgba(1,4,10,.84) 100%),
    radial-gradient(circle at 72% 48%, rgba(251,146,60,.18), transparent 28%);
  filter: saturate(1.18) contrast(1.08) brightness(.92);
  transform: translate3d(calc(var(--mx, 0) * -16px), calc(var(--my, 0) * -12px), 0) scale(1.035);
  animation: premiumCosmosDrift 28s ease-in-out infinite alternate;
  will-change: transform;
}
.login-root::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 44% 44%, rgba(255,163,26,.24), transparent 22%),
    radial-gradient(circle at 78% 16%, rgba(96,165,250,.18), transparent 18%),
    radial-gradient(circle at 16% 76%, rgba(168,85,247,.18), transparent 23%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
  opacity: .9;
}
.login-cosmos {
  z-index: 0;
  inset: 0;
  opacity: 1;
  filter: none;
  transform: none;
}
.login-cosmos::before,
.login-cosmos::after {
  content: "";
  position: absolute;
  inset: -12%;
  background-repeat: repeat;
  pointer-events: none;
}
.login-cosmos::before {
  background-image:
    radial-gradient(circle, rgba(255,255,255,.88) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(125,211,252,.62) 0 1px, transparent 1.6px);
  background-size: 117px 117px, 193px 193px;
  background-position: 24px 51px, 80px 15px;
  opacity: .42;
  animation: premiumStarDrift 120s linear infinite;
}
.login-cosmos::after {
  background:
    radial-gradient(ellipse at 36% 28%, rgba(255,255,255,.15), transparent 32%),
    radial-gradient(ellipse at 70% 76%, rgba(45,212,191,.13), transparent 35%);
  filter: blur(12px);
  opacity: .82;
}
.login-cosmos > .orbit,
.login-cosmos > .solar-core,
.login-cosmos > .galaxy-ribbon,
.login-cosmos > .starfield {
  display: none;
}
.login-box {
  z-index: 2;
  margin-left: clamp(24px, 8vw, 120px);
  margin-right: auto;
  border-color: rgba(199,220,255,.24);
  background:
    linear-gradient(180deg, rgba(7,12,20,.78), rgba(3,7,13,.62)),
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.03));
  box-shadow:
    0 42px 150px rgba(0,0,0,.68),
    0 0 0 1px rgba(255,255,255,.07) inset,
    0 0 80px rgba(59,130,246,.13);
  backdrop-filter: blur(24px) saturate(170%);
}
.login-box::before {
  background:
    linear-gradient(135deg, rgba(255,255,255,.16), transparent 30%, rgba(251,146,60,.08) 58%, rgba(96,165,250,.12)),
    radial-gradient(circle at 24% 12%, rgba(255,255,255,.18), transparent 24%);
}
.login-mark {
  background: linear-gradient(135deg, #f8fafc 0%, #93c5fd 42%, #f59e0b 100%);
  color: #020617;
  box-shadow: 0 0 34px rgba(147,197,253,.38), 0 0 70px rgba(245,158,11,.18);
}
.login-title { letter-spacing: 0; }
.login-sub,
.login-footer { color: rgba(226,232,240,.68); }
.login-fields label { color: rgba(226,232,240,.82); }
.login-fields input {
  background: rgba(1,5,12,.62);
  border-color: rgba(199,220,255,.18);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset;
}
.login-fields input:focus {
  border-color: rgba(147,197,253,.68);
  box-shadow: 0 0 0 4px rgba(59,130,246,.16), 0 0 30px rgba(59,130,246,.14);
}
.login-box .button {
  background: linear-gradient(135deg, #e2e8f0 0%, #93c5fd 45%, #f59e0b 100%);
  color: #020617;
  box-shadow: 0 18px 42px rgba(59,130,246,.24), 0 0 0 1px rgba(255,255,255,.18) inset;
}
.login-box .button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
@keyframes premiumCosmosDrift {
  from { background-position: center center; }
  to { background-position: 53% 47%; }
}
@keyframes premiumStarDrift {
  to { background-position: 360px 260px, -320px 440px; }
}
@media (max-width: 760px) {
  .login-root::before {
    background-position: 58% center;
    transform: translate3d(calc(var(--mx, 0) * -8px), calc(var(--my, 0) * -6px), 0) scale(1.08);
  }
  .login-box {
    margin: 0 auto;
    width: min(400px, calc(100vw - 28px));
  }
}


/* Custom animated premium solar-system login scene */
.login-root {
  --system-x: 68%;
  --system-y: 50%;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background:
    radial-gradient(circle at 68% 50%, rgba(252,119,37,.20), transparent 18%),
    radial-gradient(circle at 15% 18%, rgba(14,165,233,.18), transparent 24%),
    radial-gradient(circle at 22% 82%, rgba(168,85,247,.16), transparent 25%),
    linear-gradient(135deg, #01040a 0%, #06101d 42%, #050615 68%, #02050b 100%);
}
.login-root::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 0;
  background:
    radial-gradient(circle at var(--system-x) var(--system-y), rgba(255,245,214,.20) 0 3%, rgba(251,146,60,.13) 8%, transparent 26%),
    radial-gradient(ellipse at 72% 62%, rgba(20,184,166,.12), transparent 34%),
    radial-gradient(ellipse at 28% 26%, rgba(99,102,241,.16), transparent 30%),
    linear-gradient(112deg, transparent 0 20%, rgba(59,130,246,.10) 36%, rgba(168,85,247,.08) 54%, transparent 76%),
    radial-gradient(circle, rgba(255,255,255,.92) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(125,211,252,.58) 0 1px, transparent 1.7px);
  background-size: auto, auto, auto, auto, 104px 104px, 181px 181px;
  background-position: center, center, center, center, 22px 31px, 88px 14px;
  filter: saturate(1.12) contrast(1.08);
  transform: translate3d(calc(var(--mx, 0) * -18px), calc(var(--my, 0) * -14px), 0);
  animation: premiumStarDrift 130s linear infinite;
}
.login-root::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.020) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 72% 50%, transparent 0 42%, rgba(0,0,0,.36) 72%, rgba(0,0,0,.74) 100%),
    linear-gradient(90deg, rgba(0,0,0,.48), transparent 42%, rgba(0,0,0,.26));
  opacity: .94;
}
.login-cosmos {
  --mx: 0;
  --my: 0;
  z-index: 1;
  inset: -8%;
  opacity: 1;
  filter: none;
  transform: translate3d(calc(var(--mx) * -12px), calc(var(--my) * -10px), 0);
  transition: transform .28s ease-out;
}
.login-cosmos::before,
.login-cosmos::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.login-cosmos::before {
  left: 49%;
  top: 14%;
  width: 56%;
  height: 78%;
  border-radius: 50%;
  transform: rotate(-16deg);
  background:
    radial-gradient(circle, rgba(255,255,255,.72) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(203,213,225,.42) 0 1px, transparent 1.5px);
  background-size: 31px 31px, 47px 47px;
  mask-image: radial-gradient(ellipse, transparent 0 44%, #000 45% 56%, transparent 57%);
  opacity: .72;
  animation: asteroidBelt 90s linear infinite;
}
.login-cosmos::after {
  left: 9%;
  top: 44%;
  width: 20%;
  height: 9%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 94% 50%, rgba(226,232,240,.92) 0 4px, transparent 9px),
    linear-gradient(90deg, rgba(167,139,250,.0), rgba(167,139,250,.20), rgba(125,211,252,.28), transparent 78%);
  filter: blur(.4px);
  transform: rotate(-12deg);
  opacity: .78;
}
.login-cosmos > .starfield,
.login-cosmos > .galaxy-ribbon,
.login-cosmos > .orbit,
.login-cosmos > .solar-core {
  display: block;
}
.starfield-a,
.starfield-b {
  opacity: .42;
  mix-blend-mode: screen;
}
.galaxy-ribbon {
  left: 7%;
  right: -8%;
  top: 28%;
  height: 310px;
  transform: rotate(-12deg);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.13), transparent 18%),
    linear-gradient(90deg, transparent, rgba(37,99,235,.13), rgba(168,85,247,.16), rgba(20,184,166,.10), transparent);
  filter: blur(24px);
  opacity: .62;
}
.solar-core {
  left: var(--system-x);
  top: var(--system-y);
  width: clamp(132px, 12vw, 178px);
  height: clamp(132px, 12vw, 178px);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 37% 32%, rgba(255,255,255,.95) 0 4%, transparent 10%),
    radial-gradient(circle at 58% 64%, rgba(255,237,213,.55) 0 5%, transparent 12%),
    radial-gradient(circle at 48% 50%, #fff7ed 0 9%, #fde68a 18%, #fb923c 40%, #c2410c 66%, rgba(127,29,29,.70) 83%, transparent 100%);
  box-shadow:
    0 0 46px rgba(251,146,60,.82),
    0 0 112px rgba(249,115,22,.46),
    0 0 210px rgba(59,130,246,.20),
    inset -16px -18px 30px rgba(92,22,8,.38);
  animation: solarBreathe 7.5s ease-in-out infinite;
}
.orbit {
  left: var(--system-x);
  top: var(--system-y);
  border: 1px solid rgba(164,202,254,.25);
  border-radius: 50%;
  box-shadow: 0 0 48px rgba(96,165,250,.045) inset, 0 0 18px rgba(96,165,250,.05);
  transform: translate(-50%, -50%) rotate(-13deg);
  animation-name: premiumOrbitSpin;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.orbit i {
  position: absolute;
  left: 50%;
  top: -8px;
  border-radius: 50%;
  display: block;
  box-shadow: 0 0 18px currentColor, inset -5px -4px 10px rgba(0,0,0,.40), inset 4px 3px 8px rgba(255,255,255,.25);
}
.orbit-mercury { width: 270px; height: 150px; animation-duration: 13s; }
.orbit-mercury i { width: 8px; height: 8px; background: linear-gradient(135deg, #f8fafc, #64748b); color: #cbd5e1; }
.orbit-venus { width: 365px; height: 205px; animation-duration: 20s; animation-direction: reverse; }
.orbit-venus i { width: 13px; height: 13px; background: linear-gradient(135deg, #fff7ed, #f59e0b 55%, #92400e); color: #fbbf24; }
.orbit-earth { width: 465px; height: 260px; animation-duration: 29s; }
.orbit-earth i { width: 16px; height: 16px; background: radial-gradient(circle at 34% 28%, #bfdbfe, #2563eb 48%, #064e3b 70%); color: #60a5fa; }
.orbit-earth i b { display: block; }
.orbit-mars { width: 570px; height: 322px; animation-duration: 39s; animation-direction: reverse; }
.orbit-mars i { width: 12px; height: 12px; background: linear-gradient(135deg, #fecaca, #ef4444 58%, #7f1d1d); color: #fb7185; }
.orbit-jupiter { width: 725px; height: 410px; animation-duration: 56s; }
.orbit-jupiter i { width: 32px; height: 32px; background: repeating-linear-gradient(180deg, #fde68a 0 5px, #fb923c 5px 9px, #7c2d12 9px 12px, #fed7aa 12px 16px); color: #f97316; }
.orbit-saturn { width: 860px; height: 488px; animation-duration: 72s; animation-direction: reverse; }
.orbit-saturn i { width: 27px; height: 27px; background: linear-gradient(135deg, #fef3c7, #d97706 68%, #78350f); color: #facc15; }
.orbit-saturn i::after {
  content: "";
  position: absolute;
  left: -14px;
  top: 10px;
  width: 54px;
  height: 12px;
  border: 2px solid rgba(253,230,138,.82);
  border-left-color: rgba(253,230,138,.28);
  border-radius: 50%;
  transform: rotate(-17deg);
}
.orbit-uranus { width: 1010px; height: 572px; animation-duration: 86s; }
.orbit-uranus i { width: 19px; height: 19px; background: linear-gradient(135deg, #cffafe, #22d3ee 56%, #0e7490); color: #67e8f9; }
.orbit-neptune { width: 1160px; height: 660px; animation-duration: 116s; animation-direction: reverse; }
.orbit-neptune i { width: 19px; height: 19px; background: linear-gradient(135deg, #c7d2fe, #4f46e5 62%, #1e1b4b); color: #818cf8; }
.login-box {
  z-index: 3;
  margin-left: clamp(24px, 8vw, 120px);
  margin-right: auto;
}
.login-mark {
  text-transform: uppercase;
}
@keyframes premiumOrbitSpin {
  from { transform: translate(-50%, -50%) rotate(-13deg); }
  to { transform: translate(-50%, -50%) rotate(347deg); }
}
@keyframes asteroidBelt {
  to { background-position: 420px 180px, -260px 360px; }
}
@media (max-width: 760px) {
  .login-root { --system-x: 74%; --system-y: 46%; justify-content: center; }
  .login-box { margin: 0 auto; }
  .solar-core { width: 118px; height: 118px; }
  .orbit-mercury { width: 210px; height: 118px; }
  .orbit-venus { width: 285px; height: 160px; }
  .orbit-earth { width: 360px; height: 204px; }
  .orbit-mars { width: 440px; height: 250px; }
  .orbit-jupiter { width: 560px; height: 318px; }
  .orbit-saturn { width: 670px; height: 380px; }
  .orbit-uranus { width: 780px; height: 442px; }
  .orbit-neptune { width: 880px; height: 500px; }
}


/* Canvas-grade login scene override */
#login-space-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.login-root {
  background: #020510;
}
.login-root::before,
.login-root::after,
.login-cosmos::before,
.login-cosmos::after,
.login-cosmos > .starfield,
.login-cosmos > .galaxy-ribbon,
.login-cosmos > .orbit,
.login-cosmos > .solar-core {
  display: none !important;
}
.login-cosmos {
  inset: 0;
  z-index: 0;
  transform: none;
}
.login-box {
  z-index: 2;
  width: min(392px, calc(100vw - 32px));
  margin-left: clamp(28px, 7.4vw, 132px);
  background:
    linear-gradient(180deg, rgba(12,18,28,.74), rgba(5,9,18,.66)),
    radial-gradient(circle at 18% 14%, rgba(255,255,255,.14), transparent 34%);
  border: 1px solid rgba(172,196,235,.28);
  box-shadow:
    0 42px 130px rgba(0,0,0,.66),
    0 0 0 1px rgba(255,255,255,.07) inset,
    0 0 82px rgba(59,130,246,.13);
  backdrop-filter: blur(22px) saturate(150%);
}
.login-mark {
  background: linear-gradient(135deg, #e0f2fe 0%, #93c5fd 44%, #f59e0b 100%);
  color: #07111f;
}
@media (max-width: 760px) {
  .login-box {
    margin: 0 auto;
  }
}


/* Final premium login image treatment */
#login-space-canvas {
  display: none !important;
}
.login-root {
  --mx: 0;
  --my: 0;
  isolation: isolate;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  background: #02040a;
}
.login-root::before {
  content: "";
  display: block !important;
  position: absolute;
  inset: -2.5%;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(1,4,10,.76) 0%, rgba(1,4,10,.40) 32%, rgba(1,4,10,.18) 58%, rgba(1,4,10,.48) 100%),
    linear-gradient(180deg, rgba(1,4,10,.18) 0%, rgba(1,4,10,.04) 42%, rgba(1,4,10,.76) 100%),
    url("./solar-system-premium.png") center center / cover no-repeat;
  filter: saturate(1.16) contrast(1.06) brightness(.94);
  transform: translate3d(calc(var(--mx) * -14px), calc(var(--my) * -10px), 0) scale(1.035);
  animation: premiumImageBreath 22s ease-in-out infinite alternate;
  will-change: transform;
}
.login-root::after {
  content: "";
  display: block !important;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 45% 44%, rgba(251,146,60,.24), transparent 22%),
    radial-gradient(circle at 14% 18%, rgba(147,197,253,.16), transparent 20%),
    radial-gradient(circle at 72% 76%, rgba(20,184,166,.12), transparent 24%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.016) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
  opacity: .82;
}
.login-cosmos,
.login-cosmos::before,
.login-cosmos::after,
.login-cosmos > .starfield,
.login-cosmos > .galaxy-ribbon,
.login-cosmos > .orbit,
.login-cosmos > .solar-core {
  display: none !important;
}
.login-box {
  z-index: 2;
  width: min(386px, calc(100vw - 32px));
  margin-left: clamp(28px, 7vw, 116px);
  margin-right: auto;
  padding: 31px 32px;
  border: 1px solid rgba(210,225,255,.24);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(8,13,22,.78), rgba(4,8,15,.64)),
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.15), transparent 32%);
  box-shadow:
    0 44px 150px rgba(0,0,0,.68),
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 0 72px rgba(96,165,250,.16);
  backdrop-filter: blur(24px) saturate(155%);
  animation: loginPanelRise .55s ease both;
}
.login-box::before {
  background:
    linear-gradient(135deg, rgba(255,255,255,.14), transparent 30%, rgba(245,158,11,.08) 64%, rgba(147,197,253,.10)),
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.18), transparent 28%);
}
.login-mark,
.brand-mark {
  background:
    linear-gradient(145deg, #f8fafc 0%, #bfdbfe 38%, #6ea8ff 62%, #f5b642 100%) !important;
  color: #05111f !important;
  border: 1px solid rgba(255,255,255,.42) !important;
  box-shadow:
    0 12px 28px rgba(44,105,200,.30),
    0 0 36px rgba(245,182,66,.16),
    inset 0 1px 0 rgba(255,255,255,.66) !important;
  text-shadow: none !important;
}
.login-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}
.brand-mark {
  border-radius: 10px;
  font-weight: 800;
}
.login-title {
  color: #f8fafc;
  font-weight: 750;
  letter-spacing: 0;
}
.login-sub,
.login-footer {
  color: rgba(226,232,240,.70);
}
.login-fields label {
  color: rgba(226,232,240,.86);
}
.login-fields input {
  background: rgba(2,7,14,.70);
  border-color: rgba(210,225,255,.20);
  color: #f8fafc;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset;
}
.login-fields input:focus {
  border-color: rgba(147,197,253,.72);
  box-shadow: 0 0 0 4px rgba(59,130,246,.16), 0 0 34px rgba(59,130,246,.18);
}
.login-box .button {
  background: linear-gradient(135deg, #eff6ff 0%, #93c5fd 48%, #f5b642 100%);
  color: #03101f;
  border: 1px solid rgba(255,255,255,.26);
  box-shadow: 0 18px 46px rgba(59,130,246,.22), inset 0 1px 0 rgba(255,255,255,.65);
}
.login-box .button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
@keyframes premiumImageBreath {
  from { background-position: center center; }
  to { background-position: 51.5% 48.5%; }
}
@media (max-width: 760px) {
  .login-root {
    justify-content: center;
  }
  .login-root::before {
    background-position: 58% center;
    transform: translate3d(calc(var(--mx) * -8px), calc(var(--my) * -6px), 0) scale(1.08);
  }
  .login-box {
    margin: 0 auto;
    width: min(390px, calc(100vw - 28px));
  }
}
