:root {
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --primary-light: #E6F0FF;
    --secondary: #00D4AA;
    --secondary-dark: #00B894;
    --dark: #0A1628;
    --dark-lighter: #1A2942;
    --gray-100: #F8FAFC;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --white: #FFFFFF;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --gradient-primary: linear-gradient(135deg, #0066FF 0%, #00D4AA 100%);
    --gradient-dark: linear-gradient(135deg, #0A1628 0%, #1A2942 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-100);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--white);
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
}

.logo-text span {
    color: var(--primary);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-nav a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.header-nav a:hover {
    color: var(--primary);
}

.header-btn {
    padding: 10px 24px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.auth-container {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.1);
}

/* Branding Section */
.branding-section {
    background: var(--gradient-primary);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.branding-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.branding-content {
    position: relative;
    z-index: 1;
}

.branding-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.branding-content h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.branding-content p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.7;
    margin-bottom: 40px;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.branding-feature {
    display: flex;
    align-items: center;
    gap: 16px;
}

.branding-feature .icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.branding-feature .text {
    font-size: 15px;
    font-weight: 500;
}

/* Form Section */
.form-section {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-height: 100%;
}

.form-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 40px;
    background: var(--gray-100);
    padding: 6px;
    border-radius: 14px;
}

.form-tab {
    flex: 1;
    padding: 14px 24px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-tab.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 2px 10px rgba(0, 102, 255, 0.1);
}

.form-tab:hover:not(.active) {
    color: var(--gray-600);
}

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: none;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.alert.show {
    display: flex;
}

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

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

.form-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-header p {
    color: var(--gray-500);
    font-size: 15px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 15px;
    color: var(--dark);
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.input-wrapper input.error {
    border-color: var(--error);
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
}

.input-wrapper .toggle-password:hover {
    color: var(--gray-600);
}

.error-message {
    color: var(--error);
    font-size: 12px;
    margin-top: 8px;
    padding-left: 16px;
}

.error-message.show {
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.remember-me input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.remember-me span {
    font-size: 14px;
    color: var(--gray-600);
}

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

.forgot-password:hover {
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 102, 255, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 32px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.divider span {
    font-size: 13px;
    color: var(--gray-400);
    font-weight: 500;
}

.social-login {
    display: flex;
    gap: 16px;
}

.social-btn {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--gray-300);
    background: var(--gray-100);
}

.social-btn img, .social-btn svg {
    width: 22px;
    height: 22px;
}

.password-strength {
    margin-top: 12px;
}

.strength-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
}

.strength-fill.weak { width: 33%; background: var(--error); }
.strength-fill.medium { width: 66%; background: var(--warning); }
.strength-fill.strong { width: 100%; background: var(--success); }

.strength-text {
    font-size: 12px;
    color: var(--gray-500);
}

.terms-text {
    margin-top: 28px;
    font-size: 13px;
    color: var(--gray-500);
    text-align: center;
    line-height: 1.6;
}

.terms-text a {
    color: var(--primary);
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.form-check label {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 0;
    line-height: 1.5;
}

.form-check label a {
    color: var(--primary);
    text-decoration: none;
}

.form-check label a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--gray-400);
    padding: 40px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo .logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-column h4 {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-column ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 14px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--white);
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .branding-section {
        display: none;
    }

    .header-nav {
        display: none;
    }

    .footer-links {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 40px 16px;
    }

    .form-section {
        padding: 40px 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .social-login {
        flex-direction: column;
    }

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

    .footer-top {
        flex-direction: column;
        gap: 32px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}