/* css/login.css */

:root {
    /* Cores principais baseadas no gradiente Azul */
    --primary-color: #003DF5; 
    --primary-hover: #0028a3;
    
    /* Cores do gradiente (Azul para Ciano) */
    --brand-grad-start: #003DF5;
    --brand-grad-end: #00E6FF;

    --bg-dark: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #001b6e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Container do Design Dividido */
.login-split-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    height: 600px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    overflow: hidden; /* Garante que os cantos arredondados cortem o fundo */
}

/* =======================================
   LADO ESQUERDO: BRANDING DA MARCA
   ======================================= */
.login-branding {
    flex: 1;
    background: linear-gradient(135deg, var(--brand-grad-start) 0%, var(--brand-grad-end) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white; 
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Detalhe visual elegante no fundo da marca */
.login-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    animation: pulse 8s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.branding-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Estilos da Logo (Vidro Removido) */
.logo-container-lateral {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container-lateral img {
    max-height: 130px; 
    width: auto;
    display: block;
    object-fit: contain;
}

.brand-title-group {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    width: 100%;
}

.brand-divider {
    width: 5px;
    height: 45px;
    background-color: white;
    margin-right: 15px;
    border-radius: 3px;
}

.branding-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0; 
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.brand-description {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    max-width: 80%;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 500;
}

/* =======================================
   LADO DIREITO: FORMULÁRIO BRANCO
   ======================================= */
.login-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 60px;
    background: #ffffff;
}

.form-wrapper {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.form-wrapper h2 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin: 0 0 5px 0;
    font-weight: 700;
}

.form-wrapper .subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 35px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    text-transform: none; /* Alterado para ficar mais elegante como no print */
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: #94a3b8;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 1px solid #cbd5e1;
    border-radius: 8px; /* Cantos um pouco menos arredondados para ficar clean */
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background-color: #f8fafc;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-wrapper input::placeholder { color: #94a3b8; }

.input-wrapper input:focus {
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 61, 245, 0.15);
    outline: none;
}

.input-wrapper input:focus + i {
    color: var(--primary-color);
}

/* =======================================
   OPÇÕES DO FORMULÁRIO
   ======================================= */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    margin-top: 5px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 500;
}

.remember-me input {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* =======================================
   BOTÃO ENTRAR E FOOTER
   ======================================= */
.login-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color); /* Fundo sólido como no print novo */
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-button:hover {
    background: var(--primary-hover);
}

.login-button:active {
    transform: translateY(2px);
}

.login-button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
    min-height: 20px;
}

.login-footer {
    margin-top: 50px;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* =======================================
   RESPONSIVIDADE (CELULARES E TABLETS)
   ======================================= */
@media (max-width: 850px) {
    .login-split-container {
        flex-direction: column; /* Coloca a parte azul em cima */
        height: auto;
        max-width: 420px;
    }
    
    .login-branding {
        padding: 40px 20px;
    }

    .logo-container-lateral {
        margin-bottom: 0; /* Remove a margem já que os textos vão sumir */
    }

    .logo-container-lateral img {
        max-height: 90px; /* Reduz a logo ligeiramente no mobile para não ocupar muita tela */
    }

    /* Oculta os textos no mobile, deixando apenas a logo na faixa azul superior */
    .brand-title-group, 
    .brand-description {
        display: none; 
    }

    .login-form-section {
        padding: 40px 30px;
    }
    
    .login-footer {
        margin-top: 30px;
    }
}