/* Data import: the step indicator ({% import_steps %}), the pipeline summary and the finance funnel. */

.import-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  list-style: none;
}

.import-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-right: 1px solid var(--border);
  color: var(--text-faint);
}

.import-step:last-child {
  border-right: 0;
}

.import-step i {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-sunken);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--weight-bold);
}

.import-step b {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.import-step.done {
  color: var(--text-tertiary);
}

.import-step.active {
  background: var(--accent-soft);
  color: var(--text-accent);
}

.import-step.active i,
.import-step.done i {
  background: var(--accent);
  color: var(--text-inverse);
}

.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.pipeline li {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-page);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  counter-increment: step;
}

.pipeline li::before {
  content: counter(step) " ";
  color: var(--text-accent);
}

.preview-row {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.preview-row pre {
  margin: var(--space-2) 0 0;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  white-space: pre-wrap;
}

/* Financial Intelligence funnel: invoiced, allocated, questioned, opportunity. */

.funnel {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
}

.funnel > div {
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-subtle);
  text-align: center;
}

.funnel b {
  display: block;
  color: var(--text);
  font-size: var(--text-2xl);
  font-variant-numeric: tabular-nums;
}

.funnel span {
  display: block;
  margin-top: var(--space-1-5);
  color: var(--text-muted);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.funnel > i {
  color: var(--text-faint);
  font-size: var(--text-xl);
  font-style: normal;
}

.funnel > .funnel-warn {
  border-color: var(--warning-border);
  background: var(--surface);
}

.funnel-warn b {
  color: var(--text-warning);
}

.funnel > .funnel-save {
  border-color: var(--success-border);
  background: var(--success-soft);
}

.funnel-save b {
  color: var(--text-success);
}

@media (max-width: 820px) {
  .import-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .funnel {
    grid-template-columns: 1fr;
  }

  .funnel > i {
    text-align: center;
    transform: rotate(90deg);
  }
}
