<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
    <title>Data Siswa - SIPRES | Sistem Informasi Prestasi Siswa</title>
    
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <!-- Google Fonts - Inter -->
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
    
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: #f0f5fa;
            min-height: 100vh;
        }

        :root {
            --primary: #2A5C8A;
            --primary-dark: #1E4A73;
            --primary-light: #4A7BA9;
            --primary-soft: #E8F0FE;
            --secondary: #5F6B7A;
            --success: #28A745;
            --danger: #DC3545;
            --warning: #FFC107;
            --dark: #2D3E50;
            --light: #FFFFFF;
            --gray-soft: #F8FAFC;
            --sidebar-width: 260px;
        }

        .container {
            display: flex;
            min-height: 100vh;
        }

        /* Sidebar */
        .sidebar {
            width: var(--sidebar-width);
            background: linear-gradient(180deg, #FFFFFF 0%, #F5F9FF 100%);
            border-right: 1px solid rgba(42, 92, 138, 0.1);
            position: fixed;
            height: 100vh;
            overflow-y: auto;
            overflow-x: hidden;
            transition: all 0.3s ease;
            z-index: 1000;
            box-shadow: 5px 0 30px rgba(0, 0, 0, 0.03);
            padding-bottom: 20px;
        }

        .sidebar-header {
            padding: 15px 15px 5px;
        }

        .brand-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .brand-icon {
            width: 35px;
            height: 35px;
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 8px rgba(42, 92, 138, 0.2);
        }

        .brand-icon i {
            font-size: 18px;
            color: white;
        }

        .brand-text {
            font-size: 18px;
            font-weight: 800;
            color: var(--primary);
            letter-spacing: -0.5px;
        }

        .brand-sub {
            font-size: 9px;
            color: var(--secondary);
            margin-top: 0px;
        }

        .sidebar-profile {
            padding: 5px 15px 10px;
            border-bottom: 1px solid rgba(42, 92, 138, 0.08);
            margin-bottom: 5px;
        }

        .profile-card {
            background: var(--gray-soft);
            border-radius: 12px;
            padding: 10px;
            border: 1px solid rgba(42, 92, 138, 0.08);
        }

        .profile-avatar-wrapper {
            position: relative;
            width: 45px;
            height: 45px;
            margin-bottom: 8px;
            cursor: pointer;
        }

        .profile-avatar {
            width: 100%;
            height: 100%;
            border-radius: 12px;
            object-fit: cover;
            border: 2px solid white;
            box-shadow: 0 4px 8px rgba(42, 92, 138, 0.15);
        }

        .avatar-upload {
            position: absolute;
            bottom: -2px;
            right: -2px;
            width: 20px;
            height: 20px;
            background: var(--primary);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            cursor: pointer;
            border: 2px solid white;
            font-size: 10px;
            transition: all 0.2s ease;
        }

        .avatar-upload:hover {
            background: var(--primary-dark);
            transform: scale(1.1);
        }

        .profile-name {
            font-size: 13px;
            font-weight: 700;
            color: var(--dark);
            margin-bottom: 3px;
        }

        .profile-role {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: rgba(42, 92, 138, 0.1);
            padding: 3px 8px;
            border-radius: 20px;
            font-size: 10px;
            font-weight: 600;
            color: var(--primary);
        }

        .profile-role i {
            font-size: 9px;
            color: #FFB800;
        }

        .profile-email {
            font-size: 10px;
            color: var(--secondary);
            margin-top: 6px;
            display: flex;
            align-items: center;
            gap: 4px;
            background: white;
            padding: 5px 8px;
            border-radius: 8px;
            border: 1px solid rgba(42, 92, 138, 0.08);
        }

        .profile-email i {
            color: var(--primary);
            font-size: 10px;
        }

        .menu-title {
            padding: 10px 15px 3px;
            font-size: 9px;
            font-weight: 700;
            text-transform: uppercase;
            color: var(--secondary);
            letter-spacing: 0.5px;
        }

        .sidebar-menu {
            list-style: none;
            padding: 0 10px;
        }

        .sidebar-menu li {
            margin-bottom: 2px;
        }

        .sidebar-menu a {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            color: var(--secondary);
            text-decoration: none;
            border-radius: 10px;
            transition: all 0.2s ease;
            font-weight: 500;
            font-size: 12px;
        }

        .sidebar-menu a i {
            width: 18px;
            font-size: 14px;
            color: var(--secondary);
        }

        .sidebar-menu a:hover {
            background: var(--primary-soft);
            color: var(--primary);
        }

        .sidebar-menu a:hover i {
            color: var(--primary);
        }

        .sidebar-menu a.active {
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            color: white;
            box-shadow: 0 4px 8px rgba(42, 92, 138, 0.25);
        }

        .sidebar-menu a.active i {
            color: white;
        }

        .sidebar-footer {
            position: sticky;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 10px 15px;
            background: white;
            border-top: 1px solid rgba(42, 92, 138, 0.08);
            margin-top: 10px;
        }

        .logout-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            background: #FFF1F0;
            color: var(--danger);
            border: none;
            border-radius: 10px;
            font-weight: 600;
            font-size: 12px;
            cursor: pointer;
            width: 100%;
            border: 1px solid rgba(220, 53, 69, 0.1);
        }

        .logout-btn:hover {
            background: var(--danger);
            color: white;
        }

        .logout-btn i {
            width: 18px;
            font-size: 14px;
        }

        /* Main Content */
        .main-content {
            flex: 1;
            margin-left: var(--sidebar-width);
            padding: 20px;
            transition: margin-left 0.3s ease;
        }

        .top-nav {
            background: white;
            padding: 15px 20px;
            border-radius: 16px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.02);
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border: 1px solid rgba(42, 92, 138, 0.08);
        }

        .page-title h1 {
            font-size: 20px;
            font-weight: 700;
            color: var(--dark);
            margin-bottom: 3px;
        }

        .page-title p {
            color: var(--secondary);
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .notification {
            position: relative;
            width: 38px;
            height: 38px;
            background: #F5F8FA;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        .notification i {
            font-size: 16px;
            color: var(--secondary);
        }

        .badge-count {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--danger);
            color: white;
            font-size: 9px;
            padding: 2px 5px;
            border-radius: 20px;
            border: 2px solid white;
            font-weight: 700;
        }

        .user-dropdown {
            display: flex;
            align-items: center;
            gap: 8px;
            background: #F5F8FA;
            padding: 5px 5px 5px 12px;
            border-radius: 30px;
            cursor: pointer;
            border: 1px solid rgba(42, 92, 138, 0.08);
        }

        .user-avatar {
            width: 32px;
            height: 32px;
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 14px;
        }

        .user-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 8px;
        }

        .user-dropdown span {
            font-weight: 600;
            color: var(--dark);
            font-size: 13px;
        }

        .user-dropdown i {
            font-size: 11px;
            color: var(--secondary);
            margin-right: 5px;
        }

        /* Action Bar */
        .action-bar {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            gap: 15px;
        }

        .action-bar h2 {
            font-size: 18px;
            font-weight: 700;
            color: var(--dark);
        }

        .btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            border-radius: 10px;
            font-size: 13px;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.2s ease;
            border: none;
            cursor: pointer;
            font-family: 'Inter', sans-serif;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            color: white;
            box-shadow: 0 4px 8px rgba(42, 92, 138, 0.25);
        }

        .btn-primary:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }

        .btn-sm {
            padding: 8px 16px;
            font-size: 12px;
        }

        /* Filter Section */
        .filter-section {
            background: white;
            border-radius: 16px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.02);
            padding: 20px;
            margin-bottom: 25px;
            border: 1px solid rgba(42, 92, 138, 0.08);
        }

        .filter-form {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            align-items: flex-end;
        }

        .filter-group {
            flex: 1;
            min-width: 200px;
        }

        .filter-label {
            display: block;
            margin-bottom: 6px;
            color: var(--secondary);
            font-size: 12px;
            font-weight: 600;
        }

        .search-wrapper {
            position: relative;
            width: 100%;
        }

        .search-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--secondary);
            font-size: 13px;
        }

        .search-input {
            width: 100%;
            padding: 10px 12px 10px 36px;
            border: 2px solid #E5E9F0;
            border-radius: 10px;
            font-size: 13px;
            transition: all 0.2s ease;
            font-family: 'Inter', sans-serif;
        }

        .search-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(42, 92, 138, 0.1);
        }

        .filter-select {
            width: 100%;
            padding: 10px 12px;
            border: 2px solid #E5E9F0;
            border-radius: 10px;
            font-size: 13px;
            transition: all 0.2s ease;
            font-family: 'Inter', sans-serif;
            background-color: white;
        }

        .filter-select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(42, 92, 138, 0.1);
        }

        .filter-actions {
            display: flex;
            gap: 10px;
        }

        .btn-filter {
            background: var(--gray-soft);
            color: var(--dark);
            padding: 10px 20px;
            border: 1px solid rgba(42, 92, 138, 0.1);
            border-radius: 10px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            text-decoration: none;
        }

        .btn-filter:hover {
            background: #E5E9F0;
        }

        /* Card Grid */
        .card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .card {
            background: white;
            border-radius: 16px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.02);
            overflow: hidden;
            border: 1px solid rgba(42, 92, 138, 0.08);
            transition: all 0.2s ease;
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        }

        .card-header {
            padding: 20px;
            border-bottom: 1px solid rgba(42, 92, 138, 0.08);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .card-icon {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
            font-weight: 700;
            box-shadow: 0 4px 8px rgba(42, 92, 138, 0.2);
        }

        .card-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 12px;
        }

        .card-badge {
            padding: 6px 12px;
            background: var(--primary-soft);
            color: var(--primary);
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
        }

        .card-body {
            padding: 20px;
        }

        .card-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--dark);
            margin-bottom: 15px;
        }

        .card-info {
            margin-bottom: 15px;
        }

        .info-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            color: var(--secondary);
            font-size: 13px;
        }

        .info-row i {
            width: 18px;
            color: var(--primary);
        }

        .info-row strong {
            color: var(--dark);
            font-weight: 600;
        }

        .card-footer {
            padding: 15px 20px;
            border-top: 1px solid rgba(42, 92, 138, 0.08);
            display: flex;
            gap: 10px;
        }

        .btn-action {
            flex: 1;
            padding: 8px 12px;
            border: none;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .btn-view {
            background: var(--primary-soft);
            color: var(--primary);
        }

        .btn-view:hover {
            background: var(--primary);
            color: white;
        }

        .btn-edit {
            background: #FFF4E5;
            color: #B76E00;
        }

        .btn-edit:hover {
            background: var(--warning);
            color: var(--dark);
        }

        .btn-delete {
            background: #FFE9E9;
            color: var(--danger);
        }

        .btn-delete:hover {
            background: var(--danger);
            color: white;
        }

        /* School Header untuk Super Admin */
        .school-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 30px 0 15px 0;
            padding: 15px;
            background: white;
            border-radius: 12px;
            border: 1px solid rgba(42, 92, 138, 0.08);
        }

        .school-header:first-of-type {
            margin-top: 0;
        }

        .school-title {
            font-size: 16px;
            font-weight: 700;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .school-title i {
            color: var(--primary);
        }

        .school-badge {
            background: var(--primary-soft);
            color: var(--primary);
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }

        /* Info Banner */
        .info-banner {
            background: linear-gradient(135deg, #E8F0FE 0%, #D4E4F5 100%);
            border-radius: 12px;
            padding: 12px 20px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            border-left: 4px solid var(--primary);
        }

        .info-banner i {
            font-size: 20px;
            color: var(--primary);
        }

        .info-banner p {
            margin: 0;
            font-size: 13px;
            color: var(--dark);
        }

        /* Empty State */
        .empty-state {
            grid-column: 1 / -1;
            text-align: center;
            padding: 60px 20px;
            background: white;
            border-radius: 16px;
            border: 1px solid rgba(42, 92, 138, 0.08);
        }

        .empty-state i {
            font-size: 60px;
            color: #ddd;
            margin-bottom: 15px;
        }

        .empty-state p {
            color: var(--secondary);
            margin-bottom: 20px;
            font-size: 14px;
        }

        /* Pagination */
        .pagination-container {
            margin-top: 40px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
        }

        .pagination-info {
            color: var(--secondary);
            font-size: 13px;
        }

        .pagination {
            display: flex;
            justify-content: center;
            gap: 5px;
            margin: 0;
            padding: 0;
            list-style: none;
            flex-wrap: wrap;
        }

        .pagination .page-item {
            list-style: none;
            margin: 0;
        }

        .pagination .page-link {
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 40px;
            height: 40px;
            padding: 0 10px;
            border: 1px solid rgba(42, 92, 138, 0.1);
            border-radius: 10px;
            color: var(--secondary);
            text-decoration: none;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.2s ease;
            background: white;
        }

        .pagination .page-link:hover {
            background: var(--primary-soft);
            color: var(--primary);
            border-color: var(--primary);
        }

        .pagination .active .page-link {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .pagination .disabled .page-link {
            color: #ccc;
            pointer-events: none;
            background-color: #f8f9fa;
        }

        /* Alert Messages */
        .alert {
            padding: 12px 16px;
            border-radius: 12px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 500;
            font-size: 13px;
            border-left: 4px solid;
        }

        .alert-success {
            background: #E3F2E9;
            color: #065F46;
            border-left-color: var(--success);
        }

        .alert-danger {
            background: #FFE9E9;
            color: var(--danger);
            border-left-color: var(--danger);
        }

        /* Profile Modal */
        .profile-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(5px);
        }

        .profile-modal.active {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 20px;
            max-width: 450px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-header {
            padding: 20px;
            border-bottom: 1px solid rgba(42, 92, 138, 0.08);
        }

        .modal-header h3 {
            font-size: 20px;
            font-weight: 700;
            color: var(--dark);
        }

        .modal-body {
            padding: 20px;
        }

        .modal-footer {
            padding: 15px 20px;
            border-top: 1px solid rgba(42, 92, 138, 0.08);
            display: flex;
            gap: 12px;
            justify-content: flex-end;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-label {
            display: block;
            font-weight: 600;
            margin-bottom: 5px;
            color: var(--dark);
            font-size: 12px;
        }

        .form-label i {
            color: var(--primary);
            margin-right: 4px;
        }

        .form-control {
            width: 100%;
            padding: 10px 14px;
            border: 2px solid #E5E9F0;
            border-radius: 10px;
            font-size: 13px;
            font-family: 'Inter', sans-serif;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary);
        }

        .current-avatar {
            margin-top: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px;
            background: var(--gray-soft);
            border-radius: 10px;
        }

        .current-avatar img {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            object-fit: cover;
        }

        .btn-save {
            padding: 10px 20px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 10px;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
        }

        .btn-cancel {
            padding: 10px 20px;
            background: #F1F4F9;
            color: var(--dark);
            border: none;
            border-radius: 10px;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
        }

        /* Mobile Menu Button */
        .mobile-menu-btn {
            display: none;
            position: fixed;
            top: 15px;
            left: 15px;
            z-index: 1001;
            width: 40px;
            height: 40px;
            background: var(--primary);
            border: none;
            border-radius: 10px;
            color: white;
            font-size: 18px;
            cursor: pointer;
            box-shadow: 0 4px 8px rgba(42, 92, 138, 0.3);
        }

        /* Responsive */
        @media (max-width: 768px) {
            .sidebar {
                transform: translateX(-100%);
                position: fixed;
                width: 240px;
            }

            .sidebar.active {
                transform: translateX(0);
            }

            .main-content {
                margin-left: 0;
            }

            .mobile-menu-btn {
                display: block;
            }

            .top-nav {
                flex-direction: column;
                gap: 10px;
                align-items: flex-start;
                padding-top: 60px;
            }

            .user-info {
                width: 100%;
                justify-content: space-between;
            }

            .filter-form {
                flex-direction: column;
                align-items: stretch;
            }

            .filter-group {
                width: 100%;
            }

            .filter-actions {
                width: 100%;
            }

            .btn-filter {
                flex: 1;
                justify-content: center;
            }

            .card-grid {
                grid-template-columns: 1fr;
            }

            .card-footer {
                flex-direction: column;
            }

            .btn-action {
                width: 100%;
            }

            .school-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .action-bar {
                flex-direction: column;
                align-items: stretch;
            }

            .btn {
                justify-content: center;
            }
        }
    </style>
</head>
<body>
    <!-- Mobile Menu Button -->
    <button class="mobile-menu-btn" onclick="toggleSidebar()">
        <i class="fas fa-bars"></i>
    </button>

    <div class="container">
        <!-- Sidebar - SAMA UNTUK SEMUA ROLE DAN SEMUA HALAMAN -->
<div class="sidebar" id="sidebar">
    <div class="sidebar-header">
        <div class="brand-wrapper">
            <div class="brand-icon">
                <i class="fas fa-medal"></i>
            </div>
            <div>
                <div class="brand-text">SIPRES</div>
                <div class="brand-sub">Sistem Prestasi Siswa</div>
            </div>
        </div>
    </div>

    <div class="sidebar-profile">
        <div class="profile-card">
            <div class="profile-avatar-wrapper" onclick="openProfileModal()">
                <img src="<?php echo e(Auth::user()->avatar_url ?? 'https://ui-avatars.com/api/?name='.urlencode(Auth::user()->name ?? 'User').'&background=2A5C8A&color=fff&size=100'); ?>" 
                     class="profile-avatar" 
                     id="profileImage">
                <div class="avatar-upload">
                    <i class="fas fa-camera"></i>
                </div>
            </div>
            <div class="profile-name"><?php echo e(Auth::user()->name ?? 'User'); ?></div>
            <div class="profile-role">
                <?php if(Auth::user()->role == 'super_admin'): ?>
                    <i class="fas fa-crown"></i> SUPER ADMIN
                <?php elseif(Auth::user()->role == 'admin_sekolah'): ?>
                    <i class="fas fa-school"></i> ADMIN SEKOLAH
                <?php else: ?>
                    <i class="fas fa-chalkboard-teacher"></i> GURU
                <?php endif; ?>
            </div>
            <div class="profile-email">
                <i class="far fa-envelope"></i>
                <?php echo e(Auth::user()->email ?? 'user@sipres.com'); ?>

            </div>
        </div>
    </div>
    
    <?php
        $currentRoute = request()->route()->getName();
        $user = Auth::user();
    ?>

    <!-- MENU UTAMA - SAMA UNTUK SEMUA ROLE -->
    <div class="menu-title">MENU UTAMA</div>
    <ul class="sidebar-menu">
        <li>
            <a href="<?php echo e(route('dashboard')); ?>" class="<?php echo e($currentRoute == 'dashboard' ? 'active' : ''); ?>">
                <i class="fas fa-home"></i> Dashboard
            </a>
        </li>
    </ul>

    <!-- MANAJEMEN DATA - SAMA URUTANNYA UNTUK SEMUA -->
    <div class="menu-title">DATA MASTER</div>
    <ul class="sidebar-menu">
        <!-- Profil Sekolah - Hanya untuk Admin Sekolah -->
        <?php if($user->role == 'admin_sekolah'): ?>
        <li>
            <a href="<?php echo e(route('school.profile')); ?>" class="<?php echo e($currentRoute == 'school.profile' ? 'active' : ''); ?>">
                <i class="fas fa-building"></i> Profil Sekolah
            </a>
        </li>
        <?php endif; ?>

        <!-- Kelas - Semua role bisa akses -->
        <li>
            <a href="<?php echo e(route('kelas.index')); ?>" class="<?php echo e(request()->routeIs('kelas.*') ? 'active' : ''); ?>">
                <i class="fas fa-school"></i> Kelas
            </a>
        </li>

        <!-- Siswa - Semua role bisa akses -->
        <li>
            <a href="<?php echo e(route('siswa.index')); ?>" class="<?php echo e(request()->routeIs('siswa.*') ? 'active' : ''); ?>">
                <i class="fas fa-users"></i> Siswa
            </a>
        </li>

        <!-- Guru - Hanya untuk Super Admin dan Admin Sekolah -->
        <?php if(in_array($user->role, ['super_admin', 'admin_sekolah'])): ?>
        <li>
            <a href="<?php echo e(route('teachers.index')); ?>" class="<?php echo e(request()->routeIs('teachers.*') ? 'active' : ''); ?>">
                <i class="fas fa-chalkboard-teacher"></i> Guru
            </a>
        </li>
        <?php endif; ?>

        <!-- Prestasi - Semua role bisa akses -->
        <li>
            <a href="<?php echo e(route('prestasi.index')); ?>" class="<?php echo e(request()->routeIs('prestasi.*') ? 'active' : ''); ?>">
                <i class="fas fa-trophy"></i> Prestasi
            </a>
        </li>

        <!-- Ekstrakurikuler - Semua role bisa akses -->
        <li>
            <a href="<?php echo e(route('eskul.index')); ?>" class="<?php echo e(request()->routeIs('eskul.*') ? 'active' : ''); ?>">
                <i class="fas fa-futbol"></i> Ekstrakurikuler
            </a>
        </li>

        <!-- Minat & Bakat - Semua role bisa akses -->
        <li>
            <a href="<?php echo e(route('minat-bakat.index')); ?>" class="<?php echo e(request()->routeIs('minat-bakat.*') ? 'active' : ''); ?>">
                <i class="fas fa-heart"></i> Minat & Bakat
            </a>
        </li>
    </ul>

    <!-- ========== TAMBAHKAN MENU LAPORAN DI SINI ========== -->
    <div class="menu-title">LAPORAN</div>
    <ul class="sidebar-menu">
        <li>
            <a href="<?php echo e(route('laporan.index')); ?>" class="<?php echo e(request()->routeIs('laporan.*') ? 'active' : ''); ?>">
                <i class="fas fa-file-alt"></i> Laporan Prestasi
            </a>
        </li>
        <?php if(Auth::user()->role == 'super_admin'): ?>
        <li>
            <a href="<?php echo e(route('laporan.pdf.superadmin')); ?>" target="_blank">
                <i class="fas fa-chart-bar"></i> Statistik Nasional
            </a>
        </li>
        <?php endif; ?>
        <?php if(Auth::user()->role == 'admin_sekolah'): ?>
        <li>
            <a href="<?php echo e(route('laporan.pdf.sekolah')); ?>" target="_blank">
                <i class="fas fa-print"></i> Cetak Laporan PDF
            </a>
        </li>
        <?php endif; ?>
    </ul>
    <!-- ================================================== -->

    <!-- SUPER ADMIN ONLY - KELOLA SEKOLAH -->
    <?php if($user->role == 'super_admin'): ?>
    <div class="menu-title">SUPER ADMIN</div>
    <ul class="sidebar-menu">
        <li>
            <a href="<?php echo e(route('schools.index')); ?>" class="<?php echo e(request()->routeIs('schools.*') ? 'active' : ''); ?>">
                <i class="fas fa-building"></i> Kelola Sekolah
            </a>
        </li>
        <li>
            <a href="<?php echo e(route('users.index')); ?>" class="<?php echo e(request()->routeIs('users.*') ? 'active' : ''); ?>">
                <i class="fas fa-users-cog"></i> Kelola User
            </a>
        </li>
    </ul>
    <?php endif; ?>

    <!-- LOGOUT -->
    <div class="sidebar-footer">
        <button onclick="confirmLogout()" class="logout-btn">
            <i class="fas fa-sign-out-alt"></i>
            <span>Keluar dari SIPRES</span>
        </button>
    </div>
</div>

        <!-- Main Content -->
        <div class="main-content" id="mainContent">
            <!-- Top Navigation -->
            <div class="top-nav">
                <div class="page-title">
                    <h1>Data Siswa</h1>
                    <p>
                        <i class="fas fa-calendar-alt"></i>
                        <?php echo e(now()->translatedFormat('l, d F Y')); ?>

                    </p>
                </div>
                <div class="user-info">
                    <div class="notification">
                        <i class="far fa-bell"></i>
                        <span class="badge-count">3</span>
                    </div>
                    <div class="user-dropdown" onclick="openProfileModal()">
                        <div class="user-avatar">
                            <?php if(Auth::user() && Auth::user()->avatar): ?>
                                <img src="<?php echo e(Auth::user()->avatar_url); ?>" alt="Avatar">
                            <?php else: ?>
                                <?php echo e(substr(Auth::user()->name ?? 'AD', 0, 1)); ?>

                            <?php endif; ?>
                        </div>
                        <span><?php echo e(Auth::user()->name ?? 'Admin'); ?></span>
                        <i class="fas fa-chevron-down"></i>
                    </div>
                </div>
            </div>

            <!-- Alert Messages -->
            <?php if(session('success')): ?>
            <div class="alert alert-success">
                <i class="fas fa-check-circle"></i> 
                <span><?php echo e(session('success')); ?></span>
            </div>
            <?php endif; ?>

            <?php if(session('error')): ?>
            <div class="alert alert-danger">
                <i class="fas fa-exclamation-circle"></i> 
                <span><?php echo e(session('error')); ?></span>
            </div>
            <?php endif; ?>

            <!-- Info Banner untuk Super Admin -->
            <?php if(Auth::user()->role == 'super_admin'): ?>
            <div class="info-banner">
                <i class="fas fa-info-circle"></i>
                <p>Mode Super Admin - Anda dapat melihat semua siswa dari seluruh sekolah, namun <strong>tidak dapat menambah, mengedit, atau menghapus</strong> data siswa.</p>
            </div>
            <?php endif; ?>

            <!-- Action Bar - HANYA ADMIN SEKOLAH YANG BISA TAMBAH -->
            <div class="action-bar">
                <h2>
                    <?php if(Auth::user()->role == 'super_admin'): ?>
                        Daftar Siswa Semua Sekolah
                    <?php else: ?>
                        Daftar Siswa <?php echo e(Auth::user()->school->name ?? ''); ?>

                    <?php endif; ?>
                </h2>
                <!-- HILANGKAN TOMBOL TAMBAH UNTUK SUPER ADMIN -->
                <?php if(Auth::user()->role == 'admin_sekolah'): ?>
                <a href="<?php echo e(route('siswa.create')); ?>" class="btn btn-primary btn-sm">
                    <i class="fas fa-plus"></i> Tambah Siswa
                </a>
                <?php endif; ?>
            </div>

            <!-- Filter Section -->
            <div class="filter-section">
                <form method="GET" action="<?php echo e(route('siswa.index')); ?>" class="filter-form">
                    <div class="filter-group">
                        <label class="filter-label"><i class="fas fa-search"></i> Cari Nama / NIS / NISN</label>
                        <div class="search-wrapper">
                            <i class="fas fa-search search-icon"></i>
                            <input type="text" name="search" class="search-input" placeholder="Ketik nama, NIS, atau NISN..." value="<?php echo e(request('search')); ?>">
                        </div>
                    </div>
                    
                    <?php if(Auth::user()->role == 'super_admin'): ?>
                    <div class="filter-group">
                        <label class="filter-label"><i class="fas fa-building"></i> Filter Sekolah</label>
                        <select name="school_id" class="filter-select">
                            <option value="">Semua Sekolah</option>
                            <?php $__currentLoopData = $schools ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $school): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($school->id); ?>" <?php echo e(request('school_id') == $school->id ? 'selected' : ''); ?>>
                                <?php echo e($school->name); ?>

                            </option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                    <?php endif; ?>
                    
                    <div class="filter-group">
                        <label class="filter-label"><i class="fas fa-school"></i> Filter Kelas</label>
                        <select name="kelas_id" class="filter-select">
                            <option value="">Semua Kelas</option>
                            <?php if(isset($kelasList) && $kelasList->count() > 0): ?>
                                <?php $__currentLoopData = $kelasList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $kelas): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($kelas->id); ?>" <?php echo e(request('kelas_id') == $kelas->id ? 'selected' : ''); ?>>
                                        <?php echo e($kelas->nama_kelas); ?>

                                    </option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php endif; ?>
                        </select>
                    </div>
                    
                    <div class="filter-actions">
                        <button type="submit" class="btn-filter">
                            <i class="fas fa-filter"></i> Filter
                        </button>
                        <a href="<?php echo e(route('siswa.index')); ?>" class="btn-filter">
                            <i class="fas fa-undo"></i> Reset
                        </a>
                    </div>
                </form>
            </div>

            <!-- TAMPILAN UNTUK SUPER ADMIN (GROUP BY SEKOLAH) - HANYA LIHAT -->
            <?php if(Auth::user()->role == 'super_admin' && !request('school_id')): ?>
                <?php
                    $groupedSiswa = $siswa->groupBy('school_id');
                ?>

                <?php $__empty_1 = true; $__currentLoopData = $groupedSiswa; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $schoolId => $siswaSekolah): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <?php
                        $school = $schools->firstWhere('id', $schoolId);
                    ?>
                    
                    <div class="school-header">
                        <div class="school-title">
                            <i class="fas fa-building"></i>
                            <h3><?php echo e($school->name ?? 'Sekolah Tidak Dikenal'); ?></h3>
                        </div>
                        <span class="school-badge">
                            <i class="fas fa-users"></i> Total: <?php echo e($siswaSekolah->count()); ?> Siswa
                        </span>
                    </div>
                    
                    <div class="card-grid">
                        <?php $__currentLoopData = $siswaSekolah; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="card">
                            <div class="card-header">
                                <div class="card-icon">
                                    <?php if($s->foto && file_exists(public_path('uploads/foto-siswa/' . $s->foto))): ?>
                                        <img src="<?php echo e(asset('uploads/foto-siswa/' . $s->foto)); ?>" alt="<?php echo e($s->nama_lengkap); ?>">
                                    <?php else: ?>
                                        <?php echo e(strtoupper(substr($s->nama_lengkap, 0, 1))); ?>

                                    <?php endif; ?>
                                </div>
                                <span class="card-badge">
                                    <i class="fas fa-id-card"></i> NIS: <?php echo e($s->nis); ?>

                                </span>
                            </div>
                            
                            <div class="card-body">
                                <h3 class="card-title"><?php echo e($s->nama_lengkap); ?></h3>
                                
                                <div class="card-info">
                                    <div class="info-row">
                                        <i class="fas fa-building"></i>
                                        <span>Sekolah: <strong><?php echo e($school->name ?? '-'); ?></strong></span>
                                    </div>
                                    <div class="info-row">
                                        <i class="fas fa-chalkboard"></i>
                                        <span>Kelas: <strong><?php echo e($s->kelas->nama_kelas ?? '-'); ?></strong></span>
                                    </div>
                                    <div class="info-row">
                                        <i class="fas <?php echo e($s->jenis_kelamin == 'L' ? 'fa-mars' : 'fa-venus'); ?>"></i>
                                        <span>Jenis Kelamin: <strong><?php echo e($s->jenis_kelamin == 'L' ? 'Laki-laki' : ($s->jenis_kelamin == 'P' ? 'Perempuan' : '-')); ?></strong></span>
                                    </div>
                                    <div class="info-row">
                                        <i class="fas fa-phone"></i>
                                        <span>No. HP: <strong><?php echo e($s->no_hp ?? '-'); ?></strong></span>
                                    </div>
                                    <?php if($s->nisn): ?>
                                    <div class="info-row">
                                        <i class="fas fa-qrcode"></i>
                                        <span>NISN: <strong><?php echo e($s->nisn); ?></strong></span>
                                    </div>
                                    <?php endif; ?>
                                </div>
                            </div>

                            <!-- SUPER ADMIN HANYA BISA LIHAT DETAIL -->
                            <div class="card-footer">
                                <a href="<?php echo e(route('siswa.show', $s->id)); ?>" class="btn-action btn-view">
                                    <i class="fas fa-eye"></i> Lihat Detail
                                </a>
                            </div>
                        </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <div class="empty-state">
                        <i class="fas fa-users"></i>
                        <p>Belum ada data siswa di semua sekolah</p>
                    </div>
                <?php endif; ?>

            <?php else: ?>
                <!-- TAMPILAN UNTUK ADMIN SEKOLAH (BISA EDIT & HAPUS) -->
                <div class="card-grid">
                    <?php $__empty_1 = true; $__currentLoopData = $siswa; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <div class="card">
                        <div class="card-header">
                            <div class="card-icon">
                                <?php if($s->foto && file_exists(public_path('uploads/foto-siswa/' . $s->foto))): ?>
                                    <img src="<?php echo e(asset('uploads/foto-siswa/' . $s->foto)); ?>" alt="<?php echo e($s->nama_lengkap); ?>">
                                <?php else: ?>
                                    <?php echo e(strtoupper(substr($s->nama_lengkap, 0, 1))); ?>

                                <?php endif; ?>
                            </div>
                            <span class="card-badge">
                                <i class="fas fa-id-card"></i> NIS: <?php echo e($s->nis); ?>

                            </span>
                        </div>
                        
                        <div class="card-body">
                            <h3 class="card-title"><?php echo e($s->nama_lengkap); ?></h3>
                            
                            <div class="card-info">
                                <?php if(Auth::user()->role == 'super_admin'): ?>
                                <div class="info-row">
                                    <i class="fas fa-building"></i>
                                    <span>Sekolah: <strong><?php echo e($s->school->name ?? '-'); ?></strong></span>
                                </div>
                                <?php endif; ?>
                                
                                <div class="info-row">
                                    <i class="fas fa-chalkboard"></i>
                                    <span>Kelas: <strong><?php echo e($s->kelas->nama_kelas ?? '-'); ?></strong></span>
                                </div>
                                <div class="info-row">
                                    <i class="fas <?php echo e($s->jenis_kelamin == 'L' ? 'fa-mars' : 'fa-venus'); ?>"></i>
                                    <span>Jenis Kelamin: <strong><?php echo e($s->jenis_kelamin == 'L' ? 'Laki-laki' : ($s->jenis_kelamin == 'P' ? 'Perempuan' : '-')); ?></strong></span>
                                </div>
                                <div class="info-row">
                                    <i class="fas fa-phone"></i>
                                    <span>No. HP: <strong><?php echo e($s->no_hp ?? '-'); ?></strong></span>
                                </div>
                                <?php if($s->nisn): ?>
                                <div class="info-row">
                                    <i class="fas fa-qrcode"></i>
                                    <span>NISN: <strong><?php echo e($s->nisn); ?></strong></span>
                                </div>
                                <?php endif; ?>
                            </div>
                        </div>

                        <!-- ADMIN SEKOLAH BISA EDIT & HAPUS -->
                        <div class="card-footer">
                            <a href="<?php echo e(route('siswa.show', $s->id)); ?>" class="btn-action btn-view">
                                <i class="fas fa-eye"></i> Detail
                            </a>
                            
                            <?php if(Auth::user()->role == 'admin_sekolah'): ?>
                                <a href="<?php echo e(route('siswa.edit', $s->id)); ?>" class="btn-action btn-edit">
                                    <i class="fas fa-edit"></i> Edit
                                </a>
                                <form action="<?php echo e(route('siswa.destroy', $s->id)); ?>" method="POST" style="flex: 1;" onsubmit="return confirm('Yakin ingin menghapus siswa <?php echo e($s->nama_lengkap); ?>?')">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('DELETE'); ?>
                                    <button type="submit" class="btn-action btn-delete" style="width: 100%;">
                                        <i class="fas fa-trash"></i> Hapus
                                    </button>
                                </form>
                            <?php endif; ?>
                        </div>
                    </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <div class="empty-state">
                        <i class="fas fa-users"></i>
                        <p>Belum ada data siswa</p>
                        <?php if(Auth::user()->role == 'admin_sekolah'): ?>
                        <a href="<?php echo e(route('siswa.create')); ?>" class="btn btn-primary">
                            <i class="fas fa-plus"></i> Tambah Siswa Sekarang
                        </a>
                        <?php endif; ?>
                    </div>
                    <?php endif; ?>
                </div>
            <?php endif; ?>

            <!-- Pagination -->
            <?php if(method_exists($siswa, 'hasPages') && $siswa->hasPages()): ?>
            <div class="pagination-container">
                <div class="pagination-info">
                    <i class="fas fa-chart-line"></i>
                    Menampilkan <?php echo e($siswa->firstItem() ?? 0); ?> sampai <?php echo e($siswa->lastItem() ?? 0); ?> 
                    dari <?php echo e($siswa->total() ?? 0); ?> data
                </div>
                
                <ul class="pagination">
                    <?php if($siswa->onFirstPage()): ?>
                        <li class="page-item disabled"><span class="page-link"><i class="fas fa-chevron-left"></i></span></li>
                    <?php else: ?>
                        <li class="page-item"><a class="page-link" href="<?php echo e($siswa->previousPageUrl()); ?>"><i class="fas fa-chevron-left"></i></a></li>
                    <?php endif; ?>

                    <?php $__currentLoopData = $siswa->getUrlRange(max(1, $siswa->currentPage() - 2), min($siswa->lastPage(), $siswa->currentPage() + 2)); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page => $url): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php if($page == $siswa->currentPage()): ?>
                            <li class="page-item active"><span class="page-link"><?php echo e($page); ?></span></li>
                        <?php else: ?>
                            <li class="page-item"><a class="page-link" href="<?php echo e($url); ?>"><?php echo e($page); ?></a></li>
                        <?php endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                    <?php if($siswa->hasMorePages()): ?>
                        <li class="page-item"><a class="page-link" href="<?php echo e($siswa->nextPageUrl()); ?>"><i class="fas fa-chevron-right"></i></a></li>
                    <?php else: ?>
                        <li class="page-item disabled"><span class="page-link"><i class="fas fa-chevron-right"></i></span></li>
                    <?php endif; ?>
                </ul>
            </div>
            <?php endif; ?>
        </div>
    </div>

    <!-- Profile Modal -->
    <div class="profile-modal" id="profileModal">
        <div class="modal-content">
            <div class="modal-header">
                <h3><i class="fas fa-user-edit"></i> Edit Profile</h3>
            </div>
            <form method="POST" action="<?php echo e(route('profile.update')); ?>" enctype="multipart/form-data">
                <?php echo csrf_field(); ?>
                <div class="modal-body">
                    <div class="form-group">
                        <label class="form-label"><i class="fas fa-camera"></i> Foto Profile</label>
                        <input type="file" name="avatar" class="form-control" accept="image/*" onchange="previewImage(this)">
                        <small style="color: var(--secondary); display: block; margin-top: 5px;">Format: JPG, PNG. Maks: 2MB</small>
                        <?php if(Auth::user() && Auth::user()->avatar): ?>
                        <div class="current-avatar">
                            <img src="<?php echo e(Auth::user()->avatar_url); ?>" alt="Current Avatar">
                            <span>Avatar saat ini</span>
                        </div>
                        <?php endif; ?>
                    </div>
                    <div class="form-group">
                        <label class="form-label"><i class="fas fa-user"></i> Nama Lengkap</label>
                        <input type="text" name="name" class="form-control" value="<?php echo e(Auth::user()->name ?? ''); ?>" required>
                    </div>
                    <div class="form-group">
                        <label class="form-label"><i class="fas fa-envelope"></i> Email</label>
                        <input type="email" name="email" class="form-control" value="<?php echo e(Auth::user()->email ?? ''); ?>" required>
                    </div>
                    <div class="form-group">
                        <label class="form-label"><i class="fas fa-lock"></i> Password Baru</label>
                        <input type="password" name="password" class="form-control" placeholder="Kosongkan jika tidak ingin mengubah">
                    </div>
                    <div class="form-group">
                        <label class="form-label"><i class="fas fa-lock"></i> Konfirmasi Password</label>
                        <input type="password" name="password_confirmation" class="form-control">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn-cancel" onclick="closeProfileModal()"><i class="fas fa-times"></i> Batal</button>
                    <button type="submit" class="btn-save"><i class="fas fa-save"></i> Simpan</button>
                </div>
            </form>
        </div>
    </div>

    <!-- Logout Form -->
    <form id="logout-form" method="POST" action="<?php echo e(route('logout')); ?>" style="display: none;"><?php echo csrf_field(); ?></form>

    <!-- JavaScript -->
    <script>
        function toggleSidebar() {
            document.getElementById('sidebar').classList.toggle('active');
        }

        function openProfileModal() {
            document.getElementById('profileModal').classList.add('active');
            document.body.style.overflow = 'hidden';
        }

        function closeProfileModal() {
            document.getElementById('profileModal').classList.remove('active');
            document.body.style.overflow = '';
        }

        function previewImage(input) {
            if (input.files && input.files[0]) {
                const reader = new FileReader();
                reader.onload = function(e) {
                    const profileImage = document.getElementById('profileImage');
                    if (profileImage) profileImage.src = e.target.result;
                };
                reader.readAsDataURL(input.files[0]);
            }
        }

        function confirmLogout() {
            if(confirm('Apakah Anda yakin ingin keluar dari SIPRES?')) {
                document.getElementById('logout-form').submit();
            }
        }

        // Close modal when clicking outside
        window.addEventListener('click', function(e) {
            const modal = document.getElementById('profileModal');
            if (e.target === modal) closeProfileModal();
        });

        // Close sidebar on mobile when clicking outside
        document.addEventListener('click', function(event) {
            const sidebar = document.getElementById('sidebar');
            const mobileBtn = document.querySelector('.mobile-menu-btn');
            
            if (window.innerWidth <= 768) {
                if (sidebar.classList.contains('active') && 
                    !sidebar.contains(event.target) && 
                    !mobileBtn.contains(event.target)) {
                    sidebar.classList.remove('active');
                }
            }
        });

        // Auto close alerts
        setTimeout(() => {
            document.querySelectorAll('.alert').forEach(alert => {
                alert.style.transition = 'opacity 0.5s ease';
                alert.style.opacity = '0';
                setTimeout(() => alert.remove(), 500);
            });
        }, 5000);
    </script>
</body>
</html><?php /**PATH C:\laragon\www\prestasi1\resources\views/siswa/index.blade.php ENDPATH**/ ?>