/**
 * Authentication Pages Styles
 */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.auth-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.auth-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.1) 0%, transparent 40%);
    animation: bgPulse 15s ease infinite;
}

@keyframes bgPulse {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-2%, 2%) scale(1.02); }
    50% { transform: translate(2%, -2%) scale(1); }
    75% { transform: translate(-1%, -1%) scale(1.01); }
}

/* Grid Pattern Overlay */
.auth-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Floating Orbs */
.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.auth-orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.auth-orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.auth-orb-3 {
    width: 200px;
    height: 200px;
    background: #3b82f6;
    top: 50%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, 10px) rotate(-5deg); }
    75% { transform: translate(20px, 10px) rotate(3deg); }
}

/* Auth Card */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(28, 28, 31, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: slideUp 0.5s ease;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 0 0 var(--radius-full) var(--radius-full);
}

/* Logo Section */
.auth-logo {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-logo-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-accent);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto var(--spacing-md);
    box-shadow: 0 8px 32px var(--accent-primary-glow);
    animation: glow 3s ease infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 8px 32px var(--accent-primary-glow); }
    50% { box-shadow: 0 8px 48px rgba(99, 102, 241, 0.5); }
}

.auth-logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-logo-subtitle {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-top: var(--spacing-xs);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.auth-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* Form Enhancements */
.auth-form .form-group {
    margin-bottom: var(--spacing-lg);
}

.auth-form .form-input {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
}

.auth-form .form-input:focus {
    background: var(--bg-secondary);
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-input {
    padding-left: 48px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    transition: color var(--transition-fast);
}

.input-icon-wrapper:focus-within .input-icon {
    color: var(--accent-primary);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* Remember & Forgot */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    font-size: 0.875rem;
}

.auth-options a {
    color: var(--accent-primary);
}

.auth-options a:hover {
    text-decoration: underline;
}

/* Submit Button */
.auth-submit {
    width: 100%;
    padding: var(--spacing-md);
    font-size: 1rem;
    font-weight: 600;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

/* Social Login */
.social-buttons {
    display: flex;
    gap: var(--spacing-md);
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.social-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-default);
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

/* Footer Link */
.auth-footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-primary);
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Success Animation */
.auth-success {
    text-align: center;
    padding: var(--spacing-xl);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    color: var(--success);
    font-size: 2.5rem;
    animation: successPop 0.4s ease;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Error Shake Animation */
.shake {
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Loading State */
.auth-loading {
    position: relative;
    pointer-events: none;
}

.auth-loading .btn-text {
    opacity: 0;
}

.auth-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Two Column Layout for larger screens */
@media (min-width: 1024px) {
    .auth-wrapper.split {
        padding: 0;
    }
    
    .auth-split-left {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: var(--spacing-2xl);
        background: var(--bg-secondary);
        position: relative;
        overflow: hidden;
    }
    
    .auth-split-right {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: var(--spacing-2xl);
    }
    
    .auth-split-left .auth-card {
        max-width: 100%;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    .auth-illustration {
        max-width: 500px;
    }
    
    .auth-illustration img {
        width: 100%;
        height: auto;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: var(--spacing-lg);
    }
    
    .auth-logo-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .auth-logo-text {
        font-size: 1.5rem;
    }
    
    .social-buttons {
        flex-direction: column;
    }
}

