/* ==========================================================================
   Gold Brain — First User Experience Sprint Design System & CSS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Colors */
  --bg-dark: #07090E;
  --bg-card: #0F131C;
  --bg-card-alt: #161C28;
  --border-color: #212938;
  --border-highlight: #2E384D;
  
  --gold-primary: #D4AF37;
  --gold-bright: #FFD700;
  --gold-glow: rgba(212, 175, 55, 0.25);
  
  --emerald-buy: #10B981;
  --emerald-glow: rgba(16, 185, 129, 0.2);
  --rose-sell: #EF4444;
  --rose-glow: rgba(239, 68, 68, 0.2);
  --amber-wait: #F59E0B;
  --amber-glow: rgba(245, 158, 11, 0.2);
  --slate-no-opinion: #64748B;
  
  --text-main: #F8FAFC;
  --text-sub: #94A3B8;
  --text-muted: #64748B;
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(212, 175, 55, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Header & Meta Navbar */
.navbar {
  background: rgba(7, 9, 14, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
}

.nav-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--gold-primary), var(--amber-wait));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #000;
  box-shadow: 0 0 12px var(--gold-glow);
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-name span {
  color: var(--gold-primary);
}

.nav-menu {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.nav-menu a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--gold-primary);
}

.notify-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.notify-btn:hover:not(:disabled) {
  color: var(--gold-primary);
  border-color: var(--gold-primary);
}

.notify-btn.notify-on {
  color: var(--emerald-buy);
  border-color: var(--emerald-buy);
  background: rgba(16, 185, 129, 0.1);
}

.notify-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Page Layout */
.main-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Home Page Header / Immediate Answer Card */
.thesis-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.thesis-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-primary), var(--emerald-buy), var(--amber-wait));
}

.hero-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.symbol-badge {
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 1px;
}

.meta-indicators {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.meta-item strong {
  color: var(--text-main);
}

/* Market Thesis Main Badge */
.thesis-display-box {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.thesis-badge-large {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 220px;
  border: 2px solid transparent;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.thesis-BUY-ONLY {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--emerald-buy);
  color: var(--emerald-buy);
  box-shadow: 0 0 25px var(--emerald-glow);
}

.thesis-SELL-ONLY {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--rose-sell);
  color: var(--rose-sell);
  box-shadow: 0 0 25px var(--rose-glow);
}

.thesis-WAIT {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--amber-wait);
  color: var(--amber-wait);
  box-shadow: 0 0 25px var(--amber-glow);
}

.thesis-NO-OPINION {
  background: rgba(100, 116, 139, 0.12);
  border-color: var(--slate-no-opinion);
  color: var(--slate-no-opinion);
}

.thesis-info-details {
  flex: 1;
  min-width: 280px;
}

.thesis-title-text {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.thesis-sub-meaning {
  font-size: 0.95rem;
  color: var(--text-sub);
  margin-bottom: 1rem;
}

/* Key Metrics Grid */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.metric-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.metric-val {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
}

/* Section Header */
.section-title-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.section-h2 span {
  color: var(--gold-primary);
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* Why Panel Section */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.evidence-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.evidence-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.evidence-title.supporting { color: var(--emerald-buy); }
.evidence-title.contradicting { color: var(--rose-sell); }
.evidence-title.missing { color: var(--amber-wait); }

.evidence-ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.evidence-ul li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-sub);
}

.evidence-ul.supporting li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--emerald-buy);
  font-weight: bold;
}

.evidence-ul.contradicting li::before {
  content: "✖";
  position: absolute;
  left: 0;
  color: var(--rose-sell);
  font-weight: bold;
}

.evidence-ul.missing li::before {
  content: "⚠";
  position: absolute;
  left: 0;
  color: var(--amber-wait);
  font-weight: bold;
}

.empty-evidence {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Market Story Flow Diagram */
.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.story-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.story-node {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  text-align: center;
  flex: 1;
  min-width: 130px;
}

.node-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.node-status {
  font-size: 0.85rem;
  font-weight: 600;
}

.arrow-down {
  color: var(--gold-primary);
  font-size: 1.2rem;
  font-weight: bold;
}

/* Not Yet Implemented Badge */
.not-implemented-pill {
  display: inline-block;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--amber-wait);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* System Status Tabs & Cards */
.status-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-sub);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn:hover, .tab-btn.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Common Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.data-table th {
  background: var(--bg-card-alt);
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-sub);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--text-sub);
  text-decoration: none;
}

.footer a:hover {
  color: var(--gold-primary);
}
