/* ==========================================================================
   SPEXA PRO TERMINAL — CORE DESIGN SYSTEM CSS
   High-Alpha Quantitative Precision (TradingView / Borsa Terminal Aesthetic)
   ========================================================================== */

:root {
  --bg-surface-dim: #090d14;
  --bg-surface: #0f131c;
  --bg-surface-lowest: #070a0f;
  --bg-surface-low: #131722;
  --bg-surface-container: #181d27;
  --bg-surface-high: #202634;
  --bg-surface-highest: #2b3242;
  
  --border-outline: #6b7280;
  --border-outline-variant: #1f2430;
  --border-outline-subtle: rgba(255, 255, 255, 0.06);

  --color-primary: #8083ff;
  --color-primary-container: #4f46e5;
  --color-secondary: #38bdf8;
  --color-tertiary: #10b981;
  --color-tertiary-container: rgba(16, 185, 129, 0.15);
  --color-error: #f43f5e;
  --color-error-container: rgba(244, 63, 94, 0.15);
  --color-warning: #f59e0b;
  --color-warning-container: rgba(245, 158, 11, 0.15);

  --text-on-surface: #dfe2ee;
  --text-on-surface-variant: #94a3b8;
  --text-muted: #64748b;
}

/* Base resets & typography */
html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-surface-dim);
  color: var(--text-on-surface);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
  body {
    overscroll-behavior-y: none;
  }
}

/* Monospace alignment for financial data & prices */
.font-mono-num, .tabular-nums {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Slim Terminal Scrollbars */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-high);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-outline);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Live Pulse & Glow Effects */
.pulse-live {
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}
.glow-green {
  filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.5));
}
.glow-red {
  filter: drop-shadow(0 0 3px rgba(244, 63, 94, 0.5));
}
.glow-indigo {
  filter: drop-shadow(0 0 4px rgba(128, 131, 255, 0.4));
}

/* Terminal Glassmorphism & Borders */
.terminal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-outline-variant);
  border-radius: 8px;
}

.terminal-card-interactive {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-outline-variant);
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.terminal-card-interactive:hover {
  border-color: rgba(128, 131, 255, 0.4);
  transform: translateY(-1px);
}

/* Mobile Sticky First Column in Data Tables */
.sticky-col-first {
  position: sticky !important;
  left: 0 !important;
  z-index: 10 !important;
  background-color: var(--bg-surface-lowest) !important;
}

tr:hover .sticky-col-first {
  background-color: var(--bg-surface-high) !important;
}

/* Touch Targets for Mobile Ergonomics */
@media (max-width: 768px) {
  .touch-btn {
    min-height: 44px;
    min-width: 44px;
  }
  .touch-target {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}
