<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login SIKAD - Universitas Teknologi Gemilang</title>
    <!-- CSS Terpusat -->
    <link rel="stylesheet" href="<?= base_url('assets/css/style.css') ?>">
</head>
<body class="login-body">

    <!-- Kiri: Gambar Background -->
    <div class="login-hero">
        <div class="hero-content">
            <div class="glass-badge">Portal SIKAD v4.7</div>
            <h1 class="hero-title">Wujudkan Generasi Emas Masa Depan.</h1>
            <p class="hero-subtitle">Sistem Informasi Akademik Terpadu (SIKAD) memudahkan seluruh civitas akademika dalam mengelola dan memantau kegiatan perkuliahan secara real-time dan terintegrasi.</p>
        </div>
    </div>

    <!-- Kanan: Form Login -->
    <div class="login-panel">
        <div class="login-form-container">
            
            <div class="brand">
                <!-- Logo Kampus (SVG Toga) -->
                <div class="brand-logo">
                    <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                        <path d="M12 3L1 9L12 15L21 10.09V17H23V9M5 13.18V17.18L12 21L19 17.18V13.18L12 17L5 13.18Z"/>
                    </svg>
                </div>
                <div class="brand-text">
                    <h1>Univ. Teknologi Gemilang</h1>
                    <p>Silakan masuk menggunakan akun Anda</p>
                </div>
            </div>

            <?php if(session()->getFlashdata('error')): ?>
                <div class="alert alert-error">
                    <?= session()->getFlashdata('error') ?>
                </div>
            <?php endif; ?>

            <form action="<?= base_url('login') ?>" method="POST">
                <div class="form-group">
                    <label for="username">Username</label>
                    <input type="text" id="username" name="username" class="form-input" placeholder="Masukkan Username pengguna" required autocomplete="off">
                </div>

                <div class="form-group">
                    <label for="password">Kata Sandi</label>
                    <input type="password" id="password" name="password" class="form-input" placeholder="Masukkan kata sandi" required>
                </div>

                <button type="submit" class="btn-primary">Masuk ke SIKAD</button>
            </form>
            
            <div style="text-align: center; margin-top: 2rem; color: #94a3b8; font-size: 0.85rem;">
                &copy; 2026 Universitas Teknologi Gemilang.<br> Hak Cipta Dilindungi.
            </div>
            
        </div>
    </div>

</body>
</html>
