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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Login | Tatib 5</title>

    <link rel="icon" type="image/png" href="<?= base_url('logo.png') ?>">

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

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

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

    <style>
        body {
            font-family: 'Poppins', sans-serif;
            background: #f5f7fb;
        }

        /* HEADER */

        .top-header {
            background: linear-gradient(135deg, #1E3A8A, #2563EB);
            color: #fff;
            padding: 15px 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 10px 25px rgba(37, 99, 235, .25);
        }

        .btn-back {
            color: white;
            text-decoration: none;
            font-weight: 600;
        }

        .btn-back:hover {
            color: #FFD54F;
        }

        .header-title {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo-header {
            width: 60px;
        }

        .header-title h4 {
            margin: 0;
            font-weight: 700;
        }

        .header-title small {
            opacity: .9;
        }

        /* CARD */

        .login-card {
            max-width: 450px;
            margin: 70px auto;
            border: none;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
        }

        .card-header {
            background: #2563EB;
            color: white;
            text-align: center;
            font-size: 22px;
            font-weight: 600;
            padding: 18px;
        }

        .card-body {
            padding: 35px;
        }

        label {
            font-weight: 600;
            margin-bottom: 8px;
        }

        .form-control {
            height: 48px;
            border-radius: 12px;
        }

        .btn-login {
            width: 100%;
            background: #2563EB;
            color: white;
            border: none;
            border-radius: 12px;
            padding: 12px;
            font-weight: 600;
            transition: .3s;
        }

        .btn-login:hover {
            background: #1E40AF;
        }

        .back-home {
            display: block;
            text-align: center;
            margin-top: 20px;
            text-decoration: none;
            color: #2563EB;
            font-weight: 600;
        }

        .back-home:hover {
            color: #1E3A8A;
        }

        footer {
            margin-top: 80px;
            background: #FFD54F;
            padding: 20px 30px;
            color: #1E3A8A;
        }

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

        footer small {
            color: #1E3A8A;
            font-weight: 600;
            line-height: 1.7;
        }

        .footer-link {
            color: #1E3A8A;
            text-decoration: none;
            font-weight: 700;
            margin-left: 25px;
        }

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

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

</head>

<body>

    <!-- HEADER -->

    <div class="top-header">

        <a href="<?= base_url('/') ?>" class="btn-back">
            <i class="fa-solid fa-arrow-left"></i>
            Kembali
        </a>

        <div class="header-title">

            <img src="<?= base_url('logo.png') ?>" class="logo-header">

            <div>
                <h4>TIM TATIB 5</h4>
                <small>SMP Negeri 5 Bandung</small>
            </div>

        </div>

    </div>

    <!-- LOGIN -->

    <div class="container">

        <div class="card login-card">

            <div class="card-header">

                <i class="fa-solid fa-user-lock"></i>
                Halaman Login <br>Walikelas, BK dan Kemuridan

            </div>

            <div class="card-body">

                <form action="<?= base_url('Login/prosesLogin') ?>" method="post">

                    <div class="mb-4">

                        <label>NIP</label>

                        <input
                            type="text"
                            name="nip"
                            class="form-control"
                            placeholder="Masukkan NIP"
                            required>

                    </div>

                    <div class="mb-4">

                        <label>Password</label>

                        <input
                            type="password"
                            name="password"
                            class="form-control"
                            placeholder="Masukkan Password"
                            required>

                    </div>

                    <button type="submit" class="btn btn-login">

                        <i class="fa-solid fa-right-to-bracket"></i>

                        Login

                    </button>

                </form>

                <a href="<?= base_url('/') ?>" class="back-home">

                    << Kembali ke Halaman Awal

                        </a>

            </div>

        </div>

    </div>

    <!-- FOOTER -->

    <footer>

        <div class="container">

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

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

                    <h5>SMP Negeri 5 Bandung</h5>

                    <small>

                        Jl. Sumatra No.40 Bandung<br>

                        Sistem Informasi Tata Tertib © 2026

                    </small>

                </div>

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

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

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

                        @bdg.smpn5

                    </a>

                    <a href="#" class="footer-link">

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

                        SMP Negeri 5 Bandung

                    </a>

                </div>

            </div>

        </div>

    </footer>

</body>

</html>