/* ── Quantum Reports Design System ──────────────────────────────────────────── */

/* Font */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── Light mode (default) ── */
:root {
  /* Layout */
  --header-h:   72px;
  --ticker-h:   36px;
  --nav-h:      40px;

  /* New tokens */
  --bg-primary:       #ffffff;
  --bg-secondary:     #f8f9fa;
  --bg-tertiary:      #f1f5f9;
  --surface:          #ffffff;
  --surface-raised:   #f8f9fa;
  --border:           #e5e7eb;
  --border-subtle:    #f3f4f6;
  --text-primary:     #0a0a0a;
  --text-secondary:   #374151;
  --text-muted:       #6b7280;
  --accent:           #2563eb;
  --accent-hover:     #1d4ed8;
  --accent-subtle:    #eff6ff;
  --navy:             #0f172a;
  --positive:         #16a34a;
  --positive-subtle:  #f0fdf4;
  --negative:         #dc2626;
  --negative-subtle:  #fef2f2;
  --neutral:          #6b7280;
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:        0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:        0 8px 24px rgba(0,0,0,0.12);
  --radius:           6px;
  --radius-sm:        4px;
  --radius-lg:        10px;

  /* Legacy aliases — keeps all existing CSS working without per-prop rewrites */
  --bg:         #ffffff;
  --surface2:   #f1f5f9;
  --border2:    #e5e7eb;
  --text:       #0a0a0a;
  --text-dim:   #9ca3af;
  --accent-dim: #eff6ff;
  --accent-mid: rgba(37,99,235,0.25);
  --red:        #dc2626;
}

/* ── Dark mode ── */
[data-theme="dark"] {
  --bg-primary:       #0a0f1e;
  --bg-secondary:     #111827;
  --bg-tertiary:      #1f2937;
  --surface:          #111827;
  --surface-raised:   #1f2937;
  --border:           #1f2937;
  --border-subtle:    #374151;
  --text-primary:     #f9fafb;
  --text-secondary:   #e5e7eb;
  --text-muted:       #9ca3af;
  --accent:           #3b82f6;
  --accent-hover:     #2563eb;
  --accent-subtle:    #1e3a5f;
  --navy:             #e2e8f0;
  --positive:         #22c55e;
  --positive-subtle:  #052e16;
  --negative:         #ef4444;
  --negative-subtle:  #450a0a;
  --neutral:          #9ca3af;
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:        0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:        0 8px 24px rgba(0,0,0,0.5);

  /* Legacy aliases */
  --bg:         #0a0f1e;
  --surface2:   #1f2937;
  --border2:    #374151;
  --text:       #f9fafb;
  --text-dim:   #9ca3af;
  --accent-dim: #1e3a5f;
  --accent-mid: rgba(59,130,246,0.25);
  --red:        #ef4444;
}

/* ── Base reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ── Ticker bar: always-dark strip (financial terminal feel) ── */
.ticker-bar {
  background: #0f172a !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
[data-theme="dark"] .ticker-bar {
  background: #060a14 !important;
  border-bottom: 1px solid rgba(255,255,255,0.04) !important;
}
.ticker-bar .ticker-name  { color: rgba(255,255,255,0.45); }
.ticker-bar .ticker-price { color: rgba(255,255,255,0.9);  font-family: 'Menlo','Consolas',monospace; }
.ticker-bar .ticker-change { font-family: 'Menlo','Consolas',monospace; }
.ticker-bar .ticker-item  { border-right-color: rgba(255,255,255,0.07); }
.ticker-bar .ticker-item:hover { background: rgba(255,255,255,0.04); }
.ticker-bar .ticker-item.tp-active { background: rgba(37,99,235,0.15); }

/* ── Navigation: surface + shadow ── */
header, nav {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm);
}

/* ── Logo wordmark: always navy/dark ── */
.logo, .nav-logo-name {
  color: var(--navy) !important;
  letter-spacing: -0.04em;
}
[data-theme="dark"] .logo,
[data-theme="dark"] .nav-logo-name {
  color: var(--text-primary) !important;
}

/* ── Cards: surface + subtle border + shadow ── */
.news-card, .ticker-row, .feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
}
.news-card:hover, .ticker-row:hover, .feature-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-subtle);
}

/* ── Sentiment badges ── */
.badge-bullish, .badge-bull, .sent-bull {
  background: var(--positive-subtle) !important;
  color: var(--positive) !important;
  border: 1px solid var(--positive) !important;
}
.badge-bearish, .badge-bear, .sent-bear {
  background: var(--negative-subtle) !important;
  color: var(--negative) !important;
  border: 1px solid var(--negative) !important;
}
.badge-neutral, .sent-neutral {
  background: var(--bg-tertiary) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border) !important;
}

/* ── Primary buttons: accent blue, white text ── */
.auth-btn-primary,
.hero-cta, .cta-premium, .nav-cta, .pricing-cta-premium,
.search-wrap button, .auth-submit, .modal-btn-ok {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}
.auth-btn-primary:hover,
.hero-cta:hover, .cta-premium:hover, .nav-cta:hover,
.search-wrap button:hover {
  background: var(--accent-hover) !important;
  opacity: 1 !important;
}

/* ── Tables: clean, no alternating rows ── */
table thead th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
  font-weight: 600;
}
table tbody tr { background: var(--surface); }
table tbody tr:hover { background: var(--bg-secondary); }
table tbody td { border-bottom: 1px solid var(--border-subtle); }
/* Remove alternating rows everywhere */
table tbody tr:nth-child(even) { background: var(--surface) !important; }

/* ── Modals ── */
.modal, [class*="-modal"], [class*="-overlay"] > [class*="-card"],
.ai-modal-card, .auth-modal, .upgrade-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-lg) !important;
  border-radius: var(--radius-lg) !important;
}

/* ── Footer: always-dark navy ── */
.site-footer {
  background: #0f172a !important;
  border-top: none !important;
}
.footer-wordmark { color: rgba(255,255,255,0.95) !important; }
.footer-tagline  { color: rgba(255,255,255,0.55) !important; }
.footer-ico      { color: rgba(255,255,255,0.35) !important; }
.footer-col-label { color: rgba(255,255,255,0.38) !important; }
.footer-link     { color: rgba(255,255,255,0.58) !important; }
.footer-link:hover { color: #fff !important; }
.footer-divider  { border-top-color: rgba(255,255,255,0.09) !important; }
.footer-bottom   { color: rgba(255,255,255,0.38) !important; }

/* ── Upgrade / premium button (amber) stays as-is ── */
.btn-upgrade { color: #000 !important; }
