/* ==========================================================================
   OmniQuant Studio - Futuristic Fintech & Cyberpunk Dark Design System
   ========================================================================== */

:root {
  /* Color Palette - Curated Obsidian & Neon Accents */
  --bg-dark-base: #06080e;
  --bg-surface-1: #0b0e17;
  --bg-surface-2: #101524;
  --bg-surface-3: #171e33;
  --bg-glass: rgba(16, 21, 36, 0.75);
  
  --border-subtle: #1c263e;
  --border-focus: #00f5a0;
  --border-glow: rgba(0, 245, 160, 0.35);

  /* Neon Financial Accents */
  --emerald-green: #00f5a0;
  --emerald-green-dark: #00b878;
  --emerald-glow: rgba(0, 245, 160, 0.25);

  --crimson-red: #ff3366;
  --crimson-red-dark: #c9184a;
  --crimson-glow: rgba(255, 51, 102, 0.25);

  --cyan-neon: #00d2ff;
  --neon-cyan: #00d2ff;
  --cyan-glow: rgba(0, 210, 255, 0.25);

  --amber-gold: #ffb800;
  --amber-glow: rgba(255, 184, 0, 0.25);

  --purple-accent: #a855f7;

  /* Typography Colors */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Fonts */
  --font-main: 'Cairo', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Outfit', 'Cairo', sans-serif;

  /* UI Tokens */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow-emerald: 0 0 25px rgba(0, 245, 160, 0.35);
  --shadow-glow-crimson: 0 0 25px rgba(255, 51, 102, 0.35);
  --transition-smooth: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body.dark-theme {
  background-color: var(--bg-dark-base);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header Component
   ========================================================================== */
.app-header {
  height: 56px;
  background: var(--bg-surface-1);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
  z-index: 50;
  backdrop-filter: blur(12px);
  flex-wrap: nowrap;
  white-space: nowrap;
  box-sizing: border-box;
  width: 100%;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-logo {
  position: relative;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10192f, #1b2848);
  border: 1px solid rgba(0, 245, 160, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.logo-pulse {
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle, var(--emerald-glow) 0%, transparent 70%);
  animation: pulse-ring 2.5s infinite;
  z-index: -1;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.6; }
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title .highlight {
  color: var(--emerald-green);
  text-shadow: 0 0 12px var(--emerald-glow);
}

.badge-version {
  background: rgba(0, 210, 255, 0.12);
  color: var(--cyan-neon);
  border: 1px solid rgba(0, 210, 255, 0.3);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.brand-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Market Selector Pills */
.header-market-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.market-pill {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  transition: var(--transition-smooth);
}

.market-pill:hover {
  border-color: var(--cyan-neon);
}

.market-pill label {
  color: var(--text-muted);
  font-weight: 600;
}

.pill-dot.live-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--emerald-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-green);
  animation: blink-live 1.6s infinite ease-in-out;
}

@keyframes blink-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.custom-select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.custom-select option {
  background-color: var(--bg-surface-2);
  color: var(--text-main);
}

.feed-status-badge {
  background: rgba(0, 245, 160, 0.08);
  border: 1px solid rgba(0, 245, 160, 0.25);
  color: var(--emerald-green);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.feed-status-badge.ctrader-active {
  background: rgba(0, 245, 160, 0.12);
  border-color: rgba(0, 245, 160, 0.45);
  box-shadow: 0 0 14px rgba(0, 245, 160, 0.2);
}

.bridge-badge {
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.bridge-badge.bridge-badge-connected {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.45);
  color: #c7d2fe;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.bridge-badge.bridge-badge-disconnected {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.btn-sync-ctrader {
  background: rgba(0, 210, 255, 0.10);
  border: 1px solid rgba(0, 210, 255, 0.35);
  color: var(--neon-cyan);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-sync-ctrader:hover {
  background: rgba(0, 210, 255, 0.22);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.35);
  transform: translateY(-1px);
}

.btn-sync-ctrader.syncing .sync-icon {
  display: inline-block;
  animation: spin-ctrader 1s infinite linear;
}

@keyframes spin-ctrader {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Hub vs In-Session Header Visibility */
@keyframes headerControlsFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

body.is-hub-active .header-market-controls,
body.is-hub-active .header-actions,
body:not(.is-chart-active) .header-market-controls,
body:not(.is-chart-active) .header-actions {
  display: none !important;
}

body.is-chart-active .header-market-controls {
  display: flex !important;
  animation: headerControlsFadeIn 0.25s ease forwards;
}

body.is-chart-active .header-actions {
  display: flex !important;
  animation: headerControlsFadeIn 0.25s ease forwards;
}

/* Quotex Export button belongs ONLY to automated strategies mode */
#btn-export-quotex {
  display: none !important;
}

body.session-auto #btn-export-quotex {
  display: flex !important;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
  margin: 0;
}

.balance-badge {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.balance-label {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.balance-val {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--emerald-green);
  text-shadow: 0 0 10px var(--emerald-glow);
}

.btn-primary-glow {
  background: linear-gradient(135deg, var(--emerald-green), var(--emerald-green-dark));
  color: #06110a;
  border: none;
  border-radius: var(--radius-md);
  padding: 4px 11px;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 15px var(--emerald-glow);
  transition: var(--transition-smooth);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px var(--shadow-glow-emerald);
}

.btn-session-config {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 4px 9px;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-smooth);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-session-config:hover {
  border-color: var(--cyan-neon);
  color: var(--cyan-neon);
}

.btn-outline-subtle {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  padding: 4px 9px;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-smooth);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-outline-subtle:hover {
  color: var(--text-main);
  border-color: var(--text-dim);
}

/* ==========================================================================
   Studio Layout: 2 Columns (Maximized Chart Space & Left Execution Dock)
   ========================================================================== */
.studio-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  background-color: var(--bg-dark-base);
  transition: grid-template-columns 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Fullscreen Chart Mode: Expands chart to fill entire screen without any scrollbar */
body.chart-fullscreen-mode {
  overflow: hidden !important;
}

body.chart-fullscreen-mode .app-header {
  display: none !important;
}

body.chart-fullscreen-mode .app-nav-rail {
  display: none !important;
}

body.chart-fullscreen-mode .app-shell {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

body.chart-fullscreen-mode:has(#view-backtest:not(.hidden)) .app-content-area {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

body.chart-fullscreen-mode .studio-layout {
  height: 100vh !important;
  max-height: 100vh !important;
  grid-template-columns: 1fr !important;
  overflow: hidden !important;
}

body.chart-fullscreen-mode .panel-right-dock,
.studio-layout.chart-fullscreen .panel-right-dock {
  display: none !important;
}

.studio-layout.chart-fullscreen {
  grid-template-columns: 1fr !important;
}

.chart-tool-btn.active {
  background: rgba(0, 210, 255, 0.22) !important;
  border-color: var(--cyan-neon) !important;
  color: var(--cyan-neon) !important;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.3) !important;
}

/* Left Sidebar: Code Lab & Sliders */
.panel-left-sidebar {
  background: var(--bg-surface-1);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 16px;
  gap: 14px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--cyan-neon);
}

.panel-tag {
  background: rgba(168, 85, 247, 0.12);
  color: var(--purple-accent);
  border: 1px solid rgba(168, 85, 247, 0.25);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.preset-selector-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.box-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.custom-select.full-width {
  width: 100%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* Code Editor Wrapper */
.code-editor-wrapper {
  background: #080a10;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.code-editor-header {
  background: var(--bg-surface-2);
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.code-lang-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.editor-tools {
  display: flex;
  gap: 6px;
}

.btn-tool {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  padding: 2px 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-tool:hover {
  background: var(--bg-surface-3);
  color: var(--text-main);
  border-color: var(--cyan-neon);
}

#code-input {
  width: 100%;
  height: 180px;
  background: transparent;
  border: none;
  outline: none;
  color: #a5f3fc;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 10px;
  resize: vertical;
  direction: ltr;
  text-align: left;
  user-select: text;
}

#code-input::placeholder {
  direction: rtl;
  text-align: right;
  color: var(--text-dim);
}

/* Action button */
.btn-action-emerald {
  width: 100%;
  background: linear-gradient(135deg, #00f5a0, #00a86b);
  color: #06110a;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px var(--emerald-glow);
  transition: var(--transition-smooth);
}

.btn-action-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 245, 160, 0.45);
}

/* Status Banner */
.status-banner {
  background: rgba(0, 245, 160, 0.08);
  border: 1px solid rgba(0, 245, 160, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.status-banner.error {
  background: rgba(255, 51, 102, 0.08);
  border-color: rgba(255, 51, 102, 0.3);
}

.status-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--emerald-green);
}

.status-banner.error .status-title {
  color: var(--crimson-red);
}

.status-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Dynamic Sliders List */
.dynamic-sliders-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 5px;
}

.section-title-sm {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.sliders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sliders-empty-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  margin-top: 6px;
}

.sliders-empty-hint .hint-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  opacity: 0.85;
  filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.4));
}

.sliders-empty-hint .hint-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.sliders-empty-hint .hint-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.55;
  max-width: 300px;
}

.sliders-empty-hint code {
  color: #00f5a0;
  background: rgba(0, 245, 160, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.btn-disabled {
  opacity: 0.45 !important;
  filter: grayscale(0.65) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.slider-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition-smooth);
}

.slider-card:hover {
  border-color: var(--cyan-neon);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
}

.slider-val-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan-neon);
  background: rgba(0, 210, 255, 0.1);
  padding: 1px 7px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.slider-val-badge.badge-on {
  color: var(--emerald-neon, #00f5a0);
  background: rgba(0, 245, 160, 0.16);
  border: 1px solid rgba(0, 245, 160, 0.4);
}

.slider-val-badge.badge-off {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #090d16;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cyan-neon);
  box-shadow: 0 0 10px var(--cyan-neon);
  cursor: pointer;
  transition: transform 0.1s;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* ==========================================================================
   Center Panel: Candlestick Canvas & Cinema Replay Bar
   ========================================================================== */
.panel-center-chart {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  background: #07090f;
  overflow: hidden;
}

.chart-top-bar {
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  background: var(--bg-surface-1);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  z-index: 10;
  flex-wrap: nowrap;
  gap: 8px;
  overflow: hidden;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.color-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.color-dot.green { background-color: var(--emerald-green); box-shadow: 0 0 6px var(--emerald-green); }
.color-dot.red { background-color: var(--crimson-red); box-shadow: 0 0 6px var(--crimson-red); }
.color-dot.cyan { background-color: var(--cyan-neon); }
.color-dot.purple { background-color: var(--purple-accent); }

.chart-view-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.chart-tool-btn {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 2px 7px;
  font-size: 0.72rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
  line-height: 1.4;
  flex-shrink: 0;
}

.chart-tool-btn:hover, .chart-tool-btn.active {
  background: var(--bg-surface-3);
  color: var(--cyan-neon);
  border-color: var(--cyan-neon);
}

/* Canvas Area */
.canvas-chart-container {
  flex: 1;
  min-height: 0 !important;
  position: relative;
  width: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #0a0e18 0%, #05070c 100%);
}

#main-chart-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

#rsi-sub-canvas {
  display: none !important;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
}

/* Crosshair HUD */
.crosshair-hud {
  position: absolute;
  top: 12px;
  left: 16px;
  background: rgba(11, 14, 23, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
  backdrop-filter: blur(6px);
  z-index: 15;
}

.crosshair-hud.hidden { display: none; }
.crosshair-hud span { color: var(--text-main); font-weight: 600; }

/* Active Trade HUD permanently hidden as requested by user */
.active-trade-hud,
#active-trade-hud {
  display: none !important;
}

/* Active Live Trade Row in Bottom Table (Global Platforms Style) */
.trade-row-active {
  background: linear-gradient(90deg, rgba(255, 170, 0, 0.12) 0%, rgba(0, 210, 255, 0.08) 100%) !important;
  border-right: 3px solid #ffaa00 !important;
  box-shadow: inset 0 0 15px rgba(255, 170, 0, 0.08);
}

.trade-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 170, 0, 0.2);
  border: 1px solid rgba(255, 170, 0, 0.5);
  color: #ffaa00;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
}

.trade-live-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffaa00;
  box-shadow: 0 0 8px #ffaa00;
  animation: pulseLiveDot 1s infinite alternate;
}

@keyframes pulseLiveDot {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

.trade-active-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 210, 255, 0.18);
  border: 1px solid rgba(0, 210, 255, 0.5);
  color: #00d2ff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.live-tracking-btn {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(0, 245, 160, 0.2)) !important;
  border: 1px solid #00d2ff !important;
  color: #00f5a0 !important;
  font-weight: 700 !important;
  cursor: pointer;
}

.live-tracking-btn:hover {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.35), rgba(0, 245, 160, 0.35)) !important;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.btn-return-latest-candle {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(6, 182, 212, 0.95));
  color: #04101c;
  border: 1px solid #00f5a0;
  border-radius: 30px;
  padding: 6px 18px;
  font-family: var(--font-family);
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  z-index: 28;
  box-shadow: 0 4px 20px rgba(0, 210, 255, 0.45);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.btn-return-latest-candle:hover {
  transform: translateX(-50%) scale(1.06);
  box-shadow: 0 6px 25px rgba(0, 245, 160, 0.7);
}

.btn-return-latest-candle.hidden {
  display: none !important;
}

/* Auto-Play Advance upon Trade Entry */
.autoplay-control-group {
  margin-bottom: 14px;
  background: rgba(16, 21, 36, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.autoplay-chips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 8px;
}

.autoplay-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #cbd5e1;
}

.autoplay-chip .chip-title {
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.autoplay-chip .chip-sub {
  font-size: 0.62rem;
  color: #64748b;
}

.autoplay-chip:hover {
  background: rgba(0, 210, 255, 0.12);
  border-color: rgba(0, 210, 255, 0.4);
  color: #ffffff;
}

.autoplay-chip.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.25), rgba(0, 245, 160, 0.15)) !important;
  border-color: #00d2ff !important;
  color: #00f5a0 !important;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.3);
}

.autoplay-chip.active .chip-sub {
  color: #00d2ff !important;
}

.autoplay-custom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.autoplay-custom-label {
  font-size: 0.73rem;
  color: #94a3b8;
  font-weight: 600;
}

.autoplay-input-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.autoplay-input {
  width: 65px !important;
  height: 28px !important;
  padding: 2px 6px !important;
  font-size: 0.82rem !important;
  text-align: center !important;
  font-weight: 700 !important;
  color: #00f5a0 !important;
  background: rgba(10, 15, 28, 0.8) !important;
  border: 1px solid rgba(0, 210, 255, 0.4) !important;
  border-radius: 4px !important;
}

.autoplay-input-unit {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

@keyframes slide-in-top {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.trade-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trade-dir-badge {
  background: rgba(0, 245, 160, 0.15);
  color: var(--emerald-green);
  border: 1px solid var(--emerald-green);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: 800;
}

.trade-dir-badge.put {
  background: rgba(255, 51, 102, 0.15);
  color: var(--crimson-red);
  border-color: var(--crimson-red);
}

.trade-stake-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--amber-gold);
}

.trade-hud-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hud-timer-circle {
  position: relative;
  width: 50px;
  height: 50px;
}

.circular-chart {
  display: block;
  width: 100%;
  height: 100%;
}

.circle-bg {
  fill: none;
  stroke: var(--bg-surface-3);
  stroke-width: 3.2;
}

.circle-progress {
  fill: none;
  stroke: var(--cyan-neon);
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dasharray 0.3s ease;
}

.hud-timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-main);
}

.hud-pnl-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hud-pnl-status {
  font-size: 0.84rem;
  font-weight: 700;
  margin-top: 2px;
}

.hud-pnl-status.in-the-money {
  color: var(--emerald-green);
  text-shadow: 0 0 10px var(--emerald-glow);
}

.hud-pnl-status.out-the-money {
  color: var(--crimson-red);
  text-shadow: 0 0 10px var(--crimson-glow);
}

/* ==========================================================================
   Live Trade Log Bottom Panel (Matching WizTrader Reference Image 2)
   ========================================================================== */
.live-trades-bottom-panel {
  position: relative;
  background: var(--bg-surface-1);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 240px;
  min-height: 42px;
  max-height: 82vh;
  flex-shrink: 0 !important;
  transition: height 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
  overflow: hidden;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.6);
}

.live-trades-bottom-panel.is-resizing {
  transition: none !important;
  user-select: none;
}

.live-trades-bottom-panel.collapsed {
  height: 42px !important;
}

/* Drag-to-Resize Top Handle */
.trades-resize-handle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  cursor: ns-resize;
  background: transparent;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.trades-resize-handle:hover,
.trades-resize-handle.active {
  background: rgba(0, 245, 160, 0.35);
}

.trades-resize-handle .resize-handle-grip {
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
  transition: all 0.15s ease;
}

.trades-resize-handle:hover .resize-handle-grip,
.trades-resize-handle.active .resize-handle-grip {
  background: var(--emerald-green);
  width: 80px;
  height: 4px;
  box-shadow: 0 0 10px var(--emerald-glow);
}

.live-trades-header {
  height: 42px;
  min-height: 42px;
  background: linear-gradient(90deg, #090e1a, #0d1527);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  cursor: pointer;
  user-select: none;
}

.trades-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.trades-pulse-icon {
  font-size: 1rem;
  color: var(--cyan-neon);
}

.trades-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f1f5f9;
}

.trades-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.trades-badge.count {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.trades-badge.winrate {
  background: rgba(0, 245, 160, 0.12);
  color: var(--emerald-green);
  border: 1px solid rgba(0, 245, 160, 0.3);
}

.trades-badge.pnl.positive {
  background: rgba(0, 245, 160, 0.15);
  color: #00f5a0;
  border: 1px solid rgba(0, 245, 160, 0.35);
  font-family: var(--font-mono);
}

.trades-badge.pnl.negative {
  background: rgba(255, 51, 102, 0.15);
  color: #ff3366;
  border: 1px solid rgba(255, 51, 102, 0.35);
  font-family: var(--font-mono);
}

.trades-badge.pnl.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono);
}

.trades-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-trades-collapse-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: var(--font-main);
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-trades-collapse-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.collapse-arrow {
  font-size: 0.72rem;
  transition: transform 0.2s;
}

.live-trades-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.live-trades-table-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
}

.wiz-trades-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.82rem;
}

.wiz-trades-table th {
  background: #070b14;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.74rem;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 5;
}

.wiz-trades-table td {
  padding: 7px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  white-space: nowrap;
}

.wiz-trades-table tr:hover {
  background: rgba(0, 210, 255, 0.04);
}

.trade-pill-type {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.trade-pill-type.call {
  background: rgba(0, 245, 160, 0.15);
  color: var(--emerald-green);
  border: 1px solid rgba(0, 245, 160, 0.3);
}

.trade-pill-type.put {
  background: rgba(255, 51, 102, 0.15);
  color: var(--crimson-red);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.trade-status-badge {
  font-size: 0.74rem;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 6px;
  display: inline-block;
  letter-spacing: 0.5px;
}

.trade-status-badge.win {
  background: rgba(0, 245, 160, 0.15);
  color: #00f5a0;
  border: 1px solid rgba(0, 245, 160, 0.45);
}

.trade-status-badge.loss {
  background: rgba(255, 51, 102, 0.15);
  color: #ff3366;
  border: 1px solid rgba(255, 51, 102, 0.45);
}

.trade-pnl-cell {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.84rem;
}

.trade-pnl-cell.win {
  color: #00f5a0;
}

.trade-pnl-cell.loss {
  color: #ff3366;
}

.btn-trade-view {
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.35);
  color: #38bdf8;
  border-radius: var(--radius-sm);
  padding: 3px 12px;
  font-family: var(--font-main);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-smooth);
}

.btn-trade-view:hover {
  background: rgba(0, 210, 255, 0.25);
  border-color: var(--cyan-neon);
  color: #fff;
  box-shadow: 0 0 10px var(--cyan-glow);
  transform: translateY(-1px);
}

/* Floating WizTrader Replay Player Dock (Matching Image 2 & 3) */
.wiz-replay-control-bar {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 35;
  background: rgba(10, 15, 28, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: 30px;
  padding: 5px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 20px rgba(0, 210, 255, 0.15);
  direction: ltr;
}

.wiz-btn-restart {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.wiz-btn-restart:hover {
  background: rgba(0, 210, 255, 0.25);
  border-color: var(--cyan-neon);
  color: var(--cyan-neon);
  box-shadow: 0 0 15px var(--cyan-glow);
  transform: rotate(-180deg);
}

.wiz-btn-play {
  background: rgba(0, 245, 160, 0.15);
  border: 1px solid rgba(0, 245, 160, 0.4);
  color: var(--emerald-green);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.wiz-btn-play:hover {
  background: var(--emerald-green);
  color: #04100a;
  box-shadow: 0 0 15px var(--emerald-glow);
  transform: scale(1.08);
}

.wiz-btn-play.playing {
  background: var(--amber-gold);
  border-color: var(--amber-gold);
  color: #0c0800;
  box-shadow: 0 0 15px var(--amber-glow);
}

.wiz-btn-step {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.wiz-btn-step:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.wiz-mode-badge {
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.3);
  color: #00f5a0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.badge-dot.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f5a0;
  box-shadow: 0 0 8px #00f5a0;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.wiz-speed-select {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 3px 6px;
  cursor: pointer;
  outline: none;
}

.wiz-slider-wrap {
  display: flex;
  align-items: center;
  width: 140px;
}

.wiz-candle-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.wiz-candle-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan-neon);
  box-shadow: 0 0 10px var(--cyan-glow);
  cursor: pointer;
  transition: transform 0.15s;
}

.wiz-candle-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  background: #fff;
  box-shadow: 0 0 14px #00d2ff;
}

.wiz-candle-counter-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #cbd5e1;
  white-space: nowrap;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wiz-candle-current {
  color: var(--cyan-neon);
  font-weight: 800;
  font-size: 0.88rem;
}

.wiz-candle-slash {
  color: #64748b;
}

.wiz-candle-total {
  color: #94a3b8;
  font-weight: 600;
}

.wiz-candle-time {
  color: #e2e8f0;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.btn-replay-nav {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-replay-nav:hover {
  background: var(--bg-surface-3);
  color: var(--text-main);
  border-color: var(--cyan-neon);
}

.btn-replay-step {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 36px;
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-replay-step:hover {
  background: var(--bg-surface-3);
  border-color: var(--cyan-neon);
  transform: translateY(-1px);
}

.btn-replay-play {
  background: linear-gradient(135deg, var(--cyan-neon), #0099cc);
  color: #041018;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 18px;
  height: 38px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--cyan-glow);
  transition: var(--transition-smooth);
}

.btn-replay-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.45);
}

.btn-replay-play.playing {
  background: linear-gradient(135deg, var(--amber-gold), #cc9200);
  box-shadow: 0 4px 14px var(--amber-glow);
}

.replay-speed-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-speed {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.speed-buttons {
  display: flex;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-speed {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 9px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-speed:hover, .btn-speed.active {
  background: var(--cyan-neon);
  color: #050f16;
  font-weight: 800;
}

/* Future Candles Visibility Selector in Cinema Replay Bar */
.future-candles-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
}

.label-future-candles {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.future-candles-buttons {
  display: flex;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-future-candle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-future-candle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-future-candle.active {
  background: linear-gradient(135deg, var(--emerald-green), #00c982);
  color: #060a11;
  font-weight: 800;
  box-shadow: 0 0 10px var(--emerald-glow);
}

.btn-future-candle[data-mode="hidden"].active {
  background: linear-gradient(135deg, #ff3366, #cc0033);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.45);
}

.btn-future-candle[data-mode="ghost"].active {
  background: linear-gradient(135deg, var(--neon-cyan), #0099cc);
  color: #041018;
  box-shadow: 0 0 10px var(--cyan-glow);
}

.btn-future-candle[data-mode="visible"].active {
  background: linear-gradient(135deg, #ffd600, #ffaa00);
  color: #0c1017;
  box-shadow: 0 0 10px rgba(255, 214, 0, 0.4);
}

/* Modal Future Candles Triplet */
.future-candles-modal-triplet {
  display: flex;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.future-modal-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 10px 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.future-modal-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.future-modal-btn.active {
  background: var(--cyan-neon);
  color: #041018;
  box-shadow: 0 0 12px var(--cyan-glow);
}

.future-modal-btn[data-mode="hidden"].active {
  background: #ff3366;
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.5);
}

.future-modal-btn[data-mode="ghost"].active {
  background: var(--cyan-neon);
  color: #041018;
}

.future-modal-btn[data-mode="visible"].active {
  background: var(--emerald-green);
  color: #060a11;
  box-shadow: 0 0 12px var(--emerald-glow);
}

.replay-timeline-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cyan-neon);
}

.timeline-index {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Right Dock: Compact Session Command Center (Manual Gym & Auto Stats with Sleek Tabs)
   ========================================================================== */
.panel-right-dock {
  background: var(--bg-surface-1);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 12px 14px;
  gap: 10px;
}

.session-dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
  gap: 10px;
  flex-shrink: 0;
}

.session-dock-title-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dock-header-icon {
  font-size: 1.1rem;
}

.dock-header-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #fff;
}

.dock-title-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dock-header-subtitle {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 600;
}

.session-dock-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-dock-mode-switch {
  background: rgba(255, 170, 0, 0.12);
  border: 1px solid rgba(255, 170, 0, 0.4);
  color: #ffaa00;
  border-radius: var(--radius-md);
  padding: 4px 9px;
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.btn-dock-mode-switch:hover {
  background: rgba(255, 170, 0, 0.25);
  border-color: #ffaa00;
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.35);
}

.btn-dock-mode-switch.auto-style {
  background: rgba(0, 210, 255, 0.12);
  border-color: rgba(0, 210, 255, 0.4);
  color: var(--cyan-neon);
}

.btn-dock-mode-switch.auto-style:hover {
  background: rgba(0, 210, 255, 0.25);
  border-color: var(--cyan-neon);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.35);
}

.btn-dock-session-config {
  display: none !important;
}

.btn-dock-session-config:hover {
  background: rgba(0, 210, 255, 0.2);
  border-color: var(--cyan-neon);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

/* Side-by-Side Segmented Tabs (جنب بعض) */
.session-segmented-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #060911;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
  flex-shrink: 0;
}

.session-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-smooth);
}

.session-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.session-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.18), rgba(0, 210, 255, 0.12));
  color: var(--emerald-green);
  border: 1px solid rgba(0, 245, 160, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.session-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  height: calc(100% - 95px);
  padding-bottom: 6px;
}

.session-tab-pane.hidden {
  display: none !important;
}

.manual-backtest-mini-summary {
  background: linear-gradient(145deg, rgba(0, 245, 160, 0.06), var(--bg-surface-2));
  border: 1px solid rgba(0, 245, 160, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}

.btn-link-tab {
  background: transparent;
  border: none;
  color: var(--cyan-neon);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.btn-link-tab:hover {
  color: #fff;
}

.mini-kpi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
}

.dock-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dock-sub-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--emerald-green);
  background: rgba(0, 245, 160, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.manual-quick-info-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dock-section {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dock-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.dock-badge {
  background: rgba(0, 245, 160, 0.1);
  color: var(--emerald-green);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.btn-mini-refresh {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--cyan-neon);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-mini-refresh:hover {
  background: rgba(0, 210, 255, 0.1);
  border-color: var(--cyan-neon);
}

/* Stake & Expiry Controls */
.dock-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stake-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dock-number-input {
  width: 100%;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--amber-gold);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  outline: none;
  text-align: center;
}

.quick-stake-chips {
  display: flex;
  gap: 6px;
}

.chip {
  flex: 1;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chip:hover, .chip.active {
  background: var(--amber-gold);
  color: #100b00;
  border-color: var(--amber-gold);
  font-weight: 800;
}

/* Expiry Duration Modern Control Group */
.expiry-control-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.expiry-mode-selector {
  display: flex;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 3px;
}

.expiry-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.expiry-mode-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.expiry-mode-btn.active {
  background: rgba(0, 210, 255, 0.16);
  color: var(--cyan-neon);
  border: 1px solid rgba(0, 210, 255, 0.4);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.expiry-candles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.expiry-candle-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 2px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.expiry-candle-btn .btn-top {
  font-family: var(--font-sans);
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.expiry-candle-btn .btn-sub {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.expiry-candle-btn:hover {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.35);
  transform: translateY(-1px);
}

.expiry-candle-btn.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.25), rgba(0, 245, 160, 0.2));
  border-color: var(--cyan-neon);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
}

.expiry-candle-btn.active .btn-top {
  color: #fff;
  font-weight: 800;
}

.expiry-candle-btn.active .btn-sub {
  color: var(--cyan-neon);
  font-weight: 700;
}

.expiry-tabs {
  display: flex;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.expiry-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 7px 0;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.expiry-tab:hover, .expiry-tab.active {
  background: var(--cyan-neon);
  color: #06111a;
  font-weight: 800;
}

/* CALL & PUT Buttons */
.action-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.btn-binary-call {
  background: linear-gradient(135deg, #00f5a0, #00b374);
  color: #04140b;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 10px;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--emerald-glow);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-binary-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--shadow-glow-emerald);
}

.btn-binary-call:active {
  transform: translateY(1px);
}

.btn-binary-put {
  background: linear-gradient(135deg, #ff3366, #d90429);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 10px;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--crimson-glow);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-binary-put:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--shadow-glow-crimson);
}

.btn-binary-put:active {
  transform: translateY(1px);
}

.btn-binary-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.binary-arrow {
  font-size: 1.1rem;
  line-height: 1;
}

.binary-main-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.binary-sub-text {
  font-size: 0.68rem;
  opacity: 0.85;
  font-weight: 600;
}

/* KPI Cards Grid */
.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.kpi-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.kpi-card.highlight-emerald {
  border-color: rgba(0, 245, 160, 0.4);
  background: linear-gradient(145deg, rgba(0, 245, 160, 0.06), var(--bg-surface-1));
}

.kpi-card.highlight-cyan {
  border-color: rgba(0, 210, 255, 0.4);
  background: linear-gradient(145deg, rgba(0, 210, 255, 0.06), var(--bg-surface-1));
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.kpi-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  text-align: right;
  max-width: 100%;
}

.kpi-card.highlight-emerald .kpi-value {
  color: var(--emerald-green);
  text-shadow: 0 0 12px var(--emerald-glow);
}

.kpi-card.highlight-cyan .kpi-value {
  color: var(--cyan-neon);
  text-shadow: 0 0 12px var(--cyan-glow);
}

.kpi-sub {
  font-size: 0.66rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Martingale Breakdown Matrix */
.martingale-matrix-box {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matrix-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.matrix-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.matrix-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  width: 140px;
}

.matrix-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--bg-surface-3);
  border-radius: 3px;
  overflow: hidden;
}

.matrix-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease-out;
}

.matrix-bar.fill-cyan { background-color: var(--cyan-neon); }
.matrix-bar.fill-emerald { background-color: var(--emerald-green); }
.matrix-bar.fill-gold { background-color: var(--amber-gold); }

.matrix-val {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  width: 40px;
  text-align: left;
}

/* Trade Log Table */
.trade-log-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trade-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.trade-log-table-container {
  max-height: 140px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface-1);
}

.trade-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  text-align: center;
}

.trade-log-table th {
  background: var(--bg-surface-2);
  color: var(--text-dim);
  padding: 5px 6px;
  font-weight: 600;
  position: sticky;
  top: 0;
}

.trade-log-table td {
  padding: 5px 6px;
  border-top: 1px solid rgba(28, 38, 62, 0.4);
  font-family: var(--font-mono);
}

.trade-badge {
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.68rem;
}

.trade-badge.call { background: rgba(0, 245, 160, 0.15); color: var(--emerald-green); }
.trade-badge.put { background: rgba(255, 51, 102, 0.15); color: var(--crimson-red); }

.res-badge { font-weight: 700; }
.res-badge.win { color: var(--emerald-green); }
.res-badge.loss { color: var(--crimson-red); }

/* ==========================================================================
   Modal Component: Quotex Universal JSON Exporter
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fade-in 0.2s ease-out;
}

.modal-overlay.hidden { display: none; }

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  width: 90%;
  max-width: 680px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card), 0 0 35px var(--emerald-glow);
  overflow: hidden;
  animation: scale-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scale-up {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--emerald-green);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-close-modal:hover { color: var(--crimson-red); }

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.json-code-box {
  background: #05070c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  max-height: 300px;
  overflow-y: auto;
  direction: ltr;
  text-align: left;
}

.json-code-box pre code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #38bdf8;
  line-height: 1.5;
  user-select: text;
}

.modal-footer {
  padding: 14px 20px;
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-surface-1);
}

::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-neon);
}

/* ==========================================================================
   OmniQuant VIP Licensing & Monetization Hub Styles
   ========================================================================== */

/* Header VIP Upgrade Button */
.btn-vip-upgrade {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.12), rgba(168, 85, 247, 0.18));
  border: 1px solid rgba(255, 184, 0, 0.45);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 0 15px rgba(255, 184, 0, 0.15);
}

.btn-vip-upgrade:hover {
  transform: translateY(-2px);
  border-color: var(--amber-gold);
  box-shadow: 0 4px 20px rgba(255, 184, 0, 0.35);
}

.btn-vip-upgrade.active {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.12), rgba(0, 210, 255, 0.18));
  border-color: var(--emerald-green);
  box-shadow: 0 0 15px var(--emerald-glow);
}

.vip-icon {
  font-size: 1rem;
}

.vip-text {
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
}

.vip-badge-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.vip-badge-status.trial {
  background: rgba(255, 184, 0, 0.2);
  color: var(--amber-gold);
  border: 1px solid rgba(255, 184, 0, 0.4);
}

.vip-badge-status.active {
  background: rgba(0, 245, 160, 0.2);
  color: var(--emerald-green);
  border: 1px solid rgba(0, 245, 160, 0.4);
}

/* VIP Hub Modal Container */
.vip-hub-modal {
  max-width: 880px;
  width: 95%;
  background: #090c15;
  border: 1px solid var(--amber-gold);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 184, 0, 0.25);
}

.vip-modal-header {
  background: linear-gradient(90deg, #101524, #182035);
  border-bottom: 1px solid var(--border-subtle);
}

.vip-modal-header .modal-title {
  color: var(--amber-gold);
}

/* Modal Nav Tabs */
.vip-hub-nav {
  display: flex;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.vip-hub-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 12px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.vip-hub-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.vip-hub-tab.active {
  color: var(--amber-gold);
  border-bottom-color: var(--amber-gold);
  background: rgba(255, 184, 0, 0.06);
}

.vip-modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.vip-tab-content {
  display: none;
}

.vip-tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fade-in 0.25s ease-out;
}

/* Billing Cycle Switcher */
.billing-cycle-container {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.billing-cycle-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 4px 6px;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.cycle-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cycle-pill-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.cycle-pill-btn.active {
  background: rgba(0, 245, 160, 0.12);
  border-color: rgba(0, 245, 160, 0.4);
  color: var(--emerald-green);
  box-shadow: 0 0 14px rgba(0, 245, 160, 0.2);
}

.cycle-discount-pill {
  background: linear-gradient(135deg, #ff3366, #ff6b4a);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(255, 51, 102, 0.4);
}

/* Pricing Cards */
.plans-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.pricing-plan-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.pricing-plan-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan-neon);
}

.pricing-plan-card.selected {
  border-color: var(--emerald-green);
  box-shadow: 0 0 20px var(--emerald-glow);
}

.pricing-plan-card.popular {
  border-color: var(--amber-gold);
  background: linear-gradient(160deg, rgba(255, 184, 0, 0.08), var(--bg-surface-2));
}

.pricing-plan-card.popular.selected {
  border-color: var(--amber-gold);
  box-shadow: 0 0 22px rgba(255, 184, 0, 0.35);
}

.pricing-plan-card.elite {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(160deg, rgba(168, 85, 247, 0.09), var(--bg-surface-2));
}

.pricing-plan-card.elite:hover {
  border-color: #a855f7;
}

.pricing-plan-card.elite.selected {
  border-color: #a855f7;
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.4);
}

.plan-badge {
  align-self: flex-start;
  background: var(--bg-surface-3);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.popular-badge {
  background: rgba(255, 184, 0, 0.2);
  color: var(--amber-gold);
  border: 1px solid var(--amber-gold);
}

.elite-badge {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.5);
}

.plan-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.plan-price {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--text-main);
}

.plan-price span {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
}

.plan-calc-note {
  font-size: 0.72rem;
  color: var(--emerald-green);
  font-weight: 700;
  margin-bottom: 12px;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1;
}

.btn-choose-plan {
  background: var(--bg-surface-3);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px;
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  pointer-events: none;
}

.btn-choose-plan:hover, .btn-choose-plan.popular {
  background: linear-gradient(135deg, var(--amber-gold), #d99b00);
  color: #120b00;
  border-color: var(--amber-gold);
  font-weight: 900;
}

.btn-choose-plan.elite {
  background: linear-gradient(135deg, #9333ea, #7e22ce);
  color: #fff;
  border-color: #a855f7;
  font-weight: 800;
}

.btn-choose-plan.elite:hover {
  background: linear-gradient(135deg, #a855f7, #9333ea);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.45);
}

/* Crypto Checkout Card */
.crypto-checkout-box {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkout-title {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.checkout-title strong {
  color: var(--emerald-green);
  font-size: 1.15rem;
  font-family: var(--font-mono);
}

.checkout-content-grid {
  display: flex;
  gap: 20px;
  align-items: center;
}

.qr-code-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qr-frame {
  background: #ffffff;
  padding: 8px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.qr-network-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cyan-neon);
  font-family: var(--font-mono);
}

.checkout-details-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.address-copy-row {
  display: flex;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  align-items: center;
}

.wallet-address-text {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 8px 12px;
  color: var(--cyan-neon);
  direction: ltr;
  text-align: left;
  user-select: text;
}

.btn-copy-addr {
  background: var(--bg-surface-3);
  color: var(--text-main);
  border: none;
  border-right: 1px solid var(--border-subtle);
  padding: 8px 14px;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-copy-addr:hover {
  background: var(--cyan-neon);
  color: #06111a;
}

.txid-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.txid-row {
  display: flex;
  gap: 8px;
}

.txid-input {
  flex: 1;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  outline: none;
  direction: ltr;
}

.txid-input:focus {
  border-color: var(--emerald-green);
}

.btn-verify-txid {
  background: linear-gradient(135deg, var(--emerald-green), #00b374);
  color: #04140b;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-verify-txid:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--emerald-glow);
}

/* Quotex Free Funnel Card */
.quotex-funnel-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.funnel-hero {
  background: linear-gradient(135deg, #101b33, #0a1120);
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.funnel-badge {
  align-self: flex-start;
  background: rgba(0, 210, 255, 0.15);
  color: var(--cyan-neon);
  border: 1px solid var(--cyan-neon);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

.funnel-hero h2 {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
}

.funnel-hero p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.funnel-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.step-num {
  width: 28px;
  height: 28px;
  background: var(--cyan-neon);
  color: #06111a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.9rem;
}

.step-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
}

.step-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.btn-step-action {
  margin-top: auto;
  background: linear-gradient(135deg, #00d2ff, #0099cc);
  color: #041018;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  display: block;
  transition: var(--transition-smooth);
}

.btn-step-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--cyan-glow);
}

.step-note {
  font-size: 0.72rem;
  color: var(--emerald-green);
  font-weight: 700;
  margin-top: auto;
}

.quotex-verify-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.qx-id-input {
  width: 100%;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  outline: none;
}

.btn-verify-qx {
  background: linear-gradient(135deg, var(--emerald-green), #00b374);
  color: #04140b;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-verify-qx:hover {
  box-shadow: 0 4px 15px var(--emerald-glow);
  transform: translateY(-1px);
}

/* License Key Box */
.license-key-box {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.key-box-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.key-box-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.license-key-input {
  width: 100%;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--cyan-neon);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  outline: none;
  direction: ltr;
}

.license-key-input:focus {
  border-color: var(--cyan-neon);
  box-shadow: 0 0 15px var(--cyan-glow);
}

.hwid-info-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.hwid-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: block;
}

.hwid-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  direction: ltr;
}

.btn-copy-hwid {
  background: var(--bg-surface-3);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-copy-hwid:hover {
  color: var(--text-main);
  border-color: var(--cyan-neon);
}

.btn-activate-full {
  background: linear-gradient(135deg, var(--amber-gold), #d99b00);
  color: #120b00;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-activate-full:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 184, 0, 0.4);
}

/* Account Status Card */
.account-status-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.account-header-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #1b2640, #28375c);
  border: 1px solid rgba(255, 184, 0, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.account-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.account-email {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.account-badge-wrap {
  margin-right: auto;
}

.status-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 800;
}

.status-badge.trial {
  background: rgba(255, 184, 0, 0.15);
  color: var(--amber-gold);
  border: 1px solid var(--amber-gold);
}

.status-badge.vip-active {
  background: rgba(0, 245, 160, 0.15);
  color: var(--emerald-green);
  border: 1px solid var(--emerald-green);
}

.account-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.acc-stat-box {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.acc-stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.acc-stat-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.text-emerald { color: var(--emerald-green); }
.text-cyan { color: var(--cyan-neon); }
.text-gold { color: var(--amber-gold); }

/* ==========================================================================
   Modal Component Base Styles
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 14, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fade-in 0.2s ease-out;
}

.modal-overlay.hidden {
  display: none !important;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  background: var(--bg-surface-1);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  animation: scale-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 10000;
  margin: auto;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

@keyframes scale-up {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: var(--transition-smooth);
}

.btn-close-modal:hover {
  color: var(--crimson-red);
}

/* ==========================================================================
   Backtest Session Configuration Modal Styles (قائمة ضبط الباك تست)
   ========================================================================== */

/* Header Session Config Button */
.btn-session-config {
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.35);
  color: var(--cyan-neon);
  border-radius: var(--radius-md);
  padding: 5px 12px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.12);
  transition: var(--transition-smooth);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-session-config:hover {
  transform: translateY(-1px);
  border-color: var(--cyan-neon);
  background: rgba(0, 210, 255, 0.18);
  box-shadow: 0 3px 16px rgba(0, 210, 255, 0.3);
}

/* Modal Window Container */
.session-settings-modal {
  max-width: 960px;
  width: 96%;
  background: #080b13;
  border: 1px solid rgba(0, 210, 255, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 210, 255, 0.2);
}

.settings-modal-header {
  background: linear-gradient(90deg, #0d1220, #131a30);
  border-bottom: 1px solid var(--border-subtle);
}

.settings-modal-header .modal-title {
  color: var(--cyan-neon);
}

.settings-modal-body {
  padding: 24px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Two Columns Grid */
.settings-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.settings-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.col-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.col-icon {
  font-size: 1.1rem;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.form-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.label-with-tool, .label-with-val {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-badge {
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.info-badge:hover {
  opacity: 1;
}

.form-input, .form-select {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition-smooth);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-input:focus, .form-select:focus {
  border-color: var(--cyan-neon);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.form-row-triplet {
  display: flex;
  gap: 10px;
}

.form-row-duo {
  display: flex;
  gap: 12px;
}

.flex-1 {
  flex: 1;
}

.text-amber {
  color: var(--amber-gold) !important;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Quick Time Pills */
.quick-time-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.time-range-pill {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.time-range-pill:hover, .time-range-pill.active {
  background: rgba(0, 210, 255, 0.15);
  color: var(--cyan-neon);
  border-color: var(--cyan-neon);
  box-shadow: 0 0 10px var(--cyan-glow);
}

/* Date Picker Wrap */
.date-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.date-icon {
  position: absolute;
  right: 10px;
  font-size: 0.9rem;
  pointer-events: none;
}

.date-text {
  width: 100%;
  padding-right: 32px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  direction: ltr;
  text-align: right;
  color-scheme: dark;
  cursor: pointer;
}

.date-text::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.date-text::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.date-summary-badge {
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.76rem;
  color: var(--cyan-neon);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  transition: var(--transition-smooth);
}

.chart-active-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--cyan-neon);
  font-weight: 700;
  white-space: nowrap;
}

/* Stake Switch Row */
.toggle-switch-row {
  display: flex;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.toggle-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 0;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.toggle-btn.active {
  background: var(--amber-gold);
  color: #120b00;
}

/* Currency Input & Chips */
.stake-input-and-chips, .payout-input-and-chips {
  display: flex;
  gap: 8px;
}

.currency-input-wrap {
  position: relative;
  width: 120px;
}

.currency-input-wrap .form-input {
  width: 100%;
  padding-left: 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
}

.currency-input-wrap .currency-symbol {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-muted);
}

.highlight-gold {
  color: var(--amber-gold) !important;
}

.highlight-emerald {
  color: var(--emerald-green) !important;
}

.settings-stake-chips, .settings-payout-chips {
  flex: 1;
  display: flex;
  gap: 5px;
}

.chip-btn {
  flex: 1;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.settings-stake-chips .chip-btn.active {
  background: var(--amber-gold);
  color: #100b00;
  border-color: var(--amber-gold);
  font-weight: 900;
}

.settings-payout-chips .chip-btn.active {
  background: var(--emerald-green);
  color: #04140b;
  border-color: var(--emerald-green);
  font-weight: 900;
}

/* Martingale Config Box */
.martingale-config-box {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.martingale-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.martingale-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
}

.martingale-toggle-pills {
  display: flex;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.toggle-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.toggle-pill.active.on {
  background: var(--amber-gold);
  color: #120b00;
}

.toggle-pill.active.off {
  background: var(--crimson-red);
  color: #fff;
}

.martingale-options-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.2s;
}

.martingale-options-wrap.dimmed {
  opacity: 0.35;
  pointer-events: none;
}

.steps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.steps-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.step-buttons-group {
  display: flex;
  gap: 6px;
}

.martingale-step-btn {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.martingale-step-btn.active {
  background: var(--amber-gold);
  color: #100b00;
  border-color: var(--amber-gold);
  font-weight: 800;
}

.martingale-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Live Calc Preview Card */
.live-calc-preview-card {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.06), rgba(0, 210, 255, 0.06));
  border: 1px solid rgba(0, 245, 160, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.calc-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
}

.text-crimson {
  color: var(--crimson-red) !important;
}

/* Binary Notice Card */
.binary-notice-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notice-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--amber-gold);
}

.notice-text {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Modal Footer Buttons */
.settings-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border-subtle);
}

.btn-create-session {
  background: linear-gradient(135deg, var(--cyan-neon), #00a8cc);
  color: #041018;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 24px;
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px var(--cyan-glow);
  transition: var(--transition-smooth);
}

.btn-create-session:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 210, 255, 0.45);
}

.btn-cancel-session {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-cancel-session:hover {
  color: #fff;
  border-color: var(--text-dim);
}

/* ========================================================
   DESKTOP APP SHELL & NAVIGATION RAIL (TRADINGVIEW STYLE)
   ======================================================== */
.app-shell {
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
  position: relative;
  background-color: var(--bg-main);
}

.app-nav-rail {
  width: 68px;
  flex-shrink: 0;
  background: rgba(10, 15, 26, 0.96);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 0;
  z-index: 100;
  transition: width 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.app-nav-rail.expanded {
  width: 190px;
}

.nav-rail-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.nav-rail-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 52px;
  padding: 0 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  font-family: var(--font-main);
  white-space: nowrap;
}

.nav-rail-btn .rail-icon {
  font-size: 1.35rem;
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.nav-rail-btn .rail-label {
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.app-nav-rail.expanded .nav-rail-btn .rail-label {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.nav-rail-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-rail-btn:hover .rail-icon {
  transform: scale(1.15);
}

.nav-rail-btn.active {
  color: var(--emerald-green);
  background: rgba(0, 245, 160, 0.10);
}

.nav-rail-btn .rail-active-pip {
  position: absolute;
  right: 0;
  top: 10px;
  bottom: 10px;
  width: 3.5px;
  background: var(--emerald-green);
  border-radius: 0 4px 4px 0;
  display: none;
  box-shadow: 0 0 10px var(--emerald-glow);
}

.nav-rail-btn.active .rail-active-pip {
  display: block;
}

.nav-rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
}

.nav-rail-toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 40px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-rail-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: var(--emerald-green);
}

.app-nav-rail.expanded .nav-rail-toggle-btn .toggle-icon {
  transform: rotate(180deg);
}

.app-content-area {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* Prevent any page scrolling ONLY when backtest chart workspace is actively visible */
.app-content-area:has(#view-backtest:not(.hidden) #backtest-chart-workspace:not(.hidden)),
#view-backtest:has(#backtest-chart-workspace:not(.hidden)) {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100% !important;
}

.app-view {
  width: 100%;
  min-height: 100%;
}

.app-view.hidden {
  display: none !important;
}

/* ========================================================
   VIEWS COMMON PAGE CONTAINER & HEADERS
   ======================================================== */
.view-page-container {
  padding: 24px 36px 60px 36px;
  max-width: 1650px;
  margin: 0 auto;
}

.view-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 20px;
}

.view-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px 0;
  letter-spacing: -0.3px;
}

.view-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}


/* ========================================================
   VIEW 3: STRATEGY VAULT STYLES
   ======================================================== */
.vault-filters-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ========================================================
   VIEW 3: ADVANCED STRATEGY VAULT & 13 TRADING SCHOOLS
   ======================================================== */
.vault-top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.vault-stats-pills {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.vault-stats-pills .stat-pill {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.vault-stats-pills .stat-pill .pill-num {
  font-weight: 800;
  color: #fff;
}

.vault-stats-pills .stat-pill.highlight-emerald {
  border-color: rgba(0, 245, 160, 0.4);
  background: rgba(0, 245, 160, 0.08);
  color: var(--emerald-green);
}

.vault-stats-pills .stat-pill.highlight-emerald .pill-num {
  color: var(--emerald-green);
}

.vault-view-mode-toggle {
  display: flex;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.btn-mode-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-mode-toggle:hover {
  color: #fff;
}

.btn-mode-toggle.active {
  background: var(--emerald-green);
  color: #060a11;
  font-weight: 800;
  box-shadow: 0 0 10px var(--emerald-glow);
}

/* Schools Horizontal Carousel / Filter Chips */
.vault-filters-bar {
  margin-top: 18px;
  margin-bottom: 16px;
}

.vault-schools-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.vault-schools-carousel::-webkit-scrollbar {
  height: 6px;
}

.vault-schools-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.school-filter-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.school-filter-chip .chip-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--chip-accent, var(--neon-cyan));
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.school-filter-chip .chip-icon {
  font-size: 0.95rem;
}

.school-filter-chip .chip-count {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 10px;
}

.school-filter-chip:hover {
  border-color: var(--chip-accent, var(--emerald-green));
  color: #fff;
  transform: translateY(-1px);
}

.school-filter-chip.active {
  background: rgba(0, 245, 160, 0.1);
  border-color: var(--chip-accent, var(--emerald-green));
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 245, 160, 0.2);
}

.school-filter-chip.active .chip-badge {
  background: var(--chip-accent, var(--emerald-green));
  color: #060a11;
}

.school-filter-chip.school-locked-chip {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.28);
  color: #fca5a5;
  cursor: pointer;
  position: relative;
  opacity: 0.85;
}

.school-filter-chip.school-locked-chip:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fff;
  opacity: 1;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
}

.school-filter-chip .chip-lock-tag {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  margin-inline-start: 4px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.vault-plan-alert-banner {
  animation: fadeIn 0.3s ease;
}

/* Vault Search Row */
.vault-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.vault-search-box {
  position: relative;
  flex: 1;
  max-width: 560px;
}

.vault-search-box .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.vault-search-box input {
  width: 100%;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 10px 42px 10px 16px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.vault-search-box input:focus {
  border-color: var(--emerald-green);
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.2);
}

/* School Sections & Cards Grid */
.vault-school-section {
  margin-bottom: 34px;
}

.school-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(20, 26, 38, 0.95), rgba(12, 17, 26, 0.95));
  border: 1px solid var(--border-subtle);
  border-right: 5px solid var(--section-accent, var(--emerald-green));
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.school-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.school-section-badge {
  background: var(--section-accent, var(--neon-cyan));
  color: #060a11;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}

.school-section-icon {
  font-size: 1.4rem;
}

.school-section-title-wrap {
  display: flex;
  flex-direction: column;
}

.school-section-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: #fff;
}

.school-section-en {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.school-header-desc {
  flex: 1;
  min-width: 260px;
}

.school-header-desc p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.school-header-count .count-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.school-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 20px;
}

.school-cards-grid.full-grid {
  width: 100%;
}

/* Strategy Vault Card */
.strategy-vault-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.strategy-vault-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--strat-accent, linear-gradient(90deg, var(--emerald-green), var(--neon-cyan)));
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.strategy-vault-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 245, 160, 0.45);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
}

.strategy-vault-card:hover::before {
  opacity: 1;
}

.vault-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}

.vault-school-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 4px;
}

.vault-school-tag .school-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--strat-accent, var(--neon-cyan));
}

.vault-school-tag .school-icon {
  font-size: 0.85rem;
}

.vault-school-tag .school-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.vault-header-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-card-header-delete {
  background: rgba(255, 75, 75, 0.1);
  border: 1px solid rgba(255, 75, 75, 0.35);
  color: #ff6b6b;
  border-radius: var(--radius-sm);
  padding: 4px 7px;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-card-header-delete:hover {
  background: rgba(255, 75, 75, 0.3);
  border-color: #ff4b4b;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 75, 75, 0.45);
}

.vault-winrate-badge {
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.35);
  padding: 4px 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
}

.vault-winrate-badge .winrate-val {
  color: var(--emerald-green);
  font-weight: 800;
}

.vault-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
  line-height: 1.45;
}

.vault-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 14px 0;
}

.vault-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 12px;
  font-size: 0.78rem;
}

.vault-card-meta .meta-item {
  display: flex;
  justify-content: space-between;
}

.meta-label {
  color: var(--text-dim);
}

.meta-val {
  color: #fff;
  font-weight: 700;
}

.vault-tags-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.vault-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
}

/* Card Inline Code Drawer */
.card-code-preview-drawer {
  background: rgba(9, 13, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.code-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.code-drawer-header .code-lang {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.btn-drawer-copy {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--neon-cyan);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-drawer-copy:hover {
  background: var(--neon-cyan);
  color: #060a11;
}

.code-snippet-box {
  margin: 0;
  max-height: 90px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #a8b8d0;
  line-height: 1.45;
  white-space: pre;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.code-snippet-box::-webkit-scrollbar {
  width: 4px;
}

.code-snippet-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Card Actions Toolbar */
.vault-card-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.btn-vault-action {
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
  color: #fff;
  white-space: nowrap;
}

.btn-vault-action:hover {
  transform: translateY(-1px);
}

.btn-vault-action.btn-code-view {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.3);
  color: var(--neon-cyan);
}

.btn-vault-action.btn-code-view:hover {
  background: var(--neon-cyan);
  color: #060a11;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.btn-vault-action.btn-copy-code {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e0e8f5;
}

.btn-vault-action.btn-copy-code:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-vault-action.btn-apply-chart {
  background: linear-gradient(135deg, var(--emerald-green), #00c982);
  border-color: transparent;
  color: #060a11;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 9px 10px;
  box-shadow: 0 0 14px var(--emerald-glow);
}

.btn-vault-action.btn-apply-chart:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(0, 245, 160, 0.45);
}

.btn-vault-action.btn-codelab-load {
  background: rgba(0, 210, 255, 0.1);
  border-color: rgba(0, 210, 255, 0.35);
  color: var(--neon-cyan);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 9px 10px;
}

.btn-vault-action.btn-codelab-load:hover {
  background: rgba(0, 210, 255, 0.22);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
}

.btn-vault-action.btn-export-bot {
  background: rgba(255, 152, 0, 0.08);
  border-color: rgba(255, 152, 0, 0.3);
  color: #ffb74d;
  font-weight: 700;
  font-size: 0.78rem;
}

.btn-vault-action.btn-export-bot:hover {
  background: rgba(255, 152, 0, 0.2);
  border-color: #ffb74d;
}

.btn-vault-action.btn-delete-strat {
  grid-column: span 2;
  background: rgba(255, 75, 75, 0.12);
  border: 1px solid rgba(255, 75, 75, 0.4);
  color: #ff7878;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 9px 12px;
  margin-top: 4px;
}

.btn-vault-action.btn-delete-strat:hover {
  background: linear-gradient(135deg, rgba(255, 75, 75, 0.35), rgba(185, 28, 28, 0.45));
  border-color: #ff4b4b;
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 75, 75, 0.45);
}

/* Empty State */
.vault-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface-1);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
}

.vault-empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.vault-empty-state h3 {
  color: #fff;
  margin-bottom: 8px;
}

.vault-empty-state p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
}

/* Dedicated Code Viewer Modal */
.code-viewer-modal {
  max-width: 860px;
  width: 90%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.code-viewer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.code-viewer-toolbar .code-pill {
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.3);
  color: var(--emerald-green);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.code-viewer-pre {
  background: #080c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  max-height: 480px;
  overflow-y: auto;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #d1dcfa;
  white-space: pre;
  tab-size: 4;
  direction: ltr;
  text-align: left;
}

/* ========================================================
   VIEW 4: SETTINGS & INTEGRATIONS STYLES
   ======================================================== */
.settings-cockpit-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 24px;
  align-items: flex-start;
}

.settings-tabs-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.settings-tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: right;
  width: 100%;
}

.settings-tab-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.settings-tab-btn.active {
  background: rgba(0, 245, 160, 0.10);
  border-color: rgba(0, 245, 160, 0.35);
  color: var(--emerald-green);
  box-shadow: 0 0 14px rgba(0, 245, 160, 0.15);
}

.settings-panes-wrapper {
  display: flex;
  flex-direction: column;
}

.settings-section-pane.hidden {
  display: none !important;
}

.pane-group-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.pane-group-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pane-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 18px 0;
  line-height: 1.5;
}

.ctrader-connection-status-box {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 12px;
}

.status-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.status-pill-connected {
  background: rgba(0, 245, 160, 0.15);
  border: 1px solid rgba(0, 245, 160, 0.4);
  color: var(--emerald-green);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill-offline {
  background: rgba(255, 170, 0, 0.15);
  border: 1px solid rgba(255, 170, 0, 0.4);
  color: #ffaa00;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-box-details {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.settings-input, .settings-select {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 10px 14px;
  font-family: var(--font-main);
  font-size: 0.86rem;
  outline: none;
}

.settings-input:focus, .settings-select:focus {
  border-color: var(--emerald-green);
}

.form-toggle-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-label {
  font-size: 0.82rem;
  color: #fff;
}

.color-picker-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-picker-box input[type="color"] {
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
}

.range-slider-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.custom-range {
  flex: 1;
  accent-color: var(--emerald-green);
  cursor: pointer;
}

/* ========================================================
   VIEW 5: VIP HUB & LICENSING STYLES
   ======================================================== */
.vip-hub-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.vip-card-box {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.vip-badge-ribbon {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, var(--emerald-green), #00c97e);
  color: #041018;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 0 12px var(--emerald-glow);
}

.vip-box-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
}

.vip-box-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button input {
  flex: 1;
}

.referral-box {
  background: var(--bg-surface-2);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.referral-link {
  color: var(--neon-cyan);
  text-decoration: underline;
  word-break: break-all;
}

.price-pill-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-val {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--emerald-green);
}

.price-type {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.copy-input-box {
  display: flex;
  gap: 8px;
}

.copy-input-box input {
  flex: 1;
}

.hwid-status-bar {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hwid-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

/* ========================================================
   VIEW: AI STRATEGY STUDIO & CODE LAB STYLES
   ======================================================== */

/* Strategy Creation Launchpad Hub (4 Pathways) */
.codelab-starter-hub {
  background: linear-gradient(135deg, rgba(13, 20, 36, 0.95) 0%, rgba(8, 12, 22, 0.98) 100%);
  border: 1px solid rgba(0, 210, 255, 0.28);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 210, 255, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.codelab-starter-hub::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #a855f7 0%, #00d2ff 50%, #00f5a0 100%);
  opacity: 0.85;
}

.codelab-starter-hub.collapsed .hub-options-grid {
  display: none !important;
}

.codelab-starter-hub.collapsed {
  padding: 12px 20px;
  margin-bottom: 16px;
  background: rgba(13, 20, 36, 0.75);
  border-color: rgba(255, 255, 255, 0.1);
}

.hub-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}

.codelab-starter-hub.collapsed .hub-header-row {
  margin-bottom: 0;
}

.hub-header-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub-header-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.5));
}

.hub-header-title {
  margin: 0 0 3px 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-display);
}

.hub-header-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hub-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.hub-option-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hub-option-card:hover {
  transform: translateY(-3px);
}

.hub-option-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

/* Card Themes */
.hub-option-card.card-ai {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.06) 0%, rgba(13, 20, 36, 0.95) 100%);
}
.hub-option-card.card-ai::before {
  background: linear-gradient(90deg, #c084fc, #00d2ff);
}
.hub-option-card.card-ai:hover {
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.22);
}

.hub-option-card.card-code {
  border-color: rgba(0, 245, 160, 0.35);
  background: linear-gradient(180deg, rgba(0, 245, 160, 0.06) 0%, rgba(13, 20, 36, 0.95) 100%);
}
.hub-option-card.card-code::before {
  background: linear-gradient(90deg, #00f5a0, #00d2ff);
}
.hub-option-card.card-code:hover {
  border-color: rgba(0, 245, 160, 0.65);
  box-shadow: 0 10px 30px rgba(0, 245, 160, 0.22);
}

.hub-option-card.card-custom {
  border-color: rgba(255, 193, 7, 0.35);
  background: linear-gradient(180deg, rgba(255, 193, 7, 0.06) 0%, rgba(13, 20, 36, 0.95) 100%);
}
.hub-option-card.card-custom::before {
  background: linear-gradient(90deg, #ffc107, #ff9800);
}
.hub-option-card.card-custom:hover {
  border-color: rgba(255, 193, 7, 0.65);
  box-shadow: 0 10px 30px rgba(255, 193, 7, 0.22);
}

.hub-option-card.card-schools {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.06) 0%, rgba(13, 20, 36, 0.95) 100%);
}
.hub-option-card.card-schools::before {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}
.hub-option-card.card-schools:hover {
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.22);
}

.hub-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hub-card-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.hub-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
}

.hub-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
}

.hub-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 14px 0;
  flex: 1;
}

.hub-quick-chips {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.chips-label {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.hub-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cbd5e1;
  font-size: 0.74rem;
  padding: 5px 9px;
  border-radius: 4px;
  text-align: right;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hub-chip:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.45);
  color: #c084fc;
}

.hub-card-actions-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hub-action-btn {
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.hub-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-action-ai {
  background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.35);
}

.btn-action-paste {
  background: linear-gradient(135deg, #00f5a0 0%, #00b4d8 100%);
  color: #03101c;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(0, 245, 160, 0.35);
}

.btn-action-blank {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
}
.btn-action-blank:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.btn-action-custom {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  color: #03101c;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(255, 193, 7, 0.35);
}

.btn-action-upgrade {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.btn-action-schools {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.hub-subtle-link-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.76rem;
  cursor: pointer;
  padding: 4px;
  text-align: center;
  transition: color var(--transition-fast);
}
.hub-subtle-link-btn:hover {
  color: #ffc107;
}

.hub-custom-meta-row {
  margin-bottom: 12px;
}

.hub-meta-pill {
  font-size: 0.74rem;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.25);
  color: #ffc107;
  padding: 3px 10px;
  border-radius: 12px;
}

.hub-plan-note {
  font-size: 0.76rem;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  line-height: 1.45;
}

.hub-plan-note.locked {
  background: rgba(239, 68, 68, 0.08);
  border: 1px dashed rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.hub-plan-note.unlocked {
  background: rgba(0, 245, 160, 0.08);
  border: 1px solid rgba(0, 245, 160, 0.3);
  color: #00f5a0;
}

/* Custom Strategies Picker Modal Items */
.picker-strat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: all var(--transition-fast);
}

.picker-strat-item:hover {
  background: rgba(255, 193, 7, 0.05);
  border-color: rgba(255, 193, 7, 0.35);
}

.picker-strat-title {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.picker-strat-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.codelab-cockpit-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: flex-start;
}

.codelab-editor-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.codelab-toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.preset-box-flexible {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

/* New Strategy Toolbar Controls */
.new-strategy-toolbar-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}

.btn-create-new-strat {
  background: linear-gradient(135deg, #00f5a0 0%, #00d2ff 100%);
  color: #03101c !important;
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 18px;
  font-size: 0.86rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 245, 160, 0.32);
  transition: all var(--transition-fast);
}

.btn-create-new-strat:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0, 245, 160, 0.48);
  filter: brightness(1.08);
}

.codelab-active-strat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.32);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  color: #fff;
  white-space: nowrap;
}

.codelab-active-strat-pill .strat-pill-name {
  color: #00d2ff;
  font-weight: 800;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-chip-rename {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-chip-rename:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* Optional Presets Dropdown */
.presets-menu-container {
  position: relative;
}

.presets-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: #0a1122;
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  padding: 8px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.presets-dropdown-menu.hidden {
  display: none !important;
}

.presets-menu-head {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  padding: 4px 8px 6px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  margin-bottom: 4px;
}

.preset-menu-item {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  text-align: right;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.2s;
  color: #e2e8f0;
}

.preset-menu-item:hover {
  background: rgba(0, 210, 255, 0.14);
  color: #00d2ff;
}

.preset-menu-item strong {
  font-size: 0.8rem;
  font-weight: 700;
}

.preset-menu-item span {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Modal Starter Options Cards */
.starter-option-card {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 8px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.starter-option-card:hover {
  border-color: rgba(0, 245, 160, 0.5) !important;
  background: rgba(0, 245, 160, 0.05) !important;
}

.codelab-preset-select {
  flex: 1;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
}

.editor-quick-tools {
  display: flex;
  gap: 8px;
}

.btn-tool-pill {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-tool-pill:hover {
  color: #fff;
  border-color: var(--emerald-green);
}

.ai-assistant-prompt-box {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.05), rgba(0, 210, 255, 0.05));
  border: 1px solid rgba(0, 245, 160, 0.28);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.ai-prompt-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-sparkle-icon {
  font-size: 1.25rem;
  animation: pulse-ring 2s infinite ease-in-out;
}

.ai-prompt-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.86rem;
  outline: none;
}

.btn-ai-submit {
  background: linear-gradient(135deg, #00f5a0 0%, #00d2ff 100%);
  border: none;
  color: #041018;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 14px rgba(0, 245, 160, 0.35);
}

.btn-ai-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.65);
  filter: brightness(1.1);
}

.code-textarea-container {
  background: #060911;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.code-editor-gutter-header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: var(--text-dim);
}

.codelab-textarea {
  width: 100%;
  height: 440px;
  background: transparent;
  border: none;
  color: #d1d5db;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 16px;
  outline: none;
  resize: vertical;
}

.compile-action-row {
  margin-top: 10px;
}

.codelab-action-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 10px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .codelab-action-buttons-grid {
    grid-template-columns: 1fr;
  }
}

.btn-action-emerald {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.2), rgba(0, 210, 255, 0.15));
  border: 1px solid var(--emerald-green);
  color: var(--emerald-green);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all var(--transition-fast);
}

.btn-action-emerald:hover {
  background: var(--emerald-green);
  color: #06110a;
  box-shadow: 0 4px 18px var(--emerald-glow);
  transform: translateY(-2px);
}

.btn-action-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.25));
  border: 1px solid #f59e0b;
  color: #fbbf24;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all var(--transition-fast);
}

.btn-action-amber:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0d0901;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
}

.btn-outline-subtle {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-outline-subtle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.btn-delete-custom {
  background: rgba(255, 51, 102, 0.1) !important;
  color: var(--crimson-red) !important;
  border-color: rgba(255, 51, 102, 0.3) !important;
}

.btn-delete-custom:hover {
  background: var(--crimson-red) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.5) !important;
}

.codelab-sidebar-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.codelab-sliders-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.sliders-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 6px 0 16px 0;
  line-height: 1.5;
}

/* Quick Sliders Slide-Over Drawer on Chart */
.chart-quick-sliders-drawer {
  position: absolute;
  top: 48px;
  right: 12px;
  width: 320px;
  max-height: calc(100% - 60px);
  background: rgba(10, 14, 23, 0.96);
  border: 1px solid var(--emerald-green);
  border-radius: var(--radius-lg);
  padding: 18px;
  z-index: 1000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.chart-quick-sliders-drawer.hidden {
  display: none !important;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.drawer-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.btn-drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}

.chart-active-strategy-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 245, 160, 0.08);
  border: 1px solid rgba(0, 245, 160, 0.25);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  color: #fff;
  flex-shrink: 1;
  min-width: 0;
  white-space: nowrap;
}

.strat-pill-name {
  font-weight: 800;
  color: var(--emerald-green);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.btn-strat-pill-action {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-strat-pill-action:hover {
  color: #fff;
  border-color: var(--emerald-green);
}

/* Quick Martingale Controls in Chart Drawer */
.drawer-martingale-card {
  background: var(--bg-surface-2);
  border: 1px solid rgba(255, 170, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.drawer-mg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-mg-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffaa00;
}

.drawer-mg-toggle-btn {
  background: rgba(255, 170, 0, 0.15);
  border: 1px solid rgba(255, 170, 0, 0.4);
  color: #ffaa00;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-mg-toggle-btn.off {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

.drawer-mg-steps-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-mg-steps-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.drawer-mg-chips {
  display: flex;
  gap: 4px;
}

.drawer-mg-chip {
  background: var(--bg-surface-3, #0f172a);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-mg-chip:hover {
  border-color: #ffaa00;
  color: #fff;
}

.drawer-mg-chip.active {
  background: rgba(255, 170, 0, 0.2);
  border-color: #ffaa00;
  color: #ffaa00;
}

/* Trade Log Martingale Step Badges */
.stake-with-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.stake-amount-highlight {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #ffaa00;
  font-size: 0.88rem;
}

.step-chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 170, 0, 0.16);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.45);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Quick Indicators Overlay Controls in Chart Drawer */
.drawer-indicators-card {
  background: var(--bg-surface-2);
  border: 1px solid rgba(0, 210, 255, 0.22);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.drawer-ind-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-ind-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #cbd5e1;
}

.drawer-ind-toggle-btn {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-ind-toggle-btn.active {
  background: rgba(0, 210, 255, 0.18);
  border-color: rgba(0, 210, 255, 0.55);
  color: #00d2ff;
}

.legend-item.dimmed {
  opacity: 0.35;
  text-decoration: line-through;
}

/* Code Lab specific editor sizing & micro stats */
#view-codelab #code-input {
  height: 420px;
  font-size: 0.88rem;
  color: #a5f3fc;
  line-height: 1.6;
  padding: 16px;
}

.kpi-micro-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kpi-micro-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.8rem;
}

/* General Utility & Hub / Workspace Visibility */
.hidden {
  display: none !important;
}

.backtest-hub-view.hidden {
  display: none !important;
}

.studio-layout.hidden {
  display: none !important;
}

/* ==========================================================================
   Backtest Strategy & Sessions Lab Hub (WizTrader Reference Style)
   ========================================================================== */
.backtest-hub-view {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 24px 36px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  background: radial-gradient(circle at top right, rgba(0, 210, 255, 0.04), transparent 60%),
              radial-gradient(circle at bottom left, rgba(0, 245, 160, 0.03), transparent 60%),
              var(--bg-dark-base);
  box-sizing: border-box;
}

/* Hub Top Bar */
.hub-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(28, 38, 62, 0.8);
}

.hub-header-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hub-title-with-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hub-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.4));
}

.hub-main-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  font-family: var(--font-display);
}

.hub-badge-pro {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), rgba(168, 85, 247, 0.2));
  color: var(--cyan-neon);
  border: 1px solid rgba(0, 210, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
}

.hub-subtitle {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.btn-hub-new {
  padding: 8px 18px;
  font-size: 0.88rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 245, 160, 0.35);
}

.btn-resume-active-session {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.18), rgba(0, 210, 255, 0.22));
  border: 1px solid var(--emerald-green);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(0, 245, 160, 0.25);
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-resume-active-session:hover {
  background: linear-gradient(135deg, var(--emerald-green), #00c982);
  color: #04100a;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 245, 160, 0.45);
}

.btn-resume-active-session.hidden {
  display: none !important;
}

/* Step 1: Mode Selection Section */
.hub-mode-selection-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-label-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
}

.step-num {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--emerald-green), var(--cyan-neon));
  color: #06080e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 900;
  font-family: var(--font-mono);
}

.hub-mode-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.hub-mode-card {
  position: relative;
  background: linear-gradient(135deg, rgba(16, 21, 36, 0.95), rgba(11, 14, 23, 0.98));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.hub-mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan-neon);
  box-shadow: 0 12px 35px rgba(0, 210, 255, 0.16);
}

.hub-mode-card.active {
  border-color: var(--emerald-green);
  box-shadow: 0 0 25px rgba(0, 245, 160, 0.22);
  background: linear-gradient(135deg, rgba(16, 25, 42, 0.98), rgba(9, 16, 26, 0.98));
}

.mode-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mode-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.mode-icon-circle.auto {
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.35);
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.2);
}

.mode-icon-circle.manual {
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.35);
  box-shadow: 0 0 16px rgba(255, 184, 0, 0.2);
}

.mode-title-wrap h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.mode-chip {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.mode-chip.chip-cyan {
  background: rgba(0, 210, 255, 0.12);
  color: var(--cyan-neon);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.mode-chip.chip-amber {
  background: rgba(255, 184, 0, 0.12);
  color: var(--amber-gold);
  border: 1px solid rgba(255, 184, 0, 0.3);
}

.mode-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.mode-features-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.mode-features-pills span {
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}

.mode-card-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-mode-quick-launch {
  flex: 1;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.22), rgba(0, 245, 160, 0.18));
  border: 1px solid var(--cyan-neon);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-mode-quick-launch:hover {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.38), rgba(0, 245, 160, 0.32));
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.4);
  transform: translateY(-1px);
}

.btn-mode-quick-launch.manual {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.22), rgba(255, 102, 0, 0.18));
  border-color: var(--amber-gold);
}

.btn-mode-quick-launch.manual:hover {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.38), rgba(255, 102, 0, 0.32));
  box-shadow: 0 0 16px rgba(255, 184, 0, 0.4);
}

.mode-card-action {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mode-card-action:hover {
  color: #fff;
}

/* Wizard Manual Gym Info Card */
.wizard-manual-card {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.12), rgba(255, 102, 0, 0.08));
  border: 1px solid rgba(255, 184, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wizard-manual-card.hidden {
  display: none !important;
}

.manual-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-gold);
  font-size: 0.95rem;
  font-weight: 800;
}

.manual-card-header .icon {
  font-size: 1.25rem;
}

.manual-card-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

.manual-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.manual-card-features span {
  background: rgba(255, 184, 0, 0.15);
  border: 1px solid rgba(255, 184, 0, 0.3);
  color: #ffcc00;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Step 2: Available Sessions Section */
.hub-available-sessions-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hub-sessions-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hub-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-2);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.hub-filter-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.hub-filter-pill.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(0, 245, 160, 0.15));
  color: #fff;
  border: 1px solid rgba(0, 210, 255, 0.4);
}

.hub-sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.hub-session-card {
  background: linear-gradient(145deg, rgba(16, 22, 38, 0.9), rgba(11, 15, 26, 0.95));
  border: 1px solid rgba(28, 38, 62, 0.95);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.hub-session-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 245, 160, 0.5);
  box-shadow: 0 12px 30px rgba(0, 245, 160, 0.12);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.session-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
}

.session-badge.mode-auto {
  background: rgba(0, 210, 255, 0.15);
  color: var(--cyan-neon);
  border: 1px solid rgba(0, 210, 255, 0.35);
}

.session-badge.mode-manual {
  background: rgba(255, 184, 0, 0.15);
  color: var(--amber-gold);
  border: 1px solid rgba(255, 184, 0, 0.35);
}

.session-badge.type-binary {
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple-accent);
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.session-badge.type-forex {
  background: rgba(0, 245, 160, 0.15);
  color: var(--emerald-green);
  border: 1px solid rgba(0, 245, 160, 0.35);
}

.card-date-chip {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.2px;
}

.card-strategy-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.card-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: rgba(6, 8, 14, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  font-size: 0.66rem;
  color: var(--text-dim);
}

.spec-val {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Card Footer with Edit ✏️, Delete 🗑️, View Last Test, and Launch */
.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-action-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all var(--transition-smooth);
}

.btn-card-icon.delete:hover {
  background: rgba(255, 51, 102, 0.15);
  border-color: var(--crimson-red);
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.35);
}

.btn-card-icon.edit:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--cyan-neon);
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.35);
}

.card-action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
}

.btn-card-subtle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-family: var(--font-main);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-smooth);
  white-space: nowrap;
}

.btn-card-subtle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.btn-card-launch {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.15), rgba(0, 210, 255, 0.2));
  color: #fff;
  border: 1px solid rgba(0, 245, 160, 0.45);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  font-family: var(--font-main);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-card-launch:hover {
  background: linear-gradient(135deg, var(--emerald-green), var(--emerald-green-dark));
  color: #06110a;
  box-shadow: 0 4px 15px var(--shadow-glow-emerald);
  transform: translateY(-2px);
}

/* Wizard Modal Customizations */
.session-wizard-modal {
  width: 940px;
  max-width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #080b13;
  border: 1px solid rgba(0, 210, 255, 0.45);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 40px rgba(0, 210, 255, 0.2);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.wizard-modal-header {
  flex-shrink: 0;
  padding: 16px 24px;
  background: linear-gradient(90deg, #0d1220, #131a30);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wizard-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 28px;
  max-height: calc(90vh - 140px);
}

.wizard-modal-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.6);
  position: sticky;
  bottom: 0;
  z-index: 20;
}

.btn-save-only-session {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-save-only-session:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--cyan-neon);
  color: var(--cyan-neon);
  transform: translateY(-1px);
}

.wizard-market-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.wizard-tab-btn {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.wizard-tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.15), rgba(168, 85, 247, 0.15));
  border-color: var(--amber-gold);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 184, 0, 0.2);
}

.wizard-tab-btn.wizard-tab-locked {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: #718096;
  cursor: not-allowed;
  position: relative;
  opacity: 0.78;
}

.wizard-tab-btn.wizard-tab-locked:hover {
  background: rgba(255, 184, 0, 0.04);
  border-color: rgba(255, 184, 0, 0.35);
  color: #a0aec0;
  opacity: 0.95;
}

.wizard-tab-btn.wizard-tab-locked .icon {
  font-size: 0.92rem;
  color: var(--amber-gold);
}

.wizard-tab-btn .lock-future-badge {
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.3);
  color: var(--amber-gold);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 800;
  margin-inline-start: 6px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
}

.wizard-mode-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-bottom: 18px;
}

.wizard-mode-toggle-row .label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.wizard-mode-buttons {
  display: flex;
  gap: 8px;
}

.wizard-mode-btn {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.wizard-mode-btn.active {
  background: rgba(0, 210, 255, 0.2);
  border-color: var(--cyan-neon);
  color: var(--cyan-neon);
}

.wizard-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.wizard-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Button back to Hub on chart */
.chart-tool-btn.hub-btn {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.22), rgba(0, 245, 160, 0.16));
  border: 1px solid var(--cyan-neon);
  color: #fff;
  font-weight: 800;
  padding: 3px 11px;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.25);
}

.chart-tool-btn.hub-btn:hover {
  background: linear-gradient(135deg, var(--cyan-neon), #00c982);
  color: #041018;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
  transform: translateY(-1px);
}

.btn-header-back-hub {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.18), rgba(0, 245, 160, 0.15));
  border: 1px solid var(--cyan-neon);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 5px 12px;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 12px rgba(0, 210, 255, 0.25);
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-header-back-hub:hover {
  background: linear-gradient(135deg, var(--cyan-neon), #00c982);
  color: #041018;
  box-shadow: 0 4px 18px rgba(0, 210, 255, 0.5);
  transform: translateY(-1px);
}

/* Strategy Preview Box in Modals */
.strat-preview-box {
  background: rgba(0, 245, 160, 0.05);
  border: 1px solid rgba(0, 245, 160, 0.2);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-top: 6px;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
  transition: var(--transition-smooth);
}

.strat-preview-box:empty {
  display: none;
}

.strat-preview-box .strat-preview-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.strat-preview-box .strat-win-rate {
  color: #00f5a0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.strat-preview-box .strat-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.strat-preview-box .strat-tag-pill {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.strat-preview-box .strat-desc-text {
  font-size: 0.76rem;
  color: #a0aec0;
  line-height: 1.4;
}

.strat-preview-box .strat-specs {
  display: flex;
  gap: 12px;
  margin-top: 5px;
  font-size: 0.72rem;
  color: #64748b;
}

.strat-preview-box .strat-specs span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ==========================================================================
   Clean Chart in Manual Backtest Mode (100% Distraction-Free & Clutter-Free)
   ========================================================================== */
body.session-manual #chart-legend {
  display: none !important;
}

body.session-manual #btn-goto-codelab,
body.session-manual #btn-toggle-chart-sliders {
  display: none !important;
}

body.session-manual #chart-strat-dot {
  background: #ffaa00 !important;
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.6) !important;
}

/* Hide drawing toolbar in automated algorithmic backtesting mode (exclusive to manual trading) */
body.session-auto .chart-drawing-toolbar,
body.session-auto .drawing-options-bar {
  display: none !important;
}

/* ==========================================================================
   TradingView-Style Manual Drawing Toolbar & Controls
   ========================================================================== */
.chart-drawing-toolbar {
  position: absolute;
  left: 12px;
  top: 55px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(13, 19, 33, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 5px 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.draw-tool-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.16s ease;
  user-select: none;
}

.draw-tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: scale(1.06);
}

.draw-tool-btn.active {
  background: rgba(0, 210, 255, 0.2);
  color: #00d2ff;
  border-color: rgba(0, 210, 255, 0.5);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.draw-tool-btn.danger:hover {
  background: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.5);
}

.draw-tool-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 2px 2px;
}

.draw-tool-divider-v {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.15);
}

/* Floating Drawing Options Bar */
.drawing-options-bar {
  position: absolute;
  left: 56px;
  top: 55px;
  z-index: 46;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 19, 33, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 4px 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

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

.color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.color-swatch:hover, .color-swatch.active {
  transform: scale(1.25);
  border-color: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.draw-select-sm {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
}

.btn-delete-selected-drawing {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #f43f5e;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.btn-delete-selected-drawing:hover {
  background: rgba(244, 63, 94, 0.3);
  color: #fff;
}

/* ==========================================================================
   OmniQuant Fullscreen Gateway / Landing Screen (Before Entering Platform)
   ========================================================================== */
#app-gateway-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: radial-gradient(circle at 50% 10%, #0d1726 0%, #060a12 70%);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  color: #fff;
  font-family: var(--font-main);
  padding: 24px 20px 40px;
}

#app-gateway-screen.hidden {
  display: none !important;
}

.gateway-container {
  max-width: 1220px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.gateway-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.gateway-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gateway-brand .brand-logo-gem {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 10px rgba(0, 245, 160, 0.5));
}

.gateway-brand .brand-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.gateway-brand .brand-badge {
  background: rgba(0, 245, 160, 0.15);
  border: 1px solid rgba(0, 245, 160, 0.4);
  color: var(--emerald-green);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
}

.gateway-hwid-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
}

.gateway-hero {
  text-align: center;
  margin: 6px 0 2px;
}

.gateway-hero h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 6px;
  background: linear-gradient(135deg, #ffffff 40%, #00f5a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gateway-hero p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 auto;
  max-width: 750px;
  line-height: 1.5;
}

.gateway-alert-banner {
  background: rgba(255, 51, 102, 0.12);
  border: 1px solid rgba(255, 51, 102, 0.4);
  color: #ff3366;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.15);
}

.gateway-main-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 22px;
}

@media (max-width: 1024px) {
  .gateway-main-grid {
    grid-template-columns: 1fr;
  }
}

.gateway-card {
  background: rgba(13, 20, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.gateway-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.08rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.gateway-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.gateway-telegram-box {
  background: linear-gradient(135deg, rgba(34, 158, 217, 0.15), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(34, 158, 217, 0.45);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 4px 24px rgba(34, 158, 217, 0.18);
}

.telegram-left-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.telegram-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #229ed9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 0 16px rgba(34, 158, 217, 0.6);
  flex-shrink: 0;
}

.telegram-texts h4 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 800;
  color: #fff;
}

.telegram-texts p {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
}

.telegram-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-telegram-direct {
  background: #229ed9;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 16px rgba(34, 158, 217, 0.5);
  transition: all var(--transition-fast);
}

.btn-telegram-direct:hover {
  background: #1d8bc0;
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(34, 158, 217, 0.8);
}

/* ========================================================
   SETTINGS PANE: ACCOUNT & SUBSCRIPTION DETAILS
   ======================================================== */
.account-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.acc-overview-box {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: all var(--transition-fast);
}

.acc-overview-box:hover {
  border-color: rgba(0, 245, 160, 0.3);
  transform: translateY(-2px);
}

.acc-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.acc-box-val-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.acc-name-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

.acc-box-sub {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.btn-icon-subtle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-icon-subtle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.acc-progress-container {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.acc-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.acc-progress-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--emerald-green), var(--cyan-neon));
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.5);
  transition: width 0.6s ease;
}

.security-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.security-card-item {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sec-item-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sec-item-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.sec-item-value-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-surface-1);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  flex-wrap: wrap;
}

.sec-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.features-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.feature-check-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all var(--transition-fast);
}

.feature-check-card.active {
  border-color: rgba(0, 245, 160, 0.25);
  background: linear-gradient(135deg, var(--bg-surface-2), rgba(0, 245, 160, 0.03));
}

.feature-check-card.locked {
  opacity: 0.6;
  border-color: rgba(255, 255, 255, 0.05);
}

.feature-check-card .feat-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.feature-check-card .feat-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.feature-check-card .feat-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
}

.feature-check-card .feat-desc {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.feature-check-card .feat-status-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  align-self: flex-start;
}

.feat-status-badge.active {
  background: rgba(0, 245, 160, 0.15);
  color: var(--emerald-green);
  border: 1px solid rgba(0, 245, 160, 0.3);
}

.feat-status-badge.locked {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================================
   PLATFORM THEME VARIANTS (Deep Navy & Pure OLED Black)
   ======================================================== */
body.theme-deep-navy {
  --bg-dark-base: #040b18;
  --bg-surface-1: #071226;
  --bg-surface-2: #0c1b38;
  --bg-surface-3: #13274f;
  --bg-glass: rgba(12, 27, 56, 0.8);
  --border-subtle: #1e3a6e;
}

body.theme-oled-black {
  --bg-dark-base: #000000;
  --bg-surface-1: #050505;
  --bg-surface-2: #0a0a0a;
  --bg-surface-3: #121212;
  --bg-glass: rgba(10, 10, 10, 0.85);
  --border-subtle: #1f1f1f;
}

/* ==========================================================================
   📱 FULL MOBILE & TABLET RESPONSIVE DESIGN (iOS & Android Support)
   ========================================================================== */
@media (max-width: 960px) {
  body.dark-theme {
    height: 100dvh;
    overflow: hidden;
  }

  /* 1. Gateway / Welcome Portal Mobile Layout */
  #app-gateway-screen {
    padding: 14px 12px 32px !important;
  }

  .gateway-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .gateway-hwid-badge {
    justify-content: space-between;
    font-size: 0.74rem;
    flex-wrap: wrap;
  }

  .gateway-hero h1 {
    font-size: 1.32rem !important;
    line-height: 1.35;
  }

  .gateway-hero p {
    font-size: 0.8rem !important;
  }

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

  #gateway-plans-grid,
  .plans-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .gateway-telegram-box {
    flex-direction: column;
    align-items: stretch;
    padding: 14px !important;
    gap: 14px;
    text-align: center;
  }

  .telegram-left-info {
    flex-direction: column;
    gap: 10px;
  }

  .telegram-actions {
    flex-direction: column;
    width: 100%;
  }

  .telegram-actions .btn-outline-subtle,
  .telegram-actions .btn-telegram-direct {
    width: 100%;
    justify-content: center;
  }

  .crypto-checkout-box .address-copy-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .wallet-address-text {
    word-break: break-all;
    font-size: 0.7rem !important;
  }

  /* 2. Top Application Header on Mobile */
  .app-header {
    height: auto !important;
    min-height: 52px;
    padding: 8px 10px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .header-brand {
    width: 100%;
    justify-content: space-between;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
    font-size: 1.05rem;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .header-market-controls {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    gap: 6px;
    scrollbar-width: none;
  }

  .header-market-controls::-webkit-scrollbar {
    display: none;
  }

  .market-pill {
    padding: 3px 7px;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  #ctrader-badge {
    display: none !important;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  /* 3. Convert Desktop Side Rail into Mobile Bottom Navigation Bar */
  .app-shell {
    flex-direction: column;
    height: calc(100dvh - 54px) !important;
    padding-bottom: 62px;
  }

  body.is-chart-active .app-shell {
    height: calc(100dvh - 128px) !important;
  }

  .app-nav-rail,
  .app-nav-rail.expanded {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: 62px !important;
    flex-direction: row !important;
    border-left: none !important;
    border-top: 1px solid rgba(0, 245, 160, 0.22) !important;
    padding: 0 4px !important;
    background: rgba(8, 12, 22, 0.98) !important;
    backdrop-filter: blur(16px);
    z-index: 9999 !important;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.6) !important;
  }

  .nav-rail-top {
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    width: 100% !important;
    gap: 2px !important;
  }

  .nav-rail-bottom {
    display: none !important;
  }

  .nav-rail-btn {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 3px !important;
    height: 56px !important;
    padding: 4px 2px !important;
    flex: 1 !important;
    border-radius: 8px;
  }

  .nav-rail-btn .rail-icon {
    font-size: 1.2rem !important;
    min-width: auto !important;
  }

  .nav-rail-btn .rail-label {
    opacity: 1 !important;
    transform: none !important;
    font-size: 0.66rem !important;
    font-weight: 700 !important;
    pointer-events: auto !important;
    display: block !important;
  }

  .nav-rail-btn .rail-active-pip {
    top: 0 !important;
    bottom: auto !important;
    right: 25% !important;
    left: 25% !important;
    width: auto !important;
    height: 3px !important;
    border-radius: 0 0 4px 4px !important;
  }

  /* 4. Content Containers & Strategy Hub on Mobile */
  .view-page-container,
  .backtest-hub-view {
    padding: 14px 12px 84px 12px !important;
  }

  .view-page-header,
  .hub-top-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .hub-main-title,
  .view-title {
    font-size: 1.15rem !important;
    flex-wrap: wrap;
  }

  .hub-mode-cards-grid,
  .hub-sessions-grid,
  .strategies-grid,
  .vault-strategies-grid,
  .codelab-workspace-grid,
  .settings-grid-layout {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .hub-sessions-filter-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .hub-filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 4px;
  }

  .hub-filter-pill {
    flex-shrink: 0;
    font-size: 0.75rem !important;
  }

  /* 5. Interactive Chart Workspace & Replay Player on Mobile */
  .studio-layout {
    flex-direction: column !important;
    height: 100% !important;
    overflow-y: auto !important;
  }

  .panel-center-chart {
    min-height: 420px;
    height: auto !important;
    flex: 1;
  }

  .chart-top-bar {
    flex-wrap: wrap !important;
    padding: 6px 8px !important;
    gap: 6px !important;
    height: auto !important;
  }

  .chart-legend {
    font-size: 0.72rem !important;
    gap: 8px !important;
    flex-wrap: wrap;
  }

  .chart-active-strategy-pill {
    width: 100%;
    justify-content: space-between;
    font-size: 0.74rem !important;
    overflow-x: auto;
  }

  .chart-active-date-badge {
    display: none !important;
  }

  .canvas-chart-container {
    min-height: 300px !important;
  }

  .wiz-replay-control-bar {
    left: 6px !important;
    right: 6px !important;
    top: 6px !important;
    width: auto !important;
    max-width: calc(100% - 12px) !important;
    flex-wrap: wrap !important;
    padding: 5px 8px !important;
    gap: 6px !important;
    justify-content: space-between;
  }

  .wiz-slider-wrap {
    width: 100% !important;
    order: 10;
  }

  .chart-drawing-toolbar {
    display: none !important;
  }

  .chart-quick-sliders-drawer {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  /* Right Metrics Sidebar on Chart */
  .panel-left-analytics,
  .studio-right-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    border-right: none !important;
    border-top: 1px solid var(--border-subtle) !important;
    height: auto !important;
    max-height: none !important;
  }

  /* 6. Modals (Session Settings, VIP Hub, Strategy Details) on Mobile */
  .session-settings-modal-card,
  .vip-modal-card,
  .modal-card {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: 90dvh !important;
    margin: auto !important;
    border-radius: 14px !important;
  }

  .settings-modal-grid,
  .modal-two-col-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 14px !important;
  }

  .settings-modal-header,
  .settings-modal-footer {
    padding: 12px 14px !important;
    flex-wrap: wrap;
    gap: 8px;
  }

  .btn-create-session,
  .btn-cancel-session {
    width: 100%;
    justify-content: center;
  }
}






