/* ══════════════════════════════════════════════════════════════════════════════
   TRADER TO TRADER (T2T) - THEME PRESETS ENGINE
   1. Matte Pro (Default Non-Neon)
   2. Tokyo Midnight (Deep Navy Slate - Eye Comfort)
   3. Bloomberg Gold (Financial Terminal - Warm Amber & Charcoal)
   4. Cyberpunk Scalper (Neon Matrix - High-Octane Fast Scalping)
   5. OLED Stealth (Pitch Black #000000 - Battery Saver & High Contrast)
   6. Clean Studio Light (Crisp Daylight Mode)
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── 1. MATTE PRO (DEFAULT) ── */
:root[data-theme="matte"],
:root:not([data-theme]):not(.theme-light) {
  --bg-dark: #0d1117 !important;
  --bg-surface: #161b22 !important;
  --bg-card: #161b22 !important;
  --border-color: #30363d !important;
  --border-subtle: #21262d !important;
  --text-main: #e6edf3 !important;
  --text-muted: #8b949e !important;
  --accent-primary: #2563eb !important;
  --accent-cyan: #60a5fa !important;
  --accent-emerald: #22c55e !important;
  --accent-rose: #ef4444 !important;
  --accent-amber: #eab308 !important;
  --theme-accent-glow: transparent !important;
}

/* ── 2. TOKYO MIDNIGHT (DEEP NAVY SLATE) ── */
:root[data-theme="tokyo-midnight"] {
  --bg-dark: #0b0f19 !important;
  --bg-surface: #151c2c !important;
  --bg-card: #151c2c !important;
  --border-color: #243049 !important;
  --border-subtle: #192236 !important;
  --text-main: #f1f5f9 !important;
  --text-muted: #94a3b8 !important;
  --accent-primary: #38bdf8 !important;
  --accent-cyan: #38bdf8 !important;
  --accent-emerald: #10b981 !important;
  --accent-rose: #f43f5e !important;
  --accent-amber: #fbbf24 !important;
  --theme-accent-glow: rgba(56, 189, 248, 0.12) !important;
}

/* Tokyo Midnight Accent Tweaks */
[data-theme="tokyo-midnight"] .brand-title-smart {
  color: #38bdf8 !important;
}
[data-theme="tokyo-midnight"] .rt-grid-btn.active,
[data-theme="tokyo-midnight"] .btn-modal-apply,
[data-theme="tokyo-midnight"] .dock-rail-item.active::before {
  background: #0284c7 !important;
}

/* ── 3. BLOOMBERG TERMINAL GOLD ── */
:root[data-theme="bloomberg"] {
  --bg-dark: #101216 !important;
  --bg-surface: #191c22 !important;
  --bg-card: #191c22 !important;
  --border-color: #2f3540 !important;
  --border-subtle: #222730 !important;
  --text-main: #f3f4f6 !important;
  --text-muted: #9ca3af !important;
  --accent-primary: #f59e0b !important;
  --accent-cyan: #f59e0b !important;      /* Signature Bloomberg Gold */
  --accent-emerald: #10b981 !important;
  --accent-rose: #ef4444 !important;
  --accent-amber: #f59e0b !important;
  --theme-accent-glow: rgba(245, 158, 11, 0.15) !important;
}

/* Bloomberg Gold Accents */
[data-theme="bloomberg"] .brand-title-smart {
  color: #f59e0b !important;
}
[data-theme="bloomberg"] .brand-badge {
  color: #fbbf24 !important;
  border-color: #d97706 !important;
  background: rgba(245, 158, 11, 0.08) !important;
}
[data-theme="bloomberg"] .rt-grid-btn.active,
[data-theme="bloomberg"] .btn-modal-apply,
[data-theme="bloomberg"] .dock-rail-item.active::before {
  background: #d97706 !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
}
[data-theme="bloomberg"] .recom-tab-btn.active,
[data-theme="bloomberg"] .movers-tab-btn.active {
  border-bottom-color: #f59e0b !important;
  color: #fbbf24 !important;
}
[data-theme="bloomberg"] input:focus, 
[data-theme="bloomberg"] select:focus, 
[data-theme="bloomberg"] textarea:focus {
  border-color: #f59e0b !important;
}

/* ── 4. CYBERPUNK SCALPER (NEON MATRIX) ── */
:root[data-theme="cyberpunk"] {
  --bg-dark: #050508 !important;
  --bg-surface: #0b0d18 !important;
  --bg-card: #0b0d18 !important;
  --border-color: #1e243d !important;
  --border-subtle: #121626 !important;
  --text-main: #ffffff !important;
  --text-muted: #828ea8 !important;
  --accent-primary: #00f0ff !important;
  --accent-cyan: #00f0ff !important;      /* Electric Neon Cyan */
  --accent-emerald: #00ff88 !important;   /* Laser Neon Green */
  --accent-rose: #ff0055 !important;      /* Laser Neon Red */
  --accent-amber: #ffd700 !important;
  --theme-accent-glow: rgba(0, 240, 255, 0.2) !important;
}

/* Cyberpunk Neon Highlights */
[data-theme="cyberpunk"] .brand-title-smart {
  color: #00f0ff !important;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5) !important;
}
[data-theme="cyberpunk"] .rt-grid-btn.active,
[data-theme="cyberpunk"] .btn-modal-apply,
[data-theme="cyberpunk"] .dock-rail-item.active::before {
  background: #00f0ff !important;
  color: #050508 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4) !important;
}
[data-theme="cyberpunk"] .recom-tab-btn.active,
[data-theme="cyberpunk"] .movers-tab-btn.active {
  border-bottom-color: #00f0ff !important;
  color: #00f0ff !important;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4) !important;
}
[data-theme="cyberpunk"] input:focus, 
[data-theme="cyberpunk"] select:focus, 
[data-theme="cyberpunk"] textarea:focus {
  border-color: #00f0ff !important;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.25) !important;
}
[data-theme="cyberpunk"] .rt-col-resizer:hover::after,
[data-theme="cyberpunk"] .rt-col-resizer.active::after {
  background: #00f0ff !important;
  box-shadow: 0 0 8px #00f0ff !important;
}

/* ── 5. OLED STEALTH (PURE BLACK) ── */
:root[data-theme="oled"] {
  --bg-dark: #000000 !important;
  --bg-surface: #0a0a0a !important;
  --bg-card: #0a0a0a !important;
  --border-color: #1e1e1e !important;
  --border-subtle: #121212 !important;
  --text-main: #ffffff !important;
  --text-muted: #737373 !important;
  --accent-primary: #3b82f6 !important;
  --accent-cyan: #60a5fa !important;
  --accent-emerald: #22c55e !important;
  --accent-rose: #ef4444 !important;
  --accent-amber: #eab308 !important;
  --theme-accent-glow: transparent !important;
}

[data-theme="oled"] body {
  background-color: #000000 !important;
}
[data-theme="oled"] .rt-col-card,
[data-theme="oled"] .recom-drawer,
[data-theme="oled"] .movers-drawer,
[data-theme="oled"] .broksum-drawer,
[data-theme="oled"] .signals-drawer,
[data-theme="oled"] .watchlist-drawer,
[data-theme="oled"] .news-drawer,
[data-theme="oled"] .settings-drawer,
[data-theme="oled"] .layout-drawer {
  background: #000000 !important;
}

/* ── 6. CLEAN STUDIO LIGHT (MODE SIANG) ── */
:root[data-theme="light"],
:root.theme-light {
  --bg-dark: #f1f5f9 !important;
  --bg-surface: #ffffff !important;
  --bg-card: #ffffff !important;
  --border-color: #cbd5e1 !important;
  --border-subtle: #e2e8f0 !important;
  --text-main: #0f172a !important;
  --text-muted: #475569 !important;
  --accent-primary: #0284c7 !important;
  --accent-cyan: #0284c7 !important;
  --accent-emerald: #15803d !important;
  --accent-rose: #dc2626 !important;
  --accent-amber: #b45309 !important;
}

/* ── THEME PRESET SELECTOR UI (IN SETTINGS DRAWER) ── */
.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

@media (max-width: 480px) {
  .theme-presets-grid {
    grid-template-columns: 1fr;
  }
}

.theme-preset-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color, #30363d);
  background: var(--bg-surface, #161b22);
  cursor: pointer;
  user-select: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-preset-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary, #38bdf8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-preset-card.active {
  border-color: var(--accent-primary, #38bdf8);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 0 1.5px var(--accent-primary, #38bdf8), 0 4px 14px rgba(0, 0, 0, 0.4);
}

.theme-preset-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-swatches {
  display: flex;
  align-items: center;
  gap: 4px;
}

.theme-swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-active-tag {
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.4px;
  display: none;
}

.theme-preset-card.active .theme-active-tag {
  display: inline-flex;
  background: var(--accent-primary, #38bdf8);
  color: #fff;
}

.theme-preset-name {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
  letter-spacing: 0.2px;
}

.theme-preset-desc {
  font-size: 9px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.35;
}
