/**
 * user_login.css - Login Page Styles
 * WINI.IA - Professional Authentication Interface
 * Based on home2.css design system
 * 
 * DESIGN PRINCIPLES:
 * ✓ Consistent with home page visual identity
 * ✓ Professional AAA standard
 * ✓ Cross-platform compatibility
 * ✓ Optimized spacing - Fits 100% zoom perfectly
 */

/* ===================================
   CSS VARIABLES - SYNCED WITH HOME2.CSS
   =================================== */
   :root {
    /* Colors from home2.css */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFB;
    --bg-blue-dark: #1A1F3A;
    --bg-blue-medium: #2C3E7C;
    --bg-blue-light: #E8F0FE;
    --bg-blue-gradient: linear-gradient(135deg, #1A1F3A 0%, #2C3E7C 100%);
    
    /* Primary Colors */
    --primary-color: #6B46C1;
    --primary-light: #8B6BC1;
    --primary-pink: #F59E0B;
    --accent-color: #F59E0B;
    --highlight-color: #FBB830;
    
    /* Text Colors */
    --text-white: #FFFFFF;
    --text-dark: #1A1F3A;
    --text-light: #E2E8F0;
    --text-gray: #6B7280;
    --text-gray-dark: #374151;
    
    /* Gradients */
    --gradient-primary: linear-gradient(90deg, var(--primary-color), var(--primary-pink));
    --gradient-accent: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    
    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-focus: 0 0 0 4px rgba(107, 70, 193, 0.16);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Spacing - Global */
    --spacing-xs: 10px;
    --spacing-sm: 20px;
    --spacing-md: 30px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    
    /* Spacing - Login Form Optimized (AJUSTADO) */
    --form-spacing-xs: 6px;
    --form-spacing-sm: 12px;
    --form-spacing-md: 16px;
    --form-spacing-lg: 20px;
    
    /* Header Height */
    --header-current-height: 100px;
}

/* ===================================
   BASE RESET
   =================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    height: 100%;
}

body {
    font-family: 'Inter', 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-gray-dark);
    background: var(--bg-secondary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===================================
   MAIN SECTION LAYOUT
   =================================== */
#about {
    min-height: calc(100vh - var(--header-current-height));
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
    margin-top: var(--header-current-height);
    padding: var(--spacing-md) 0;
}

.auth-container {
    width: 100%;
    max-width: 1400px;
    padding: 0 var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===================================
   AUTH CARD - MAIN STRUCTURE
   =================================== */
.fn_cs_about {
    display: flex;
    width: 90%;
    max-width: 1200px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    transition: var(--transition-normal);
}

/* ===================================
   LEFT PANEL - BRAND IDENTITY
   =================================== */
.left_part {
    flex: 0 0 45%;
    background: var(--bg-blue-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--text-white);
    overflow: hidden;
}

.left_part::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 31, 58, 0.4);
    z-index: 1;
}

.brand-image-container {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.brand-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.95;
}

.bg_overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.8s ease;
}

.brand-logo {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: var(--spacing-lg);
    letter-spacing: -1px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ===================================
   RIGHT PANEL - FORM AREA (OTIMIZADO)
   =================================== */
.right_part {
    flex: 0 0 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--form-spacing-lg); /* REDUZIDO: 40px → 20px */
    background: var(--bg-primary);
    position: relative;
}

.right_part::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(var(--bg-blue-light) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

.fn_cs_contact_form {
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 1;
    padding: var(--form-spacing-sm); /* REDUZIDO: 20px → 12px */
}

/* ===================================
   FORM ELEMENTS (ESPAÇAMENTOS OTIMIZADOS)
   =================================== */
#FormLogin,
#registerForm {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--form-spacing-sm); /* REDUZIDO: 20px → 12px */
}

.input_list ul {
    list-style: none;
    width: 100%;
}

.input_list li {
    margin-bottom: var(--form-spacing-sm); /* REDUZIDO: 20px → 12px */
    position: relative;
}

/* Input Fields */
.input_list input[type="text"],
.input_list input[type="password"],
.input_list input[type="email"] {
    width: 100%;
    padding: var(--form-spacing-sm) var(--form-spacing-md); /* REDUZIDO: 20px 30px → 12px 16px */
    font-size: 1rem;
    background: var(--bg-blue-light);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-dark);
    transition: var(--transition-normal);
    outline: none;
    height: 48px; /* REDUZIDO: 50px → 48px */
    font-weight: 500;
    font-family: inherit;
}

.input_list input::placeholder {
    color: var(--text-gray);
    font-weight: 400;
}

.input_list input:hover {
    background: var(--bg-secondary);
}

.input_list input:focus {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-focus);
}

.input_list input.error {
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.05);
}

.input_list input.valid {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.05);
}

/* Password Container */
.container_password {
    position: relative;
}

.eye_container {
    position: absolute;
    right: var(--form-spacing-md); /* AJUSTADO: 30px → 16px */
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition-normal);
    border-radius: 50%;
}

.eye_container:hover {
    opacity: 1;
    background: rgba(107, 70, 193, 0.1);
}

.eye_container img {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(30%) sepia(20%) saturate(1000%) hue-rotate(200deg);
}

/* Forgot Password Link */
.forgotPassword {
    margin-top: var(--form-spacing-xs); /* REDUZIDO: 10px → 6px */
    text-align: right;
    font-size: 0.875rem;
}

.forgotPassword p {
    margin: 0;
    color: var(--text-gray);
}

.forgotPassword a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-normal);
    position: relative;
}

.forgotPassword a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
}

.forgotPassword a:hover {
    color: var(--primary-pink);
}

.forgotPassword a:hover::after {
    width: 100%;
}

/* Checkbox */
.fn__checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--form-spacing-md); /* REDUZIDO: 30px → 16px */
    cursor: pointer;
    margin-bottom: var(--form-spacing-lg); /* REDUZIDO: 40px → 20px */
    padding: var(--form-spacing-xs) 0; /* REDUZIDO: 10px → 6px */
}

.fn__checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.fn__checkmark {
    width: 22px;
    height: 22px;
    min-width: 22px;
    background: var(--bg-blue-light);
    border: 2px solid var(--text-gray);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.fn__checkbox:hover .fn__checkmark {
    border-color: var(--primary-color);
}

.fn__checkbox input:checked ~ .fn__checkmark {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
}

.fn__checkmark svg {
    width: 12px;
    height: 12px;
    fill: white;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition-normal);
}

.fn__checkbox input:checked ~ .fn__checkmark svg {
    opacity: 1;
    transform: scale(1);
}

.fn__checkbox p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.fn__checkbox p a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* ===================================
   BUTTONS - SYNCED WITH HOME2.CSS
   =================================== */
.metaportal_fn_button {
    width: 80%;
    padding: 0 var(--spacing-lg);
    background: var(--gradient-primary);
    color: var(--text-white);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px; /* REDUZIDO: 50px → 48px */
    overflow: hidden;
    letter-spacing: 0.3px;
    margin: var(--form-spacing-sm) auto 0; /* REDUZIDO: 20px → 12px */
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
    position: relative;
    text-decoration: none;
}

.metaportal_fn_button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.metaportal_fn_button:hover::before {
    left: 100%;
}

.metaportal_fn_button:hover {
    transform: translateY(-2px); /* REDUZIDO: -3px → -2px */
    box-shadow: 0 6px 20px rgba(107, 70, 193, 0.4); /* REDUZIDO */
}

.metaportal_fn_button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
}

.spinner-border {
    width: 18px; /* REDUZIDO: 20px → 18px */
    height: 18px;
    border-width: 2px;
    margin-left: var(--form-spacing-xs);
}

/* Google Login Button */
.google-login {
    width: 100%;
    margin-bottom: var(--form-spacing-sm); /* REDUZIDO: 20px → 12px */
}

.google-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--form-spacing-sm); /* REDUZIDO: 20px → 12px */
    padding: 0 var(--spacing-lg);
    height: 46px; /* REDUZIDO: 48px → 46px */
    background: var(--bg-primary);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-soft);
}

.google-login-btn:hover {
    border-color: #4285F4;
    background: var(--bg-blue-light);
    box-shadow: var(--shadow-strong);
    transform: translateY(-2px);
}

.google-login-btn img {
    width: 22px; /* REDUZIDO: 24px → 22px */
    height: 22px;
    transition: var(--transition-normal);
}

.google-login-btn:hover img {
    transform: scale(1.1);
}

/* ===================================
   DIVIDER & ALTERNATIVE LINK
   =================================== */
.auth-divider {
    position: relative;
    text-align: center;
    margin: var(--form-spacing-sm) 0; /* REDUZIDO: 20px → 12px */
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0.6;
}

.auth-divider span {
    position: relative;
    padding: 0 var(--form-spacing-md); /* REDUZIDO: 30px → 16px */
    background: var(--bg-primary);
    color: var(--text-gray);
    font-size: 0.875rem; /* REDUZIDO: 0.9rem → 0.875rem */
    font-weight: 600;
}

.auth-alternative {
    text-align: center;
    margin-top: var(--form-spacing-sm); /* REDUZIDO: 20px → 12px */
    padding-top: var(--form-spacing-sm); /* REDUZIDO: 20px → 12px */
    font-size: 0.875rem; /* REDUZIDO: 0.9rem → 0.875rem */
    color: var(--text-gray);
}

.auth-alternative a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    margin-left: var(--form-spacing-xs);
    transition: var(--transition-normal);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-alternative a:hover {
    opacity: 0.8;
}

/* ===================================
   VALIDATION MESSAGES
   =================================== */
.field-message {
    font-size: 0.8rem; /* REDUZIDO: 0.85rem → 0.8rem */
    margin-top: 0.4rem; /* REDUZIDO: 0.5rem → 0.4rem */
    display: flex;
    align-items: center;
    gap: 0.3rem; /* REDUZIDO: 0.375rem → 0.3rem */
    opacity: 0;
    transition: var(--transition-normal);
    font-weight: 600;
}

.field-message.show {
    opacity: 1;
}

.field-message.error {
    color: #EF4444;
}

.field-message.success {
    color: #10B981;
}

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */
.toast {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(10px);
    min-width: 280px;
}

.toast.error {
    background: rgba(239, 68, 68, 0.95);
    color: white;
    border-left: 4px solid #DC2626;
}

.toast.success {
    background: rgba(16, 185, 129, 0.95);
    color: white;
    border-left: 4px solid #059669;
}

.toast.warning {
    background: rgba(245, 158, 11, 0.95);
    color: white;
    border-left: 4px solid #D97706;
}

.toast-body {
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

/* ===================================
   PASSWORD RECOVERY MODAL
   =================================== */
.password-recovery-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.password-recovery-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.password-recovery-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    max-width: 460px;
    width: 90%;
    box-shadow: var(--shadow-strong);
    position: relative;
    animation: slideUp 0.4s ease;
}

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

.form-header {
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.form-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.close-modal {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-blue-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-gray);
    transition: var(--transition-normal);
}

.close-modal:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: rotate(90deg);
}

/* ===================================
   FOOTER PROTECTION
   =================================== */
footer {
    position: relative;
    z-index: 10;
    background: var(--bg-blue-gradient);
    color: var(--text-white);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablets & Small Laptops */
@media (max-width: 1200px) {
    .left_part {
        flex: 0 0 40%;
    }
    .right_part {
        flex: 0 0 60%;
    }
}

/* Tablets */
@media (max-width: 992px) {
    #about {
        padding: var(--spacing-lg) 0;
    }
    
    .fn_cs_about {
        flex-direction: column;
    }
    
    .left_part {
        flex: 0 0 auto;
        height: 200px;
        width: 100%;
    }
    
    .brand-logo {
        font-size: 2rem;
    }
    
    .right_part {
        flex: 1;
        width: 100%;
        padding: var(--spacing-md);
    }
    
    .fn_cs_contact_form {
        max-width: 100%;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    #about {
        margin-top: 88px;
    }
    
    .left_part {
        height: 150px;
    }
    
    .brand-logo {
        font-size: 1.5rem;
    }
    
    .metaportal_fn_button {
        width: 100%;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    #about {
        padding: var(--spacing-sm) 0;
        background: var(--bg-primary);
    }
    
    .fn_cs_about {
        box-shadow: none;
        border-radius: 0;
        width: 100%;
    }
    
    .left_part {
        display: none;
    }
    
    .right_part {
        padding: var(--spacing-sm);
    }
    
    .input_list input[type="text"],
    .input_list input[type="password"],
    .input_list input[type="email"] {
        font-size: 16px; /* Prevents zoom on iOS */
        height: 44px;
    }
    
    .google-login-btn,
    .metaportal_fn_button {
        height: 44px;
        font-size: 0.9rem;
    }
    
    .password-recovery-content {
        padding: var(--spacing-lg);
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .fn_cs_contact_form {
        padding: var(--form-spacing-xs);
    }
    
    .input_list input[type="text"],
    .input_list input[type="password"],
    .input_list input[type="email"] {
        height: 40px;
        font-size: 14px;
    }
    
    .google-login-btn,
    .metaportal_fn_button {
        height: 40px;
        font-size: 0.85rem;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* ===================================
   PRELOADER
   =================================== */
.metaportal_fn_preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

body.loaded .metaportal_fn_preloader {
    opacity: 0;
    visibility: hidden;
}

/* ===================================
   HEADER ADJUSTMENTS
   =================================== */
@media (max-width: 1040px) {
    #about {
        margin-top: 88px;
    }
}

@media (min-width: 1041px) {
    #about {
        margin-top: 107px;
    }
}

/* ===================================
   END OF FILE
   =================================== */