<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login - Sarpras App</title>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="<?= base_url('css/style.css') ?>">
</head>
<body class="login-body">

    <div class="login-card">
        <div class="login-logo">
            <i class="fas fa-school"></i>
        </div>
        <h2>Sistem Informasi<br>Sarana Prasarana<br>MI Muhammadiyah 27</h2>
        
        <?php if(session()->getFlashdata('msg')): ?>
            <div style="color: var(--danger); margin-bottom: 15px; font-weight: 500;">
                <?= session()->getFlashdata('msg') ?>
            </div>
        <?php endif; ?>

        <form action="<?= base_url('auth/login') ?>" method="post">
            <div class="form-group" style="text-align: left;">
                <label class="form-label">Username</label>
                <input type="text" name="username" class="form-control" required placeholder="Masukkan username">
            </div>
            <div class="form-group" style="text-align: left;">
                <label class="form-label">Password</label>
                <input type="password" name="password" class="form-control" required placeholder="Masukkan password">
            </div>
            <button type="submit" class="btn btn-primary" style="width: 100%; justify-content: center; padding: 12px; font-size: 16px; margin-top: 10px;">
                <i class="fas fa-sign-in-alt"></i> Login
            </button>
        </form>
        
        <div style="margin-top: 20px; font-size: 14px; color: var(--gray);">
            Gunakan username: <b>admin</b> password: <b>admin123</b><br>
            atau username: <b>user</b> password: <b>user123</b>
        </div>
    </div>

</body>
</html>
