@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap");

* {
    box-sizing: border-box;
}

body {
    background-color: #efeafa;
    font-family: "Poppins", sans-serif;
    margin: 0;
    padding: 0;
}

.login-wrapper {
    /* Altura mínima ajustada para garantir espaço para o rodapé */
    min-height: 100vh; 
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: transparent; 
    padding: 20px 10px;
}

/* CONTAINER (Login/Cadastro) */
.container {
    background-color: #fff;
    border-radius: 25px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 500px;
}

h1 {
    font-weight: 700;
    letter-spacing: -1.5px;
    margin: 0;
    margin-bottom: 15px;
}

.titulo {
    color: #39135f;
    text-shadow: 0 0 2px #39135f77;
    font-size: 24px; 
    line-height: 1.2;
}

h1.title {
    font-size: 45px;
    line-height: 45px;
    margin: 0;
    text-shadow: 0 0 10px rgba(159, 157, 161, 0.5);
}

p {
    font-size: 14px;
    font-weight: 100;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
    text-shadow: 0 0 10px rgba(16, 64, 74, 0.5);
}

span {
    font-size: 14px;
    margin-top: 25px;
}

a {
    color: #39135f;
    font-size: 14px;
    text-decoration: none;
    margin: 15px 0;
    transition: 0.3s ease-in-out;
}

a:hover {
    color: #b278d8;
}

.content {
    display: flex;
    width: 100%;
    height: 50px;
    align-items: center;
    justify-content: space-around;
}

.content .checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}

.content input {
    accent-color: #333;
    width: 12px;
    height: 12px;
}

.content label {
    font-size: 14px;
    user-select: none;
    padding-left: 5px;
}

button {
    position: relative;
    border-radius: 20px;
    border: 1px solid #b278d8;
    background-color: #b278d8;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin: 10px;
    padding: 12px 80px;
    letter-spacing: 1px;
    text-transform: capitalize;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

button:hover {
    letter-spacing: 3px;
}

button:active {
    transform: scale(0.95);
}

button:focus {
    outline: none;
}

button.ghost {
    background-color: rgba(225, 225, 225, 0.2);
    border: 2px solid #fff;
    color: #fff; 
}

form {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px 50px;
    height: 100%;
    text-align: center;
}

input {
    background-color: #eee;
    border-radius: 10px;
    border: none;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.login-container { left: 0; width: 50%; z-index: 2; }
.register-container { left: 0; width: 50%; opacity: 0; z-index: 1; }
.container.right-panel-active .login-container { transform: translateX(100%); }
.container.right-panel-active .register-container { transform: translateX(100%); opacity: 1; z-index: 5; animation: show 0.6s; }

@keyframes show {
    0%, 49.99% { opacity: 0; z-index: 1; }
    50%, 100% { opacity: 1; z-index: 5; }
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.right-panel-active .overlay-container { transform: translateX(-100%); }

.overlay {
    background-image: url('background.gif');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 0;
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay::before {
    content:"";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(68, 52, 115, 0.7) 40%,
        rgba(74, 46, 109, 0.25)
    );
}

.container.right-panel-active .overlay { transform: translateX(50%); }

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-panel h1 { text-shadow: 0 0 5px rgba(211, 210, 210, 0.566); }
.overlay-left { transform: translateX(-20%) }
.container.right-panel-active .overlay-left { transform: translateX(0); }
.overlay-right { right: 0; transform: translateX(0); }
.container.right-panel-active .overlay-right { transform: translateX(20%); }

.select-curso {
    background-color: #eee;
    border: none;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    color: #666;
    outline: none;
    cursor: pointer;
    appearance: none; 
    -webkit-appearance: none;
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
}
.select-curso:focus { background-color: #fff; border: 2px solid #a876d7; }

.visitante-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.visitante-container span { font-size: 12px; color: #666; text-transform: uppercase; }
.visitante-link { color: #a876d7; text-decoration: none; font-size: 14px; font-weight: 500; transition: 0.3s; }
.visitante-link:hover { text-decoration: underline; color: #8e5cb3; }

#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90%;
    max-width: 400px;
}

.toast {
    background-color: #fff;
    border-left: 5px solid #d32f2f;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    animation: slideDown 0.5s ease-out forwards;
    transition: all 0.5s ease;
}

.toast.error { background-color: #fff5f5; }
.toast-msg { font-size: 14px; color: #333; font-weight: 500; flex: 1; margin: 0 10px; }
.toast-close { cursor: pointer; font-size: 18px; color: #999; }

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* MARCA ABAIXO DO LOGIN */
.login-branding-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Lato', sans-serif; 
    margin-top: 30px; /* Mais espaço para separar do card */
    margin-bottom: 20px;
}

.brand-logo {
    height: 55px;
    width: 55px;
    border-radius: 50%;
    border: 2px solid #4a3863;
    object-fit: cover;
    margin-right: 15px;
}

.brand-marca {
    font-size: 20px;
    font-weight: 800;
    color: #4a3863;
    line-height: 1.2;
    margin: 0; 
}

/* --- ESTILO PARA LINK MOBILE --- */
.mobile-text {
    display: none; 
    font-size: 13px;
    color: #666;
    margin-top: 15px;
}
.mobile-text a {
    color: #b278d8;
    font-weight: bold;
    cursor: pointer;
}

/* --- RESET CARD (PADRÃO PC) --- */
.reset-card { 
    background-color: #fff; 
    border-radius: 25px; 
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); 
    width: 100%; 
    max-width: 450px; 
    padding: 30px 40px; 
    margin: 30px auto; 
    text-align: center; 
    position: relative; 
    overflow: hidden; 
}
.reset-title { font-family: 'Poppins', sans-serif; font-size: 28px !important; font-weight: 700; color: #39135f; margin-bottom: 10px; line-height: 1.2; }
.reset-description { font-family: 'Poppins', sans-serif; color: #666; font-size: 14px; margin: 0 0 25px 0; text-shadow: none; line-height: 1.5; letter-spacing: 0.5px; }
.reset-input-group { text-align: left; width: 100%; margin-bottom: 20px; }
.reset-input-group label { display: block; font-size: 14px; font-weight: 600; color: #39135f; margin-bottom: 4px; margin-left: 5px; }
.reset-input-group input { width: 100%; background-color: #eee; padding: 10px 14px; font-size: 14px; border-radius: 10px; border: none; margin: 8px 0; font-family: 'Poppins', sans-serif; }
.reset-input-group input:focus { outline: none; box-shadow: 0 0 0 2px #b278d8; }
.reset-card button { background-color: #b278d8; color: #fff; font-size: 14px; font-weight: 700; padding: 12px 45px; letter-spacing: 1px; text-transform: uppercase; transition: transform 80ms ease-in, letter-spacing 0.3s ease-in-out; border-radius: 20px; border: 1px solid #b278d8; width: 100%; cursor: pointer; margin-top: 10px; }
.reset-card button:hover { letter-spacing: 3px; }
.reset-card button:active { transform: scale(0.95); }
.reset-footer { margin-top: 25px; }
.reset-footer a { font-size: 13px; color: #39135f; text-decoration: none; transition: 0.3s; font-weight: 500; }
.reset-footer a:hover { color: #b278d8; }
.alert-info { background-color: #fbf5ff; border: 1px solid #efe4f7; border-radius: 12px; padding: 20px; margin: 25px 0; text-align: left; font-size: 13px; line-height: 1.5; }
.alert-info strong { color: #39135f; font-size: 14px; display: block; margin-bottom: 8px; }
.alert-info ul { margin: 0; padding-left: 20px; color: #666; }
.alert-info li { margin-bottom: 4px; }


/* --- ADAPTAÇÃO MOBILE (LOGIN E RESET) --- */
@media (max-width: 768px) {
    /* LOGIN: Mantém comportamento de bloco */
    .container {
        transform: none; 
        min-width: auto;
        width: 100%;
        max-width: 400px;
        min-height: auto;
        height: auto;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
    }

    .overlay-container { display: none; }

    .form-container {
        position: relative; 
        width: 100%;
        height: auto;
        padding: 30px 20px;
        left: 0;
        opacity: 1;
        transition: none;
    }

    .form-container form { padding: 0; }

    .login-container { display: block; }
    .register-container { display: none; }

    .container.right-panel-active .login-container { display: none; }
    .container.right-panel-active .register-container { 
        display: block; 
        transform: none; 
        opacity: 1; 
        animation: none; 
    }

    .mobile-text { display: block; }

    /* RESET SENHA: A MÁGICA DA PROPORÇÃO */
    /* Em vez de "espremer", diminuímos a escala e mantemos a forma */
    .reset-card {
        width: 380px;       /* Mantém uma largura fixa saudável */
        max-width: 95%;     /* Segurança para telas minúsculas */
        transform: scale(0.9); /* Diminui a proporção visualmente */
        transform-origin: top center; /* Escala a partir do topo */
        margin: 20px auto;
        padding: 30px 30px; /* Mantém padding generoso */
    }

    /* Ajuste do Branding no Mobile */
    .login-branding-footer { 
        flex-direction: column; 
        text-align: center; 
        margin-top: 10px; 
    }
    .brand-logo { margin-right: 0; margin-bottom: 10px; }
}