/* ── Progress ─────────────────────────────────────────────────── */
.progress-bar-wrap {
  background: var(--surface2);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  margin-bottom: .75rem;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-h));
  width: 0%;
  transition: width .4s ease;
  border-radius: 999px;
}
.progress-bar.indeterminate {
  width: 40%;
  animation: slide 1.4s infinite ease-in-out;
}
@keyframes slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

.progress-status-row {
  display: flex; align-items: baseline; gap: .6rem;
}
#progressStatus { font-weight: 600; }
.progress-timer {
  font-size: .82rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.muted { font-size: .83rem; color: var(--muted); margin-top: .25rem; }

/* ── Pipeline stepper ─────────────────────────────────────────── */
.pipeline-stepper {
  display: flex;
  gap: 0;
  margin-top: 1rem;
  padding: 0;
  position: relative;
}

.pipeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  position: relative;
  z-index: 1;
}

/* Connector line between steps */
.pipeline-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(50% + 14px);
  right: calc(-50% + 14px);
  height: 2px;
  background: var(--border);
  z-index: -1;
  transition: background .3s;
}
.pipeline-step.completed:not(:last-child)::after {
  background: var(--accent);
}

.step-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all .3s;
  flex-shrink: 0;
}
.step-dot svg { width: 12px; height: 12px; color: var(--muted); }

.pipeline-step.completed .step-dot {
  background: var(--accent);
  border-color: var(--accent);
}
.pipeline-step.completed .step-dot svg { color: #fff; }

.pipeline-step.active .step-dot {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(58,158,110,.2);
  animation: stepPulse 1.5s ease-in-out infinite;
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(58,158,110,.2); }
  50%      { box-shadow: 0 0 0 8px rgba(58,158,110,.08); }
}

.step-label {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
  max-width: 80px;
  transition: color .3s;
}
.pipeline-step.active .step-label { color: var(--text); font-weight: 600; }
.pipeline-step.completed .step-label { color: var(--text-sec); }
.pipeline-step.step-hidden { display: none; }

#progressDetail {
  max-height: 7rem;
  overflow-y: auto;
  margin-top: .5rem;
}
.log-line {
  font-size: 12px; color: var(--muted);
  padding: .1rem 0;
  border-bottom: 1px solid transparent;
}
.log-line:last-child { color: var(--text-sec); }

/* ── Cancel button ───────────────────────────────────────────── */
.progress-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}
.btn-cancel {
  display: flex; align-items: center; gap: .4rem;
  padding: .4rem .9rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .82rem;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.btn-cancel svg { width: 14px; height: 14px; }
.btn-cancel:hover {
  color: var(--error);
  border-color: var(--error);
  background: rgba(224,80,80,.06);
}
.btn-cancel:disabled { opacity: .35; cursor: not-allowed; }

/* ── Error display ───────────────────────────────────────────── */
.error-banner {
  background: rgba(224,80,80,.08);
  border: 1px solid rgba(224,80,80,.25);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  margin-top: .75rem;
  display: flex;
  align-items: flex-start;
  gap: .65rem;
}
.error-banner-icon {
  width: 20px; height: 20px;
  color: var(--error);
  flex-shrink: 0;
  margin-top: .05rem;
}
.error-banner-content { flex: 1; }
.error-banner-title {
  font-weight: 600; color: var(--error);
  font-size: .88rem;
  margin-bottom: .2rem;
}
.error-banner-msg {
  font-size: .82rem; color: var(--text-sec);
  word-break: break-word;
}
.error-banner .btn-retry {
  margin-top: .5rem;
  background: rgba(224,80,80,.12);
  border: 1px solid rgba(224,80,80,.3);
  color: var(--error);
  border-radius: 6px;
  padding: .35rem .8rem;
  font-size: 12px;
  cursor: pointer;
  transition: background .2s;
}
.error-banner .btn-retry:hover {
  background: rgba(224,80,80,.2);
}
