{% extends "admin/layout.html" %}

{% block title %}Login{% endblock %}

{% block body %}
<div style="min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);">
    <div class="card" style="width: 100%; max-width: 400px;">
        <h2 style="text-align: center; margin-bottom: 30px;">KuiperForge Admin</h2>

        {% if let Some(err) = error %}
        <div class="alert alert-danger">{{ err }}</div>
        {% endif %}

        <form method="post" action="/admin/login">
            <div style="margin-bottom: 20px;">
                <label for="username" style="display: block; margin-bottom: 5px; font-weight: 500;">Username</label>
                <input type="text" id="username" name="username" required autofocus
                    style="width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 1em;">
            </div>

            <div style="margin-bottom: 20px;">
                <label for="password" style="display: block; margin-bottom: 5px; font-weight: 500;">Password</label>
                <input type="password" id="password" name="password" required
                    style="width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 1em;">
            </div>

            <button type="submit" class="btn btn-primary" style="width: 100%; padding: 12px; font-size: 1em;">
                Sign In
            </button>
        </form>
    </div>
</div>
{% endblock %}
