<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}{{ app_name }}{% endblock %} — {{ app_subtitle }}</title>
    
    <!-- Favicon Oficial VoxManu -->
    <link rel="icon" type="image/jpeg" href="{{ url_for('static', filename='img/voxmanu_logo.jpg') }}">
    
    <!-- Google Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
    
    <!-- CSS Theme -->
    <link rel="stylesheet" href="{{ url_for('static', filename='css/theme.css') }}">
    
    <style>
        body {
            background: linear-gradient(135deg, #0F2A4A 0%, #123B6D 50%, #1A4D8C 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Inter', sans-serif;
            margin: 0;
            padding: 1.5rem;
        }
        .auth-container {
            width: 100%;
            max-width: 440px;
            margin: 0 auto;
        }
        .auth-card {
            background: #FFFFFF;
            padding: 2.5rem 2rem;
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        .flash-messages-auth {
            margin-bottom: 1.25rem;
        }
        .alert-danger {
            background-color: #FEE2E2;
            border: 1px solid #FCA5A5;
            color: #991B1B;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            font-size: 0.88rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
        }
        .alert-success {
            background-color: #D1FAE5;
            border: 1px solid #6EE7B7;
            color: #065F46;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            font-size: 0.88rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
        }
        .alert-warning {
            background-color: #FEF3C7;
            border: 1px solid #FDE68A;
            color: #92400E;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            font-size: 0.88rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
        }
        .alert-info {
            background-color: #E0F2FE;
            border: 1px solid #BAE6FD;
            color: #075985;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            font-size: 0.88rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
        }
    </style>
    {% block extra_head %}{% endblock %}
</head>
<body>
    <div class="auth-container">
        <!-- Flash Messages Exclusivas de Autenticação -->
        {% with messages = get_flashed_messages(with_categories=true) %}
            {% if messages %}
                <div class="flash-messages-auth">
                    {% for category, message in messages %}
                        <div class="alert alert-{{ category }}">
                            {{ message }}
                        </div>
                    {% endfor %}
                </div>
            {% endif %}
        {% endwith %}

        <div class="auth-card">
            {% block content %}{% endblock %}
        </div>
        
        <div style="text-align: center; margin-top: 1.5rem; color: rgba(255, 255, 255, 0.7); font-size: 0.8rem;">
            &copy; 2026 VoxManu — Todos os direitos reservados.
        </div>
    </div>

    <!-- Script de Máscaras Automáticas -->
    <script src="{{ url_for('static', filename='js/masks.js') }}"></script>
</body>
</html>
