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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow-x: hidden;
}

/* Random background image */
.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* Overlay for better readability */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.5) 100%);
    z-index: -1;
    backdrop-filter: blur(2px);
}

.auth-wrapper {
    display: flex;
    width: 100%;
    max-width: 1050px;
    min-height: 620px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Brand Panel */
.brand-panel {
    width: 42%;
    background: linear-gradient(160deg,
            rgba(34, 197, 94, 0.9) 0%,
            rgba(22, 163, 74, 0.9) 50%,
            rgba(16, 185, 129, 0.9) 100%);
    padding: 3.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -40px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.brand-logo {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.8rem;
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.brand-panel h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.brand-panel p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    max-width: 280px;
}

.brand-features {
    display: flex;
    gap: 1.8rem;
    margin-top: 2.5rem;
    position: relative;
    z-index: 1;
}

.feature-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.feature-dot span:first-child {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.feature-dot span:last-child {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

/* Forms Panel */
.forms-panel {
    width: 58%;
    padding: 3rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.form-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.form-header {
    margin-bottom: 2.2rem;
}

.form-header .welcome-tag {
    display: inline-block;
    background: var(--light);
    color: var(--secondary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    letter-spacing: 0.03em;
    margin-bottom: 0.9rem;
}

.form-header h3 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--gray-700);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.form-header p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 0.4rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

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

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: #b0bdb0;
    font-size: 1rem;
    transition: var(--transition);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--gray-700);
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

.input-wrapper input:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.input-wrapper input:focus~i {
    color: var(--primary);
}

.input-wrapper input::placeholder {
    color: #b0bdb0;
}

.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.84rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

.forgot-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

.btn-primary {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.01em;
    font-family: inherit;
}

.btn-primary:hover {
    background: var(--secondary);
    box-shadow: 0 8px 20px -6px rgba(22, 163, 74, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.switch-prompt {
    text-align: center;
    margin-top: 1.8rem;
    font-size: 0.88rem;
    color: var(--gray-600);
}

.switch-btn {
    background: none;
    border: none;
    color: var(--secondary);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.88rem;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.switch-btn:hover {
    color: var(--primary);
}

.register-form {
    display: none;
}

.forms-panel.show-register .login-form {
    display: none;
}

.forms-panel.show-register .register-form {
    display: block;
}

/* Responsive */
@media (max-width: 860px) {
    .auth-wrapper {
        flex-direction: column;
        max-width: 460px;
        min-height: auto;
    }

    .brand-panel {
        width: 100%;
        padding: 2.2rem 2rem;
        flex-direction: row;
        gap: 1.5rem;
        text-align: left;
    }

    .brand-logo {
        width: 50px;
        height: 50px;
        border-radius: 14px;
        font-size: 1.5rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .brand-panel h2 {
        font-size: 1.3rem;
        margin-bottom: 0.2rem;
    }

    .brand-panel p {
        font-size: 0.8rem;
    }

    .brand-features {
        display: none;
    }

    .forms-panel {
        width: 100%;
        padding: 2rem 1.8rem;
    }

    .brand-text-group {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.8rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .auth-wrapper {
        border-radius: 18px;
    }

    .forms-panel {
        padding: 1.8rem 1.2rem;
    }

    .form-header h3 {
        font-size: 1.4rem;
    }
}