
/* === Approval Workflow page === */
.wf-example-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; margin-bottom: 22px;
  background: linear-gradient(90deg, var(--accent-soft), var(--surface));
  border: 1px solid var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
}
.wf-eb-title { font-size: 13px; color: var(--text); }
.wf-eb-sub { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

.wf-flow {
  position: relative;
  padding: 28px 18px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 22px;
}
.wf-track {
  position: absolute;
  left: calc(10% + 22px); right: calc(10% + 22px);
  top: 86px; height: 2px;
  background: var(--line);
  border-radius: 1px;
  overflow: hidden;
}
.wf-track-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), oklch(0.62 0.12 145));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.wf-stages {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: relative;
  gap: 8px;
}
.wf-stage {
  display: flex; flex-direction: column; align-items: center;
  background: transparent; border: none; cursor: pointer;
  padding: 6px 4px; border-radius: 8px;
  transition: background 0.15s;
}
.wf-stage:hover { background: var(--surface-2); }
.wf-stage-num {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px;
}
.wf-stage-circle {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
  display: grid; place-items: center;
  color: var(--text-mute);
  margin-bottom: 12px;
  transition: all 0.3s;
  z-index: 1;
}
.wf-stage[data-state="done"] .wf-stage-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
.wf-stage[data-state="active"] .wf-stage-circle {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
  box-shadow: 0 0 0 6px rgba(15, 27, 45, 0.08);
}
.wf-stage-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  opacity: 0;
  animation: wfPulse 1.6s ease-out infinite;
}
@keyframes wfPulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.4); opacity: 0; }
}
.wf-stage-label {
  font-size: 13px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.01em; text-align: center;
  margin-bottom: 3px;
}
.wf-stage[data-state="pending"] .wf-stage-label { color: var(--text-mute); }
.wf-stage-actor { font-size: 12px; color: var(--text); font-weight: 500; }
.wf-stage[data-state="pending"] .wf-stage-actor { color: var(--text-mute); }
.wf-stage-role { font-size: 11px; color: var(--text-dim); margin-top: 1px; }

.wf-detail-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
}
.wf-detail-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center;
}
.wf-detail-submitted { background: var(--blue-soft); color: var(--blue); }
.wf-detail-procurement { background: var(--accent-soft); color: var(--accent-ink); }
.wf-detail-compliance { background: oklch(0.94 0.04 290); color: oklch(0.42 0.14 290); }
.wf-detail-ceo { background: var(--ink); color: var(--accent); }
.wf-detail-approved { background: var(--green-soft); color: oklch(0.42 0.10 145); }

.wf-detail-pre {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-mute); margin-bottom: 2px;
}
.wf-blurb {
  font-size: 14px; line-height: 1.6; color: var(--text);
  margin: 0 0 18px; text-wrap: pretty;
}
.wf-meta-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; padding: 14px 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 18px;
}
.wf-meta-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-mute); margin-bottom: 4px;
}
.wf-meta-val { font-size: 13px; font-weight: 600; color: var(--ink); }
.wf-meta-sub { font-size: 11px; color: var(--text-mute); margin-top: 1px; }

.wf-section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-mute);
  margin: 4px 0 10px;
}
.wf-list {
  list-style: none; padding: 0; margin: 0 0 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.wf-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: var(--text);
}
.wf-list-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  margin-top: 7px; flex-shrink: 0;
}
.wf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  font-size: 11px; color: var(--text); font-weight: 500;
}

.wf-timeline { padding: 4px 0; }
.wf-tl-item {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 10px; padding: 10px 18px;
  opacity: 0.45; transition: opacity 0.3s;
}
.wf-tl-item[data-reached="true"] { opacity: 1; }
.wf-tl-rail {
  display: flex; flex-direction: column; align-items: center;
}
.wf-tl-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--surface);
  display: grid; place-items: center;
  color: var(--ink);
  position: relative;
  flex-shrink: 0;
}
.wf-tl-item[data-reached="true"] .wf-tl-dot {
  background: var(--accent); color: var(--ink);
}
.wf-tl-item[data-pending="true"][data-reached="true"] .wf-tl-dot {
  background: var(--ink);
}
.wf-tl-dot-pulse {
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  animation: wfPulse 1.6s ease-out infinite;
}
.wf-tl-line {
  flex: 1; width: 1px;
  background: var(--line);
  margin-top: 2px; min-height: 18px;
}
.wf-tl-item[data-reached="true"] .wf-tl-line { background: var(--accent); }
.wf-tl-content { padding-bottom: 4px; }
.wf-tl-head {
  display: flex; justify-content: space-between; gap: 8px;
  margin-bottom: 2px;
}
.wf-tl-actor { font-size: 12px; font-weight: 600; color: var(--ink); }
.wf-tl-when { font-size: 10px; color: var(--text-mute); font-family: var(--font-mono); }
.wf-tl-note { font-size: 12px; color: var(--text); line-height: 1.5; margin-bottom: 4px; }
.wf-tl-stage {
  display: inline-block;
  font-size: 9px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-mute);
  padding: 2px 6px; border-radius: 3px;
  background: var(--surface-3);
}

.wf-decisions {
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.wf-decision {
  padding: 16px 18px;
  border-right: 1px solid var(--line-2);
}
.wf-decision:last-child { border-right: none; }
.wf-decision-gate {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--ink);
  padding: 5px 9px; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  margin-bottom: 14px;
}
.wf-decision-branches { display: flex; flex-direction: column; gap: 10px; }
.wf-branch {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12px; line-height: 1.5; color: var(--text);
}
.wf-branch-arrow {
  font-size: 14px; line-height: 1.4; flex-shrink: 0;
  width: 18px; text-align: center;
}
.wf-branch-pass .wf-branch-arrow { color: oklch(0.55 0.12 145); }
.wf-branch-back .wf-branch-arrow { color: var(--accent-ink); }
.wf-branch-reject .wf-branch-arrow { color: var(--red); }
.wf-branch-tag {
  display: inline-block;
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 6px; border-radius: 3px;
  margin-right: 6px;
}
.wf-branch-pass .wf-branch-tag { background: var(--green-soft); color: oklch(0.42 0.10 145); }
.wf-branch-back .wf-branch-tag { background: var(--accent-soft); color: var(--accent-ink); }
.wf-branch-reject .wf-branch-tag { background: var(--red-soft); color: var(--red); }

@media (max-width: 1100px) {
  .wf-detail-grid { grid-template-columns: 1fr; }
  .wf-decisions { grid-template-columns: 1fr; }
  .wf-decision { border-right: none; border-bottom: 1px solid var(--line-2); }
  .wf-decision:last-child { border-bottom: none; }
}
