<!DOCTYPE html>
<html>
<head>
    <title>Laporan Presensi</title>
    <style>
        body { font-family: sans-serif; font-size: 11px; }
        .header { text-align: center; margin-bottom: 20px; }
        .header h2 { margin: 0; padding: 0; }
        .summary { margin-bottom: 20px; }
        .summary table { width: 50%; border-collapse: collapse; }
        .summary th, .summary td { border: 1px solid #ddd; padding: 5px; text-align: center; }
        .data-table { width: 100%; border-collapse: collapse; }
        .data-table th, .data-table td { border: 1px solid #000; padding: 6px; }
        .data-table th { background: #f0f0f0; }
    </style>
</head>
<body>
    <div class="header">
        <h2>Laporan Rekap Presensi</h2>
        <p>Periode: <?php echo e($startDate->translatedFormat('d M Y')); ?> - <?php echo e($endDate->translatedFormat('d M Y')); ?></p>
    </div>

    <div class="summary">
        <table>
            <thead>
                <tr>
                    <th>Total Hadir</th>
                    <th>Total Izin</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><?php echo e($totalHadir); ?></td>
                    <td><?php echo e($totalIzin); ?></td>
                </tr>
            </tbody>
        </table>
    </div>

    <table class="data-table">
        <thead>
            <tr>
                <th>No</th>
                <th>Tanggal</th>
                <th>Nama Tutor</th>
                <th>Nama Siswa</th>
                <th>Jam Masuk</th>
                <th>Jam Keluar</th>
                <th>Lokasi</th>
                <th>Status</th>
            </tr>
        </thead>
        <tbody>
            <?php $__currentLoopData = $presensis; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $idx => $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
                <td style="text-align: center;"><?php echo e($idx + 1); ?></td>
                <td><?php echo e(\Carbon\Carbon::parse($p->tgl_presensi)->format('Y-m-d')); ?></td>
                <td><?php echo e($p->tutor->nama_lengkap ?? 'Tutor'); ?></td>
                <td><?php echo e($p->siswa->nama_siswa ?? '-'); ?></td>
                <td style="text-align: center;"><?php echo e($p->jam_mulai ? \Carbon\Carbon::parse($p->jam_mulai)->format('H:i') : '-'); ?></td>
                <td style="text-align: center;"><?php echo e($p->jam_selesai ? \Carbon\Carbon::parse($p->jam_selesai)->format('H:i') : '-'); ?></td>
                <td><?php echo e($p->lokasi_mulai ?? ($p->lokasi_selesai ?? '-')); ?></td>
                <td style="text-align: center;"><?php echo e($p->calculated_status); ?></td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>
</body>
</html>
<?php /**PATH C:\xampp1\htdocs\presensi-tutor\resources\views/admin/laporan/pdf.blade.php ENDPATH**/ ?>