interface StepProgressProps { current: number; total: number; } function StepProgress({ current, total }: StepProgressProps) { const safeTotal = Math.max(total, 1); const clampedCurrent = Math.min(Math.max(current, 0), safeTotal - 1); const percentage = ((clampedCurrent + 1) / safeTotal) * 100; return (