@php
    $steps = $progress['steps'] ?? [];
    $currentIndex = $progress['current_index'] ?? 0;
    $percent = $progress['percent'] ?? 0;
@endphp
<div class="card mb-4">
    <div class="card-body">
        <div class="d-flex justify-content-between align-items-center mb-2">
            <h5 class="mb-0">Onboarding İlerlemesi</h5>
            <span class="badge badge-primary">%{{ $percent }}</span>
        </div>
        <div class="progress mb-3" style="height:8px"><div class="progress-bar" style="width: {{ $percent }}%"></div></div>
        <div class="row g-2">
            @foreach($steps as $key => $label)
                @php $i = $loop->index; @endphp
                <div class="col">
                    <div class="p-2 rounded border {{ $i < $currentIndex ? 'bg-success text-white' : ($i === $currentIndex ? 'bg-primary text-white' : 'bg-light') }}">
                        <small class="d-block opacity-75">{{ $loop->iteration }}. Adım</small>
                        <strong style="font-size:12px">{{ $label }}</strong>
                    </div>
                </div>
            @endforeach
        </div>
    </div>
</div>
