/* ── Enterprise Workflow Engine — generic reusable components ───
   Task Inbox / Action Bar / Timeline. Entity-agnostic: styled purely from
   existing design tokens (variables.css) and existing badge/button
   components — no new colors, no new type scale. First consumer is
   Documents; any future module (Procurement, Service Desk, HR, ...) reuses
   these same classes unchanged. */

/* ── Task Inbox ─────────────────────────────────────────────── */

.wf-inbox {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.wf-inbox__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.wf-inbox__item:hover {
  border-color: var(--border-strong);
}

.wf-inbox__main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.wf-inbox__ref {
  font-family: var(--font-mono, monospace);
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex-shrink: 0;
}

.wf-inbox__step {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wf-inbox__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.wf-inbox__date {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Action Bar ─────────────────────────────────────────────── */

.wf-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ── Timeline ───────────────────────────────────────────────── */

.wf-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.wf-timeline__item {
  display: flex;
  gap: var(--space-3);
  padding-bottom: var(--space-5);
  position: relative;
}

.wf-timeline__item:last-child {
  padding-bottom: 0;
}

.wf-timeline__item::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--border-default);
}

.wf-timeline__item:last-child::before {
  display: none;
}

.wf-timeline__dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  margin-top: 4px;
  flex-shrink: 0;
}

.wf-timeline__item--rejected .wf-timeline__dot,
.wf-timeline__item--sla_triggered .wf-timeline__dot {
  background: var(--status-danger);
}

.wf-timeline__item--returned .wf-timeline__dot {
  background: var(--status-warning);
}

.wf-timeline__item--approved .wf-timeline__dot,
.wf-timeline__item--auto_approved .wf-timeline__dot {
  background: var(--status-success);
}

.wf-timeline__body {
  min-width: 0;
}

.wf-timeline__label {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

.wf-timeline__note {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 2px;
}

.wf-timeline__date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}
