@forelse($salary_by_dept as $dept)
{{ ($dept->department->name ?? "قسم " . $dept->department_id) ?? 'غير محدد' }} ({{ $dept->count }} موظف)
{{ number_format($dept->total) }} ر.س
@php $pct = $total_salary > 0 ? ($dept->total / $total_salary) * 100 : 0; @endphp
@empty
@endforelse