/* ==========================================================================
   HartForge Labs Redline - Financial Terminal Stylesheet
   Operating Entity: HartForge Labs LLC (New York DOS ID: 8042447)
   Theme: Obsidian (#0b0f19), Slate Panels (#131a2a), Crimson (#ef4444)
   ========================================================================== */

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

:root {
  --bg-obsidian: #000000;
  --bg-panel: #0d0d0d;
  --bg-panel-elevated: #141414;
  --bg-panel-hover: #1c1c1c;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);
  
  --crimson-primary: #ef4444;
  --crimson-glow: rgba(239, 68, 68, 0.4);
  --crimson-subtle: rgba(239, 68, 68, 0.14);
  
  --emerald-accent: #10b981;
  --emerald-subtle: rgba(16, 185, 129, 0.12);
  
  --amber-accent: #f59e0b;
  --amber-subtle: rgba(245, 158, 11, 0.12);
  
  --text-bright: #ffffff;
  --text-body: #a3a3a3;
  --text-muted: #737373;
  --text-dim: #525252;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-obsidian);
  color: var(--text-body);
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Red Aesthetic Font & Glowing Typography (HartForge Style)
   ========================================================================== */
.red-aesthetic-font, .red-brand-title {
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #ff6b6b 40%, #ef4444 80%, #b91c1c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.45));
}

.red-aesthetic-heading {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #fca5a5 45%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.red-subtle-glow {
  text-shadow: 0 0 16px rgba(239, 68, 68, 0.65);
}

.red-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Pill buttons - HartForge Labs signature shape */
.btn-pill {
  border-radius: 9999px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-pill-crimson {
  border-radius: 9999px !important;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: 1px solid rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-pill-crimson:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
  transform: translateY(-1px);
}

.btn-pill-dark {
  border-radius: 9999px !important;
  background: rgba(18, 18, 18, 0.9);
  color: #e5e5e5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-pill-dark:hover {
  background: rgba(30, 30, 30, 0.95);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Responsive Visibility Utilities */
@media (max-width: 1023px) {
  .desktop-only {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .mobile-only {
    display: none !important;
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #000000;
}
::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #404040;
}

/* Terminal Scanline Background Texture - Pure Black */
.terminal-mesh-bg {
  background-color: #000000;
  background-image: 
    radial-gradient(at 0% 0%, rgba(239, 68, 68, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(220, 38, 38, 0.04) 0px, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
}

/* Glass Panels */
.slate-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.slate-panel-elevated {
  background: var(--bg-panel-elevated);
  border: 1px solid var(--border-highlight);
  border-radius: 1.25rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
}

/* Monospace Badges & Typography */
.font-mono-numbers {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Terminal Pulses */
.pulse-crimson {
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-crimson-anim 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-crimson-anim {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.pulse-emerald {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-emerald-anim 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-emerald-anim {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Severity Badges */
.badge-critical {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-high {
  background-color: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.badge-moderate {
  background-color: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.badge-low {
  background-color: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

/* Tier Badges */
.tier-free {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.tier-pro {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.tier-fund {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
}

/* Redline Diff Viewer Styles */
.diff-container {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  line-height: 1.45rem;
}

.diff-line {
  display: flex;
  align-items: flex-start;
  padding: 0.125rem 0.75rem;
  border-left: 3px solid transparent;
  white-space: pre-wrap;
  word-break: break-word;
  transition: background-color 0.1s ease;
}

.diff-line:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.diff-line-number {
  flex-shrink: 0;
  width: 3.25rem;
  text-align: right;
  padding-right: 1rem;
  color: var(--text-dim);
  user-select: none;
}

.diff-line-marker {
  flex-shrink: 0;
  width: 1.5rem;
  font-weight: 700;
  user-select: none;
}

.diff-line-content {
  flex-grow: 1;
}

/* Added lines (Green) */
.diff-line-added {
  background-color: rgba(16, 185, 129, 0.10);
  border-left-color: var(--emerald-accent);
  color: #a7f3d0;
}
.diff-line-added .diff-line-marker {
  color: #34d399;
}
.diff-line-added .diff-line-number {
  color: #059669;
}

/* Removed lines (Crimson) */
.diff-line-removed {
  background-color: rgba(239, 68, 68, 0.12);
  border-left-color: var(--crimson-primary);
  color: #fecaca;
}
.diff-line-removed .diff-line-marker {
  color: #ef4444;
}
.diff-line-removed .diff-line-number {
  color: #dc2626;
}

/* Diff Chunk Header (@@ ... @@) */
.diff-line-chunk {
  background-color: #172138;
  border-left-color: #38bdf8;
  color: #7dd3fc;
  font-weight: 600;
  margin: 0.25rem 0;
}
.diff-line-chunk .diff-line-marker {
  color: #38bdf8;
}

/* Diff Context Lines */
.diff-line-context {
  color: #94a3b8;
}

/* Diff File Header */
.diff-file-header {
  background: #0f1626;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: #93c5fd;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Interactive Ticker Pills */
.ticker-pill {
  transition: all 0.15s ease-in-out;
}
.ticker-pill:hover {
  transform: translateY(-1px);
  border-color: #475569;
}

/* Custom Modal Animation */
.modal-backdrop {
  backdrop-filter: blur(8px);
  background-color: rgba(7, 10, 18, 0.85);
}

.modal-enter {
  opacity: 0;
  transform: scale(0.96) translateY(8px);
}
.modal-enter-active {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

/* Shimmer Loading Effect */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer-loader {
  background: linear-gradient(90deg, #131a2a 25%, #1e2942 50%, #131a2a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Ticker Autocomplete Dropdown */
#ticker-autocomplete-list {
  scrollbar-width: thin;
  scrollbar-color: #25334e #0b0f19;
}

#ticker-autocomplete-list::-webkit-scrollbar {
  width: 4px;
}

#ticker-autocomplete-list::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 2px;
}

