/* ═══════════════════════════════════════════════════════
   Keins Finance — Main Stylesheet (Premium UI Edition)
   Dark glassmorphism theme · Production Level FinTech UI
═══════════════════════════════════════════════════════ */

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

/* ── CSS Variables ──────────────────────────────────── */
:root {
  /* Core Colors - Ultra Modern White */
  --bg-primary:      #FFFFFF;
  --bg-secondary:    #F8FAFC;
  --bg-card:         rgba(255, 255, 255, 0.8);
  --bg-card-hover:   #FFFFFF;
  --bg-glass:        rgba(255, 255, 255, 0.85);
  
  /* Borders and Glows */
  --border:          rgba(0, 0, 0, 0.04);
  --border-light:    rgba(0, 0, 0, 0.04);
  --border-glow:     rgba(37, 99, 235, 0.15);
  
  /* Text */
  --text-primary:    #0F172A;
  --text-secondary:  #334155;
  --text-muted:      #64748B;
  --text-code:       #2563EB;

  /* Accents */
  --accent-blue:     #2563EB;
  --accent-cyan:     #0891B2;
  --accent-green:    #059669;
  --accent-red:      #E11D48;
  --accent-amber:    #D97706;
  --accent-purple:   #7C3AED;
  --accent-pink:     #DB2777;

  /* Gradients */
  --gradient-blue:   linear-gradient(135deg, #1D4ED8 0%, #3B82F6 100%);
  --gradient-green:  linear-gradient(135deg, #047857 0%, #10B981 100%);
  --gradient-red:    linear-gradient(135deg, #BE123C 0%, #F43F5E 100%);
  --gradient-amber:  linear-gradient(135deg, #B45309 0%, #F59E0B 100%);
  --gradient-purple: linear-gradient(135deg, #6D28D9 0%, #A855F7 100%);
  --gradient-brand:  linear-gradient(135deg, #2563EB 0%, #0EA5E9 100%);

  /* Layout & Spacing */
  --sidebar-w:       280px;
  --topbar-h:        80px;
  --radius-sm:       12px;
  --radius-md:       20px;
  --radius-lg:       32px;
  
  /* Premium Soft Shadows */
  --shadow-sm:       0 4px 12px rgba(0,0,0,0.03);
  --shadow-md:       0 12px 32px rgba(0,0,0,0.05);
  --shadow-lg:       0 24px 64px rgba(0,0,0,0.08);
  --shadow-glow:     0 0 24px rgba(37, 99, 235, 0.15);
  --shadow-glow-strong: 0 0 40px rgba(37, 99, 235, 0.25);

  /* Typography */
  --font-base:       'Inter', -apple-system, sans-serif;
  --font-display:    'Outfit', -apple-system, sans-serif;
  --mono:            'JetBrains Mono', monospace;

  /* Transitions */
  --transition:      all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset & Global ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-base);
  background: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(8, 145, 178, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(124, 58, 237, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; transition: var(--transition-fast); }
button { cursor: pointer; font-family: var(--font-base); border: none; outline: none; }
input, select { font-family: var(--font-base); outline: none; }
canvas { display: block; }

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(56,189,248,0.2); border-radius: 4px; border: 2px solid var(--bg-primary); }
::-webkit-scrollbar-thumb:hover { background: rgba(56,189,248,0.5); }

/* ── Animations ─────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* ═══════════════ SIDEBAR ════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 4px 0 24px rgba(0,0,0,0.03);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px 20px;
  position: relative;
}
.sidebar-logo::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20px; right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}
.sidebar-logo-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon { 
  font-size: 1.8rem; 
  filter: drop-shadow(0 0 12px rgba(37, 99, 235, 0.2)); 
  color: var(--accent-blue);
}
.logo-text { 
  font-family: var(--font-display);
  font-size: 1.45rem; 
  font-weight: 900; 
  letter-spacing: -0.5px; 
  color: var(--text-primary); 
  text-transform: uppercase;
}
.logo-accent { 
  font-weight: 300;
  color: var(--accent-blue);
}

.sidebar-close {
  display: none;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-size: 1rem;
  width: 32px; height: 32px;
  border-radius: 8px;
  transition: var(--transition-fast);
}
.sidebar-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.sidebar-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: var(--transition);
  border-radius: 0 4px 4px 0;
}
.nav-item:hover {
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-primary);
  transform: translateX(4px);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent);
  color: var(--accent-blue);
  font-weight: 600;
  border-left-color: var(--accent-blue);
}
.nav-item.active::before { opacity: 1; }
.nav-icon { font-size: 1.1rem; width: 24px; text-align: center; transition: var(--transition); }
.nav-item.active .nav-icon { filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.8)); transform: scale(1.1); }

/* ── Sidebar Disclaimer ─────────────────────────────── */
.sidebar-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  margin: 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(245,158,11,0.02));
  border: 1px solid rgba(245,158,11,0.2);
  position: relative;
  overflow: hidden;
}
.sidebar-disclaimer::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(245,158,11,0), rgba(245,158,11,0.5), rgba(245,158,11,0));
}
.sidebar-disclaimer .disclaimer-icon { font-size: 1rem; flex-shrink: 0; }
.sidebar-disclaimer p {
  font-size: 0.72rem;
  color: var(--accent-amber);
  line-height: 1.5;
  font-weight: 500;
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  background: rgba(248, 250, 252, 0.5);
}
.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseGlow 2s infinite;
}
.status-dot.unhealthy { background: var(--accent-red); box-shadow: 0 0 10px var(--accent-red); animation: none; }
.status-dot.checking  { background: var(--accent-amber); box-shadow: 0 0 10px var(--accent-amber); }
.status-label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.5px; }

/* ═══════════════ MAIN WRAPPER ══════════════════════ */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

/* ═══════════════ TOPBAR ════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.sidebar-toggle {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  width: 40px; height: 40px;
  border-radius: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition-fast);
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.1); }
.breadcrumb {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-time {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(6, 182, 212, 0.2);
  box-shadow: inset 0 0 10px rgba(6, 182, 212, 0.05);
}
.symbol-pills { display: flex; gap: 8px; }
.symbol-pill {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: 20px;
  transition: var(--transition);
}
.symbol-pill:hover { border-color: rgba(255,255,255,0.2); color: var(--text-primary); transform: translateY(-1px); }
.symbol-pill.active { 
  background: var(--gradient-brand); 
  border-color: transparent; 
  color: #fff; 
  box-shadow: var(--shadow-glow);
}

/* ═══════════════ DISCLAIMER TOPBAR ══════════════════ */
.disclaimer-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 2rem;
  background: linear-gradient(90deg, rgba(245,158,11,0.1), rgba(245,158,11,0.02));
  border-bottom: 1px solid rgba(245,158,11,0.2);
  color: var(--accent-amber);
  line-height: 1.5;
  font-weight: 500;
}
.disclaimer-topbar-icon { font-size: 1.1rem; flex-shrink: 0; }
.disclaimer-topbar-text { flex: 1; }

/* ═══════════════ PAGES & HERO ══════════════════════ */
.page {
  display: none;
  padding: 2rem 2.5rem 4rem;
  flex: 1;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.page.active { display: block; }

.hero-section {
  position: relative;
  margin-bottom: 2.5rem;
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 1));
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%; left: -10%;
  width: 50%; height: 200%;
  background: radial-gradient(circle, rgba(56,189,248,0.1) 0%, transparent 70%);
  transform: rotate(-45deg);
  pointer-events: none;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -50%; right: -10%;
  width: 50%; height: 200%;
  background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 70%);
  transform: rotate(-45deg);
  pointer-events: none;
}

.page-header { margin-bottom: 2rem; position: relative; z-index: 2; }
.hero-section .page-header { margin-bottom: 0; }

.page-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 8px;
  line-height: 1.2;
}
.page-subtitle { 
  color: var(--text-secondary); 
  font-size: 1.05rem; 
  font-weight: 400; 
  max-width: 600px;
  line-height: 1.6;
}

/* ═══════════════ AD CONTAINER ══════════════════════ */
.ad-container {
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--border-light);
  min-height: 100px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ad-label {
  position: absolute;
  top: 6px; right: 12px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* ═══════════════ GRIDS ═════════════════════════════ */
.section-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.section-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ═══════════════ PREMIUM CARDS ═════════════════════ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
}
.card:hover { 
  transform: translateY(-4px); 
  border-color: rgba(56, 189, 248, 0.3); 
  box-shadow: var(--shadow-md);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255,255,255,0.03);
}
.card-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--accent-blue); }
.card-body { padding: 20px; }

/* ═══════════════ PRICE CARDS ═══════════════════════ */
.price-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}
.price-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-blue);
  opacity: 0.8;
  transition: opacity 0.3s;
}
.price-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.price-card:hover::after { opacity: 1; }

.price-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.price-symbol {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-blue);
  text-transform: uppercase;
}
.exchange-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.exchange-badge.nse { background: rgba(56,189,248,0.15); color: #7DD3FC; border: 1px solid rgba(56,189,248,0.3); }
.exchange-badge.bse { background: rgba(168,85,247,0.15); color: #D8B4FE; border: 1px solid rgba(168,85,247,0.3); }

.price-value {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--text-primary);
  letter-spacing: -1.5px;
  margin-bottom: 8px;
}
.price-change {
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
}
.price-change.up    { color: var(--accent-green); background: rgba(16,185,129,0.1); }
.price-change.down  { color: var(--accent-red); background: rgba(244,63,94,0.1); }
.price-change.neutral { color: var(--text-muted); }

.price-prediction-bar {
  margin-top: 20px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

/* ═══════════════ PREDICTION CARDS ═════════════════ */
.pred-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.pred-card:hover { 
  border-color: rgba(139,92,246,0.4); 
  transform: translateY(-4px); 
  box-shadow: var(--shadow-md), 0 0 20px rgba(139,92,246,0.15);
}
.pred-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pred-symbol { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.pred-date   { font-size: 0.75rem; color: var(--text-muted); font-family: var(--mono); font-weight: 500; }
.pred-direction {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pred-direction.up   { color: var(--accent-green); text-shadow: 0 0 16px rgba(16,185,129,0.4); }
.pred-direction.down { color: var(--accent-red); text-shadow: 0 0 16px rgba(244,63,94,0.4); }
.pred-price { 
  font-family: var(--mono); 
  font-size: 0.9rem; 
  color: var(--text-secondary); 
  margin-bottom: 16px; 
  font-weight: 500;
}
.confidence-bar-wrap {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.confidence-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--gradient-brand);
  transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 0 10px rgba(56,189,248,0.5);
}
.confidence-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 600; display: flex; justify-content: space-between; }

/* ── Inline prediction disclaimer ─────────────────── */
.prediction-disclaimer-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(90deg, rgba(245,158,11,0.1), rgba(245,158,11,0.02));
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: rgba(253,230,138,0.9);
  margin-bottom: 2rem;
  line-height: 1.5;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* ═══════════════ FILTER BAR ════════════════════════ */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.02);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-label  { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.select {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  min-width: 160px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.select:hover, .select:focus { 
  border-color: var(--accent-blue); 
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2); 
}

/* ═══════════════ BUTTONS ═══════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  transition: var(--transition);
  white-space: nowrap;
  font-family: var(--font-base);
  letter-spacing: 0.2px;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.btn-primary:hover { 
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6); 
  filter: brightness(1.1); 
  transform: translateY(-1px);
}
.btn-secondary {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { 
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2); 
  transform: translateY(-1px);
}
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid transparent; }
.btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); border-color: var(--border); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; border-radius: 6px; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; font-weight: 700; border-radius: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-loading { color: transparent !important; position: relative; }
.btn-loading::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  margin-top: -8px; margin-left: -8px;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ═══════════════ TABLES ════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}
.data-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  background: rgba(15,23,42,0.8);
  position: sticky;
  top: 0;
  z-index: 10;
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-primary);
  font-family: var(--mono);
  font-size: 0.85rem;
  transition: var(--transition-fast);
}
.data-table tr { transition: var(--transition-fast); }
.data-table tr:hover td { background: rgba(56,189,248,0.05); }
.data-table tr:last-child td { border-bottom: none; }
.table-wrapper { 
  overflow-x: auto; 
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.badge-up   { color: var(--accent-green); font-weight: 700; background: rgba(16,185,129,0.1); padding: 2px 8px; border-radius: 6px;}
.badge-down { color: var(--accent-red);   font-weight: 700; background: rgba(244,63,94,0.1); padding: 2px 8px; border-radius: 6px;}
.badge-neutral { color: var(--text-muted); }

/* ═══════════════ LOADING / EMPTY STATES ═══════════ */
.loading-state {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  background: rgba(255,255,255,0.01);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}
.skeleton { 
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.05) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite linear;
  border-color: transparent !important;
}

/* ═══════════════ DASHBOARD BOTTOM ══════════════════ */
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* ═══════════════ NEWS FEED ════════════════════════ */
.news-feed {
  padding: 0;
  max-height: 400px;
  overflow-y: auto;
}
.news-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.news-item:hover { background: rgba(255,255,255,0.03); padding-left: 24px; }
.news-item:last-child { border-bottom: none; }
.news-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.5;
}
.news-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.news-card:hover { 
  border-color: rgba(56,189,248,0.4); 
  transform: translateY(-4px); 
  box-shadow: var(--shadow-md);
}
.news-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
}
.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.news-sentiment {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.news-sentiment.bullish { background: rgba(16,185,129,0.15); color: #34D399; border: 1px solid rgba(16,185,129,0.3); }
.news-sentiment.bearish { background: rgba(244,63,94,0.15); color: #FB7185; border: 1px solid rgba(244,63,94,0.3); }
.news-sentiment.neutral { background: rgba(245,158,11,0.15); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }

/* ═══════════════ INDICATOR GAUGES ═════════════════ */
.indicator-gauge {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.indicator-gauge::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--border);
  transition: var(--transition);
}
.indicator-gauge:hover { border-color: rgba(56,189,248,0.3); transform: translateY(-2px); }
.indicator-gauge:hover::before { background: var(--gradient-brand); }

.gauge-label { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.gauge-value { font-size: 1.6rem; font-weight: 800; font-family: var(--mono); margin-bottom: 8px; color: var(--text-primary); }
.gauge-value.bullish { color: var(--accent-green); text-shadow: 0 0 10px rgba(16,185,129,0.3); }
.gauge-value.bearish { color: var(--accent-red); text-shadow: 0 0 10px rgba(244,63,94,0.3); }
.gauge-value.neutral { color: var(--accent-amber); }
.gauge-signal { 
  font-size: 0.75rem; 
  font-weight: 700; 
  padding: 4px 12px; 
  border-radius: 12px; 
  display: inline-block; 
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.signal-buy    { background: rgba(16,185,129,0.15); color: #34D399; border: 1px solid rgba(16,185,129,0.3); }
.signal-sell   { background: rgba(244,63,94,0.15); color: #FB7185; border: 1px solid rgba(244,63,94,0.3); }
.signal-neutral{ background: rgba(245,158,11,0.15); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }

/* ═══════════════ ACCURACY CARDS ════════════════════ */
.accuracy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.accuracy-card:hover { transform: translateY(-4px); border-color: rgba(56,189,248,0.3); box-shadow: var(--shadow-md); }
.accuracy-symbol {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px;
}
.accuracy-value {
  font-size: 2.8rem; font-weight: 900; font-family: var(--mono);
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 8px;
  line-height: 1;
}
.accuracy-meta { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.accuracy-mini-stats { display: flex; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.mini-stat { font-size: 0.8rem; display: flex; flex-direction: column; gap: 4px; }
.mini-stat-label { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.7rem; }
.mini-stat-value { color: var(--text-primary); font-weight: 700; font-family: var(--mono); }

/* ═══════════════ METRIC INFO CARDS ════════════════ */
.metric-info-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}
.metric-info-card:hover { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); }
.metric-info-icon { font-size: 2.5rem; margin-bottom: 12px; filter: drop-shadow(0 0 10px rgba(255,255,255,0.2)); }
.metric-info-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.metric-info-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* ═══════════════ SENTIMENT ════════════════════════ */
.recommendation-banner {
  background: linear-gradient(135deg, rgba(56,189,248,0.1), rgba(139,92,246,0.1));
  border: 1px solid rgba(56,189,248,0.3);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 2rem;
  animation: fadeInUp 0.5s ease forwards;
  box-shadow: var(--shadow-md), inset 0 0 40px rgba(56,189,248,0.05);
}
.rec-icon { font-size: 3.5rem; filter: drop-shadow(0 0 16px rgba(56,189,248,0.4)); }
.rec-content { flex: 1; }
.rec-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--text-primary); margin-bottom: 8px; letter-spacing: -0.5px; }
.rec-reason { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.5; }
.rec-badge {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  padding: 12px 28px;
  border-radius: 40px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.rec-badge.strong-buy { background: rgba(16,185,129,0.15); color: #34D399; border: 2px solid rgba(16,185,129,0.5); text-shadow: 0 0 10px rgba(52,211,153,0.5); }
.rec-badge.avoid  { background: rgba(244,63,94,0.15); color: #FB7185; border: 2px solid rgba(244,63,94,0.5); text-shadow: 0 0 10px rgba(251,113,133,0.5); }
.rec-badge.hold   { background: rgba(245,158,11,0.15); color: #FCD34D; border: 2px solid rgba(245,158,11,0.5); text-shadow: 0 0 10px rgba(252,211,77,0.5); }

.sentiment-score-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.score-label { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 12px; letter-spacing: 1px; }
.score-value { font-size: 1.5rem; font-weight: 800; font-family: var(--mono); color: var(--text-primary); }
.score-value.bullish { color: var(--accent-green); text-shadow: 0 0 10px rgba(16,185,129,0.3); }
.score-value.bearish { color: var(--accent-red); text-shadow: 0 0 10px rgba(244,63,94,0.3); }
.score-value.small { font-size: 1rem; margin-top: 8px; }
.score-bar-wrap { height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; margin: 12px 0; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); }
.score-bar { height: 100%; border-radius: 4px; transition: width 1s cubic-bezier(0.25, 1, 0.5, 1); }

/* ═══════════════ PIPELINE ════════════════════════ */
.pipeline-flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 12px;
}
.pipeline-step {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  min-width: 160px;
  flex: 1;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.pipeline-step:hover { border-color: rgba(56,189,248,0.4); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pipeline-arrow {
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: var(--text-muted);
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 30px;
}
.pstep-num {
  width: 32px; height: 32px;
  background: var(--gradient-brand);
  color: #fff;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 4px 10px rgba(56,189,248,0.4);
}
.pstep-icon { font-size: 2rem; margin-bottom: 10px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.pstep-title { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.pstep-desc  { font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.pstep-status {
  display: inline-block;
  font-size: 0.75rem; font-weight: 700;
  padding: 4px 12px; border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pstep-status.idle    { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.1); }
.pstep-status.running { background: rgba(245,158,11,0.15); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); animation: pulseGlow 1.5s infinite; }
.pstep-status.done    { background: rgba(16,185,129,0.15); color: #34D399; border: 1px solid rgba(16,185,129,0.3); }
.pstep-status.error   { background: rgba(244,63,94,0.15); color: #FB7185; border: 1px solid rgba(244,63,94,0.3); }

.pipeline-controls {
  text-align: center;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.pipeline-separator {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.pipeline-separator::before, .pipeline-separator::after {
  content: '';
  height: 1px;
  width: 60px;
  background: var(--border);
}
.step-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.retrain-option { margin-top: 20px; }
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
}
.checkbox-label input { accent-color: var(--accent-cyan); width: 16px; height: 16px; }

.pipeline-log {
  background: #02040A;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 20px 24px;
  max-height: 320px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  border: 1px solid var(--border-light);
  border-top: none;
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.5);
}
.log-entry { padding: 4px 0; line-height: 1.6; border-bottom: 1px solid rgba(255,255,255,0.02); }
.log-entry:last-child { border-bottom: none; }
.log-info    { color: #7DD3FC; }
.log-success { color: #34D399; }
.log-warning { color: #FCD34D; }
.log-error   { color: #FB7185; }

/* ═══════════════ HEALTH DISPLAY ════════════════════ */
.health-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.health-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: var(--transition);
}
.health-item:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); }
.health-item-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.health-item-value { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); font-family: var(--mono); }

/* ═══════════════ TOAST ════════════════════════════ */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent-blue);
  color: var(--text-primary);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.toast.show { transform: translateX(0); }
.toast.success { border-left-color: var(--accent-green); }
.toast.error   { border-left-color: var(--accent-red); }

/* ═══════════════ COUNT BADGE ═══════════════════════ */
.count-badge {
  font-size: 0.75rem;
  background: rgba(56,189,248,0.15);
  color: #7DD3FC;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid rgba(56,189,248,0.3);
}

/* ═══════════════ CHART LEGEND ═════════════════════ */
.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255,255,255,0.2);
}

/* ═══════════════ DISCLAIMER CARDS ═════════════════ */
.disclaimer-card {
  background: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, rgba(245,158,11,0.02) 100%);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 2rem;
  box-shadow: var(--shadow-sm);
}
.disclaimer-card-full { margin-top: 0; }
.disclaimer-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(245,158,11,0.1);
  border-bottom: 1px solid rgba(245,158,11,0.2);
}
.disclaimer-card-icon { font-size: 1.3rem; }
.disclaimer-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #FCD34D;
  letter-spacing: 0.5px;
}
.disclaimer-card-body { padding: 24px; }
.disclaimer-card-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}
.disclaimer-card-body p:last-child { margin-bottom: 0; }
.disclaimer-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.disclaimer-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 24px;
  position: relative;
}
.disclaimer-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: rgba(245,158,11,0.8);
  font-weight: 700;
}
.disclaimer-footer-text {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  font-style: italic;
  margin-top: 16px;
}
.disclaimer-section-title {
  font-family: var(--font-display);
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #FCD34D !important;
  margin-top: 24px !important;
  margin-bottom: 8px !important;
}
.disclaimer-acceptance-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 24px;
  padding: 20px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: rgba(167,243,208,0.9);
  line-height: 1.6;
  font-weight: 500;
}

/* ═══════════════ TECHNOLOGY GRID ══════════════════ */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.tech-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  transition: var(--transition);
}
.tech-item:hover { 
  border-color: rgba(56,189,248,0.4); 
  background: rgba(56,189,248,0.05); 
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}
.tech-icon { font-size: 2.5rem; margin-bottom: 12px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); }
.tech-name { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.tech-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

/* ═══════════════ SITE FOOTER ═══════════════════════ */
.site-footer {
  background: #F8FAFC;
  border-top: 1px solid var(--border-light);
  padding: 32px 2rem;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56,189,248,0.3), transparent);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.footer-disclaimer {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-amber);
  padding: 8px 24px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 30px;
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ═══════════════ RESPONSIVE ════════════════════════ */
@media (max-width: 1200px) {
  .section-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 992px) {
  .section-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar-toggle { display: flex; }
  .sidebar-close { display: flex; align-items: center; justify-content: center; }
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .section-grid-3 { grid-template-columns: 1fr; }
  .section-grid-4 { grid-template-columns: 1fr; }
  .pipeline-flow { flex-direction: column; align-items: stretch; }
  .pipeline-arrow { transform: rotate(90deg); align-self: center; margin-top: 0; margin-bottom: 12px; }
  .news-cards-grid { grid-template-columns: 1fr; }
  .page { padding: 1.5rem 1rem 3rem; }
  .hero-section { padding: 2rem 1.5rem; }
  .page-title { font-size: 2rem; }
  .tech-grid { grid-template-columns: 1fr; }
  .disclaimer-topbar { flex-direction: column; text-align: center; gap: 8px; padding: 12px 1rem; }
  .topbar { padding: 0 1rem; }
  .topbar-right { gap: 10px; }
  .symbol-pills { display: none; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .select { width: 100%; }
}

/* ═══════════════ MODAL ═════════════════════════════ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: #0D1117;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  width: 95%;
  max-width: 1280px;
  height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.modal-overlay.show .modal {
  transform: scale(1);
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: #0D1117;
  flex-wrap: wrap;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #e8f4fd;
  flex: 1;
  min-width: 150px;
}
.modal-close {
  background: rgba(255,255,255,0.06);
  color: #8ba3c4;
  font-size: 1rem;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.modal-close:hover {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
}
.modal-body {
  flex: 1;
  padding: 0;
  background: #0D1117;
  position: relative;
  min-height: 0;
}

/* ── Chart interval bar ─────────────────────────────── */
.chart-interval-bar {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 3px 4px;
}
.interval-btn {
  background: transparent;
  color: #8ba3c4;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--mono);
  padding: 4px 10px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: 0.02em;
}
.interval-btn:hover {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
}
.interval-btn.active {
  background: linear-gradient(135deg, #2563EB, #3B82F6);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.4);
}

.price-card {
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════
   CRYPTO & GOLD TILES — New additions
   ─────────────────────────────────────────────────────── */

/* Crypto badge */
.exchange-badge.crypto-badge {
  background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(234,179,8,0.2));
  color: #f97316;
  border: 1px solid rgba(249,115,22,0.3);
}

.exchange-badge.gold-badge {
  background: linear-gradient(135deg, rgba(234,179,8,0.2), rgba(161,98,7,0.2));
  color: #eab308;
  border: 1px solid rgba(234,179,8,0.3);
}

/* Crypto card variant — distinct accent border */
.price-card-crypto {
  border-color: rgba(249,115,22,0.18) !important;
  background: rgba(255, 255, 255, 0.9) !important;
}
.price-card-crypto:hover {
  border-color: rgba(249,115,22,0.4) !important;
  box-shadow: 0 8px 32px rgba(249,115,22,0.12), var(--shadow-md) !important;
}

/* Crypto price — slightly smaller to fit longer USD values */
.crypto-price {
  font-size: clamp(1.3rem, 3vw, 2rem) !important;
  font-family: var(--mono) !important;
}

/* Tiny timestamp line below crypto change */
.price-card-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: var(--mono);
}

/* Symbol pills — crypto style */
.symbol-pill.crypto-pill {
  background: rgba(249,115,22,0.08);
  color: #f97316;
  border-color: rgba(249,115,22,0.25);
}
.symbol-pill.crypto-pill:hover,
.symbol-pill.crypto-pill.active {
  background: rgba(249,115,22,0.2);
  border-color: rgba(249,115,22,0.5);
  color: #fb923c;
}

/* ── Price flash animations (smooth, replaces old color-shift) ── */
@keyframes flashUp {
  0%   { background: rgba(16,185,129,0); }
  30%  { background: rgba(16,185,129,0.18); }
  100% { background: rgba(16,185,129,0); }
}
@keyframes flashDown {
  0%   { background: rgba(244,63,94,0); }
  30%  { background: rgba(244,63,94,0.18); }
  100% { background: rgba(244,63,94,0); }
}
.flash-up   { animation: flashUp   0.8s ease-out; color: var(--accent-green) !important; }
.flash-down { animation: flashDown 0.8s ease-out; color: var(--accent-red)   !important; }

/* ── Smoother card skeleton pulse ─────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skeleton .price-value,
.skeleton .price-change,
.skeleton .crypto-price {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 6px;
  color: transparent !important;
  min-width: 80px;
  min-height: 1em;
  display: inline-block;
}

/* ── Chart modal spinner ──────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════ MOBILE & RESPONSIVE LAYOUT ════════════════════════ */
@media (max-width: 1024px) {
  .section-grid-3, .section-grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .dashboard-bottom-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0 !important;
  }
  .sidebar-toggle {
    display: flex !important;
  }
  .sidebar-close {
    display: flex !important;
  }
  .topbar {
    padding: 0 1rem;
    height: 70px;
  }
  .topbar-right {
    gap: 8px;
  }
  .symbol-pills {
    display: flex;
    overflow-x: auto;
    max-width: calc(100vw - 150px);
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .symbol-pills::-webkit-scrollbar {
    display: none;
  }
  .section-grid-3, .section-grid-4, .dashboard-bottom-grid {
    grid-template-columns: 1fr !important;
  }
  .page {
    padding: 1.5rem 1rem 3rem;
  }
  .page-title {
    font-size: 1.8rem;
  }
  .hero-section {
    padding: 2rem 1.25rem;
  }
  .price-value {
    font-size: 2rem;
  }
  .pred-direction {
    font-size: 1.4rem;
  }
  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .chart-interval-bar {
    flex-wrap: wrap;
    justify-content: center;
  }
  .card-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .card-header > div {
    flex-wrap: wrap !important;
  }
  .card-header .select {
    flex: 1 1 45%;
    min-width: 100px !important;
  }
  .card-header .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 480px) {
  .dashboard-bottom-grid {
    grid-template-columns: 1fr !important;
  }
  .topbar-time {
    display: none; /* Hide clock on very small screens to save space */
  }
}
