:root {
    --primary: #7b2cbf;
    --primary-dark: #5a189a;
    --primary-light: #9d4edd;
    --primary-extra-light: #e0aaff;
    --error: #e63946;
    --success: #2a9d8f;
    --text: #2b2d42;
    --text-light: #6c757d;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --gradient-start: #f3e5ff;
    --gradient-end: #e9d4ff;
}

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

body {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    font-family: "Poppins", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    color: var(--text);
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(123, 44, 191, 0.15);
    overflow: hidden;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.auth-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(123, 44, 191, 0.25);
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.illustration-side {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.illustration-side::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 8s infinite linear;
}

@keyframes pulse {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.illustration {
    width: 100%;
    max-width: 380px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease;
}

.illustration:hover {
    transform: scale(1.05) rotate(5deg);
}

.illustration-caption {
    color: white;
    text-align: center;
    margin-top: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.illustration-caption h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.illustration-caption p {
    font-size: 1rem;
    opacity: 0.9;
}

.form-side {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.form-side h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    font-weight: 700;
}

.subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 16px 50px 16px 18px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
    background-color: var(--light-gray);
    font-family: "Poppins", sans-serif;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(123, 44, 191, 0.15);
    background-color: var(--white);
}

.field-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    opacity: 0.7;
}

.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.toggle-password img {
    height: 20px;
    width: 20px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.toggle-password:hover img {
    opacity: 1;
}

.btn-login {
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 16px 0;
    width: 100%;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(123, 44, 191, 0.4);
}

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

.btn-login:active {
    transform: translateY(-1px);
}

.form-footer {
    margin-top: 2rem;
}

.register-link {
    margin-top: 1.5rem;
    color: var(--text-light);
    text-align: center;
    font-size: 15px;
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.register-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.register-link a:hover {
    color: var(--primary-dark);
}

.register-link a:hover::after {
    width: 100%;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
}

.toast.error {
    background-color: var(--error);
}

.toast.success {
    background-color: var(--success);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
    }

    .illustration-side {
        padding: 2rem 1.5rem;
    }

    .illustration {
        max-width: 250px;
    }

    .illustration-caption {
        margin-top: 1rem;
    }

    .illustration-caption h2 {
        font-size: 1.5rem;
    }

    .form-side {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        border-radius: 16px;
    }

    .form-side {
        padding: 1.5rem;
    }

    .form-side h1 {
        font-size: 1.8rem;
    }

    .input-group input {
        padding: 14px 15px 14px 15px;
    }
}