/* ===== AUTH PAGE STYLES ===== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

:root {
    --auth-primary: #0076B6;
    --auth-primary-light: #329FE3;
    --auth-primary-dark: #004D7A;
    --auth-secondary: #00A69C;
    --auth-secondary-dark: #00877E;
    --auth-dark: #0A192F;
    --auth-dark-surface: #112240;
    --auth-dark-surface-2: #233554;
    --auth-light: #F8FBFF;
    --auth-white: #FFFFFF;
    --auth-text-main: #334155;
    --auth-text-muted: #64748B;
    --auth-text-light: #CBD5E1;
    --auth-danger: #EF4444;
    --auth-warning: #F59E0B;
    --auth-success: #10B981;
    --auth-info: #3B82F6;
    
    --auth-radius-sm: 8px;
    --auth-radius-md: 16px;
    --auth-radius-lg: 24px;
    --auth-radius-full: 9999px;
    
    --auth-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --auth-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --auth-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --auth-shadow-glow: 0 0 20px rgba(0, 166, 156, 0.4);
    
    --auth-transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --auth-transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --auth-transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    --auth-glass-bg: rgba(255, 255, 255, 0.85);
    --auth-glass-border: rgba(255, 255, 255, 1);
    --auth-glass-blur: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--auth-light);
    color: var(--auth-text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== AUTH PAGE LAYOUT ===== */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .auth-page {
        grid-template-columns: 1fr;
    }
}

/* ===== LEFT BRANDING SIDE ===== */
.auth-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    background: linear-gradient(135deg, var(--auth-primary-dark) 0%, var(--auth-dark) 50%, var(--auth-secondary-dark) 100%);
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 118, 182, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 166, 156, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.2) 0%, transparent 40%);
    animation: brandingFloat 20s ease-in-out infinite;
}

@keyframes brandingFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, 2%) rotate(2deg); }
    50% { transform: translate(0, 4%) rotate(0deg); }
    75% { transform: translate(-2%, 2%) rotate(-2deg); }
}

.branding-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 500px;
}

.brand-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: logoFloat 6s ease-in-out infinite;
    position: relative;
}

.brand-logo::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(0, 166, 156, 0.3);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0; }
}

.brand-logo img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: contain;
}

.branding-tagline {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--auth-white);
    margin-bottom: 16px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s 0.3s cubic-bezier(0.5, 0, 0, 1) forwards;
}

.branding-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s 0.5s cubic-bezier(0.5, 0, 0, 1) forwards;
}

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

/* Floating decorative elements */
.floating-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    animation: floatShape 15s ease-in-out infinite;
}

.floating-shape.shape-1 {
    width: 80px;
    height: 80px;
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.floating-shape.shape-2 {
    width: 60px;
    height: 60px;
    top: 25%;
    right: 20%;
    animation-delay: 2s;
}

.floating-shape.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 25%;
    animation-delay: 4s;
}

.floating-shape.shape-4 {
    width: 40px;
    height: 40px;
    bottom: 30%;
    right: 15%;
    animation-delay: 1s;
}

.floating-shape.shape-5 {
    width: 70px;
    height: 70px;
    top: 50%;
    left: 10%;
    animation-delay: 3s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -20px) rotate(5deg); }
    50% { transform: translate(0, -30px) rotate(0deg); }
    75% { transform: translate(-10px, -20px) rotate(-5deg); }
}

/* ===== RIGHT AUTH FORMS SIDE ===== */
.auth-forms {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--auth-light);
    position: relative;
    overflow: hidden;
}

.auth-forms::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--auth-primary) 0%, transparent 70%);
    opacity: 0.1;
    filter: blur(60px);
}

.auth-forms::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, var(--auth-secondary) 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(80px);
}

.auth-card {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 2;
}

/* ===== TABS ===== */
.auth-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 118, 182, 0.08);
    padding: 6px;
    border-radius: var(--auth-radius-full);
    margin-bottom: 32px;
    position: relative;
}

.auth-tab {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    border-radius: var(--auth-radius-full);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--auth-text-muted);
    cursor: pointer;
    transition: var(--auth-transition-base);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-tab.active {
    color: var(--auth-white);
}

.auth-tab-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    border-radius: var(--auth-radius-full);
    transition: var(--auth-transition-bounce);
    box-shadow: 0 4px 12px rgba(0, 118, 182, 0.4);
}

.auth-tab.active .auth-tab-indicator {
    box-shadow: 0 4px 20px rgba(0, 118, 182, 0.5);
}

/* ===== FORMS CONTAINER ===== */
.forms-container {
    position: relative;
    overflow: hidden;
    height: 420px;
}

@media (max-width: 480px) {
    .forms-container {
        height: 450px;
    }
}

.auth-form-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: var(--auth-transition-base);
}

.auth-form-wrapper.login-form {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.auth-form-wrapper.signup-form {
    opacity: 0;
    transform: translateX(100%);
    z-index: 1;
}

.auth-form-wrapper.signup-form.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.auth-form-wrapper.login-form.slide-out {
    opacity: 0;
    transform: translateX(-100%);
}

.auth-form-wrapper.signup-form.slide-out {
    opacity: 0;
    transform: translateX(100%);
}

/* ===== FORM STYLES ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-dark);
    margin-bottom: 8px;
}

.auth-form .form-subtitle {
    font-size: 0.95rem;
    color: var(--auth-text-muted);
    margin-bottom: 8px;
}

/* Input Groups */
.input-group {
    position: relative;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text-main);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 16px;
    color: var(--auth-text-muted);
    font-size: 1rem;
    transition: var(--auth-transition-base);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid rgba(0, 118, 182, 0.15);
    border-radius: var(--auth-radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--auth-text-main);
    background: var(--auth-white);
    transition: var(--auth-transition-base);
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--auth-text-muted);
}

.input-wrapper input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(0, 118, 182, 0.1);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: var(--auth-primary);
}

.input-wrapper input.valid {
    border-color: var(--auth-success);
}

.input-wrapper input.valid + .input-icon {
    color: var(--auth-success);
}

.input-wrapper input.error {
    border-color: var(--auth-danger);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--auth-transition-base);
}

.password-toggle:hover {
    color: var(--auth-primary);
}

.password-toggle.visible {
    color: var(--auth-primary);
}

/* Password Strength */
.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.1);
    transition: var(--auth-transition-base);
}

.strength-bar.weak {
    background: var(--auth-danger);
}

.strength-bar.medium {
    background: var(--auth-warning);
}

.strength-bar.strong {
    background: var(--auth-success);
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 6px;
}

.strength-text.weak { color: var(--auth-danger); }
.strength-text.medium { color: var(--auth-warning); }
.strength-text.strong { color: var(--auth-success); }

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.remember-me span {
    color: var(--auth-text-main);
}

.forgot-password {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--auth-transition-base);
}

.forgot-password:hover {
    color: var(--auth-secondary);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px 32px;
    border: none;
    border-radius: var(--auth-radius-md);
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    color: var(--auth-white);
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--auth-transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--auth-secondary), var(--auth-primary));
    opacity: 0;
    transition: var(--auth-transition-base);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 118, 182, 0.4);
}

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

.btn-submit .btn-text {
    position: relative;
    z-index: 1;
}

.btn-submit .btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--auth-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: relative;
    z-index: 1;
}

.btn-submit.loading .btn-text {
    opacity: 0;
}

.btn-submit.loading .btn-loader {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Social Login */
.social-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.social-divider span {
    font-size: 0.875rem;
    color: var(--auth-text-muted);
    font-weight: 500;
}

.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--auth-radius-md);
    background: var(--auth-white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.25rem;
    color: var(--auth-text-main);
    cursor: pointer;
    transition: var(--auth-transition-base);
}

.social-btn:hover {
    border-color: var(--auth-primary);
    color: var(--auth-primary);
    transform: translateY(-2px);
    box-shadow: var(--auth-shadow-sm);
}

/* Form Switch */
.form-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 0.95rem;
    color: var(--auth-text-muted);
}

.form-switch a {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;
    transition: var(--auth-transition-base);
}

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

/* Terms Checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--auth-text-muted);
    line-height: 1.5;
}

.terms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-primary);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.terms-checkbox a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* Success Message */
.auth-success {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: var(--auth-transition-base);
}

.auth-success.active {
    display: flex;
    opacity: 1;
}

.success-content {
    background: var(--auth-white);
    padding: 48px;
    border-radius: var(--auth-radius-lg);
    text-align: center;
    max-width: 400px;
    transform: scale(0.9);
    transition: var(--auth-transition-bounce);
}

.auth-success.active .success-content {
    transform: scale(1);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--auth-success), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2rem;
    color: var(--auth-white);
    animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    color: var(--auth-dark);
    margin-bottom: 12px;
}

.success-content p {
    color: var(--auth-text-muted);
    margin-bottom: 24px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .auth-branding {
        display: none;
    }
    
    .auth-forms {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .auth-forms {
        padding: 20px 16px;
    }
    
    .auth-card {
        padding: 0 8px;
    }
    
    .auth-tabs {
        margin-bottom: 24px;
    }
    
    .auth-tab {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .forms-container {
        height: 480px;
    }
    
    .auth-form h2 {
        font-size: 1.5rem;
    }
    
    .btn-submit {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* Hidden Utility */
.hidden {
    display: none !important;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}