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

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Login | SIM Sari Rasa</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/admin-lte@3.2/dist/css/adminlte.min.css">
    <style>
        body {
            background-color: #f0fdf4 !important;
        }

        .card-emerald.card-outline {
            border-top: 3px solid #10b981;
        }

        .btn-emerald {
            background-color: #10b981;
            color: white;
            border: none;
        }

        .btn-emerald:hover {
            background-color: #059669;
            color: white;
        }

        .login-logo a {
            color: #065f46;
            font-weight: bold;
        }
    </style>
</head>

<body class="hold-transition login-page">
    <div class="login-box">
        <div class="login-logo">
            <a href="#"><b>SIM</b> SARI RASA</a>
        </div>
        <div class="card card-emerald card-outline shadow">
            <div class="card-body login-card-body rounded">
                <p class="login-box-msg text-muted">Sistem Manajemen Pupuk Subsidi</p>

                <?php if (session()->getFlashdata('error')): ?>
                    <div class="alert alert-danger text-center text-sm py-2">
                        <i class="fas fa-exclamation-triangle"></i> <?= session()->getFlashdata('error') ?>
                    </div>
                <?php endif; ?>

                <form action="<?= base_url('auth/proses_login') ?>" method="post">
                    <div class="input-group mb-3">
                        <input type="text" name="username" class="form-control" placeholder="Username" required autofocus>
                        <div class="input-group-append">
                            <div class="input-group-text"><span class="fas fa-user"></span></div>
                        </div>
                    </div>
                    <div class="input-group mb-3">
                        <input type="password" name="password" class="form-control" placeholder="Password" required>
                        <div class="input-group-append">
                            <div class="input-group-text"><span class="fas fa-lock"></span></div>
                        </div>
                    </div>
                    <div class="row mt-4">
                        <div class="col-12">
                            <button type="submit" class="btn btn-emerald btn-block"><i class="fas fa-sign-in-alt mr-1"></i> Masuk Sistem</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>

</html>