/* ==============================================
   AUTH PAGES - PREMIUM DESIGN SYSTEM
   ============================================== */

/* CSS Custom Properties */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Typography */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border radius */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    /* Box shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Auth Section Base */
.auth-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    overflow: hidden;
}

.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(79, 70, 229, 0.05) 0%, 
        rgba(16, 185, 129, 0.05) 50%, 
        rgba(59, 130, 246, 0.05) 100%);
    z-index: -2;
}

.auth-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(79, 70, 229, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 150px 150px, 100px 100px, 75px 75px;
    animation: float 25s ease-in-out infinite;
}

.auth-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(248, 250, 252, 0.9) 100%);
    z-index: -1;
}

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 8px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--primary-color), 
        var(--secondary-color), 
        var(--info-color));
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.3);
    animation: pulse-glow 3s ease-in-out infinite;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.auth-subtitle {
    color: var(--muted-color);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Auth Form */
.auth-form {
    margin-bottom: 2rem;
}

.modern-form-group {
    margin-bottom: 1.5rem;
}

.modern-label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

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

.modern-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    font-size: 1rem;
    background: rgba(248, 250, 252, 0.5);
    color: var(--dark-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.modern-input:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.modern-input.is-invalid {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--muted-color);
    font-size: 1.1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modern-input:focus + .input-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--muted-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.08);
}

.modern-error {
    display: flex;
    align-items: center;
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.modern-checkbox {
    display: flex;
    align-items: center;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.3s ease;
    background: white;
}

.checkbox-custom::after {
    content: '\F26E';
    font-family: 'Bootstrap Icons';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.checkbox-input:checked + .checkbox-label .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-input:checked + .checkbox-label .checkbox-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.checkbox-text {
    color: var(--dark-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    padding: 1rem 2rem;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.auth-btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}

.auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.4);
}

.auth-btn:disabled {
    cursor: not-allowed;
    transform: none !important;
}

.btn-text,
.btn-icon,
.btn-loading {
    transition: opacity 0.3s ease;
}

.btn-loading {
    opacity: 0;
    position: absolute;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Auth Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

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

.auth-divider span {
    background: rgba(255, 255, 255, 0.95);
    color: var(--muted-color);
    padding: 0 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Social Login */
.social-login {
    margin-bottom: 2rem;
}

.social-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: white;
    color: var(--dark-color);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.social-btn:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.02);
    transform: translateY(-1px);
}

.google-btn i {
    color: #ea4335;
    font-size: 1.1rem;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
}

.auth-link-text {
    color: var(--muted-color);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.auth-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-color);
    font-size: 0.85rem;
}

.feature-item i {
    color: var(--success-color);
}

/* Auth Info Side */
.auth-info {
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        var(--secondary-color) 100%);
    border-radius: 24px;
    padding: 3rem;
    color: white;
    text-align: center;
    margin-left: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 70%);
}

.info-content {
    position: relative;
    z-index: 2;
}

.info-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.info-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.info-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #ffd700;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Modern Notifications */
.modern-notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.modern-notification-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.modern-notification i {
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 991px) {
    .auth-info {
        margin-left: 0;
        margin-top: 2rem;
    }
    
    .info-stats {
        justify-content: space-between;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .auth-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .auth-info {
        padding: 2rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .auth-features {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .info-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .auth-section {
        padding: 1rem 0;
    }
    
    .auth-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .auth-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .modern-input {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    }
}

/* Role Selection */
.role-selection {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.role-option {
    flex: 1;
    position: relative;
}

.role-radio {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.role-label {
    display: block;
    padding: 1.5rem;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    height: 100%;
}

.role-label:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.02);
    transform: translateY(-2px);
}

.role-radio:checked + .role-label,
.role-option.selected .role-label {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.08);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.15);
}

.role-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, 
        rgba(79, 70, 229, 0.1), 
        rgba(16, 185, 129, 0.1));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.role-radio:checked + .role-label .role-icon,
.role-option.selected .role-icon {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: scale(1.1);
}

.role-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.role-content p {
    font-size: 0.85rem;
    color: var(--muted-color);
    margin: 0;
    line-height: 1.4;
}

.role-radio:checked + .role-label .role-content h4,
.role-option.selected .role-content h4 {
    color: var(--primary-color);
}

/* Responsive Role Selection */
@media (max-width: 576px) {
    .role-selection {
        flex-direction: column;
    }
    
    .role-label {
        padding: 1.25rem;
    }
    
    .role-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Animation Enhancements */
@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 8px 30px rgba(79, 70, 229, 0.3); 
    }
    50% { 
        box-shadow: 0 12px 40px rgba(79, 70, 229, 0.5); 
    }
}