

<?php $__env->startSection('title', 'Dashboard'); ?>
<?php $__env->startSection('page-title', 'Dashboard'); ?>

<?php $__env->startSection('content'); ?>


<div class="page-header">
    <h4><i class="bi bi-grid-fill me-2" style="color:#1565c0;"></i>Dashboard Sekolah</h4>
    <p>Selamat datang di Sistem Informasi Sekolah — Ringkasan data terkini</p>
</div>


<div class="row g-4 mb-4">

    
    <div class="col-xl-3 col-md-6">
        <div class="stat-card">
            <div class="d-flex justify-content-between align-items-start">
                <div>
                    <div class="stat-label">Total Siswa</div>
                    <div class="stat-number mt-1"><?php echo e($stats['total_siswa']); ?>

                        
                    </div>
                </div>
                <div class="stat-icon" style="background:#dbeafe;">
                    <i class="bi bi-people-fill" style="color:#1d4ed8;"></i>
                </div>
            </div>
            <div class="stat-trend text-success">
                <i class="bi bi-arrow-up-right-circle-fill me-1"></i>
                Aktif Terdaftar
            </div>
        </div>
    </div>

    
    <div class="col-xl-3 col-md-6">
        <div class="stat-card">
            <div class="d-flex justify-content-between align-items-start">
                <div>
                    <div class="stat-label">Total Guru</div>
                    <div class="stat-number mt-1"><?php echo e($stats['total_guru']); ?></div>
                </div>
                <div class="stat-icon" style="background:#dcfce7;">
                    <i class="bi bi-person-badge-fill" style="color:#16a34a;"></i>
                </div>
            </div>
            <div class="stat-trend text-success">
                <i class="bi bi-arrow-up-right-circle-fill me-1"></i>
                Tenaga Pendidik
            </div>
        </div>
    </div>

    
    <div class="col-xl-3 col-md-6">
        <div class="stat-card">
            <div class="d-flex justify-content-between align-items-start">
                <div>
                    <div class="stat-label">Total Kelas</div>
                    <div class="stat-number mt-1"><?php echo e($stats['total_kelas']); ?></div>
                </div>
                <div class="stat-icon" style="background:#fef9c3;">
                    <i class="bi bi-door-open-fill" style="color:#ca8a04;"></i>
                </div>
            </div>
            <div class="stat-trend" style="color:#ca8a04;">
                <i class="bi bi-check-circle-fill me-1"></i>
                Rombel Aktif
            </div>
        </div>
    </div>

    
    <div class="col-xl-3 col-md-6">
        <div class="stat-card">
            <div class="d-flex justify-content-between align-items-start">
                <div>
                    <div class="stat-label">Total Jurusan</div>
                    <div class="stat-number mt-1"><?php echo e($stats['total_jurusan']); ?></div>
                </div>
                <div class="stat-icon" style="background:#f3e8ff;">
                    <i class="bi bi-diagram-3-fill" style="color:#9333ea;"></i>
                </div>
            </div>
            <div class="stat-trend" style="color:#9333ea;">
                <i class="bi bi-check-circle-fill me-1"></i>
                Program Studi
            </div>
        </div>
    </div>

</div>


<div class="row mb-4">
    <div class="col-12">
        <div
            style="background:linear-gradient(135deg,#0d3b7a,#1565c0);border-radius:14px;padding:22px 28px;color:#fff;">
            <div class="row align-items-center">
                <div class="col-md-8">
                    <h6 class="mb-1 fw-bold">
                        <i class="bi bi-info-circle-fill me-2"></i>
                        Tahun Pelajaran 2024/2025
                    </h6>
                    <p class="mb-0" style="opacity:.85;font-size:.875rem;">
                        Semester Genap · SMA Negeri 1 Nusantara · Akreditasi A (Unggul)
                    </p>
                </div>
                <div class="col-md-4 text-md-end mt-3 mt-md-0">
                    <a href="<?php echo e(route('profil')); ?>" class="btn btn-light btn-sm fw-600">
                        <i class="bi bi-building-fill me-1"></i> Lihat Profil Sekolah
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>


<div class="row">
    <div class="col-12">
        <div class="card-table">
            <div class="card-header d-flex justify-content-between align-items-center">
                <div>
                    <i class="bi bi-clock-history me-2" style="color:#1565c0;"></i>
                    Siswa Terdaftar Terbaru
                </div>
                <a href="<?php echo e(route('siswa.index')); ?>" class="btn btn-sm"
                    style="background:#e8f0fe;color:#1565c0;font-size:.8rem;font-weight:600;">
                    Lihat Semua <i class="bi bi-arrow-right ms-1"></i>
                </a>
            </div>
            <div class="table-responsive">
                <table class="table table-hover mb-0">
                    <thead>
                        <tr>
                            <th style="padding:14px 20px;">#</th>
                            <th>Nama Siswa</th>
                            <th>NISN</th>
                            <th>Kelas</th>
                            <th>Jenis Kelamin</th>
                            <th>Aksi</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__empty_1 = true; $__currentLoopData = $siswa_terbaru; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $siswa): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td style="padding:14px 20px;color:#9ca3af;">
                                <?php echo e($index + 1); ?>

                            </td>
                            <td>
                                <div class="d-flex align-items-center gap-2">
                                    <div class="avatar-circle"
                                        style="background:<?php echo e($siswa->jenis_kelamin == 'Laki-laki' ? '#1565c0' : '#be185d'); ?>;">
                                        <?php echo e(strtoupper(substr($siswa->nama, 0, 1))); ?>

                                    </div>
                                    <span class="fw-500"><?php echo e($siswa->nama); ?></span>
                                </div>
                            </td>
                            <td style="font-family:monospace;color:#6c757d;">
                                <?php echo e($siswa->nisn); ?>

                            </td>
                            <td>
                                <span class="badge"
                                    style="background:#e8f0fe;color:#1565c0;font-weight:600;padding:5px 10px;border-radius:6px;">
                                    <?php echo e($siswa->kelas); ?>

                                </span>
                            </td>
                            <td>
                                <span
                                    class="badge <?php echo e($siswa->jenis_kelamin == 'Laki-laki' ? 'badge-laki' : 'badge-wanita'); ?>"
                                    style="padding:5px 10px;border-radius:6px;">
                                    <i
                                        class="bi bi-<?php echo e($siswa->jenis_kelamin == 'Laki-laki' ? 'gender-male' : 'gender-female'); ?> me-1"></i>
                                    <?php echo e($siswa->jenis_kelamin); ?>

                                </span>
                            </td>
                            <td>
                                <a href="<?php echo e(route('siswa.show', $siswa->id)); ?>" class="btn btn-sm"
                                    style="background:#f0fdf4;color:#16a34a;font-size:.78rem;">
                                    <i class="bi bi-eye me-1"></i> Detail
                                </a>
                            </td>
                        </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td colspan="6" class="text-center py-4 text-muted">
                                <i class="bi bi-inbox" style="font-size:2rem;"></i>
                                <p class="mt-2">Belum ada data siswa</p>
                            </td>
                        </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
        </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:\laragon\www\sekolah\resources\views/dashboard.blade.php ENDPATH**/ ?>