:root {
    /* Brand Pattern Colors */
    --primary: #8b3aeb;
    --primary-hover: #732ebd;
    --dark: #111927;
    --text-main: #111927;
    --text-muted: #6C737F;
    --bg-page: #F5F3FF;
    /* Light Purple Background */
    --accent: #8b3aeb;
    /* Primary for highlights */
    --white: #FFFFFF;

    /* Layout Tokens */
    --card-radius: 24px;
    --input-radius: 12px;
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html,
body {
    height: 100%;
    margin: 0;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

.bg-vibrant {
    background-color: var(--bg-page);
    height: 100%;
}

/* AUTH WRAPPER & CARD */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    /* Use height 100% since body is 100% */
    padding: 20px;
}

.auth-card {
    display: flex;
    background: var(--white);
    width: 100%;
    max-width: 1050px;
    min-height: 480px;
    /* Reduced min-height for better fit */
    max-height: 90vh;
    /* Ensures it doesn't cross viewport limits */
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    animation: cardAppear 0.6s ease-out;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* LEFT SIDE: FORM */
.auth-form-side {
    flex: 1.1;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.brand {
    display: flex;
    justify-content: center; /* Center logo on all views */
    margin-bottom: 30px;
}

.logo-img {
    height: 55px;
    width: auto;
    object-fit: contain;
}


.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

.header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-align: center;
}

/* FORMS */
.modern-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group-modern label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 4px;
}

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

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--accent);
    font-size: 1.1rem;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 45px;
    border: 1px solid #E5E7EB;
    border-radius: var(--input-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: #F9FAFB;
}

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

.btn-toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    padding: 4px;
}

/* CHECKBOX & LINKS */
.form-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    margin-top: 5px;
}

.forgot-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

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

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-muted);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #E5E7EB;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: var(--transition);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* PRIMARY BUTTON style */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--input-radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    margin-top: 10px;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

/* PROMO SIDE */
.auth-promo-side {
    flex: 1;
    background: var(--dark);
    padding: 40px 40px 30px;
    /* Balanced padding */
    position: relative;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Try center again with smaller content */
    overflow: hidden;
    /* NO SCROLLBARS */
}

.promo-badge {
    position: absolute;
    top: 25px;
    right: -35px;
    /* Less aggressive to avoid H-scroll */
    background: #FFD600;
    color: #000;
    padding: 6px 40px;
    /* Narrower */
    font-size: 0.7rem;
    /* Smaller */
    font-weight: 800;
    transform: rotate(35deg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.promo-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    /* Reduced margin */
}

.promo-logo i {
    font-size: 1.8rem;
    color: var(--accent);
}

.auth-promo-side h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    /* Scaled down more */
    line-height: 1.3;
    margin-bottom: 12px;
}

.text-highlight {
    color: var(--accent);
}

.auth-promo-side p {
    font-size: 0.88rem;
    /* Scaled down more */
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin-bottom: 25px;
}

.btn-promo-cta {
    display: inline-block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 12px 40px;
    border-radius: 30px;
    font-weight: 700;
    transition: var(--transition);
}

.btn-promo-cta:hover {
    background: var(--white);
    color: #00B0FF;
    transform: scale(1.05);
}

.promo-visual {
    margin-top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.floating-img {
    width: 100%;
    max-width: 280px;
    /* More aggressive reduction */
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* ERROR ALERT */
.alert-modern-danger {
    background: #FEE2E2;
    color: #B91C1C;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    border-left: 4px solid #EF4444;
    animation: shake 0.5s ease-in-out;
}

.alert-modern-success {
    background: #DCFCE7;
    color: #166534;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    border-left: 4px solid #22C55E;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-footer {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* RESPONSIVITY */
@media (max-width: 992px) {
    .auth-card {
        flex-direction: column;
        max-width: 500px;
    }

    .auth-promo-side {
        display: none;
    }

    .auth-form-side {
        padding: 40px;
    }
}