/* ═══════════════════════════════════════════════════════════════════════════
   GOAT PRO — Design System v1.0
   Shared CSS for all pages
   ═══════════════════════════════════════════════════════════════════════════ */

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

/* ══════════════════════════════════════════════════════════════
   CSS VARIABLES
   ══════════════════════════════════════════════════════════════ */
:root {
  /* Background layers */
  --bg-base: #05070a;
  --bg-card: #0d1117;
  --bg-input: #0a0e15;
  --bg-hover: #131a24;
  --bg-elevated: #151c28;

  /* Borders */
  --border: #1b2332;
  --border-hover: #2a3544;
  --border-focus: #3b82f6;

  /* Text */
  --text-primary: #e5e7eb;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-faint: #475569;
  --text-bright: #f1f5f9;

  /* Brand / Accent */
  --brand-blue: #2563eb;
  --brand-blue-hover: #3b82f6;
  --brand-blue-glow: rgba(37, 99, 235, .35);
  --purple-sage: #76697E;
  --purple-sage-dim: rgba(118, 105, 126, .15);
  --purple-sage-glow: rgba(118, 105, 126, .25);

  /* Premium */
  --premium-green: #4ade80;
  --premium-green-dim: rgba(74, 222, 128, .1);
  --premium-green-glow: rgba(74, 222, 128, .3);
  --premium-bg: rgba(74, 222, 128, .08);

  /* Signals */
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, .1);
  --green-text: #4ade80;
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, .1);
  --red-text: #f87171;
  --amber: #eab308;
  --amber-dim: rgba(234, 179, 8, .1);
  --amber-text: #fbbf24;
  --orange: #f97316;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-card: 0 4px 16px rgba(0, 0, 0, .3);
  --shadow-elevated: 0 12px 32px rgba(0, 0, 0, .4);
  --shadow-dropdown: 0 20px 60px rgba(0, 0, 0, .6);

  /* Fonts */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Sizing */
  --page-max: 1400px;
  --header-height: 68px;
}

/* ══════════════════════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
code, .mono { font-family: var(--font-mono); }

/* ══════════════════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════════════════ */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 32px 24px 100px;
}

.section-label {
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--purple-sage);
  text-transform: uppercase;
  margin: 40px 0 16px;
  font-weight: 600;
}
.section-label:first-child { margin-top: 0; }

/* ══════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════ */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(to bottom, rgba(5, 7, 10, .98), rgba(5, 7, 10, .92));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  transition: background .3s, border-color .3s;
}

/* Premium header */
body.premium header {
  background: linear-gradient(to bottom, rgba(11, 13, 20, .98), rgba(11, 13, 20, .92));
  border-bottom-color: rgba(74, 222, 128, .15);
}
body.premium .brand-title span { color: var(--premium-green); }

.header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand */
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-icon { height: 34px; }
.brand-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-bright);
}
.brand-title span { color: var(--brand-blue); }
.brand-subtitle {
  font-size: 10px;
  letter-spacing: .28em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Nav */
nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}
.nav-link {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: color .2s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text-bright); }
.nav-link.active { color: var(--brand-blue); font-weight: 600; }

/* Auth section */
#auth-section {
  display: flex;
  align-items: center;
  gap: 16px;
}
.signin-link {
  color: var(--text-secondary) !important;
  font-size: 13px;
}
.signin-link:hover { color: var(--text-bright) !important; }

.join-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--brand-blue);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 0 16px var(--brand-blue-glow);
  transition: background .2s, box-shadow .2s;
  white-space: nowrap;
}
.join-btn:hover {
  background: var(--brand-blue-hover);
  box-shadow: 0 0 24px var(--brand-blue-glow);
}

/* Premium status badge */
.premium-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--premium-green);
  font-weight: 600;
  font-size: 13px;
  background: var(--premium-bg);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(74, 222, 128, .15);
  cursor: pointer;
  transition: background .2s;
}
.premium-status:hover { background: rgba(74, 222, 128, .12); }
.premium-status button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  font-family: var(--font-body);
}
.premium-status button:hover { color: var(--premium-green); }

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-base);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  touch-action: manipulation;
}

@media (max-width: 768px) {
  header { position: fixed; width: 100%; }
  body { padding-top: 76px; }
  .header-inner { justify-content: center; padding: 0 16px; }
  .header-brand div, nav { display: none; }
  .brand-icon { height: 48px; }
  .mobile-menu-btn {
    display: block;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
  }
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 76px;
  right: 16px;
  width: 240px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dropdown);
  z-index: 1001;
  overflow: hidden;
}
.mobile-menu.open {
  display: block;
  animation: menuIn .2s ease-out;
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-menu a {
  display: block;
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.mobile-menu a:hover { background: var(--bg-hover); }
.mobile-menu a.active { background: var(--brand-blue); color: #fff; }
.mobile-menu .join-btn {
  margin: 14px 20px 18px;
  display: block;
  text-align: center;
}
.mobile-menu .premium-status {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: var(--premium-bg);
}

/* ══════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: border-color .3s;
}
.card:hover { border-color: var(--border-hover); }

.card-label {
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   GRID LAYOUTS
   ══════════════════════════════════════════════════════════════ */
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }

@media (max-width: 1100px) { .three-col { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .three-col, .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════ */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field label {
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: .03em;
  font-weight: 500;
}
.field small {
  font-size: 11px;
  color: var(--text-muted);
}

input, select, textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .1);
}
@media (max-width: 768px) {
  input, select { padding: 14px 12px; font-size: 16px; }
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn-primary {
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 24px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 0 20px var(--brand-blue-glow);
  transition: background .2s, box-shadow .2s, transform .15s;
  font-family: var(--font-body);
  letter-spacing: .02em;
}
.btn-primary:hover {
  background: var(--brand-blue-hover);
  box-shadow: 0 0 28px var(--brand-blue-glow);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  transition: all .2s;
  font-family: var(--font-body);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  color: var(--text-bright);
  background: var(--bg-hover);
}

/* Toggle buttons (Win/Loss, etc) */
.toggle { display: flex; gap: 8px; }
.toggle button {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: all .2s;
  font-family: var(--font-body);
}
.toggle button.active.win {
  border-color: var(--green);
  background: var(--green-dim);
  color: var(--green-text);
}
.toggle button.active.loss {
  border-color: var(--red);
  background: var(--red-dim);
  color: var(--red-text);
}

/* ══════════════════════════════════════════════════════════════
   STAT ROWS
   ══════════════════════════════════════════════════════════════ */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(27, 35, 50, .6);
}
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.stat-value.positive { color: var(--green-text); }
.stat-value.negative { color: var(--red-text); }
.stat-value.warning { color: var(--amber-text); }

/* Risk grid */
.risk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.risk-item {
  background: rgba(15, 23, 42, .4);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.risk-item-label {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
  font-weight: 600;
}
.risk-item-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════════════════
   SIGNAL COLORS (pills, badges, dots)
   ══════════════════════════════════════════════════════════════ */
.pill-bullish {
  background: rgba(6, 95, 70, .8);
  color: #6ee7a8;
  border: 1px solid rgba(110, 231, 168, .2);
}
.pill-bearish {
  background: rgba(127, 29, 29, .8);
  color: var(--red-text);
  border: 1px solid rgba(248, 113, 113, .2);
}
.pill-neutral {
  background: rgba(75, 85, 99, .6);
  color: #d1d5db;
  border: 1px solid rgba(156, 163, 175, .2);
}

/* ══════════════════════════════════════════════════════════════
   BOTTOM TICKER
   ══════════════════════════════════════════════════════════════ */
.bottom-ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  padding: 8px 0;
  overflow: hidden;
  z-index: 999;
}
.ticker-content {
  display: flex;
  gap: 32px;
  animation: scroll-ticker 60s linear infinite;
  white-space: nowrap;
}
@keyframes scroll-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ticker-symbol {
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-mono);
}
.ticker-price {
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-mono);
}
.ticker-change {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.ticker-up { color: var(--green-text); }
.ticker-down { color: var(--red-text); }

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
footer {
  text-align: center;
  padding: 40px 24px 100px;
  color: var(--text-faint);
  font-size: 13px;
}
footer p {
  margin-bottom: 8px;
  font-style: italic;
  color: var(--text-muted);
}
footer small { color: rgba(30, 41, 59, .8); }

/* ══════════════════════════════════════════════════════════════
   OFFLINE / EMPTY STATES
   ══════════════════════════════════════════════════════════════ */
.offline-notice {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}
.offline-notice a {
  color: var(--brand-blue);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════════════════ */
.text-green { color: var(--green-text) !important; }
.text-red { color: var(--red-text) !important; }
.text-amber { color: var(--amber-text) !important; }
.text-blue { color: var(--brand-blue) !important; }
.text-sage { color: var(--purple-sage) !important; }
.text-premium { color: var(--premium-green) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-mono { font-family: var(--font-mono) !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes pulse-text {
  0%, 100% { opacity: .4; }
  50% { opacity: 1; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
.loading-pulse { animation: pulse-text 1.5s infinite; }

/* ══════════════════════════════════════════════════════════════
   DOLLAR AMOUNTS (green for premium users)
   ══════════════════════════════════════════════════════════════ */
.dollar-value {
  color: var(--premium-green);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   AGENT PIPELINE
   ══════════════════════════════════════════════════════════════ */
.pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.pipe-agent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  min-width: 72px;
  text-align: center;
  transition: border-color .2s;
}
.pipe-agent:hover { border-color: var(--border-hover); }
.pipe-icon { font-size: 20px; line-height: 1; }
.pipe-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: .04em;
}
.pipe-status {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.pipe-connector {
  color: var(--text-faint);
  font-size: 18px;
  padding: 0 2px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .pipeline { gap: 6px; padding: 12px 8px; }
  .pipe-agent { min-width: 60px; padding: 8px 10px; }
  .pipe-connector { font-size: 14px; }
}
