@if(in_array($step->id, $completedIds))
Completed
@elseif(! $eligibility['can_log_steps'])
@else
{{-- Using both BS4 and BS5 data attributes for safety --}}
@endif
@endforeach
{{-- MODALS LOOP: Keep this at the bottom, just before @endsection --}}
@foreach($eligibility['can_log_steps'] ? $program->steps : collect() as $step)