<!DOCTYPE html>
<html lang="{{ get_admin_language() }}">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ t('login.title') }} - AliothPress</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/admin.css') }}">
</head>
<body class="auth-page">
    <div class="auth-card">
        <h1><img src="{{ url_for('static', filename='img/admin-star.png') }}" alt="" width="32" height="32" class="sidebar-brand-icon"> AliothPress</h1>
        <p class="auth-subtitle">{{ t('login.title') }}</p>
        
        {% with messages = get_flashed_messages(with_categories=true) %}
            {% if messages %}
                {% for category, message in messages %}
                    <div class="alert alert-{{ category }}">{{ message }}</div>
                {% endfor %}
            {% endif %}
        {% endwith %}
        
        <form method="POST">
            <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
            <div class="form-group">
                <label for="username">{{ t('login.username') }}</label>
                <input type="text" id="username" name="username" required autocomplete="username">
            </div>
            
            <div class="form-group">
                <label for="password">{{ t('login.password') }}</label>
                <input type="password" id="password" name="password" required autocomplete="current-password">
            </div>
            
            <button type="submit">{{ t('login.login_btn') }}</button>
        </form>
        
        <div class="auth-link">
            <a href="{{ url_for('admin_forgot_password') }}">{{ t('login.forgot_password') }}</a>
        </div>
        
        <div class="auth-link">
            <a href="{{ url_for('index') }}">{{ t('login.back_to_site') }}</a>
        </div>
    </div>
</body>
</html>
