/* authstyles.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    overflow: hidden; /* Impede a barra de rolagem durante a animação */
    background: #E6F0F9; /* AZUL BEM CLARINHO BASE */
}

/* =======================================
   FORMAS GEOMÉTRICAS DE FUNDO
   ======================================= */
.bg-shapes {
    position: absolute;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none; /* Para não atrapalhar os cliques */
}

.shape {
    position: absolute;
    background: #D3E2F2; /* Um azul um pouco mais escuro que o fundo */
    border-radius: 25%;
    animation: rotateShape linear infinite;
    opacity: 0.7;
}

/* Tamanhos, posições e tempos de rotação variados */
.shape-1 { width: 450px; height: 450px; top: -100px; left: -100px; animation-duration: 45s; }
.shape-2 { width: 600px; height: 600px; bottom: -150px; right: 15%; animation-duration: 60s; animation-direction: reverse; border-radius: 35%; }
.shape-3 { width: 250px; height: 250px; top: 40%; left: 35%; animation-duration: 30s; border-radius: 40%; }
.shape-4 { width: 180px; height: 180px; top: 15%; right: 25%; animation-duration: 25s; border-radius: 20%; }
.shape-5 { width: 500px; height: 500px; top: -200px; right: -150px; animation-duration: 50s; }
.shape-6 { width: 300px; height: 300px; bottom: 10%; left: 10%; animation-duration: 40s; animation-direction: reverse; }

@keyframes rotateShape {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* O Container que segura a tela toda */
.page-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* =======================================
   PAINEL LATERAL (Imagem e Decoração)
   ======================================= */
.panel-extra {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100vw - 28em); /* Ocupa tudo menos o espaço do formulário */
    height: 100vh;
    background: transparent; /* Fica transparente para mostrar as formas do body */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.content-extra {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3em;
    z-index: 2;
}

.text-content h2 {
    font-size: 2.4em;
    color: #1E3F66;
    font-weight: 800;
    line-height: 1.2em;
    max-width: 18em;
    margin: 0 auto 0.3em auto;
}

.login-subtitle {
    font-size: 1.1em;
    color: #4C6A8B;
    max-width: 25em;
    font-weight: 400;
    margin: 0 auto;
}

/* Estrutura dedicada da imagem */
.image-showcase {
    position: relative;
    display: inline-block;
}

#imgLoginExtra {
    max-width: 26em;
    height: auto;
    border-radius: 1em;
    box-shadow: 0 1.5em 3em rgba(30, 63, 102, 0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#imgLoginExtra:hover {
    transform: translateY(-0.8em) scale(1.02);
}

/* Microanimações: Badges Flutuantes */
.floating-badge {
    position: absolute;
    background: white;
    padding: 0.7em 1.2em;
    border-radius: 2em;
    box-shadow: 0 0.8em 1.5em rgba(0, 0, 0, 0.08);
    color: #0447AC;
    font-weight: 600;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 0.5em;
    animation: floatBadge 4s ease-in-out infinite;
    pointer-events: none;
}

.badge-left {
    top: 15%;
    left: -10%;
    animation-delay: 0s;
}

.badge-right {
    bottom: 20%;
    right: -10%;
    animation-delay: 2s; /* Atrasa para flutuarem de forma alternada */
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* =======================================
   PAINEL DE FORMULÁRIOS (Branco)
   ======================================= */
.panel-form {
    position: absolute;
    top: 0;
    right: 0;
    width: 28em;
    height: 100vh;
    background: white;
    z-index: 2;
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), box-shadow 0.8s ease;
}

/* Estrutura interna dos formulários */
.form-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2em;
    box-sizing: border-box;
    transition: all 0.6s ease-in-out;
}

.form-login { opacity: 1; visibility: visible; transform: translateX(0); transition-delay: 0.2s; }
.form-register { opacity: 0; visibility: hidden; transform: translateX(50px); transition-delay: 0s; }

/* =======================================
   A ANIMAÇÃO DE TROCA DE LADO
   ======================================= */
.page-container.sign-up-mode .panel-extra {
    transform: translateX(28em);
}
.page-container.sign-up-mode .panel-form {
    transform: translateX(calc(-100vw + 28em));
    box-shadow: 10px 0 30px rgba(0,0,0,0.05);
}
.page-container.sign-up-mode .form-login {
    opacity: 0; visibility: hidden; transform: translateX(-50px); transition-delay: 0s;
}
.page-container.sign-up-mode .form-register {
    opacity: 1; visibility: visible; transform: translateX(0); transition-delay: 0.2s;
}

/* =======================================
   ESTILOS DOS ELEMENTOS INTERNOS
   ======================================= */
.login-image { display: flex; align-items: center; margin-bottom: 1em; }
#logoLogin { width: 5em; height: 4em; }
#logoTitle { color: #0447AC; font-size: 1.8em; margin: 0 0 0 0.2em; font-weight: 800;}
.form-title { color: #1E3F66; font-size: 1.5em; font-weight: 600; margin: 0.5em 0 1em 0; text-align: center; }

form { display: flex; flex-direction: column; gap: 0.8em; width: 100%; max-width: 20em; }

/* Microanimações nos inputs */
input {
    width: 100%;
    padding: 0.8em 1em;
    border-radius: 0.75em;
    border: 0.1em solid #e0e0e0;
    font-size: 1em;
    box-sizing: border-box;
    outline: none;
    background: #fcfcfc;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
input:focus {
    border-color: #0447AC;
    background: white;
    transform: translateY(-3px); /* Levanta levemente ao focar */
    box-shadow: 0 8px 15px rgba(4, 71, 172, 0.08);
}

.btn-primary {
    width: 100%;
    margin-top: 0.6em;
    background-color: #0447AC;
    color: white;
    padding: 0.8em 1em;
    border: none;
    border-radius: 0.75em;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    background-color: #0f61db;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(4, 71, 172, 0.3);
}

/* Redes Sociais e Divisores */
.divider { display: flex; align-items: center; color: #aaa; margin: 15px 0; font-size: 0.9em; width: 100%; max-width: 20em; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #eee; }
.divider:not(:empty)::before { margin-right: .8em; }
.divider:not(:empty)::after { margin-left: .8em; }

.social-login-container { width: 100%; max-width: 20em; }
.social-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 20px; font-weight: 600; border-radius: 10px; text-decoration: none;
    color: #444; border: 1px solid #ddd; background-color: white;
    transition: all 0.3s ease; width: 100%; box-sizing: border-box;
}
.social-btn:hover { background-color: #f8f9fa; border-color: #ccc; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.05);}
.google-logo { width: 20px; height: 20px; }

.switch-text { font-size: 0.9em; margin-top: 1.5em; text-align: center; color: #555;}
.switch-text a { color: #0447AC; text-decoration: none; font-weight: 700; cursor: pointer; transition: 0.2s;}
.switch-text a:hover { color: #0f61db; text-decoration: underline;}

/* Toasts e Ripple */
#toastContainer { position: fixed; bottom: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column-reverse; }
.toast { background: white; padding: 15px 20px; margin-top: 10px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: flex; align-items: center; opacity: 0; transform: translateX(100%); transition: 0.5s ease-out; }
.toast.toast-error { background-color: #ff3860; color: white; }
.toast.toast-success { background-color: #28a745; color: white; }
.toast.fade-in { opacity: 0.95; transform: translateX(0); }
.toast.fade-out { opacity: 0; transform: translateX(100%); }

.ripple { position: absolute; border-radius: 50%; transform: scale(0); animation: ripple-animation 0.6s linear; background-color: rgba(255, 255, 255, 0.4); pointer-events: none; }
@keyframes ripple-animation { to { transform: scale(4); opacity: 0; } }

/* =======================================
   MOBILE
   ======================================= */
@media (max-width: 768px) {
    body { overflow: auto; background: white;}
    .bg-shapes { display: none; } /* Esconde as formas no mobile para limpar a tela */
    .panel-extra { display: none; }
    .panel-form { width: 100vw; position: relative; right: auto; transform: none !important; height: auto; min-height: 100vh; box-shadow: none;}
    .page-container { display: flex; flex-direction: column; height: auto; min-height: 100vh; }
    .form-wrapper { position: relative; height: 100vh; transform: none !important; opacity: 1 !important; visibility: visible !important; display: none; padding: 2em 1.5em;}
    .form-login { display: flex; }
    .page-container.sign-up-mode .form-login { display: none; }
    .page-container.sign-up-mode .form-register { display: flex; }
}