/* =========================================================
   RESET E CONFIGURAÇÕES GERAIS
   ========================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* =========================================================
   CONTAINER DO LOGIN E LOGO
   ========================================================= */
.box-login {
    background-color: #fff;
    padding: 40px 30px; 
    border-radius: 10px; 
    box-shadow: 0 8px 16px rgba(0,0,0,0.15); 
    width: 100%;
    max-width: 400px; 
    text-align: center;
}

.logo-login {
    width: 120px;
    height: 120px;
    display: block; 
    margin: 0 auto 30px auto; 
    object-fit: contain; /* Garante que a logo não distorça */
}

.box-login h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600; 
}

/* =========================================================
   CAMPOS DE TEXTO E SENHA
   ========================================================= */
.box-login input[type="text"],
.box-login input[type="password"] {
    width: 100%; /* Agora funciona perfeitamente graças ao box-sizing global */
    padding: 14px 10px;
    margin-bottom: 18px; 
    border: 1px solid #ccd; /* Tom de cinza um pouco mais suave */
    border-radius: 7px; 
    font-size: 17px;
    transition: all 0.3s ease;
}

.box-login input[type="text"]:focus,
.box-login input[type="password"]:focus {
    border-color: #007bff; 
    outline: none; 
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); 
}

.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* =========================================================
   CHECKBOX (LEMBRAR-ME) E BOTÃO DE LOGIN
   ========================================================= */
/* Reorganiza a estrutura das divs left/right do HTML */
.form-group-login {
    display: flex;
    align-items: center;
    width: 100%;
}

.form-group-login.right {
    justify-content: center; /* Centraliza o lembrar-me */
    margin-bottom: 20px; /* Dá um espaço antes do botão logar */
    flex-direction: row-reverse; /* Coloca o checkbox antes do texto */
}

.form-group-login label {
    margin-left: 8px; /* Ajuste devido ao row-reverse */
    color: #555;
    font-size: 15px;
    cursor: pointer; 
}

.form-group-login input[type="checkbox"] {
    transform: scale(1.2); 
    cursor: pointer;
}

.form-group-login.left {
    margin-bottom: 0;
}

.box-login input[type="submit"] {
    background-color: #007bff;
    color: #fff;
    padding: 14px 25px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%; 
}

.box-login input[type="submit"]:hover {
    background-color: #0056b3;
    transform: translateY(-2px); 
}

.clear {
    display: none; /* Esconde a div de clear antiga, não precisamos mais dela! */
}

/* =========================================================
   MENSAGENS DE ERRO E RESPONSIVIDADE
   ========================================================= */
.erro-box {
    background-color: #f8d7da; 
    color: #721c24; 
    padding: 12px 15px;
    border: 1px solid #f5c6cb; 
    border-radius: 7px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 15px;
    display: flex; 
    align-items: center;
    animation: fadeIn 0.4s ease-in-out; /* Uma animaçãozinha pro erro aparecer suave */
}

.erro-box i {
    margin-right: 10px;
    font-size: 18px; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .box-login {
        padding: 30px 20px;
    }
    .box-login h2 {
        font-size: 24px;
    }
    .box-login input[type="text"],
    .box-login input[type="password"],
    .box-login input[type="submit"] {
        font-size: 16px;
        padding: 12px 10px;
    }
}