<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login - Dialog Kinerja ASN</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
    <style>
        body {
            background-color: #d6f0fb;
            font-family: 'Roboto', sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
        }
        .login-card {
            width: 100%;
            max-width: 500px;
            border-radius: 15px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }
        .card-header {
            background-color: #003a8c;
            color: white;
            text-align: center;
            padding: 2rem 1rem;
        }
        .card-header img {
            width: 100px;
            height: auto;
            margin-bottom: 1rem;
        }
        .card-body {
            padding: 2rem;
        }
        .form-control {
            border-radius: 8px;
            border: 1px solid #ddd;
            padding: 0.75rem 1rem;
            font-size: 1rem;
        }
        .btn-login {
            background-color: #003a8c;
            color: white;
            border: none;
            border-radius: 8px;
            padding: 0.75rem 1rem;
            font-size: 1rem;
            font-weight: 500;
            width: 100%;
            transition: background-color 0.3s ease;
        }
        .btn-login:hover {
            background-color: #002a6b;
        }
        .text-center a {
            color: #003a8c;
            text-decoration: none;
            font-size: 0.9rem;
        }
        .text-center a:hover {
            text-decoration: underline;
        }
        .footer-text {
            font-size: 0.85rem;
            color: #666;
            text-align: center;
            margin-top: 1rem;
        }
    </style>
</head>
<body>
    <div class="login-card">
        <div class="card-header">
            <img src="<?= base_url('assets/img/logo_kota_tangerang.png') ?>" alt="Logo Kota Tangerang">
            <h4 class="mb-0">SIDIK KOTA TANGERANG</h4>
            <p class="mb-0" style="font-size: 0.9rem;">Sistem Informasi Dialog Kinerja</p>
            <p class="mb-0" style="font-size: 0.9rem;">Kota Tangerang</p>
        </div>
        <div class="card-body">
            <?php if ($this->session->flashdata('error')): ?>
                <div class="alert alert-danger"><?= $this->session->flashdata('error') ?></div>
            <?php endif; ?>

            <form method="post" action="<?= base_url('auth/login') ?>">
                <div class="mb-3">
                    <label for="username" class="form-label">Username</label>
                    <input type="text" name="username" id="username" class="form-control" placeholder="Masukkan NIP Anda" required>
                </div>
                <div class="mb-3">
                    <label for="password" class="form-label">Password</label>
                    <input type="password" name="password" id="password" class="form-control" placeholder="Masukkan password" required>
                </div>
                <button type="submit" class="btn btn-login">Login</button>
            </form>

            <div class="mt-3 footer-text">
                Gunakan NIP sebagai password saat pertama kali login.
            </div>
            <div class="text-center mt-2">
                <a href="#">Lupa Password?</a>
            </div>
        </div>
    </div>
</body>
</html>