@import url('variables.css');

/* --- CONFIGURAÇÃO GERAL --- */
.split-screen-container {
    height: 105vh;
    width: 100%;
    display: flex;
    
    flex-direction: row-reverse; 
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* 1. Logo: Nasce no Centro e vai para a DIREITA */
@keyframes centerToRight {
    0% {
        opacity: 0;
        transform: translateX(-25vw) scale(0.9); 
    }
    15% {
        opacity: 1;
        transform: translateX(-25vw) scale(1);
    }
    35% {
        transform: translateX(-25vw) scale(1); 
    }
    100% {
        transform: translateX(0) scale(1);
    }
}

/* 2. Formulário: Surge da ESQUERDA */
@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px); 
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- CONFIGURAÇÃO DOS LADOS --- */

/* Lado da Logo - ficará na direita por causa do row-reverse */
.left-pane-logo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.animated-logo {
    max-width: 600px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    animation: centerToRight 1.8s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}

/* formulario ficará na esquerda */
.right-pane-form {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* --- CARD DE CADASTRO --- */
.login-card {
    background-color: #1e1e1e;
    width: 100%;
    max-width: 450px; 
    padding: 40px;    
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    opacity: 0; 
    /* Animação vindo da esquerda */
    animation: fadeInLeft 0.8s ease-out 0.8s forwards;
}

/* --- ESTILOS INTERNOS  --- */
.login-header { text-align: center; margin-bottom: 20px; } /* Margem menor */
.login-header h2 { color: var(--text-color); font-size: 1.8rem; margin-bottom: 5px; }
.login-header p { color: #aaa; font-size: 0.9rem; }


.input-group {
    margin-bottom: 15px; 
    text-align: left;
}

.input-group label { 
    display: block; 
    color: #ccc; 
    margin-bottom: 5px; 
    font-size: 0.9rem; }

.input-group input {
    width: 100%;
    padding: 12px 15px;
    background-color: #2a2a2a;
    border: 2px solid #333;
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus { 
    border-color: var(--primary-green); 
    background-color: #333; 
}


.password-wrapper { 
    position: relative; 
}

.eye-btn { 
    position: absolute; 
    right: 15px; 
    top: 50%; 
    transform: translateY(-50%); 
    background: none; 
    border: none; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    padding: 0; 
    line-height: 0; 
}

.eye-btn svg { 
    transition: fill 0.3s; 
}

.eye-btn:hover svg { 
    fill: var(--primary-green); 
}


.btn-login {
    width: 100%;
    padding: 16px;
    background-color: var(--primary-green);
    color: white;  
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;

    text-transform: none; 
    font-family: var(--font-main);
    font-size: 1.1rem;    
    font-weight: 500;     
    letter-spacing: 0.5px; 
}

.btn-login:hover {
    background-color: var(--hover-green);
    transform: translateY(-2px); /* Efeito de subida */
    box-shadow: 0 5px 15px rgba(0, 255, 0, 0.2); 
}

/* Footer e Link Voltar */
.login-footer { 
    margin-top: 20px; 
    text-align: center; 
    font-size: 0.9rem; 
    color: #aaa; 
}

.login-footer a { 
    color: var(--primary-green); 
    text-decoration: none; 
    font-weight: 600; 
}

.back-link {
    position: absolute;
    top: 30px;
    right: 40px; 
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #aaa;
    font-size: 1.5rem;
    font-family: var(--font-main);
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover { 
    color: var(--primary-green); 
    transform: translateX(5px); 
}

.back-link svg { 
    width: 20px; 
    height: 20px; 
}

@media (max-width: 768px) {

    /* 1. CONTAINER PRINCIPAL*/
    .split-screen-container {
        flex-direction: column; 
        height: auto;           
        min-height: 100vh;      
        overflow-y: auto;       
        background-attachment: fixed; 
    }

    /* 2. LINK DE VOLTAR  */
    .back-link {
        position: absolute;
        top: 15px;      
        left: 15px;     
        z-index: 20;    
        font-size: 1rem;
        color: #fff;
        background-color: transparent; 
        padding: 0; 
    }

    /* 3. ÁREA DA LOGO */
    .left-pane-logo {
        width: 100%;
        flex: 0 0 auto;   
        height: 200px;    
        padding-top: 40px;
        align-items: flex-start; 
    }

    .animated-logo {
        max-width: 140px; 
        animation: mobileFadeIn 1s ease-out forwards;
    }

    @keyframes mobileFadeIn {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* 4. ÁREA DO FORMULÁRIO */
    .right-pane-form {
        width: 100%;
        padding: 0 20px 40px 20px; 
        align-items: flex-start;   
    }

    .login-card {
        max-width: 100%;    
        padding: 25px 20px; 
        animation: mobileUp 0.8s ease-out 0.2s forwards;
        opacity: 0; 
    }

    @keyframes mobileUp {
        from { opacity: 0; transform: translateY(30px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* 5. UX E ACESSIBILIDADE */
    .login-header h2 {
        font-size: 1.5rem; 
    }

    /* Evita Zoom no iPhone e aumenta área de toque */
    .input-group input {
        font-size: 16px; 
        padding: 14px;
    }

    .btn-login {
        padding: 16px;
        font-size: 1.1rem;
    }
}