@import url('variables.css');

/* --- CONFIGURAÇÃO GERAL --- */
.split-screen-container {
    height: 100vh;
    width: 100%;
    display: flex;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* --- ANIMAÇÕES --- */

/* 1. Logo: Centro -> Esquerda */
@keyframes centerToLeft {
    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 direita */
@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(-30px); 
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- LADO ESQUERDO (Logo) --- */
.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: centerToLeft 1.8s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}

/* --- LADO DIREITO (Formulário) --- */
.right-pane-form {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background-color: #1e1e1e;
    width: 100%;
    max-width: 500px; 
    padding: 30px;    
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    opacity: 0; 
    animation: fadeInRight 0.8s ease-out 0.8s forwards;
}

/* --- CABEÇALHO DO CARD --- */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: var(--text-color);
    font-size: 2rem; 
    margin-bottom: 10px;
}

.login-header p {
    color: #aaa;
    font-size: 1rem;
}

/* --- INPUTS --- */
.input-group {
    margin-bottom: 25px; 
    text-align: left;
}

.input-group label {
    display: block;
    color: #ccc;
    margin-bottom: 10px;
    font-size: 1rem;
}

.input-group input {
    --autofill-background: #2a2a2a;
    --autofill-color: #fff;
    width: 100%;
    padding: 20px 20px; 
    background-color: #2a2a2a;
    border: 2px solid #333;
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    --autofill-background: #333;
    border-color: var(--primary-green);
    background-color: #333;
}

/* --- OLHO DA SENHA --- */
.password-wrapper {
    position: relative;
}

.eye-btn {
    position: absolute;
    right: 15px;
    top: 47%;
    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);
}

/* --- RODAPÉ E BOTÕES --- */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.forgot-pass {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-pass:hover {
    color: var(--primary-green);
}

/* Checkbox Customizado */
.checkbox-container input { display: none; }
.checkbox-container { display: flex; align-items: center; cursor: pointer; color: #ccc; position: relative; padding-left: 32px; user-select: none; }
.checkmark { position: absolute; left: 0; height: 20px; width: 20px; background-color: #2a2a2a; border: 2px solid #333; border-radius: 4px; transition: all 0.3s; }
.checkbox-container input:checked ~ .checkmark { background-color: var(--primary-green); border-color: var(--primary-green); }
.checkmark:after { content: ""; position: absolute; display: none; left: 6px; top: 2px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checkbox-container input:checked ~ .checkmark:after { display: block; }

/* Botão de Entrar */
.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 suave de subida */
    box-shadow: 0 5px 15px rgba(0, 255, 0, 0.2); 
}

.login-footer {
    margin-top: 35px;
    text-align: center;
    font-size: 0.95rem;
    color: #aaa;
}

.login-footer a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}

/* --- BOTÃO VOLTAR (Canto Superior Esquerdo) --- */
.back-link {
    position: absolute;
    top: 30px;
    left: 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;
}

/* Efeito ao passar o mouse */
.back-link:hover {
    color: var(--primary-green);
    transform: translateX(-5px); 
}

/* Ajuste no SVG da seta para ficar alinhado */
.back-link svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {

    /* 1. CONTAINER GERAL */
    .split-screen-container {
        flex-direction: column; 
        height: auto;          
        min-height: 100vh;      
        overflow-y: auto;       
    }

    /* 2. BOTÃO VOLTAR (Estilo Limpo com Sombra) */
    .back-link {
        position: absolute;
        top: 15px;
        left: 15px;
        font-size: 1rem;
        color: #fff;
        background: transparent; 
        text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9); 
        z-index: 20;
    }

    /* 3. ÁREA DA LOGO (Topo) */
    .left-pane-logo {
        width: 100%;
        flex: 0 0 auto;
        height: auto;
        padding-top: 70px; 
        padding-bottom: 20px;
        align-items: center;
        justify-content: center;
    }

    .animated-logo {
        max-width: 130px; 
        animation: mobileFadeIn 1s ease-out forwards;
    }

    /* Animação suave descendo */
    @keyframes mobileFadeIn {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* 4. ÁREA DO FORMULÁRIO (Baixo) */
    .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. AJUSTES DE INPUTS E BOTÕES */
    .input-group input {
        font-size: 16px; /* Evita zoom no iPhone */
        padding: 14px;
    }

    .btn-login {
        padding: 16px;
        font-size: 1.1rem;
        margin-top: 10px;
    }

    /* 6. OPÇÕES (Manter conectado / Esqueci senha) */
    /* Garante que não quebrem em telas muito pequenas */
    .form-options {
        display: flex;
        flex-wrap: wrap; 
        gap: 15px;
        justify-content: space-between;
        margin-bottom: 20px;
    }

    .checkbox-container {
        font-size: 0.9rem; 
    }
}
