<!DOCTYPE html>
<html lang="id">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/png" href="<?= base_url('logo.png') ?>">
    <title>Sistem Tata Tertib | SMP Negeri 5 Bandung</title>

    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- Google Font -->
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">

    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">

    <style>
        * {
            font-family: 'Poppins', sans-serif;
        }

        body {
            background: linear-gradient(135deg, #0f172a, #1d4ed8, #38bdf8);
            min-height: 100vh;
            overflow-x: hidden;
        }

        .navbar {
            background: rgba(255, 255, 255, .08);
            backdrop-filter: blur(12px);
        }

        .hero {
            padding: 70px 0;
        }

        .glass {
            background: rgba(255, 255, 255, .12);
            border-radius: 25px;
            backdrop-filter: blur(18px);
            border: 1px solid rgba(255, 255, 255, .2);
            box-shadow: 0 15px 35px rgba(0, 0, 0, .2);
        }

        .logo {
            width: 100px;
            height: 100px;
            object-fit: contain;
        }

        h1 {
            font-weight: 700;
            color: white;
        }

        h5,
        p {
            color: white;
        }

        .menu-card {
            border-radius: 20px;
            background: #fff;
            padding: 35px 20px;
            cursor: pointer;
            transition: .3s;
            box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
        }

        .menu-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 35px rgba(0, 0, 0, .18);
        }

        .menu-card:hover i {
            transform: scale(1.15);
        }

        /* Saat diklik */
        .menu-card:active {
            background: #FFD54F;
            transform: scale(.97);
        }

        .menu-card:active i,
        .menu-card:active h4 {
            color: #fff;
        }

        .menu-card i {

            font-size: 45px;
            margin-bottom: 15px;
            color: #2563eb;

        }

        .menu-card h4 {

            font-size: 20px;
            font-weight: 600;

        }

        .stat-card {

            background: rgb(5, 53, 121);
            border-radius: 20px;
            color: white;
            padding: 20px;

        }

        .footer {
            background: #FFD54F;
            padding: 20px 30px;
            margin-top: 60px;
            color: #1E3A8A;
            font-size: 15px;
            font-weight: 500;
        }

        .footer h5 {
            font-weight: 700;
            margin-bottom: 5px;
            color: #1E3A8A;
        }

        .footer-link {
            color: #1E3A8A;
            text-decoration: none;
            font-weight: 600;
            transition: .3s;
        }

        .footer-link i {
            margin-right: 6px;
            font-size: 18px;
        }

        .footer-link:hover {
            color: #0f172a;
        }
    </style>

</head>

<body>

    <nav class="navbar navbar-expand-lg">
        <div class="container">
            <a class="navbar-brand text-white fw-bold" href="#">
                <i class="fa-solid fa-school me-2"></i>
                TATIB 5
            </a>
            <a href="<?= base_url('Login') ?>" class="btn btn-warning btn-login">
                <i class="fa-solid fa-right-to-bracket"></i>
                Login
            </a>
        </div>
    </nav>

    <section class="hero">

        <div class="container">

            <div class="glass p-5 text-center">

                <img src="logo.png" class="logo mb-4">

                <h1>SISTEM INFORMASI TATA TERTIB</h1>

                <h5>SMP Negeri 5 Bandung</h5>

            </div>

        </div>

    </section>

    <div class="container mb-5">

        <div class="row g-4">

            <div class="col-md-3">

                <a href="<?= base_url('token?menu=pelanggaran') ?>" class="text-decoration-none">

                    <div class="menu-card text-center">

                        <i class="fa-solid fa-clipboard-list"></i>

                        <h4>Input Pelanggaran</h4>

                    </div>

                </a>

            </div>

            <div class="col-md-3">
                <a href="<?= base_url('GrafikRekapPelanggaran') ?>" class="text-decoration-none">
                    <div class="menu-card text-center">

                        <i class="fa-solid fa-chart-column"></i>

                        <h4>Rekap</h4>

                        <!-- <p class="text-muted">

                        Lihat seluruh laporan

                    </p> -->

                    </div>
                </a>
            </div>

            <div class="col-md-3">
                <a href="<?= base_url('PanduanTatib') ?>" class="text-decoration-none">

                    <div class="menu-card text-center">

                        <i class="fa-solid fa-book"></i>

                        <h4>Panduan Tatib</h4>

                        <!-- <p class="text-muted">

                        Peraturan sekolah

                    </p> -->

                    </div>
                </a>
            </div>

            <div class="col-md-3">
                <a href="<?= base_url('token?menu=penghargaan') ?>" class="text-decoration-none">
                    <div class="menu-card text-center">

                        <i class="fa-solid fa-trophy"></i>

                        <h4> Input Penghargaan</h4>

                    </div>
                </a>
            </div>

        </div>

    </div>

    <div class="container mb-5">

        <div class="row g-3">

            <div class="col-md-3">

                <div class="stat-card text-center">

                    <h2><?= number_format($totalSiswa) ?></h2>

                    <p>Total Murid</p>

                </div>

            </div>

            <div class="col-md-3">

                <div class="stat-card text-center">

                    <h2><?= number_format($totalGuru) ?></h2>

                    <p>Guru</p>

                </div>

            </div>

            <div class="col-md-3">

                <div class="stat-card text-center">

                    <h2><?= number_format($totalJenisPelanggaran) ?></h2>

                    <p>Jenis Pelanggaran</p>

                </div>

            </div>

            <div class="col-md-3">

                <div class="stat-card text-center">

                    <h2><?= number_format($totalHariIni) ?></h2>

                    <p>Pelanggaran Hari Ini</p>

                </div>

            </div>

        </div>

    </div>

    <footer class="footer mt-5">

        <div class="container">

            <div class="row align-items-center">

                <!-- Kiri -->
                <div class="col-md-6 text-md-start text-center mb-3 mb-md-0">

                    <h5 class="mb-1">
                        SMP Negeri 5 Bandung
                    </h5>

                    <small>
                        Jl. Sumatra No. 40, Bandung <br>
                        Sistem Informasi Tata Tertib © 2026
                    </small>

                </div>

                <!-- Kanan -->
                <div class="col-md-6 text-md-end text-center">

                    <a href="https://instagram.com/bdg.smpn5" class="footer-link me-4" target="_blank">

                        <i class="fab fa-instagram"></i>

                        @bdg.smpn5

                    </a>

                    <a href="https://youtube.com/" class="footer-link" target="_blank">

                        <i class="fab fa-youtube"></i>

                        SMP Negeri 5 Bandung

                    </a>

                </div>

            </div>

        </div>

    </footer>

</body>

</html>