/* /css/login.css */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

:root {
    --primary-color: #008000;
    --dark-grey: #333;
    --light-grey-bg: #f4f7f6;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; }

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-grey-bg);
}

.login-main-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ## CÓDIGO CORRIGIDO AQUI ## */
.login-image-section {
    flex: 1;
    /* Sua imagem de fundo foi restaurada */
    background-image: linear-gradient(rgba(0, 128, 0, 0.7), rgba(0, 68, 0, 0.9)), url(https://habitacao.mhos.com.br/logo/morrinhos.jpg);
    background-size: cover;
    background-position: center;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.login-image-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.login-image-section p {
    font-size: 1.1rem;
    max-width: 400px;
    line-height: 0.6;
}

.login-form-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.login-container {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 580px;
    text-align: center;
}

.login-logo {
    max-width: 500px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

.login-container h2 {
    margin-bottom: 2rem;
    color: var(--dark-grey);
    font-weight: 600;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    transition: color 0.3s;
}

.form-control {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 128, 0, 0.1);
}

.form-control:focus + i {
    color: var(--primary-color);
}

.btn-login {
    width: 100%;
    max-width: 300px; /* Mantém o botão com um tamanho bom */
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-login:hover {
    background-color: #006400;
    transform: translateY(-2px);
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
}

@media (max-width: 992px) {
    .login-main-container {
        flex-direction: column;
    }
    .login-image-section {
        min-height: 250px;
        flex: auto;
    }
    .login-form-section {
        padding: 1.5rem;
    }
    .login-container {
        max-width: 420px;
    }
    .login-logo {
        max-width: 100%;
    }
}