<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <title>Laporan Prestasi - Super Admin</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: 'Inter', 'Segoe UI', sans-serif;
            font-size: 10px;
            padding: 15px;
            color: #1e293b;
        }
        .header {
            text-align: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #2A5C8A;
        }
        .header h1 {
            font-size: 18px;
            color: #2A5C8A;
            margin-bottom: 3px;
        }
        .header p {
            font-size: 9px;
            color: #64748b;
        }
        .info-laporan {
            margin-bottom: 15px;
            padding: 8px;
            background: #F8FAFC;
            border-radius: 6px;
            font-size: 9px;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
        }
        th {
            background: #2A5C8A;
            color: white;
            padding: 6px 4px;
            font-size: 9px;
            text-align: left;
        }
        td {
            padding: 5px 4px;
            border-bottom: 1px solid #e2e8f0;
            font-size: 8px;
        }
        .statistik {
            margin-bottom: 15px;
            padding: 10px;
            background: #F8FAFC;
            border-radius: 6px;
        }
        .statistik h4 {
            font-size: 11px;
            margin-bottom: 8px;
            color: #2A5C8A;
        }
        .statistik-item {
            display: inline-block;
            width: 23%;
            margin: 5px 1%;
            padding: 8px;
            background: white;
            border-radius: 6px;
            text-align: center;
            border: 1px solid #e2e8f0;
        }
        .footer {
            margin-top: 15px;
            text-align: center;
            font-size: 8px;
            color: #64748b;
            border-top: 1px solid #e2e8f0;
            padding-top: 8px;
        }
        .text-center { text-align: center; }
        .badge-pending { color: #B76E00; }
        .badge-verified { color: #065F46; }
        @media print {
            body { padding: 0; margin: 0; }
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>SIPRES - Sistem Informasi Prestasi Siswa</h1>
        <p>LAPORAN DATA PRESTASI SELURUH SEKOLAH</p>
        <p>Tanggal Cetak: <?php echo e($tanggal_cetak->format('d/m/Y H:i:s')); ?></p>
    </div>
    
    <div class="info-laporan">
        <strong>Periode Laporan:</strong> <?php echo e($filter['tanggal_mulai'] ?? 'Semua'); ?> s/d <?php echo e($filter['tanggal_akhir'] ?? 'Semua'); ?>

        | <strong>Status:</strong> <?php echo e($filter['status'] == 'pending' ? 'Pending' : ($filter['status'] == 'diverifikasi' ? 'Terverifikasi' : 'Semua')); ?>

        | <strong>Total Data:</strong> <?php echo e($prestasi->count()); ?> Prestasi
    </div>
    
    <div class="statistik">
        <h4>📊 STATISTIK PER SEKOLAH</h4>
        <?php $__currentLoopData = $statistik_sekolah; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="statistik-item">
            <strong><?php echo e(Str::limit($stat['nama'], 25)); ?></strong><br>
            Total: <?php echo e($stat['total']); ?><br>
            ✅ Verif: <?php echo e($stat['terverifikasi']); ?><br>
            ⏳ Pending: <?php echo e($stat['pending']); ?>

        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
    
    <table>
        <thead>
            <tr>
                <th>No</th>
                <th>Tgl Input</th>
                <th>Sekolah</th>
                <th>NIS</th>
                <th>Nama Siswa</th>
                <th>Kelas</th>
                <th>Lomba</th>
                <th>Tingkat</th>
                <th>Peringkat</th>
                <th>Status</th>
            </tr>
        </thead>
        <tbody>
            <?php $__currentLoopData = $prestasi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
                <td class="text-center"><?php echo e($index + 1); ?></td>
                <td><?php echo e($p->created_at->format('d/m/Y')); ?></td>
                <td><?php echo e(Str::limit($p->siswa->school->name ?? '-', 20)); ?></td>
                <td><?php echo e($p->siswa->nis ?? '-'); ?></td>
                <td><?php echo e($p->siswa->nama_lengkap ?? '-'); ?></td>
                <td><?php echo e($p->siswa->kelas->nama_kelas ?? '-'); ?></td>
                <td><?php echo e(Str::limit($p->nama_lomba, 25)); ?></td>
                <td><?php echo e(ucfirst($p->tingkat)); ?></td>
                <td><?php echo e($p->peringkat); ?></td>
                <td class="<?php echo e($p->status == 'pending' ? 'badge-pending' : 'badge-verified'); ?>">
                    <?php echo e($p->status == 'pending' ? 'Pending' : 'Terverifikasi'); ?>

                </td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>
    
    <div class="footer">
        <p>Dokumen ini dicetak secara elektronik dari sistem SIPRES - Sistem Informasi Prestasi Siswa</p>
        <p>&copy; <?php echo e(date('Y')); ?> SIPRES - All rights reserved</p>
    </div>
</body>
</html><?php /**PATH C:\laragon\www\prestasi1\resources\views/laporan/pdf-superadmin.blade.php ENDPATH**/ ?>