/* ============================================================
   themes.css — 4 Themes + Responsive
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Nunito:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── Theme 1: Dark Teal ───────────────────────────────── */
:root, [data-theme="teal"] {
  --bg:         #060b18;
  --bg2:        #0d1528;
  --bg3:        #131f35;
  --border:     #1e2d47;
  --border2:    #283d5e;
  --accent:     #00e5cc;
  --accent-dim: rgba(0,229,204,0.1);
  --green:      #4ade80;
  --red:        #f87171;
  --amber:      #fb923c;
  --text:       #e2e8f0;
  --muted:      #4e6888;
  --font-ui:    'Outfit', sans-serif;
  --font-mono:  'JetBrains Mono', monospace;
  --radius:     10px;
  --nav-h:      60px;
  --weight-hdr: 700;
  --weight-num: 600;
  --ls-title:   0px;
}

/* ── Theme 2: Slate Night ─────────────────────────────── */
[data-theme="material"] {
  --bg:         #0f1117;
  --bg2:        #181c27;
  --bg3:        #1f2435;
  --border:     #272d40;
  --border2:    #333b55;
  --accent:     #6c8bfa;
  --accent-dim: rgba(108,139,250,0.1);
  --green:      #56d1a0;
  --red:        #ff6b6b;
  --amber:      #ffa94d;
  --text:       #dde3f0;
  --muted:      #5a6480;
  --font-ui:    'DM Sans', sans-serif;
  --font-mono:  'DM Mono', monospace;
  --radius:     8px;
  --nav-h:      60px;
  --weight-hdr: 600;
  --weight-num: 500;
  --ls-title:   0px;
}

/* ── Theme 3: Forest Dark ─────────────────────────────── */
[data-theme="gold"] {
  --bg:         #080f0a;
  --bg2:        #0e1a10;
  --bg3:        #152418;
  --border:     #1d3320;
  --border2:    #274830;
  --accent:     #3ddc84;
  --accent-dim: rgba(61,220,132,0.1);
  --green:      #69f0ae;
  --red:        #ff5252;
  --amber:      #ffca28;
  --text:       #e8f5e9;
  --muted:      #4a6e51;
  --font-ui:    'Nunito', sans-serif;
  --font-mono:  'DM Mono', monospace;
  --radius:     12px;
  --nav-h:      60px;
  --weight-hdr: 700;
  --weight-num: 600;
  --ls-title:   0px;
}

/* ── Theme 4: Clean Light ─────────────────────────────── */
[data-theme="clean"] {
  --bg:         #f0f4fa;
  --bg2:        #ffffff;
  --bg3:        #e8eef8;
  --border:     #d0d9ec;
  --border2:    #b8c4dc;
  --accent:     #2563eb;
  --accent-dim: rgba(37,99,235,0.08);
  --green:      #16a34a;
  --red:        #dc2626;
  --amber:      #d97706;
  --text:       #1e2535;
  --muted:      #6b7694;
  --font-ui:    'Plus Jakarta Sans', sans-serif;
  --font-mono:  'DM Mono', monospace;
  --radius:     12px;
  --nav-h:      60px;
  --weight-hdr: 700;
  --weight-num: 600;
  --ls-title:   -0.3px;
  color-scheme: light;
}

/* Light theme overrides */
[data-theme="clean"] #header            { background:#ffffff; border-color:var(--border); }
[data-theme="clean"] #bottom-nav        { background:rgba(255,255,255,0.97) !important; border-color:var(--border); }
[data-theme="clean"] .inst-card         { box-shadow:0 2px 8px rgba(0,0,0,.08); }
[data-theme="clean"] .kpi-card          { box-shadow:0 1px 4px rgba(0,0,0,.05); }
[data-theme="clean"] .fxe-card          { box-shadow:0 2px 8px rgba(0,0,0,.06); }
[data-theme="clean"] .legend-box        { background:rgba(37,99,235,.04); }
[data-theme="clean"] select option      { background:#ffffff; }
[data-theme="clean"] .lock-box          { background:#ffffff; }
[data-theme="clean"] .action-btn        { border-color:var(--accent); background:var(--accent-dim); color:var(--accent); }


/* ── Theme 5: FXEdge — Light teal, navy header, white cards ─
   Based on fxedgecalc.netlify.app design language            */
[data-theme="fxedge"] {
  --bg:         #e8edf0;
  --bg2:        #ffffff;
  --bg3:        #f0f4f7;
  --border:     #d5dfe6;
  --border2:    #bfcdd6;
  --accent:     #2e97b4;
  --accent2:    #3cb8d8;
  --accent-dim: rgba(46,151,180,0.10);
  --green:      #27ae60;
  --red:        #e74c3c;
  --amber:      #e67e22;
  --text:       #1a2f3d;
  --muted:      #7a9aaa;
  --font-ui:    'Outfit', sans-serif;
  --font-mono:  'DM Mono', monospace;
  --radius:     18px;
  --nav-h:      60px;
  --weight-hdr: 700;
  --weight-num: 700;
  --ls-title:   -0.5px;
  color-scheme: light;

  /* Navy gradient for header */
  --hdr-bg: linear-gradient(155deg, #122d3d 0%, #18384a 60%, #1f5166 100%);
}

/* FXEdge-specific overrides */
[data-theme="fxedge"] #header {
  background: var(--hdr-bg);
  border-bottom: none;
  padding: 0 24px;
}
[data-theme="fxedge"] .logo { color: #fff; }
[data-theme="fxedge"] .logo-accent { color: var(--accent2); }
[data-theme="fxedge"] .demo-badge.demo {
  background: rgba(60,184,216,0.2); color: var(--accent2);
  border-color: var(--accent2);
}
[data-theme="fxedge"] .demo-badge.live {
  background: rgba(39,174,96,0.2); color: #27ae60;
  border-color: #27ae60;
}
[data-theme="fxedge"] .hdr-btn { color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.2); }
[data-theme="fxedge"] .week-badge { color: rgba(255,255,255,0.5); }
[data-theme="fxedge"] .nav-item { color: rgba(255,255,255,0.5); font-weight: 600; }
[data-theme="fxedge"] .nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
[data-theme="fxedge"] .nav-item.active {
  background: rgba(60,184,216,0.15);
  color: var(--accent2);
  border-bottom: 2px solid var(--accent2);
}
[data-theme="fxedge"] .nav-dot { background: transparent; }
[data-theme="fxedge"] .nav-item.active .nav-dot { background: var(--accent2); }

/* Cards */
[data-theme="fxedge"] .kpi-card {
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  border-color: transparent;
}
[data-theme="fxedge"] .inst-card {
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  border-color: transparent;
}
[data-theme="fxedge"] .legend-box { background: rgba(46,151,180,.05); }
[data-theme="fxedge"] .fxe-card   { box-shadow: 0 2px 12px rgba(0,0,0,.07); border-color: transparent; }

/* Action button uses teal gradient */
[data-theme="fxedge"] .action-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  border: none; color: #fff;
  box-shadow: 0 4px 14px rgba(46,151,180,.35);
}
[data-theme="fxedge"] .action-btn:hover:not(:disabled) {
  opacity: .9;
}
[data-theme="fxedge"] .fxw-next-btn,
[data-theme="fxedge"] .fxw-calc-btn {
  background: linear-gradient(135deg, #122d3d 0%, #18384a 100%);
  border: none; color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
[data-theme="fxedge"] .fxw-risk-card { background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%); }

/* Instrument cards — white with teal accent top */
[data-theme="fxedge"] .inst-grid { gap: 10px; }
[data-theme="fxedge"] .inst-card { border-top: 3px solid var(--accent); }

/* Scrollbar */
[data-theme="fxedge"] ::-webkit-scrollbar-thumb { background: var(--border2); }

/* SL table */
[data-theme="fxedge"] .fxw-sl-row.current {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
[data-theme="fxedge"] .fxw-mult-btn.active {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-dim);
}
[data-theme="fxedge"] .cur-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border-color: transparent;
}
[data-theme="fxedge"] .fxw-cat-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border-color: transparent;
}
[data-theme="fxedge"] .fxw-pair-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent); color: var(--accent);
}
[data-theme="fxedge"] .fxw-popup-confirm-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
[data-theme="fxedge"] select option { background: #fff; }

/* ── Landscape ────────────────────────────────────────── */
[data-orient="landscape"] .inst-grid { grid-template-columns:repeat(4,1fr); }
