.progress-panel {
  display: grid;
  gap: 8px;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 30, 51, 0.09);
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #184a91 0%, #ef1c2f 55%, #f36b3d 100%);
  transition: width 0.35s ease;
}

.mono {
  font-family: "IBM Plex Mono", "Menlo", monospace;
  font-size: 12px;
}

.current-step {
  display: grid;
  gap: 14px;
}

.step-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.step-id {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 8px;
}

.role-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #184a91 0%, #285fba 100%);
  padding: 6px 9px;
  white-space: nowrap;
}

.step-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.section-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.checklist,
.output-list,
.option-list {
  display: grid;
  gap: 8px;
}

.checkline {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
}

.checkline input {
  margin-top: 2px;
}

.output-list {
  margin: 0;
  padding-left: 18px;
}

.output-list li {
  font-size: 14px;
}

.decision-option {
  display: grid;
  gap: 3px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.14s ease;
}

.decision-option:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 74, 145, 0.4);
}

.decision-option.selected {
  border-color: rgba(239, 28, 47, 0.64);
  box-shadow: 0 0 0 3px rgba(239, 28, 47, 0.15);
}

.decision-option strong {
  font-size: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.block-warning {
  font-size: 13px;
  line-height: 1.55;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(175, 32, 48, 0.3);
  border-radius: 10px;
  padding: 10px;
}

.timeline {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.timeline-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.timeline-item.current {
  border-color: rgba(24, 74, 145, 0.46);
  background: var(--accent-soft);
}

.timeline-item.done {
  border-color: rgba(27, 127, 79, 0.44);
  background: var(--ok-soft);
}

.timeline-item.optional {
  border-style: dashed;
}

.timeline-item.role-muted {
  opacity: 0.56;
}

.timeline-label {
  display: grid;
  gap: 3px;
}

.timeline-title {
  font-weight: 700;
}

.timeline-meta {
  font-size: 12px;
  color: var(--muted);
}

.state-pill {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 30, 51, 0.12);
  color: #203249;
  white-space: nowrap;
}

.state-pill.current {
  background: var(--accent-soft);
  color: var(--accent);
}

.state-pill.done {
  background: var(--ok-soft);
  color: var(--ok);
}

.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.history-list li {
  border-left: 2px solid rgba(24, 74, 145, 0.4);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 0 10px 10px 0;
  padding: 7px 10px;
  font-size: 13px;
}

.history-time {
  margin-top: 3px;
  font-family: "IBM Plex Mono", "Menlo", monospace;
  font-size: 11px;
  color: var(--muted);
}

.success-card {
  border: 1px solid rgba(27, 127, 79, 0.4);
  border-radius: 12px;
  background: var(--ok-soft);
  padding: 12px;
}

.success-card h4 {
  margin-bottom: 6px;
}

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

  .topbar {
    flex-direction: column;
  }

  .header-chips {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body {
    padding: 14px;
  }

  .panel {
    padding: 16px;
  }

  .topbar {
    padding: 14px;
  }

  .brand-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .itec-logo {
    width: 210px;
    max-width: 100%;
  }

  h1 {
    font-size: 1.48rem;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions > * {
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}
