{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Admin Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Admin login page for the dashboard">
    <meta name="author" content="Techzaa">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <link rel="shortcut icon" href="{% static 'assets/images/favicon.ico' %}">
    <link href="{% static 'assets/css/vendor.min.css' %}" rel="stylesheet">
    <link href="{% static 'assets/css/icons.min.css' %}" rel="stylesheet">
    <link href="{% static 'assets/css/app.min.css' %}" rel="stylesheet">

    <script src="{% static 'assets/js/config.min.js' %}"></script>
</head>
<body class="authentication-bg">
    <div class="account-pages pt-2 pt-sm-5 pb-4 pb-sm-5">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-xl-5">
                    <div class="card auth-card">
                        <div class="card-body px-3 py-5">
                            <h2 class="fw-bold text-uppercase text-center fs-18">Admin Login</h2>
                            <p class="text-muted text-center mt-1 mb-4">Enter your username & password to access the admin panel.</p>

                            <!-- Display Messages -->
                            {% if messages %}
                                <div class="alert alert-danger">
                                    {% for message in messages %}
                                        {{ message }}
                                    {% endfor %}
                                </div>
                            {% endif %}

                            <div class="px-4">
                                <form method="post" action="{% url 'admin_login' %}">
                                    {% csrf_token %}
                                    <div class="mb-3">
                                        <label class="form-label" for="username">Username</label>
                                        <input type="text" id="username" name="username" class="form-control bg-light bg-opacity-50 border-light py-2" placeholder="Enter your username" required>
                                    </div>
                                    <div class="mb-3">
                                        <label class="form-label" for="password">Password</label>
                                        <input type="password" id="password" name="password" class="form-control bg-light bg-opacity-50 border-light py-2" placeholder="Enter your password" required>
                                    </div>
                                    <div class="mb-1 text-center d-grid">
                                        <button class="btn btn-danger py-2 fw-medium" type="submit">Sign In</button>
                                    </div>
                                </form>
                            </div> 
                        </div> 
                    </div> 
                </div> 
            </div> 
        </div>
    </div>

    <script src="{% static 'assets/js/vendor.js' %}"></script>
    <script src="{% static 'assets/js/app.js' %}"></script>
</body>

</html>
