.workflow-bar {
  display: grid;
  grid-template-columns: repeat(var(--workflow-step-count), minmax(104px, 1fr));
  gap: 18px;
  width: 100%;
  max-width: var(--layout-wide-max);
  margin: 0 auto;
  padding: 5px var(--layout-gutter) 8px;
  overflow-x: auto;
}

.workflow-step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  min-width: 104px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: #ffffff;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}

.workflow-step::after {
  position: absolute;
  top: 50%;
  right: -18px;
  z-index: 2;
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(7, 92, 168, 0.08), rgba(7, 92, 168, 0.36), rgba(7, 92, 168, 0.18));
  transform: translateY(-50%);
  pointer-events: none;
  content: "";
}

.workflow-step::before {
  position: absolute;
  top: 50%;
  right: -18px;
  z-index: 3;
  width: 18px;
  height: 7px;
  background: linear-gradient(90deg, rgba(7, 92, 168, 0.12), rgba(7, 92, 168, 0.46));
  clip-path: polygon(0 43%, 72% 43%, 72% 14%, 100% 50%, 72% 86%, 72% 57%, 0 57%);
  transform: translateY(-50%);
  pointer-events: none;
  content: "";
}

.workflow-step:last-child::before,
.workflow-step:last-child::after {
  display: none;
}

.step-icon {
  color: var(--color-primary);
}

.step-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.step-title,
.step-state {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-title {
  font-size: 12px;
  font-weight: 700;
}

.step-state {
  color: var(--color-muted);
  font-size: 11px;
}

.workflow-step.is-active,
.workflow-step.is-available {
  border-color: rgba(7, 92, 168, 0.28);
  background: var(--color-primary-soft);
}

.workflow-step.is-completed {
  border-color: rgba(21, 128, 61, 0.24);
  background: #ecfdf3;
}

.workflow-step.is-completed .step-icon,
.workflow-step.is-completed .step-state {
  color: #15803d;
}

.workflow-step.is-locked {
  opacity: 0.68;
  cursor: default;
}
