body {
  background: #f5f7fa;
}

.card {
  border-radius: 12px;
}

.display-6 {
  font-weight: 700;
}

.table thead th {
  white-space: nowrap;
}

.card {
  overflow: hidden;
}

#performance-chart {
  height: 260px;
  width: 100%;
}

#sentiment-btc-chart {
  height: 260px;
  width: 100%;
}

#ta-performance-chart {
  height: 260px;
  width: 100%;
}

#ta-structure-chart {
  height: 340px;
  width: 100%;
}

.plotly-graph-div {
  width: 100% !important;
}

.performance-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 0;
  font-size: 0.85rem;
}


.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.legend-swatch {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}

.legend-model {
  background: #1f77b4;
}

.legend-btc {
  background: #ff7f0e;
}

.structure-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.legend-range-low {
  background: #dc3545;
}

.legend-range-high {
  background: #198754;
}

.legend-hl {
  background: #dc3545;
}

.legend-sh {
  background: #198754;
}

.legend-cap {
  background: #6c757d;
}

.legend-fib-r-0236 { background: #94a3b8; }
.legend-fib-r-0382 { background: #3b82f6; }
.legend-fib-r-0500 { background: #6366f1; }
.legend-fib-r-0618 { background: #8b5cf6; }
.legend-fib-r-0786 { background: #ec4899; }

.legend-fib-ext-up-1000 { background: #059669; }
.legend-fib-ext-up-1272 { background: #10b981; }
.legend-fib-ext-up-1618 { background: #34d399; }
.legend-fib-ext-up-2000 { background: #6ee7b7; }

.legend-fib-ext-down-1000 { background: #dc2626; }
.legend-fib-ext-down-1272 { background: #f97316; }
.legend-fib-ext-down-1618 { background: #f59e0b; }

@media (max-width: 575.98px) {
  .performance-legend {
    gap: 12px;
    font-size: 0.8rem;
    margin-top: 24px;
  }
}

@media (max-width: 575.98px) {
  #performance-chart {
    height: 220px;
  }
}

@media (max-width: 575.98px) {
  #sentiment-btc-chart {
    height: 220px;
  }
}

@media (max-width: 575.98px) {
  #ta-performance-chart {
    height: 220px;
  }
}

@media (max-width: 575.98px) {
  #ta-structure-chart {
    height: 280px;
  }
}

.rec-card {
  border-left: 6px solid #9aa0a6;
}

.rec-buy {
  background: #e9f7ef;
  border-left-color: #198754;
}

.rec-sell {
  background: #fdecec;
  border-left-color: #dc3545;
}

.rec-hold {
  background: #eef2f6;
  border-left-color: #6c757d;
}

.volume-line {
  white-space: nowrap;
  overflow-x: auto;
}

.news-col-published {
  width: 160px;
  white-space: nowrap;
}

.news-col-sentiment {
  padding-left: 12px;
  text-align: center;
}

.table td.news-positive {
  background: rgba(25, 135, 84, 0.08);
}

.table td.news-negative {
  background: rgba(220, 53, 69, 0.08);
}

[data-bs-theme="dark"] .table td.news-positive {
  background: rgba(25, 135, 84, 0.2);
}

[data-bs-theme="dark"] .table td.news-negative {
  background: rgba(220, 53, 69, 0.2);
}

.theme-icon {
  width: 16px;
  display: inline-block;
  vertical-align: -2px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  min-height: 30px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.theme-toggle:hover,
.theme-toggle:focus,
.theme-toggle:active {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.theme-icon svg {
  width: 100%;
  height: 100%;
}

[data-bs-theme="light"] .theme-icon--sun {
  display: none;
}

[data-bs-theme="dark"] .theme-icon--moon {
  display: none;
}

[data-bs-theme="dark"] body {
  background: #0f131a;
}

[data-bs-theme="dark"] .rec-buy {
  background: rgba(25, 135, 84, 0.18);
  border-left-color: #20c997;
}

[data-bs-theme="dark"] .rec-sell {
  background: rgba(220, 53, 69, 0.18);
  border-left-color: #ff6b6b;
}

[data-bs-theme="dark"] .rec-hold {
  background: rgba(108, 117, 125, 0.2);
  border-left-color: #adb5bd;
}
