﻿/* ── APP SHELL ───────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* ── SIDEBAR ─────────────────────────────── */
.sidebar {
  width: 64px;
  min-width: 64px;
  background: #0F0F24;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 4px;
  transition: width 0.25s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
  z-index: 10;
}
.sidebar.expanded {
  width: 210px;
  align-items: flex-start;
  padding: 20px 0;
}
/* Legacy collapsed class — treat as default (already 64px) */
.sidebar.collapsed { width: 64px; min-width: 64px; }

/* Logo area */
.sb-logo {
  width: 36px; height: 36px;
  background: var(--indigo);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  flex-shrink: 0;
  border-bottom: none;
  padding: 0;
}
.sb-logo-text { display: none; }
.sb-logo-sub { display: none; }
.sidebar.expanded .sb-logo {
  width: auto; padding: 0 16px; background: none; border-radius: 0;
  height: auto;
  justify-content: space-between;
}
.sidebar.expanded .sb-logo-text {
  display: block;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.03em;
}

/* Section labels */
.sb-section { display: none; }
.sidebar.expanded .sb-section {
  display: block;
  font-size: 0.58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-3);
  padding: 12px 18px 4px;
  width: 100%;
}

.sb-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 0; display: flex; flex-direction: column; align-items: center; }
.sb-scroll::-webkit-scrollbar { width: 3px; }
.sb-scroll::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }
.sidebar.expanded .sb-scroll { align-items: stretch; }

.sb-nav { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.sidebar.expanded .sb-nav { align-items: stretch; }

/* Nav items — icon-only by default */
.nav-item {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  flex-shrink: 0;
  user-select: none;
  font-size: 0.82rem;
  font-weight: 500;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}
.nav-item:hover { background: var(--surface-2); color: var(--text-2); }
.nav-item.active {
  background: var(--indigo-dim);
  color: var(--indigo);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -1px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--indigo);
  border-radius: 0 3px 3px 0;
}
.nav-item .icon { color: inherit; flex-shrink: 0; }
.nav-item .nl { display: none; font-size: 0.82rem; font-weight: 500; }
.ni { font-size: 1rem; width: 20px; text-align: center; display: none; }

/* Expanded nav items */
.sidebar.expanded .nav-item {
  width: calc(100% - 16px);
  margin: 0 8px;
  padding: 0 12px;
  justify-content: flex-start;
  gap: 10px;
  height: 38px;
}
.sidebar.expanded .nav-item .nl { display: block; }

/* Mirror Moment — special gold nav item */
.nav-item.nav-mirror {
  background: rgba(252,211,77,0.08) !important;
  border: 1px solid rgba(252,211,77,0.15) !important;
  color: var(--gold) !important;
  margin: 6px 0;
}
.sidebar.expanded .nav-item.nav-mirror { margin: 6px 8px; }
.nav-item.nav-mirror:hover { background: rgba(252,211,77,0.12) !important; }
.nav-item.nav-mirror.active { color: var(--gold) !important; background: rgba(252,211,77,0.12) !important; }
.nav-item.nav-mirror.active::before { background: var(--gold); }

/* Locked nav items (plan gate) */
.nav-item.nav-locked { opacity: 0.45; }
.nav-item.nav-locked .nav-lock-icon { margin-left: auto; width: 12px; height: 12px; opacity: 0.5; }

/* Hover tooltip for collapsed sidebar */
.sidebar:not(.expanded) .nav-item[data-label]:hover::after {
  content: attr(data-label);
  position: absolute;
  left: 56px; top: 50%;
  transform: translateY(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text-1);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--r-xs);
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  font-family: var(--font-body);
  pointer-events: none;
}

.nav-badge {
  background: var(--red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: auto;
  min-width: 18px;
  text-align: center;
}
.nav-badge-ai,
.nav-badge-gold {
  background: var(--indigo-dim);
  color: var(--indigo);
  border: 1px solid var(--indigo-glow);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
/* Hide badges in collapsed */
.sidebar:not(.expanded) .nav-badge,
.sidebar:not(.expanded) .nav-badge-ai,
.sidebar:not(.expanded) .nav-badge-gold { display: none; }

/* Expand toggle button */
.sb-collapse {
  width: 28px; height: 28px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-3);
  display: none; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.sb-collapse:hover { background: var(--surface-2); color: var(--text-1); }
.sidebar.expanded .sb-collapse { display: flex; }

.sb-bottom {
  padding: 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.sidebar.expanded .sb-bottom { padding: 12px; align-items: stretch; }

/* User avatar at bottom */
.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--indigo);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.user-name { font-size: 0.82rem; font-weight: 600; color: var(--text-1); display: none; }
.user-plan { font-size: 0.68rem; color: var(--text-3); margin-top: 1px; display: none; }
.sidebar.expanded .user-name,
.sidebar.expanded .user-plan { display: block; }

.upgrade-card {
  background: var(--indigo-dim);
  border: 1px solid var(--indigo-glow);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s;
  display: none;
}
.sidebar.expanded .upgrade-card { display: block; }
.upgrade-card:hover { background: rgba(124,111,224,0.18); }
.upgrade-card .uc-title,
.upgrade-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--indigo);
  font-family: var(--font-body);
  margin-bottom: 2px;
}
.upgrade-card .uc-sub,
.upgrade-card-sub { font-size: 0.68rem; color: var(--text-3); margin-top: 2px; }

/* ── TOPBAR ──────────────────────────────── */
.topbar {
  background: #0F0F24;
  border-bottom: 1px solid var(--border);
  height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 5;
  flex-shrink: 0;
}
.tb-left { flex: 1; min-width: 0; }
.tb-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.02em;
}
.tb-sub {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 2px;
}
.tb-right { display: flex; align-items: center; gap: 6px; }
.tb-icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.tb-icon-btn:hover {
  background: var(--surface-2);
  color: var(--text-1);
  border-color: var(--border-2);
}
.btn-log-trade {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  background: var(--indigo);
  color: #fff;
  border: none; border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 0 20px rgba(124,111,224,0.30);
}
.btn-log-trade:hover {
  background: #6B5FD0;
  box-shadow: 0 0 28px rgba(124,111,224,0.45);
  transform: translateY(-1px);
}
.tb-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--indigo); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  cursor: pointer; flex-shrink: 0;
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}
.tb-avatar:hover { opacity: 0.8; }
.tb-avatar-wrap { position: relative; }

/* ── USER DROPDOWN ───────────────────────── */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
  z-index: 100;
  padding: 6px;
  animation: dropdownIn 0.15s ease;
}
.user-dropdown.hidden { display: none !important; }
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ud-header { padding: 10px 12px 8px; }
.ud-name { font-size: 0.82rem; font-weight: 600; color: var(--text-1); line-height: 1.3; }
.ud-email { font-size: 0.7rem; color: var(--text-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-divider { height: 1px; background: var(--border); margin: 4px 8px; }
.ud-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  font-size: 0.78rem; font-weight: 500; color: var(--text-2);
  cursor: pointer; transition: background 0.12s, color 0.12s;
}
.ud-item:hover { background: var(--surface-2); color: var(--text-1); }
.ud-item svg { flex-shrink: 0; color: var(--text-3); }
.ud-item:hover svg { color: var(--text-2); }
.ud-item-danger { color: var(--red); }
.ud-item-danger:hover { background: var(--red-dim); color: var(--red); }
.ud-item-danger svg { color: var(--red); }
.ud-item-danger:hover svg { color: var(--red); }
.ud-plan-badge {
  margin-left: auto; font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 7px; border-radius: 5px;
  background: var(--surface-2); color: var(--text-3);
}
.ud-billing-info {
  display: none; padding: 4px 12px 6px;
  font-size: 0.68rem; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}

/* ── SIGN OUT MODAL ──────────────────────── */
.signout-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 300; animation: fadeIn 0.15s ease;
}
.signout-overlay.hidden { display: none !important; }
.signout-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
  z-index: 301;
  width: min(380px, calc(100vw - 32px));
  padding: 32px; text-align: center;
  animation: modalIn 0.2s ease;
}
.signout-modal.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.signout-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--red-dim); color: var(--red);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.signout-title {
  font-family: var(--font-head); font-size: 1.15rem; font-weight: 600;
  color: var(--text-1); margin-bottom: 6px;
}
.signout-sub { font-size: 0.8rem; color: var(--text-3); line-height: 1.5; margin-bottom: 24px; }
.signout-actions { display: flex; gap: 10px; }
.btn-signout-cancel {
  flex: 1; padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--border-2); background: var(--surface-2);
  color: var(--text-2); font-family: var(--font-body);
  font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.12s;
}
.btn-signout-cancel:hover { background: var(--surface-3); color: var(--text-1); }
.btn-signout-confirm {
  flex: 1; padding: 10px 16px; border-radius: 10px;
  border: none; background: #dc2626; color: #fff;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.12s;
  box-shadow: 0 1px 3px rgba(220,38,38,0.3);
}
.btn-signout-confirm:hover { background: #b91c1c; box-shadow: 0 2px 8px rgba(220,38,38,0.35); transform: translateY(-1px); }
.topbar .btn-indigo.btn-sm:hover { background: var(--indigo-hover); }

/* ── PAGE CONTENT ────────────────────────── */
.main-wrap {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 64px;
  background: var(--bg);
}
.page-content::-webkit-scrollbar { width: 4px; }
.page-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── UPGRADE GATE (blurry preview) ───────── */
.upgrade-gate-wrap {
  position: relative;
  min-height: calc(100vh - 140px);
  overflow: hidden;
}
.upgrade-gate-preview {
  filter: blur(6px) saturate(0.5);
  -webkit-filter: blur(6px) saturate(0.5);
  opacity: 0.5;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  position: relative;
  z-index: 0;
}
/* Extra protection: prevent content from being copied or interacted with */
.upgrade-gate-preview * {
  pointer-events: none !important;
  user-select: none !important;
}
.upgrade-gate-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: radial-gradient(ellipse at center, transparent 0%, var(--bg) 70%);
}
.upgrade-gate-card {
  text-align: center;
  padding: 40px 48px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  max-width: 380px;
}
.upgrade-gate-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--indigo-dim);
  border: 1px solid var(--indigo-glow);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  color: var(--indigo);
}
.upgrade-gate-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 8px;
}
.upgrade-gate-sub {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Page header */
.page-header { margin-bottom: 24px; }
.page-header-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.page-title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.page-subtitle { font-size: 0.82rem; color: var(--text-3); }
.page-sub { font-size: 0.75rem; color: var(--text-3); font-family: var(--font-body); margin-top: 2px; margin-bottom: 24px; }

.page-loading {
  display: flex; align-items: center; justify-content: center;
  height: 200px; color: var(--text-3); font-size: 0.9rem;
}

/* ── SKELETON SHIMMER ────────────────────── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skel {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease infinite;
}
.skel-page { padding: 24px 0; }
.skel-row { display: flex; gap: 16px; margin-bottom: 16px; }
.skel-card { flex: 1; height: 90px; border-radius: var(--r-md); }
.skel-card-lg { flex: 1; height: 200px; border-radius: var(--r-md); }
.skel-line { height: 14px; margin-bottom: 12px; border-radius: 6px; }
.skel-line-sm { width: 40%; }
.skel-line-md { width: 65%; }
.skel-line-lg { width: 90%; }

/* ── DEMO BANNER ─────────────────────────── */
.demo-banner {
  background: var(--indigo-dim);
  border: 1px solid var(--indigo-glow);
  border-radius: var(--r-sm);
  padding: 11px 16px;
  margin-bottom: 20px;
}
.demo-banner-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.demo-banner-left {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--text-2);
  font-family: var(--font-body);
}
.demo-banner-left strong { font-weight: 600; color: var(--text-1); }
.demo-banner-right { display: flex; align-items: center; gap: 8px; }
.demo-dismiss {
  background: none; border: none; cursor: pointer;
  color: var(--text-3); padding: 4px;
}
.demo-dismiss:hover { opacity: 0.7; }

/* ── DASHBOARD KPI GRID ─────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* ── KPI CARD ─────────────────────────────── */
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 22px 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.kpi-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
/* Bottom accent line */
.kpi-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 0 0 var(--r) var(--r);
}
.kpi-accent-green::after  { background: var(--green); }
.kpi-accent-indigo::after { background: var(--indigo); }
.kpi-accent-gold::after   { background: var(--gold); }
.kpi-accent-red::after    { background: var(--red); }

.kpi-card-label {
  font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-3);
  font-family: var(--font-body);
  margin-bottom: 12px;
}
.kpi-card-value {
  font-family: var(--font-head);
  font-size: 2rem; font-weight: 600;
  color: var(--text-1);
  line-height: 1; letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.kpi-card-value .decimal {
  font-size: 1.2rem; font-weight: 400;
  color: var(--text-2);
}
.kpi-card-sub {
  font-size: 0.7rem;
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* Subtle violet glow on hover */
.kpi-card:hover::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at top left, rgba(124,111,224,0.06), transparent 70%);
  pointer-events: none;
}

/* ── CHART CARD ──────────────────────────── */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 22px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chart-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.chart-card-label {
  font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-3); font-family: var(--font-body);
  margin-bottom: 4px;
}

/* Time buttons */
.time-btn {
  padding: 4px 10px; border-radius: var(--r-xs);
  font-size: 0.7rem; font-weight: 600;
  border: none; background: transparent; color: var(--text-3);
  cursor: pointer; font-family: var(--font-body); transition: all 0.12s;
}
.time-btn:hover  { background: var(--surface-2); color: var(--text-2); }
.time-btn.active { background: var(--surface-3); color: var(--text-1); }

/* ── DASHBOARD MAIN GRID ────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-period {
  font-size: 0.7rem;
  color: var(--text-3);
}
.chart-wrap {
  position: relative;
  width: 100%;
}

/* ── SKELETON LOADERS ────────────────────── */
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #1A1A32 25%, #22223C 50%, #1A1A32 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
}
.skeleton-icon { width: 20px; height: 20px; border-radius: 4px; }
.skeleton-tag  { width: 60px; height: 22px; }
.skeleton-text-lg { width: 80px; height: 28px; margin-bottom: 6px; }
.skeleton-text-sm { width: 100px; height: 10px; }
.skeleton-row { height: 40px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-rows { padding: 4px 0; }

/* ── RECENT TRADES LIST ──────────────────── */
.trades-list { display: flex; flex-direction: column; }
.trade-row {
  display: grid;
  grid-template-columns: 50px 1fr auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}
.trade-row:hover { background: var(--surface-2); }
.trade-row:last-child { border-bottom: none; }
.trade-date { font-size: 0.75rem; color: var(--text-3); }
.trade-instrument { font-size: 0.82rem; font-weight: 600; color: var(--text-1); }
.trade-dir {
  font-size: 0.65rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.dir-long  { background: var(--green-dim); color: var(--green); border: 1px solid rgba(74,222,128,0.20); }
.dir-short { background: var(--red-dim); color: var(--red); border: 1px solid rgba(248,113,113,0.20); }
.trade-pnl {
  font-family: var(--font-mono);
  font-size: 0.82rem; font-weight: 700; text-align: right;
}
.trade-pnl.pnl-pos { color: var(--green); }
.trade-pnl.pnl-neg { color: var(--red); }
.trade-setup { font-size: 0.72rem; color: var(--text-3); text-align: right; }

/* ── EMPTY STATES ────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 32px 16px;
  text-align: center; gap: 8px;
}
.empty-icon-svg { width: 32px; height: 32px; color: var(--text-4); margin-bottom: 4px; }
.empty-title { font-size: 0.85rem; font-weight: 500; color: var(--text-3); }
.empty-sub { font-size: 0.78rem; color: var(--text-3); }

/* ── MIRROR MOMENT STRIP ─────────────────── */
.mirror-strip {
  margin-top: 14px;
}
.mirror-strip.hidden { display: none; }
.mirror-strip-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--indigo);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mirror-strip-teaser {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--indigo);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.mirror-strip-left { flex: 1; min-width: 0; }
.mirror-strip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--indigo);
  font-family: var(--font-body);
  margin-bottom: 4px;
}
.mirror-strip-text {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.4;
}
.mirror-strip-right { flex-shrink: 0; }
.mirror-strip-link {
  font-size: 0.72rem;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--fast);
  white-space: nowrap;
}
.mirror-strip-link:hover { color: var(--text-2); }

/* ── IMPORT MODAL ────────────────────────── */
.import-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.import-box {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 28px;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.import-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.import-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--text-1);
}
.import-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-3); padding: 4px;
}
.import-close:hover { color: var(--text-1); }
.import-sub { font-size: 0.82rem; color: var(--text-3); margin-bottom: 14px; }
.import-dropzone {
  border: 2px dashed var(--border-2);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.import-dropzone:hover, .import-dropzone.dragover {
  border-color: var(--indigo);
  background: var(--indigo-dim);
}
.import-stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 16px;
}
.import-stat {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}
.import-stat-val {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--text-1);
}
.import-stat-lbl {
  font-size: 0.65rem; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-top: 2px;
}
.import-preview-table { overflow-x: auto; }
.import-preview-table table { width: 100%; font-size: 0.78rem; border-collapse: collapse; }
.import-preview-table th {
  padding: 6px 8px; text-align: left;
  color: var(--text-3); font-size: 0.65rem;
  text-transform: uppercase; letter-spacing: 0.07em;
}
.import-preview-table td { padding: 8px; color: var(--text-2); }
.import-preview-table tr + tr { border-top: 1px solid var(--border); }

/* ── MARKET TICKER ───────────────────────── */
.market-ticker {
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; scrollbar-width: none;
  flex: 1; margin: 0 20px;
}
.market-ticker::-webkit-scrollbar { display: none; }
.ticker-item {
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px; white-space: nowrap;
}
.ticker-label { font-size: 0.65rem; color: var(--text-3); font-weight: 600; }
.ticker-price {
  font-family: var(--font-mono);
  font-size: 0.72rem; color: var(--text-2); font-weight: 500;
}
.ticker-change {
  font-family: var(--font-mono);
  font-size: 0.65rem; font-weight: 700;
}
.ticker-change.up   { color: var(--green); }
.ticker-change.down { color: var(--red); }
.ticker-divider { width: 1px; height: 14px; background: var(--border); flex-shrink: 0; }
.ticker-loading { font-size: 0.72rem; color: var(--text-3); }

/* ── RESPONSIVE DASHBOARD ────────────────── */
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } .market-ticker { display: none; } }
@media (max-width: 960px)  { .kpi-grid { grid-template-columns: repeat(2, 1fr); } .demo-banner-inner { flex-direction: column; align-items: flex-start; } }
@media (max-width: 640px)  { .kpi-grid { grid-template-columns: 1fr; } .import-stats-row { grid-template-columns: 1fr; } }

/* ── CALENDAR v2 ─────────────────────────── */
.cv-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 20px;
}
.cv-title {
  font-family: var(--fh); font-size: 1.35rem; font-weight: 700; color: var(--text-1);
}
.cv-sub {
  font-size: 0.75rem; color: var(--text-3); margin-top: 2px;
}
.cv-nav {
  display: flex; align-items: center; gap: 10px;
}
.cv-nav-btn {
  padding: 6px 14px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-size: 0.72rem;
  font-weight: 600; cursor: pointer; transition: all 0.15s; font-family: var(--fb);
}
.cv-nav-btn:hover { border-color: var(--indigo); color: var(--text-1); }
.cv-month-label {
  font-family: var(--fh); font-size: 1rem; min-width: 140px; text-align: center;
  color: var(--text-1); font-weight: 600;
}

.cv-layout {
  display: grid; grid-template-columns: 1fr 320px; gap: 16px;
  align-items: start;
}
@media (max-width: 960px) { .cv-layout { grid-template-columns: 1fr; } }

/* ── Calendar mobile — week-based layout ── */
.calendar-mobile { display: none; }

@media (max-width: 768px) {
  /* Header: stack title + nav vertically, center */
  .cv-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .cv-title { font-size: 1.1rem; }
  .cv-sub { font-size: 0.7rem; }
  .cv-nav { justify-content: center; }
  .cv-nav-btn { padding: 5px 12px; font-size: 0.68rem; }
  .cv-month-label { font-size: 0.9rem; min-width: 110px; }

  /* Hide desktop grid + side panel on mobile */
  .cv-cal-wrap { display: none !important; }
  .cv-side { display: none !important; }

  /* Show mobile calendar */
  .calendar-mobile { display: block !important; }

  /* Week strip — horizontal scroll at top */
  .cal-week-strip {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 0 0 12px;
    scrollbar-width: none;
    margin-bottom: 16px;
  }
  .cal-week-strip::-webkit-scrollbar { display: none; }

  .cal-strip-day {
    flex-shrink: 0;
    width: 52px;
    border-radius: 10px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: all .15s;
    border: 1px solid rgba(255,255,255,.07);
    background: rgba(255,255,255,.03);
  }
  .cal-strip-day.today {
    background: rgba(124,111,224,.15);
    border-color: rgba(124,111,224,.35);
  }
  .cal-strip-day.has-trades.positive { border-color: rgba(74,222,128,.25); }
  .cal-strip-day.has-trades.negative { border-color: rgba(248,113,113,.2); }
  .cal-strip-day-name { font-size: 9px; color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
  .cal-strip-day-num  { font-size: 16px; font-weight: 500; margin-bottom: 3px; color: var(--text-1); }
  .cal-strip-day-pnl  { font-size: 10px; font-family: var(--fm); font-weight: 600; }

  /* Week accordion rows */
  .cal-week-row {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
  }
  .cal-week-header {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    gap: 12px;
    transition: background .15s;
  }
  .cal-week-header:hover { background: rgba(255,255,255,.04); }
  .cal-week-label { font-size: 11px; color: rgba(255,255,255,.4); flex: 1; }
  .cal-week-pnl   { font-size: 14px; font-weight: 500; font-family: var(--fm); }
  .cal-week-wr    { font-size: 11px; color: rgba(255,255,255,.3); }
  .cal-week-chevron { color: rgba(255,255,255,.25); transition: transform .2s; }
  .cal-week-row.open .cal-week-chevron { transform: rotate(180deg); }
  .cal-week-days  { display: none; border-top: 1px solid rgba(255,255,255,.06); }
  .cal-week-row.open .cal-week-days { display: block; }

  .cal-day-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    cursor: pointer;
    gap: 10px;
    transition: background .12s;
  }
  .cal-day-row:last-child { border-bottom: none; }
  .cal-day-row:hover { background: rgba(255,255,255,.03); }
  .cal-day-date { font-size: 11px; color: rgba(255,255,255,.35); width: 55px; flex-shrink: 0; }
  .cal-day-trades { font-size: 11px; color: rgba(255,255,255,.3); width: 45px; flex-shrink: 0; }
  .cal-day-pnl  { font-size: 13px; font-weight: 500; font-family: var(--fm); flex: 1; }
  .cal-day-wr   { font-size: 11px; color: rgba(255,255,255,.3); }
  .cal-day-tags { display: flex; gap: 4px; }
  .cal-day-tag  { font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
  .cal-tag-breach { background: rgba(248,113,113,.12); color: #F87171; }
  .cal-tag-fomo   { background: rgba(252,211,77,.1);  color: #FCD34D; }
  .cal-tag-best   { background: rgba(74,222,128,.1);  color: #4ADE80; }

  /* Bottom sheet for day detail */
  .cal-bottom-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-top: 1px solid rgba(255,255,255,.1);
    border-radius: 16px 16px 0 0;
    padding: 0;
    z-index: 200;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.16,1,.3,1);
    max-height: 80vh;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .cal-bottom-sheet.open { transform: translateY(0); }
  .cal-sheet-handle {
    width: 36px; height: 4px;
    background: rgba(255,255,255,.15);
    border-radius: 2px;
    margin: 12px auto 16px;
  }
  .cal-sheet-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 199;
    display: none;
  }
  .cal-sheet-overlay.open { display: block; }

  /* Light theme adjustments */
  [data-theme="light"] .cal-strip-day { border-color: rgba(0,0,0,.08); background: rgba(0,0,0,.02); }
  [data-theme="light"] .cal-strip-day.today { background: rgba(124,111,224,.08); border-color: rgba(124,111,224,.25); }
  [data-theme="light"] .cal-strip-day-name { color: rgba(0,0,0,.35); }
  [data-theme="light"] .cal-week-row { border-color: rgba(0,0,0,.08); background: rgba(0,0,0,.02); }
  [data-theme="light"] .cal-week-header:hover { background: rgba(0,0,0,.03); }
  [data-theme="light"] .cal-week-label { color: rgba(0,0,0,.45); }
  [data-theme="light"] .cal-week-wr { color: rgba(0,0,0,.35); }
  [data-theme="light"] .cal-week-chevron { color: rgba(0,0,0,.3); }
  [data-theme="light"] .cal-week-days { border-top-color: rgba(0,0,0,.06); }
  [data-theme="light"] .cal-day-row { border-bottom-color: rgba(0,0,0,.05); }
  [data-theme="light"] .cal-day-row:hover { background: rgba(0,0,0,.02); }
  [data-theme="light"] .cal-day-date { color: rgba(0,0,0,.4); }
  [data-theme="light"] .cal-day-trades { color: rgba(0,0,0,.35); }
  [data-theme="light"] .cal-day-wr { color: rgba(0,0,0,.35); }
  [data-theme="light"] .cal-bottom-sheet { border-top-color: rgba(0,0,0,.1); }
  [data-theme="light"] .cal-sheet-handle { background: rgba(0,0,0,.12); }
}

.cv-cal-wrap { padding: 16px; }
.cv-day-headers {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 4px;
  margin-bottom: 4px;
}
.cv-day-headers div {
  text-align: center; font-size: 0.6rem; font-weight: 700;
  color: var(--text-4); text-transform: uppercase; padding: 6px 0;
}
.cv-weekend-hdr { color: var(--text-4); opacity: 0.5; }
.cv-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }

/* Cells */
.cv-cell {
  min-height: 80px; border-radius: var(--r-sm); padding: 6px 8px;
  cursor: pointer; transition: transform var(--fast), box-shadow var(--fast);
  display: flex; flex-direction: column; position: relative;
  font-size: 0.7rem; background: var(--surface-2); border: 1px solid var(--border);
}
.cv-cell:hover { transform: scale(1.03); box-shadow: 0 4px 16px rgba(0,0,0,0.25); z-index: 2; }
.cv-cell.cv-empty { background: transparent; border-color: transparent; cursor: default; min-height: 0; }
.cv-cell.cv-empty:hover { transform: none; box-shadow: none; }
.cv-cell-empty { background: var(--surface-2); border: 1px solid var(--border); cursor: default; }
.cv-cell-empty .cv-num { color: var(--text-4); }

.cv-num { font-weight: 700; font-size: 0.78rem; color: var(--text-2); }
.cv-badge {
  position: absolute; top: 5px; right: 5px;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.58rem; font-weight: 800; line-height: 1;
}
.cv-pnl { font-family: var(--fm); font-weight: 700; font-size: 0.82rem; margin-top: auto; }
.cv-wr { font-size: 0.58rem; color: var(--text-3); margin-top: 1px; }
.cv-tags { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 3px; }
.cv-tag {
  font-size: 0.5rem; font-weight: 700; padding: 1px 4px; border-radius: 4px;
  line-height: 1.4; text-transform: uppercase; letter-spacing: 0.3px;
}
.cv-tag-breach { background: rgba(232,121,168,0.15); color: var(--red); }
.cv-tag-fomo   { background: rgba(180,160,244,0.15); color: var(--caution); }
.cv-tag-best   { background: rgba(200,241,53,0.15); color: var(--green); }

/* Cell color states */
.cv-green { background: rgba(200,241,53,0.06); border-color: rgba(200,241,53,0.2); }
.cv-green .cv-num { color: var(--green); }
.cv-red { background: rgba(232,121,168,0.06); border-color: rgba(232,121,168,0.2); }
.cv-red .cv-num { color: var(--red); }
.cv-flat { background: var(--surface-2); border-color: var(--border); }
.cv-flat .cv-num { color: var(--text-3); }

.cv-weekend { opacity: 0.35; }
.cv-weekend:hover { opacity: 0.7; }
.cv-today { outline: 2px solid var(--indigo); outline-offset: 1px; }
.cv-future { opacity: 0.15; pointer-events: none; }
.cv-selected { outline: 2px solid var(--indigo); outline-offset: 1px; opacity: 1 !important; }

/* ── Side panel ── */
.cv-side { display: flex; flex-direction: column; gap: 12px; }
.cv-panel-card { padding: 16px; }
.cv-panel-title {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--fh); font-size: 0.85rem; font-weight: 700;
  color: var(--text-2); margin-bottom: 12px;
}
.cv-panel-title .st-icon { width: 16px; height: 16px; stroke-width: 2; color: var(--indigo); }

.cv-stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; font-size: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cv-stat-row:last-child { border-bottom: none; }
.cv-stat-label { color: var(--text-3); }
.cv-stat-val { font-family: var(--fm); font-weight: 600; color: var(--text-1); }

/* Instrument bars */
.cv-mini-bar { margin-bottom: 8px; }
.cv-mini-bar-label { display: flex; justify-content: space-between; font-size: 0.68rem; margin-bottom: 3px; color: var(--text-2); }
.cv-mini-bar-bg { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.cv-mini-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s; }

/* AI insight */
.cv-insight-row { font-size: 0.75rem; line-height: 1.55; color: var(--text-2); }

/* ── Day detail panel ── */
.cv-detail-date { font-family: var(--fh); font-size: 1rem; font-weight: 700; color: var(--text-1); }
.cv-detail-sub { font-size: 0.68rem; color: var(--text-3); margin-top: 2px; }
.cv-detail-pills { display: flex; gap: 10px; margin-bottom: 14px; }
.cv-detail-pill {
  flex: 1; padding: 8px; border-radius: var(--r-sm);
  background: var(--surface-2); text-align: center;
}
.cv-detail-pill-label { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-4); margin-bottom: 3px; }
.cv-detail-pill-val { font-family: var(--fm); font-size: 0.95rem; font-weight: 700; }

.cv-trade-list { display: flex; flex-direction: column; gap: 4px; }
.cv-trade-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 6px;
  background: var(--surface-2); font-size: 0.72rem; transition: background 0.1s;
}
.cv-trade-row:hover { background: rgba(255,255,255,0.06); }
.cv-trade-dir {
  width: 22px; height: 22px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 800; flex-shrink: 0;
}
.cv-dir-long  { background: rgba(200,241,53,0.15); color: var(--green); }
.cv-dir-short { background: rgba(232,121,168,0.15); color: var(--red); }
.cv-trade-inst { font-weight: 600; color: var(--text-1); white-space: nowrap; }
.cv-trade-time { color: var(--text-4); font-family: var(--fm); font-size: 0.65rem; margin-left: auto; }
.cv-trade-pnl { font-family: var(--fm); font-weight: 700; min-width: 60px; text-align: right; }

/* Flags */
.cv-flag-row { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: 0.72rem; color: var(--text-2); line-height: 1.4; }

/* Notes */
.cv-notes-input {
  width: 100%; min-height: 80px; max-height: 200px; resize: vertical;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px; color: var(--text-1); font-family: var(--fb); font-size: 0.75rem;
  line-height: 1.5; transition: border-color 0.15s;
}
.cv-notes-input:focus { outline: none; border-color: var(--indigo); }
.cv-notes-input::placeholder { color: var(--text-4); }
.cv-save-btn {
  margin-top: 8px; width: 100%; padding: 8px;
  background: var(--indigo); color: #fff; border: none; border-radius: var(--r-sm);
  font-family: var(--fb); font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: opacity 0.15s;
}
.cv-save-btn:hover { opacity: 0.85; }
.cv-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── MIRROR MOMENT PAGE (v2) ─────────────── */

/* Skeleton shimmer */
.mr-skel { display: flex; flex-direction: column; gap: 16px; }
.mr-skel-bar {
  border-radius: 8px; height: 18px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: mrShimmer 1.4s infinite;
}
.mr-skel-lg { width: 60%; height: 22px; }
.mr-skel-md { width: 40%; height: 16px; }
.mr-skel-sm { width: 30%; height: 14px; }
.mr-skel-hero {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.07); border-radius: 16px;
  padding: 32px; display: flex; flex-direction: column; gap: 14px;
}
.mr-skel-pills { display: flex; gap: 8px; }
.mr-skel-pill {
  width: 70px; height: 40px; border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%; animation: mrShimmer 1.4s infinite;
}
.mr-skel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mr-skel-card {
  height: 140px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%; animation: mrShimmer 1.4s infinite;
}
@keyframes mrShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Spinner */
.mr-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: #fff;
  border-radius: 50%; animation: mrSpin 0.6s linear infinite;
  vertical-align: middle;
}
@keyframes mrSpin { to { transform: rotate(360deg); } }

/* ─── State 1 + State 3: Empty / Ready ─── */
.empty-wrap {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px; overflow: hidden; max-width: 560px; width: 100%;
  margin: 0 auto;
}
.empty-hero {
  padding: 48px 40px 40px; text-align: center; position: relative;
}
.empty-hero::before {
  content: ''; position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(124,111,224,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.empty-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: rgba(124,111,224,0.12); border: 1px solid rgba(124,111,224,0.2);
  color: var(--indigo);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px; position: relative; z-index: 1;
}
.empty-icon svg { width: 24px; height: 24px; stroke-width: 1.75; }
.empty-title {
  font-family: var(--fh); font-size: 22px; font-weight: 500;
  letter-spacing: -0.02em; color: var(--text-1); margin-bottom: 8px;
  position: relative; z-index: 1;
}
.empty-sub {
  font-size: 14px; color: rgba(255,255,255,0.4); line-height: 1.7;
  max-width: 400px; margin: 0 auto 28px; position: relative; z-index: 1;
}
.empty-sub strong { color: rgba(255,255,255,0.7); font-weight: 500; }

/* Progress bar */
.prog-wrap { max-width: 320px; margin: 0 auto 28px; position: relative; z-index: 1; }
.prog-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.prog-label { font-size: 12px; color: rgba(255,255,255,0.4); }
.prog-val { font-size: 12px; font-weight: 600; color: var(--indigo); }
.prog-track {
  height: 6px; border-radius: 3px; background: rgba(255,255,255,0.06);
  overflow: hidden; margin-bottom: 6px;
}
.prog-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #7C6FE0, #9B8FF0);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.prog-sub {
  font-size: 11px; color: rgba(255,255,255,0.25); text-align: center; margin-top: 6px;
}

/* Generate / Locked button */
.gen-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 10px;
  background: var(--indigo); border: none; color: #fff;
  font-size: 14px; font-weight: 500; cursor: pointer;
  box-shadow: 0 0 24px rgba(124,111,224,0.3);
  transition: all 0.15s; font-family: var(--fb);
  position: relative; z-index: 1;
}
.gen-btn:hover { background: #6B5FD0; box-shadow: 0 0 32px rgba(124,111,224,0.45); transform: translateY(-1px); }
.gen-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.gen-btn.locked {
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.3);
  box-shadow: none; cursor: default;
}
.gen-btn.locked:hover { background: rgba(255,255,255,0.06); transform: none; box-shadow: none; }

/* Preview row (blurred values) */
.empty-preview {
  border-top: 1px solid rgba(255,255,255,0.06); padding: 24px 40px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: rgba(255,255,255,0.04);
}
.prev-item {
  background: var(--surface); padding: 16px 20px; text-align: center;
}
.prev-val {
  font-size: 22px; font-weight: 500; margin-bottom: 4px;
  filter: blur(6px); user-select: none;
}
.prev-val.g { color: #4ADE80; }
.prev-val.r { color: #F87171; }
.prev-val.v { color: var(--indigo); }
.prev-label { font-size: 11px; color: rgba(255,255,255,0.3); margin-bottom: 6px; }
.prev-lock {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 10px; color: rgba(255,255,255,0.2);
}

/* ─── State 2: Full analysis ─── */

/* Header */
.loaded-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.lh-title { font-family: var(--fh); font-size: 15px; font-weight: 500; color: var(--text-1); margin-bottom: 3px; }
.lh-sub { font-size: 12px; color: rgba(255,255,255,0.3); }
.lh-right { display: flex; align-items: center; gap: 8px; }
.quota-pill {
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07);
  font-size: 11px; color: rgba(255,255,255,0.35);
}
.refresh-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  background: rgba(124,111,224,0.12); border: 1px solid rgba(124,111,224,0.2);
  color: var(--indigo); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.15s; font-family: var(--fb);
}
.refresh-btn:hover { background: rgba(124,111,224,0.2); }
.refresh-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Hero card */
.hero-card {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 28px;
  position: relative; overflow: hidden; margin-bottom: 12px;
}
.hc-eyebrow {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.25);
  margin-bottom: 16px; position: relative;
  display: flex; align-items: center; gap: 8px;
}
.hc-eyebrow::before {
  content: ''; width: 16px; height: 1px; background: rgba(255,255,255,0.15);
}
.hc-headline {
  font-size: 20px; font-weight: 400; line-height: 1.5;
  color: rgba(255,255,255,0.85); margin-bottom: 20px;
  max-width: 580px; position: relative;
}
.hc-headline .good { color: #4ADE80; }
.hc-headline .bad { color: #F87171; }
.hc-headline .quote {
  display: block; font-size: 14px; color: rgba(255,255,255,0.35);
  margin-top: 10px; font-style: italic;
}

/* Stat pills */
.stat-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0;
  position: relative;
}
.stat-pill {
  padding: 10px 16px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  text-align: center;
}
.sp-val {
  font-family: var(--fm); font-size: 16px; font-weight: 500;
  line-height: 1; margin-bottom: 3px; color: var(--text-1); display: block;
}
.sp-lbl {
  font-size: 10px; color: rgba(255,255,255,0.3);
  text-transform: uppercase; letter-spacing: 0.06em; display: block;
}

/* DNA text */
.hc-dna {
  border-top: 1px solid rgba(255,255,255,0.06); margin-top: 20px; padding-top: 18px;
  font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.75;
  max-width: 680px; position: relative;
}
.hc-dna strong { color: rgba(255,255,255,0.82); font-weight: 500; }

/* Pattern cards grid */
.patterns-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 12px;
}
.pc {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px; padding: 18px;
}
.pc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pc-num {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: rgba(255,255,255,0.25);
}
.pc-badge {
  padding: 2px 8px; border-radius: 999px;
  font-size: 9px; font-weight: 700;
}
.pc-badge-high { background: rgba(248,113,113,0.15); color: #F87171; border: 1px solid rgba(248,113,113,0.25); }
.pc-badge-med { background: rgba(252,211,77,0.12); color: #FCD34D; border: 1px solid rgba(252,211,77,0.2); }
.pc-badge-pos { background: rgba(74,222,128,0.12); color: #4ADE80; border: 1px solid rgba(74,222,128,0.2); }
.pc-title {
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.85);
  margin-bottom: 7px;
}
.pc-body {
  font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.65; margin-bottom: 12px;
}
.pc-rule {
  background: rgba(255,255,255,0.04); border-radius: 7px;
  padding: 9px 11px; font-size: 11px; color: rgba(255,255,255,0.4); line-height: 1.6;
}
.pc-rule strong { color: rgba(255,255,255,0.7); font-weight: 500; }

/* Bar charts section */
.bar-card {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px; padding: 18px;
}
.bar-clabel {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.09em; color: rgba(255,255,255,0.25);
  margin-bottom: 12px; display: block;
}
.br { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.br-name { font-size: 12px; color: rgba(255,255,255,0.45); width: 90px; flex-shrink: 0; }
.br-track {
  flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.br-fill { height: 4px; border-radius: 2px; transition: width 0.5s; }
.br-val { font-family: var(--fm); font-size: 11px; min-width: 32px; text-align: right; }

/* Responsive */
@media (max-width: 768px) {
  .patterns-grid { grid-template-columns: 1fr; }
  .loaded-header { flex-direction: column; align-items: flex-start; }
  .hc-headline { font-size: 1rem; }
  .stat-row { gap: 6px; }
  .empty-preview { grid-template-columns: 1fr; gap: 0; padding: 16px 20px; }
  .empty-hero { padding: 32px 24px; }
}

/* ── MOBILE NAV ──────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 50;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}
.mob-nav-inner { display: flex; justify-content: space-around; }
.mob-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 4px 16px; cursor: pointer;
  font-size: 0.58rem; font-weight: 600;
  color: var(--text-3); text-transform: uppercase;
  letter-spacing: 0.06em; transition: color var(--fast);
}
.mob-item.active { color: var(--indigo); }

/* Legacy mobile nav */
.mn-item {
  display: flex; flex-direction: column; align-items: center;
  font-size: 0.6rem; color: var(--text-3); cursor: pointer; padding: 4px;
}
.mn-item .icon { margin-bottom: 2px; }
.mn-item.active { color: var(--indigo); }

@media (max-width: 768px) {
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; transform: translateX(-100%); }
  .mobile-nav { display: flex; justify-content: space-around; }
  .page-content { padding: 20px 16px 80px; }
  .topbar { padding: 0 16px; }
  .mh-numbers { flex-direction: column; gap: 12px; }
}

/* ── ROADMAP ──────────────────────────────── */
.rm-progress-hero{background:#13131F;border:1px solid rgba(255,255,255,.07);border-radius:14px;padding:24px 28px;margin-bottom:20px;display:flex;align-items:center;gap:24px}
.rph-ring{flex-shrink:0;position:relative;width:72px;height:72px}
.rph-ring svg{transform:rotate(-90deg)}
.rph-ring-num{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.rph-ring-val{font-size:18px;font-weight:500;line-height:1}
.rph-ring-lbl{font-size:9px;color:rgba(255,255,255,.3);text-transform:uppercase;letter-spacing:.06em;margin-top:2px}
.rph-body{flex:1}
.rph-phase{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:#7C6FE0;margin-bottom:4px}
.rph-title{font-size:16px;font-weight:500;margin-bottom:6px}
.rph-sub{font-size:12px;color:rgba(255,255,255,.35);line-height:1.6;margin-bottom:12px}
.rph-track{height:4px;background:rgba(255,255,255,.06);border-radius:2px;overflow:hidden}
.rph-fill{height:4px;border-radius:2px;background:linear-gradient(90deg,#7C6FE0,#9B8FF0)}
.rph-track-label{display:flex;justify-content:space-between;margin-top:5px;font-size:10px;color:rgba(255,255,255,.25)}
.phase-tabs{display:flex;gap:6px;margin-bottom:20px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
.phase-tabs::-webkit-scrollbar{display:none}
.phase-tab{padding:7px 16px;border-radius:999px;border:1px solid rgba(255,255,255,.08);background:transparent;color:rgba(255,255,255,.35);font-size:12px;font-weight:500;cursor:pointer;font-family:inherit;white-space:nowrap;transition:all .15s;flex-shrink:0}
.phase-tab:hover{border-color:rgba(255,255,255,.15);color:rgba(255,255,255,.6)}
.phase-tab.active{background:rgba(124,111,224,.15);border-color:rgba(124,111,224,.3);color:#7C6FE0}
.phase-tab.done{background:rgba(74,222,128,.08);border-color:rgba(74,222,128,.2);color:#4ADE80}
.rm-layout{display:grid;grid-template-columns:1fr 240px;gap:16px;align-items:start}
.steps-list{display:flex;flex-direction:column;gap:0}
.step{display:flex;gap:16px;position:relative}
.step:not(:last-child) .step-connector{position:absolute;left:19px;top:40px;bottom:0;width:1px;background:rgba(255,255,255,.06)}
.step-left{flex-shrink:0;z-index:1}
.step-node{width:38px;height:38px;border-radius:50%;border:1.5px solid rgba(255,255,255,.1);background:#13131F;display:flex;align-items:center;justify-content:center;transition:all .2s}
.step-node.done{background:rgba(74,222,128,.12);border-color:rgba(74,222,128,.3)}
.step-node.active{background:rgba(124,111,224,.15);border-color:rgba(124,111,224,.4);box-shadow:0 0 16px rgba(124,111,224,.2)}
.step-node.locked{opacity:.35}
.step-body{padding-bottom:20px;flex:1;min-width:0}
.step-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:6px}
.step-num{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:rgba(255,255,255,.2);margin-bottom:3px}
.step-title{font-size:14px;font-weight:500;color:rgba(255,255,255,.85)}
.step-title.locked{color:rgba(255,255,255,.25)}
.step-badge{font-size:9px;padding:2px 8px;border-radius:999px;font-weight:700;flex-shrink:0;margin-top:3px}
.sb-done{background:rgba(74,222,128,.12);color:#4ADE80;border:1px solid rgba(74,222,128,.2)}
.sb-active{background:rgba(124,111,224,.12);color:#7C6FE0;border:1px solid rgba(124,111,224,.2)}
.sb-locked{background:rgba(255,255,255,.04);color:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.07)}
.step-desc{font-size:12px;color:rgba(255,255,255,.35);line-height:1.65;margin-bottom:10px}
.step-data{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06);border-left:2px solid #7C6FE0;border-radius:0 8px 8px 0;padding:10px 14px;margin-bottom:10px;font-size:12px;color:rgba(255,255,255,.45);line-height:1.65}
.step-data strong{color:rgba(255,255,255,.75);font-weight:500}
.step-tasks{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.task{display:flex;align-items:center;gap:8px;font-size:12px;color:rgba(255,255,255,.5)}
.task.done{color:rgba(255,255,255,.2);text-decoration:line-through}
.task-box{width:16px;height:16px;border-radius:4px;border:1.5px solid rgba(255,255,255,.15);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.task-box.done{background:rgba(74,222,128,.15);border-color:rgba(74,222,128,.3)}
.step-action{padding:8px 14px;border-radius:8px;background:rgba(124,111,224,.12);border:1px solid rgba(124,111,224,.2);color:#7C6FE0;font-size:12px;font-weight:500;cursor:pointer;font-family:inherit;transition:all .15s;display:inline-flex;align-items:center;gap:6px}
.step-action:hover{background:rgba(124,111,224,.2)}
.rm-stat-card{background:#13131F;border:1px solid rgba(255,255,255,.07);border-radius:12px;padding:16px;margin-bottom:10px}
.rm-stat-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.09em;color:rgba(255,255,255,.25);margin-bottom:10px}
.unlock-row{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:.5px solid rgba(255,255,255,.05);font-size:12px;color:rgba(255,255,255,.4)}
.unlock-row:last-child{border-bottom:none}
.unlock-icon{width:24px;height:24px;border-radius:6px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:11px}
@media(max-width:768px){
  .rm-layout{grid-template-columns:1fr;gap:20px}
  .rm-progress-hero{flex-direction:column;text-align:center;padding:20px 16px;gap:16px}
  .rph-ring{width:60px;height:60px}
  .rph-ring svg{width:60px;height:60px}
  .rph-ring-val{font-size:15px}
  .rph-body{width:100%}
  .rph-title{font-size:14px}
  .rph-sub{font-size:11px}
  .phase-tabs{gap:6px;padding:0 0 6px;margin-bottom:16px;flex-wrap:wrap;overflow:visible}
  .phase-tab{padding:6px 12px;font-size:11px;flex-shrink:0}
  .steps-list{gap:0}
  .step{gap:12px}
  .step-node{width:32px;height:32px}
  .step:not(:last-child) .step-connector{left:15px;top:34px}
  .step-body{padding-bottom:16px;overflow:hidden;word-wrap:break-word}
  .step-header{flex-direction:column;align-items:flex-start;gap:4px}
  .step-num{font-size:9px}
  .step-title{font-size:13px}
  .step-badge{font-size:8px;padding:2px 6px;margin-top:2px}
  .step-desc{font-size:11px;line-height:1.6}
  .step-data{padding:8px 10px;font-size:11px;line-height:1.6;word-break:break-word}
  .step-tasks{gap:5px}
  .task{font-size:11px}
  .task-box{width:14px;height:14px}
  .step-action{padding:7px 12px;font-size:11px;width:100%;justify-content:center}
  .rm-stat-card{padding:14px}
  .rm-stat-label{font-size:9px;margin-bottom:8px}
  .unlock-row{font-size:11px;padding:6px 0}
  .unlock-icon{width:20px;height:20px;border-radius:5px}
}

/* ── PREMIUM SELECT DROPDOWN ─────────────── */
.card:has(.premium-select) { position: relative; z-index: 50; overflow: visible; }
.premium-select { position: relative; z-index: 100; }
.ps-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--fh);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-1);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  min-width: 160px;
}
.ps-trigger:hover { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-ring); }
.ps-trigger.open { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-ring); background: var(--surface-2); }
.ps-chevron { transition: transform 0.2s; margin-left: auto; opacity: 0.5; }
.ps-trigger.open .ps-chevron { transform: rotate(180deg); }
.ps-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 200px;
  z-index: 999;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.15);
  padding: 6px;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.ps-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.ps-dropdown-lg { max-height: 340px; overflow-y: auto; min-width: 220px; }
.ps-group-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); padding: 10px 12px 4px; }
.ps-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.ps-option:hover { background: var(--surface-2); color: var(--text-1); }
.ps-option.active { background: var(--indigo-dim, rgba(124,111,224,0.1)); color: var(--indigo); font-weight: 600; }
.ps-option .icon-sm { opacity: 0.5; }
.ps-option.active .icon-sm { opacity: 1; color: var(--indigo); }

/* ── STATISTICS PAGE ─────────────────────── */
.st-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.st-page-title { font-family: var(--fh); font-size: 1.5rem; font-weight: 700; }
.st-page-sub { font-size: 0.78rem; color: var(--text-3); margin-top: 2px; }
.st-small { font-size: 0.7rem; color: var(--text-3); font-weight: 400; }

/* KPI Strip */
.st-kpi-strip {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px;
  margin-bottom: 20px;
}
.st-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 12px;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.st-kpi:hover { border-color: var(--border-2); box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.st-kpi-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}
.st-kpi-label { font-size: 0.63rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.st-pos { color: var(--green); }
.st-neg { color: var(--red); }

/* Card heads */
.st-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.st-card-title { display: flex; align-items: center; gap: 8px; font-family: var(--fh); font-size: 0.88rem; font-weight: 600; }
.st-card-full { }
.st-card-full canvas, .card canvas { max-height: 300px !important; }
.st-icon { width: 16px; height: 16px; color: var(--indigo); stroke-width: 1.75; }
.st-tag {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700;
  padding: 4px 10px; border-radius: 6px;
  background: var(--indigo-dim); color: var(--indigo);
}
.st-tag.st-pos { background: var(--green-dim); color: var(--green); }
.st-tag.st-neg { background: var(--red-dim); color: var(--red); }

/* Instrument horizontal bars */
.st-instr-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.st-instr-row:last-child { border-bottom: none; }
.st-instr-name { width: 70px; font-size: 0.72rem; font-weight: 600; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-instr-bar-wrap { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.st-instr-bar { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.st-bar-pos { background: var(--green); }
.st-bar-neg { background: var(--red); }
.st-instr-val { width: 72px; text-align: right; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; flex-shrink: 0; }
.st-instr-wr { width: 36px; text-align: right; font-size: 0.65rem; color: var(--text-3); flex-shrink: 0; }

/* Hourly heatmap grid */
.st-hourly-grid { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
.st-heat-cell {
  width: 52px; padding: 8px 4px; border-radius: 6px; text-align: center; cursor: default;
  transition: transform 0.12s;
}
.st-heat-cell:hover { transform: scale(1.08); }
.st-heat-pos { background: rgba(200,241,53, calc(0.08 + var(--intensity) * 0.25)); }
.st-heat-neg { background: rgba(232,121,168, calc(0.08 + var(--intensity) * 0.25)); }
.st-heat-hour { font-size: 0.6rem; font-weight: 700; color: var(--text-3); margin-bottom: 2px; }
.st-heat-val { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600; }
.st-heat-pos .st-heat-val { color: var(--green); }
.st-heat-neg .st-heat-val { color: var(--red); }

/* Streak map */
.st-streak-map { display: flex; flex-wrap: wrap; gap: 3px; align-items: flex-end; min-height: 160px; align-content: flex-end; }
.st-streak-bar {
  height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700; min-width: 20px;
  transition: transform 0.12s;
}
.st-streak-bar:hover { transform: scaleY(1.15); }
/* ── AI INSIGHT BANNER ────────────────────── */
.st-insight-card {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 0.5px solid var(--indigo-glow);
  margin-bottom: 16px;
}
.st-insight-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.68rem; padding: 2px 8px; border-radius: 20px;
  background: var(--indigo-dim); color: var(--indigo);
  border: 0.5px solid var(--indigo-ring); margin-bottom: 10px;
}
.st-insight-text { font-size: 0.85rem; color: var(--text-2); line-height: 1.6; }
.st-insight-pos { color: var(--green); font-weight: 600; }
.st-insight-neg { color: var(--caution); font-weight: 600; }

/* ── INSIGHT PILLS ────────────────────────── */
.st-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; padding: 3px 8px; border-radius: 20px;
  margin: 3px 3px 0 0; font-family: var(--font-body);
}
.st-pill-good { background: var(--profit-bg); color: var(--green); border: 0.5px solid var(--profit-border); }
.st-pill-bad  { background: var(--loss-bg);   color: var(--red);   border: 0.5px solid var(--loss-border); }
.st-pill-warn { background: var(--caution-bg); color: var(--caution); border: 0.5px solid var(--caution-border); }
.st-pills-row { margin-top: 10px; padding-top: 10px; border-top: 0.5px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px; }

/* ── LEGEND DOTS ──────────────────────────── */
.st-legend-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.st-legend-pos { background: var(--green); }
.st-legend-neg { background: var(--red); }

/* ── HOUR HEATMAP — 24 cell grid ──────────── */
.st-hour-grid { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.st-hcell {
  height: 36px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.58rem; cursor: pointer; transition: opacity 0.15s;
  position: relative;
}
.st-hcell:hover { opacity: 0.8; }
.st-hcell-tt {
  display: none; position: absolute; background: var(--surface-2);
  border: 0.5px solid var(--border-2); border-radius: 6px;
  padding: 6px 10px; font-size: 0.72rem; color: var(--text-1);
  white-space: nowrap; z-index: 10; bottom: calc(100% + 6px);
  left: 50%; transform: translateX(-50%); pointer-events: none;
}
.st-hcell:hover .st-hcell-tt { display: block; }
.st-hour-labels { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; margin-top: 4px; }
.st-hlabel { font-size: 0.58rem; color: var(--text-3); text-align: center; }
.st-hour-stats, .st-streak-stats {
  display: flex; gap: 20px; margin-top: 14px; padding-top: 12px;
  border-top: 0.5px solid var(--border); flex-wrap: wrap; align-items: center;
}
.st-stat-sm-label { font-size: 0.65rem; color: var(--text-3); }
.st-stat-sm-val { font-size: 0.85rem; font-weight: 600; }
.st-stat-sm-sub { font-size: 0.65rem; font-weight: 400; color: var(--text-3); }

/* ── DAY OF WEEK BARS ─────────────────────── */
.st-day-bars-inner { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.st-day-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.st-day-bar {
  width: 100%; border-radius: 4px 4px 0 0;
  transition: opacity 0.15s; cursor: pointer; position: relative;
}
.st-day-bar:hover { opacity: 0.8; }
.st-day-bar .st-hcell-tt { bottom: calc(100% + 6px); }
.st-day-bar:hover .st-hcell-tt { display: block; }
.st-day-name { font-size: 0.68rem; color: var(--text-3); }
.st-day-wr { font-size: 0.6rem; font-weight: 600; }

/* ── EMOTIONAL / HOLD TIME BARS ───────────── */
.st-emo-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.st-emo-label { font-size: 0.72rem; color: var(--text-2); width: 72px; flex-shrink: 0; text-transform: capitalize; }
.st-emo-bar-bg { flex: 1; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.st-emo-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.st-emo-wr { font-size: 0.72rem; font-weight: 600; width: 36px; text-align: right; flex-shrink: 0; }
.st-emo-n { font-size: 0.65rem; color: var(--text-3); width: 28px; text-align: right; flex-shrink: 0; }

/* ── TRADE QUALITY ROWS ───────────────────── */
.st-qrow {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px; background: var(--bg); border-radius: 6px; margin-bottom: 8px;
}
.st-qrow:last-child { margin-bottom: 0; }

/* ── DAILY P&L DISTRIBUTION BOXES ─────────── */
.st-daily-boxes { display: flex; gap: 14px; margin-bottom: 12px; }
.st-daily-box {
  text-align: center; flex: 1; padding: 10px;
  background: var(--bg); border-radius: 6px;
}
.st-daily-box-num { font-size: 1.25rem; font-weight: 700; font-family: var(--font-mono); }
.st-daily-box-label { font-size: 0.65rem; color: var(--text-3); }
.st-daily-box-avg { font-size: 0.72rem; font-family: var(--font-mono); }

/* ── STREAK GRID CELLS ────────────────────── */
.st-streak-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.st-scell {
  width: 28px; height: 28px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.58rem; font-weight: 600; font-family: var(--font-mono);
  cursor: pointer;
}
.st-scell-w { background: var(--profit-bg); color: var(--green); border: 0.5px solid var(--profit-border); }
.st-scell-l { background: var(--loss-bg); color: var(--red); border: 0.5px solid var(--loss-border); }

/* ── CALLOUT WARNING ──────────────────────── */
.st-callout-warn {
  margin-top: 12px; padding: 10px; background: var(--bg);
  border-radius: 6px; font-size: 0.72rem; color: var(--caution);
  border: 0.5px solid var(--caution-border);
}

/* ── EMPTY MINI ───────────────────────────── */
.st-empty-mini {
  text-align: center; padding: 24px; font-size: 0.78rem;
  color: var(--text-3);
}

/* ── PSYCHOLOGY PAGE ─────────────────────── */
.psy-icon { width: 14px; height: 14px; color: var(--indigo); stroke-width: 1.75; }

/* Heatmap */
.psy-hm-header { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-bottom: 3px; }
.psy-hm-lbl { font-size: 0.62rem; color: var(--text-3); text-align: center; font-weight: 600; }
.psy-hm-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.psy-hm-cell {
  aspect-ratio: 1; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700; font-family: var(--fm);
}

/* Pattern cards */
.psy-pattern { padding: 14px 0; }
.psy-pattern-border { border-bottom: 0.5px solid var(--border); }

/* Responsive */
@media (max-width: 1100px) {
  #psy-kpis { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 640px) {
  #psy-kpis { grid-template-columns: 1fr !important; }
  .psy-hm-grid { gap: 2px; }
  .psy-hm-cell { font-size: 0.58rem; }
}

/* Responsive */
@media (max-width: 1100px) { .st-kpi-strip { grid-template-columns: repeat(4, 1fr); } .st-hour-grid, .st-hour-labels { grid-template-columns: repeat(12, 1fr); } }
@media (max-width: 640px) { .st-kpi-strip { grid-template-columns: repeat(2, 1fr); } .st-header { flex-direction: column; align-items: flex-start; } .st-hour-grid, .st-hour-labels { grid-template-columns: repeat(8, 1fr); } .st-daily-boxes { flex-direction: column; } }

/* ══════════════════════════════════════════════
   DARK-FIRST OVERRIDES — final authority
   ══════════════════════════════════════════════ */

/* === BASE === */
html, body { background: var(--bg) !important; color: var(--text-1) !important; font-family: var(--font-body); }

/* === SIDEBAR === */
.sidebar {
  background: #0F0F24 !important;
  border-right: 1px solid var(--border) !important;
  width: 64px !important;
  min-width: 64px !important;
}
.sidebar.expanded { width: 210px !important; min-width: 210px !important; }
.nav-item { color: var(--text-3) !important; border-radius: var(--r-sm); }
.nav-item:hover { background: var(--surface-2) !important; color: var(--text-2) !important; }
.nav-item.active { background: var(--indigo-dim) !important; color: var(--indigo) !important; }
.nav-item.active::before { background: var(--indigo) !important; }
.nav-mirror { background: var(--indigo-dim) !important; border: 1px solid var(--indigo-glow) !important; color: var(--indigo) !important; }
.sidebar-section-label, .sb-section { color: var(--text-4) !important; }

/* === TOPBAR === */
.topbar { background: #0F0F24 !important; border-bottom: 1px solid var(--border) !important; }
.page-title, .tb-title { font-family: var(--font-head) !important; font-size: 1.4rem !important; font-weight: 600 !important; color: var(--text-1) !important; letter-spacing: -0.03em !important; }
.page-sub, .tb-sub, .topbar-date { color: var(--text-3) !important; font-size: 0.75rem !important; }

/* Ticker */
.ticker-label  { color: var(--text-3) !important; }
.ticker-price  { color: var(--text-1) !important; font-family: var(--font-mono) !important; }
.ticker-change.up   { color: var(--green) !important; }
.ticker-change.down { color: var(--red)   !important; }
.ticker-divider { background: var(--border) !important; }

/* Log Trade button */
.btn-log-trade {
  background: var(--indigo) !important;
  color: #fff !important;
  box-shadow: 0 0 20px var(--indigo-glow) !important;
  border: none !important;
}
.btn-log-trade:hover { background: #6B5FD0 !important; box-shadow: 0 0 28px var(--indigo-glow) !important; }

/* Topbar icon buttons */
.tb-icon-btn {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-3) !important;
}
.tb-icon-btn:hover { background: var(--surface-2) !important; color: var(--text-1) !important; }

/* === KPI CARDS === */
.kpi-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r) !important;
  padding: 22px 22px 18px !important;
  position: relative !important;
}
.kpi-card:hover { border-color: var(--border-2) !important; box-shadow: 0 4px 24px rgba(0,0,0,0.4) !important; }
.kpi-icon-wrap { display: none !important; }
/* KPI accent bars — unified purple tones */
.kpi-accent-green::after  { background: var(--green) !important; }
.kpi-accent-indigo::after { background: var(--indigo) !important; }
.kpi-accent-gold::after   { background: var(--gold) !important; }
.kpi-accent-red::after    { background: var(--red) !important; }
.kpi-card-label {
  font-size: 0.6rem !important; font-weight: 700 !important;
  text-transform: uppercase !important; letter-spacing: 0.1em !important;
  color: var(--text-3) !important; font-family: var(--font-body) !important;
}
.kpi-card-value {
  font-family: var(--font-head) !important;
  font-size: 2rem !important; font-weight: 600 !important;
  color: var(--text-1) !important; letter-spacing: -0.03em !important;
}
.kpi-card-value .decimal {
  font-size: 1.2rem !important; font-weight: 400 !important;
  color: var(--text-2) !important;
}
.kpi-card-sub { color: var(--text-3) !important; font-family: var(--font-mono) !important; }
/* KPI card icon — middle-right */
.kpi-card-icon {
  position: absolute !important;
  right: 18px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 38px !important; height: 38px !important;
  border-radius: var(--r-sm) !important;
  background: var(--surface-2) !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  color: var(--text-3) !important;
}
.kpi-card-icon svg { width: 18px !important; height: 18px !important; stroke-width: 1.75 !important; }
.kpi-accent-green .kpi-card-icon  { color: var(--green) !important; background: var(--green-dim) !important; }
.kpi-accent-indigo .kpi-card-icon { color: var(--indigo) !important; background: var(--indigo-dim) !important; }
.kpi-accent-gold .kpi-card-icon   { color: var(--gold) !important; background: var(--gold-dim) !important; }
.kpi-accent-red .kpi-card-icon    { color: var(--red) !important; background: var(--red-dim) !important; }

/* === CHART CARDS === */
.chart-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r) !important;
}
.chart-card:hover { border-color: var(--border-2) !important; box-shadow: 0 4px 24px rgba(0,0,0,0.4) !important; }
.chart-card-label { color: var(--text-3) !important; font-size: 0.6rem !important; text-transform: uppercase !important; letter-spacing: 0.1em !important; }
.time-btn { color: var(--text-3) !important; background: transparent !important; border: none !important; }
.time-btn:hover { background: var(--surface-2) !important; color: var(--text-2) !important; }
.time-btn.active { background: var(--surface-3) !important; color: var(--text-1) !important; }

/* === DEMO BANNER === */
.demo-banner {
  background: var(--indigo-dim) !important;
  border: 1px solid var(--indigo-glow) !important;
  color: var(--text-2) !important;
}
.demo-banner strong { color: var(--text-1) !important; }

/* === MIRROR STRIP === */
.mirror-strip-inner {
  background: var(--surface) !important;
  border-left: 3px solid var(--indigo) !important;
  border-top: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
}
.mirror-strip-badge { color: var(--indigo) !important; }
.mirror-strip-text  { color: var(--text-2) !important; }

/* === UPGRADE CARD === */
.upgrade-card {
  background: var(--indigo-dim) !important;
  border: 1px solid var(--indigo-glow) !important;
}
.uc-title, .upgrade-card-title { color: var(--indigo) !important; }
.uc-sub, .upgrade-card-sub     { color: var(--text-3) !important; }

/* === USER ROW === */
.avatar { background: var(--surface-2) !important; color: var(--text-2) !important; }
.user-name { color: var(--text-1) !important; }
.user-plan { color: var(--text-3) !important; }
.tb-avatar { background: var(--surface-2) !important; color: var(--text-2) !important; }

/* === USER DROPDOWN === */
.user-dropdown {
  background: var(--surface) !important;
  border: 1px solid var(--border-2) !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5) !important;
}
.ud-name { color: var(--text-1) !important; }
.ud-email { color: var(--text-3) !important; }
.ud-divider { background: var(--border) !important; }
.ud-item { color: var(--text-2) !important; }
.ud-item:hover { background: var(--surface-2) !important; color: var(--text-1) !important; }
.ud-item svg { color: var(--text-3) !important; }
.ud-item:hover svg { color: var(--text-2) !important; }
.ud-item-danger { color: var(--red) !important; }
.ud-item-danger:hover { background: var(--red-dim) !important; }
.ud-item-danger svg { color: var(--red) !important; }
.ud-plan-badge { background: var(--surface-2) !important; color: var(--text-3) !important; }

/* === SIGN OUT MODAL === */
.signout-overlay { background: rgba(0,0,0,0.6) !important; }
.signout-modal {
  background: var(--surface) !important;
  border: 1px solid var(--border-2) !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5) !important;
}
.signout-icon { background: var(--red-dim) !important; color: var(--red) !important; }
.signout-title { color: var(--text-1) !important; }
.signout-sub { color: var(--text-3) !important; }
.btn-signout-cancel {
  background: var(--surface-2) !important; border: 1px solid var(--border) !important; color: var(--text-2) !important;
}
.btn-signout-cancel:hover { background: var(--surface-3) !important; color: var(--text-1) !important; }

/* === EMPTY STATES === */
.empty-title { color: var(--text-2) !important; }
.empty-sub   { color: var(--text-3) !important; }
.empty-icon-svg { color: var(--text-4) !important; }

/* === RECENT TRADES === */
.trade-row { border-bottom-color: var(--border) !important; }
.trade-row:hover { background: var(--surface-2) !important; }
.trade-date { color: var(--text-3) !important; }
.trade-instrument { color: var(--text-1) !important; }
.trade-setup { color: var(--text-3) !important; }
.dir-long  { background: var(--green-dim) !important; color: var(--green) !important; border-color: rgba(200,241,53,0.20) !important; }
.dir-short { background: var(--red-dim) !important; color: var(--red) !important; border-color: rgba(232,121,168,0.20) !important; }
.trade-pnl.pnl-pos { color: var(--green) !important; }
.trade-pnl.pnl-neg { color: var(--red) !important; }

/* === SKELETON === */
.skeleton {
  background: linear-gradient(90deg, #1A1A32 25%, #22223C 50%, #1A1A32 75%) !important;
  background-size: 200% 100% !important;
}

/* === PAGE CONTENT === */
.page-content { background: var(--bg) !important; }
.page-loading { color: var(--text-3) !important; }

/* === IMPORT MODAL === */
.import-box { background: var(--surface) !important; border: 1px solid var(--border-2) !important; box-shadow: 0 24px 64px rgba(0,0,0,0.5) !important; }
.import-title { color: var(--text-1) !important; }
.import-close { color: var(--text-3) !important; }
.import-close:hover { color: var(--text-1) !important; }
.import-sub { color: var(--text-3) !important; }
.import-dropzone { border-color: var(--border-2) !important; }
.import-dropzone:hover, .import-dropzone.dragover { border-color: var(--indigo) !important; background: var(--indigo-dim) !important; }
.import-stat { background: var(--surface-2) !important; }
.import-stat-val { color: var(--text-1) !important; }
.import-stat-lbl { color: var(--text-3) !important; }
.import-preview-table th { color: var(--text-3) !important; }
.import-preview-table td { color: var(--text-2) !important; }
.import-preview-table tr + tr { border-top-color: var(--border) !important; }

/* === MODAL (trade log) === */
.modal { background: var(--surface) !important; border: 1px solid var(--border-2) !important; }
.modal-title { color: var(--text-1) !important; }
.modal-close { color: var(--text-3) !important; }
.modal-close:hover { color: var(--text-1) !important; }

/* === SB BOTTOM === */
.sb-bottom { border-top-color: var(--border) !important; }
.sb-collapse { border-color: var(--border) !important; color: var(--text-3) !important; }
.sb-collapse:hover { background: var(--surface-2) !important; color: var(--text-1) !important; }

.sb-collapse:hover { background: var(--surface-2) !important; color: var(--text-1) !important; }

/* ============================================
   LIGHT MODE — complete override
   Do NOT modify dark mode styles above this
   ============================================ */

html[data-theme="light"] body,
html[data-theme="light"] .page-wrapper,
html[data-theme="light"] #app {
  background: #F5F4F0 !important;
  color: #1A1917 !important;
}

/* ── SIDEBAR ── */
html[data-theme="light"] .sidebar {
  background: #FAFAF8 !important;
  border-right: 1px solid #E2DED7 !important;
}
html[data-theme="light"] .sidebar * {
  color: #5C5854 !important;
}
html[data-theme="light"] .nav-item {
  color: #9C9890 !important;
  background: transparent !important;
}
html[data-theme="light"] .nav-item:hover {
  background: #F0EEE9 !important;
  color: #1A1917 !important;
}
html[data-theme="light"] .nav-item.active {
  background: rgba(79,70,229,0.08) !important;
  color: #4F46E5 !important;
}
html[data-theme="light"] .nav-item.active::before {
  background: #4F46E5 !important;
}
html[data-theme="light"] .sidebar-section-label,
html[data-theme="light"] .sb-section {
  color: #C4C0B8 !important;
}
html[data-theme="light"] .sb-user-name {
  color: #1A1917 !important;
}
html[data-theme="light"] .sb-user-plan {
  color: #9C9890 !important;
}
html[data-theme="light"] .upgrade-card {
  background: rgba(79,70,229,0.07) !important;
  border: 1px solid rgba(79,70,229,0.15) !important;
}
html[data-theme="light"] .upgrade-card-title {
  color: #4F46E5 !important;
}
html[data-theme="light"] .upgrade-card-sub {
  color: #9C9890 !important;
}

/* ── TOPBAR ── */
html[data-theme="light"] .topbar {
  background: #FAFAF8 !important;
  border-bottom: 1px solid #E2DED7 !important;
  box-shadow: 0 1px 0 #E2DED7 !important;
}
html[data-theme="light"] .page-title {
  color: #1A1917 !important;
}
html[data-theme="light"] .page-sub {
  color: #9C9890 !important;
}
html[data-theme="light"] .ticker-label {
  color: #9C9890 !important;
}
html[data-theme="light"] .ticker-price {
  color: #1A1917 !important;
}
html[data-theme="light"] .ticker-divider {
  background: #E2DED7 !important;
}
html[data-theme="light"] .tb-icon-btn,
html[data-theme="light"] .tb-btn {
  background: #FFFFFF !important;
  border: 1px solid #E2DED7 !important;
  color: #9C9890 !important;
}
html[data-theme="light"] .tb-icon-btn:hover,
html[data-theme="light"] .tb-btn:hover {
  background: #F0EEE9 !important;
  color: #1A1917 !important;
}
html[data-theme="light"] .btn-log-trade {
  background: #4F46E5 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25) !important;
}

/* ── KPI CARDS ── */
html[data-theme="light"] .kpi-card,
html[data-theme="light"] [class*="kpi-card"] {
  background: #FFFFFF !important;
  border: 1px solid #E2DED7 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 2px 8px rgba(0,0,0,0.03) !important;
}
html[data-theme="light"] .kpi-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
}
html[data-theme="light"] .kpi-label,
html[data-theme="light"] .card-title,
html[data-theme="light"] [class*="kpi-label"] {
  color: #9C9890 !important;
}
html[data-theme="light"] .kpi-value,
html[data-theme="light"] .card-value,
html[data-theme="light"] [class*="kpi-val"] {
  color: #1A1917 !important;
}
html[data-theme="light"] .kpi-sub,
html[data-theme="light"] .card-sub {
  color: #9C9890 !important;
}
html[data-theme="light"] .kpi-value .decimal {
  color: #9C9890 !important;
}
html[data-theme="light"] .kpi-icon-wrap,
html[data-theme="light"] [class*="kpi-icon"] {
  display: none !important;
}
/* KPI accent bars */
html[data-theme="light"] .kpi-accent-green::after { background: #059669 !important; }
html[data-theme="light"] .kpi-accent-indigo::after { background: #4F46E5 !important; }
html[data-theme="light"] .kpi-accent-gold::after { background: #B45309 !important; }
html[data-theme="light"] .kpi-accent-red::after { background: #DC2626 !important; }

/* ── CHART CARDS ── */
html[data-theme="light"] .chart-card,
html[data-theme="light"] [class*="chart-card"] {
  background: #FFFFFF !important;
  border: 1px solid #E2DED7 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}
html[data-theme="light"] .chart-card-label,
html[data-theme="light"] [class*="chart-label"] {
  color: #9C9890 !important;
}
html[data-theme="light"] .time-btn {
  color: #9C9890 !important;
  background: transparent !important;
  border: none !important;
}
html[data-theme="light"] .time-btn:hover {
  background: #F0EEE9 !important;
  color: #1A1917 !important;
}
html[data-theme="light"] .time-btn.active {
  background: #1A1917 !important;
  color: #FFFFFF !important;
}

/* ── DEMO BANNER ── */
html[data-theme="light"] .demo-banner {
  background: #EEF2FF !important;
  border: 1px solid #C7D2FE !important;
  color: #5C5854 !important;
}
html[data-theme="light"] .demo-banner strong {
  color: #1A1917 !important;
}
html[data-theme="light"] .demo-banner svg {
  color: #4F46E5 !important;
}

/* ── MIRROR MOMENT STRIP ── */
html[data-theme="light"] .mirror-strip,
html[data-theme="light"] .mirror-strip-inner {
  background: #FFFFFF !important;
  border: 1px solid #E2DED7 !important;
  border-left: 3px solid #B45309 !important;
}
html[data-theme="light"] .mirror-strip-label,
html[data-theme="light"] [class*="mirror-strip-label"] {
  color: #B45309 !important;
}
html[data-theme="light"] .mirror-strip-text,
html[data-theme="light"] [class*="mirror-strip-text"] {
  color: #5C5854 !important;
}

/* ── RECENT TRADES TABLE ── */
html[data-theme="light"] table {
  background: #FFFFFF !important;
}
html[data-theme="light"] thead th {
  background: #FAFAF8 !important;
  color: #9C9890 !important;
  border-color: #E2DED7 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .09em !important;
}
html[data-theme="light"] tbody td {
  color: #5C5854 !important;
  border-color: #E2DED7 !important;
}
html[data-theme="light"] tbody tr:hover td {
  background: #F5F4F0 !important;
}

/* ── TRADE ROW (dashboard recent trades) ── */
html[data-theme="light"] .trade-row {
  border-bottom: 1px solid #E2DED7 !important;
}
html[data-theme="light"] .trade-row:hover {
  background: #F5F4F0 !important;
}
html[data-theme="light"] .tr-instrument,
html[data-theme="light"] .trade-instrument {
  color: #1A1917 !important;
}
html[data-theme="light"] .tr-time,
html[data-theme="light"] .trade-date {
  color: #9C9890 !important;
}
html[data-theme="light"] .tr-setup,
html[data-theme="light"] .trade-setup {
  color: #9C9890 !important;
}
html[data-theme="light"] .dir-long { background: rgba(5,150,105,0.06) !important; color: #059669 !important; border-color: rgba(5,150,105,0.15) !important; }
html[data-theme="light"] .dir-short { background: rgba(220,38,38,0.06) !important; color: #DC2626 !important; border-color: rgba(220,38,38,0.15) !important; }
html[data-theme="light"] .trade-pnl.pnl-pos { color: #059669 !important; }
html[data-theme="light"] .trade-pnl.pnl-neg { color: #DC2626 !important; }

/* ── WIN RATE BY SESSION BARS ── */
html[data-theme="light"] .br-name {
  color: #5C5854 !important;
}
html[data-theme="light"] .br-track {
  background: #E8E5DF !important;
}
html[data-theme="light"] .bar-card {
  background: #FFFFFF !important;
  border: 1px solid #E2DED7 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}
html[data-theme="light"] .bar-clabel {
  color: #9C9890 !important;
}

/* ── ALL GENERIC CARDS ── */
html[data-theme="light"] .card {
  background: #FFFFFF !important;
  border: 1px solid #E2DED7 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}
html[data-theme="light"] .card-label {
  color: #9C9890 !important;
}

/* ── ALL TEXT DEFAULTS ── */
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3 {
  color: #1A1917 !important;
}
html[data-theme="light"] .text-muted {
  color: #9C9890 !important;
}

/* ── EMPTY STATES ── */
html[data-theme="light"] .empty-wrap {
  background: #FFFFFF !important;
  border: 1px solid #E2DED7 !important;
}
html[data-theme="light"] .empty-title,
html[data-theme="light"] [class*="empty"][class*="title"] {
  color: #1A1917 !important;
}
html[data-theme="light"] .empty-sub,
html[data-theme="light"] [class*="empty"][class*="sub"] {
  color: #5C5854 !important;
}
html[data-theme="light"] .empty-sub strong {
  color: #1A1917 !important;
}
html[data-theme="light"] .empty-icon,
html[data-theme="light"] .empty-icon-svg {
  background: rgba(79,70,229,0.08) !important;
  border-color: rgba(79,70,229,0.15) !important;
  color: #4F46E5 !important;
}
html[data-theme="light"] .prog-track { background: #E8E5DF !important; }
html[data-theme="light"] .prog-label { color: #9C9890 !important; }
html[data-theme="light"] .prog-val { color: #4F46E5 !important; }
html[data-theme="light"] .prog-sub { color: #C4C0B8 !important; }
html[data-theme="light"] .empty-preview { background: #E2DED7 !important; }
html[data-theme="light"] .prev-item { background: #FFFFFF !important; }
html[data-theme="light"] .prev-label { color: #9C9890 !important; }
html[data-theme="light"] .prev-lock { color: #C4C0B8 !important; }

/* ── PATTERN CARDS (Mirror Moment, Trade DNA) ── */
html[data-theme="light"] .pc,
html[data-theme="light"] .pattern-card {
  background: #FFFFFF !important;
  border: 1px solid #E2DED7 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}
html[data-theme="light"] .pc-num { color: #C4C0B8 !important; }
html[data-theme="light"] .pc-title { color: #1A1917 !important; }
html[data-theme="light"] .pc-body { color: #5C5854 !important; }
html[data-theme="light"] .pc-rule { background: #F0EEE9 !important; color: #5C5854 !important; }
html[data-theme="light"] .pc-rule strong { color: #1A1917 !important; }
html[data-theme="light"] .pc-badge-high { background: rgba(220,38,38,0.08) !important; color: #DC2626 !important; border: 1px solid rgba(220,38,38,0.2) !important; }
html[data-theme="light"] .pc-badge-med { background: rgba(180,83,9,0.08) !important; color: #B45309 !important; border: 1px solid rgba(180,83,9,0.2) !important; }
html[data-theme="light"] .pc-badge-pos { background: rgba(5,150,105,0.08) !important; color: #059669 !important; border: 1px solid rgba(5,150,105,0.2) !important; }

/* ── BUTTONS ── */
html[data-theme="light"] .gen-btn {
  background: #4F46E5 !important;
  box-shadow: 0 2px 8px rgba(79,70,229,0.2) !important;
}
html[data-theme="light"] .gen-btn:hover {
  background: #4338CA !important;
  box-shadow: 0 4px 16px rgba(79,70,229,0.3) !important;
  transform: translateY(-1px) !important;
}
html[data-theme="light"] .gen-btn.locked {
  background: #F0EEE9 !important;
  color: #9C9890 !important;
  box-shadow: none !important;
  transform: none !important;
}
html[data-theme="light"] .refresh-btn {
  background: rgba(79,70,229,0.08) !important;
  border: 1px solid rgba(79,70,229,0.15) !important;
  color: #4F46E5 !important;
}
html[data-theme="light"] .refresh-btn:hover {
  background: rgba(79,70,229,0.12) !important;
}
html[data-theme="light"] .step-action {
  background: rgba(79,70,229,0.08) !important;
  border: 1px solid rgba(79,70,229,0.15) !important;
  color: #4F46E5 !important;
}

/* ── QUOTA PILL ── */
html[data-theme="light"] .quota-pill {
  background: #F0EEE9 !important;
  border: 1px solid #E2DED7 !important;
  color: #9C9890 !important;
}

/* ── HERO CARDS (Mirror Moment) ── */
html[data-theme="light"] .hero-card {
  background: #FFFFFF !important;
  border: 1px solid #E2DED7 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}
html[data-theme="light"] .hc-eyebrow { color: #C4C0B8 !important; }
html[data-theme="light"] .hc-headline { color: #1A1917 !important; }
html[data-theme="light"] .hc-headline .good { color: #059669 !important; }
html[data-theme="light"] .hc-headline .bad { color: #DC2626 !important; }
html[data-theme="light"] .hc-headline .quote { color: #9C9890 !important; }
html[data-theme="light"] .stat-pill { background: #F0EEE9 !important; border: 1px solid #E2DED7 !important; }
html[data-theme="light"] .sp-lbl { color: #9C9890 !important; }
html[data-theme="light"] .hc-dna { color: #5C5854 !important; }
html[data-theme="light"] .hc-dna strong { color: #1A1917 !important; }

/* ── LOADED HEADER ── */
html[data-theme="light"] .loaded-header .lh-title { color: #1A1917 !important; }
html[data-theme="light"] .loaded-header .lh-sub { color: #9C9890 !important; }

/* ── PODS ── */
html[data-theme="light"] .pod-card {
  background: #FFFFFF !important;
  border: 1px solid #E2DED7 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}
html[data-theme="light"] .pod-name { color: #1A1917 !important; }
html[data-theme="light"] .pod-meta { color: #9C9890 !important; }
html[data-theme="light"] .pod-invite-code { background: #F0EEE9 !important; border-color: #E2DED7 !important; color: #5C5854 !important; }
html[data-theme="light"] .pod-member { background: #F0EEE9 !important; border: 1px solid #E2DED7 !important; }
html[data-theme="light"] .pod-member.you { border-color: rgba(79,70,229,0.3) !important; background: rgba(79,70,229,0.08) !important; }
html[data-theme="light"] .pm-name { color: #5C5854 !important; }
html[data-theme="light"] .psh-week { color: #9C9890 !important; }
html[data-theme="light"] .psh-bar-track { background: #E8E5DF !important; }
html[data-theme="light"] .pod-digest-strip { background: rgba(79,70,229,0.08) !important; border: 1px solid rgba(79,70,229,0.15) !important; color: #5C5854 !important; }

/* ── ROADMAP ── */
html[data-theme="light"] .rm-progress-hero { background: #FFFFFF !important; border: 1px solid #E2DED7 !important; box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important; }
html[data-theme="light"] .rph-phase { color: #4F46E5 !important; }
html[data-theme="light"] .rph-title { color: #1A1917 !important; }
html[data-theme="light"] .rph-sub { color: #5C5854 !important; }
html[data-theme="light"] .rph-track { background: #E8E5DF !important; }
html[data-theme="light"] .phase-tab { border-color: #E2DED7 !important; color: #9C9890 !important; }
html[data-theme="light"] .phase-tab:hover { border-color: #C8C4BC !important; color: #1A1917 !important; }
html[data-theme="light"] .phase-tab.active { background: rgba(79,70,229,0.08) !important; border-color: rgba(79,70,229,0.3) !important; color: #4F46E5 !important; }
html[data-theme="light"] .phase-tab.done { background: rgba(5,150,105,0.06) !important; border-color: rgba(5,150,105,0.2) !important; color: #059669 !important; }
html[data-theme="light"] .step-node { background: #FFFFFF !important; border-color: #E2DED7 !important; }
html[data-theme="light"] .step-node.active { background: rgba(79,70,229,0.08) !important; border-color: rgba(79,70,229,0.4) !important; box-shadow: 0 0 12px rgba(79,70,229,0.15) !important; }
html[data-theme="light"] .step-connector { background: #E2DED7 !important; }
html[data-theme="light"] .step-title { color: #1A1917 !important; }
html[data-theme="light"] .step-title.locked { color: #C4C0B8 !important; }
html[data-theme="light"] .step-desc { color: #5C5854 !important; }
html[data-theme="light"] .step-data { background: #F0EEE9 !important; border-color: #E2DED7 !important; border-left-color: #4F46E5 !important; }
html[data-theme="light"] .task { color: #5C5854 !important; }
html[data-theme="light"] .task.done { color: #C4C0B8 !important; }
html[data-theme="light"] .task-box { border-color: #C8C4BC !important; background: #FFFFFF !important; }
html[data-theme="light"] .rm-stat-card { background: #FFFFFF !important; border: 1px solid #E2DED7 !important; }
html[data-theme="light"] .rm-stat-label { color: #9C9890 !important; }
html[data-theme="light"] .unlock-row { color: #5C5854 !important; border-color: #E2DED7 !important; }

/* ── AI COACH CHAT ── */
html[data-theme="light"] .chat-panel { background: #FFFFFF !important; border: 1px solid #E2DED7 !important; }
html[data-theme="light"] .chat-header { border-bottom: 1px solid #E2DED7 !important; }
html[data-theme="light"] .coach-name { color: #1A1917 !important; }
html[data-theme="light"] .coach-sub { color: #9C9890 !important; }
html[data-theme="light"] .model-pill { background: #F0EEE9 !important; border-color: #E2DED7 !important; color: #9C9890 !important; }
html[data-theme="light"] .quota-track { background: #E8E5DF !important; }
html[data-theme="light"] .quota-label { color: #9C9890 !important; }
html[data-theme="light"] .msg-bubble-coach { background: #F0EEE9 !important; border: 1px solid #E2DED7 !important; color: #1A1917 !important; }
html[data-theme="light"] .msg-bubble-user { background: #4F46E5 !important; color: #fff !important; }
html[data-theme="light"] .msg-meta { color: #C4C0B8 !important; }
html[data-theme="light"] .input-wrap { border-top: 1px solid #E2DED7 !important; }
html[data-theme="light"] .input-box { background: #F0EEE9 !important; border: 1px solid #E2DED7 !important; color: #1A1917 !important; }
html[data-theme="light"] .input-box:focus { border-color: #4F46E5 !important; }
html[data-theme="light"] .input-box::placeholder { color: #C4C0B8 !important; }
html[data-theme="light"] .send-btn { background: #4F46E5 !important; }
html[data-theme="light"] .prompt-chip { background: #FFFFFF !important; border-color: #E2DED7 !important; color: #9C9890 !important; }
html[data-theme="light"] .prompt-chip:hover { border-color: #4F46E5 !important; color: #4F46E5 !important; }
html[data-theme="light"] .suggestion-btn { background: #F0EEE9 !important; border-color: #E2DED7 !important; color: #5C5854 !important; }
html[data-theme="light"] .suggestion-btn:hover { border-color: #4F46E5 !important; color: #1A1917 !important; background: #FFFFFF !important; }

/* ── PRE-TRADE CLEARANCE ── */
html[data-theme="light"] .hint-box { background: #F0EEE9 !important; border: 1px solid #E2DED7 !important; color: #5C5854 !important; }
html[data-theme="light"] .field-label { color: #1A1917 !important; }
html[data-theme="light"] .hint-btn { background: #E8E5DF !important; border-color: #C8C4BC !important; color: #9C9890 !important; }
html[data-theme="light"] select,
html[data-theme="light"] input[type=text],
html[data-theme="light"] input[type=number] {
  background: #F0EEE9 !important;
  border: 1px solid #E2DED7 !important;
  color: #1A1917 !important;
}
html[data-theme="light"] select:focus,
html[data-theme="light"] input:focus { border-color: #4F46E5 !important; }
html[data-theme="light"] .emo-btn { background: #F0EEE9 !important; border-color: #E2DED7 !important; }
html[data-theme="light"] .check-box { border-color: #C8C4BC !important; background: #FFFFFF !important; }
html[data-theme="light"] .check-title { color: #1A1917 !important; }
html[data-theme="light"] .check-sub { color: #9C9890 !important; }
html[data-theme="light"] .check-required { background: rgba(220,38,38,0.08) !important; color: #DC2626 !important; }
html[data-theme="light"] .check-good { background: rgba(5,150,105,0.08) !important; color: #059669 !important; }
html[data-theme="light"] .score-num { color: #1A1917 !important; }
html[data-theme="light"] .score-label { color: #9C9890 !important; }
html[data-theme="light"] .factor-label { color: #5C5854 !important; }
html[data-theme="light"] .factor-bar-wrap { background: #E8E5DF !important; }
html[data-theme="light"] .hi-setup { color: #1A1917 !important; }
html[data-theme="light"] .hi-time { color: #9C9890 !important; }

/* ── THEME TOGGLE ── */
html[data-theme="light"] .theme-toggle-btn svg { color: #4F46E5 !important; }

/* ── SCROLLBAR ── */
html[data-theme="light"] ::-webkit-scrollbar { width: 5px; height: 5px; }
html[data-theme="light"] ::-webkit-scrollbar-track { background: #F0EEE9; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #C8C4BC; border-radius: 3px; }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #9C9890; }

/* ── USER DROPDOWN ── */
html[data-theme="light"] .user-dropdown { background: #FFFFFF !important; border: 1px solid #E2DED7 !important; box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important; }
html[data-theme="light"] .ud-name { color: #1A1917 !important; }
html[data-theme="light"] .ud-email { color: #9C9890 !important; }
html[data-theme="light"] .ud-divider { background: #E2DED7 !important; }
html[data-theme="light"] .ud-item { color: #5C5854 !important; }
html[data-theme="light"] .ud-item:hover { background: #F0EEE9 !important; color: #1A1917 !important; }
html[data-theme="light"] .ud-item svg { color: #9C9890 !important; }
html[data-theme="light"] .ud-item:hover svg { color: #5C5854 !important; }
html[data-theme="light"] .ud-item-danger { color: #DC2626 !important; }
html[data-theme="light"] .ud-item-danger:hover { background: rgba(220,38,38,0.06) !important; }
html[data-theme="light"] .ud-item-danger svg { color: #DC2626 !important; }
html[data-theme="light"] .ud-plan-badge { background: #F0EEE9 !important; color: #9C9890 !important; }

/* ── SIGN OUT MODAL ── */
html[data-theme="light"] .signout-overlay { background: rgba(0,0,0,0.3) !important; }
html[data-theme="light"] .signout-modal { background: #FFFFFF !important; border: 1px solid #E2DED7 !important; box-shadow: 0 16px 48px rgba(0,0,0,0.15) !important; }
html[data-theme="light"] .signout-icon { background: rgba(220,38,38,0.06) !important; color: #DC2626 !important; }
html[data-theme="light"] .signout-title { color: #1A1917 !important; }
html[data-theme="light"] .signout-sub { color: #9C9890 !important; }
html[data-theme="light"] .btn-signout-cancel { background: #F0EEE9 !important; border: 1px solid #E2DED7 !important; color: #5C5854 !important; }
html[data-theme="light"] .btn-signout-cancel:hover { background: #E8E5DF !important; color: #1A1917 !important; }

/* ── IMPORT MODAL ── */
html[data-theme="light"] .import-box { background: #FFFFFF !important; border: 1px solid #E2DED7 !important; box-shadow: 0 24px 64px rgba(0,0,0,0.12) !important; }
html[data-theme="light"] .import-title { color: #1A1917 !important; }
html[data-theme="light"] .import-close { color: #9C9890 !important; }
html[data-theme="light"] .import-dropzone { border-color: #C8C4BC !important; }
html[data-theme="light"] .import-stat { background: #F0EEE9 !important; }
html[data-theme="light"] .import-stat-val { color: #1A1917 !important; }

/* ── MODALS (Pods, Column Picker, Import) ── */
html[data-theme="light"] .pod-modal,
html[data-theme="light"] .col-picker-overlay > div,
html[data-theme="light"] #import-modal > div {
  background: #FFFFFF !important;
  border: 1px solid #E2DED7 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
}
html[data-theme="light"] .pod-modal-title { color: #1A1917 !important; }
html[data-theme="light"] .pod-modal-sub { color: #5C5854 !important; }
html[data-theme="light"] .pod-modal-label { color: #9C9890 !important; }
html[data-theme="light"] .pod-modal-input { background: #F0EEE9 !important; border-color: #E2DED7 !important; color: #1A1917 !important; }
html[data-theme="light"] .pod-modal-cancel { background: #F0EEE9 !important; border-color: #E2DED7 !important; color: #5C5854 !important; }
html[data-theme="light"] .num-divider { background: #E2DED7 !important; }

/* ── JOURNAL TABLE ── */
html[data-theme="light"] #journal-table thead th { background: #FAFAF8 !important; color: #9C9890 !important; border-color: #E2DED7 !important; }
html[data-theme="light"] #journal-table tbody td { color: #5C5854 !important; border-color: #E2DED7 !important; }
html[data-theme="light"] #journal-table tbody tr:hover td { background: #F0EEE9 !important; }

/* ── SETUP LIBRARY CARDS ── */
html[data-theme="light"] .setup-card { background: #FFFFFF !important; border: 1px solid #E2DED7 !important; box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important; }
html[data-theme="light"] .setup-card:hover { border-color: #C8C4BC !important; box-shadow: 0 4px 16px rgba(0,0,0,0.07) !important; }
html[data-theme="light"] .setup-card.top-edge { border-color: #4F46E5 !important; }
html[data-theme="light"] .sc-name { color: #1A1917 !important; }
html[data-theme="light"] .sc-sub { color: #9C9890 !important; }
html[data-theme="light"] .sc-stat { background: #F0EEE9 !important; }
html[data-theme="light"] .sc-stat-lbl { color: #9C9890 !important; }
html[data-theme="light"] .sc-wr-bar { background: #E8E5DF !important; }
html[data-theme="light"] .sc-footer { color: #9C9890 !important; }

/* ── PSYCHOLOGY PAGE ── */
html[data-theme="light"] .emo-bar-wrap { background: #E8E5DF !important; }
html[data-theme="light"] .emo-label { color: #5C5854 !important; }
html[data-theme="light"] .emo-pct { color: #5C5854 !important; }
html[data-theme="light"] .abo-l { color: #9C9890 !important; }
html[data-theme="light"] .abo-track { background: #E8E5DF !important; }
html[data-theme="light"] .pattern { background: #FFFFFF !important; border: 1px solid #E2DED7 !important; }
html[data-theme="light"] .p-num { color: #C4C0B8 !important; }
html[data-theme="light"] .p-title { color: #1A1917 !important; }
html[data-theme="light"] .p-body { color: #5C5854 !important; }
html[data-theme="light"] .p-rule { background: #F0EEE9 !important; color: #5C5854 !important; }

/* ── DNA PAGE ── */
html[data-theme="light"] .dna-hero { background: #FFFFFF !important; border: 1px solid #E2DED7 !important; box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important; }
html[data-theme="light"] .dna-statement { color: #1A1917 !important; }
html[data-theme="light"] .dna-tag { background: #F0EEE9 !important; border-color: #E2DED7 !important; color: #5C5854 !important; }
html[data-theme="light"] .dna-tag.green { background: rgba(5,150,105,0.07) !important; border-color: rgba(5,150,105,0.2) !important; color: #059669 !important; }
html[data-theme="light"] .dna-tag.red { background: rgba(220,38,38,0.07) !important; border-color: rgba(220,38,38,0.2) !important; color: #DC2626 !important; }
html[data-theme="light"] .dna-tag.violet { background: rgba(79,70,229,0.08) !important; border-color: rgba(79,70,229,0.15) !important; color: #4F46E5 !important; }
html[data-theme="light"] .dna-edge-box { background: #FFFFFF !important; border-color: rgba(5,150,105,0.2) !important; border-left-color: #059669 !important; }
html[data-theme="light"] .dna-edge-label { color: #059669 !important; }
html[data-theme="light"] .dna-edge-text { color: #5C5854 !important; }
html[data-theme="light"] .dna-card { background: #FFFFFF !important; border: 1px solid #E2DED7 !important; }
html[data-theme="light"] .dna-card-label { color: #9C9890 !important; }
html[data-theme="light"] .dna-item-title { color: #1A1917 !important; }
html[data-theme="light"] .dna-item-sub { color: #9C9890 !important; }

/* ── PAGE CONTENT / LOADING ── */
html[data-theme="light"] .page-content { background: #F5F4F0 !important; }
html[data-theme="light"] .page-loading { color: #9C9890 !important; }
html[data-theme="light"] .skel,
html[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, #F0EEE9 25%, #E8E5DF 37%, #F0EEE9 63%) !important;
  background-size: 800px 100% !important;
}

/* ── SB BOTTOM / COLLAPSE ── */
html[data-theme="light"] .sb-bottom { border-top-color: #E2DED7 !important; }
html[data-theme="light"] .sb-collapse { border-color: #E2DED7 !important; color: #C4C0B8 !important; }
html[data-theme="light"] .sb-collapse:hover { background: #F0EEE9 !important; color: #1A1917 !important; }
html[data-theme="light"] .sb-logo-text { color: #1A1917 !important; }
html[data-theme="light"] .nav-badge-ai { background: rgba(79,70,229,0.08) !important; color: #4F46E5 !important; border-color: rgba(79,70,229,0.15) !important; }
html[data-theme="light"] .avatar { background: #F0EEE9 !important; color: #5C5854 !important; }
html[data-theme="light"] .user-name { color: #1A1917 !important; }
html[data-theme="light"] .user-plan { color: #9C9890 !important; }
html[data-theme="light"] .uc-title { color: #4F46E5 !important; }
html[data-theme="light"] .uc-sub { color: #9C9890 !important; }
html[data-theme="light"] .tb-avatar { background: #F0EEE9 !important; color: #5C5854 !important; }
html[data-theme="light"] .ticker-change.up { color: #059669 !important; }
html[data-theme="light"] .ticker-change.down { color: #DC2626 !important; }
html[data-theme="light"] .nav-mirror { background: rgba(180,83,9,0.06) !important; border: 1px solid rgba(180,83,9,0.15) !important; color: #B45309 !important; }

/* === MODAL (trade log) === */
[data-theme="light"] .modal { background: #FFFFFF !important; border: 1px solid #E8E8EE !important; }
[data-theme="light"] .modal-title { color: #0c0c0e !important; }

/* === MOBILE NAV === */
[data-theme="light"] .mobile-nav { background: #FFFFFF !important; border-top-color: #E8E8EE !important; box-shadow: 0 -4px 12px rgba(0,0,0,0.06) !important; }
[data-theme="light"] .mob-item { color: #9292a0 !important; }
[data-theme="light"] .mob-item.active { color: #7C6FE0 !important; }

/* === CALENDAR === */
[data-theme="light"] .cv-cell { border-color: #E8E8EE !important; background: #F3F3F8 !important; }
[data-theme="light"] .cv-green { background: rgba(72,187,120,0.08) !important; border-color: rgba(72,187,120,0.25) !important; }
[data-theme="light"] .cv-red { background: rgba(245,101,101,0.08) !important; border-color: rgba(245,101,101,0.25) !important; }
[data-theme="light"] .cv-notes-input { background: #F3F3F8 !important; border-color: #E8E8EE !important; color: #0c0c0e !important; }
[data-theme="light"] .cv-trade-row { background: #F3F3F8 !important; }
[data-theme="light"] .cv-trade-row:hover { background: #EAEAF0 !important; }

/* === MIRROR MOMENT (v2) === */
[data-theme="light"] .empty-wrap { background: #FFFFFF !important; border-color: #E8E8EE !important; }
[data-theme="light"] .prev-item { background: #FFFFFF !important; }
[data-theme="light"] .hero-card { background: #FFFFFF !important; border-color: #E8E8EE !important; }
[data-theme="light"] .pc { background: #FFFFFF !important; border-color: #E8E8EE !important; }
[data-theme="light"] .bar-card { background: #FFFFFF !important; border-color: #E8E8EE !important; }
[data-theme="light"] .pc-title { color: #0c0c0e !important; }
[data-theme="light"] .pc-body { color: #6B6B80 !important; }
[data-theme="light"] .pc-rule { background: #F3F3F8 !important; color: #6B6B80 !important; }
[data-theme="light"] .hc-headline { color: #0c0c0e !important; }

/* === STATS PAGE === */
[data-theme="light"] .st-kpi { background: #FFFFFF !important; border-color: #E8E8EE !important; }
[data-theme="light"] .st-kpi:hover { border-color: #D4D4DC !important; box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important; }
[data-theme="light"] .st-kpi-val { color: #0c0c0e !important; }
[data-theme="light"] .st-kpi-val.st-pos { color: #059669 !important; }
[data-theme="light"] .st-kpi-val.st-neg { color: #DC2626 !important; }
[data-theme="light"] .st-pos { color: #059669 !important; }
[data-theme="light"] .st-neg { color: #DC2626 !important; }
[data-theme="light"] .st-tag { background: rgba(124,111,224,0.08) !important; color: #4F46E5 !important; }
[data-theme="light"] .st-tag.st-pos { background: rgba(5,150,105,0.08) !important; color: #059669 !important; }
[data-theme="light"] .st-tag.st-neg { background: rgba(220,38,38,0.06) !important; color: #DC2626 !important; }
[data-theme="light"] .st-icon { color: #7C6FE0 !important; }
[data-theme="light"] .st-instr-bar-wrap { background: #F0F0F4 !important; }
[data-theme="light"] .st-bar-pos { background: #059669 !important; }
[data-theme="light"] .st-bar-neg { background: #DC2626 !important; }
[data-theme="light"] .st-instr-row { border-bottom-color: #F0F0F4 !important; }
[data-theme="light"] .st-heat-pos { background: rgba(5,150,105, calc(0.06 + var(--intensity) * 0.18)) !important; }
[data-theme="light"] .st-heat-neg { background: rgba(220,38,38, calc(0.06 + var(--intensity) * 0.18)) !important; }
[data-theme="light"] .st-heat-pos .st-heat-val { color: #059669 !important; }
[data-theme="light"] .st-heat-neg .st-heat-val { color: #DC2626 !important; }
[data-theme="light"] .st-streak-win { background: rgba(5,150,105,0.08) !important; color: #059669 !important; }
[data-theme="light"] .st-streak-loss { background: rgba(220,38,38,0.06) !important; color: #DC2626 !important; }

/* === EDGE PROTOCOL PAGE (light) === */
[data-theme="light"] .ep-tabs { background: rgba(0,0,0,.03) !important; border-color: rgba(0,0,0,.08) !important; }
[data-theme="light"] .ep-tab { color: #6B6B80 !important; }
[data-theme="light"] .ep-tab.on { background: #FFFFFF !important; color: #1A1917 !important; border-color: rgba(0,0,0,.1) !important; box-shadow: 0 1px 3px rgba(0,0,0,.06) !important; }
[data-theme="light"] .ep-tab:hover:not(.on) { color: #1A1917 !important; }
[data-theme="light"] .ep-card,
[data-theme="light"] .ep-proto-card,
[data-theme="light"] .ep-notif-card { background: #FFFFFF !important; border-color: rgba(0,0,0,.08) !important; }
[data-theme="light"] .ep-proto-card:hover { border-color: rgba(0,0,0,.15) !important; }
[data-theme="light"] .ep-proto-expanded { border-top-color: rgba(0,0,0,.06) !important; }
[data-theme="light"] .ep-scene-card { background: rgba(0,0,0,.02) !important; border-color: rgba(0,0,0,.06) !important; }
[data-theme="light"] .ep-filter { background: rgba(0,0,0,.03) !important; border-color: rgba(0,0,0,.08) !important; color: #6B6B80 !important; }
[data-theme="light"] .ep-filter.on { background: rgba(79,70,229,.08) !important; color: #4F46E5 !important; border-color: rgba(79,70,229,.25) !important; }
[data-theme="light"] .ep-completion-opt { background: rgba(0,0,0,.02) !important; border-color: rgba(0,0,0,.08) !important; color: #5C5854 !important; }
[data-theme="light"] .ep-completion-opt[data-val="done"].selected { background: rgba(5,150,105,.06) !important; border-color: rgba(5,150,105,.3) !important; color: #059669 !important; }
[data-theme="light"] .ep-completion-opt[data-val="partial"].selected { background: rgba(180,83,9,.06) !important; border-color: rgba(180,83,9,.3) !important; color: #B45309 !important; }
[data-theme="light"] .ep-completion-opt[data-val="skipped"].selected { background: rgba(220,38,38,.06) !important; border-color: rgba(220,38,38,.3) !important; color: #DC2626 !important; }
[data-theme="light"] .ep-score-bar { background: rgba(0,0,0,.06) !important; }

/* ── SETUP LIBRARY PAGE ─────────────────── */
.sl-kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.sl-kpi { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; position: relative; overflow: visible; }
.sl-kpi::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; border-radius: 0 0 var(--r-sm) var(--r-sm); }
.sl-kpi-g::after { background: var(--profit); }
.sl-kpi-v::after { background: var(--indigo); }
.sl-kpi-a::after { background: var(--caution); }
.sl-kpi-r::after { background: var(--loss); }
.sl-kpi-label { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-2); margin-bottom: 8px; }
.sl-kpi-val { font-size: 1.5rem; font-weight: 500; line-height: 1; margin-bottom: 4px; font-family: var(--fm); }
.sl-kpi-val .dim { font-size: 0.9rem; font-weight: 400; color: var(--text-2); }
.sl-kpi-sub { font-size: 0.68rem; color: var(--text-2); }

.sl-ai-banner { background: var(--surface-2); border: 0.5px solid var(--border); border-left: 3px solid var(--indigo); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 14px 16px; margin-bottom: 14px; display: flex; align-items: flex-start; gap: 12px; }
.sl-ai-icon { width: 32px; height: 32px; background: var(--indigo); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.sl-ai-label { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--indigo); margin-bottom: 4px; }
.sl-ai-text { font-size: 0.75rem; color: var(--text-2); line-height: 1.65; }
.sl-ai-text strong { color: var(--text-1); font-weight: 500; }

.sl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.sl-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--r-sm); padding: 16px; position: relative; cursor: default; transition: border-color 0.15s; }
.sl-card:hover { border-color: var(--border-2); }
.sl-card.sl-top-edge { border-color: var(--indigo); border-width: 1px; }
.sl-card.sl-retire { opacity: 0.55; }
.sl-card.sl-ai-proposed { border-style: dashed; }

.sl-badge { position: absolute; top: 12px; right: 12px; font-size: 0.56rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; letter-spacing: 0.04em; }
.sl-badge-edge { background: var(--profit-bg); color: var(--profit); border: 0.5px solid var(--profit-border); }
.sl-badge-solid { background: var(--green-bg); color: var(--profit); }
.sl-badge-avg { background: var(--surface-2); color: var(--text-2); }
.sl-badge-below { background: var(--loss-bg); color: var(--loss); }
.sl-badge-retire { background: var(--loss-bg); color: var(--loss); border: 0.5px solid var(--loss-border); }

.sl-name { font-size: 0.88rem; font-weight: 500; margin-bottom: 3px; padding-right: 60px; color: var(--text-1); }
.sl-sub { font-size: 0.68rem; color: var(--text-2); margin-bottom: 14px; }
.sl-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.sl-stat { background: var(--surface-2); border-radius: var(--r-xs); padding: 7px 9px; }
.sl-stat-val { font-size: 0.95rem; font-weight: 500; line-height: 1; margin-bottom: 2px; font-family: var(--fm); }
.sl-stat-lbl { font-size: 0.56rem; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.07em; }

.sl-wr-bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-bottom: 8px; }
.sl-wr-fill { height: 4px; border-radius: 2px; }

.sl-footer { display: flex; align-items: center; justify-content: space-between; font-size: 0.68rem; color: var(--text-2); }
.sl-session { display: flex; align-items: center; gap: 4px; }
.sl-dot { width: 6px; height: 6px; border-radius: 50%; }

.sl-cond-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 0.5px solid var(--border); }
.sl-cond-row:last-child { border-bottom: none; }
.sl-cond-icon { width: 28px; height: 28px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sl-cond-title { font-size: 0.75rem; font-weight: 500; margin-bottom: 2px; color: var(--text-1); }
.sl-cond-desc { font-size: 0.68rem; color: var(--text-2); line-height: 1.5; }
.sl-cond-val { font-size: 0.75rem; font-family: var(--fm); font-weight: 500; color: var(--text-1); flex-shrink: 0; }

.sl-section-label { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-2); margin-bottom: 10px; }

@media (max-width: 900px) { .sl-grid { grid-template-columns: repeat(2, 1fr); } .sl-kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .sl-grid { grid-template-columns: 1fr; } .sl-kpi-row { grid-template-columns: 1fr 1fr; } }

/* Light mode overrides for setup library */
[data-theme="light"] .sl-kpi { background: #fff; border-color: #E8E5DF; }
[data-theme="light"] .sl-card { background: #fff; border-color: #E8E5DF; }
[data-theme="light"] .sl-stat { background: #F7F7F5; }
[data-theme="light"] .sl-ai-banner { background: #F7F7F5; border-color: #E8E5DF; }
[data-theme="light"] .sl-badge-edge { background: rgba(5,150,105,0.08); color: #059669; border-color: rgba(5,150,105,0.2); }
[data-theme="light"] .sl-badge-solid { background: rgba(5,150,105,0.08); color: #059669; }
[data-theme="light"] .sl-badge-below { background: rgba(220,38,38,0.06); color: #DC2626; }
[data-theme="light"] .sl-badge-retire { background: rgba(220,38,38,0.06); color: #DC2626; border-color: rgba(220,38,38,0.15); }
[data-theme="light"] .sl-kpi-g::after { background: #059669; }
[data-theme="light"] .sl-kpi-r::after { background: #DC2626; }

/* ═══ Trade DNA page ═══ */
.dna-hero{background:#13131F;border:1px solid rgba(255,255,255,.07);border-radius:14px;padding:28px;margin-bottom:12px;position:relative;overflow:hidden}
.dna-hero::before{content:'';position:absolute;top:-80px;right:-80px;width:280px;height:280px;background:radial-gradient(circle,rgba(74,222,128,.06) 0%,transparent 70%);pointer-events:none}
.dna-eyebrow{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.12em;color:rgba(255,255,255,.25);margin-bottom:14px;display:flex;align-items:center;gap:8px}
.dna-eyebrow::before{content:'';width:16px;height:1px;background:rgba(255,255,255,.15)}
.dna-statement{font-size:17px;font-weight:400;line-height:1.65;color:rgba(255,255,255,.82);max-width:680px;margin-bottom:20px}
.dna-statement strong{color:#4ADE80;font-weight:500}
.dna-tags{display:flex;gap:8px;flex-wrap:wrap}
.dna-tag{padding:6px 14px;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.09);font-size:12px;color:rgba(255,255,255,.55)}
.dna-tag.green{background:rgba(74,222,128,.1);border-color:rgba(74,222,128,.2);color:#4ADE80}
.dna-tag.red{background:rgba(248,113,113,.1);border-color:rgba(248,113,113,.2);color:#F87171}
.dna-tag.violet{background:rgba(124,111,224,.1);border-color:rgba(124,111,224,.2);color:#7C6FE0}

.dna-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:12px}
.dna-card{background:#13131F;border:1px solid rgba(255,255,255,.07);border-radius:12px;padding:18px}
.dna-card-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.09em;color:rgba(255,255,255,.25);margin-bottom:14px;display:flex;align-items:center;gap:7px}
.dna-item{display:flex;align-items:flex-start;gap:10px;padding:9px 0;border-bottom:0.5px solid rgba(255,255,255,.05)}
.dna-item:last-child{border-bottom:none}
.dna-item-icon{width:26px;height:26px;border-radius:6px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:11px}
.dna-item-body{flex:1}
.dna-item-title{font-size:12px;font-weight:500;color:rgba(255,255,255,.75);margin-bottom:2px}
.dna-item-sub{font-size:11px;color:rgba(255,255,255,.35);line-height:1.5}
.dna-item-val{font-size:13px;font-weight:500;font-family:monospace;flex-shrink:0}

.dna-edge-box{background:#13131F;border:1px solid rgba(74,222,128,.2);border-left:3px solid #4ADE80;border-radius:0 12px 12px 0;padding:20px 24px;margin-bottom:12px}
.dna-edge-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:#4ADE80;margin-bottom:8px}
.dna-edge-text{font-size:13px;color:rgba(255,255,255,.55);line-height:1.75}
.dna-edge-text strong{color:rgba(255,255,255,.85);font-weight:500}

/* ============================================
   MOBILE RESPONSIVE — max-width 768px
   ============================================ */

/* ── HAMBURGER BUTTON (hidden by default) ── */
.hamburger-btn {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.hamburger-btn:hover { background: var(--surface-2); color: var(--text-1); }

/* ── SIDEBAR OVERLAY (backdrop) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

@media (max-width: 768px) {

  /* ── LAYOUT ── */
  .app-shell,
  .layout,
  [class*="app-layout"] {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* ── HAMBURGER — show on mobile ── */
  .hamburger-btn {
    display: flex;
  }

  /* ── SIDEBAR — slide-out drawer on mobile ── */
  .sidebar {
    position: fixed !important;
    top: 0; left: 0; bottom: 0;
    width: 260px !important;
    min-width: 260px !important;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
    z-index: 100 !important;
    padding: 20px 0 !important;
    align-items: flex-start !important;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  /* Force expanded styles when sidebar is open on mobile */
  .sidebar.mobile-open .sb-logo {
    width: auto; padding: 0 16px; background: none; border-radius: 0;
    height: auto; justify-content: space-between;
  }
  .sidebar.mobile-open .sb-logo-text { display: block; }
  .sidebar.mobile-open .sb-section { display: block; }
  .sidebar.mobile-open .sb-scroll { align-items: stretch; }
  .sidebar.mobile-open .sb-nav { align-items: stretch; }
  .sidebar.mobile-open .nav-item {
    width: calc(100% - 16px); margin: 0 8px;
    padding: 0 12px; justify-content: flex-start;
    gap: 10px; height: 38px;
  }
  .sidebar.mobile-open .nav-item .nl { display: block; }
  .sidebar.mobile-open .nav-item.nav-mirror { margin: 6px 8px; }
  .sidebar.mobile-open .nav-badge,
  .sidebar.mobile-open .nav-badge-ai,
  .sidebar.mobile-open .nav-badge-gold { display: inline-flex; }
  .sidebar.mobile-open .sb-bottom { padding: 12px; align-items: stretch; }
  .sidebar.mobile-open .user-name,
  .sidebar.mobile-open .user-plan { display: block; }
  .sidebar.mobile-open .upgrade-card { display: block; }
  .sidebar.mobile-open .sb-collapse { display: none; }
  .sidebar.mobile-open .sb-scroll { padding-left: 10px; padding-right: 10px; width: 100%; box-sizing: border-box; }

  /* ── TOPBAR ── */
  .topbar {
    padding: 0 12px !important;
    height: auto !important;
    min-height: 52px !important;
    flex-wrap: wrap !important;
    gap: 8px;
  }

  .tb-left {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .market-ticker,
  .ticker-wrap,
  [class*="ticker"] {
    display: none !important;
  }

  .tb-title {
    font-size: 0.85rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tb-sub {
    font-size: 0.62rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hide "Log Trade" text on mobile, keep icon */
  .btn-log-trade {
    padding: 8px 10px !important;
    font-size: 0 !important;
    gap: 0 !important;
  }
  .btn-log-trade svg {
    width: 16px; height: 16px;
  }

  .tb-right {
    gap: 4px !important;
  }

  .tb-icon-btn {
    width: 32px !important;
    height: 32px !important;
  }

  .page-title {
    font-size: 1rem !important;
  }

  /* ── MAIN CONTENT ── */
  .main-content,
  .page-content,
  #page-content {
    padding: 12px !important;
    padding-bottom: 72px !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  /* ── KPI CARDS — 2 columns on mobile ── */
  .kpi-grid,
  .g4,
  [class*="kpi-grid"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .kpi-card {
    padding: 14px !important;
  }

  .kpi-value,
  .card-value {
    font-size: 1.4rem !important;
  }

  /* ── ALL 2-COL GRIDS → 1 col ── */
  .g2,
  .grid2,
  [class*="grid-2"] {
    grid-template-columns: 1fr !important;
  }

  /* ── ALL 3-COL GRIDS → 1 col ── */
  .g3,
  .grid3,
  [class*="grid-3"],
  .patterns-grid,
  .setups-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── ADMIN LAYOUT ── */
  .rm-layout {
    grid-template-columns: 1fr !important;
  }

  /* ── JOURNAL TABLE — horizontal scroll ── */
  .journal-table-wrap,
  #journal-table-wrap,
  [class*="journal-wrap"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #journal-table,
  .journal-table,
  table {
    min-width: 700px !important;
    font-size: 11px !important;
  }

  table th,
  table td {
    padding: 8px 10px !important;
    white-space: nowrap !important;
  }

  /* ── CHARTS ── */
  .chart-card canvas {
    max-height: 180px !important;
  }

  /* ── PODS ── */
  .pod-members {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* ── MIRROR + DNA HERO ── */
  .hero-card,
  .dna-hero {
    padding: 16px !important;
  }

  .hc-headline {
    font-size: 15px !important;
  }

  .stat-row {
    gap: 6px !important;
  }

  .stat-pill {
    padding: 7px 10px !important;
  }

  .sp-val {
    font-size: 13px !important;
  }

  /* ── PATTERN CARDS ── */
  .patterns-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── MODAL ── */
  .pod-modal,
  [class*="modal"] > div {
    width: calc(100vw - 24px) !important;
    padding: 20px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }

  /* ── PRICING CARDS ── */
  .pricing-grid,
  .g3[id*="pricing"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* ── ROADMAP ── */
  .rm-progress-hero {
    padding: 14px 12px !important;
    gap: 12px !important;
    border-radius: 10px !important;
  }

  .rph-ring {
    width: 50px !important;
    height: 50px !important;
  }

  .rph-ring svg {
    width: 50px !important;
    height: 50px !important;
  }

  .rph-ring-val {
    font-size: 13px !important;
  }

  .rph-ring-lbl {
    font-size: 8px !important;
  }

  .rph-title {
    font-size: 13px !important;
  }

  .rph-sub {
    font-size: 10px !important;
    margin-bottom: 8px !important;
  }

  .phase-tabs {
    gap: 4px !important;
    margin-bottom: 12px !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
  }

  .phase-tab {
    padding: 5px 10px !important;
    font-size: 10px !important;
    flex-shrink: 0 !important;
  }

  .step {
    gap: 10px !important;
  }

  .step-node {
    width: 28px !important;
    height: 28px !important;
  }

  .step:not(:last-child) .step-connector {
    left: 13px !important;
    top: 30px !important;
  }

  .step-body {
    padding-bottom: 14px !important;
    max-width: calc(100vw - 80px) !important;
    overflow: hidden !important;
  }

  .step-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
  }

  .step-title {
    font-size: 12px !important;
  }

  .step-badge {
    font-size: 8px !important;
    padding: 1px 6px !important;
  }

  .step-desc {
    font-size: 10px !important;
  }

  .step-data {
    padding: 7px 9px !important;
    font-size: 10px !important;
  }

  .step-tasks {
    gap: 4px !important;
  }

  .task {
    font-size: 10px !important;
  }

  .step-action {
    padding: 6px 10px !important;
    font-size: 10px !important;
    width: 100% !important;
    justify-content: center !important;
  }

  .rm-stat-card {
    padding: 12px !important;
    border-radius: 10px !important;
  }

  .rm-stat-label {
    font-size: 9px !important;
  }

  .unlock-row {
    font-size: 10px !important;
    padding: 5px 0 !important;
  }

  .unlock-icon {
    width: 18px !important;
    height: 18px !important;
    border-radius: 4px !important;
  }

  /* ── CLEARANCE FORM ── */
  .wrap,
  [class*="clearance-wrap"] {
    grid-template-columns: 1fr !important;
  }

  /* ── PRE-TRADE SIDE PANEL ── */
  .right-panel {
    display: none !important;
  }

  /* ── WIZARD ── */
  .wiz-step-label {
    font-size: 8px !important;
  }

  /* ── BOTTOM MOBILE NAV ── */
  .mobile-nav {
    display: flex !important;
  }

  /* ── EDGE PROTOCOL ── */
  .ep-progress-ring {
    width: 56px !important;
    height: 56px !important;
  }

  .ep-streak-cards {
    grid-template-columns: 1fr !important;
  }
}

/* ── MOBILE BOTTOM NAVIGATION BAR ── */
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-3);
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 8px;
  transition: all .15s;
}

.mobile-nav-item.active {
  color: var(--indigo);
  background: var(--indigo-dim);
}

.mobile-nav-item svg {
  width: 20px;
  height: 20px;
}

/* ═══════════════════════════════════════════
   DASHBOARD V2 — Session-aware components
   ═══════════════════════════════════════════ */

/* ── SESSION HERO CARD ── */
.session-hero{background:var(--surface);border:0.5px solid var(--border);border-radius:14px;overflow:hidden;position:relative}
.session-hero.pre-mode{border-color:rgba(74,222,128,.2)}
.session-hero.review-mode{border-color:rgba(124,111,247,.22)}
.session-hero::before{content:'';position:absolute;top:0;left:0;right:0;height:1.5px}
.session-hero.pre-mode::before{background:linear-gradient(90deg,#4ade80,rgba(74,222,128,.15),transparent)}
.session-hero.review-mode::before{background:linear-gradient(90deg,#7c6ff7,rgba(124,111,247,.15),transparent)}
.sh-top{padding:16px 18px 14px;display:flex;align-items:flex-start;gap:14px}
.sh-icon{width:44px;height:44px;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0}
.sh-body{flex:1}
.sh-eyebrow{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px;display:flex;align-items:center;gap:5px;font-family:'DM Mono',monospace}
.sh-title{font-size:16px;font-weight:600;margin-bottom:3px;letter-spacing:-.01em;color:var(--text-1)}
.sh-sub{font-size:11px;color:rgba(255,255,255,.35);line-height:1.5}
.sh-divider{height:0.5px;background:var(--border);margin:0 18px}
.sh-bottom{padding:14px 18px;display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.sh-stat{flex:1;min-width:70px}
.sh-stat-label{font-size:9px;color:rgba(255,255,255,.3);font-family:'DM Mono',monospace;text-transform:uppercase;letter-spacing:.06em;margin-bottom:3px}
.sh-stat-val{font-size:17px;font-weight:600;line-height:1;color:var(--text-1)}
.sh-stat-sub{font-size:10px;color:rgba(255,255,255,.3);margin-top:2px}

/* ── KPI CARDS (new style) ── */
.kpi-card-new{background:var(--surface);border:0.5px solid var(--border);border-radius:11px;padding:14px 16px}
.kpi-lbl-new{font-size:10px;color:rgba(255,255,255,.3);font-family:'DM Mono',monospace;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px}
.kpi-val-new{font-size:26px;font-weight:700;line-height:1;margin-bottom:3px;letter-spacing:-.02em}
.kpi-chg-new{font-size:10px;font-family:'DM Mono',monospace;margin-top:4px}

/* ── DNA CONDITIONS MINI ── */
.dna-cond-item{display:flex;align-items:center;gap:8px;padding:7px 10px;background:rgba(255,255,255,.04);border-radius:7px;border:0.5px solid rgba(255,255,255,.07)}
.dna-cond-icon{width:22px;height:22px;border-radius:5px;display:flex;align-items:center;justify-content:center;font-size:11px;flex-shrink:0}
.dna-cond-label{font-size:11px;color:rgba(255,255,255,.55);flex:1}
.dna-cond-val{font-size:11px;font-weight:600;color:#4ade80}

/* ── COT MINI ── */
.cot-row-new{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:0.5px solid var(--border)}
.cot-row-new:last-child{border-bottom:none}
.cot-inst-new{font-size:11px;font-weight:600;width:54px;flex-shrink:0;color:var(--text-1)}
.cot-bar-bg-new{flex:1;height:4px;background:rgba(255,255,255,.06);border-radius:2px;overflow:hidden}
.cot-bar-fill-new{height:100%;border-radius:2px}
.cot-dir-new{font-size:10px;font-weight:600;width:36px;text-align:right;font-family:'DM Mono',monospace}

/* ── EDGE PROTOCOL CHAIN ── */
.ep-dot-new{width:22px;height:22px;border-radius:5px;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:600}
.ep-done-new{background:rgba(74,222,128,.1);border:0.5px solid rgba(74,222,128,.25);color:#4ade80}
.ep-skip-new{background:rgba(248,113,113,.07);border:0.5px solid rgba(248,113,113,.18);color:#f87171}
.ep-today-new{background:rgba(124,111,247,.12);border:1.5px solid #7c6ff7;color:#7c6ff7}
.ep-future-new{background:transparent;border:0.5px solid rgba(255,255,255,.08);color:rgba(255,255,255,.1)}

/* ── MIRROR QUOTE ── */
.mirror-quote-new{font-size:12px;color:rgba(255,255,255,.55);line-height:1.8;font-style:italic;border-left:2px solid rgba(124,111,247,.35);padding-left:10px}

/* ── QUICK ACTIONS ── */
.qa-btn-new{padding:10px 12px;border-radius:9px;border:0.5px solid var(--border);background:rgba(255,255,255,.03);cursor:pointer;transition:all .2s;display:flex;align-items:center;gap:8px;text-align:left;width:100%;font-family:inherit}
.qa-btn-new:hover{border-color:rgba(255,255,255,.12);background:rgba(255,255,255,.05)}
.qa-icon-new{width:28px;height:28px;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0}
.qa-label-new{font-size:11px;font-weight:600;color:rgba(255,255,255,.75);margin-bottom:1px}
.qa-sub-new{font-size:10px;color:rgba(255,255,255,.3)}

/* ── REVIEW INSIGHT ── */
.review-insight{background:rgba(124,111,247,.06);border:0.5px solid rgba(124,111,247,.2);border-radius:10px;padding:12px 14px;margin-bottom:12px}
.ri-label{font-size:10px;color:#7c6ff7;font-weight:600;text-transform:uppercase;letter-spacing:.07em;margin-bottom:5px;font-family:'DM Mono',monospace}
.ri-text{font-size:12px;color:rgba(255,255,255,.55);line-height:1.7}

/* ── Dashboard v2 mobile ── */
@media (max-width: 768px) {
  .sh-top { flex-direction: column; gap: 10px; padding: 14px; }
  .sh-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 14px;
  }
  .sh-bottom .sh-stat {
    min-width: 0;
    text-align: center;
    padding: 10px 6px;
    background: rgba(255,255,255,.02);
    border-radius: 8px;
    border: 0.5px solid rgba(255,255,255,.05);
  }
  .sh-bottom > div:last-child {
    grid-column: 1 / -1;
    margin-left: 0;
    flex-direction: row;
    display: flex;
    gap: 8px;
  }
  .sh-bottom > div:last-child button {
    flex: 1;
    justify-content: center;
  }
  .kpi-card-new { padding: 12px; }
  .kpi-val-new { font-size: 20px; }
  .qa-btn-new { flex-direction: column; align-items: flex-start; gap: 6px; }
  .dash-grid-2col { grid-template-columns: 1fr !important; }
  .dash-kpi-row { grid-template-columns: 1fr 1fr !important; }
  .dash-qa-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ── Dashboard v2 grid classes ── */
.dash-grid-2col { display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px }
.dash-kpi-row { display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:12px }
.dash-qa-grid { display:grid;grid-template-columns:repeat(4,1fr);gap:8px }

/* ── Dashboard v2 LIGHT MODE ──────────────── */
html[data-theme="light"] .session-hero {
  background: #FFFFFF !important;
  border-color: rgba(0,0,0,.08) !important;
}
html[data-theme="light"] .session-hero.pre-mode { border-color: rgba(5,150,105,.2) !important; }
html[data-theme="light"] .session-hero.review-mode { border-color: rgba(79,70,229,.2) !important; }
html[data-theme="light"] .session-hero.pre-mode::before { background: linear-gradient(90deg,#059669,rgba(5,150,105,.15),transparent) !important; }
html[data-theme="light"] .session-hero.review-mode::before { background: linear-gradient(90deg,#4F46E5,rgba(79,70,229,.15),transparent) !important; }
html[data-theme="light"] .sh-title { color: #1A1917 !important; }
html[data-theme="light"] .sh-sub { color: #6B6B80 !important; }
html[data-theme="light"] .sh-divider { background: rgba(0,0,0,.06) !important; }
html[data-theme="light"] .sh-stat-label { color: #9C9890 !important; }
html[data-theme="light"] .sh-stat-val { color: #1A1917 !important; }
html[data-theme="light"] .sh-stat-sub { color: #9C9890 !important; }

/* KPI cards v2 */
html[data-theme="light"] .kpi-card-new {
  background: #FFFFFF !important;
  border: 1px solid rgba(0,0,0,.07) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
}
html[data-theme="light"] .kpi-lbl-new { color: #6B6B80 !important; }
html[data-theme="light"] .kpi-chg-new { color: #9C9890 !important; }

/* DNA conditions */
html[data-theme="light"] .dna-cond-item {
  background: rgba(0,0,0,.02) !important;
  border-color: rgba(0,0,0,.06) !important;
}
html[data-theme="light"] .dna-cond-label { color: #5C5854 !important; }
html[data-theme="light"] .dna-cond-val { color: #059669 !important; }

/* COT rows */
html[data-theme="light"] .cot-row-new { border-bottom-color: rgba(0,0,0,.06) !important; }
html[data-theme="light"] .cot-inst-new { color: #1A1917 !important; }
html[data-theme="light"] .cot-bar-bg-new { background: rgba(0,0,0,.06) !important; }

/* Edge Protocol dots */
html[data-theme="light"] .ep-done-new { background: rgba(5,150,105,.08) !important; border-color: rgba(5,150,105,.25) !important; color: #059669 !important; }
html[data-theme="light"] .ep-skip-new { background: rgba(220,38,38,.06) !important; border-color: rgba(220,38,38,.18) !important; color: #DC2626 !important; }
html[data-theme="light"] .ep-today-new { background: rgba(79,70,229,.08) !important; border-color: #4F46E5 !important; color: #4F46E5 !important; }
html[data-theme="light"] .ep-future-new { border-color: rgba(0,0,0,.1) !important; color: rgba(0,0,0,.15) !important; }

/* Mirror quote */
html[data-theme="light"] .mirror-quote-new { color: #5C5854 !important; border-left-color: rgba(79,70,229,.3) !important; }

/* Quick actions */
html[data-theme="light"] .qa-btn-new {
  background: rgba(0,0,0,.015) !important;
  border-color: rgba(0,0,0,.07) !important;
}
html[data-theme="light"] .qa-btn-new:hover {
  background: rgba(0,0,0,.03) !important;
  border-color: rgba(0,0,0,.12) !important;
}
html[data-theme="light"] .qa-label-new { color: #1A1917 !important; }
html[data-theme="light"] .qa-sub-new { color: #9C9890 !important; }

/* Review insight */
html[data-theme="light"] .review-insight { background: rgba(79,70,229,.04) !important; border-color: rgba(79,70,229,.12) !important; }
html[data-theme="light"] .ri-text { color: #5C5854 !important; }

/* ── Inline style overrides via attribute selectors ── */
/* Fix all inline rgba(255,255,255,...) text in light mode */
html[data-theme="light"] .session-hero [style*="rgba(255,255,255"] {
  color: #5C5854 !important;
}
html[data-theme="light"] .session-hero [style*="color:#4ade80"] { color: #059669 !important; }
html[data-theme="light"] .session-hero [style*="color:#f87171"] { color: #DC2626 !important; }
html[data-theme="light"] .session-hero [style*="color:#7c6ff7"] { color: #4F46E5 !important; }
html[data-theme="light"] .session-hero [style*="color:#fbbf24"] { color: #B45309 !important; }

html[data-theme="light"] .kpi-card-new [style*="rgba(255,255,255"] { color: #9C9890 !important; }
html[data-theme="light"] .kpi-card-new [style*="color:#4ade80"] { color: #059669 !important; }
html[data-theme="light"] .kpi-card-new [style*="color:#f87171"] { color: #DC2626 !important; }

html[data-theme="light"] .card [style*="rgba(255,255,255,.25)"],
html[data-theme="light"] .card [style*="rgba(255,255,255,.3)"],
html[data-theme="light"] .card [style*="rgba(255,255,255,.35)"] {
  color: #9C9890 !important;
}
html[data-theme="light"] .card [style*="rgba(255,255,255,.4)"],
html[data-theme="light"] .card [style*="rgba(255,255,255,.45)"],
html[data-theme="light"] .card [style*="rgba(255,255,255,.5)"],
html[data-theme="light"] .card [style*="rgba(255,255,255,.55)"] {
  color: #5C5854 !important;
}
html[data-theme="light"] .card [style*="rgba(255,255,255,.6)"],
html[data-theme="light"] .card [style*="rgba(255,255,255,.7)"],
html[data-theme="light"] .card [style*="rgba(255,255,255,.75)"],
html[data-theme="light"] .card [style*="rgba(255,255,255,.8)"],
html[data-theme="light"] .card [style*="rgba(255,255,255,.85)"] {
  color: #1A1917 !important;
}
html[data-theme="light"] .card [style*="color:#4ade80"] { color: #059669 !important; }
html[data-theme="light"] .card [style*="color:#f87171"] { color: #DC2626 !important; }
html[data-theme="light"] .card [style*="color:#7c6ff7"] { color: #4F46E5 !important; }
html[data-theme="light"] .card [style*="color:#fbbf24"] { color: #B45309 !important; }

/* Fix inline background colors on light mode */
html[data-theme="light"] .card [style*="background:rgba(255,255,255,.04)"],
html[data-theme="light"] .card [style*="background:rgba(255,255,255,.03)"],
html[data-theme="light"] .card [style*="background:rgba(255,255,255,.06)"],
html[data-theme="light"] .card [style*="background:rgba(255,255,255,.08)"] {
  background: rgba(0,0,0,.03) !important;
}
html[data-theme="light"] .card [style*="border-bottom:0.5px solid rgba(255,255,255,.05)"] {
  border-bottom-color: rgba(0,0,0,.06) !important;
}

/* Session hero inline backgrounds */
html[data-theme="light"] .session-hero [style*="background:rgba(255,255,255,.04)"],
html[data-theme="light"] .session-hero [style*="background:rgba(255,255,255,.06)"] {
  background: rgba(0,0,0,.03) !important;
}

/* Mobile calendar sheet close button */
html[data-theme="light"] #cal-sheet-close {
  background: rgba(0,0,0,.05) !important;
  border-color: rgba(0,0,0,.1) !important;
  color: #5C5854 !important;
}

/* Mobile sh-bottom stat cards */
@media (max-width: 768px) {
  html[data-theme="light"] .sh-bottom .sh-stat {
    background: rgba(0,0,0,.015) !important;
    border-color: rgba(0,0,0,.06) !important;
  }
}

/* Pulse animation for pre-session */
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }
