/* Reset e Variáveis */
:root {
    --bg-body: #0a0e17;        /* Fundo bem escuro da página */
    --bg-brand: #05080f;       /* Fundo do lado esquerdo (mais escuro) */
    --bg-form: #111621;        /* Fundo do lado direito (cinza azulado escuro) */
    --bg-input: #1d2433;       /* Fundo dos inputs */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-color: #2563eb;   /* Azul do botão */
    --accent-hover: #1d4ed8;
    --border-color: #2d3748;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* --- Correção do Autofill do Navegador (Fundo Branco) --- */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    /* "Pinta" o fundo interno com a cor do seu input usando sombra */
    -webkit-box-shadow: 0 0 0 30px var(--bg-input) inset !important;
    /* Força a cor do texto para branco/cinza claro */
    -webkit-text-fill-color: var(--text-primary) !important;
    /* Remove a transição de cor padrão do navegador */
    transition: background-color 5000s ease-in-out 0s;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Container Principal (O Card Flutuante) */
.main-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    height: 550px; /* Altura fixa para manter o aspecto retangular */
    background-color: var(--bg-form);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* --- Lado Esquerdo (Branding) --- */
.brand-section {
    flex: 1; /* Ocupa 50% ou o espaço disponível */
    background-color: var(--bg-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px;
}

/* Decoração sutil de fundo (opcional) */
.brand-section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.brand-content {
    text-align: center;
    z-index: 1;
}

.logo-img {
    width: 400px; /* Ajuste conforme o tamanho real da sua logo */
    height: auto;
    margin-bottom: 20px;
}

.brand-text h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.brand-text h2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-top: 5px;
    text-transform: uppercase;
}

.brand-tagline {
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Lado Direito (Formulário) --- */
.form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: var(--bg-form);
}

.form-wrapper {
    width: 100%;
    max-width: 320px;
}

.form-header {
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Inputs e Labels */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px 40px 12px 40px; /* Espaço para os ícones */
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border 0.3s, background-color 0.3s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: #232936;
}

.input-wrapper input::placeholder {
    color: #556075;
}

/* Ícones dentro do input */
.input-icon {
    position: absolute;
    left: 12px;
    color: #556075;
    font-size: 1.1rem;
}

.toggle-password {
    position: absolute;
    right: 12px;
    color: #556075;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--text-primary);
}

/* Botão */
.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

/* Mensagem de Erro */
.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.forgot-password-link {
    text-align: right;
    margin-top: 8px;
    margin-bottom: 20px;
}
.forgot-password-link a {
    color: #667085; /* Ou a cor secundária do seu tema */
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
}
.forgot-password-link a:hover {
    color: #0d6efd; /* Sua cor primária (azul) */
    text-decoration: underline;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        height: auto;
        max-width: 400px;
    }

    .brand-section {
        padding: 30px 20px;
    }

    .logo-img {
        width: 80px;
    }

    .brand-text h1 { font-size: 1.8rem; }
    
    .form-section {
        padding: 40px 20px;
    }
}