/* Auth Page Specific Styles - Clean & Professional */

section .container{ margin-top: 0px!important;}

/* Clean CSS Variables */
:root {
    --auth-bg: #ffffff;
    --auth-card-bg: #f9f9fb;
    --auth-border: #e5e7eb;
    --auth-border-focus: #3b82f6;
    --auth-text: #1f2937;
    --auth-text-secondary: #6b7280;
    --auth-text-muted: #9ca3af;
    --auth-primary: #3b82f6;
    --auth-primary-hover: #2563eb;
    --auth-success: #10b981;
    --auth-danger: #ef4444;
    --auth-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --auth-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Body and Background */
body {
    background: #f9fafb;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--auth-text);
    line-height: 1.6;
}

/* Auth Page Container */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Auth Card - Clean Design */
.auth-card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    box-shadow: var(--auth-shadow);
    padding: 0;
    max-width: 440px;
    width: 100%;
    transition: all 0.2s ease;
}

.auth-card:hover {
    box-shadow: var(--auth-shadow-hover);
}

/* Auth Header */
.auth-header {
    background: var(--auth-card-bg);
    padding: 2.5rem 2rem 1rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--auth-border);
}

.auth-header img {
    max-height: 60px;
    transition: transform 0.2s ease;
}

.auth-header img:hover {
    transform: scale(1.02);
}

/* Auth Tabs - Clean Design */
.auth-tabs {
    background: #f8fafc;
    border-radius: 8px;
    margin: 1.5rem;
    padding: 4px;
    display: flex;
    gap: 2px;
    border: 1px solid var(--auth-border);
}

.auth-tab {
    flex: 1;
    padding: 10px 16px;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    color: var(--auth-text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
}

.auth-tab:hover {
    color: var(--auth-text);
    background: rgba(59, 130, 246, 0.05);
}

.auth-tab.active {
    background: white;
    color: var(--auth-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.auth-tab i {
    margin-right: 6px;
    font-size: 0.85rem;
}

/* Auth Tab Content */
.auth-tab-content {
    display: none;
    padding: 0 1.5rem 1.5rem 1.5rem;
    animation: fadeIn 0.3s ease-out;
}

.auth-tab-content.active {
    display: block;
}

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

/* Form Controls - Clean Inputs */
.auth-form .form-control {
    background: white;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--auth-text);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.auth-form .form-control::placeholder {
    color: var(--auth-text-muted);
}

.auth-form .form-control:focus {
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Form Labels */
.auth-form label.form-label {
    color: var(--auth-text);
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

/* Input Groups */
.auth-form .input-group {
    position: relative;
    margin-bottom: 1rem;
}

.auth-form .input-group .form-control {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.auth-form .input-group .btn {
    background: #f8fafc;
    border: 1px solid var(--auth-border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    color: var(--auth-text-secondary);
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.auth-form .input-group .btn:hover {
    background: #f1f5f9;
    color: var(--auth-text);
}

/* Buttons - Clean Design */
.auth-form .btn {
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.auth-form .btn-primary {
    background: var(--auth-primary);
    color: white;
    border-color: var(--auth-primary);
}

.auth-form .btn-primary:hover {
    background: var(--auth-primary-hover);
    border-color: var(--auth-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.auth-form .btn-primary:active {
    transform: translateY(0);
}

/* Social Login */
.social-login {
    margin-top: 1.5rem;
}

.social-login .btn {
    background: white;
    border: 1px solid var(--auth-border);
    color: var(--auth-text);
    transition: all 0.2s ease;
}

.social-login .btn:hover {
    background: #f8fafc;
    border-color: var(--auth-border-focus);
    transform: translateY(-1px);
}

/* Auth Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--auth-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--auth-border);
}

.auth-divider span {
    background: white;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

/* Form Check */
.form-check-input {
    background: white;
    border: 1px solid var(--auth-border);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-check-label {
    color: var(--auth-text-secondary);
    font-size: 0.85rem;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: 1px solid;
    padding: 12px 16px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.alert-warning {
    background: #fffbeb;
    color: #d97706;
    border-color: #fed7aa;
}

/* Form Text */
.form-text {
    color: var(--auth-text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Links */
.auth-form a {
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-form a:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

/* Validation styles */
.form-control.is-invalid {
    border-color: var(--auth-danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: var(--auth-danger);
    font-size: 0.8rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.error-message i {
    margin-right: 4px;
    color: var(--auth-danger);
    font-size: 0.75rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

/* Form validation animations */
.form-control.is-invalid {
    animation: shake 0.5s ease-in-out;
}

/* Success animations */
.alert-success {
    animation: slideInRight 0.3s ease-out;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-page {
        padding: 1rem;
    }
    
    .auth-card {
        margin: 0;
        border-radius: 8px;
    }
    
    .auth-header {
        padding: 2rem 1.5rem 1rem 1.5rem;
    }
    
    .auth-header img {
        max-height: 60px;
    }
    
    .auth-tabs {
        margin: 1rem;
        border-radius: 6px;
    }
    
    .auth-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .auth-tab-content {
        padding: 0 1rem 1rem 1rem;
    }
    
    .auth-form .form-control {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .auth-form .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        border-radius: 6px;
    }
    
    .auth-header {
        padding: 1.5rem 1rem 1rem 1rem;
    }
    
    .auth-tabs {
        margin: 0.75rem;
        border-radius: 4px;
    }
    
    .auth-tab {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .auth-tab-content {
        padding: 0 0.75rem 0.75rem 0.75rem;
    }
    
    .auth-form .form-control {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .auth-form .btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

/* Google OAuth Button Styling */
#googleLoginBtn,
#googleRegisterBtn {
    width: 100% !important;
    height: 44px !important; 
    color: var(--auth-text) !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    position: relative !important;
    box-shadow: none !important;
}
    
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    border-color: currentColor;
    border-right-color: transparent;
}

/* Focus States for Accessibility */
.auth-tab:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control:focus {
    outline: none;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Back to Site Link */
.back-to-site-link {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--auth-border);
}

.back-to-site-link a {
    color: var(--auth-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-to-site-link a:hover {
    color: var(--auth-text);
    transform: translateX(-2px);
}

.back-to-site-link a i {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.back-to-site-link a:hover i {
    transform: translateX(-1px);
}

/* Print Styles */
@media print {
    .auth-tabs,
    .social-login,
    .back-to-site-link {
        display: none !important;
    }
    
    .auth-card {
        box-shadow: none;
        border: 1px solid #ccc;
        background: white;
        color: black;
    }
}

/* Additional Enhancements */
.auth-card {
    animation: slideInUp 0.4s ease-out;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-card {
        border: 2px solid var(--auth-text);
    }
    
    .auth-form .form-control {
        border: 2px solid var(--auth-text);
    }
    
    .auth-form .btn {
        border: 2px solid var(--auth-text);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .auth-card:hover {
        transform: none;
    }
    
    .auth-form .btn:hover {
        transform: none;
    }
}

/* Global Loading Overlay Styles */
#globalLoadingOverlay {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease-out;
}

#globalLoadingOverlay .bg-white {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInUp 0.3s ease-out;
}

#globalLoadingOverlay .spinner-border {
    animation: spin 1s linear infinite;
}

#globalLoadingOverlay .loading-message {
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Enhanced Button Loading States */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

/* Loading Animation for Form Elements */
.form-control:disabled {
    background-color: #f9fafb;
    cursor: not-allowed;
}

/* Smooth transitions for loading states */
.auth-form * {
    transition: all 0.2s ease;
}

/* Loading state for social login buttons */
.social-login .btn:disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* Enhanced focus states for accessibility */
#globalLoadingOverlay:focus {
    outline: none;
}

/* Loading overlay z-index management */
#globalLoadingOverlay {
    z-index: 9999;
}

#oauthLoading {
    z-index: 9998;
}

#oauthSuccess,
#oauthError {
    z-index: 9997;
}

/* OAuth Loading Styles */
#oauthLoading {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* OAuth Status Messages */
#oauthSuccess,
#oauthError {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    animation: slideInRight 0.3s ease-out;
} 