/* Card Components */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.summary-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
}

.summary-card:hover {
  box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.1);
}

.summary-card.full-width {
  grid-column: 1 / -1;
}

.summary-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: hsl(var(--foreground));
}

/* Business Info Styles */
.business-info p {
  margin-bottom: 8px;
  color: hsl(var(--muted-foreground));
}

.business-info strong {
  color: hsl(var(--foreground));
  margin-right: 8px;
}

/* Segment List Styles */
.segment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.segment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
}

.segment-item span {
  color: hsl(var(--foreground));
  font-weight: 500;
}

.segment-item strong {
  color: hsl(var(--primary));
  font-weight: 600;
}

/* Position Metrics */
.position-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Trend List */
.trend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trend-item {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-weight: 500;
}

.trend-item.positive {
  background-color: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
}

.trend-item.negative {
  background-color: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

.trend-item.neutral {
  background-color: hsl(var(--muted) / 0.5);
  color: hsl(var(--muted-foreground));
}

/* Level List */
.level-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.level-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
  border-left: 4px solid;
}

.level-item.resistance {
  background-color: hsl(var(--destructive) / 0.05);
  border-left-color: hsl(var(--destructive));
}

.level-item.support {
  background-color: hsl(var(--success) / 0.05);
  border-left-color: hsl(var(--success));
}

.level-item.stop {
  background-color: hsl(var(--warning) / 0.05);
  border-left-color: hsl(var(--warning));
}

.level-item span:first-child {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.level-item strong {
  font-size: 16px;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.level-note {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  font-style: italic;
}

/* Indicator List */
.indicator-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.indicator-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
  border-left: 3px solid;
}

.indicator-item.bullish {
  border-left-color: hsl(var(--success));
}

.indicator-item.bearish {
  border-left-color: hsl(var(--destructive));
}

.indicator-item.neutral {
  border-left-color: hsl(var(--muted-foreground));
}

.indicator-name {
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.indicator-value {
  font-size: 14px;
  font-weight: 700;
  color: hsl(var(--foreground));
  text-align: right;
}

.indicator-signal {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 6px;
  border-radius: var(--radius);
  text-align: center;
  min-width: 70px;
}

.indicator-item.bullish .indicator-signal {
  background-color: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
}

.indicator-item.bearish .indicator-signal {
  background-color: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

.indicator-item.neutral .indicator-signal {
  background-color: hsl(var(--muted) / 0.3);
  color: hsl(var(--muted-foreground));
}

/* Table Signal Styling */
.bullish {
  color: hsl(var(--success));
  font-weight: 600;
}

.bearish {
  color: hsl(var(--destructive));
  font-weight: 600;
}

.neutral {
  color: hsl(var(--muted-foreground));
  font-weight: 600;
}

/* Recommendation Breakdown */
.recommendation-breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rec-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rec-item span {
  min-width: 80px;
  font-size: 14px;
  color: hsl(var(--muted-foreground));
}

.rec-item strong {
  min-width: 20px;
  text-align: right;
  color: hsl(var(--foreground));
  font-weight: 600;
}

/* Sentiment Score */
.sentiment-score {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.score-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--success)) 0%, hsl(var(--primary)) 100%);
  color: white;
  text-align: center;
}

.score-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.score-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Risk List */
.risk-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.risk-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
}

.risk-item.high {
  background-color: hsl(var(--destructive) / 0.1);
  border-left: 4px solid hsl(var(--destructive));
}

.risk-item.medium {
  background-color: hsl(var(--warning) / 0.1);
  border-left: 4px solid hsl(var(--warning));
}

.risk-item.low {
  background-color: hsl(var(--success) / 0.1);
  border-left: 4px solid hsl(var(--success));
}

.risk-item span {
  color: hsl(var(--foreground));
  font-weight: 500;
}

.risk-item strong {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.risk-item.high strong {
  color: hsl(var(--destructive));
}

.risk-item.medium strong {
  color: hsl(var(--warning));
}

.risk-item.low strong {
  color: hsl(var(--success));
}

/* Risk Metrics */
.risk-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ESG Breakdown */
.esg-breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.esg-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.esg-item span {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.esg-item strong {
  font-size: 16px;
  font-weight: 600;
  color: hsl(var(--foreground));
  text-align: right;
}

/* Innovation Metrics */
.innovation-metrics {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.innovation-metrics .metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
}

.innovation-metrics .metric span {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.innovation-metrics .metric strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

/* Correlation List */
.correlation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.correlation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
}

.correlation-item span {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.correlation-item strong {
  color: hsl(var(--foreground));
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Portfolio Metrics */
.portfolio-metrics {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portfolio-metrics .metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
}

.portfolio-metrics .metric span {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.portfolio-metrics .metric strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

/* Valuation Details */
.valuation-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.valuation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
}

.valuation-item span {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.valuation-item strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

/* Multiple Grid */
.multiple-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.multiple-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
  text-align: center;
}

.multiple-item span {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.multiple-item strong {
  font-size: 20px;
  font-weight: 700;
  color: hsl(var(--foreground));
}

/* Recommendation Details */
.recommendation-details {
  display: flex;
  gap: 24px;
}

.target-price, .upside {
  flex: 1;
}

.target-price span, .upside span {
  display: block;
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 4px;
}

.target-price strong, .upside strong {
  font-size: 24px;
  font-weight: 700;
}

.positive {
  color: hsl(var(--success));
}

.negative {
  color: hsl(var(--destructive));
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.metric {
  text-align: center;
  padding: 16px;
  background-color: hsl(var(--muted) / 0.5);
  border-radius: var(--radius);
}

.metric span {
  display: block;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric strong {
  font-size: 20px;
  font-weight: 700;
  color: hsl(var(--foreground));
}

/* Investment Thesis */
.thesis-points {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.thesis-point {
  padding: 20px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--primary));
}

.point-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.point-header i {
  width: 20px;
  height: 20px;
  color: hsl(var(--primary));
}

.point-header span {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.thesis-point p {
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

/* Chart Container */
.chart-container {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 32px;
}

.chart-container h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: hsl(var(--foreground));
}

.chart-container canvas {
  max-height: 400px;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table th {
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 12px 16px;
  border-top: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.data-table tr:hover {
  background-color: hsl(var(--muted) / 0.3);
}

.data-table .number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table .positive {
  color: hsl(var(--success));
}

.data-table .negative {
  color: hsl(var(--destructive));
}

/* Key Stats Grid */
.key-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.stat-item {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.stat-change {
  font-size: 14px;
  margin-top: 4px;
}

/* Progress Bars */
.progress-bar {
  width: 100%;
  height: 8px;
  background-color: hsl(var(--muted));
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  background-color: hsl(var(--primary));
  transition: width 0.3s ease;
}

.progress-fill.success {
  background-color: hsl(var(--success));
}

.progress-fill.warning {
  background-color: hsl(var(--warning));
}

.progress-fill.danger {
  background-color: hsl(var(--destructive));
}

/* Tabs */
.tabs {
  margin-bottom: 24px;
}

.tab-list {
  display: flex;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 24px;
}

.tab-button {
  background: none;
  border: none;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-button:hover {
  color: hsl(var(--foreground));
}

.tab-button.active {
  color: hsl(var(--primary));
  border-bottom-color: hsl(var(--primary));
}

.tab-content {
  display: none;
}

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

/* Alert Components */
.alert {
  padding: 16px;
  border-radius: var(--radius);
  margin: 16px 0;
  border: 1px solid;
}

.alert-info {
  background-color: hsl(var(--primary) / 0.1);
  border-color: hsl(var(--primary) / 0.2);
  color: hsl(var(--primary));
}

.alert-success {
  background-color: hsl(var(--success) / 0.1);
  border-color: hsl(var(--success) / 0.2);
  color: hsl(var(--success));
}

.alert-warning {
  background-color: hsl(var(--warning) / 0.1);
  border-color: hsl(var(--warning) / 0.2);
  color: hsl(var(--warning));
}

.alert-danger {
  background-color: hsl(var(--destructive) / 0.1);
  border-color: hsl(var(--destructive) / 0.2);
  color: hsl(var(--destructive));
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid;
  text-decoration: none;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary) / 0.8);
}

.btn-outline {
  background-color: transparent;
  color: hsl(var(--primary));
  border-color: hsl(var(--primary));
}

.btn-outline:hover {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* Loading States */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: hsl(var(--muted-foreground));
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid hsl(var(--muted));
  border-top: 2px solid hsl(var(--primary));
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
  
  .recommendation-details {
    flex-direction: column;
    gap: 16px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .key-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tab-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .tab-button {
    white-space: nowrap;
    min-width: 120px;
  }

  .multiple-grid {
    grid-template-columns: 1fr;
  }

  .risk-metrics {
    grid-template-columns: 1fr;
  }

  .position-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .key-stats {
    grid-template-columns: 1fr;
  }
  
  .summary-card {
    padding: 16px;
  }
  
  .chart-container {
    padding: 16px;
  }

  .score-circle {
    width: 100px;
    height: 100px;
  }

  .score-value {
    font-size: 28px;
  }
}

/* Investment Thesis Specific Styles */
.investor-strategies {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.strategy-item {
  padding: 20px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--primary));
}

.strategy-item h4 {
  color: hsl(var(--primary));
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.strategy-item p {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: hsl(var(--foreground));
}

.strategy-item strong {
  color: hsl(var(--primary));
  font-weight: 600;
}

/* Timeline Styles */
.roadmap-timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.roadmap-timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: hsl(var(--border));
}

.timeline-item {
  display: flex;
  gap: 20px;
  position: relative;
}

.timeline-date {
  min-width: 100px;
  padding: 8px 12px;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  height: fit-content;
  position: relative;
  z-index: 1;
}

.timeline-date::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-color: hsl(var(--primary));
  border-radius: 50%;
  border: 3px solid hsl(var(--background));
}

.timeline-content {
  flex: 1;
  padding: 16px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}

.timeline-content h4 {
  color: hsl(var(--foreground));
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-content p {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Alert Styles Enhancement */
.alert {
  padding: 20px;
  border-radius: var(--radius);
  margin: 24px 0;
  border: 1px solid;
}

.alert h4 {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 600;
}

.alert p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.alert ul {
  margin: 12px 0;
  padding-left: 20px;
}

.alert li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.alert-info {
  background-color: hsl(var(--primary) / 0.1);
  border-color: hsl(var(--primary) / 0.2);
  color: hsl(var(--foreground));
}

.alert-info h4 {
  color: hsl(var(--primary));
}

.alert-success {
  background-color: hsl(var(--success) / 0.1);
  border-color: hsl(var(--success) / 0.2);
  color: hsl(var(--foreground));
}

.alert-success h4 {
  color: hsl(var(--success));
}

.alert-warning {
  background-color: hsl(var(--warning) / 0.1);
  border-color: hsl(var(--warning) / 0.2);
  color: hsl(var(--foreground));
}

.alert-warning h4 {
  color: hsl(var(--warning));
}

.alert-danger {
  background-color: hsl(var(--destructive) / 0.1);
  border-color: hsl(var(--destructive) / 0.2);
  color: hsl(var(--foreground));
}

.alert-danger h4 {
  color: hsl(var(--destructive));
}

/* Enhanced Data Table for Investment Thesis */
.data-table th {
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  padding: 16px;
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid hsl(var(--border));
}

.data-table td {
  padding: 16px;
  border-top: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  vertical-align: top;
  line-height: 1.5;
}

.data-table td strong {
  color: hsl(var(--primary));
  font-weight: 600;
}

/* Responsive Timeline */
@media (max-width: 768px) {
  .roadmap-timeline::before {
    left: 10px;
  }
  
  .timeline-item {
    flex-direction: column;
    gap: 12px;
  }
  
  .timeline-date {
    min-width: auto;
    width: fit-content;
    margin-left: 30px;
  }
  
  .timeline-date::before {
    left: -20px;
  }
  
  .timeline-content {
    margin-left: 30px;
  }
  
  .investor-strategies {
    gap: 16px;
  }
  
  .strategy-item {
    padding: 16px;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 12px 8px;
  }
}

@media (max-width: 480px) {
  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .timeline-content {
    margin-left: 20px;
  }
  
  .timeline-date {
    margin-left: 20px;
  }
  
  .timeline-date::before {
    left: -15px;
  }
}

/* Enhanced Business Overview Styles */
.last-updated {
  margin-bottom: 16px;
  padding: 8px 12px;
  background-color: hsl(var(--muted) / 0.5);
  border-radius: var(--radius);
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  text-align: center;
}

.company-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.profile-section h4 {
  color: hsl(var(--primary));
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  border-bottom: 2px solid hsl(var(--primary) / 0.2);
  padding-bottom: 8px;
}

/* Enhanced Segment Analysis */
.segment-analysis {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.segment-item.detailed {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
}

.segment-item.detailed:hover {
  box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.1);
  border-color: hsl(var(--primary) / 0.3);
}

.segment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.segment-header span {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 16px;
}

.segment-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
}

.segment-metrics strong {
  font-size: 18px;
  font-weight: 700;
  color: hsl(var(--primary));
}

.segment-metrics .percentage {
  background-color: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
}

.segment-details p {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.segment-kpis {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.segment-kpis span {
  background-color: hsl(var(--muted) / 0.5);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--foreground));
}

/* Geographic Breakdown */
.geographic-breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.geo-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.geo-item span {
  min-width: 120px;
  font-size: 14px;
  color: hsl(var(--foreground));
  font-weight: 500;
}

.geo-item strong {
  min-width: 50px;
  text-align: right;
  font-weight: 600;
  color: hsl(var(--primary));
}

/* Competitive Table */
.competitive-table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

.competitive-table th {
  padding: 12px 16px;
  font-size: 12px;
}

.competitive-table td {
  padding: 16px;
  vertical-align: top;
}

.competitive-table .rank {
  text-align: center;
  font-weight: 700;
  color: hsl(var(--primary));
}

.competitive-table .number {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Strategic Initiatives */
.initiatives-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.initiative-item {
  padding: 20px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--primary));
}

.initiative-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.initiative-header i {
  width: 20px;
  height: 20px;
  color: hsl(var(--primary));
}

.initiative-header span {
  flex: 1;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.investment-amount {
  background-color: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
}

.initiative-item p {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.kpi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
  text-align: center;
}

.kpi-label {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 4px;
}

.kpi-change {
  font-size: 12px;
  font-weight: 600;
}

.kpi-change.positive {
  color: hsl(var(--success));
}

.kpi-change.negative {
  color: hsl(var(--destructive));
}

/* Value Chain */
.value-chain {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.value-stage {
  padding: 20px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
  border-top: 4px solid hsl(var(--primary));
  text-align: center;
}

.value-stage h4 {
  color: hsl(var(--primary));
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.value-stage p {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.value-margin {
  display: inline-block;
  background-color: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
}

/* Data Sources */
.data-sources {
  margin-top: 32px;
  padding: 24px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--primary));
}

.data-sources h4 {
  color: hsl(var(--primary));
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.data-sources ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.data-sources li {
  padding: 8px 0;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  line-height: 1.5;
  border-bottom: 1px solid hsl(var(--border));
  position: relative;
  padding-left: 20px;
}

.data-sources li:last-child {
  border-bottom: none;
}

.data-sources li::before {
  content: '•';
  color: hsl(var(--primary));
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  .company-profile-grid {
    grid-template-columns: 1fr;
  }
  
  .segment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .segment-metrics {
    align-self: flex-end;
  }
  
  .segment-kpis {
    gap: 8px;
  }
  
  .geo-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .geo-item span {
    min-width: auto;
  }
  
  .geo-item strong {
    min-width: auto;
    text-align: left;
  }
  
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  
  .value-chain {
    grid-template-columns: 1fr;
  }
  
  .initiative-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .competitive-table {
    font-size: 12px;
  }
  
  .competitive-table th,
  .competitive-table td {
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .segment-item.detailed {
    padding: 16px;
  }
  
  .initiative-item {
    padding: 16px;
  }
  
  .value-stage {
    padding: 16px;
  }
  
  .data-sources {
    padding: 16px;
  }
  
  .competitive-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Investment Analysis Section Styles */
.investment-analysis-section {
  margin-bottom: 40px;
  padding: 32px;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.05) 0%, hsl(var(--background)) 100%);
  border: 1px solid hsl(var(--primary) / 0.2);
  border-radius: calc(var(--radius) * 2);
  position: relative;
}

.investment-analysis-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, hsl(var(--primary)) 0%, hsl(var(--success)) 100%);
  border-radius: calc(var(--radius) * 2) calc(var(--radius) * 2) 0 0;
}

.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid hsl(var(--primary) / 0.1);
}

.analysis-header h3 {
  color: hsl(var(--primary));
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.analysis-rating {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.analysis-rating.positive {
  background-color: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
  border: 2px solid hsl(var(--success) / 0.3);
}

.analysis-rating.negative {
  background-color: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
  border: 2px solid hsl(var(--destructive) / 0.3);
}

.analysis-rating.neutral {
  background-color: hsl(var(--warning) / 0.1);
  color: hsl(var(--warning));
  border: 2px solid hsl(var(--warning) / 0.3);
}

.analysis-content {
  line-height: 1.7;
}

.analysis-narrative > p {
  font-size: 16px;
  color: hsl(var(--foreground));
  margin-bottom: 24px;
  font-weight: 500;
  line-height: 1.7;
}

/* Key Factors */
.key-factors {
  margin: 32px 0;
}

.factor-item {
  margin-bottom: 28px;
  padding: 24px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--primary));
  transition: all 0.2s;
}

.factor-item:hover {
  box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.1);
  border-left-color: hsl(var(--success));
}

.factor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.factor-header i {
  width: 24px;
  height: 24px;
  color: hsl(var(--primary));
}

.factor-header h4 {
  color: hsl(var(--primary));
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.factor-item p {
  color: hsl(var(--muted-foreground));
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* Investment Actions */
.investment-actions {
  margin: 32px 0;
  padding: 24px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
}

.investment-actions h4 {
  color: hsl(var(--foreground));
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.action-item {
  padding: 20px;
  border-radius: var(--radius);
  border: 2px solid;
  transition: all 0.2s;
}

.action-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgb(0 0 0 / 0.1);
}

.action-item.buy {
  background-color: hsl(var(--success) / 0.05);
  border-color: hsl(var(--success) / 0.3);
}

.action-item.hold {
  background-color: hsl(var(--warning) / 0.05);
  border-color: hsl(var(--warning) / 0.3);
}

.action-item.neutral {
  background-color: hsl(var(--muted) / 0.5);
  border-color: hsl(var(--muted-foreground) / 0.3);
}

.action-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.action-header i {
  width: 20px;
  height: 20px;
}

.action-item.buy .action-header i,
.action-item.buy .action-header span {
  color: hsl(var(--success));
}

.action-item.hold .action-header i,
.action-item.hold .action-header span {
  color: hsl(var(--warning));
}

.action-item.neutral .action-header i,
.action-item.neutral .action-header span {
  color: hsl(var(--muted-foreground));
}

.action-header span {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.action-item p {
  color: hsl(var(--foreground));
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Bottom Line */
.bottom-line {
  margin-top: 32px;
  padding: 24px;
  background-color: hsl(var(--primary) / 0.05);
  border: 1px solid hsl(var(--primary) / 0.2);
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--primary));
}

.bottom-line h4 {
  color: hsl(var(--primary));
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.bottom-line p {
  color: hsl(var(--foreground));
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  font-weight: 500;
}

/* Supporting Data Header */
.supporting-data-header {
  margin: 40px 0 32px 0;
  padding: 24px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--primary));
  text-align: center;
}

.supporting-data-header h3 {
  color: hsl(var(--primary));
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.supporting-data-header p {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  margin: 0;
  font-style: italic;
}

/* Responsive Investment Analysis */
@media (max-width: 768px) {
  .investment-analysis-section {
    padding: 24px 20px;
    margin-bottom: 32px;
  }
  
  .analysis-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .analysis-header h3 {
    font-size: 20px;
  }
  
  .analysis-narrative > p {
    font-size: 15px;
  }
  
  .factor-item {
    padding: 20px 16px;
  }
  
  .factor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .factor-header h4 {
    font-size: 16px;
  }
  
  .actions-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .action-item {
    padding: 16px;
  }
  
  .investment-actions {
    padding: 20px 16px;
  }
  
  .bottom-line {
    padding: 20px 16px;
  }
  
  .supporting-data-header {
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .investment-analysis-section {
    padding: 20px 16px;
  }
  
  .analysis-header h3 {
    font-size: 18px;
  }
  
  .analysis-rating {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .factor-header i {
    width: 20px;
    height: 20px;
  }
  
  .factor-header h4 {
    font-size: 15px;
  }
  
  .factor-item p {
    font-size: 14px;
  }
  
  .action-header span {
    font-size: 12px;
  }
  
  .action-item p {
    font-size: 13px;
  }
}

/* Industry Analysis Specific Styles */

/* Market Dynamics */
.dynamics-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dynamic-item {
  padding: 20px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  transition: all 0.2s;
}

.dynamic-item:hover {
  box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.1);
}

.dynamic-item.positive {
  border-left: 4px solid hsl(var(--success));
}

.dynamic-item.negative {
  border-left: 4px solid hsl(var(--destructive));
}

.dynamic-item.neutral {
  border-left: 4px solid hsl(var(--warning));
}

.dynamic-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.dynamic-header i {
  width: 20px;
  height: 20px;
}

.dynamic-item.positive .dynamic-header i,
.dynamic-item.positive .dynamic-header span {
  color: hsl(var(--success));
}

.dynamic-item.negative .dynamic-header i,
.dynamic-item.negative .dynamic-header span {
  color: hsl(var(--destructive));
}

.dynamic-item.neutral .dynamic-header i,
.dynamic-item.neutral .dynamic-header span {
  color: hsl(var(--warning));
}

.dynamic-header span {
  font-weight: 600;
  font-size: 16px;
}

.dynamic-item p {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Competitive Advantages Grid */
.advantages-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.advantage-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
}

.advantage-label {
  min-width: 140px;
  font-size: 14px;
  color: hsl(var(--foreground));
  font-weight: 500;
}

.advantage-score {
  min-width: 50px;
  text-align: right;
  font-weight: 600;
  color: hsl(var(--primary));
  font-size: 14px;
}

/* Competitive Table Enhancements */
.competitive-table .moderate {
  color: hsl(var(--warning));
  font-weight: 600;
}

.competitive-table .high {
  color: hsl(var(--destructive));
  font-weight: 600;
}

.competitive-table .low {
  color: hsl(var(--success));
  font-weight: 600;
}

.competitive-table .neutral {
  color: hsl(var(--muted-foreground));
  font-weight: 600;
}

/* Industry Outlook Timeline */
.outlook-timeline {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
}

.outlook-timeline::before {
  content: '';
  position: absolute;
  left: 60px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, hsl(var(--primary)) 0%, hsl(var(--success)) 100%);
}

.outlook-item {
  display: flex;
  gap: 24px;
  position: relative;
}

.outlook-period {
  min-width: 100px;
  padding: 12px 16px;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--success)) 100%);
  color: white;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  height: fit-content;
  position: relative;
  z-index: 1;
}

.outlook-period::before {
  content: '';
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--success)) 100%);
  border-radius: 50%;
  border: 3px solid hsl(var(--background));
}

.outlook-content {
  flex: 1;
  padding: 20px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--primary));
}

.outlook-content h4 {
  color: hsl(var(--primary));
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.outlook-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.outlook-content li {
  padding: 8px 0;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  padding-left: 20px;
}

.outlook-content li::before {
  content: '→';
  color: hsl(var(--primary));
  font-weight: bold;
  position: absolute;
  left: 0;
}

.outlook-content li:last-child {
  padding-bottom: 0;
}

/* Responsive Industry Analysis */
@media (max-width: 768px) {
  .dynamics-list {
    gap: 16px;
  }
  
  .dynamic-item {
    padding: 16px;
  }
  
  .dynamic-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .advantages-grid {
    gap: 12px;
  }
  
  .advantage-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px;
  }
  
  .advantage-label {
    min-width: auto;
  }
  
  .advantage-score {
    min-width: auto;
    text-align: left;
  }
  
  .outlook-timeline::before {
    left: 50px;
  }
  
  .outlook-item {
    flex-direction: column;
    gap: 16px;
  }
  
  .outlook-period {
    min-width: auto;
    width: fit-content;
    margin-left: 30px;
  }
  
  .outlook-period::before {
    right: auto;
    left: -20px;
  }
  
  .outlook-content {
    margin-left: 30px;
  }
  
  .competitive-table {
    font-size: 12px;
  }
  
  .competitive-table th,
  .competitive-table td {
    padding: 8px 6px;
  }
}

@media (max-width: 480px) {
  .dynamic-item {
    padding: 12px;
  }
  
  .dynamic-header span {
    font-size: 14px;
  }
  
  .dynamic-item p {
    font-size: 13px;
  }
  
  .advantage-item {
    padding: 12px;
  }
  
  .outlook-timeline::before {
    left: 40px;
  }
  
  .outlook-content {
    margin-left: 20px;
    padding: 16px;
  }
  
  .outlook-period {
    margin-left: 20px;
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .outlook-period::before {
    left: -15px;
    width: 12px;
    height: 12px;
  }
  
  .outlook-content h4 {
    font-size: 16px;
  }
  
  .outlook-content li {
    font-size: 13px;
  }
  
  .competitive-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Financial Analysis Specific Styles */

/* Cash Flow Metrics */
.cash-flow-metrics {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cf-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
}

.cf-label {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.cf-value {
  font-size: 16px;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.cf-change {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius);
}

.cf-change.positive {
  background-color: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
}

.cf-change.negative {
  background-color: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

/* Balance Sheet Metrics */
.balance-sheet-metrics {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bs-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
}

.bs-label {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.bs-value {
  font-size: 16px;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.bs-status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius);
}

.bs-status.safe {
  background-color: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
}

.bs-status.warning {
  background-color: hsl(var(--warning) / 0.1);
  color: hsl(var(--warning));
}

.bs-status.danger {
  background-color: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

/* Responsive Financial Analysis */
@media (max-width: 768px) {
  .cash-flow-metrics,
  .balance-sheet-metrics {
    gap: 12px;
  }
  
  .cf-metric,
  .bs-metric {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px;
  }
  
  .cf-label,
  .bs-label {
    font-size: 13px;
  }
  
  .cf-value,
  .bs-value {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .cf-metric,
  .bs-metric {
    padding: 12px;
  }
  
  .cf-label,
  .bs-label {
    font-size: 12px;
  }
  
  .cf-value,
  .bs-value {
    font-size: 14px;
  }
  
  .cf-change,
  .bs-status {
    font-size: 10px;
    padding: 2px 6px;
  }
}

/* Technical Analysis Specific Styles */

/* Level List */
.level-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.level-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
  border-left: 4px solid;
}

.level-item.resistance {
  background-color: hsl(var(--destructive) / 0.05);
  border-left-color: hsl(var(--destructive));
}

.level-item.support {
  background-color: hsl(var(--success) / 0.05);
  border-left-color: hsl(var(--success));
}

.level-item.stop {
  background-color: hsl(var(--warning) / 0.05);
  border-left-color: hsl(var(--warning));
}

.level-item span:first-child {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.level-item strong {
  font-size: 16px;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.level-note {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  font-style: italic;
}

/* Indicator List */
.indicator-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.indicator-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
  border-left: 3px solid;
}

.indicator-item.bullish {
  border-left-color: hsl(var(--success));
}

.indicator-item.bearish {
  border-left-color: hsl(var(--destructive));
}

.indicator-item.neutral {
  border-left-color: hsl(var(--muted-foreground));
}

.indicator-name {
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.indicator-value {
  font-size: 14px;
  font-weight: 700;
  color: hsl(var(--foreground));
  text-align: right;
}

.indicator-signal {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 6px;
  border-radius: var(--radius);
  text-align: center;
  min-width: 70px;
}

.indicator-item.bullish .indicator-signal {
  background-color: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
}

.indicator-item.bearish .indicator-signal {
  background-color: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

.indicator-item.neutral .indicator-signal {
  background-color: hsl(var(--muted) / 0.3);
  color: hsl(var(--muted-foreground));
}

/* Table Signal Styling */
.bullish {
  color: hsl(var(--success));
  font-weight: 600;
}

.bearish {
  color: hsl(var(--destructive));
  font-weight: 600;
}

.neutral {
  color: hsl(var(--muted-foreground));
  font-weight: 600;
}

/* Responsive Technical Analysis */
@media (max-width: 768px) {
  .level-list {
    gap: 10px;
  }
  
  .level-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 16px 12px;
  }
  
  .level-item span:first-child {
    font-size: 13px;
  }
  
  .level-item strong {
    font-size: 15px;
  }
  
  .level-note {
    font-size: 10px;
  }
  
  .indicator-list {
    gap: 8px;
  }
  
  .indicator-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }
  
  .indicator-name {
    font-size: 12px;
  }
  
  .indicator-value {
    font-size: 13px;
    text-align: left;
  }
  
  .indicator-signal {
    font-size: 9px;
    padding: 2px 5px;
    min-width: 60px;
  }
}

@media (max-width: 480px) {
  .level-item {
    padding: 12px 10px;
  }
  
  .level-item span:first-child {
    font-size: 12px;
  }
  
  .level-item strong {
    font-size: 14px;
  }
  
  .indicator-item {
    padding: 10px;
  }
  
  .indicator-name {
    font-size: 11px;
  }
  
  .indicator-value {
    font-size: 12px;
  }
}

/* Analysis Summary Section */
.analysis-summary-section {
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.05), hsl(var(--secondary) / 0.05));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.analysis-summary-section h3 {
    margin-bottom: 24px;
    color: hsl(var(--foreground));
    font-size: 1.5rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analysis-summary-section .summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1400px) {
    .analysis-summary-section .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    .analysis-summary-section h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .analysis-summary-section h3 {
        font-size: 1.2rem;
    }
}

.overall-rating {
    text-align: center;
    padding: 24px 20px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

/* Rating highlight backgrounds - full card */
.overall-rating.strong-buy {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: rgba(255,255,255,0.2);
}

.overall-rating.buy {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: rgba(255,255,255,0.2);
}

.overall-rating.hold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-color: rgba(255,255,255,0.2);
}

.overall-rating.sell {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: rgba(255,255,255,0.2);
}

.overall-rating.strong-sell {
    background: linear-gradient(135deg, #991b1b, #7f1d1d);
    color: white;
    border-color: rgba(255,255,255,0.2);
}

.overall-rating::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

.overall-rating:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.rating-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.rating-score .score {
    font-size: 3.2rem;
    font-weight: 900;
    text-shadow: 0 3px 6px rgba(0,0,0,0.3);
    letter-spacing: -1px;
}

.rating-score .max {
    font-size: 1.4rem;
    margin-left: 6px;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.rating-label {
    position: relative;
    z-index: 1;
    margin-top: 8px;
}

.rating-label strong {
    font-size: 1.3rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Ensure all text in rating card is white */
.overall-rating.strong-buy *,
.overall-rating.buy *,
.overall-rating.hold *,
.overall-rating.sell *,
.overall-rating.strong-sell * {
    color: white !important;
}

.analysis-breakdown {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid hsl(var(--border) / 0.3);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item span {
    font-weight: 500;
    color: hsl(var(--foreground));
    flex: 1;
}

.score-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 200px;
}

.score-bar > div {
    height: 8px;
    background: hsl(var(--muted));
    border-radius: 4px;
    position: relative;
    flex: 1;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: hsl(var(--primary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.score-fill.warning {
    background: hsl(var(--warning));
}

.score-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    min-width: 50px;
    text-align: right;
}

.strength-list, .risk-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.strength-list li, .risk-list li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: hsl(var(--foreground));
    font-size: 0.9rem;
    line-height: 1.4;
}

.strength-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: hsl(var(--primary));
    font-weight: bold;
}

.risk-list li::before {
    content: "⚠";
    position: absolute;
    left: 0;
    color: hsl(var(--warning));
}

/* Forecast Section */
.forecast-section {
    margin-bottom: 32px;
    padding: 24px;
    background: hsl(var(--card));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.forecast-section h3 {
    margin-bottom: 24px;
    color: hsl(var(--foreground));
    font-size: 1.5rem;
    font-weight: 600;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1400px) {
    .forecast-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

.forecast-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.forecast-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: hsl(var(--primary));
}

.forecast-card.short-term::before {
    background: hsl(var(--primary));
}

.forecast-card.medium-term::before {
    background: hsl(var(--secondary));
}

.forecast-card.quarterly::before {
    background: hsl(var(--accent));
}

.forecast-card.yearly::before {
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--secondary)));
}

.forecast-card:hover {
    box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.1);
    transform: translateY(-2px);
}

.forecast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid hsl(var(--border) / 0.3);
}

.forecast-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.forecast-confidence {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    background: hsl(var(--muted));
    padding: 4px 8px;
    border-radius: 12px;
}

.forecast-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.price-target {
    text-align: center;
    padding: 16px 0;
}

.price-target .target-price {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 4px;
}

.price-target.main-target .target-price {
    font-size: 1.8rem;
    color: hsl(var(--primary));
}

.price-target .change {
    font-size: 0.9rem;
    font-weight: 600;
}

.target-range {
    text-align: center;
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
    margin-top: 8px;
}

.forecast-drivers h5 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.forecast-drivers ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.forecast-drivers li {
    padding: 6px 0;
    padding-left: 16px;
    position: relative;
    font-size: 0.85rem;
    line-height: 1.4;
    color: hsl(var(--muted-foreground));
}

.forecast-drivers li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: hsl(var(--primary));
    font-weight: bold;
}

@media (max-width: 768px) {
    .analysis-summary-section,
    .forecast-section {
        padding: 16px;
        margin-bottom: 24px;
    }

    .analysis-summary-section .summary-grid,
    .forecast-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .analysis-breakdown {
        gap: 12px;
    }

    .breakdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 0;
    }

    .score-bar {
        width: 100%;
        max-width: none;
    }

    .forecast-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .forecast-confidence {
        align-self: flex-end;
    }

    .rating-score .score {
        font-size: 2.2rem;
    }

    .price-target .target-price {
        font-size: 1.2rem;
    }

    .price-target.main-target .target-price {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .analysis-summary-section h3,
    .forecast-section h3 {
        font-size: 1.1rem;
    }

    .forecast-card {
        padding: 16px;
    }

    .strength-list li,
    .risk-list li,
    .forecast-drivers li {
        font-size: 0.8rem;
    }

    .overall-rating {
        padding: 16px 12px;
    }

    .rating-score .score {
        font-size: 2rem;
    }
}

/* Chat Sidebar Styles */
.chat-sidebar {
    grid-area: chat;
    background: hsl(var(--background));
    border-left: 1px solid hsl(var(--border));
    z-index: 1000;
    display: none;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.app-container.chat-open .chat-sidebar {
    display: flex;
}

.chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none; /* Hide overlay on desktop */
}

/* Show overlay only on mobile */
@media (max-width: 768px) {
    .chat-overlay {
        display: block;
    }
    
    .chat-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* On mobile, use fixed positioning */
    .chat-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        z-index: 1001;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        grid-area: unset;
    }
    
    .app-container.chat-open .chat-sidebar {
        right: 0;
    }
}

/* Enhanced content coordination */
.app-container.chat-open .main-content {
    transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

/* Ensure sidebar navigation remains accessible */
.app-container.chat-open .sidebar {
    z-index: 100; /* Below chat but above content */
}

/* Responsive Chat Sidebar */
@media (max-width: 1200px) {
    /* On smaller screens, reduce chat width */
    .chat-sidebar {
        width: 350px;
        right: -350px;
    }
    
    .app-container.chat-open .main-content {
    }
}

@media (max-width: 768px) {
    /* On mobile, use full overlay */
    .chat-sidebar {
        top: 0; /* Full height on mobile */
        width: 100%;
        height: 100vh;
        right: -100%;
        z-index: 1001; /* Above overlay */
    }
    
    .app-container.chat-open .main-content {
        margin-right: 0; /* No margin on mobile */
    }
    
    .chat-overlay.active {
        display: block;
        z-index: 1000; /* Below chat but above content */
    }
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    min-height: 60px;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.chat-title i {
    width: 24px;
    height: 24px;
    color: hsl(var(--primary));
}

/* Chat Content */
.chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Message Styles */
.message {
    display: flex;
    gap: 12px;
    max-width: 100%;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 4px;
}

.assistant-message .message-avatar {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
    color: white;
}

.user-message .message-avatar {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.message-avatar i {
    width: 16px;
    height: 16px;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-content p {
    margin: 0;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    font-size: 14px;
}

.assistant-message .message-content p {
    background: hsl(var(--muted) / 0.5);
    color: hsl(var(--foreground));
    border-bottom-left-radius: 6px;
}

.user-message .message-content p {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-bottom-right-radius: 6px;
    margin-left: auto;
    max-width: 85%;
}

.user-message {
    flex-direction: row-reverse;
}

/* Chat Input */
.chat-input-container {
    padding: 20px;
    border-top: 1px solid hsl(var(--border));
    background: hsl(var(--card));
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: 24px;
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.chat-input-wrapper:focus-within {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

#chatInput {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    resize: none;
    font-size: 14px;
    line-height: 1.5;
    color: hsl(var(--foreground));
    min-height: 20px;
    max-height: 120px;
    padding: 8px 0;
}

#chatInput::placeholder {
    color: hsl(var(--muted-foreground));
}

.btn-send {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-send:disabled {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    cursor: not-allowed;
}

.btn-send:not(:disabled):hover {
    background: hsl(var(--primary) / 0.9);
    transform: scale(1.05);
}

.btn-send i {
    width: 16px;
    height: 16px;
}

/* Chat Suggestions */
.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.suggestion-chip {
    background: hsl(var(--muted) / 0.5);
    border: 1px solid hsl(var(--border));
    border-radius: 16px;
    padding: 8px 12px;
    font-size: 12px;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.suggestion-chip:hover {
    background: hsl(var(--muted));
    border-color: hsl(var(--primary) / 0.5);
    color: hsl(var(--foreground));
}

/* Header Actions Update */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: hsl(var(--muted) / 0.5);
    color: hsl(var(--muted-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.btn-icon:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
    transform: scale(1.05);
}

.btn-icon i {
    width: 20px;
    height: 20px;
}

/* Icon styles using CSS */
.icon-chat::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-send::before {
    content: "";
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'/%3E%3Cpolygon points='22,2 15,22 11,13 2,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-x::before {
    content: "";
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-bot::before {
    content: "";
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='10' rx='2' ry='2'/%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3Cpath d='M12 7v4'/%3E%3Cline x1='8' y1='16' x2='8' y2='16'/%3E%3Cline x1='16' y1='16' x2='16' y2='16'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-user::before {
    content: "";
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-moon::before {
    content: "";
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.lang-text {
    font-size: 12px;
    font-weight: 600;
}

/* Chat Toggle Active State */
#chatToggle.active {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

#chatToggle.active .icon-chat::before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

/* Content Push Effect */
.app-container.chat-open .main-content {
    transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: hsl(var(--muted-foreground));
    font-style: italic;
    font-size: 13px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: hsl(var(--muted-foreground));
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: hsl(var(--muted));
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground));
}

/* Responsive Chat Sidebar */
@media (max-width: 768px) {
    .chat-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .app-container.chat-open .main-content {
        margin-right: 0;
    }
    
    .chat-overlay.active {
        display: block;
    }
    
    .chat-header {
        padding: 12px 16px;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .chat-input-container {
        padding: 16px;
    }
    
    .suggestion-chip {
        font-size: 11px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .chat-header {
        padding: 10px 12px;
    }
    
    .chat-messages {
        padding: 12px;
        gap: 12px;
    }
    
    .chat-input-container {
        padding: 12px;
    }
    
    .message-content p {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .message-avatar {
        width: 28px;
        height: 28px;
    }
    
    .message-avatar i {
        width: 16px;
        height: 16px;
    }
}

/* Menu Toggle & Navigation Icons */
.menu-toggle {
    margin-right: 16px;
}

.icon-menu::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='18' x2='21' y2='18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

/* Navigation Menu Icons */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.nav-item i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Individual Menu Icons */
.icon-clipboard-list::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M12 11h4'/%3E%3Cpath d='M12 16h4'/%3E%3Cpath d='M8 11h.01'/%3E%3Cpath d='M8 16h.01'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-building::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z'/%3E%3Cpath d='M6 12H4a2 2 0 0 0-2 2v8h20v-8a2 2 0 0 0-2-2h-2'/%3E%3Cpath d='M10 6h4'/%3E%3Cpath d='M10 10h4'/%3E%3Cpath d='M10 14h4'/%3E%3Cpath d='M10 18h4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-factory::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z'/%3E%3Cpath d='M17 18h1'/%3E%3Cpath d='M12 18h1'/%3E%3Cpath d='M7 18h1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-calculator::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cline x1='8' y1='6' x2='16' y2='6'/%3E%3Cline x1='16' y1='14' x2='16' y2='18'/%3E%3Cpath d='M16 10h.01'/%3E%3Cpath d='M12 10h.01'/%3E%3Cpath d='M8 10h.01'/%3E%3Cpath d='M12 14h.01'/%3E%3Cpath d='M8 14h.01'/%3E%3Cpath d='M8 18h.01'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-dollar-sign::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='1' x2='12' y2='23'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-trending-up::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22,7 13.5,15.5 8.5,10.5 2,17'/%3E%3Cpolyline points='16,7 22,7 22,13'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-heart::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-alert-triangle::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-settings::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.icon-briefcase::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3Crect x='2' y='6' width='20' height='14' rx='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

/* Sidebar Toggle States */
.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .nav-header h2 {
    display: none;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .nav-item i {
    margin: 0;
}

/* Smooth transitions for sidebar */
.sidebar {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item span {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    pointer-events: none;
}

/* Main content adjustment when sidebar is collapsed */


/* Responsive adjustments */
@media (max-width: 1024px) {
    .menu-toggle {
        display: block;
    }
    
    .sidebar.collapsed {
        width: 0;
        overflow: hidden;
    }
    
    
}

@media (max-width: 768px) {
    .sidebar.collapsed .nav-item {
        padding: 16px;
    }
}

/* Mobile specific chat positioning */
@media (max-width: 480px) {
    /* On very small screens, use full overlay */
    .chat-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        z-index: 1001;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        grid-area: unset;
    }
    
    .app-container.chat-open .chat-sidebar {
        right: 0;
    }
}

/* Sentiment Analysis Specific Styles */
.consensus-data {
    margin-bottom: 16px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-row span {
    color: hsl(var(--muted-foreground));
    font-size: 14px;
}

.metric-row strong {
    font-weight: 600;
    color: hsl(var(--foreground));
}

.metric-row strong.positive {
    color: hsl(var(--success));
}

.metric-row strong.negative {
    color: hsl(var(--destructive));
}

.metric-row strong.warning {
    color: hsl(var(--warning));
}

.metric-row strong.success {
    color: hsl(var(--success));
}

.metric-row strong.low-risk {
    color: hsl(var(--success));
}

/* Short Metrics */
.short-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Sentiment Sources */
.sentiment-sources {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.source-item {
    padding: 12px;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background-color: hsl(var(--muted) / 0.3);
}

.source-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.source-header span {
    font-weight: 600;
    color: hsl(var(--foreground));
}

.sentiment-badge {
    padding: 4px 8px;
    border-radius: calc(var(--radius) / 2);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.sentiment-badge.positive {
    background-color: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
    border: 1px solid hsl(var(--success) / 0.2);
}

.sentiment-badge.very-positive {
    background-color: hsl(var(--success) / 0.2);
    color: hsl(var(--success));
    border: 1px solid hsl(var(--success));
}

.source-item p {
    margin: 0;
    font-size: 14px;
    color: hsl(var(--muted-foreground));
    line-height: 1.4;
}

/* ESG Metrics */
.esg-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Technical Signals */
.technical-signals {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.signal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.signal-item span {
    color: hsl(var(--muted-foreground));
    font-size: 14px;
}

.signal-item strong.strong-buy {
    color: hsl(var(--success));
    font-weight: 700;
}

.momentum-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 8px 0;
}

.momentum-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background-color: hsl(var(--muted) / 0.3);
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.momentum-item span {
    font-size: 12px;
    color: hsl(var(--muted-foreground));
    margin-bottom: 4px;
}

.momentum-item strong {
    font-size: 14px;
    font-weight: 600;
}

.momentum-item strong.positive {
    color: hsl(var(--success));
}

.momentum-item strong.negative {
    color: hsl(var(--destructive));
}

/* Insights Grid */
.insights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.insight-item {
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
}

.insight-item.positive {
    border-left: 4px solid hsl(var(--success));
    background-color: hsl(var(--success) / 0.05);
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.insight-header i {
    width: 16px;
    height: 16px;
    color: hsl(var(--success));
}

.insight-header span {
    font-weight: 600;
    color: hsl(var(--foreground));
    font-size: 14px;
}

.insight-item p {
    margin: 0;
    font-size: 14px;
    color: hsl(var(--muted-foreground));
    line-height: 1.5;
}

/* Full Width Card */
.summary-card.full-width {
    grid-column: 1 / -1;
}

/* Responsive adjustments for sentiment analysis */
@media (max-width: 768px) {
    .momentum-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .source-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .insights-grid {
        gap: 12px;
    }
    
    .insight-item {
        padding: 12px;
    }
}

/* Risk Analysis Specific Styles */
.risk-matrix-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background-color: hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
}

.risk-table-header {
    display: grid;
    grid-template-columns: 2fr 80px 80px 80px 120px;
    gap: 2px;
    background-color: hsl(var(--muted));
    padding: 12px;
    font-weight: 600;
    font-size: 14px;
    color: hsl(var(--foreground));
}

.risk-table-row {
    display: grid;
    grid-template-columns: 2fr 80px 80px 80px 120px;
    gap: 2px;
    padding: 12px;
    background-color: hsl(var(--card));
    align-items: center;
}

.risk-table-row.critical {
    border-left: 4px solid hsl(var(--destructive));
}

.risk-table-row.high {
    border-left: 4px solid hsl(var(--warning));
}

.risk-table-row.medium {
    border-left: 4px solid #f39c12;
}

.risk-table-row.low {
    border-left: 4px solid hsl(var(--success));
}

.risk-score {
    text-align: center;
    font-weight: 600;
}

.risk-total {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
}

.risk-total.critical {
    color: hsl(var(--destructive));
}

.risk-total.high {
    color: hsl(var(--warning));
}

.risk-total.medium {
    color: #f39c12;
}

.risk-total.low {
    color: hsl(var(--success));
}

.priority-badge {
    text-align: center;
    padding: 4px 8px;
    border-radius: calc(var(--radius) / 2);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-badge.critical {
    background-color: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
    border: 1px solid hsl(var(--destructive) / 0.2);
}

.priority-badge.high {
    background-color: hsl(var(--warning) / 0.1);
    color: hsl(var(--warning));
    border: 1px solid hsl(var(--warning) / 0.2);
}

.priority-badge.medium {
    background-color: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.priority-badge.low {
    background-color: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
    border: 1px solid hsl(var(--success) / 0.2);
}

/* Scenario Analysis */
.scenario-analysis {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scenario-item {
    padding: 16px;
} 

/* Advanced Factors Components */
.alternative-data-table {
  display: table;
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.alt-data-header {
  display: table-row;
  background-color: hsl(var(--muted) / 0.3);
  font-weight: 600;
  font-size: 14px;
}

.alt-data-header span {
  display: table-cell;
  padding: 12px 16px;
  border: 1px solid hsl(var(--border));
  text-align: center;
  color: hsl(var(--foreground));
}

.alt-data-row {
  display: table-row;
}

.alt-data-row.high-impact {
  background-color: hsl(var(--success) / 0.05);
}

.alt-data-row.medium-impact {
  background-color: hsl(var(--warning) / 0.05);
}

.alt-data-row.low-impact {
  background-color: hsl(var(--muted) / 0.05);
}

.alt-data-row > div {
  display: table-cell;
  padding: 16px;
  border: 1px solid hsl(var(--border));
  vertical-align: top;
}

.data-source {
  min-width: 200px;
}

.source-name {
  font-weight: 600;
  color: hsl(var(--foreground));
  display: block;
  margin-bottom: 4px;
}

.source-detail {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.observation strong {
  color: hsl(var(--primary));
  display: block;
  margin-bottom: 4px;
}

.obs-date {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
}

.insight {
  font-size: 13px;
  color: hsl(var(--foreground));
}

.action.positive {
  color: hsl(var(--success));
  font-weight: 500;
}

.action.neutral {
  color: hsl(var(--warning));
  font-weight: 500;
}

/* Factor Exposures */
.factor-exposures {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.factor-subtitle {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  text-align: center;
  margin-bottom: 16px;
}

.factor-item {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
}

.factor-item.strong-positive {
  background: linear-gradient(135deg, hsl(var(--success) / 0.1), hsl(var(--success) / 0.05));
  border-color: hsl(var(--success) / 0.3);
}

.factor-item.positive {
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--primary) / 0.05));
  border-color: hsl(var(--primary) / 0.3);
}

.factor-item.neutral {
  background: hsl(var(--muted) / 0.1);
  border-color: hsl(var(--muted) / 0.3);
}

.factor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.factor-name {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.z-score {
  font-weight: 700;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
}

.z-score.positive {
  background-color: hsl(var(--success) / 0.2);
  color: hsl(var(--success));
}

.z-score.neutral {
  background-color: hsl(var(--muted) / 0.3);
  color: hsl(var(--muted-foreground));
}

.factor-description {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 8px;
}

.portfolio-implication {
  font-size: 13px;
  color: hsl(var(--foreground));
  font-weight: 500;
}

.factor-summary {
  margin-top: 16px;
  padding: 12px;
  background-color: hsl(var(--primary) / 0.1);
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--primary));
}

.factor-summary p {
  font-size: 13px;
  color: hsl(var(--foreground));
  margin: 0;
}

/* ESG Analytics */
.esg-analytics {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.esg-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.esg-metric {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
}

.esg-metric.excellent {
  background: linear-gradient(135deg, hsl(var(--success) / 0.1), hsl(var(--success) / 0.05));
  border-color: hsl(var(--success) / 0.3);
}

.esg-metric.warning {
  background: linear-gradient(135deg, hsl(var(--warning) / 0.1), hsl(var(--warning) / 0.05));
  border-color: hsl(var(--warning) / 0.3);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.metric-name {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 14px;
}

.metric-value {
  font-weight: 700;
  font-size: 16px;
  padding: 4px 12px;
  border-radius: 4px;
}

.metric-value.aaa {
  background-color: hsl(var(--success) / 0.2);
  color: hsl(var(--success));
}

.metric-value.high {
  background-color: hsl(var(--warning) / 0.2);
  color: hsl(var(--warning));
}

.metric-impact {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.carbon-footprint, .transition-initiatives {
  margin-top: 16px;
}

.carbon-footprint h4, .transition-initiatives h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: hsl(var(--foreground));
}

.carbon-scopes {
  display: flex;
  gap: 16px;
  align-items: center;
}

.scope-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
  background-color: hsl(var(--muted) / 0.2);
}

.scope-item.scope1-2 {
  border-left: 4px solid hsl(var(--primary));
}

.scope-item.scope3 {
  border-left: 4px solid hsl(var(--warning));
}

.scope-label {
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.scope-value {
  font-size: 16px;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.scope-multiplier {
  font-size: 10px;
  color: hsl(var(--muted-foreground));
}

.carbon-strategy {
  margin-top: 12px;
}

.carbon-strategy p {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.initiative-item {
  padding: 16px;
  background-color: hsl(var(--muted) / 0.1);
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
}

.initiative-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.initiative-header i {
  color: hsl(var(--primary));
}

.initiative-header span {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.initiative-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-item {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.detail-item span:first-child {
  font-weight: 600;
  color: hsl(var(--primary));
}

.detail-item span:last-child {
  color: hsl(var(--muted-foreground));
}

.esg-verdict {
  margin-top: 16px;
  padding: 16px;
  background-color: hsl(var(--primary) / 0.1);
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--primary));
}

.verdict-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.verdict-header i {
  color: hsl(var(--primary));
}

.verdict-header span {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 14px;
}

.esg-verdict p {
  font-size: 13px;
  color: hsl(var(--foreground));
  margin: 0;
}

/* Monte Carlo Simulation */
.monte-carlo-analysis {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.simulation-inputs h4, .simulation-outputs h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: hsl(var(--foreground));
}

.input-variables {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variable-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: hsl(var(--muted) / 0.2);
  border-radius: var(--radius);
}

.var-name {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.var-distribution {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  font-family: monospace;
}

.percentile-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.percentile-header {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-align: center;
}

.percentile-values {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.percentile-values span {
  padding: 8px;
  text-align: center;
  font-weight: 700;
  border-radius: var(--radius);
}

.percentile-values .negative {
  background-color: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

.percentile-values .neutral {
  background-color: hsl(var(--muted) / 0.2);
  color: hsl(var(--muted-foreground));
}

.percentile-values .median {
  background-color: hsl(var(--primary) / 0.2);
  color: hsl(var(--primary));
  font-size: 16px;
}

.percentile-values .positive {
  background-color: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
}

.percentile-values .strong-positive {
  background-color: hsl(var(--success) / 0.2);
  color: hsl(var(--success));
}

.probability-analysis {
  margin-top: 16px;
}

.prob-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.prob-item {
  padding: 12px;
  border-radius: var(--radius);
  text-align: center;
}

.prob-item.positive {
  background-color: hsl(var(--success) / 0.1);
  border: 1px solid hsl(var(--success) / 0.3);
}

.prob-item.negative {
  background-color: hsl(var(--destructive) / 0.1);
  border: 1px solid hsl(var(--destructive) / 0.3);
}

.prob-item.excellent {
  background-color: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.3);
}

.prob-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prob-header span:first-child {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.prob-value {
  font-size: 18px;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.probability-conclusion {
  padding: 12px;
  background-color: hsl(var(--success) / 0.1);
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--success));
}

.probability-conclusion p {
  font-size: 13px;
  color: hsl(var(--foreground));
  margin: 0;
}

/* Analytics Integration */
.analytics-integration {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.integration-strategies {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.strategy-category h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: hsl(var(--foreground));
}

.strategy-content {
  padding: 12px;
  background-color: hsl(var(--muted) / 0.1);
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--primary));
}

.strategy-content p {
  font-size: 13px;
  color: hsl(var(--foreground));
  margin: 0;
}

.monitoring-framework h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: hsl(var(--foreground));
}

.indicator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.monitor-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background-color: hsl(var(--muted) / 0.1);
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
}

.monitor-item i {
  color: hsl(var(--primary));
}

.monitor-item span:nth-child(2) {
  flex: 1;
  font-weight: 500;
  color: hsl(var(--foreground));
  font-size: 13px;
}

.current-status {
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--success));
}

.conclusion-message {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--primary) / 0.05));
  border-radius: var(--radius);
  border: 1px solid hsl(var(--primary) / 0.3);
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.message-header i {
  color: hsl(var(--primary));
}

.message-header span {
  font-size: 16px;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.conclusion-message p {
  font-size: 14px;
  color: hsl(var(--foreground));
  line-height: 1.5;
  margin: 0;
}