/* Modern Stock Dashboard Styles with Premium Color Palette */
html {
  overflow-x: hidden;
  width: 100%;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  /* background: linear-gradient(to bottom right, #020617, #040c2a, #0f172a); from-slate-950 via-blue-950 to-slate-900 matching graphy */
  background: rgba(2, 6, 23);
  color: var(--text-primary);
  /* Smoother, slower transition for theme changes */
  /* transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), color 0.8s cubic-bezier(0.4, 0, 0.2, 1); */
  line-height: 1.6;
  min-height: 100vh;
  
}


/* ===================================
   Custom Scrollbar Styles (Global)
   =================================== */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.4) rgba(15, 23, 42, 0.3);
}

[data-theme="light"] * {
  scrollbar-color: rgba(90, 103, 216, 0.5) rgba(226, 232, 240, 0.5);
}

/* Webkit Browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
  border-radius: 10px;
  margin: 2px;
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.6),
    rgba(59, 130, 246, 0.4)
  );
  border-radius: 10px;
  border: 2px solid rgba(15, 23, 42, 0.3);
  transition: background 0.3s ease;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(90, 103, 216, 0.7),
    rgba(90, 103, 216, 0.5)
  );
  border: 2px solid rgba(226, 232, 240, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.8),
    rgba(59, 130, 246, 0.6)
  );
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(90, 103, 216, 0.9),
    rgba(90, 103, 216, 0.7)
  );
  box-shadow: 0 0 6px rgba(90, 103, 216, 0.3);
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 1),
    rgba(59, 130, 246, 0.8)
  );
}

[data-theme="light"] ::-webkit-scrollbar-thumb:active {
  background: linear-gradient(
    180deg,
    rgba(90, 103, 216, 1),
    rgba(90, 103, 216, 0.8)
  );
}

/* Scrollbar corner (where horizontal and vertical scrollbars meet) */
::-webkit-scrollbar-corner {
  background: rgba(15, 23, 42, 0.3);
}

[data-theme="light"] ::-webkit-scrollbar-corner {
  background: rgba(226, 232, 240, 0.5);
}

[data-theme="light"] body {
  background: #ffffff;
}

/* Container responsive behavior - mirroring Tailwind's container */
/* Removing the fixed 100% override so Tailwind's container class works as expected */

@media (min-width: 1800px) {
  .container {
    max-width: 100vw !important; /* Cap width for ultra wide screens */
  }
}

@media (min-width: 1440px) {
  .container {
    max-width: 1450px;
  }
}

/* Header Styles */
.header-glass {
  background: rgba(15, 23, 42, 0.8); /* slate-900/80 matching graphy */
  border-bottom: 1px solid var(--border-color);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .header-glass {
  background: rgba(255, 255, 255, 0.9);
}
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stock-ticker {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}
/* Dashboard Grid */
/* Dashboard Grid */
/* Dashboard Grid - Styles handled by Tailwind utilities in HTML */
/* See index.html for grid-cols configuration */

/* Financial Metrics Wrapper */
.financial-metrics-wrapper {
  border: 1px solid rgba(100, 116, 139, 0.249);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  /* background: rgba(15, 23, 42, 0.3); */
}

/* Financial Metrics Row */
.financial-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 0;
}

.metric-card-small {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: all 0.3s ease;
  min-height: 140px;
  justify-content: center;
}

.metric-card-small:hover {
  background: var(--bg-card-hover);
}

.metric-card-small.highlighted {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px #f59e0b;
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.info-icon {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.metric-card-small:hover .info-icon {
  opacity: 1;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
}

.metric-change.positive {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.metric-change.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.metric-change svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 1400px) {
  .financial-metrics-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1024px) {
  .financial-metrics-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .financial-metrics-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .metric-card-small {
    padding: 16px;
  }

  .metric-value {
    font-size: 24px;
  }
}

/* Card Styles with Glassmorphism */
.card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 18px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  /* Smoother transition for theme changes */
  /* transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease, 
                transform 0.3s ease; */
  /* backdrop-filter: blur(10px); */
}

/* .card:hover {
    box-shadow: var(--shadow-lg);
} */

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Timeframe Buttons */
.timeframe-buttons {
  display: flex;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: 12px;
}

.timeframe-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeframe-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.timeframe-btn.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--glow-primary);
}

/* Performance Metrics Bar (Price Chart Time Periods) */
.performance-metrics-bar {
  display: flex;
  gap: 12px;
  padding: 16px;
  /* background: var(--bg-card); */
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.performance-metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  /* background: var(--bg-secondary); */
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 60px;
  position: relative;
  overflow: hidden;
}

/* Hover effect */
.performance-metric-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Active state */
.performance-metric-item.active {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15),
    rgba(59, 130, 246, 0.05)
  );
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Positive/Negative states */
.performance-metric-item.positive .metric-value {
  color: var(--color-success);
}

.performance-metric-item.negative .metric-value {
  color: var(--color-danger);
}

.metric-period {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.performance-metric-item .metric-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.performance-metric-item .metric-value svg {
  width: 14px;
  height: 14px;
}

/* Light theme adjustments */
[data-theme="light"] .performance-metrics-bar {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .performance-metric-item {
  background: #f8f9fc;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .performance-metric-item:hover {
  background: #ffffff;
  border-color: #5a67d8;
  box-shadow: 0 4px 12px rgba(90, 103, 216, 0.15);
}

[data-theme="light"] .performance-metric-item.active {
  background: linear-gradient(
    135deg,
    rgba(90, 103, 216, 0.1),
    rgba(90, 103, 216, 0.05)
  );
  border-color: #5a67d8;
  box-shadow: 0 0 0 2px rgba(90, 103, 216, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .performance-metrics-bar {
    gap: 8px;
    padding: 12px;
  }

  .performance-metric-item {
    min-width: 70px;
    padding: 10px 14px;
  }

  .metric-period {
    font-size: 12px;
  }

  .performance-metric-item .metric-value {
    font-size: 12px;
  }
}

/* Chart Container */
.chart-container {
  position: relative;
  margin: 12px 0;
}

.chart-container canvas {
  max-width: 100%;
  height: auto !important;
}

/* Loading Spinner Animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Chart Container Responsive Styles */
@media (max-width: 1024px) {
  .chart-container {
    min-height: 350px;
  }
}

.chart-subtitle {
  font-size: 0.875rem; /* 14px */
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem; /* 12px */
}

/* Price Change Indicator */
.price-change-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin-top: 16px;
}

.change-positive {
  color: var(--color-success);
}

.change-negative {
  color: var(--color-danger);
}

/* Revenue Charts Container */
.revenue-charts-container {
  display: flex;
  gap: 16px; /* Reduced gap */
  margin-top: 24px;
  width: 100%;
}

.revenue-chart-card {
  flex: 1;
  min-width: 0; /* Prevent flex overflow */
  background: rgba(15, 23, 42, 0.5); /* slate-900/50 matching graphy */
  border: 1px solid rgba(51, 65, 85, 0.5); /* slate-700/50 matching graphy */
  border-radius: 12px;
  padding: 20px; /* Reduced padding */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
}

.revenue-chart-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 24px;
  font-family: "Inter", sans-serif;
}

/* Light theme overrides - keeping dark style for now as requested for "exact match" 
   but providing structure if needed later */
[data-theme="light"] .revenue-chart-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .revenue-chart-title {
  color: #1f2937;
}

@media (max-width: 1024px) {
  .revenue-charts-container {
    flex-direction: column;
  }
  .revenue-chart-card {
    width: 100%;
  }
}

/* Radar Charts Grid */
.radar-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 0px;
}

.radar-card {
  background: rgba(15, 23, 42, 0.5); /* slate-900/50 matching graphy */
  border: 1px solid rgba(51, 65, 85, 0.5); /* slate-700/50 matching graphy */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-height: 320px; /* Reduced height to fit smaller charts */
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Ensure border radius works */
}

.radar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5); /* slate-700/50 matching graphy */
  background: rgba(255, 255, 255, 0.02);
}

.radar-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.radar-content {
  flex: 1;
  display: flex;
  position: relative;
  padding: 15px;
}

.radar-legend {
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 20px;
}

.legend-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-label {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
}

.legend-icon {
  width: 32px;
  height: 16px;
  border-radius: 2px;
}

/* Custom Legend Icons */
.icon-nvda {
  border: 2px solid #3b82f6;
  background: transparent;
}

.icon-industry {
  border: 2px dashed #22c55e;
  background: transparent;
}

.icon-exchange {
  border: 2px dotted #f59e0b;
  background: transparent;
}

.radar-chart-container {
  flex: 1;
  position: relative;
  min-height: 280px;
}

/* Light Theme Overrides */
[data-theme="light"] .radar-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .radar-header {
  border-bottom-color: #e5e7eb;
  background: rgba(0, 0, 0, 0.01);
}

[data-theme="light"] .radar-title {
  color: #1f2937;
}

@media (max-width: 1384px) {
.radar-charts-grid {
  gap: 10px;
}
.radar-content {

  padding: 0px;
}
}
@media (max-width: 1024px) {
  .radar-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .radar-content {
    flex-direction: column;
    padding: 0px;
  }

  .radar-legend {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    padding-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    margin-bottom: 15px;
  }

  .radar-chart-container {
    min-height: 250px;
  }

  .radar-card {
    min-height: 350px;
  }
}

@media (max-width: 480px) {
  .radar-content {
    padding: 12px;
  }

  .radar-legend {
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }

  .legend-item {
    gap: 6px;
  }

  .legend-label {
    font-size: 11px;
  }

  .legend-icon {
    width: 15px;
    height: 15px;
  }

  .radar-chart-container {
    min-height: 220px;
  }

  .radar-card {
    min-height: 300px;
  }

  .radar-title {
    font-size: 14px;
  }
}

/* Technical Analysis Section */
.technical-analysis-wrapper {
  margin-top: 0px;
}

.technical-main-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #2a3544;
  border-radius: 12px;
  margin-bottom: 12px;
}

.technical-main-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.technical-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.technical-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #2a3544;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.technical-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #2a3544;
  background: rgba(255, 255, 255, 0.02);
}

.technical-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.technical-indicators-list {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.technical-indicator-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.technical-indicator-name {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 2px;
}

.technical-indicator-value {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.technical-indicator-value.bullish {
  color: #10b981;
}

.technical-indicator-value.bearish {
  color: #ef4444;
}

.technical-indicator-value.neutral {
  color: #f59e0b;
}

.technical-signal-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.technical-signal-badge.buy {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.technical-signal-badge.sell {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.technical-signal-badge.neutral {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.technical-signal-badge.above {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Light Theme Overrides */
[data-theme="light"] .technical-main-header,
[data-theme="light"] .technical-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .technical-card-header {
  border-bottom-color: #e5e7eb;
  background: rgba(0, 0, 0, 0.01);
}

[data-theme="light"] .technical-main-title,
[data-theme="light"] .technical-card-title,
[data-theme="light"] .technical-indicator-name {
  color: #1f2937;
}

@media (max-width: 1024px) {
  .technical-grid {
    grid-template-columns: 1fr;
  }
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

@media (min-width: 1380px) {
  .metrics-grid {
    gap:10px;
  }
}
@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* Metric Card Styles */
.metric-card {
  background: var(--bg-card);
  padding: 20px; /* Reduced padding */
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  position: relative;
  height: auto; /* Let content define height */
  transition: all 0.3s ease;
}

.metric-card:hover {
  background: var(--bg-card-hover);
}

/* Header Section */
.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px; /* Reduced margin */
  position: relative;
}

.metric-name {
  font-size: 16px;  /*Slightly smaller */
  font-weight: 600;
  color: var(--text-primary);
}

.metric-icon {
  position: absolute;
  top: 0;
  right: 0;
  color: var(--color-success);
}

/* Chart Section */
.metric-chart-container {
  height: 100px; /* Reduced height */
  width: 100%;
  margin-bottom: 16px; /* Reduced margin */
  position: relative;
}

.metric-chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Current Value Section */
.current-value-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px; /* Reduced margin */
}

.current-value-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.current-value-text {
  font-size: 28px; /* Slightly smaller */
  font-weight: 700;
  color: var(--color-primary);
}

/* Growth Metrics Section */
.growth-metrics-section {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Reduced gap */
  margin-bottom: 16px; /* Reduced margin */
}

.growth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1.5;
}

.growth-label {
  font-size: 14px;
  color: var(--text-tertiary);
}

.growth-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-success);
}

/* Averages Section */
.averages-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.average-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1.5;
}

.average-label {
  font-size: 13px;
  color: var(--text-tertiary);
}

.average-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Revenue Charts Container */
.revenue-charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

@media (max-width: 768px) {
  .revenue-charts-container {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 1280px) {
  .metric-name {
  font-size: 14px; /* Slightly smaller */

}
}
/* Radar Grid */
.radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.radar-item {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  /* Smoother transition for theme changes */
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease,
    transform 0.3s ease;
}

.radar-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  /* margin-bottom: 16px; */
  text-align: center;
}

/* Technical Panel */
.technical-panel {
  display: grid;
  gap: 24px;
}

.technical-section {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  /* Smoother transition for theme changes */
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease,
    transform 0.3s ease;
}

.technical-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.technical-indicators {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.indicator-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--bg-card);
  border-radius: 12px;
}

.indicator-name {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.indicator-value {
  font-weight: 600;
  font-size: 0.875rem;
}

.indicator-signal {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.signal-buy {
  background: rgba(56, 239, 125, 0.2);
  color: var(--color-success);
}

.signal-sell {
  background: rgba(255, 106, 0, 0.2);
  color: var(--color-danger);
}

.signal-neutral {
  background: rgba(102, 126, 234, 0.2);
  color: var(--color-primary);
}

/* Key Metrics - Card Based Design */
.key-metrics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual Key Metric Card */
.key-metric-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.key-metric-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
}

/* Header Section */
.key-metric-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.key-metric-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.key-metric-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* Content Section */
.key-metric-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Row for Price Movement items */
.key-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.key-metric-label {
  font-size: 14px;
  color: var(--text-tertiary);
}

.key-metric-value {
  font-size: 16px;
  font-weight: 600;
}

.key-metric-value.negative {
  color: rgb(239 68 68); /* red-500 */
}

.key-metric-value.positive {
  color: rgb(34 197 94); /* green-500 */
}

/* Pill Style for Percentage */
.key-metric-pill {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.key-metric-pill.negative {
  background: rgb(239 68 68 / 0.2); /* red-500/20 */
  color: rgb(239 68 68); /* red-500 */
}

.key-metric-pill.positive {
  background: rgb(34 197 94 / 0.2); /* green-500/20 */
  color: rgb(34 197 94); /* green-500 */
}

/* Large Value for Range/Volume/Market Cap */
.key-metric-value-large {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

/* News Section */
.news-section {
  max-height: 600px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-section::-webkit-scrollbar {
  width: 6px;
}

.news-section::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

.news-section::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

.news-card {
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  /* Smoother transition for theme changes */
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease,
    transform 0.3s ease;
  cursor: pointer;
}

.news-card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.news-source {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
}

.news-time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.news-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Utility Classes */
.text-success {
  color: var(--color-success);
}

.text-danger {
  color: var(--color-danger);
}

.text-info {
  color: var(--color-info);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .radar-grid {
    grid-template-columns: 1fr;
  }

  .timeframe-buttons {
    flex-wrap: wrap;
  }

  .card {
    padding: 10px;
  }

  /* Fix chart overflow on mobile */
  .left-column {
    max-width: 100%;
    overflow-x: hidden;
  }

  .chart-container {
    max-width: 100%;
    overflow-x: hidden;
  }

  .chart-container canvas {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Ensure all cards fit within viewport */
  .card,
  .card-body {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Fix any fixed-width elements */
  * {
    max-width: 100%;
  }

  /* Prevent body overflow */
  body {
    overflow-x: hidden;
  }

  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Performance Analysis Styles (NEW) */
.performance-analysis {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.performance-bar-item {
  display: grid;
  grid-template-columns: minmax(130px, 180px) 1fr minmax(50px, 60px);
  gap: 10px;
  align-items: center;
}

/* Responsive adjustments for performance bars */
@media (max-width: 1280px) {
  .performance-bar-item {
    grid-template-columns: minmax(100px, 120px) 1fr minmax(50px, 60px);
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .performance-bar-item {
    grid-template-columns: minmax(80px, 100px) 1fr minmax(50px, 60px);
    gap: 6px;
  }

  .performance-label {
    font-size: 0.8rem;
  }

  .performance-value {
    font-size: 0.8rem;
  }
}

.performance-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.performance-bar-container {
  height: 24px;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.performance-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
}

.performance-bar-fill::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.performance-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}

/* Color classes for performance bars - matching graphy */
.bar-red {
  background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
}

.bar-yellow {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.bar-lightgreen {
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
}

.bar-green {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

/* Analyst Reports Styles (NEW) */
.analyst-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  /* Smoother transition for theme changes */
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.summary-column {
  text-align: center;
}

.summary-period {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  font-weight: 600;
}

.summary-counts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-count {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.summary-label {
  color: var(--text-secondary);
}

.summary-number {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.summary-number.buy {
  color: var(--color-success);
  background: rgba(56, 239, 125, 0.1);
}

.summary-number.hold {
  color: var(--color-warning);
  background: rgba(255, 217, 61, 0.1);
}

.summary-number.sell {
  color: var(--color-danger);
  background: rgba(255, 106, 0, 0.1);
}

.analyst-table-container {
  max-height: 500px;
  overflow-y: auto;
}

.analyst-table-container::-webkit-scrollbar {
  width: 6px;
}

.analyst-table-container::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

.analyst-table-container::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

.analyst-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.analyst-table thead th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 1;
}

.analyst-table tbody tr {
  background: var(--bg-secondary);
  /* Smoother transition for theme changes */
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s ease;
}

.analyst-table tbody tr:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.analyst-table tbody td {
  padding: 16px;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.analyst-table tbody td:first-child {
  border-left: 1px solid var(--border-color);
  border-radius: 8px 0 0 8px;
}

.analyst-table tbody td:last-child {
  border-right: 1px solid var(--border-color);
  border-radius: 0 8px 8px 0;
}

.trend-icon {
  font-size: 1.25rem;
  display: inline-block;
}

.trend-upgrade {
  color: var(--color-success);
}
.trend-downgrade {
  color: var(--color-danger);
}
.trend-neutral {
  color: var(--text-tertiary);
}

.recommendation-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-buy {
  background: rgba(56, 239, 125, 0.2);
  color: var(--color-success);
}

.badge-hold {
  background: rgba(255, 217, 61, 0.2);
  color: var(--color-warning);
}

.badge-sell {
  background: rgba(255, 106, 0, 0.2);
  color: var(--color-danger);
}

/* Stock Comparison Styles (NEW) */
.stock-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.comparison-card {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  /* Smoother transition for theme changes */
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease,
    transform 0.3s ease;
}

.comparison-card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-sm);
}

.comparison-category {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.comparison-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.consensus-score-container {
  margin-bottom: 20px;
}

.score-bar {
  height: 32px;
  background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
  border-radius: 16px;
  position: relative;
  margin-bottom: 12px;
}

.score-marker {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.score-value {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.score-label {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.comparison-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.detail-label {
  color: var(--text-secondary);
}

.detail-value {
  font-weight: 600;
  color: var(--text-primary);
}

.detail-value.positive {
  color: var(--color-success);
}

.news-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.news-link:hover {
  color: var(--color-primary-light);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .performance-bar-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .analyst-summary {
    grid-template-columns: 1fr;
  }

  .stock-comparison {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   NAVIGATION STYLES (matching graphy)
   ============================================ */

/* Navigation Container */
.navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.95); /* slate-950/95 - darker to match graphy */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5); /* slate-700/50 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .navigation {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #3b82f6;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-logo:hover {
  color: #60a5fa;
}

.nav-logo svg {
  width: 28px;
  height: 28px;
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 0;
  height: 2px;
  background: #3b82f6;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Nav CTA */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-text {
  font-weight: 500;
}

@media (max-width: 640px) {
  .theme-text {
    display: none;
  }
}

/* Secondary Button (Log In) */
.btn-secondary {
  padding: 0.5rem 1.25rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(51, 65, 85, 0.5); /* slate-700/50 */
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: rgba(30, 41, 59, 0.5); /* slate-800/50 */
  color: var(--text-primary);
  border-color: rgba(71, 85, 105, 0.5); /* slate-600/50 */
}

[data-theme="light"] .btn-secondary {
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

.line {
  transition: all 0.3s ease;
}

.menu-toggle.is-open .line-top {
  transform: translateY(5px) rotate(45deg);
  transform-origin: center;
}

.menu-toggle.is-open .line-middle {
  opacity: 0;
}

.menu-toggle.is-open .line-bottom {
  transform: translateY(-5px) rotate(-45deg);
  transform-origin: center;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  position: absolute;
  background: rgba(15, 23, 42, 0.98); /* slate-900/98 */
  backdrop-filter: blur(16px);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(51, 65, 85, 0.5); /* slate-700/50 */
  top: 90%;
  right: 2rem;
  z-index: 999;
  min-width: 200px;
}

[data-theme="light"] .mobile-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
}

.mobile-menu.isMenuOpenTrue {
  display: flex;
}

.mobile-menu a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
}

.mobile-menu a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .mobile-menu a:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav-container {
    padding: 1rem;
  }
}

/* Adjust main content */
main {
  margin-top: 30px;
}

/* ============================================
   FINANCIAL HEALTH SCORE STYLES
   ============================================ */

.health-score-header,
.performance-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.health-icon,
.performance-icon {
  flex-shrink: 0;
}

.health-title,
.performance-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.score-box {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.1) 0%,
    rgba(16, 185, 129, 0.05) 100%
  );
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.score-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: #10b981;
  line-height: 1;
  margin-bottom: 8px;
}

.score-label {
  font-size: 1rem;
  font-weight: 600;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.company-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.company-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.company-rating {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
}

.company-rating.excellent {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.explanation-section {
  margin-bottom: 24px;
}

.explanation-title,
.risk-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metrics-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metric-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.metric-badge {
  width: 40px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.metric-badge.badge-green {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.metric-badge.badge-orange {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.metric-badge.badge-yellow {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
}

.metric-badge.badge-red {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.metric-name {
 /* font-size: 0.875rem; */
  color: var(--text-secondary);
}

.metric-score {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}

.risk-flags-section {
  margin-top: 20px;
}

.risk-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: rgba(239, 68, 68, 0.05);
  border-radius: 8px;
  margin-bottom: 8px;
}

.risk-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.risk-text {
  font-size: 0.8125rem;
  color: rgba(239, 68, 68, 0.9);
  line-height: 1.4;
}

/* ============================================
   PERFORMANCE SCORE STYLES
   ============================================ */

.circular-chart-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 30px auto;
}

.chart-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.center-score {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.center-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.performance-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.footer-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.footer-rating {
  font-size: 1.125rem;
  font-weight: 700;
}

.footer-rating.excellent {
  color: #10b981;
}

/* ============================================
   COMPETITOR ANALYSIS TABLE STYLES
   ============================================ */

.competitor-table-wrapper {
  width: 100%;
  margin: 20px 0;
}

.competitor-table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  /* Hide scrollbar but keep functionality */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.competitor-table-scroll::-webkit-scrollbar {
  height: 8px;
}

.competitor-table-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.competitor-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.competitor-table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.competitor-table {
  width: 100%;
  min-width: 1400px;
  border-collapse: separate;
  border-spacing: 0;
}

.competitor-table thead {
  background: #1e293b; /* slate-800 matching graphy */
  position: sticky;
  top: 0;
  z-index: 10;
}

.competitor-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.competitor-table th:last-child {
  border-right: none;
}

.competitor-table th.sticky-col {
  position: sticky;
  left: 0;
  background: #1e293b; /* slate-800 matching graphy */
  z-index: 11;
  /* box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1); */
}

.competitor-table tbody tr {
  background: transparent;
  transition: background-color 0.15s ease;
}

.competitor-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.competitor-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.competitor-table td {
  padding: 12px 16px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.competitor-table td:last-child {
  border-right: none;
}

.competitor-table td.sticky-col {
  position: sticky;
  left: 0;
  background: inherit;
  z-index: 5;
  font-weight: 600;
  color: var(--text-primary);
}

.competitor-table tbody tr:nth-child(odd) td.sticky-col {
  background: #1e293b;
}

.competitor-table tbody tr:nth-child(even) td.sticky-col {
  background: #1e293b;
}

.competitor-table tbody tr:hover td.sticky-col {
  background: #1e293b;
}

.competitor-table .stock-name {
  font-weight: 600;
  color: var(--text-primary);
}

.competitor-table .industry {
  font-weight: 100;
  color: var(--text-primary);
}

/* Industry and Sector Badge Styling */
.industry-badge,
.sector-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  white-space: nowrap;
}

.competitor-table .symbol {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  font-weight: 800;
  background-color: #2e384782;
  color: #97a2ae;
}

.competitor-table .positive-perf {
  color: #10b981;
  font-weight: 600;
}

.competitor-table .negative-perf {
  color: #ef4444;
  font-weight: 600;
}

.competitor-table .negative-value {
  color: #ef4444;
}

/* Percentile-based Text Colors */
.competitor-table .percentile-high {
  color: #0ccd40; /* Green - 80-100 percentile */
  font-weight: 600;
}

.competitor-table .percentile-good {
  color: #0f7f38; /* Light Green - 60-79 percentile */
  font-weight: 500;
}

.competitor-table .percentile-neutral {
  color: var(--text-secondary); /* Neutral - 40-59 percentile */
}

.competitor-table .percentile-low {
  color: #f59e0b; /* Orange - 20-39 percentile */
  font-weight: 500;
}

.competitor-table .percentile-poor {
  color: #ef4444; /* Red - 0-19 percentile */
  font-weight: 600;
}

/* Light Mode Overrides for Competitor Table */
[data-theme="light"] .competitor-table th {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .competitor-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .competitor-table thead {
  background: #f1f5f9;
}

[data-theme="light"] .competitor-table th {
  color: rgba(0, 0, 0, 0.8);
}

/* ============================================
   DASHBOARD CARDS (9 CARDS GRID) STYLES
   ============================================ */

.dashboard-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 10px;
  margin-bottom: 30px;
}

@media (max-width: 1280px) {
  .dashboard-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-cards-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-cards-grid {
    margin-top: 0px;
  }
}

.chart-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 320px;
}

.chart-container-sm {
  position: relative;
  height: 200px;
  width: 100%;
  margin-top: auto;
  margin-bottom: auto;
}

.card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.card-footer-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.card-footer-note {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin-top: 12px;
}

.text-success {
  color: var(--color-success);
}
.text-secondary {
  color: var(--text-secondary);
}

/* Rating Changes List Styles */
.rating-changes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* max-height: 240px; */
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.rating-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.rating-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rating-firm {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.rating-date {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.rating-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rating-change {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
}

.rating-old {
  color: var(--text-secondary);
}
.rating-arrow {
  color: var(--text-tertiary);
}

.rating-new {
  font-weight: 600;
}
.rating-new.up {
  color: var(--color-success);
}
.rating-new.down {
  color: var(--color-danger);
}
.rating-new.neutral {
  color: var(--text-secondary);
}

.rating-target {
  font-size: 0.8125rem;
  color: var(--color-primary-light);
  font-weight: 500;
}

/* Rating Change Card Styles */
.rating-change-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(71, 85, 105, 0.3);
}

/* Light Theme - Dashboard Cards */
[data-theme="light"] .rating-item {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .rating-change-card {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ============================================
   NEWS FEED STYLES (LIVE FEED)
   ============================================ */

/* Live Indicator Animation */
.live-indicator {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  /* animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; */
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}
/* 
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
} */

.news-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
  width: 100%;
}

/* News Feed Container */
.news-feed-container {
  max-height: 1600px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.news-feed-container::-webkit-scrollbar {
  width: 6px;
}

.news-feed-container::-webkit-scrollbar-track {
  background: transparent;
}

.news-feed-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.news-feed-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* News Feed Item */
.news-feed-item {
  padding: 20px;
  /* background: var(--bg-secondary); */
  /* border: 1px solid var(--border-color); */
  border-radius: 12px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.news-feed-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

/* Category Tag */
.news-category-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* News Meta (Subcategory • Source • Time) */
.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}

.news-subcategory {
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.3px;
}

.news-source-name {
  color: var(--text-secondary);
  font-weight: 500;
}

.news-time-stamp {
  color: var(--text-tertiary);
}

.news-meta-separator {
  color: var(--text-tertiary);
  opacity: 0.5;
}

/* News Headline */
.news-feed-headline {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 8px;
}

/* News Description */
.news-feed-description {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* Read More Link */
.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #3b82f6;
  text-decoration: none;
  transition: all 0.2s ease;
}

.news-read-more:hover {
  color: #60a5fa;
  gap: 8px;
}

.news-read-more svg {
  transition: transform 0.2s ease;
}

.news-read-more:hover svg {
  transform: translateX(2px);
}

/* Light Theme Overrides */
[data-theme="light"] .news-feed-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .news-feed-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .news-feed-item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .news-feed-item:hover {
  background: #f8f9fa;
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .news-feed-headline {
  color: #1a1a2e;
}

[data-theme="light"] .news-feed-description {
  color: #4a5568;
}

[data-theme="light"] .news-subcategory,
[data-theme="light"] .news-time-stamp {
  color: #64748b;
}

[data-theme="light"] .news-source-name {
  color: #1e293b;
}

[data-theme="light"] .news-meta-separator {
  color: #94a3b8;
}

/* ============================================
   SIDEBAR NEWS STYLES
   ============================================ */

.sidebar-news-item {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid var(--color-primary);
}

.sidebar-news-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}

.sidebar-news-item .news-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.75rem;
}

.sidebar-news-item .news-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
}

/* ============================================
   LIGHT THEME FIXES
   ============================================ */

/* Fix sidebar news items in light theme */
[data-theme="light"] .sidebar-news-item {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sidebar-news-item:hover {
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Fix analyst reports table in light theme */
[data-theme="light"] #analystReportsSection .overflow-x-auto {
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] #analystReportsSection table thead {
  background: #f8f9fa !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] #analystReportsSection table th {
  color: #4a5568 !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] #analystReportsSection table td {
  color: #1a1a2e !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] #analystReportsSection table tbody tr {
  border-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] #analystReportsSection table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02) !important;
}

/* Analyst Reports Responsive Styles */
@media (max-width: 768px) {
  #analystReports .grid {
    grid-template-columns: 100px repeat(5, 1fr) !important;
    gap: 0.5rem !important;
    column-gap: 0.375rem !important;
  }

  #analystReports .text-sm,
  #analystReports span {
    font-size: 11px !important;
  }

  #analystReports .text-base {
    font-size: 12px !important;
  }

  #analystReports table th,
  #analystReports table td {
    padding: 0.5rem !important;
    font-size: 11px !important;
  }
}

@media (max-width: 480px) {
  #analystReports .grid {
    grid-template-columns: 75px repeat(5, 1fr) !important;
    gap: 0.375rem !important;
    column-gap: 0.25rem !important;
  }

  #analystReports .text-sm,
  #analystReports span {
    font-size: 10px !important;
  }

  #analystReports .text-base {
    font-size: 11px !important;
  }

  #analystReports table th,
  #analystReports table td {
    padding: 0.375rem !important;
    font-size: 10px !important;
  }

  #analystReports .px-3 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

/* Fix summary section text colors */
[data-theme="light"] #analystReportsSection .summary-item span {
  color: #1a1a2e !important;
}

/* Fix technical analysis indicators in light theme */
[data-theme="light"] .indicator-item,
[data-theme="light"] .technical-indicator {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .indicator-group {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .indicator-label {
  color: #4a5568;
}

[data-theme="light"] .indicator-value {
  color: #1a1a2e;
}

/* ============================================
   STOCK HEADER STYLES
   ============================================ */

.stock-header-container {
  display: flex;
  justify-content: space-between;
  /* align-items: flex-end; */
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.stock-info-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.stock-ticker {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin: 0;
}

.stock-exchange-badge {
  background: #3b82f6;
  color: white;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  transform: translateY(-6px);
  letter-spacing: 0.5px;
}

.stock-company-name {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

.stock-info-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.stock-price-main {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.currency-icon {
  font-size: 1.75rem;
  color: var(--text-secondary);
  font-weight: 700;
  margin-top: 2px;
}

.price-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.price-change-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 600;
}

.price-change-info.positive {
  color: #22c55e;
}

.price-change-info.negative {
  color: #ef4444;
}

.last-update-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .stock-header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .stock-info-right {
    align-items: flex-start;
    /* margin-top: 12px; */
  }

  .stock-ticker {
    font-size: 2rem;
  }

  .price-value {
    font-size: 2.5rem;
  }
}

/* ============================================
   KEY METRICS STYLES (Vertical Cards)
   ============================================ */

.key-metrics-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.key-metrics-icon {
  color: var(--color-primary);
}

.key-metrics-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.key-metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.metric-card-vertical {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
}

.metric-card-vertical:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.metric-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.metric-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.metric-icon.icon-red {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.metric-icon.icon-blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.metric-icon.icon-purple {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

.metric-icon.icon-orange {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
}

.metric-icon.icon-green {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.metric-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.metric-card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.metric-value {
  font-size: 1.125rem;
  font-weight: 700;
}

.metric-value.text-red {
  color: #ef4444;
}

.metric-value.text-green {
  color: #22c55e;
}

.metric-value-large {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
}

.metric-pill.positive {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.metric-pill.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Light Theme */
[data-theme="light"] .metric-card-vertical {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .metric-icon.icon-red {
  background: rgba(239, 68, 68, 0.08);
}

[data-theme="light"] .metric-icon.icon-blue {
  background: rgba(59, 130, 246, 0.08);
}

[data-theme="light"] .metric-icon.icon-purple {
  background: rgba(168, 85, 247, 0.08);
}

[data-theme="light"] .metric-icon.icon-orange {
  background: rgba(249, 115, 22, 0.08);
}

[data-theme="light"] .metric-icon.icon-green {
  background: rgba(34, 197, 94, 0.08);
}

/* Stock vs Competition Section */
.stock-comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.comparison-card {
  background: #0b1221; /* Very dark blue/black from image */
  border-radius: 16px;
  padding: 20px 16px; /* Further reduced padding */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-header {
  margin-bottom: 16px; /* Further reduced margin */
  width: 100%;
}

.comparison-category {
  font-size: 10px; /* Slightly smaller */
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-bottom: 4px; /* Further reduced margin */
  font-weight: 600;
}

.comparison-name {
  font-size: 18px; /* Slightly smaller */
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.consensus-score-container {
  width: 100%;
  margin-bottom: 20px; /* Further reduced margin */
}

.score-label-top {
  font-size: 11px; /* Slightly smaller */
  color: #94a3b8;
  text-align: left;
  margin-bottom: 4px; /* Further reduced margin */
}

.score-bar-container {
  position: relative;
  height: 24px; /* Further reduced height */
  background: #22c55e; /* Green color */
  border-radius: 12px;
  margin-bottom: 8px; /* Further reduced margin */
  width: 100%;
}

.score-bar {
  width: 100%;
  height: 100%;
}

.score-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #000000;
  transform: translateX(-50%);
}

.score-value-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px; /* Removed gap */
}

.score-value {
  font-size: 20px; /* Slightly smaller */
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.score-rating {
  font-size: 10px; /* Slightly smaller */
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.comparison-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px; /* Further reduced gap */
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px; /* Further reduced padding */
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 13px;
  text-align: left;
}

.detail-label {
  color: #94a3b8;
  flex: 1;
}

.detail-value {
  color: #ffffff;
  font-weight: 600;
  text-align: right;
  flex: 1;
}

.detail-value-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 1;
}

.text-white {
  color: #ffffff;
}

.positive {
  color: #22c55e;
}

.positive-text {
  color: #22c55e;
}

.news-link {
  color: #3b82f6;
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
}

.news-link:hover {
  color: #60a5fa;
  text-decoration: underline;
}

/* Section Header Border */
#stockComparisonSection .card-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

/* Light Theme Overrides */
[data-theme="light"] .comparison-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .comparison-name {
  color: #0f172a;
}

[data-theme="light"] .score-value {
  color: #0f172a;
}

[data-theme="light"] .detail-value {
  color: #0f172a;
}

[data-theme="light"] .text-white {
  color: #0f172a;
}

[data-theme="light"] .comparison-details {
  border-top-color: #e2e8f0;
}

[data-theme="light"] #stockComparisonSection .card-header {
  border-bottom-color: #e2e8f0;
}

/* Responsive */
@media (max-width: 1024px) {
  .stock-comparison {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Performance Metrics Bar
   ======================================== */

.performance-metrics-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  padding: 16px 10px;
  margin-bottom: 16px;
  border: solid 1px var(--border-color);
  border-radius: 10px;
  gap: 20px;
}

.performance-metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.metric-period {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
}

.metric-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 700;
}

.metric-value.positive {
  color: #10b981;
}

.metric-value.negative {
  color: #ef4444;
}

.metric-value svg {
  flex-shrink: 0;
}

/* Light Theme - No additional styles needed */

/* Responsive */
@media (max-width: 1024px) {
  .performance-metrics-bar {
    padding: 12px 16px;
    gap: 12px;
  }

  .metric-period {
    font-size: 12px;
  }

  .metric-value {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .performance-metrics-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .performance-metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   Additional Analysis Cards (2x2 Grid)
   ======================================== */

.analysis-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  /* margin-bottom: 32px; */
}

.analysis-card {
  /* background: var(--bg-secondary); */
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  min-width: 0;
  overflow: hidden;
}

.analysis-card:hover {
  box-shadow: var(--shadow-lg);
}

.analysis-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.analysis-card-header svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.analysis-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.analysis-card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-x: auto;
  min-width: 0;
}

/* Price Change Heatmap Styles */
.heatmap-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  font-weight: 500;
}

.heatmap-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
}

/* Month labels row (horizontal) */
.heatmap-months {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  padding-left: 24px;
}

.heatmap-month-label {
  font-size: 12px;
  color: var(--text-tertiary);
  width: 48px;
  text-align: center;
  font-weight: 500;
}

/* Data rows */
.heatmap-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.heatmap-label {
  font-size: 12px;
  color: var(--text-tertiary);
  width: 12px;
  text-align: left;
  font-weight: 500;
}

.heatmap-cells {
  display: flex;
  gap: 42px;
  flex: 1;
}

.heatmap-cell {
  width: 18px;
  height: 16px;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.heatmap-cell:hover {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Heatmap color scale - Green (positive) to Red (negative) */
.heatmap-cell.neutral {
  background-color: rgba(100, 116, 139, 0.3);
}

.heatmap-cell.positive-low {
  background-color: rgba(34, 197, 94, 0.4);
}

.heatmap-cell.positive-medium {
  background-color: rgba(34, 197, 94, 0.6);
}

.heatmap-cell.positive-high {
  background-color: rgba(34, 197, 94, 0.8);
}

.heatmap-cell.positive-very-high {
  background-color: rgba(34, 197, 94, 1);
}

.heatmap-cell.negative-low {
  background-color: rgba(239, 68, 68, 0.4);
}

.heatmap-cell.negative-medium {
  background-color: rgba(239, 68, 68, 0.6);
}

.heatmap-cell.negative-high {
  background-color: rgba(239, 68, 68, 0.8);
}

.heatmap-cell.negative-very-high {
  background-color: rgba(239, 68, 68, 1);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 12px;
}

.legend-text {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.legend-gradient {
  display: flex;
  gap: 3px;
  align-items: center;
}

.legend-square {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/* Light Theme */
[data-theme="light"] .analysis-card {
  background: var(--bg-card);
  border-color: #e2e8f0;
}

[data-theme="light"] .heatmap-subtitle {
  color: var(--text-secondary);
}

[data-theme="light"] .heatmap-label {
  color: var(--text-secondary);
}

[data-theme="light"] .legend-text {
  color: var(--text-secondary);
}

[data-theme="light"] .heatmap-cell.neutral {
  background-color: rgba(148, 163, 184, 0.3);
}

/* ========================================
   Company Profile Card Styles
   ======================================== */

.company-profile-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.profile-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  text-align: justify;
}

.profile-industry-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: default;
  width: fit-content;
}

.profile-industry-badge:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.profile-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-info-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.profile-info-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.profile-metrics-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.profile-metric-row:last-child {
  border-bottom: none;
}

.profile-metric-row:hover {
  padding-left: 4px;
  background: rgba(59, 130, 246, 0.03);
  border-radius: 6px;
}

.profile-metric-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.profile-metric-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.profile-ceo-section {
  margin-top: 8px;
}

.profile-ceo-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.profile-website-link {
  font-size: 14px;
  font-weight: 500;
  color: #60a5fa;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
  word-break: break-all;
}

.profile-website-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Light Theme */
[data-theme="light"] .profile-description {
  color: var(--text-secondary);
}

[data-theme="light"] .profile-industry-badge {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
  color: #2563eb;
}

[data-theme="light"] .profile-industry-badge:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="light"] .profile-info-grid {
  border-top-color: #e2e8f0;
  border-bottom-color: #e2e8f0;
}

[data-theme="light"] .profile-metric-row {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .profile-website-link {
  color: #2563eb;
}

[data-theme="light"] .profile-website-link:hover {
  color: #1d4ed8;
}

[data-theme="light"] .profile-metric-row:hover {
  background: rgba(59, 130, 246, 0.05);
}

/* ========================================
   Earnings Timeline Card Styles
   ======================================== */

.earnings-timeline-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.earnings-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.earnings-section-header svg {
  width: 18px;
  height: 18px;
  color: #3b82f6;
}

.earnings-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.earnings-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 8px;
}

.earnings-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 4px 0;
  position: relative;
}

.earnings-timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 26px;
  bottom: -10px;
  width: 2px;
  background: rgba(59, 130, 246, 0.3);
}

.earnings-timeline-dot {
  width: 16px;
  height: 16px;
  background: #3b82f6;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
  z-index: 1;
}

.earnings-timeline-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex: 1;
}

.earnings-timeline-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.earnings-quarter {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.earnings-date {
  font-size: 13px;
  color: var(--text-tertiary);
}

.earnings-timeline-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.earnings-table-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 0;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.earnings-header-spacer {
  width: 140px;
}

.earnings-header-columns {
  display: flex;
  gap: 40px;
  flex: 1;
  justify-content: flex-end;
  padding-right: 8px;
}

.earnings-column-header {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  min-width: 50px;
}

.earnings-data-row {
  display: flex;
  gap: 40px;
  align-items: center;
}

.earnings-data-cell {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
  min-width: 50px;
}

.earnings-beat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
}

.earnings-values {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
}

.earnings-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #10b981;
}

/* Light Theme */
[data-theme="light"] .earnings-section-header {
  border-bottom-color: #e2e8f0;
}

[data-theme="light"] .earnings-timeline-item:not(:last-child)::before {
  background: rgba(59, 130, 246, 0.2);
}

[data-theme="light"] .earnings-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

/* ========================================
   Financial Statements Analysis Card
   ======================================== */

.financial-statements-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fs-toggle-buttons {
  display: flex;
  gap: 8px;
}

.fs-toggle-btn {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.fs-toggle-btn.active {
  background: var(--text-primary);
  color: var(--bg-secondary);
  border-color: var(--text-primary);
}

.fs-toggle-btn:not(.active):hover {
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.fs-tabs {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
}

.fs-tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.fs-tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.fs-tab-btn:not(.active):hover {
  background: rgba(255, 255, 255, 0.05);
}

.fs-table-container {
  overflow-x: auto;
  overflow-y: auto;
  /* max-height: 500px; */
}

.fs-table {
  width: 100%;
  border-collapse: collapse;
}

.fs-table thead th {
  padding: 10px 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fs-table thead th:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 20;
  background: var(--bg-secondary);
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.fs-table thead th:not(:first-child) {
  text-align: right;
}

.fs-table tbody td {
  padding: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.fs-table tbody td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--bg-primary);
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.fs-table tbody tr:hover td:first-child {
  background: rgba(255, 255, 255, 0.02);
}

.fs-table tbody td:not(:first-child) {
  text-align: right;
  font-weight: 600;
}

.fs-table tbody tr:last-child td {
  border-bottom: none;
}

.fs-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Light Theme */
[data-theme="light"] .fs-toggle-btn {
  border-color: #e2e8f0;
}

[data-theme="light"] .fs-toggle-btn.active {
  background: var(--text-primary);
  color: #ffffff;
}

[data-theme="light"] .fs-toggle-btn:not(.active):hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .fs-tab-btn.active {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .fs-tab-btn:not(.active):hover {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .fs-table thead th {
  border-bottom-color: #e2e8f0;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .fs-table tbody td {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .fs-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* Responsive */
@media (max-width: 1024px) {
  .analysis-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .heatmap-months {
    gap: 8px;
    padding-left: 20px;
  }

  .heatmap-month-label {
    width: 30px;
    font-size: 11px;
  }

  .heatmap-label {
    width: 12px;
  }

  .heatmap-row {
    gap: 8px;
  }

  .heatmap-cells {
    gap: 24px;
  }

  .heatmap-cell {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 768px) {
  .analysis-cards-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .analysis-card {
    padding: 18px;
  }

  .analysis-card-title {
    font-size: 16px;
  }

  /* Company Profile Mobile */
  .company-profile-container {
    gap: 14px !important;
  }

  .profile-section {
    gap: 6px !important;
  }

  .profile-section-title {
    font-size: 12px !important;
  }

  .profile-description {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  .profile-industry-badge {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }

  .profile-info-grid {
    gap: 12px !important;
    padding: 12px 0 !important;
  }

  .profile-info-label {
    font-size: 11px !important;
  }

  .profile-info-value {
    font-size: 16px !important;
  }

  .profile-metric-row {
    padding: 10px 8px !important;
  }

  .profile-metric-label {
    font-size: 12px !important;
  }

  .profile-metric-value {
    font-size: 14px !important;
  }

  .profile-ceo-name {
    font-size: 14px !important;
  }

  /* Earnings Timeline Mobile */
  .earnings-timeline-container {
    gap: 12px;
  }

  .earnings-section-title {
    font-size: 14px;
  }

  .earnings-timeline-item {
    gap: 12px;
    padding: 12px 0;
  }

  .earnings-timeline-dot {
    width: 12px;
    height: 12px;
  }

  .earnings-date {
    font-size: 11px !important;
  }

  .earnings-quarter {
    font-size: 13px !important;
  }

  .earnings-metric {
    font-size: 11px !important;
  }

  .earnings-value {
    font-size: 12px !important;
  }

  .earnings-header-spacer {
    width: 100px !important;
  }

  .earnings-header-columns {
    gap: 20px !important;
  }

  .earnings-column-header {
    font-size: 9px !important;
    min-width: 40px !important;
  }

  .earnings-data-row {
    gap: 20px !important;
  }

  .earnings-data-cell {
    font-size: 11px !important;
    min-width: 40px !important;
  }

  .earnings-beat-badge {
    padding: 2px 8px !important;
    font-size: 10px !important;
  }

  /* Financial Statements Mobile */
  .fs-toggle-buttons {
    gap: 6px;
    flex-wrap: wrap;
  }

  .fs-toggle-btn {
    padding: 6px 12px !important;
    font-size: 11px !important;
  }

  .fs-tab-buttons {
    gap: 4px;
  }

  .fs-tab-btn {
    padding: 8px 14px !important;
    font-size: 11px !important;
  }

  .fs-table thead th,
  .fs-table tbody td {
    padding: 10px 12px !important;
    font-size: 12px !important;
  }

  .fs-table thead th:first-child,
  .fs-table tbody td:first-child {
    min-width: 120px;
  }
}

@media (max-width: 640px) {
  .analysis-card {
    padding: 16px;
  }

  .analysis-card-title {
    font-size: 15px;
  }

  .heatmap-months {
    gap: 4px;
    padding-left: 14px;
  }

  .heatmap-month-label {
    width: 22px;
    font-size: 10px;
  }

  .heatmap-label {
    width: 10px;
  }

  .heatmap-row {
    gap: 4px;
  }

  .heatmap-cell {
    width: 12px;
    height: 12px;
    border-radius: 3px;
  }

  .heatmap-cells {
    gap: 14px;
  }

  /* Company Profile Small Mobile */
  .company-profile-container {
    gap: 12px !important;
  }

  .profile-section {
    gap: 5px !important;
  }

  .profile-section-title {
    font-size: 11px !important;
  }

  .profile-description {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }

  .profile-industry-badge {
    font-size: 11px !important;
    padding: 5px 10px !important;
  }

  .profile-info-grid {
    gap: 10px !important;
    padding: 10px 0 !important;
  }

  .profile-info-label {
    font-size: 10px !important;
  }

  .profile-info-value {
    font-size: 14px !important;
  }

  .profile-metric-row {
    padding: 8px 6px !important;
  }

  .profile-metric-label {
    font-size: 11px !important;
  }

  .profile-metric-value {
    font-size: 12px !important;
  }

  .profile-ceo-name {
    font-size: 12px !important;
  }

  /* Earnings Timeline Small Mobile */
  .earnings-timeline-item {
    gap: 10px;
    padding: 10px 0;
  }

  .earnings-timeline-item:not(:last-child)::before {
    left: 5px;
  }

  .earnings-timeline-dot {
    width: 10px;
    height: 10px;
  }

  .earnings-date {
    font-size: 10px !important;
  }

  .earnings-quarter {
    font-size: 12px !important;
  }

  .earnings-metric,
  .earnings-value {
    font-size: 10px !important;
  }

  .earnings-header-spacer {
    width: 80px !important;
  }

  .earnings-header-columns {
    gap: 15px !important;
  }

  .earnings-column-header {
    font-size: 8px !important;
    min-width: 35px !important;
  }

  .earnings-data-row {
    gap: 15px !important;
  }

  .earnings-data-cell {
    font-size: 10px !important;
    min-width: 35px !important;
  }

  .earnings-beat-badge {
    padding: 2px 6px !important;
    font-size: 9px !important;
  }

  /* Financial Statements Small Mobile */
  .fs-toggle-btn {
    padding: 5px 10px !important;
    font-size: 10px !important;
  }

  .fs-tab-btn {
    padding: 6px 10px !important;
    font-size: 10px !important;
  }

  .fs-table thead th,
  .fs-table tbody td {
    padding: 8px 10px !important;
    font-size: 11px !important;
  }

  .fs-table thead th:first-child,
  .fs-table tbody td:first-child {
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .analysis-card {
    padding: 14px;
  }

  .analysis-card-header {
    gap: 8px;
    margin-bottom: 14px;
  }

  .analysis-card-title {
    font-size: 14px;
  }

  .analysis-card-header svg {
    width: 16px;
    height: 16px;
  }

  /* Company Profile Extra Small Mobile */
  .company-profile-container {
    gap: 10px !important;
  }

  .profile-section {
    gap: 4px !important;
  }

  .profile-section-title {
    font-size: 10px !important;
  }

  .profile-description {
    font-size: 11px !important;
    line-height: 1.4 !important;
  }

  .profile-industry-badge {
    font-size: 10px !important;
    padding: 4px 8px !important;
  }

  .profile-info-grid {
    gap: 8px !important;
    padding: 8px 0 !important;
  }

  .profile-info-label {
    font-size: 9px !important;
  }

  .profile-info-value {
    font-size: 12px !important;
  }

  .profile-metric-row {
    padding: 6px 5px !important;
  }

  .profile-metric-label {
    font-size: 10px !important;
  }

  .profile-metric-value {
    font-size: 11px !important;
  }

  .profile-ceo-name {
    font-size: 11px !important;
  }

  /* Earnings Timeline Extra Small Mobile */
  .earnings-section-title {
    font-size: 13px;
  }

  .earnings-timeline-item {
    gap: 8px;
    padding: 8px 0;
  }

  .earnings-timeline-content {
    gap: 8px;
  }

  .earnings-date {
    font-size: 9px !important;
  }

  .earnings-quarter {
    font-size: 11px !important;
  }

  .earnings-values {
    font-size: 9px !important;
    white-space: nowrap;
  }

  .earnings-badge {
    font-size: 9px !important;
    padding: 3px 8px !important;
  }

  .earnings-header-spacer {
    width: 70px !important;
  }

  .earnings-header-columns {
    gap: 12px !important;
  }

  .earnings-column-header {
    font-size: 7px !important;
    min-width: 30px !important;
  }

  .earnings-data-row {
    gap: 12px !important;
  }

  .earnings-data-cell {
    font-size: 9px !important;
    min-width: 30px !important;
  }

  .earnings-beat-badge {
    padding: 2px 5px !important;
    font-size: 8px !important;
  }

  /* Financial Statements Extra Small Mobile */
  .fs-toggle-buttons {
    gap: 4px;
  }

  .fs-toggle-btn {
    padding: 4px 8px !important;
    font-size: 9px !important;
  }

  .fs-tab-buttons {
    gap: 3px;
  }

  .fs-tab-btn {
    padding: 5px 8px !important;
    font-size: 9px !important;
  }

  .fs-table thead th,
  .fs-table tbody td {
    padding: 6px 8px !important;
    font-size: 10px !important;
  }

  .fs-table thead th:first-child,
  .fs-table tbody td:first-child {
    min-width: 80px;
  }

  /* Heatmap Extra Small Mobile */
  .heatmap-subtitle {
    font-size: 12px;
  }

  .heatmap-label {
    font-size: 10px !important;
  }

  .heatmap-cell {
    width: 10px;
    height: 10px;
    border-radius: 2px;
  }

  .heatmap-cells {
    gap: 2px;
  }

  .legend-text {
    font-size: 10px;
  }
}

/* Extra Extra Small Mobile - Handle very narrow screens */
@media (max-width: 380px) {
  .analysis-card {
    padding: 12px;
  }

  .analysis-card-header {
    gap: 6px;
    margin-bottom: 12px;
  }

  .analysis-card-title {
    font-size: 13px;
  }

  /* Earnings Timeline - Stack vertically on very small screens */
  .earnings-timeline-content {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start !important;
  }

  .earnings-timeline-right {
    align-items: flex-start !important;
    width: 100%;
  }

  .earnings-values {
    text-align: left !important;
    font-size: 8px !important;
    word-break: break-word;
    white-space: normal;
  }

  .earnings-badge {
    font-size: 8px !important;
    padding: 2px 6px !important;
  }

  .earnings-quarter {
    font-size: 10px !important;
  }

  .earnings-date {
    font-size: 8px !important;
  }

  .earnings-header-spacer {
    width: 60px !important;
  }

  .earnings-header-columns {
    gap: 10px !important;
  }

  .earnings-column-header {
    font-size: 7px !important;
    min-width: 25px !important;
  }

  .earnings-data-row {
    gap: 10px !important;
  }

  .earnings-data-cell {
    font-size: 8px !important;
    min-width: 25px !important;
  }

  .earnings-beat-badge {
    padding: 1px 4px !important;
    font-size: 7px !important;
  }

  /* Company Profile - Very Narrow Screens */
  .company-profile-container {
    gap: 8px !important;
  }

  .profile-section {
    gap: 3px !important;
  }

  .profile-section-title {
    font-size: 9px !important;
  }

  .profile-description {
    font-size: 10px !important;
    line-height: 1.3 !important;
  }

  .profile-industry-badge {
    font-size: 9px !important;
    padding: 3px 6px !important;
  }

  .profile-info-grid {
    gap: 6px !important;
    padding: 6px 0 !important;
  }

  .profile-info-label {
    font-size: 8px !important;
  }

  .profile-info-value {
    font-size: 11px !important;
  }

  .profile-metric-row {
    padding: 5px 4px !important;
  }

  .profile-metric-label {
    font-size: 9px !important;
  }

  .profile-metric-value {
    font-size: 10px !important;
  }

  .profile-ceo-name {
    font-size: 10px !important;
  }

  /* Financial Statements - More compact */
  .fs-toggle-btn {
    padding: 3px 6px !important;
    font-size: 8px !important;
  }

  .fs-tab-btn {
    padding: 4px 6px !important;
    font-size: 8px !important;
  }

  .fs-table thead th,
  .fs-table tbody td {
    padding: 5px 6px !important;
    font-size: 9px !important;
  }

  .fs-table thead th:first-child,
  .fs-table tbody td:first-child {
    min-width: 70px;
  }

  /* Heatmap - Smaller cells */
  .heatmap-subtitle {
    font-size: 11px;
  }

  .heatmap-months {
    gap: 3px;
    padding-left: 11px;
  }

  .heatmap-month-label {
    width: 14px;
    font-size: 9px;
  }

  .heatmap-label {
    width: 8px;
    font-size: 9px !important;
  }

  .heatmap-row {
    gap: 3px;
  }

  .heatmap-cell {
    width: 8px;
    height: 8px;
    border-radius: 2px;
  }

  .heatmap-cells {
    gap: 9px;
  }

  .legend-text {
    font-size: 9px;
  }
}

/* ============================================
   Quarterly Revenue Dashboard Styles
   ============================================ */

.qrd-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 20px 0;
}

.qrd-chart-section {
  width: 100%;
  min-height: 300px;
  position: relative;
}

/* .qrd-chart-section canvas {
    width: 100% !important;
    height: auto !important;
} */

/* Performance Metrics Table */
.qrd-table-section {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
}

.qrd-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.qrd-table thead {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 2px solid var(--border-color);
}

.qrd-table thead th {
  padding: 14px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-right: 1px solid var(--border-color);
}

.qrd-table thead th:first-child {
  text-align: left;
  width: 180px;
}

.qrd-table thead th:last-child {
  border-right: none;
}

.qrd-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s ease;
}

.qrd-table tbody tr:last-child {
  border-bottom: none;
}

.qrd-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.qrd-table tbody td {
  padding: 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-right: 1px solid var(--border-color);
}

.qrd-table tbody td:last-child {
  border-right: none;
}

.qrd-metric-name {
  text-align: left !important;
  font-weight: 700 !important;
  font-size: 15px !important;
}

.qrd-ile-cell {
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.15),
    rgba(34, 197, 94, 0.05)
  );
  color: var(--color-success) !important;
  font-weight: 700 !important;
}

/* Light Theme Overrides */
[data-theme="light"] .qrd-table {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .qrd-table thead {
  background: rgba(0, 0, 0, 0.02);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .qrd-table thead th {
  border-right-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .qrd-table tbody tr {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .qrd-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .qrd-table tbody td {
  border-right-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .qrd-ile-cell {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.12),
    rgba(16, 185, 129, 0.04)
  );
}

/* Responsive Design */
@media (max-width: 1024px) {
  .qrd-table-section {
    margin: 15px 0;
  }

  .qrd-table thead th,
  .qrd-table tbody td {
    padding: 12px 10px;
    font-size: 12px;
  }

  .qrd-metric-name {
    font-size: 13px !important;
  }
}

@media (max-width: 768px) {
  .qrd-container {
    gap: 20px;
    padding: 10px 0;
  }

  .qrd-chart-section {
    min-height: 200px;
    max-height: 350px;
  }

  .qrd-chart-section canvas {
    max-height: 350px !important;
  }

  .qrd-table {
    font-size: 11px;
  }

  .qrd-table thead th,
  .qrd-table tbody td {
    padding: 10px 8px;
    font-size: 11px;
  }

  .qrd-table thead th:first-child {
    width: 120px;
  }
}

@media (max-width: 480px) {
  .qrd-container {
    gap: 15px;
    padding: 5px 0;
  }

  .qrd-chart-section {
    min-height: 180px;
    max-height: 300px;
  }

  .qrd-chart-section canvas {
    max-height: 300px !important;
  }

  .qrd-table {
    font-size: 10px;
  }

  .qrd-table thead th,
  .qrd-table tbody td {
    padding: 8px 6px;
    font-size: 10px;
  }

  .qrd-table thead th:first-child {
    width: 90px;
  }

  .qrd-metric-name {
    font-size: 11px !important;
  }
}

/* Technical Analysis Panel */
.technical-indicator-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}
.technical-indicator-row:last-child {
  border-bottom: none;
}
.technical-indicator-name {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}
.technical-indicator-value {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
/* Indicator Status Colors */
.bullish,
.technical-indicator-value.bullish {
  color: var(--color-success);
}
.bearish,
.technical-indicator-value.bearish {
  color: var(--color-danger);
}
.neutral,
.technical-indicator-value.neutral {
  color: var(--color-warning);
}

.technical-indicator-value {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
/* Indicator Status Colors */
.bullish,
.technical-indicator-value.bullish {
  color: var(--color-success);
}
.bearish,
.technical-indicator-value.bearish {
  color: var(--color-danger);
}
.neutral,
.technical-indicator-value.neutral {
  color: var(--color-warning);
}

/* Competitor Analysis Table - Sticky Column Theme Support */
.competitor-table .sticky-col {
  position: sticky;
  left: 0;
  z-index: 10;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
}

.competitor-table .symbol.sticky-col {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-right: 1px solid var(--border-color);
}

[data-theme="light"] .competitor-table .sticky-col {
  background: #f3f4f6;
  color: #1f2937;
}

[data-theme="light"] .competitor-table .symbol.sticky-col {
  background: #f3f4f6;
  color: #1f2937;
}

/* Action Badge Styles for Analyst Grading Table */
.action-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: lowercase;
}

.action-badge-buy {
  background-color: #10b981;
  color: #ffffff;
}

.action-badge-upgrade {
  background-color: #10b981;
  color: #ffffff;
}

.action-badge-hold {
  background-color: #f59e0b;
  color: #ffffff;
}

.action-badge-sell {
  background-color: #ef4444;
  color: #ffffff;
}

.action-badge-downgrade {
  background-color: #ef4444;
  color: #ffffff;
}

[data-theme="light"] .action-badge-buy {
  background-color: #10b981;
  color: #ffffff;
}
[data-theme="light"] .action-badge-upgrade {
  background-color: #10b981;
  color: #ffffff;
}

[data-theme="light"] .action-badge-hold {
  background-color: #f59e0b;
  color: #ffffff;
}

[data-theme="light"] .action-badge-sell {
  background-color: #ef4444;
  color: #ffffff;
}
[data-theme="light"] .action-badge-downgrade {
  background-color: #ef4444;
  color: #ffffff;
}