/* Login Page - FinSimples */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --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;
    --white: #ffffff;
    --black: #000000;
    
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    --radius: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    position: relative;
    overflow: hidden;
}

/* Animação de fundo */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    pointer-events: none;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Container principal */
.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 1200px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lado esquerdo - Branding */
.login-brand {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: var(--space-12);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.brand-icon {
    font-size: 5rem;
    margin-bottom: var(--space-6);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.brand-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--space-4);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.brand-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: var(--space-8);
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-top: var(--space-8);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 1rem;
    opacity: 0.9;
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--success);
}

/* Lado direito - Formulário */
.login-form-container {
    flex: 1;
    padding: var(--space-12);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    margin-bottom: var(--space-8);
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.login-header p {
    color: var(--gray-500);
    font-size: 1rem;
}

/* Alertas */
.alert {
    padding: var(--space-4);
    border-radius: var(--radius);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Formulário */
.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
    font-size: 0.875rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1.125rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.form-control {
    width: 100%;
    padding: var(--space-4) var(--space-4) var(--space-4) calc(var(--space-4) + 35px);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--gray-50);
}

.form-control:hover {
    border-color: var(--gray-300);
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-control:focus + .input-icon {
    color: var(--primary);
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.w-100 {
    width: 100%;
}

/* Links */
.login-links {
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.login-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: var(--space-3);
    border-radius: var(--radius);
}

.login-link:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.login-link.danger {
    color: var(--danger);
}

.login-link.danger:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* Divisor */
.divider {
    display: flex;
    align-items: center;
    margin: var(--space-6) 0;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.divider::before {
    margin-right: var(--space-4);
}

.divider::after {
    margin-left: var(--space-4);
}

/* Responsividade */
@media (max-width: 968px) {
    .login-brand {
        display: none;
    }
    
    .login-wrapper {
        max-width: 500px;
    }
}

@media (max-width: 640px) {
    .login-form-container {
        padding: var(--space-6);
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .brand-title {
        font-size: 2rem;
    }
}

/* Animações de carregamento */
.btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-primary.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: var(--space-2);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Input com erro */
.form-control.error {
    border-color: var(--danger);
    background: #fee2e2;
}

.form-control.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Password hints */
.password-hint {
    display: block;
    font-size: 0.75rem;
    margin-top: var(--space-2);
    transition: all 0.2s ease;
}

.password-hint:empty {
    display: none;
}

/* Estilos adicionais para melhor UX */
.password-toggle {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-2);
    font-size: 1.125rem;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Melhorias de acessibilidade */
.form-control:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Efeito de hover nos inputs */
.input-wrapper:hover .input-icon {
    color: var(--primary-light);
}

