<style>
    table {
        border-collapse: collapse;
        width: 100%;
        font-family: Arial, sans-serif;
        margin-top: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    th, td {
        padding: 12px 16px;
        border: 1px solid #ddd;
        text-align: center;
    }

    th {
        background-color: #4CAF50;
        color: white;
        font-weight: bold;
    }

    tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    tr:hover {
        background-color: #f1f1f1;
    }

    .total-row td {
        font-weight: bold;
        background-color: #e0f7e9;
        color: #2e7d32;
    }
</style>
        <tr class="total-row">
            <td colspan="4" style="text-align: right;">Name:</td>
            <td>{{ $name }}</td>
        </tr>
        <br>
        <tr class="total-row">
            <td colspan="4" style="text-align: right;">Department:</td>
            <td>{{ $dept }}</td>
        </tr>
        <br>
        <tr class="total-row">
            <td colspan="4" style="text-align: right;">Month:</td>
            <td>{{ $month }}</td>
        </tr>

<table>
    <thead>
        <tr>
            <th>Date</th>
            <th>In Time</th>
            <th>Out Time</th>
            <th>Worked Hours</th>
            <th>Extra Hours</th>
        </tr>
    </thead>
    <tbody>
        @foreach($results as $row)
        <tr>
            <td>{{ $row['date'] }}</td>
            <td>{{ $row['in_time'] }}</td>   {{-- e.g., 09:15 AM --}}
            <td>{{ $row['out_time'] }}</td> {{-- e.g., 06:30 PM --}}
            <td>{{ $row['worked_hours'] }}</td>
            <td>{{ $row['extra_hours'] }}</td>
        </tr>
        @endforeach
        <tr class="total-row">
            <td colspan="4" style="text-align: right;">Total Extra Hours:</td>
            <td>{{ $totalExtraHours }}</td>
        </tr>
    </tbody>
</table>
