/* ── Dashboard Page Styles ── */

/* ── Stats Row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}
.stat-card.purple::before { background: linear-gradient(90deg, var(--accent), transparent); }
.stat-card.pink::before { background: linear-gradient(90deg, var(--accent2), transparent); }
.stat-card.green::before { background: linear-gradient(90deg, var(--green), transparent); }
.stat-card.blue::before { background: linear-gradient(90deg, var(--blue), transparent); }
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}
.stat-value.purple { color: var(--accent); }
.stat-value.pink { color: var(--accent2); }
.stat-value.green { color: var(--green); }
.stat-value.blue { color: var(--blue); }
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 6px; }
.stat-icon {
  position: absolute;
  right: 18px;
  top: 18px;
  font-size: 28px;
  opacity: 0.15;
}

/* ── Grid 2 cols ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  margin-bottom: 20px;
}

/* ── Job List ── */
.job-list { display: flex; flex-direction: column; gap: 10px; }
.job-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
}
.job-item:hover { border-color: var(--border2); background: var(--surface3); }
.job-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-running { background: var(--blue); box-shadow: 0 0 8px var(--blue); animation: pulse 1.5s infinite; }
.status-done { background: var(--green); }
.status-error { background: var(--red); }
.status-pending { background: var(--yellow); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.job-info { flex: 1; min-width: 0; }
.job-topic {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.job-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.job-pipeline {
  font-size: 11px;
  color: var(--muted2);
  background: var(--surface3);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 6px;
}
.job-time { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

/* ── Progress Bar ── */
.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-fill { height: 100%; border-radius: 99px; background: var(--blue); }
.progress-fill.done { background: var(--green); }

/* ── Pipeline Status Card ── */
.pipeline-grid { display: flex; flex-direction: column; gap: 10px; }
.pipeline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.pipeline-icon { font-size: 20px; }
.pipeline-name { font-size: 13px; font-weight: 600; flex: 1; }
.pipeline-count { font-size: 11px; color: var(--muted); }
.pipeline-status {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 99px;
  font-family: var(--font-mono);
}
.s-active { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,229,160,0.3); }
.s-idle { background: var(--surface3); color: var(--muted); border: 1px solid var(--border); }
.s-busy { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(77,166,255,0.3); }

/* ── Quick Actions ── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.qa-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.qa-card:hover { border-color: var(--accent); background: var(--surface2); transform: translateY(-2px); }
.qa-icon { font-size: 28px; }
.qa-title { font-size: 13.5px; font-weight: 700; }
.qa-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.qa-arrow { margin-top: auto; font-size: 16px; color: var(--muted2); }

/* ── Activity Feed ── */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.activity-text { font-size: 12.5px; line-height: 1.5; }
.activity-time { font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; }
