/* =================================================================== */
/* ESTILO DA PÁGINA DE LOGIN (VERSÃO RESPONSIVA APRIMORADA)            */
/* =================================================================== */

/* --- Reset Básico e Fontes Globais --- */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    overflow: hidden; /* Evita barras de rolagem na visualização principal */
}

/* --- Container Principal (Layout para Desktop: Split-Screen) --- */
.login-page {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* --- Painel de Boas-Vindas (Esquerda em Desktop) --- */
.welcome-panel {
    flex: 1;
    background: linear-gradient(45deg, #0d47a1, #1976d2);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.3s ease-in-out;
}

.welcome-panel .logo {
    width: 90px;
    height: 90px;
    margin-bottom: 25px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.welcome-panel h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.welcome-panel p {
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 400px;
    opacity: 0.9;
    line-height: 1.6;
}

/* --- Painel do Formulário (Direita em Desktop) --- */
.form-panel {
    flex: 1;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-form-container h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

#login-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background-color: #1976d2;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

#login-btn:hover:not(:disabled) {
    background-color: #0d47a1;
    transform: translateY(-2px);
}

#login-btn:disabled {
    background-color: #a0cfff;
    cursor: not-allowed;
    box-shadow: none;
}

/* =================================================================== */
/* LAYOUT RESPONSIVO PARA TELAS PEQUENAS (Celulares)                   */
/* =================================================================== */
@media (max-width: 800px) {
    .login-page {
        flex-direction: column; /* Empilha os painéis verticalmente */
    }

    /* O painel de boas-vindas se torna um cabeçalho compacto e horizontal */
    .welcome-panel {
        flex: 0 0 auto; /* Não cresce, não encolhe, altura baseada no conteúdo */
        flex-direction: row; /* Alinha itens lado a lado */
        justify-content: flex-start; /* Alinha à esquerda */
        gap: 20px;
        padding: 20px;
        text-align: left;
    }

    .welcome-panel .logo {
        width: 45px; /* Logo menor */
        height: 45px;
        margin: 0;
    }
    
    .welcome-panel h2 {
        font-size: 1.5rem; /* Título menor */
        margin: 0;
    }

    /* A descrição é oculta em telas pequenas para economizar espaço */
    .welcome-panel p {
        display: none;
    }

    /* O painel do formulário ocupa o restante do espaço e permite rolagem */
    .form-panel {
        flex: 1 1 auto; /* Permite crescer e encolher */
        align-items: center; /* Centraliza o formulário */
        overflow-y: auto; /* Adiciona barra de rolagem se necessário */
        padding: 40px 20px;
    }
    
    .login-form-container h3 {
        font-size: 1.8rem;
    }
}

/* =================================================================== */
/* ESTILO PARA O BOTÃO DE INSTALAÇÃO DO PWA                            */
/* =================================================================== */

#pwa-install-btn {
    width: 100%;
    margin-top: 15px; /* Espaço entre os botões */
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #1976d2; /* Cor do texto azul */
    
    background-color: #e3f2fd; /* Fundo azul bem claro */
    border: 1px solid #1976d2; /* Borda azul */
    
    border-radius: 8px;
    cursor: pointer;
    
    /* Alinhamento do ícone e texto */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    
    transition: background-color 0.3s, transform 0.1s;
}

#pwa-install-btn:hover {
    background-color: #bbdefb; /* Azul um pouco mais escuro ao passar o mouse */
    transform: translateY(-1px);
}
