/* ==========================================================================
   1. CORES & IDENTIDADE CORPORATIVA (PALETA VINCO)
   ========================================================================== */

:root {
    --primary-color: #18573C;       /* Verde Principal Vinco */
    --primary-hover: #113f2b;       /* Verde mais denso para hover */
    --secondary-color: #0D2E20;     /* Fundo escuro institucional */
    --bg-color: #f4f7f6;           /* Cinza claro frio corporativo */
    --text-color: #1c2d27;         /* Texto grafite esverdeado */
    --dark-color: #0f1c18;          /* Títulos destacados */
    --gray-color: #556b61;          /* Subtítulos e labels */
    --border-color: #e1e8e5;       /* Bordas finas */
    --danger-color: #bf2121;
}

/* ==========================================================================
   2. RESET & ESTRUTURA GLOBAL (DESKTOP)
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

html, body {
    height: 100%;
    overflow: hidden; /* Trava scroll geral no Desktop */
    background-color: var(--bg-color);
    color: var(--text-color);
}

body {
    display: flex;
    min-height: 100vh;
}

.container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* ==========================================================================
   3. SEÇÃO DE LOGIN (LADO ESQUERDO - DESKTOP)
   ========================================================================== */

.login-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: white;
    max-width: 500px;
    padding: 50px;
    overflow-y: auto;
    height: 100%;
    border-right: 1px solid var(--border-color);
}

.login-container {
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
}

/* Regra da Logo no Desktop */
.logo {
    margin-bottom: 35px;
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--dark-color);
    letter-spacing: -0.3px;
}

/* ==========================================================================
   4. COMPONENTES DO FORMULÁRIO & BOTÕES
   ========================================================================== */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-color);
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fdfdfd;
    color: var(--text-color);
}

.form-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(24, 87, 60, 0.1);
    background-color: white;
}

.form-input::placeholder {
    color: #94a3b8;
}

.forgot-password {
    display: inline-block;
    margin-top: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-password:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 5px rgba(24, 87, 60, 0.2);
}

.error-message {
    background-color: #fdf2f2;
    color: var(--danger-color);
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f8d7d7;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--gray-color);
    font-size: 13px;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.divider span {
    padding: 0 15px;
    background-color: white;
}

.signup-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--gray-color);
}

.signup-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}

.signup-link a:hover {
    text-decoration: underline;
}

.system-info {
    text-align: center;
    margin-top: 35px;
    padding-top: 15px;
    border-top: 1px solid var(--bg-color);
    color: var(--gray-color);
    font-size: 13px;
}

/* ==========================================================================
   5. PAINEL DE IMAGEM (LADO DIREITO - DESKTOP)
   ========================================================================== */

.info-section {
    flex: 1.4;
    position: relative;
    overflow: hidden;
    background-color: var(--secondary-color);
    height: 100vh;
}

.info-container {
    width: 100%;
    height: 100%;
}

#main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 0.85;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   6. RESPONSIVIDADE EXCLUSIVA PARA SMARTPHONES E TABLETS
   ========================================================================== */

@media (max-width: 900px) {
    html, body {
        overflow: auto;
        height: auto;
    }

    .container {
        height: auto;
        min-height: 100vh;
        display: block; 
        background-color: white;
    }

    .info-section {
        display: none; /* Mantém a imagem oculta para poupar espaço */
    }

    .login-section {
        max-width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 40px 20px;
        border-right: none;
        justify-content: center;
    }

    .login-container {
        max-width: 100%;
        padding: 0 10px;
    }

    /* ALTERAÇÃO: A logo ganha destaque centralizado no mobile */
    .logo {
        font-size: 24px;
        margin-bottom: 25px;
        justify-content: center; /* Centraliza o ícone e o texto da marca */
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 20px;
    }

    .login-title {
        font-size: 22px;
        margin-bottom: 20px;
        text-align: center; /* Centraliza o título "Login" ou "Entrar" */
    }

    .form-input {
        padding: 15px;
        font-size: 16px; /* Impede zoom forçado do teclado do iOS */
    }

    .btn-login {
        padding: 15px;
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .login-section {
        padding: 25px 15px;
    }
    
    .login-title {
        font-size: 20px;
    }
}