<?php $__env->startSection('title', 'Attendance'); ?>
<?php $__env->startSection('page-title', 'Attendance'); ?>
<?php $__env->startSection('sidebar-nav'); ?>
<div class="nav-item"><a href="<?php echo e(route('admin.dashboard')); ?>"><i class="bi bi-grid"></i> Dashboard</a></div>
<div class="nav-item"><a href="<?php echo e(route('admin.students.index')); ?>"><i class="bi bi-people"></i> Students</a></div>
<div class="nav-item"><a href="<?php echo e(route('admin.exams.index')); ?>"><i class="bi bi-journal-text"></i> Exams</a></div>
<div class="nav-item"><a href="<?php echo e(route('admin.attendance.index')); ?>"><i class="bi bi-calendar-check"></i> Attendance</a></div>
<div class="nav-item"><a href="<?php echo e(route('admin.fees.invoices')); ?>"><i class="bi bi-receipt"></i> Fees</a></div>
<div class="nav-item"><a href="<?php echo e(route('admin.users.index')); ?>"><i class="bi bi-person-gear"></i> Users</a></div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="page-header">
    <div><h1>Attendance</h1><p><?php echo e(\Carbon\Carbon::parse($date)->format('l, d F Y')); ?></p></div>
    <form method="GET" style="display:flex;gap:8px;">
        <input type="date" name="date" value="<?php echo e($date); ?>" style="width:160px;">
        <button type="submit" class="btn btn-secondary btn-sm">Go</button>
    </form>
</div>

<div class="grid grid-4" style="margin-bottom:24px;">
    <div class="stat-card">
        <div class="stat-icon green"><i class="bi bi-check-circle"></i></div>
        <div class="stat-info"><h3><?php echo e($summary['present'] ?? 0); ?></h3><p>Present</p></div>
    </div>
    <div class="stat-card">
        <div class="stat-icon red"><i class="bi bi-x-circle"></i></div>
        <div class="stat-info"><h3><?php echo e($summary['absent'] ?? 0); ?></h3><p>Absent</p></div>
    </div>
    <div class="stat-card">
        <div class="stat-icon amber"><i class="bi bi-clock"></i></div>
        <div class="stat-info"><h3><?php echo e($summary['late'] ?? 0); ?></h3><p>Late</p></div>
    </div>
    <div class="stat-card">
        <div class="stat-icon blue"><i class="bi bi-shield-check"></i></div>
        <div class="stat-info"><h3><?php echo e($summary['excused'] ?? 0); ?></h3><p>Excused</p></div>
    </div>
</div>

<div class="card">
    <div class="card-header"><h5>Take Attendance by Stream</h5></div>
    <div class="card-body">
        <div class="grid grid-3">
            <?php $__currentLoopData = $streams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stream): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <a href="<?php echo e(route('admin.attendance.take', [$stream, 'date' => $date])); ?>" class="stat-card" style="text-decoration:none;cursor:pointer;transition:box-shadow .2s;" onmouseover="this.style.boxShadow='0 4px 20px rgba(0,0,0,.1)'" onmouseout="this.style.boxShadow='none'">
                <div class="stat-icon green"><i class="bi bi-people"></i></div>
                <div class="stat-info">
                    <h3 style="font-size:16px;"><?php echo e($stream->schoolClass->name); ?> <?php echo e($stream->name); ?></h3>
                    <p>Take Attendance</p>
                </div>
                <i class="bi bi-chevron-right" style="color:var(--gray);margin-left:auto;"></i>
            </a>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\cbe\resources\views\admin\attendance\index.blade.php ENDPATH**/ ?>