/* ============================================
   CSS VARIABLES
   ============================================ */
   :root {
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-glow: rgba(99, 102, 241, 0.4);
    
    --success-500: #10b981;
    --error-500: #ef4444;
    --warning-500: #f59e0b;
    
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --glass-backdrop: blur(20px) saturate(180%);
    
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    --font-heading: 'Outfit', system-ui, sans-serif;
    --font-body: 'Space Grotesk', system-ui, sans-serif;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px var(--primary-glow);
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--gray-900);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.auth-animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, #f0f4ff 0%, #fafafa 100%);
}

.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.sphere-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent);
    top: -200px;
    left: -200px;
}

.sphere-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent);
    top: 50%;
    right: -150px;
    animation-delay: -7s;
}

.sphere-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3), transparent);
    bottom: -100px;
    left: 30%;
    animation-delay: -14s;
}

.gradient-mesh {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(at 20% 30%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 20%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 70% 80%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ============================================
   AUTH WRAPPER
   ============================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-6);
    position: relative;
}

/* Back to Home Button */
.btn-back-home {
    position: absolute;
    top: var(--space-6);
    left: var(--space-6);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
}

.btn-back-home:hover {
    background: white;
    color: var(--primary-600);
    transform: translateX(-4px);
}

/* ============================================
   AUTH CONTAINER
   ============================================ */
.auth-container {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

/* ============================================
   LEFT SIDE - BRANDING
   ============================================ */
.auth-branding {
    background: var(--primary-gradient);
    padding: var(--space-12) var(--space-8);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h60v60H0z' fill='none'/%3E%3Cpath d='M30 0v60M0 30h60' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.branding-content {
    position: relative;
    z-index: 1;
}

.logo-modern {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-lg);
}

.logo-modern img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.branding-title {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: 900;
    color: white;
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.gradient-text-flow {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.branding-description {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-10);
    line-height: 1.6;
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.feature-item {
    display: flex;
    align-items: start;
    gap: var(--space-4);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    color: white;
    flex-shrink: 0;
}

.feature-text h4 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-1);
}

.feature-text p {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   RIGHT SIDE - FORM
   ============================================ */
.auth-form-container {
    padding: var(--space-12) var(--space-8);
    display: flex;
    align-items: center;
}

.auth-form-glass {
    width: 100%;
}

/* Form Header */
.form-header {
    margin-bottom: var(--space-8);
}

.form-title {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.form-subtitle {
    font-size: var(--text-base);
    color: var(--gray-600);
}

/* Alert */
.alert-modern {
    display: flex;
    align-items: start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--error-500);
    font-size: var(--text-lg);
}

.alert-content p {
    font-size: var(--text-sm);
    color: var(--error-500);
    margin: 0;
}

/* Form */
.modern-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label-modern {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-700);
}

.form-label-modern i {
    color: var(--gray-400);
    font-size: var(--text-base);
}

.input-wrapper-modern {
    position: relative;
}

.input-modern {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--gray-900);
    transition: var(--transition-base);
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-modern::placeholder {
    color: var(--gray-400);
}

/* Password Toggle */
.password-wrapper {
    position: relative;
}

.btn-toggle-password {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-2);
    transition: var(--transition-base);
}

.btn-toggle-password:hover {
    color: var(--primary-600);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-modern {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
}

.checkbox-modern input {
    display: none;
}

.checkbox-ui {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    background: white;
}

.checkbox-modern input:checked ~ .checkbox-ui {
    background: var(--primary-gradient);
    border-color: var(--primary-500);
}

.checkbox-ui i {
    font-size: 12px;
    color: white;
    opacity: 0;
    transition: var(--transition-fast);
}

.checkbox-modern input:checked ~ .checkbox-ui i {
    opacity: 1;
}

.checkbox-text {
    font-size: var(--text-sm);
    color: var(--gray-700);
}

.link-modern {
    font-size: var(--text-sm);
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
}

.link-modern:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

/* Submit Button */
.btn-submit-modern {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
}

.btn-submit-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-submit-modern i {
    transition: var(--transition-base);
}

.btn-submit-modern:hover i {
    transform: translateX(4px);
}

/* Divider */
.divider-modern {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-8) 0;
}

.divider-modern::before,
.divider-modern::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.divider-modern span {
    font-size: var(--text-sm);
    color: var(--gray-500);
    font-weight: 500;
}

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-social:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.btn-social i {
    font-size: var(--text-lg);
}

.btn-social.google i {
    color: #ea4335;
}

.btn-social.linkedin i {
    color: #0077b5;
}

/* Form Footer */
.form-footer {
    margin-top: var(--space-6);
    text-align: center;
}

.footer-text {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.link-primary {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition-base);
}

.link-primary:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .auth-branding {
        display: none;
    }
    
    .auth-form-container {
        padding: var(--space-10) var(--space-6);
    }
}

@media (max-width: 640px) {
    .auth-wrapper {
        padding: var(--space-6) var(--space-4);
    }
    
    .btn-back-home {
        top: var(--space-4);
        left: var(--space-4);
    }
    
    .btn-back-home span {
        display: none;
    }
    
    .auth-form-container {
        padding: var(--space-8) var(--space-5);
    }
    
    .form-title {
        font-size: var(--text-2xl);
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }
}

/* ============================================
   ROLE SELECTION CARDS
   ============================================ */
   .role-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.role-card {
    cursor: pointer;
    position: relative;
}

.role-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5);
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    transition: var(--transition-base);
    position: relative;
}

.role-card:hover .role-card-content {
    border-color: var(--primary-500);
    background: rgba(99, 102, 241, 0.02);
}

.role-card input:checked ~ .role-card-content {
    border-color: var(--primary-500);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.role-icon {
    width: 60px;
    height: 60px;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    color: var(--gray-500);
    transition: var(--transition-base);
}

.role-card input:checked ~ .role-card-content .role-icon {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.role-info {
    text-align: center;
}

.role-info h4 {
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.role-info p {
    font-size: var(--text-xs);
    color: var(--gray-600);
}

.role-check {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-base);
}

.role-check i {
    color: var(--primary-600);
    font-size: var(--text-lg);
}

.role-card input:checked ~ .role-card-content .role-check {
    opacity: 1;
}

/* ============================================
   PASSWORD STRENGTH INDICATOR
   ============================================ */
.password-strength {
    margin-top: var(--space-2);
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: var(--transition-base);
    border-radius: var(--radius-full);
}

.strength-text {
    font-size: var(--text-xs);
    font-weight: 600;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS FOR REGISTER
   ============================================ */
@media (max-width: 640px) {
    .role-selection {
        grid-template-columns: 1fr;
    }
    
    .role-card-content {
        flex-direction: row;
        text-align: left;
    }
    
    .role-info {
        text-align: left;
        flex: 1;
    }
    
    .role-icon {
        width: 50px;
        height: 50px;
        font-size: var(--text-xl);
    }
}

/* ============================================
   ENHANCED CHECKBOX FOR TERMS
   ============================================ */
.checkbox-text a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-text a:hover {
    text-decoration: underline;
}


/* ============================================
   FORGOT PASSWORD SPECIFIC STYLES
   ============================================ */
   .forgot-password-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.forgot-password-glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-12) var(--space-8);
    box-shadow: var(--shadow-2xl);
}

.forgot-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-8);
}

.forgot-icon-bg {
    width: 100px;
    height: 100px;
    background: var(--primary-gradient);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-5xl);
    color: white;
    box-shadow: var(--shadow-glow);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-glow);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 60px var(--primary-glow);
    }
}

/* Alert Success */
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-success .alert-icon {
    color: var(--success-500);
}

.alert-success h4 {
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--success-500);
    margin-bottom: var(--space-1);
}

.alert-success p {
    color: var(--success-600);
}

/* Input Helper Text */
.input-helper {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-top: var(--space-2);
}

/* Info Box */
.info-box-modern {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-5);
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-xl);
    margin-top: var(--space-6);
}

.info-icon {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    color: var(--primary-600);
    flex-shrink: 0;
}

.info-content h4 {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.info-content p {
    font-size: var(--text-xs);
    color: var(--gray-600);
    line-height: 1.5;
}

/* ============================================
   PASSWORD REQUIREMENTS
   ============================================ */
.password-requirements {
    padding: var(--space-5);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-6);
}

.password-requirements h4 {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
}

.requirements-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.requirements-list li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--gray-600);
    transition: var(--transition-base);
}

.requirements-list li i {
    color: var(--error-500);
    font-size: var(--text-base);
    transition: var(--transition-base);
}

.requirements-list li.met {
    color: var(--success-600);
}

.requirements-list li.met i {
    color: var(--success-500);
}

/* Loading State for Submit Button */
.btn-submit-modern:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE FOR FORGOT PASSWORD
   ============================================ */
@media (max-width: 640px) {
    .forgot-password-glass {
        padding: var(--space-8) var(--space-6);
    }
    
    .forgot-icon-bg {
        width: 80px;
        height: 80px;
        font-size: var(--text-4xl);
    }
    
    .form-header {
        margin-bottom: var(--space-6);
    }
    
    .form-title {
        font-size: var(--text-2xl);
    }
    
    .info-box-modern {
        flex-direction: column;
        text-align: center;
    }
    
    .info-icon {
        margin: 0 auto;
    }
}
