<table class="table table-bordered header-sticky" width="100%" cellspacing="0">
    <thead>
        <tr>
            <th>Employee Name</th>
            <th>Employee ID</th>
            <th>Gender</th>
            <th>Date of Birth</th>
            <th>Date of Joining</th>
            <th>Department</th>
            <th>Designation</th>
            <th>Days Worked</th>
            <th>Sundays Eligible</th>
            <th>Holidays</th>
            <th>Leave Enjoyed</th>
            <th>Total Paid Days</th>
            <th>Absent</th>
            <th>1st Shifts</th>
            <th>Night Shifts</th>
            <th>OT Hours</th>
            <th>Shortage Hours</th>
            <th>Actions</th>
        </tr>
    </thead>
    <tbody>
        @foreach($attendances as $attendance)
        <tr>
            <td>{{ $attendance->employee_name }}</td>
            <td>{{ $attendance->employee_id }}</td>
            <td>{{ $attendance->gender }}</td>
            <td>{{ $attendance->date_of_birth }}</td>
            <td>{{ $attendance->date_of_joining }}</td>
            <td>{{ $attendance->department }}</td>
            <td>{{ $attendance->designation }}</td>
            <td>{{ $attendance->days_worked }}</td>
            <td>{{ $attendance->sundays_eligible }}</td>
            <td>{{ $attendance->holidays }}</td>
            <td>{{ $attendance->leave_enjoyed }}</td>
            <td>{{ $attendance->total_paid_days }}</td>
            <td>{{ $attendance->absent }}</td>
            <td>{{ $attendance->first_shifts }}</td>
            <td>{{ $attendance->night_shifts }}</td>
            <td>{{ $attendance->ot_hours }}</td>
            <td>{{ $attendance->shortage_hours }}</td>
            <td>
                <button class="emp-action-btn emp-action-edit" data-id="{{ $attendance->id }}">
                    <i class="fas fa-pencil-alt"></i>
                </button>
                <form action="{{ route('superadmin.attendance.delete', $attendance->id) }}" method="POST" style="display:inline;">
                    @csrf @method('DELETE')
                    <button type="submit" class="emp-action-btn emp-action-delete">
                        <i class="fas fa-trash-alt"></i>
                    </button>
                </form>
            </td>
        </tr>
        @endforeach
    </tbody>
</table>

{{ $attendances->links() }}