/* ═══════════════════════════════════════════════════
   Campaign Intelligence Styles
   ═══════════════════════════════════════════════════ */

/* Tabs */
.intel-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.intel-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}
.intel-tab:hover { background: var(--color-bg-elevated); color: var(--color-text); }
.intel-tab.active {
  background: var(--color-bg-elevated);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--color-danger);
  color: white;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

/* Alert Summary */
.intel-alert-summary { display: flex; gap: 8px; align-items: center; }
.intel-alert-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}
.intel-alert-badge.sev-critical { background: var(--color-danger-light); color: var(--color-danger); }
.intel-alert-badge.sev-warning  { background: var(--color-warning-light); color: var(--color-warning); }
.intel-alert-badge.sev-info     { background: var(--color-primary-light); color: var(--color-primary); }

/* Section Header */
.intel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.intel-section-header h3 { font-size: 16px; font-weight: 600; }

/* ─── Health Cards ─── */
.health-grid { display: flex; flex-direction: column; gap: 16px; }
.health-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.health-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-text-muted); }
.health-card.health-red { border-left: 4px solid var(--color-danger); }
.health-card.health-yellow { border-left: 4px solid var(--color-warning); }
.health-card.health-green { border-left: 4px solid var(--color-success); }

.health-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.health-card-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.health-dot { font-size: 14px; }
.health-status-label {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
}
.health-status-label.health-green  { background: var(--color-success-light); color: var(--color-success); }
.health-status-label.health-yellow { background: var(--color-warning-light); color: var(--color-warning); }
.health-status-label.health-red    { background: var(--color-danger-light);  color: var(--color-danger);  }

.health-card-meta {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.health-channels { display: flex; flex-direction: column; gap: 6px; }
.health-channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
}
.health-channel-info { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.health-channel-dot { font-size: 10px; }
.health-channel-name { font-weight: 500; }
.health-channel-stats { display: flex; gap: 16px; color: var(--color-text-secondary); }
.health-channel-alerts { display: flex; gap: 4px; }
.alert-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 700;
}
.alert-count.sev-critical { background: var(--color-danger-light); color: var(--color-danger); }
.alert-count.sev-warning  { background: var(--color-warning-light); color: var(--color-warning); }

/* ─── Recommendations ─── */
.rec-filters { display: flex; gap: 6px; }
.rec-list { display: flex; flex-direction: column; gap: 12px; }
.rec-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  transition: all var(--transition-fast);
}
.rec-card.sev-critical { border-left: 4px solid var(--color-danger); }
.rec-card.sev-warning  { border-left: 4px solid var(--color-warning); }
.rec-card.sev-info     { border-left: 4px solid var(--color-primary); }

.rec-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
}
.rec-severity {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
}
.rec-severity.sev-critical { background: var(--color-danger-light); color: var(--color-danger); }
.rec-severity.sev-warning  { background: var(--color-warning-light); color: var(--color-warning); }
.rec-severity.sev-info     { background: var(--color-primary-light); color: var(--color-primary); }

.rec-category {
  color: var(--color-text-muted);
  text-transform: capitalize;
}
.rec-channel { color: var(--color-text-secondary); font-weight: 500; }
.rec-time { color: var(--color-text-muted); margin-left: auto; }

.rec-card-body { margin-bottom: 12px; }
.rec-initiative { font-size: 13px; font-weight: 600; color: var(--color-text-secondary); margin-bottom: 4px; }
.rec-message { font-size: 14px; color: var(--color-text); line-height: 1.5; }
.rec-metric {
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}
.rec-metric strong { color: var(--color-text-secondary); }

.rec-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

/* ─── Budget Pacing ─── */
.pacing-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.pacing-select-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}
.pacing-select-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-primary); }
.pacing-select-name { font-size: 15px; font-weight: 600; color: var(--color-text); }
.pacing-select-meta { font-size: 13px; color: var(--color-text-muted); }

.pacing-bar-container {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 20px;
}
.pacing-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
}
.pacing-bar {
  position: relative;
  height: 24px;
  background: var(--color-bg-subtle);
  border-radius: 12px;
  overflow: hidden;
}
.pacing-bar-expected {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--color-bg-muted);
  border-radius: 12px;
  z-index: 1;
}
.pacing-bar-actual {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 12px;
  z-index: 2;
  transition: width 0.5s ease;
}
.pacing-bar-actual.on-track    { background: var(--color-success); opacity: 0.8; }
.pacing-bar-actual.overpacing  { background: var(--color-danger);  opacity: 0.8; }
.pacing-bar-actual.underpacing { background: var(--color-warning); opacity: 0.8; }

.pacing-bar-legend {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  margin-right: 6px;
  vertical-align: middle;
}
.legend-dot.expected { background: var(--color-bg-muted); }
.legend-dot.actual   { background: var(--color-success); }

/* Color helpers */
.text-red    { color: var(--color-danger) !important; }
.text-orange { color: var(--color-warning) !important; }
.text-green  { color: var(--color-success) !important; }
.text-blue   { color: var(--color-primary) !important; }

/* Responsive */
@media (max-width: 900px) {
  .health-channel-stats { display: none; }
  .rec-card-header { flex-wrap: wrap; }
  .pacing-select-grid { grid-template-columns: 1fr; }
}
