/* v4.1 enhancement styles — Intraday, History, News cards */

.card {
  background: var(--card-bg, #1a1a2e);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border, #2a2a4a);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text1, #fff);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border, #2a2a4a);
}

/* Intraday card */
.intraday-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

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

.intraday-item {
  text-align: center;
  padding: 8px 4px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
}

.intraday-label {
  font-size: 11px;
  color: var(--text3, #888);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.intraday-val {
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

.intraday-sub {
  font-size: 10px;
  color: var(--text3, #888);
  margin-top: 2px;
}

.gap-up { color: #4CAF50; }
.gap-down { color: #f44336; }
.gap-flat { color: #888; }
.trend-bull { color: #4CAF50; }
.trend-bear { color: #f44336; }
.trend-neutral { color: #888; }
.oi-build { color: #4CAF50; }
.oi-unwind { color: #f44336; }
.oi-stable { color: #888; }
.above-vwap { color: #4CAF50; }
.below-vwap { color: #f44336; }

/* History card */
.history-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #1e1e3a 100%);
}

.hv-overpriced { color: #f44336; }
.hv-underpriced { color: #4CAF50; }

/* News card */
.news-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #1a2e1a 100%);
}

.news-sentiment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.news-score {
  flex: 1;
}

.news-label {
  font-size: 12px;
  color: var(--text3, #888);
}

.news-value {
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}

.news-bull .news-value { color: #4CAF50; }
.news-bear .news-value { color: #f44336; }
.news-neutral .news-value { color: #888; }

.news-bar-bg {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.news-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.news-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.news-count {
  font-size: 11px;
  color: var(--text3, #888);
}

.news-conf {
  font-size: 11px;
  color: var(--text3, #888);
}

.news-dim {
  opacity: 0.6;
}

.news-catalyst {
  font-size: 12px;
  color: var(--text2, #ccc);
  padding: 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.market-regime {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
}

.regime-riskon {
  background: rgba(76, 175, 80, 0.15);
  color: #4CAF50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.regime-riskoff {
  background: rgba(244, 67, 54, 0.15);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.regime-neutral {
  background: rgba(136, 136, 136, 0.15);
  color: #888;
  border: 1px solid rgba(136, 136, 136, 0.3);
}

.regime-label {
  font-weight: 600;
}

.regime-score {
  font-size: 12px;
  opacity: 0.8;
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.sector-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.sec-bull {
  background: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
}

.sec-bear {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

.sec-neutral {
  background: rgba(136, 136, 136, 0.05);
  color: #888;
}

.sec-name {
  text-transform: capitalize;
}

.sec-val {
  font-weight: 600;
}

.key-events {
  margin-top: 8px;
}

.ke-title {
  font-size: 11px;
  color: var(--text3, #888);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.ke-item {
  font-size: 12px;
  color: var(--text2, #ccc);
  padding: 4px 0;
  line-height: 1.4;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

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

/* Row/label/val styles (should match existing) */
.intraday-card .row,
.history-card .row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}

.intraday-card .lbl,
.history-card .lbl {
  color: var(--text3, #888);
}

.intraday-card .val,
.history-card .val {
  color: var(--text1, #fff);
  font-weight: 500;
}

.sr-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .intraday-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
  .intraday-val {
    font-size: 12px;
  }
  .sector-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}