.auth-popup-page {
    min-height: calc(100vh - 150px);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(210, 163, 211, 0.16) 0%, rgba(96, 62, 117, 0.18) 100%);
}

.auth-modal .modal-dialog {
    max-width: 980px;
}

.auth-modal .modal-content {
    box-shadow: none;
}

.auth-modal-close {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 20;
    background-color: rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    width: 32px;
    height: 32px;
}

.auth-frame-shell {
    width: min(1180px, 100%);
    border-radius: 20px;
    overflow: hidden;
    background: #e7d8ea;
    box-shadow: 0 18px 50px rgba(56, 23, 58, 0.22);
}

.auth-frame-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr minmax(380px, 42%);
    min-height: 540px;
    background: url("/static/images/login_reg_frame.png") center / cover no-repeat;
}

.auth-model-pane {
    position: relative;
    overflow: hidden;
}

.auth-model-pane img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-form-pane {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-popup-card {
    width: 100%;
    max-width: 390px;
    border-radius: 18px;
    padding: 1.15rem 1.05rem;
    background: rgba(239, 224, 241, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(3px);
    position: relative;
}

.auth-switch {
    display: flex;
    gap: 0.5rem;
}

.auth-switch-btn {
    border: 1px solid rgba(76, 43, 86, 0.2);
    background: rgba(255, 255, 255, 0.5);
    color: #3d274b;
    border-radius: 999px;
    padding: 0.28rem 0.85rem;
    font-weight: 700;
    font-size: 0.84rem;
}

.auth-switch-btn.active {
    background: linear-gradient(90deg, #8d4aa2 0%, #cf4ee8 100%);
    color: #fff;
    border-color: transparent;
}

.auth-popup-card::after {
    content: "";
    position: absolute;
    left: 0.8rem;
    bottom: 0.5rem;
    width: 72px;
    height: 72px;
    background: url("/static/images/flower_obj_login_popup.png") center / contain no-repeat;
    opacity: 0.35;
    pointer-events: none;
}

.auth-title {
    color: #351c3f;
    font-weight: 800;
    font-size: 1.65rem;
    margin-bottom: 0.2rem;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: #493652;
    margin-bottom: 0.75rem;
}

.auth-form-label {
    font-size: 0.92rem;
    color: #3c2a46;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.auth-input,
.auth-popup-card .form-control,
.auth-popup-card .otp-input {
    border-radius: 10px !important;
    border: 1px solid rgba(76, 43, 86, 0.15) !important;
    background: #f8f7f9 !important;
    min-height: 46px;
}

.auth-popup-card .otp-input {
    letter-spacing: 0.35rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.auth-help-text {
    font-size: 0.82rem;
    color: #5d4a67;
}

.auth-cta-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    min-height: 44px;
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
    background: var(--primary-color);
    box-shadow: 0 8px 20px rgba(135, 58, 164, 0.28);
}

.auth-cta-btn:hover,
.auth-cta-btn:focus {
    background: var(--secondary-color);
    color: #fff;
}

.auth-secondary-link {
    color: #472959;
    font-weight: 600;
    text-decoration: none;
}

.auth-secondary-link:hover {
    color: #6a3484;
}

.auth-phone-display {
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.75);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #4a3956;
    border: 1px solid rgba(76, 43, 86, 0.14);
}

@media (max-width: 991.98px) {
    .auth-frame-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-model-pane {
        min-height: 220px;
    }

    .auth-form-pane {
        padding: 1rem;
    }
}

@media (max-width: 767.98px) {
    .auth-popup-page {
        padding: 0.35rem;
        min-height: calc(100vh - 90px);
    }

    .auth-frame-shell {
        border-radius: 12px;
    }

    .auth-frame-inner {
        background-position: center right;
    }

    .auth-model-pane {
        min-height: 170px;
    }

    .auth-popup-card {
        max-width: 100%;
        border-radius: 12px;
        padding: 0.95rem 0.85rem;
    }

    .auth-popup-card::after {
        width: 62px;
        height: 62px;
        left: 0.6rem;
    }

    .auth-title {
        font-size: 1.35rem;
    }

    .auth-subtitle {
        font-size: 0.82rem;
    }

    .auth-cta-btn {
        font-size: 0.98rem;
        min-height: 40px;
    }
}
