/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores Principais */
    --primary-green: #104726;
    --primary-green-light: #1a6b3a;
    --primary-green-dark: #082818;
    --primary-green-rgb: 16, 71, 38;
    
    /* Tons de Cinza */
    --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;
    
    /* Cores de Suporte */
    --white: #ffffff;
    --accent: #2d8a52;
    --success: #10b981;
    --error: #ef4444;
    
    /* 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);
    
    /* Transições */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   CONTAINER PRINCIPAL
   =================================== */
.login-container {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

/* ===================================
   BANNER LATERAL ESQUERDO
   =================================== */
.login-banner {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 50%, var(--primary-green-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    overflow: hidden;
}

/* Padrão de fundo animado */
.login-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.03) 10px,
        rgba(255, 255, 255, 0.03) 20px
    );
    animation: slidePattern 20s linear infinite;
}

@keyframes slidePattern {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(45, 138, 82, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-title {
    font-family: 'Poppins', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.banner-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.banner-features {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    font-size: 1rem;
    opacity: 0;
    animation: fadeInLeft 0.6s ease-out forwards;
}

.feature-item:nth-child(1) { animation-delay: 0.3s; }
.feature-item:nth-child(2) { animation-delay: 0.5s; }
.feature-item:nth-child(3) { animation-delay: 0.7s; }

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-base);
}

.feature-item:hover .feature-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ===================================
   SEÇÃO DO FORMULÁRIO
   =================================== */
.login-form-section {
    flex: 0 0 550px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 10;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--gray-50);
    border-radius: 12px;
    border: 2px solid var(--gray-100);
    transition: all var(--transition-base);
}

.logo:hover {
    border-color: var(--primary-green);
    background: rgba(var(--primary-green-rgb), 0.03);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-green);
    letter-spacing: -0.01em;
}

/* Header do Formulário */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.form-description {
    font-size: 0.95rem;
    color: var(--gray-500);
    font-weight: 400;
}

/* Links de Ajuda */
.help-links {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.help-link {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-600);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.help-link-secondary {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.help-link-secondary:hover {
    color: var(--primary-green-light);
    text-decoration: underline;
}

/* ===================================
   FORMULÁRIO
   =================================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.label-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    background: var(--white);
    color: var(--gray-900);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(var(--primary-green-rgb), 0.12);
}

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

/* Password Input */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

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

/* Checkbox */
.checkbox-group {
    margin-top: -0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom {
    background: var(--primary-green);
    border-color: var(--primary-green);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom::after {
    content: '✓';
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
}

.checkbox-text {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Botão de Submit */
.btn-submit {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(var(--primary-green-rgb), 0.35);
    margin-top: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--primary-green-rgb), 0.45);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit svg {
    transition: transform var(--transition-base);
}

.btn-submit:hover svg {
    transform: translateX(4px);
}

/* Footer */
.login-footer {
    margin-top: 2.5rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

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

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 1024px) {
    .login-banner {
        flex: 0 0 45%;
        padding: 2.5rem;
    }
    
    .banner-title {
        font-size: 3rem;
    }
    
    .login-form-section {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-banner {
        flex: none;
        min-height: 40vh;
        padding: 2rem;
    }
    
    .banner-title {
        font-size: 2.5rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .banner-features {
        margin-top: 2rem;
        gap: 1rem;
    }
    
    .feature-item {
        font-size: 0.9rem;
    }
    
    .login-form-section {
        flex: none;
        padding: 2rem;
    }
    
    .login-form-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .banner-title {
        font-size: 2rem;
    }
    
    .login-form-section {
        padding: 1.5rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
}
