/* ── Variables ────────────────────────────────────────────────── */
:root {
  --bg:        #141614;
  --bg2:       #1c1f1d;
  --bg3:       #242724;
  --g-dark:    #1a4a30;
  --g-mid:     #2d7a4f;
  --g-bright:  #4caf7d;
  --g-vivid:   #5fcf90;
  --g-faint:   rgba(45,122,79,0.10);
  --g-glow:    rgba(45,122,79,0.22);
  --g-border:  rgba(45,122,79,0.18);
  --gold:      #c9a227;
  --gold-bright: #f0c040;
  --gold-faint:  rgba(201,162,39,0.12);
  --text:      #e8e4d8;
  --text-dim:  #7a8a7e;
  --text-mute: #3a4a3e;
  --font-disp: "Playfair Display", Georgia, serif;
  --font-mono: "DM Mono", "Fira Mono", monospace;
  --radius:    8px;
  --radius-lg: 14px;
  --transition: 0.22s ease;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--g-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--g-mid); }

/* ── Noise texture ───────────────────────────────────────────── */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #2d7a4f 0%, #1a5c38 100%);
  color: #fff;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  box-shadow: 0 0 24px rgba(45,122,79,0.5), 0 4px 14px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4caf7d 0%, #2d7a4f 100%);
  box-shadow: 0 0 42px rgba(76,175,125,0.7), 0 6px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--g-bright);
  border: 1px solid rgba(45,122,79,0.35);
}
.btn-ghost:hover {
  background: var(--g-faint);
  border-color: var(--g-mid);
  box-shadow: 0 0 14px rgba(45,122,79,0.15);
}
.btn-google {
  background: #ffffff;
  color: #202124;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04);
}
.btn-google:hover {
  background: #f8f9fa;
  color: #1f1f1f;
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
  transform: translateY(-1px);
}
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ───────────────────────────────────────────────────────────── */
/*  LANDING                                                       */
/* ───────────────────────────────────────────────────────────── */
.landing {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0e1210;
}

/* Deep radial vignette background */
.landing-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 50%, rgba(20,40,28,0.9) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(15,30,22,0.5) 0%, transparent 65%),
    linear-gradient(135deg, #0a100d 0%, #0e1210 50%, #080f0a 100%);
}

/* Hero glow bloom — light from behind the text */
.hero-glow {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 55vw;
  height: 70vh;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at 40% 50%,
    rgba(45,122,79,0.14) 0%,
    rgba(45,122,79,0.05) 45%,
    transparent 70%
  );
  filter: blur(32px);
  animation: auroraBreath 8s ease-in-out infinite;
}

/* Sweep scan line */
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    transparent 10%,
    rgba(76,175,125,0.35) 40%,
    rgba(76,175,125,0.6) 50%,
    rgba(76,175,125,0.35) 60%,
    transparent 90%,
    transparent 100%
  );
  z-index: 4;
  pointer-events: none;
  animation: scanSweep 8s 1s linear infinite;
}

.landing-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 4rem 0 0;
  background: rgba(10,14,11,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(76,175,125,0.22);
  height: 180px;
  overflow: hidden;
}
.nav-tagline {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding-top: 0.9rem;
}

/* ── Landing body — two-column split ─────────────────────────── */
.landing-body {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ── Hero column (left) ──────────────────────────────────────── */
.hero-col {
  flex: 0 0 52%;
  display: flex;
  align-items: center;
  padding: 2rem 2rem 2rem 4rem;
}

.hero {
  display: flex;
  flex-direction: column;
  max-width: 580px;
  width: 100%;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.65rem;
  letter-spacing: 0.24em;
  color: var(--gold);
  text-transform: uppercase;
  white-space: nowrap;
  margin-bottom: 1.75rem;
  animation: fadeUp 0.55s ease forwards;
  opacity: 0;
}
.hero-kicker-line {
  display: block;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero-title {
  font-family: var(--font-disp);
  font-size: clamp(3.2rem, 5.5vw, 5.5rem);
  font-weight: 700;
  line-height: 1.07;
  color: var(--text);
  margin-bottom: 1.6rem;
  animation: fadeUp 0.65s 0.1s ease forwards;
  opacity: 0;
  letter-spacing: -0.01em;
}
.hero-title em {
  font-style: italic;
  color: var(--gold-bright);
  text-shadow: 0 0 60px rgba(240,192,64,0.3), 0 0 120px rgba(240,192,64,0.15);
}

.hero-sub {
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--text-dim);
  margin-bottom: 2.25rem;
  animation: fadeUp 0.65s 0.18s ease forwards;
  opacity: 0;
  max-width: 440px;
}

/* Mini stats row */
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.25rem;
  animation: fadeUp 0.65s 0.25s ease forwards;
  opacity: 0;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(201,162,39,0.18);
  border-bottom: 1px solid rgba(201,162,39,0.18);
}
.hero-stat {
  position: relative;
}
.hero-stat + .hero-stat::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(45,122,79,0.2);
}
.hero-stat-value {
  display: block;
  font-family: var(--font-disp);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--gold-bright);
  line-height: 1;
  margin-bottom: 0.3rem;
  text-shadow: 0 0 28px rgba(240,192,64,0.4), 0 0 60px rgba(240,192,64,0.15);
}
.hero-stat-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  animation: fadeUp 0.65s 0.33s ease forwards;
  opacity: 0;
  flex-wrap: wrap;
}

/* ── Chart column (right) ────────────────────────────────────── */
.chart-col {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 4rem 2rem 2rem;
  border-left: 1px solid rgba(45,122,79,0.2);
  position: relative;
}

/* Ambient glow behind the card */
.chart-col::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 55% 50%,
    rgba(45,122,79,0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.chart-scene {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
}

/* ── Dashboard preview card ──────────────────────────────────── */
.dashboard-preview {
  background: #1a2420;
  border: 1px solid rgba(76,175,125,0.45);
  border-top: 2px solid rgba(76,175,125,0.6);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow:
    0 0 60px rgba(45,122,79,0.15),
    0 32px 64px rgba(0,0,0,0.7);
  width: 100%;
  animation: cardGlow 5s ease-in-out infinite;
}
@keyframes cardGlow {
  0%, 100% {
    box-shadow: 0 0 50px rgba(45,122,79,0.12), 0 32px 64px rgba(0,0,0,0.7);
    border-color: rgba(76,175,125,0.35);
    border-top-color: rgba(76,175,125,0.5);
  }
  50% {
    box-shadow: 0 0 90px rgba(45,122,79,0.28), 0 0 140px rgba(45,122,79,0.1), 0 32px 64px rgba(0,0,0,0.7);
    border-color: rgba(76,175,125,0.65);
    border-top-color: rgba(95,207,144,0.85);
  }
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.preview-title {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.preview-live {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--g-bright);
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--g-bright);
  box-shadow: 0 0 6px rgba(76,175,125,0.8);
  animation: tickerPulse 2s ease-in-out infinite;
}

/* Chart area */
.preview-chart {
  margin-bottom: 1.25rem;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(14,18,16,0.6);
  border: 1px solid rgba(45,122,79,0.1);
  padding: 0.75rem 0.5rem 0.25rem;
}
.preview-chart svg {
  width: 100%;
  height: auto;
  display: block;
}
.preview-chart-labels {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0.25rem 0;
  font-size: 0.6rem;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}

/* Metric grid */
.preview-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.preview-metric {
  background: rgba(14,18,16,0.7);
  border: 1px solid var(--g-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  transition: border-color var(--transition);
}
.preview-metric:hover { border-color: var(--g-mid); }
.pm-val {
  display: block;
  font-family: var(--font-disp);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.3rem;
  color: var(--gold-bright);
}
.preview-metric.pos .pm-val { color: var(--g-bright); text-shadow: 0 0 16px rgba(76,175,125,0.3); }
.preview-metric.neg .pm-val { color: #e57; }
.pm-label {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ── Market ticker strip ──────────────────────────────────────── */
.market-ticker {
  position: relative;
  z-index: 5;
  border-top: 1px solid rgba(76,175,125,0.28);
  background: rgba(8,12,10,0.92);
  padding: 0.9rem 0;
  overflow: hidden;
  box-shadow: 0 -1px 0 rgba(45,122,79,0.08), inset 0 1px 0 rgba(45,122,79,0.06);
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  animation: tickerScroll 28s linear infinite;
  padding: 0 3rem;
}
.market-ticker:hover .ticker-track { animation-play-state: paused; }
.market-ticker::before,
.market-ticker::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.market-ticker::before { left: 0; background: linear-gradient(90deg, #0e1210, transparent); }
.market-ticker::after  { right: 0; background: linear-gradient(-90deg, #0e1210, transparent); }

.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.ticker-sym {
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ticker-price { color: var(--text); font-weight: 600; }
.ticker-change { color: var(--g-vivid); }
.ticker-change.neg { color: #f0726a; }
.ticker-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--g-bright);
  box-shadow: 0 0 6px rgba(76,175,125,0.7);
  animation: tickerPulse 2.4s ease-in-out infinite;
}
.ticker-divider {
  color: var(--text-mute);
  opacity: 0.2;
}

/* ── Auth Modal ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8,12,10,0.90);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-backdrop[hidden] { display: none; }

.modal {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--g-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  animation: fadeUp 0.28s ease;
  box-shadow: 0 0 60px rgba(45,122,79,0.12), 0 24px 48px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }

.modal-title {
  font-family: var(--font-disp);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  color: var(--text);
}

.modal-error {
  background: rgba(200,50,50,0.10);
  border: 1px solid rgba(200,50,50,0.28);
  color: #e88;
  font-size: 0.82rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.modal-error[hidden] { display: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--text-mute);
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--g-border);
}

.modal-switch {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 1.25rem;
}
.link-btn {
  background: none;
  border: none;
  color: var(--g-bright);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  margin-left: 0.25em;
  text-decoration: underline;
}

/* ── Form elements ───────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}
.form-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--g-border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
  border-color: var(--g-mid);
  box-shadow: 0 0 0 3px rgba(45,122,79,0.12);
}
.form-input:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Broker Server Combobox ──────────────────────────────────── */
.combobox { position: relative; }
.combobox-list {
  position: fixed;
  background: var(--bg3);
  border: 1px solid var(--g-border);
  border-radius: var(--radius);
  list-style: none;
  margin: 0; padding: 0.3rem 0;
  z-index: 100;
  max-height: 210px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.combobox-list li {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
}
.combobox-list li:hover { background: rgba(45,122,79,0.18); }
.combobox-list li.combobox-custom { color: var(--text-dim); font-style: italic; }
.custom-server-warning {
  font-size: 0.75rem;
  color: #f59e0b;
  margin-top: 0.45rem;
  line-height: 1.45;
}

/* ───────────────────────────────────────────────────────────── */
/*  DASHBOARD LAYOUT                                              */
/* ───────────────────────────────────────────────────────────── */
.app {
  position: relative;
  display: grid;
  grid-template-columns: 228px 1fr;
  min-height: 100vh;
  background: #0d1210;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #181f1b 0%, #111612 100%);
  border-right: 1px solid rgba(45,122,79,0.18);
  z-index: 10;
}

.sidebar-logo {
  padding: 1.5rem 1.5rem 1.1rem;
  border-bottom: 1px solid rgba(45,122,79,0.12);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1;
  overflow: hidden;
}
.sidebar-logo img {
  height: 290px;
  width: auto;
  margin-top: calc(-40px - 2.5cm + 3mm);
  margin-left: calc(-70px + 3mm);
}
.nav-logo {
  height: 500px;
  width: auto;
  align-self: flex-start;
  flex-shrink: 0;
  margin-top: calc(-60px - 3.3cm + 3mm);
  margin-left: calc(-80px + 3mm);
}

.sidebar-nav {
  flex: 1;
  padding: 1.1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  position: relative;
}
.tab-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.tab-btn:hover {
  background: rgba(45,122,79,0.08);
  color: var(--text-dim);
}
.tab-btn.active {
  background: rgba(45,122,79,0.14);
  color: var(--gold-bright);
  border: none;
}
.tab-btn.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(to bottom, var(--gold), var(--gold-bright));
  box-shadow: 0 0 10px rgba(240,192,64,0.6);
}
.tab-btn.active svg { color: var(--gold); }

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(45,122,79,0.1);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-email {
  font-size: 0.68rem;
  color: var(--text-mute);
  word-break: break-all;
}
.sidebar-about-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--g-bright);
  text-decoration: none;
  padding: 0.55rem 0.85rem;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  border: 1px solid rgba(76,175,125,0.28);
  background: rgba(45,122,79,0.07);
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.sidebar-about-link svg { color: var(--g-mid); transition: color var(--transition); }
.sidebar-about-link:hover {
  color: var(--g-vivid);
  background: rgba(45,122,79,0.15);
  border-color: rgba(76,175,125,0.55);
  box-shadow: 0 0 12px rgba(45,122,79,0.15);
}
.sidebar-about-link:hover svg { color: var(--g-bright); }

/* ── Main content ────────────────────────────────────────────── */
.main-content {
  padding: 2.75rem 3rem 4rem;
  min-width: 0;
  position: relative;
  background:
    radial-gradient(ellipse 65% 45% at 75% 15%, rgba(45,122,79,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 45% 55% at 15% 85%, rgba(201,162,39,0.04) 0%, transparent 60%),
    #0d1210;
}

/* Subtle noise over main content */
.main-content::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp 0.3s ease both; }

.panel-header {
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(45,122,79,0.15);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.panel-header-left { display: flex; flex-direction: column; gap: 0.35rem; }
.panel-title {
  font-family: var(--font-disp);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.panel-title::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  margin-bottom: 6px;
  box-shadow: 0 0 10px rgba(240,192,64,0.6);
}
.panel-sub {
  font-size: 0.75rem;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}

/* ── Card ────────────────────────────────────────────────────── */
.card {
  background: linear-gradient(145deg, #1b2420 0%, #151a17 100%);
  border: 1px solid rgba(45,122,79,0.22);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76,175,125,0.15), transparent);
}
.card:hover {
  border-color: rgba(76,175,125,0.45);
  box-shadow: 0 0 32px rgba(45,122,79,0.12), 0 8px 24px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}
.card-title {
  font-family: var(--font-disp);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.9rem;
}
.card-desc { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 1.25rem; line-height: 1.65; }

/* ── Settings grid ───────────────────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

/* Card stagger animation on tab entry */
.stagger-1 { animation: fadeUp 0.35s 0.04s ease both; }
.stagger-2 { animation: fadeUp 0.35s 0.10s ease both; }
.stagger-3 { animation: fadeUp 0.35s 0.16s ease both; }
.stagger-4 { animation: fadeUp 0.35s 0.22s ease both; }
.stagger-5 { animation: fadeUp 0.35s 0.28s ease both; }
.stagger-6 { animation: fadeUp 0.35s 0.34s ease both; }

/* ── Risk slider ─────────────────────────────────────────────── */
.slider-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.slider-label { font-size: 0.68rem; color: var(--text-mute); letter-spacing: 0.06em; text-transform: uppercase; }

.risk-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--g-mid) calc(var(--val, 50) * 1%), var(--bg3) calc(var(--val, 50) * 1%));
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.risk-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--g-bright);
  border: 2px solid var(--bg2);
  box-shadow: 0 0 10px rgba(76,175,125,0.45);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.risk-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 16px rgba(76,175,125,0.6);
}
.risk-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--g-bright); border: 2px solid var(--bg2);
  cursor: pointer;
}

.slider-value-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.slider-value {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--g-bright);
  text-shadow: 0 0 12px rgba(76,175,125,0.3);
}

/* ── Toggle ──────────────────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.toggle-label {
  font-size: 0.88rem;
  color: var(--text-dim);
  min-width: 4rem;
}
.toggle { position: relative; display: inline-block; width: 48px; height: 26px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg3);
  border: 1px solid var(--g-border);
  border-radius: 26px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 50%;
  transform: translateY(-50%);
  background: var(--text-mute);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}
.toggle input:checked + .toggle-slider {
  background: var(--g-dark);
  border-color: var(--g-mid);
  box-shadow: 0 0 12px rgba(45,122,79,0.25);
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(22px) translateY(-50%);
  background: var(--g-bright);
}

/* ── Checkbox group ──────────────────────────────────────────── */
.checkbox-group { display: flex; flex-direction: column; gap: 0.75rem; }
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--g-border);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.checkbox-item:hover {
  background: var(--g-faint);
  border-color: var(--g-mid);
  box-shadow: 0 0 10px rgba(45,122,79,0.08);
}
.checkbox-item input[type="checkbox"] { display: none; }
.checkmark {
  width: 18px; height: 18px;
  border: 1px solid var(--g-border);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.checkbox-item input:checked ~ .checkmark {
  background: var(--g-mid);
  border-color: var(--g-mid);
  box-shadow: 0 0 8px rgba(45,122,79,0.3);
}
.checkbox-item input:checked ~ .checkmark::after {
  content: "";
  display: block;
  width: 4px; height: 8px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg) translateY(-1px);
}
.checkbox-label { display: flex; flex-direction: column; gap: 0.15rem; }
.market-name { font-size: 0.88rem; color: var(--text); }
.market-code { font-size: 0.68rem; color: var(--text-mute); letter-spacing: 0.08em; }

/* ── Radio group (strategy selection) ───────────────────────── */
.radio-group { display: flex; flex-direction: column; gap: 0.6rem; }
.radio-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--g-border);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.radio-item:hover {
  background: var(--g-faint);
  border-color: var(--g-mid);
  box-shadow: 0 0 10px rgba(45,122,79,0.08);
}
.radio-item input[type="radio"] { display: none; }
.radiomark {
  width: 18px; height: 18px;
  border: 1px solid var(--g-border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.radio-item input:checked ~ .radiomark {
  border-color: var(--g-mid);
  box-shadow: 0 0 8px rgba(45,122,79,0.3);
}
.radio-item input:checked ~ .radiomark::after {
  content: "";
  display: block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--g-vivid);
}
.radio-item input:checked ~ .radio-label { color: var(--g-vivid); }
.radio-label { font-size: 0.88rem; color: var(--text); transition: color var(--transition); }

/* ── Nav about link ─────────────────────────────────────────── */
.nav-about-link {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--g-bright);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(76,175,125,0.35);
  border-radius: var(--radius);
  background: rgba(45,122,79,0.08);
  align-self: center;
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.nav-about-link:hover, .nav-about-link.active {
  color: var(--g-vivid);
  background: rgba(45,122,79,0.18);
  border-color: rgba(76,175,125,0.6);
  box-shadow: 0 0 14px rgba(45,122,79,0.2);
}

/* ── Save row ────────────────────────────────────────────────── */
.save-row { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }
.save-status { font-size: 0.8rem; color: var(--text-dim); }
.save-status.ok { color: var(--g-bright); }
.save-status.err { color: #e88; }

/* Chart path animation — draw-on effect */
.chart-path-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
}
.chart-path-fill {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.chart-animated .chart-path-line {
  animation: drawPath 1.6s 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.chart-animated .chart-path-fill {
  animation: fillFade 0.8s 1.6s ease forwards;
}

/* ── News ────────────────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.news-card {
  background: linear-gradient(145deg, #1b2420 0%, #151a17 100%);
  border: 1px solid rgba(45,122,79,0.22);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.news-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76,175,125,0.15), transparent);
}
.news-card:hover {
  border-color: rgba(76,175,125,0.45);
  box-shadow: 0 0 32px rgba(45,122,79,0.12), 0 8px 24px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}
.news-tag {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.news-tag::before {
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 5px rgba(201,162,39,0.6);
}
.news-headline { font-family: var(--font-disp); font-size: 1rem; font-weight: 600; line-height: 1.45; color: var(--text); }
.news-body { font-size: 0.79rem; line-height: 1.72; color: var(--text-dim); flex: 1; }
.news-meta { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--text-mute); padding-top: 0.5rem; border-top: 1px solid var(--g-faint); }

/* ── Team ────────────────────────────────────────────────────── */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.team-card {
  background: linear-gradient(145deg, #1b2420 0%, #151a17 100%);
  border: 1px solid rgba(45,122,79,0.22);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex; gap: 1.25rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.team-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76,175,125,0.15), transparent);
}
.team-card:hover {
  border-color: rgba(76,175,125,0.45);
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(45,122,79,0.12), 0 8px 24px rgba(0,0,0,0.4);
}
.team-avatar {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g-dark) 0%, #0e2e1c 100%);
  border: 1px solid var(--g-mid);
  color: var(--g-bright);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 14px rgba(45,122,79,0.2) inset;
}
.team-name { font-family: var(--font-disp); font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem; }
.team-role { font-size: 0.68rem; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 0.6rem; text-transform: uppercase; }
.team-bio { font-size: 0.78rem; line-height: 1.68; color: var(--text-dim); }

/* ── Testimonials ────────────────────────────────────────────── */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.testimonial-card {
  background: linear-gradient(145deg, #1b2420 0%, #151a17 100%);
  border: 1px solid rgba(45,122,79,0.22);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex; flex-direction: column; gap: 1.25rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.testimonial-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240,192,64,0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.testimonial-card:hover { border-color: rgba(76,175,125,0.45); transform: translateY(-2px); box-shadow: 0 0 32px rgba(45,122,79,0.12), 0 8px 24px rgba(0,0,0,0.4); }
.testimonial-card:hover::before { opacity: 1; }
.quote-mark {
  font-family: var(--font-disp);
  font-size: 3.5rem;
  line-height: 0.75;
  color: var(--gold);
  opacity: 0.5;
}
.testimonial-text {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--text-dim);
  font-style: italic;
  flex: 1;
}
.testimonial-author { display: flex; align-items: center; gap: 0.9rem; }
.testimonial-avatar {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g-dark) 0%, #0e2e1c 100%);
  border: 1px solid var(--g-mid);
  color: var(--g-bright);
  font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.05em;
  box-shadow: 0 0 10px rgba(45,122,79,0.15) inset;
}
.testimonial-name { font-size: 0.85rem; color: var(--text); font-weight: 500; }
.testimonial-since { font-size: 0.68rem; color: var(--text-mute); }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideDown {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}
@keyframes auroraBreath {
  0%, 100% { transform: scale(1) translateY(0); opacity: 1; }
  50% { transform: scale(1.06) translateY(-2%); opacity: 0.85; }
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(240,192,64,0.5); }
  50% { box-shadow: 0 0 16px rgba(240,192,64,0.9); }
}
@keyframes tickerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}
@keyframes drawPath {
  to { stroke-dashoffset: 0; }
}
@keyframes fillFade {
  to { opacity: 1; }
}
@keyframes scanSweep {
  0%   { top: -2px; opacity: 0; }
  3%   { opacity: 1; }
  97%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes candleRise {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}
@keyframes latestPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(95,207,144,0.8)); }
  50%       { filter: drop-shadow(0 0 12px rgba(95,207,144,1)); }
}
@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

/* ───────────────────────────────────────────────────────────── */
/*  MOBILE HEADER & HAMBURGER                                     */
/* ───────────────────────────────────────────────────────────── */

/* Hidden on desktop — shown only on mobile via media query */
.mobile-header {
  display: none;
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 200;
  height: 60px;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem 0 0.5rem;
  background: linear-gradient(180deg, #181f1b 0%, #131a15 100%);
  border-bottom: 1px solid rgba(45,122,79,0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Logo crop in mobile header — mirrors sidebar-logo crop */
.mobile-logo-wrap {
  height: 60px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}
.mobile-logo-img {
  height: 290px;
  width: auto;
  margin-top: -105px;
  margin-left: -33px;
  pointer-events: none;
}

/* ── Hamburger button ────────────────────────────────────────── */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid rgba(45,122,79,0.2);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  transition: border-color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.hamburger:hover {
  border-color: rgba(45,122,79,0.5);
  background: rgba(45,122,79,0.08);
}
.ham-bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-dim);
  border-radius: 1px;
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              opacity   0.2s ease,
              background 0.2s ease;
}
.hamburger[aria-expanded="true"] .ham-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
  background: var(--g-bright);
}
.hamburger[aria-expanded="true"] .ham-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger[aria-expanded="true"] .ham-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
  background: var(--g-bright);
}

/* ── Sidebar overlay (mobile backdrop) ──────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(8, 12, 10, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.22s ease;
}
.sidebar-overlay.open { display: block; }

/* Prevent body scroll when menu is open */
body.menu-open { overflow: hidden; }

/* ───────────────────────────────────────────────────────────── */
/*  LANDING — MOBILE RESPONSIVE                                   */
/* ───────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Fix 100vh cutting off content behind browser chrome */
  .landing {
    height: auto;
    min-height: -webkit-fill-available; /* iOS Safari */
    min-height: 100svh;                 /* modern mobile: excludes browser chrome */
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* Compact nav: 180px → 64px */
  .landing-nav {
    height: 64px;
    min-height: 64px;
    padding: 0 1rem;
    align-items: center;
  }

  /* Scale nav logo proportionally to fit 64px container (was 180px) */
  .nav-logo {
    height: 250px;
    margin-top: -85px;
    margin-left: -45px;
  }

  /* Hide tagline — no room on mobile */
  .nav-tagline { display: none; }

  /* Stack hero + chart columns vertically */
  .landing-body {
    flex-direction: column;
  }

  /* Hero takes full width */
  .hero-col {
    flex: none;
    width: 100%;
    padding: 2rem 1.5rem 1.5rem;
  }

  /* Hide the decorative preview card — saves vertical space */
  .chart-col { display: none; }

  /* Hero glow: expand to full width */
  .hero-glow {
    width: 100%;
    height: 50vh;
  }

  /* Hero title: tighten up */
  .hero-title {
    font-size: clamp(2.6rem, 9vw, 3.4rem);
  }

  /* Stats row: tighten spacing */
  .hero-stats {
    gap: 1.25rem;
    padding: 1rem 0;
    margin-bottom: 1.75rem;
  }

  /* CTA buttons: full-width stacked */
  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  .hero-actions .btn {
    width: 100%;
    min-height: 52px;
    justify-content: center;
  }
}

@media (max-width: 479px) {
  .hero-col {
    padding: 1.5rem 1.25rem 1.25rem;
  }
  .hero-title {
    font-size: clamp(2.2rem, 10vw, 2.8rem);
  }
  .hero-sub {
    font-size: 0.84rem;
  }
  .hero-stat-value {
    font-size: 1.35rem;
  }
}

/* ───────────────────────────────────────────────────────────── */
/*  LANDING — MEDIUM DESKTOP  (768px–1280px wide)               */
/* ───────────────────────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1280px) {
  .landing-nav {
    height: 140px;
    padding: 0 2.5rem 0 0;
  }
  .nav-logo {
    height: 420px;
    margin-top: -146px;
    margin-left: -62px;
  }
  .hero-col {
    padding: 1.5rem 1.5rem 1.5rem 3rem;
  }
  .chart-col {
    padding: 1.5rem 2.5rem 1.5rem 1.5rem;
  }
  .hero-kicker { margin-bottom: 1.3rem; }
  .hero-title {
    font-size: clamp(2.8rem, 4.5vw, 4.2rem);
    margin-bottom: 1.25rem;
  }
  .hero-sub { margin-bottom: 1.75rem; }
  .hero-stats {
    gap: 1.5rem;
    padding: 1rem 0;
    margin-bottom: 1.75rem;
  }
  .hero-stat-value { font-size: 1.5rem; }
}

/* ───────────────────────────────────────────────────────────── */
/*  LANDING — SHORT VIEWPORT  (≥768px wide, height ≤ 820px)     */
/*  Targets laptops at 100% zoom (e.g. 1366×768, 1280×800)      */
/*  Comes after max-width query so it wins on short+medium screens */
/* ───────────────────────────────────────────────────────────── */
@media (min-width: 768px) and (max-height: 820px) {
  /* Safety net: allow scroll if content still overflows */
  .landing { overflow-y: auto; }

  /* Compress nav 180px → 80px */
  .landing-nav {
    height: 80px;
    min-height: 80px;
    padding: 0 2.5rem 0 0;
    align-items: center;
  }
  /* Reset tagline top-padding so it aligns in the centred nav */
  .nav-tagline { padding-top: 0; }

  /* Recrop logo to fit 80px container, maintaining same vertical crop ratio */
  .nav-logo {
    height: 330px;
    margin-top: -114px;
    margin-left: -55px;
  }

  /* Tighten hero column spacing */
  .hero-col {
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
  }
  .hero-kicker { margin-bottom: 1rem; }
  .hero-title {
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    margin-bottom: 0.9rem;
  }
  .hero-sub {
    font-size: 0.83rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
  }
  .hero-stats {
    padding: 0.85rem 0;
    gap: 1.4rem;
    margin-bottom: 1.1rem;
  }
  .hero-stat-value { font-size: 1.35rem; }

  /* Scale down dashboard preview card to fit shorter area */
  .dashboard-preview { padding: 1rem 1.25rem; }
  .preview-chart { margin-bottom: 0.85rem; }
  .preview-metrics { gap: 0.45rem; }
  .pm-val { font-size: 1.25rem; }
}

/* ───────────────────────────────────────────────────────────── */
/*  RESPONSIVE — TABLET  (≤ 1023px)                              */
/* ───────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  /* Show mobile header */
  .mobile-header { display: flex; }

  /* Single-column layout */
  .app {
    grid-template-columns: 1fr;
  }

  /* Sidebar: fixed drawer, slides in from left */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 32px rgba(0,0,0,0.5);
  }
  .sidebar.open {
    transform: translateX(0);
  }

  /* Main content: full width, account for mobile header */
  .main-content {
    padding: 2rem 1.75rem 3rem;
  }

  /* Settings grid: 2 columns on tablet */
  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Panel title slightly smaller */
  .panel-title {
    font-size: 2.2rem;
  }

  /* Tab buttons in sidebar: bigger touch targets */
  .tab-btn {
    padding: 0.9rem 0.85rem;
    min-height: 48px;
  }

  /* Sidebar footer buttons */
  .sidebar-footer .btn {
    min-height: 48px;
  }
}

/* ───────────────────────────────────────────────────────────── */
/*  RESPONSIVE — PHONE  (≤ 767px)                                */
/* ───────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .main-content {
    padding: 1.5rem 1rem 5rem;
  }

  /* Settings grid: single column on phone */
  .settings-grid {
    grid-template-columns: 1fr;
  }

  /* Panel header */
  .panel-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }
  .panel-title {
    font-size: 1.8rem;
  }

  /* Cards: reduce padding */
  .card,
  .metric-card,
  .news-card,
  .team-card,
  .testimonial-card {
    padding: 1.25rem;
  }

  /* Team cards: stack avatar + text vertically */
  .team-card {
    flex-direction: column;
    gap: 0.9rem;
  }
  .team-avatar {
    width: 44px;
    height: 44px;
  }

  /* News grid: single column */
  .news-grid {
    grid-template-columns: 1fr;
  }

  /* Team grid: single column */
  .team-grid {
    grid-template-columns: 1fr;
  }

  /* Testimonial grid: single column */
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  /* Form inputs: larger for mobile keyboards */
  .form-input {
    font-size: 1rem;
    padding: 0.85rem 1rem;
    min-height: 48px;
  }

  /* Buttons: touch-friendly minimum height */
  .btn {
    min-height: 48px;
  }
  .btn-primary {
    width: 100%;
  }

  /* Save row: stack on phone */
  .save-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .save-status {
    text-align: center;
  }

  /* Metric values */
  .metric-value {
    font-size: 1.65rem;
  }
}

/* ───────────────────────────────────────────────────────────── */
/*  RESPONSIVE — SMALL PHONE  (≤ 479px)                          */
/* ───────────────────────────────────────────────────────────── */
@media (max-width: 479px) {
  .main-content {
    padding: 1.25rem 0.875rem 5rem;
  }

  .panel-title {
    font-size: 1.6rem;
  }

  .mobile-header {
    height: 56px;
  }
  .mobile-logo-wrap {
    height: 56px;
  }
  .mobile-logo-img {
    height: 225px;
    margin-top: -80px;
  }
}

/* ───────────────────────────────────────────────────────────── */
/*  LIVE SIGNALS TAB                                             */
/* ───────────────────────────────────────────────────────────── */

/* Tab badge on the sidebar button */
.tab-btn .signal-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f0c040;
  box-shadow: 0 0 8px rgba(240,192,64,0.8);
  animation: livePulse 1.6s ease-in-out infinite;
  margin-left: auto;
  flex-shrink: 0;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.7); }
}

/* Signals layout */
.signals-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 960px) {
  .signals-layout { grid-template-columns: 1fr; }
}

/* ── Signal Card ─────────────────────────────────────────────── */
.signal-card {
  background: linear-gradient(160deg, #131b17 0%, #0d1210 100%);
  border: 1px solid rgba(240,192,64,0.22);
  border-radius: var(--radius-lg);
  box-shadow:
    0 0 0 1px rgba(240,192,64,0.06),
    0 0 60px rgba(240,192,64,0.04),
    0 8px 40px rgba(0,0,0,0.55);
  overflow: hidden;
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.signal-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(240,192,64,0.4) 40%, rgba(240,192,64,0.4) 60%, transparent 100%);
}

/* Header */
.signal-card-head {
  padding: 1.25rem 1.5rem 1.1rem;
  border-bottom: 1px solid rgba(240,192,64,0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.signal-alert-icon {
  font-size: 1.1rem;
  line-height: 1;
  animation: alertShake 3s 0.5s ease-in-out infinite;
}
@keyframes alertShake {
  0%, 85%, 100% { transform: rotate(0deg); }
  88% { transform: rotate(-12deg); }
  92% { transform: rotate(10deg); }
  96% { transform: rotate(-6deg); }
}
.signal-card-title {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  flex: 1;
}
.signal-card-title span {
  color: var(--gold-bright);
}
.signal-order-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.signal-order-badge.buy {
  background: rgba(76,175,125,0.18);
  color: #5fcf90;
  border: 1px solid rgba(76,175,125,0.35);
  box-shadow: 0 0 12px rgba(76,175,125,0.15);
}
.signal-order-badge.sell {
  background: rgba(238,85,119,0.15);
  color: #f08;
  border: 1px solid rgba(238,85,119,0.3);
}

/* TTL Countdown */
.signal-ttl-wrap {
  padding: 0.85rem 1.5rem;
  background: rgba(240,192,64,0.04);
  border-bottom: 1px solid rgba(240,192,64,0.08);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.signal-ttl-label {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--text-mute);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.signal-ttl-timer {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  min-width: 60px;
  text-shadow: 0 0 14px rgba(240,192,64,0.5);
  flex-shrink: 0;
}
.signal-ttl-timer.urgent {
  color: #ff6b6b;
  text-shadow: 0 0 14px rgba(255,107,107,0.5);
  animation: urgentBlink 0.6s ease-in-out infinite;
}
@keyframes urgentBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.ttl-track {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.ttl-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  box-shadow: 0 0 8px rgba(240,192,64,0.5);
  transition: width 1s linear, background 1s linear;
}
.ttl-fill.urgent {
  background: linear-gradient(90deg, #cc3333, #ff6b6b);
  box-shadow: 0 0 8px rgba(255,107,107,0.5);
}

/* Body data rows */
.signal-card-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.signal-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  gap: 1rem;
}
.signal-meta-row.entry-row {
  background: rgba(95,207,144,0.07);
  border: 1px solid rgba(95,207,144,0.15);
}
.signal-meta-row.sl-row {
  background: rgba(238,85,119,0.06);
  border: 1px solid rgba(238,85,119,0.14);
}
.signal-meta-row.info-row {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
}
.signal-row-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  text-transform: uppercase;
  white-space: nowrap;
}
.signal-row-value {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: right;
}
.signal-row-value.entry  { color: #5fcf90; }
.signal-row-value.sl     { color: #ff6b8a; }
.signal-row-value.neutral { color: var(--text); }
.signal-row-value small  { font-size: 0.72em; color: var(--text-dim); margin-left: 0.4rem; }

/* TP Ladder */
.signal-tp-section {
  padding: 0 1.5rem 1.25rem;
}
.signal-tp-header {
  font-size: 0.63rem;
  letter-spacing: 0.18em;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}
.tp-ladder {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.tp-row {
  display: grid;
  grid-template-columns: 42px 1fr auto auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem;
  background: rgba(45,122,79,0.06);
  border: 1px solid rgba(45,122,79,0.12);
  border-radius: 6px;
  transition: border-color var(--transition), background var(--transition);
}
.tp-row:hover {
  background: rgba(45,122,79,0.1);
  border-color: rgba(45,122,79,0.25);
}
.tp-row.hit {
  background: rgba(45,122,79,0.18);
  border-color: rgba(76,175,125,0.4);
}
.tp-level {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--g-vivid);
}
.tp-level.tp1 { color: #5fcf90; }
.tp-level.tp2 { color: #4caf7d; }
.tp-level.tp3 { color: #3d9e6e; }
.tp-level.tp4 { color: var(--gold); }
.tp-bar-wrap {
  height: 3px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  overflow: hidden;
}
.tp-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(45,122,79,0.5), rgba(76,175,125,0.8));
}
.tp-price {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: right;
  white-space: nowrap;
}
.tp-profit {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--g-bright);
  text-align: right;
  white-space: nowrap;
  min-width: 60px;
}

/* Action buttons */
.signal-actions {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(45,122,79,0.1);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
}
.btn-approve {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, #1a6b3f 0%, #2d7a4f 50%, #1f5e38 100%);
  color: #a8f0c8;
  box-shadow:
    0 0 0 1px rgba(76,175,125,0.3),
    0 0 28px rgba(45,122,79,0.4),
    0 4px 16px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.07);
  transition: all 0.18s ease;
}
.btn-approve:hover:not(:disabled) {
  background: linear-gradient(135deg, #256b47 0%, #4caf7d 50%, #2d7a4f 100%);
  box-shadow:
    0 0 0 1px rgba(76,175,125,0.5),
    0 0 44px rgba(76,175,125,0.55),
    0 6px 20px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transform: translateY(-1px);
}
.btn-approve:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-decline {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  color: #ff6b8a;
  border: 1px solid rgba(238,85,119,0.28);
  transition: all 0.18s ease;
}
.btn-decline:hover:not(:disabled) {
  background: rgba(238,85,119,0.08);
  border-color: rgba(238,85,119,0.5);
  box-shadow: 0 0 18px rgba(238,85,119,0.12);
}
.btn-decline:disabled { opacity: 0.4; cursor: not-allowed; }

/* Signal state overlay */
.signal-state-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: var(--radius-lg);
  z-index: 20;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.signal-state-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
.signal-state-overlay.expired   { background: rgba(10,12,11,0.18); backdrop-filter: none; -webkit-backdrop-filter: none; }
.signal-state-overlay.approved  { background: rgba(10,20,14,0.88); }
.signal-state-overlay.declined  { background: rgba(15,10,12,0.88); }
.signal-state-overlay.executing { background: rgba(10,12,11,0.88); }
.overlay-icon {
  font-size: 2.5rem;
  line-height: 1;
}
.overlay-title {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.overlay-title.expired  { color: #ff6b8a; text-shadow: 0 0 20px rgba(255,107,138,0.4); }
.overlay-title.approved { color: #5fcf90; text-shadow: 0 0 20px rgba(95,207,144,0.4); }
.overlay-title.declined { color: var(--text-dim); }
.overlay-title.executing { color: var(--gold-bright); text-shadow: 0 0 20px rgba(240,192,64,0.4); }
.overlay-sub {
  font-size: 0.7rem;
  color: var(--text-mute);
  letter-spacing: 0.06em;
  text-align: center;
  max-width: 220px;
  line-height: 1.5;
}
.overlay-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(240,192,64,0.2);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Info sidebar panel ──────────────────────────────────────── */
.signal-info-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.signal-info-card {
  background: linear-gradient(145deg, #161d19 0%, #101410 100%);
  border: 1px solid rgba(45,122,79,0.15);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  position: relative;
  overflow: hidden;
}
.signal-info-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45,122,79,0.18), transparent);
}
.sic-title {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sic-title::before {
  content: "";
  display: block;
  width: 10px;
  height: 1px;
  background: var(--g-mid);
}
.bracket-order-visual {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.bov-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
}
.bov-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bov-dot.tp  { background: var(--g-bright); box-shadow: 0 0 6px rgba(76,175,125,0.4); }
.bov-dot.entry { background: var(--gold-bright); box-shadow: 0 0 6px rgba(240,192,64,0.4); width: 9px; height: 9px; }
.bov-dot.sl  { background: #ff6b8a; box-shadow: 0 0 6px rgba(255,107,138,0.4); }
.bov-line {
  width: 1px;
  height: 14px;
  margin-left: 3px;
  background: rgba(255,255,255,0.08);
}
.bov-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  flex: 1;
}
.bov-price {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-mute);
  text-align: right;
}

/* Risk level badge */
.risk-badge-wrap { display: flex; align-items: center; gap: 0.65rem; }
.risk-pips {
  display: flex;
  gap: 3px;
}
.risk-pip {
  width: 6px;
  height: 16px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
}
.risk-pip.active.low    { background: var(--g-vivid); }
.risk-pip.active.medium { background: var(--gold); }
.risk-pip.active.high   { background: #ff6b8a; }
.risk-pip.active.q-poor { background: #ff6b8a; }
.risk-pip.active.q-fair { background: var(--gold); }
.risk-pip.active.q-good { background: var(--g-vivid); }
.risk-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.risk-label.medium { color: var(--gold-bright); }
.risk-label.low    { color: var(--g-vivid); }
.risk-label.high   { color: #ff6b8a; }
.risk-label.q-poor { color: #ff6b8a; }
.risk-label.q-fair { color: var(--gold-bright); }
.risk-label.q-good { color: var(--g-vivid); }

/* Signal ID / meta */
.signal-meta-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.signal-id {
  font-size: 0.6rem;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}
.signal-strategy {
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 0.06em;
}

/* No signal / empty state */
.no-signal-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  gap: 0.85rem;
  border: 1px dashed rgba(45,122,79,0.15);
  border-radius: var(--radius-lg);
  color: var(--text-mute);
}
.no-signal-icon { font-size: 2rem; opacity: 0.3; }
.no-signal-text { font-size: 0.75rem; letter-spacing: 0.08em; }

/* Executing animation */
@keyframes executingPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(240,192,64,0.3), 0 0 28px rgba(45,122,79,0.4), 0 4px 16px rgba(0,0,0,0.4); }
  50% { box-shadow: 0 0 0 1px rgba(240,192,64,0.6), 0 0 48px rgba(240,192,64,0.25), 0 4px 16px rgba(0,0,0,0.4); }
}

/* ── Account Balance Tab ─────────────────────────────────────── */
.balance-last-updated {
  font-size: 0.7rem;
  color: var(--text-mute);
  letter-spacing: 0.07em;
  margin-left: auto;
  align-self: center;
}

/* Empty state */
.balance-empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  gap: 1rem;
  border: 1px dashed rgba(45,122,79,0.15);
  border-radius: var(--radius-lg);
  color: var(--text-dim);
  text-align: center;
}
.balance-empty-icon { opacity: 0.25; }
.balance-empty-title { font-family: var(--font-disp); font-size: 1.1rem; color: var(--text); }
.balance-empty-sub { font-size: 0.8rem; color: var(--text-dim); max-width: 340px; line-height: 1.6; }
.balance-settings-link {
  background: none;
  border: none;
  color: var(--g-bright);
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.balance-settings-link:hover { color: var(--g-vivid); }

/* Charts grid */
.balance-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
@media (max-width: 1100px) {
  .balance-charts-grid { grid-template-columns: 1fr; }
}

.balance-chart-card { position: relative; overflow: visible; }

.balance-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.balance-chart-legend {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.bal-legend-item {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.bal-legend-item::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
}
.bal-legend-green { color: var(--g-bright); }
.bal-legend-green::before { background: var(--g-bright); }
.bal-legend-gold { color: var(--gold-bright); }
.bal-legend-gold::before { background: var(--gold-bright); border-top: none; }
.bal-legend-profit { color: var(--gold); }
.bal-legend-profit::before { background: var(--gold); }

/* Chart wrap: yaxis + svg area */
.balance-chart-wrap { position: relative; }

.balance-chart-area {
  position: relative;
  margin-left: 2.8rem;
}

.balance-chart-yaxis {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2.6rem;
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  pointer-events: none;
}
.balance-chart-yaxis span {
  font-size: 0.6rem;
  color: var(--text-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  text-align: right;
  padding-right: 0.35rem;
  white-space: nowrap;
}

.balance-svg {
  display: block;
  width: 100%;
  height: 180px;
}

.balance-chart-xlabels {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0 0;
  font-size: 0.62rem;
  color: var(--text-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* Equity line fade-in (used for dashed secondary line on daily chart) */
.balance-eq-line {
  opacity: 0;
  transition: opacity 0.6s ease 1.8s;
}
.chart-animated .balance-eq-line { opacity: 1; }

/* Hover tooltip */
.balance-tooltip {
  position: absolute;
  background: rgba(20, 28, 22, 0.92);
  border: 1px solid rgba(45, 122, 79, 0.25);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  pointer-events: none;
  z-index: 20;
  backdrop-filter: blur(8px);
  min-width: 150px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.bal-tt-date {
  font-size: 0.65rem;
  color: var(--text-mute);
  letter-spacing: 0.07em;
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
}
.bal-tt-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  padding: 0.15rem 0;
}
.bal-tt-label { color: var(--text-dim); }
.bal-tt-val { font-family: var(--font-mono); font-size: 0.78rem; }
.bal-tt-green { color: var(--g-bright); }
.bal-tt-gold  { color: var(--gold-bright); }
.bal-tt-red   { color: #ff6b8a; }
