/* ===== CSS RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

:root {
    /* Updated Color Palette */
    --primary-black: #1A1A1A;
    --secondary-black: #2D2D2D;
    --dark-grey: #404040;
    --medium-grey: #666666;
    --light-grey: #F8F8F8;
    --white: #FFFFFF;
    
    /* Accent Colors */
    --blue-primary: #0066ff;
    --blue-light: #E6F0FF;
    --accent-gold: #D4AF37;
    --accent-blue: #009cf7;
    
    /* Text Colors */
    --text-dark: #1A1A1A;
    --text-medium: #404040;
    --text-light: #666666;
    --text-white: #FFFFFF;
    
    /* Gradients */
    --gradient-premium: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-light) 100%);
    --gradient-dark: linear-gradient(135deg, #000000 0%, #2D2D2D 100%);
    --gradient-light: linear-gradient(135deg, #FFFFFF 0%, #F8F8F8 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(26, 26, 26, 0.05);
    --shadow-md: 0 4px 16px rgba(26, 26, 26, 0.08);
    --shadow-lg: 0 8px 32px rgba(26, 26, 26, 0.12);
    --shadow-xl: 0 12px 48px rgba(26, 26, 26, 0.15);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 96px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--gradient-light);
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--primary-black);
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 50px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text .site-name {
    font-size: 1.50rem;
    font-weight: 700;
    color: var(--blue-primary);
    font-family: 'Poppins', sans-serif;
}

.logo-text .tagline {
    font-size: 0.75rem;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

/* ===== AUTH CONTAINER ===== */
.auth-container {
    display: flex;
    min-height: calc(100vh - var(--header-height));
    align-items: flex-start;
    justify-content: center;
    padding: calc(var(--header-height) + 40px) 20px 60px;
    width: 100%;
    scroll-margin-top: calc(var(--header-height) + 16px);
}

.auth-wrapper {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    margin: 0 auto;
}

/* Left Panel */
.auth-left {
    flex: 1;
    background: var(--gradient-premium);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80') center/cover;
    opacity: 0.1;
}

.auth-left-content {
    position: relative;
    z-index: 2;
    color: var(--text-dark);
}

.auth-left h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
}

.auth-left p {
    font-size: 1.125rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.benefits-list {
    list-style: none;
    margin-top: 40px;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 1rem;
}

.benefits-list i {
    color: var(--accent-gold);
    font-size: 1.25rem;
}

/* Right Panel */
.auth-right {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--light-grey);
    padding-bottom: 20px;
}

.auth-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
    font-family: 'Poppins', sans-serif;
}

.auth-tab.active {
    color: var(--blue-primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-premium);
}

.auth-form {
    display: none;
    animation: fadeIn 0.5s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--light-grey);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition-fast);
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.125rem;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 4px;
    accent-color: var(--blue-primary);
}

.terms-checkbox label {
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.5;
}

.terms-checkbox a {
    color: var(--blue-primary);
    text-decoration: none;
    font-weight: 500;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

.btn-auth {
    width: 100%;
    padding: 16px;
    background: var(--gradient-premium);
    color: var(--text-dark);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: 'Poppins', sans-serif;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 102, 255, 0.3);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-light);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--light-grey);
}

.divider span {
    padding: 0 16px;
    white-space: nowrap;
}

/* Google Sign-in Button */
.btn-google {
    width: 100%;
    padding: 14px 16px;
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid #E5E7EB;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-google:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
    box-shadow: var(--shadow-sm);
}

.btn-google svg {
    flex-shrink: 0;
}

.form-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--light-grey);
    color: var(--text-medium);
    font-size: 0.875rem;
}

.form-footer a {
    color: var(--blue-primary);
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background: #FEE;
    color: #D00;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: none;
    align-items: center;
    gap: 10px;
    border: 1px solid #FCC;
}

.error-message.active {
    display: flex;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.success-message {
    background: #EFE;
    color: #0A0;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: none;
    align-items: center;
    gap: 10px;
    border: 1px solid #CFC;
}

.success-message.active {
    display: flex;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--text-dark);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.strength-weak { background: #ff4444; }
.strength-fair { background: #ffbb33; }
.strength-good { background: #00C851; }
.strength-strong { background: #007E33; }

.password-strength-text {
    font-size: 0.75rem;
    margin-top: 4px;
    color: var(--text-light);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .auth-wrapper {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
        margin: 0 20px;
    }

    .auth-left {
        padding: 40px 30px;
        text-align: center;
    }

    .auth-right {
        padding: 40px 30px;
    }

    .auth-left h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 80px;
    }

    .auth-container {
        padding: calc(var(--header-height) + 25px) 15px 40px;
    }
    
    .auth-wrapper {
        margin: 0 20px;
    }
    
    .header-content {
        padding: 20px 16px;
    }
}

@media (max-width: 576px) {
    :root {
        --header-height: 72px;
    }

    .auth-container {
        padding: calc(var(--header-height) + 12px) 12px 24px;
    }
    
    .auth-wrapper {
        margin: 0 12px;
    }

    .auth-left,
    .auth-right {
        padding: 30px 20px;
    }

    .auth-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .auth-tab {
        width: 100%;
        text-align: center;
    }

    .auth-tab.active::after {
        width: 100%;
        bottom: -10px;
    }
}

/* Admin Panel Button */
.admin-panel-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--blue-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: var(--transition-normal);
}

.admin-panel-btn:hover {
    transform: scale(1.1);
    background: #0052cc;
}
