/* Reset básico e configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px; /* Base para REMs */
}

.corpologin {
    font-family: 'Poppins', sans-serif;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px 0;
    line-height: 1.6;

    /* ===== FUNDO DA PÁGINA ===== */
    background-image: url('https://images.unsplash.com/photo-1589922583749-6b8473a85048?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Fixo em desktop */
    /* ===== FIM FUNDO ===== */
    background-color: #f4f7f6; /* Fallback */
}

.login-container {
    display: flex;
    width: 90%;
    max-width: 1200px;
    min-height: 600px;
    background-color: #ffffff; /* Fundo branco essencial para contraste */
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15), 0 6px 6px rgba(0, 0, 0, 0.12);
    border-radius: 16px;
    overflow: hidden;
    opacity: 0;
    animation: fadeInContainer 0.8s ease-out forwards;
}

@keyframes fadeInContainer {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Seção da Imagem / Carrossel --- */
.image-section {
    flex: 1 1 55%;
    position: relative;
    overflow: hidden;
    background-color: #e0e0e0;
    min-height: 600px;
    display: flex;
    border-radius: 16px 0 0 16px;
}

/* ... Estilos do carrossel ... */
.carousel-container { width: 100%; height: 100%; position: relative; }
.carousel-slides { width: 100%; height: 100%; position: relative; }
.carousel-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: opacity 0.9s ease-in-out, visibility 0s 0.9s; z-index: 1; }
.carousel-slide.active { opacity: 1; visibility: visible; z-index: 2; transition: opacity 0.9s ease-in-out, visibility 0s 0s; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-overlay { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 10%, rgba(0, 0, 0, 0)); color: #ffffff; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; padding: 3rem 1.5rem 2rem; opacity: 0; transition: opacity 0.6s ease-out 0.3s; z-index: 3; box-sizing: border-box; }
.carousel-slide.active .image-overlay { opacity: 1; }
.image-overlay h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 0.5rem; font-weight: 600; text-shadow: 2px 2px 4px rgba(0,0,0,0.6); }
.image-overlay p { font-size: clamp(0.9rem, 2.5vw, 1.1rem); font-weight: 300; text-shadow: 1px 1px 3px rgba(0,0,0,0.6); max-width: 90%; }
.carousel-control { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0, 0, 0, 0.3); color: rgba(255, 255, 255, 0.8); border: none; padding: 0.75rem 1rem; font-size: 1.5rem; line-height: 1; cursor: pointer; z-index: 4; border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; transition: background-color 0.3s ease, color 0.3s ease; }
.carousel-control:hover { background-color: rgba(0, 0, 0, 0.6); color: rgba(255, 255, 255, 1); }
.carousel-control.prev { left: 1rem; }
.carousel-control.next { right: 1rem; }
.carousel-indicators { position: absolute; bottom: 1.5rem !important; left: 50%; transform: translateX(-50%); display: flex; gap: 0.75rem; z-index: 4; margin-left: 50% !important;}
.indicator-dot { width: 12px; height: 12px; background-color: rgba(255, 255, 255, 0.4); border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 50%; cursor: pointer; padding: 0; transition: background-color 0.3s ease, transform 0.2s ease; }
.indicator-dot:hover { background-color: rgba(255, 255, 255, 0.7); transform: scale(1.1); }
.indicator-dot.active { background-color: rgba(255, 255, 255, 0.9); transform: scale(1.1); border-color: rgba(255, 255, 255, 1); }


/* --- Seção do Formulário --- */
.form-section {
    flex: 1 1 45%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(2rem, 6vw, 4rem); /* Padding garante espaço interno */
    position: relative;
    /* NENHUM background definido aqui, usará o do .login-container */
    border-radius: 0 16px 16px 0;
}

.form-wrapper {
    width: 100%;
    max-width: 400px;
    text-align: center;
    /* NENHUM background, padding, border-radius ou shadow definido aqui */
}

/* Garante que o Título seja visível */
.form-wrapper h2 {
    margin-bottom: 2rem;
    color: #2c3e50; /* Cor escura deve ser visível no fundo branco */
    font-weight: 600;
    font-size: clamp(1.6rem, 5vw, 2rem);
}

.input-group {
    margin-bottom: 1.5rem;
    /* Esta linha já alinha o conteúdo (label, input) à esquerda dentro do grupo */
    text-align: left;
    position: relative;
}

/* Garante que os Labels sejam visíveis */
.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555; /* Cor escura deve ser visível */
    font-weight: 500;
    font-size: 0.9rem;
}

/* Garante que os Inputs sejam visíveis */
.input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa; /* Fundo cinza claro do input */
    color: #333; /* Cor do texto digitado */
}
.input-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    background-color: #fff; /* Fundo branco ao focar */
}
.input-group input::placeholder {
    color: #aaa; /* Placeholder cinza claro */
}

/* Garante que os Links sejam visíveis */
.forgot-password {
    display: block;
    text-align: right;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #007bff; /* Azul */
    text-decoration: none;
    transition: color 0.3s ease;
}
.forgot-password:hover, .signup-link a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Garante que o Botão seja visível */
.login-button {
    width: 100%;
    padding: 0.9rem 1rem;
    background-color: #28a745; /* Verde */
    color: #ffffff; /* Texto branco */
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 1.5rem;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.2);
}
.login-button:hover { background-color: #218838; transform: translateY(-3px); box-shadow: 0 6px 10px rgba(40, 167, 69, 0.3); }
.login-button:active { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2); }

/* Garante que o texto do link de cadastro seja visível */
.signup-link {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #555; /* Cinza escuro */
}
.signup-link a {
    color: #007bff; /* Azul */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}


/* --- Responsividade --- */

/* Telas pequenas (celulares) */
@media (max-width: 767px) {
    .corpologin {
        align-items: center;
        padding: 1rem 0;
        min-height: calc(100vh - 2rem);
        background-attachment: scroll; /* Melhor para mobile */
    }

    .login-container {
        flex-direction: column;
        width: 95%;
        min-height: auto;
        max-height: calc(100vh - 2rem);
        overflow: auto; /* Permitir rolagem do container */
        height: auto;
        border-radius: 12px;
        margin: 0;
        background-color: #ffffff; /* Garante fundo branco no mobile */
    }

    .image-section {
        display: flex;
        width: 100%;
        height: 250px;
        min-height: 220px;
        flex: none;
        border-radius: 12px 12px 0 0;
    }

    /* ... (Ajustes mobile do carrossel mantidos) ... */
    .image-overlay { padding: 2rem 1rem 1.5rem; justify-content: center; }
    .image-overlay h1 { font-size: 1.3rem; margin-bottom: 0.4rem;}
    .image-overlay p { font-size: 0.8rem; max-width: 95%;}
    .carousel-control { padding: 0.5rem; font-size: 1.2rem; width: 36px; height: 36px; }
    .carousel-control.prev { left: 0.75rem; }
    .carousel-control.next { right: 0.75rem; }
    .carousel-indicators { bottom: 0.5rem; gap: 0.5rem; }
    .indicator-dot { width: 10px; height: 10px; border-width: 1px; }

    .form-section {
        padding: 1.8rem 1.2rem; /* Padding da seção */
        flex-grow: 1;
        display: flex;
        align-items: center; /* Re-centraliza wrapper verticalmente */
        justify-content: center;
        overflow-y: visible; /* Sem rolagem interna */
        width: 100%;
        border-radius: 0 0 12px 12px;
        /* Sem background definido */
    }

    .form-wrapper {
         /* Sem estilos de fundo/padding/borda/sombra */
         width: 100%; /* Ocupa espaço do padding da section */
         max-width: 400px; /* Limita largura */
    }

    /* ... (Ajustes mobile de fonte/espaçamento do form mantidos) ... */
    .form-wrapper h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
    .input-group { margin-bottom: 1.2rem; }
    .input-group label { font-size: 0.85rem; }
    .input-group input { padding: 0.7rem 0.9rem; font-size: 0.95rem; }
    .forgot-password { font-size: 0.8rem; margin-top: 0.5rem; }
    .login-button { padding: 0.8rem; font-size: 1rem; margin-top: 1.2rem; }
    .signup-link { margin-top: 1.5rem; font-size: 0.85rem;}
}

/* Telas médias (tablets) */
@media (min-width: 768px) and (max-width: 1024px) {
    .image-section { flex-basis: 50%; }
    .form-section {
        flex-basis: 50%;
        padding: 2.5rem;
        align-items: center;
    }
    .form-wrapper {
         /* Sem estilos extras */
         width: 100%;
    }
    .image-overlay h1 { font-size: 1.8rem; }
    .image-overlay p { font-size: 1rem; }
}

/* Telas grandes (desktop) */
@media (min-width: 768px) {
    .login-container {
        flex-direction: row;
        min-height: 600px;
        max-height: 650px;
    }
    .image-section {
        min-height: 600px;
        height: auto;
        border-radius: 16px 0 0 16px;
    }
    .form-section{
         overflow-y: hidden;
         border-radius: 0 16px 16px 0;
         align-items: center;
         padding: clamp(2rem, 6vw, 4rem);
    }
    .form-wrapper {
        margin: 0;
        width: 100%;
        /* Sem estilos extras */
    }
}

/* --- Estilos para o Toggle de Senha --- */

/* Wrapper que contém o input e o botão */
.password-wrapper {
    position: relative; /* Necessário para posicionar o botão absolutamente */
    width: 100%; /* Garante que ocupe a largura do input-group */
}

/* Ajusta o padding direito do input para não sobrepor o ícone
   Aplicamos a ambos os tipos (password e text) que o input pode ter */
.input-group .password-wrapper input[type="password"],
.input-group .password-wrapper input[type="text"] {
    padding-right: 50px; /* Aumenta o padding direito. Ajuste o valor se necessário. */
     /* O !important pode ser necessário se outra regra estiver sobrescrevendo o padding */
     /* padding-right: 50px !important; */
}

/* Estilo e posicionamento do botão de toggle */
.toggle-password {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0; /* Faz ocupar toda a altura */
    margin: auto 0; /* Centraliza verticalmente junto com top/bottom/height */
    height: 100%; /* Ocupa a altura do wrapper */
    background: none; /* Sem fundo */
    border: none; /* Sem borda */
    padding: 0 15px; /* Padding horizontal para área de clique e espaço da borda do input */
    cursor: pointer;
    color: #888; /* Cor do ícone SVG */
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none; /* Remove outline padrão ao clicar */
}

/* Efeito hover opcional */
.toggle-password:hover {
    color: #555;
}

/* Estilo base para os ícones SVG dentro do botão */
 /* .toggle-password svg.icon {

     width: 20px; 
     height: 20px; 
}  */