/* styles.css */
:root {
    --bg: #e3f2fd;
    --card: #ffffff;
    --text: #1f2937;
    --accent: #1976d2;
    --muted: #6b7280;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;
    font-family: Inter, system-ui, sans-serif;
    background: #EEF1F4;
    color: var(--text);
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    align-items: center;
    overflow: hidden; /* Evita scrolls indesejados na tela de login inteira */
}

.image {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#logo {
    width: clamp(140px, 15vw, 200px);
    height: auto;
    margin-right: 15px;
    margin-bottom: clamp(10px, 2vh, 25px);
}

.left {
    width: 100%;
    height: 100vh; /* Garante que a metade esquerda ocupe toda a altura da tela */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url('../img/background1.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    padding: clamp(20px, 4vh, 48px);
}

.news {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Removemos o background-color e o tamanho fixo de 90% */
    max-width: 90%;
    max-height: 90%;
    border-radius: 20px;
    overflow: hidden;
    /* Se você quiser manter a sombra ao redor da imagem, pode colocar o box-shadow aqui: */
    /* box-shadow: 0 10px 30px rgba(0,0,0,0.1); */
}

.news img {
    display: block;
    /* Faz a imagem ser responsiva sem forçar esticar além do seu tamanho real */
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; 
    border-radius: 20px;
}

.right {
    width: 100%;
    height: 100vh; /* Garante alinhamento vertical perfeito */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: clamp(20px, 4vh, 48px);
}

.formulario {
    width: min(100%, 430px);
    /* Ajustado para não estourar telas de baixa altura */
    height: auto; 
    max-height: 90vh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.form-container {
    width: 100%;
    background: var(--card);
    border-radius: 24px;
    box-shadow: 0 15px 80px rgba(0, 0, 0, 0.25);
    padding: clamp(20px, 3.5vh, 35px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-container h1 {
    margin: 0 0 clamp(10px, 2.5vh, 20px);
    text-align: left;
    color: #050822d2;
    font-size: clamp(1.5rem, 2.5vh, 2rem);
}

.form-container form {
    display: grid;
    gap: clamp(6px, 1.2vh, 14px);
}

.form-container label {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text);
}

.form-container input {
    width: 100%;
    padding: clamp(10px, 1.4vh, 15px);
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: clamp(0.9rem, 1vw, 1rem);
    color: var(--text);
    background: #f8fafc;
}

.form-container input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.12);
}

.btn-acessar {
    display: block;
    width: 100%;
    padding: clamp(10px, 1.4vh, 15px);
    margin-top: clamp(12px, 1.8vh, 28px);
    border: none;
    border-radius: 12px;
    background: #FFED29;
    color: rgba(0, 0, 0, 0.534);
    font-size: clamp(0.9rem, 1vw, 1rem);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn-acessar:hover {
    transform: translateY(-1px);
    background: #ffed29b4;
}

.btn-acessar:active {
    transform: translateY(0);
}

.error-container {
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.msg-erro {
    margin: 0;
    width: fit-content;
    padding: 5px 13px;
    background: #ffdfdf;
    border-radius: 99px;
    color: #b91c1c;
    font-size: 0.88rem;
    font-weight: 500;
}

.forgot-password {
    display: block;
    margin-left: auto;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    white-space: nowrap;
}

.forgot-password:hover {
    text-decoration: underline;
}

::placeholder {
    color: var(--muted);
}

/* MEDIA QUERIES CORRIGIDAS */
@media (max-width: 1100px) {
    body {
        grid-template-columns: 1fr;
        gap: 40px;
        overflow: auto; /* Permite scroll apenas em telas mobile/pequenas se necessário */
    }
    .left {
        width: 100%;
        height: auto;
        padding-top: 70px;
        padding-bottom: 70px;
    }
    .left .news {
        height: clamp(300px, 40vh, 500px);
    }
    .right {
        height: auto;
        padding: 32px;
        padding-bottom: 100px;
    }
}

@media (max-width: 768px) {
    body {
        gap: 0px;
    }

    .left {
        display: none;
    }

    .right {
        padding: 20px;
        justify-content: flex-start;
    }

    .form-container {
        padding: 25px;
        border-radius: 16px;
    }
}