.overlay_modal{
    position: fixed;

    inset: 0;

    background: rgba(0,0,0,.45);

    backdrop-filter: blur(4px);

    display: none;

    align-items: center;

    justify-content: center;

    z-index: 9999;

    padding: 20px;
}

.overlay_modal.ativo{
    display: flex;
}

.janela_modal{
    width: 100%;

    max-width: 420px;

    background: #FFF8F5;

    border-radius: 20px;

    padding: 30px;

    position: relative;

    box-shadow:
        0 20px 60px rgba(0,0,0,.18);

    animation: modalEntrada .25s ease;
}

@keyframes modalEntrada{

    from{
        opacity: 0;

        transform:
            translateY(15px)
            scale(.96);
    }

    to{
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}

#fechar_modal{
    width: 45px;
    height: 45px;
    position: absolute;
    background: linear-gradient(145deg, #7BC47F, #4E9B57);
    border: 4px solid white;
    border-radius: 50%;
    top: -18px;
    right: -18px;
    cursor: pointer;
    box-shadow:
        0 10px 30px rgba(0,0,0,0.68);
    transition: 0.3s;
    z-index: 1000;
}

#fechar_modal::before,
#fechar_modal::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: white;
    border-radius: 2px;
}

#fechar_modal::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

#fechar_modal::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#fechar_modal:hover{
    transform:
        scale(1.04);
}

.modal_login,
.modal_cadastro_email{
    display: none;
}

.modal_login.ativo,
.modal_cadastro_email.ativo{
    display: block;
}

.janela_modal form{
    display: flex;

    flex-direction: column;

    gap: 12px;
}

/* Campos e botões DENTRO do form — não afeta o #fechar_modal */
.janela_modal form button,
.janela_modal form input {
    height: 45px;

    border-radius: 10px;

    border: 1px solid #DDD;

    padding: 0 14px;

    background: white;
}

/* Botões de ação (submit / cadastrar) */
.janela_modal form button,
.janela_modal form input[type="submit"] {
    background: #5a5929;

    color: white;

    border: none;

    font-weight: bold;

    cursor: pointer;

    margin-top: 10px;
}

.janela_modal form button:hover,
.janela_modal form input:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {

    .overlay_modal {
        align-items: flex-start;
    }

    .janela_modal {
        margin-top: 50px;   /* distância do topo — ajuste ao gosto */
    }

}

@media (max-width: 480px) {
    .modal_login_wrapper {
        padding: 16px;
        max-width: 100%;
    }
}