/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores da identidade visual SOU */
    --primary-blue: #0056B3;
    --primary-blue-dark: #003d82;
    --primary-blue-light: #0066cc;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --error-red: #DC2626;
    --error-red-light: #FEE2E2;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #0056B3 0%, #003d82 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Container principal */
.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    min-height: 600px;
}

/* Seção de Branding (lado esquerdo) */
.branding-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.branding-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.branding-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.system-name {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
}

.system-description {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.system-tagline {
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.85;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.grupo-mmb-logo {
    height: 32px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Seção do Formulário (lado direito) */
.form-section {
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
}

.form-container {
    width: 100%;
    max-width: 400px;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.form-header p {
    font-size: 15px;
    color: var(--gray-600);
}

/* Mensagem de erro */
.error-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--error-red-light);
    border: 1px solid var(--error-red);
    border-radius: 8px;
    color: var(--error-red);
    font-size: 14px;
    margin-bottom: 24px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-icon {
    flex-shrink: 0;
}

/* Formulário */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 15px;
    color: var(--gray-900);
    transition: all 0.2s ease;
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

/* Campo de senha com botão de toggle */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--gray-600);
}

/* Opções do formulário */
.form-options {
    display: flex;
    justify-content: flex-end;
    margin-top: -8px;
}

.forgot-password {
    font-size: 14px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* Botão de submit */
.btn-submit {
    padding: 14px 24px;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    margin-top: 8px;
}

.btn-submit:hover {
    background: var(--primary-blue-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Logos das Empresas */
.company-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
}

.company-logo {
    height: 24px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
    filter: brightness(0) invert(1);
}

.company-logo:hover {
    opacity: 1;
    transform: scale(1.08);
}

/* Rodapé */
.login-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: none;
    text-align: center;
}

.login-footer p {
    font-size: 13px;
    color: var(--gray-500);
}

/* Responsividade */
@media (max-width: 968px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .branding-section {
        padding: 40px 30px;
        min-height: auto;
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
    }
    
    .system-name {
        font-size: 42px;
    }
    
    .system-description {
        font-size: 16px;
    }
    
    .system-tagline {
        font-size: 14px;
    }
    
    .form-section {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .login-container {
        border-radius: 16px;
    }
    
    .branding-section {
        padding: 30px 20px;
    }
    
    .form-section {
        padding: 30px 20px;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
    }
    
    .system-name {
        font-size: 36px;
    }
}
