.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-login {
    display: flex;
    flex-direction: row;
    width: 80%;
    max-width: 900px;
    height: 80%;
    max-height: 620px;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 1;
    border: 8px solid white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.modal.show .modal-login {
    transform: translateX(0);
}

.modal-left {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 10px;
}

.login-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay-text {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: white;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.overlay-text h2 {
    font-size: 46px;
    text-align: left;
    padding: 25px;
    margin: 0;
}

.modal-right {
    flex: 1;
    padding: 40px;
    position: relative;
    color: black;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-color: #fff;
}

.login-form {
    width: 100%;
    text-align: center;
    position: relative;
}

.login-form img.logo {
    max-height: 25px;
    height: auto;
    margin-bottom: 20px;
}

.login-form h2 {
    font-size: 38px;
    margin: 14px 0;
}

.login-form p {
    font-size: 14px;
    margin-bottom: 40px;
    color: #495057;
}

.login-form label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    text-align: left;
}

.modal-right .no-account {
    font-size: 14px;
    color: #343A40;
    position: absolute;
    bottom: 20px;
    /* Ajuste conforme necessário */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0;
    margin-bottom: 20px;
}

.modal-right .no-account a {
    color: #F15F56;
    text-decoration: underline !important;
}

.modal-right .no-account a:hover {
    color: #e04c2a;
    text-decoration: underline !important;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    background-color: #F6F7FA;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
    border-color: #bfbfbf;
    outline: none;
}

.login-form input[type="email"]:focus:invalid {
    border-color: red;
}

.login-form input[type="email"]:focus:valid {
    border-color: green;
}

.login-form input[type="password"] {
    padding-right: 30px !important;
    /* Espaço para o ícone */
    line-height: 1.5 !important;
    /* Ajuste o line-height */
}

.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    width: 100%;
    padding: 10px;
    padding-right: 40px;
    /* Espaço adicional para o ícone */
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #F6F7FA;
    font-size: 14px;
    box-sizing: border-box;
    /* Garante que o padding não afeta o tamanho total */
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 40%;
    /* Reduza para elevar o ícone */
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    height: 100%;
    fill: #5B5B5B;
}

.remember {
    display: flex;
    /* Define o container como um flex container */
    justify-content: space-between;
    /* Empurra o primeiro item para a esquerda e o último para a direita */
    align-items: center;
    /* Alinha os itens verticalmente ao centro */
    margin-bottom: 20px;
    width: 100%;
    /* Garante que o container ocupe toda a largura disponível */
}

.remember label {
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 0 !important;
    /* Certifique-se de que não há margem inferior desnecessária */
    /* Remove o display: block se ele estiver causando quebra de linha indesejada */
    display: inline-block;
    /* Ou simplesmente não defina display, já que é padrão para label */
    flex-shrink: 0;
    /* Impede que o label encolha */
}

.forgot-password {
    /* display: flex; REMOVA ISSO AQUI, NÃO É NECESSÁRIO para o link em si */
    font-size: 14px;
    align-items: center;
    /* Isso é para conteúdo *dentro* do link, se houver ícone, mas não afeta o alinhamento com outros flex items */
    color: inherit;
    text-decoration: none;
    margin: 0;
    /* Remova qualquer margem que possa estar empurrando-o */
    color: #F15F56;
    margin-left: auto;
    /* Isso empurra o link para a direita dentro do flex container */
}

.forgot-password i {
    margin-right: 8px;
}

.forgot-password:hover {
    color: #c0392b;
    text-decoration: underline;
}

.btn-primary {
    font-size: 16px;
    font-weight: 600;
    background-color: #0D6B99 !important;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin: 25px 0 30px 0;
    /* Aumentado margin-bottom para 30px */
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #1374a5 !important;
}

/* Estilos para mensagens */
.login-form .message {
    width: 100%;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-form .error-message {
    color: #d32f2f;
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    border: 1px solid #ffcdd2;
}

.login-form .success-message {
    color: #2e7d32;
    background-color: #e8f5e8;
    border-left: 4px solid #4caf50;
    border: 1px solid #c8e6c9;
}

.remember input[type="checkbox"] {
    /* Mantenha seus estilos existentes para o checkbox */
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #ACB5BD;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    position: relative;
    background-color: white;
    /* Adicione margin-right para separar do label, se desejar */
    margin-right: 5px;
    /* Adicione um pequeno espaço entre o checkbox e o label */
    flex-shrink: 0;
}

.remember input[type="checkbox"]:checked {
    background-color: #0D6B99;
    border-color: #0D6B99;
}

.remember input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    top: 2px;
    left: 5px;
    transform: rotate(45deg);
}

.remember input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.google-login {
    background-color: #fff;
    color: #333;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1;
}

.modal-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(179.16deg, rgba(13, 107, 153, 0.08) 12.38%, rgba(241, 95, 86, 0.8) 86.92%);
    z-index: 1;
}

/* Tablet e Mobile: empilha imagem e formulário */

@media (max-width: 768px) {
    .modal {
        align-items: flex-start !important;
        overflow-y: auto !important;
        padding-top: 24px !important;
        padding-bottom: 24px !important;
    }

    .modal-login {
        flex-direction: column !important;
        width: 85% !important;
        height: auto !important;
        max-width: 380px !important;
        height: auto !important;
        max-height: none !important;
        min-width: unset !important;
        min-height: unset !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }

    .modal-left {
        width: 100% !important;
        height: 150px !important;
        min-height: 140px !important;
        max-height: 220px !important;
        border-radius: 10px 10px 0 0 !important;
        flex: none !important;
        justify-content: flex-end;
    }

    .login-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        border-radius: 10px 10px 0 0 !important;
    }

    .overlay-text {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 0;
    }

    .overlay-text h2 {
        font-size: 1.2rem !important;
        padding: 0;
        text-align: left;
    }

    .modal-right {
        width: 100% !important;
        padding: 24px 12px 12px 12px !important;
        border-radius: 0 0 10px 10px !important;
        min-height: unset !important;
        flex: none !important;
    }

    .login-form h2 {
        font-size: 1.5rem !important;
    }

    .login-form label,
    .login-form input,
    .login-form button {
        font-size: 1rem;
    }

    .remember label,
    .login-form p {
        font-size: 14px !important;
    }

    .login-form p {
        margin-bottom: 20px;
    }

    .btn-primary {
        width: 100%;
        font-size: 1.1rem;
    }

    .no-account {
        font-size: 0.95rem;
    }

    .modal-right .no-account {
        position: static !important;
        left: unset !important;
        bottom: unset !important;
        transform: none !important;
        margin: 16px 0 0 0 !important;
        padding: 0 !important;
        width: 100% !important;
        text-align: center !important;
    }
}

@media (min-width: 769px) and (max-width: 1399px) {
    .modal-right {
        overflow-y: auto !important;
        max-height: 80vh !important;
    }

    .login-form .no-account {
        position: static !important;
        left: unset !important;
        bottom: unset !important;
        transform: none !important;
        margin-top: 24px !important;
        margin-bottom: 0 !important;
        width: 100% !important;
        text-align: center !important;
        padding: 0 !important;
        display: block !important;
    }
}

@media (min-width: 1400px) {
    .login-form .no-account {
        position: static !important;
        left: unset !important;
        bottom: unset !important;
        transform: none !important;
        margin-top: 24px !important;
        margin-bottom: 0 !important;
        width: 100% !important;
        text-align: center !important;
        padding: 0 !important;
        display: block !important;
    }
}