<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<title>Login Petugas | Perpustakaan MAN 2 Sleman</title>

<style>
*{
    box-sizing:border-box;
    font-family:Segoe UI, sans-serif;
}

body{
    margin:0;
    height:100vh;
    background:url("<?= base_url('assets/img/bg.jpeg') ?>") no-repeat center center;
    background-size:cover;
    display:flex;
    justify-content:center;
    align-items:center;
}

.login-box{
    background:rgba(255,255,255,0.95);
    backdrop-filter: blur(5px);
    width:350px;
    padding:30px;
    border-radius:12px;
    box-shadow:0 10px 25px rgba(0,0,0,.2);
}

.login-box h2{
    text-align:center;
    margin-bottom:20px;
}

.login-box input{
    width:100%;
    padding:10px;
    margin-bottom:15px;
    border:1px solid #ccc;
    border-radius:6px;
}

.login-box button{
    width:100%;
    padding:10px;
    background:#1976d2;
    color:white;
    border:none;
    border-radius:6px;
    font-size:16px;
    cursor:pointer;
}

.login-box button:hover{
    background:#0d47a1;
}

.error{
    background:#ffebee;
    color:#c62828;
    padding:8px;
    border-radius:6px;
    margin-bottom:10px;
    text-align:center;
}

.footer{
    text-align:center;
    margin-top:15px;
    font-size:12px;
    color:#777;
}
</style>

</head>
<body>

<div class="login-box">

<h2>📚 Login Perpustakaan<br>MAN 2 Sleman</h2>

<?php if($this->session->flashdata('error')): ?>
<div class="error">
<?= $this->session->flashdata('error') ?>
</div>
<?php endif ?>

<form method="post" action="<?= site_url('login/proses') ?>">

<input name="username" placeholder="Username" required>

<input type="password" name="password" placeholder="Password" required>

<button type="submit">Masuk</button>

</form>

<div class="footer">
© <?= date('Y') ?> MAN 2 Sleman
</div>

</div>

</body>
</html>
