/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary-500: #2196f3;
    --primary-600: #1e88e5;
    --primary-700: #1976d2;
    --primary-color: var(--primary-600);
    --primary-hover: var(--primary-700);
    
    /* Accent Colors */
    --secondary-color: #2c3e50;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Text Colors */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --text-light: #9ca3af;
    --text-inverse: #ffffff;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    /* Border Colors */
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --border-dark: #9ca3af;
    --border-color: #d1d5db;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== AUTH WRAPPER ===== */
.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-height: 650px;
}

/* ===== BRANDING SECTION WITH HERO IMAGE ===== */
.auth-branding {
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    overflow: hidden;
}

/* Hero Background Image */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

/* Dark Overlay for Better Text Readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%);
    z-index: 1;
}

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

/* Logo Hero Styling */
.brand-logo-hero {
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease;
}

.logo-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Brand Title */
.brand-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin: 0 0 1rem 0;
    letter-spacing: 2px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease 0.2s both;
}

/* Brand Slogan */
.brand-slogan {
    font-size: 1.4rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 3rem 0;
    font-style: italic;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease 0.4s both;
}

.brand-tagline {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 400;
}

.brand-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    animation: fadeInUp 1s ease 0.6s both;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-item span {
    font-weight: 500;
}

.feature-item svg {
    flex-shrink: 0;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ===== FORMS SECTION ===== */
.auth-forms {
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.form-container {
    width: 100%;
    max-width: 420px;
}

.form-header {
    margin-bottom: 32px;
}

.form-tabs {
    display: flex;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-md);
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    font-family: 'Inter', sans-serif;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: width var(--transition);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(33, 150, 243, 0.05);
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.tab-btn.active::after {
    width: 60%;
}

/* ===== FORM STYLES ===== */
.form {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.form.active {
    display: block;
}

.form-content {
    display: flex;
    flex-direction: column;
}

.form h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.input-group input::placeholder {
    color: var(--text-light);
}

/* ===== FORM OPTIONS ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

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

.checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: #ffffff;
    border: 2.5px solid #667eea;
    border-radius: 4px;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.checkbox:hover .checkmark {
    border-color: #764ba2;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

.checkbox input:checked ~ .checkmark {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.forgot-link, .link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* ===== BUTTONS ===== */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-color);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Inter', sans-serif;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width var(--transition-slow), height var(--transition-slow);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: var(--shadow-md);
}

/* ===== FORM DIVIDER ===== */
.form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-light);
    font-size: 13px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.form-divider span {
    padding: 0 16px;
}

/* ===== SOCIAL LOGIN ===== */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid var(--border-medium);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-social::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(33, 150, 243, 0.1), transparent);
    transition: left var(--transition-slow);
}

.btn-social:hover::before {
    left: 100%;
}

.btn-social:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(33, 150, 243, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-social:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-social svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition);
}

.btn-social:hover svg {
    transform: scale(1.1);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 968px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-branding {
        display: none;
    }

    .auth-forms {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .auth-forms {
        padding: 35px 25px;
    }

    .form h2 {
        font-size: 26px;
    }

    .form-subtitle {
        font-size: 13px;
    }

    .input-group input {
        padding: 11px 14px;
        font-size: 14px;
    }

    .btn-primary {
        padding: 13px 20px;
        font-size: 14px;
    }

    .btn-social {
        padding: 11px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .auth-wrapper {
        min-height: auto;
    }

    .auth-forms {
        padding: 30px 20px;
    }

    .form h2 {
        font-size: 24px;
    }

    .form-subtitle {
        font-size: 12px;
        margin-bottom: 24px;
    }

    .input-group {
        margin-bottom: 16px;
    }

    .input-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .input-group input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .btn-primary {
        padding: 12px 18px;
        font-size: 14px;
    }

    .social-login {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .btn-social {
        padding: 10px 12px;
        font-size: 13px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .checkbox-label {
        font-size: 13px;
    }

    /* Hero Section Mobile */
    .brand-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .brand-slogan {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .logo-image {
        width: 80px;
        height: 80px;
    }

    .brand-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-item {
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    .feature-icon {
        font-size: 1.5rem;
    }

    .forgot-link {
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    body {
        padding: 5px;
    }

    .auth-forms {
        padding: 25px 15px;
    }

    .form h2 {
        font-size: 22px;
    }

    .form-subtitle {
        font-size: 11px;
    }

    .input-group input {
        padding: 9px 11px;
        font-size: 13px;
    }

    .btn-primary {
        padding: 11px 16px;
        font-size: 13px;
    }

    .btn-social {
        padding: 9px 11px;
        font-size: 12px;
    }

    .tab-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LEGACY SUPPORT (for existing pages) ===== */
.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.form.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
