{% load static %}

<!DOCTYPE html>
<html lang="es">
    <head>
        <meta charset="utf-8">

        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        {% block ecom_statics_metas_extra %}{% endblock %}

        <title>
            {% block ecom_statics_browser_title %}
                {% block ecom_statics_left_browser_title %}Login{% endblock %}
                {% block ecom_statics_right_browser_title %} | Ecom Statics{% endblock %}
            {% endblock %}
        </title>

        <link rel="shortcut icon" href="{% block ecom_statics_favicon %}{% static 'ecom_statics/images/favicons/ecom.ico' %}{% endblock %}">

        <link rel="stylesheet" href="{% static 'ecom_statics/css/adminlte_variables.css' %}">
        <link rel="stylesheet" href="{% static 'ecom_statics/css/variables.css' %}">

        {% block ecom_statics_css_base %}
            <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource/source-sans-3@5.0.12/index.css" integrity="sha256-tXJfXfp6Ewt1ilPzLDtQnJV4hclT9XuaZUKyUvmyr+Q=" crossorigin="anonymous" media="print" onload="this.media='all'">

            <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.11.0/styles/overlayscrollbars.min.css" crossorigin="anonymous">

            <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css" crossorigin="anonymous">

            <link rel="stylesheet" href="{% static 'ecom_statics/css/adminlte.css' %}">
        {% endblock %}



        {% block ecom_statics_css_custom %}
            <link rel="stylesheet" href="{% static 'ecom_statics/css/custom_adminlte.css' %}">
            <link rel="stylesheet" href="{% static 'ecom_statics/css/login/login.css' %}">
        {% endblock %}

        {% block ecom_statics_links_extra %}{% endblock %}
    </head>

    <body class="login-page bg-body-secondary">
        <div class="login-box d-flex justify-content-center align-items-center" style="min-height: 100vh;">
            <div class="card shadow-sm border-0" style="max-width: 400px; width: 100%; border-radius: 12px;">
                <div class="card-header bg-white text-center border-0 pt-4">
                    <img src="{% block login_img_logo %}{% static 'ecom_statics/images/logos/ecom-logo.svg' %}{% endblock %}" alt="Logo" style="height: 60px; object-fit: contain;" class="mb-3">

                    <h2 class="fw-bold mb-0">{% block ecom_statics_page_title %}Ecom Statics{% endblock %}</h2>
                    <p class="text-muted mb-0">Inicia sesión para continuar</p>
                </div>

                <div class="card-body p-4">
                    <form method="post">
                        {% csrf_token %}
                        {% include 'ecom_statics/includes/form_errors.html' %}
                        {% block ecom_statics_items_base %}
                        <div class="form-floating mb-3">
                            <input id="loginUsername" name="username" type="text" class="form-control" placeholder="Usuario" required>
                            <label for="loginUsername"><i class="bi bi-person-fill me-2"></i>Nombre de Usuario</label>
                        </div>

                        <div class="form-floating mb-3">
                            <input id="loginPassword" name="password" type="password" class="form-control" placeholder="Contraseña" required>
                            <label for="loginPassword"><i class="bi bi-key-fill me-2"></i>Contraseña</label>
                        </div>
                        {% endblock %}

                        <div class="d-grid mt-3">
                            <button type="submit" class="btn btn-danger btn-lg">
                                <i class="bi bi-box-arrow-in-right me-2"></i>Ingresar
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>


        {% block ecom_statics_js_base %}
            <script src="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.11.0/browser/overlayscrollbars.browser.es6.min.js" crossorigin="anonymous"></script>

            <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js" crossorigin="anonymous"></script>

            <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.min.js" crossorigin="anonymous"></script>

            <script src="{% static 'ecom_statics/js/adminlte.js' %}"></script>
        {% endblock %}

        {% block ecom_statics_scripts_extra %}{% endblock %}
    </body>
</html>