/* ── Toolbar ── */
.dash-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dash-toolbar .eyebrow { margin-bottom: 0; }

/* ── Grid ── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.dash-card { overflow: hidden; transition: border-color 0.3s var(--ease-out); }
.dash-card:hover { border-color: var(--card-accent, var(--accent)); }
.dash-card-wide { grid-column: 1 / -1; }

.dash-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bg-glass-border);
  font-size: 0.8125rem;
}

.dash-card-title { color: var(--text-secondary); flex: 1; }
.dash-card-badge {
  font-size: 0.6875rem;
  padding: 0.2rem 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--bg-glass-border);
  border-radius: 50px;
  color: var(--text-tertiary);
}

.dash-card-body { padding: 1.5rem; min-height: 180px; }
.dash-skeleton { display: flex; flex-direction: column; gap: 0.25rem; }

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0.02) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Trend Items ── */
.trend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.8125rem;
}

.trend-item:last-child { border-bottom: none; }
.trend-name { color: var(--text-primary); }

.trend-value {
  font-size: 0.75rem;
  font-weight: 600;
}

.trend-up { color: var(--accent); }
.trend-down { color: var(--accent-red); }

/* ── Prediction Items ── */
.prediction-item { padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.prediction-item:last-child { border-bottom: none; }

.prediction-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
}

.prediction-label { color: var(--text-primary); }

.prediction-pct {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-purple);
}

.prediction-bar {
  height: 3px;
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
  overflow: hidden;
}

.prediction-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  border-radius: 2px;
  transition: width 1s var(--ease-out);
}

/* ── Campaign Items ── */
.campaign-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.8125rem;
}

.campaign-item:last-child { border-bottom: none; }
.campaign-name { color: var(--text-primary); }

.campaign-status-badge {
  font-size: 0.6875rem;
  padding: 0.2rem 0.75rem;
  border-radius: 50px;
}

.status-active { background: rgba(0,255,157,0.08); color: var(--accent); }
.status-paused { background: rgba(255,107,53,0.08); color: var(--accent-orange); }
.status-completed { background: rgba(124,58,237,0.08); color: var(--accent-purple); }

/* ── Evolution Items ── */
.evolution-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.8125rem;
}

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

.evolution-time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  min-width: 70px;
  flex-shrink: 0;
}

.evolution-text { color: var(--text-secondary); line-height: 1.5; }
.evolution-text .hl { color: var(--card-accent, var(--accent)); }

/* ── Campaign Console ── */
.campaign-container { overflow: hidden; }

.campaign-container-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bg-glass-border);
}

.campaign-console-title { font-size: 0.8125rem; color: var(--text-secondary); }
.campaign-console-status { font-size: 0.75rem; color: var(--accent); }

.campaign-console {
  background: rgba(0,0,0,0.3);
  padding: 1.5rem;
  min-height: 200px;
  max-height: 280px;
  overflow-y: auto;
  font-size: 0.8125rem;
  line-height: 1.8;
}

.console-line { padding: 2px 0; }
.console-dim { color: var(--text-tertiary); }
.console-active { color: var(--accent-cyan); }
.console-done { color: var(--accent); }
.console-waiting { color: var(--text-tertiary); opacity: 0.6; }

.campaign-container-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--bg-glass-border);
}

.campaign-container-footer .btn { width: 100%; justify-content: center; }

/* ── Pipeline Section ── */
.pipeline-section { padding-top: 0; }
.pipeline-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.pipeline-task-item { padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.pipeline-task-item:last-child { border-bottom: none; }

.pipeline-task-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; font-size: 0.8125rem; }
.pipeline-task-type { color: var(--text-primary); }
.pipeline-task-status { font-size: 0.75rem; font-weight: 500; }

.pipeline-task-bar { height: 3px; background: rgba(255,255,255,0.04); border-radius: 2px; overflow: hidden; margin-bottom: 0.4rem; }
.pipeline-task-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }

.pipeline-task-meta { display: flex; justify-content: space-between; font-size: 0.6875rem; color: var(--text-tertiary); }

.pipeline-actions { display: flex; gap: 0.5rem; padding: 1rem 1.5rem; flex-wrap: wrap; border-bottom: 1px solid var(--bg-glass-border); }
.pipeline-actions .btn { flex: 1; min-width: 100px; justify-content: center; font-size: 0.75rem; }

.pipeline-console-log { max-height: 200px; }

@media (max-width: 1024px) {
  .pipeline-layout { grid-template-columns: 1fr; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .dash-toolbar { flex-direction: column; align-items: stretch; }
  .dash-toolbar-right { text-align: center; }
}
