<?php include 'includes/header.php'; ?>

<div class="container" style="display: flex; align-items: center; justify-content: center; min-height: 80vh;">
    <div class="card" style="width: 100%; max-width: 400px; border-top: 8px solid var(--primary);">
        <div style="text-align: center; margin-bottom: 2rem;">
            <h2 style="font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem;">Selamat Datang</h2>
            <p style="color: #6b7280;">Silakan masuk ke sistem ERP</p>
        </div>
        
        <form action="api/auth.php" method="POST">
            <div class="input-group">
                <label>Username</label>
                <input type="text" name="username" placeholder="Masukkan username" required>
            </div>
            
            <div class="input-group">
                <label>Password</label>
                <input type="password" name="password" placeholder="Masukkan password" required>
            </div>
            
            <button type="submit" class="btn-primary">
                MASUK SEKARANG
            </button>
        </form>

        <?php if (isset($_GET['error'])): ?>
            <p style="color: var(--accent); text-align: center; margin-top: 1rem; font-weight: bold;">
                Username atau Password Salah!
            </p>
        <?php endif; ?>
    </div>
</div>

</body>
</html>