/* ==========================================================================
   CARTRADE DESIGN SYSTEM - 2026 LIGHT & DARK THEMES
   ========================================================================== */

/* Dark Mode Tokens (Default) */
:root, html.dark {
  --bg-space: #07090e;
  --bg-surface: #0b101b;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(24, 34, 58, 0.9);
  --bg-sidebar: rgba(11, 16, 27, 0.95);
  --bg-header: rgba(7, 9, 14, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(0, 242, 254, 0.35);

  --accent-cyan: #00f2fe;
  --accent-cyan-glow: rgba(0, 242, 254, 0.25);
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --input-bg: rgba(15, 23, 42, 0.85);
  --input-border: rgba(255, 255, 255, 0.12);
  --table-header-bg: rgba(7, 9, 14, 0.9);
  --table-row-hover: rgba(15, 23, 42, 0.6);
}

/* Light Mode Tokens */
html.light {
  --bg-space: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.9);
  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-hover: #0284c7;

  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.15);
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-purple: #7c3aed;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --table-header-bg: #f8fafc;
  --table-row-hover: #f1f5f9;
}

/* Base Body Styling */
body {
  background-color: var(--bg-space);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

.font-mono-num {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}

/* Ambient Background Lights */
html.dark .ambient-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
}

html.light .ambient-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 15% 15%, rgba(2, 132, 199, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(124, 58, 237, 0.04) 0%, transparent 50%);
}

/* Glassmorphism & Cards */
.glass-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

html.light .glass-card {
  box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
}

.glass-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

html.dark .glass-card:hover {
  box-shadow: 0 12px 30px -10px rgba(0, 242, 254, 0.15);
}

html.light .glass-card:hover {
  box-shadow: 0 12px 25px -5px rgba(2, 132, 199, 0.12);
}

/* Input Fields */
.glass-input {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.glass-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

/* Gradients and Buttons */
html.dark .text-gradient-cyan {
  background: linear-gradient(135deg, #ffffff 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.light .text-gradient-cyan {
  background: linear-gradient(135deg, #0f172a 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glow-btn-cyan {
  background: linear-gradient(135deg, #00f2fe 0%, #38bdf8 100%);
  color: #07090e;
  font-weight: 700;
  box-shadow: 0 4px 15px -2px rgba(0, 242, 254, 0.35);
  transition: all 0.2s ease;
}

html.light .glow-btn-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px -2px rgba(2, 132, 199, 0.25);
}

.glow-btn-cyan:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.glow-btn-outline {
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--accent-cyan-glow);
  transition: all 0.2s ease;
}

.glow-btn-outline:hover {
  background: var(--accent-cyan);
  color: #ffffff;
}

html.dark .glow-btn-outline:hover {
  color: #07090e;
}

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

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

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

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