:root {
    --qf-primary: #662D61;
    --qf-primary-dark: #4f234b;
    --qf-primary-light: #f3eaf2;
    --qf-primary-soft: #ede0ec;
    --qf-white: #ffffff;
    --qf-text: #1f1a24;
    --qf-muted: #5c5260;
    --qf-border: #c4b5c2;
    --qf-placeholder: #6e6270;
}

* {
    box-sizing: border-box;
}

html,
body.login-body {
    margin: 0;
    height: 100%;
    overflow: hidden;
}

body.login-body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(90deg, var(--qf-primary) 0%, var(--qf-primary) 50%, #f7f4f8 50%, #f7f4f8 100%);
}

.login-page {
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .75rem 1rem;
    gap: .75rem;
    overflow: hidden;
}

.login-page-title {
    text-align: center;
    margin-bottom: 0;
    flex-shrink: 0;
}

.login-page-title-inner {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    background: var(--qf-white);
    padding: .6rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 .5rem 1.5rem rgba(102, 45, 97, .18);
}

.login-page-title .brand-logo-wrap {
    margin-bottom: 0;
}

.login-page-title .brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 .35rem 1rem rgba(102, 45, 97, .2);
}

.login-page-title .brand-main {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--qf-primary);
    letter-spacing: 1.5px;
    line-height: 1;
}

.login-page-title .brand-sub {
    display: none;
}

.login-shell {
    width: 100%;
    max-width: 980px;
    max-height: calc(100dvh - 70px);
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 auto;
    background: var(--qf-white);
    border-radius: .35rem;
    overflow: hidden;
    box-shadow: 0 1rem 2.5rem rgba(102, 45, 97, .16);
    display: flex;
    flex-direction: column;
}

.login-shell > .row {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    margin: 0;
    align-items: stretch;
}

.login-shell > .row > [class*="col-"] {
    min-height: 0;
}

.login-form-side {
    padding: 1.5rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.login-form-brand .brand-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    margin-bottom: .85rem;
}

.login-form-brand .brand-main {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--qf-primary);
    letter-spacing: 1px;
}

.login-form-brand .brand-sub {
    color: var(--qf-muted);
    font-size: .95rem;
    font-weight: 500;
    margin-bottom: 1.75rem;
}

.login-form-side .form-label {
    font-size: .92rem;
    font-weight: 600;
    color: var(--qf-text);
    margin-bottom: .5rem;
}

.login-form-side .form-control,
.login-form-side .form-select {
    border: 1px solid var(--qf-border);
    border-radius: .35rem;
    min-height: 42px;
    font-size: .92rem;
    font-weight: 500;
    color: var(--qf-text);
    background: var(--qf-white);
}

.login-form-side .form-control::placeholder {
    color: var(--qf-placeholder);
    opacity: 1;
    font-weight: 400;
}

.login-form-side .input-group {
    border: 1px solid var(--qf-border);
    border-radius: .35rem;
    overflow: hidden;
    background: var(--qf-white);
}

.login-form-side .input-group:focus-within {
    border-color: var(--qf-primary);
    box-shadow: 0 0 0 .2rem rgba(102, 45, 97, .15);
}

.login-form-side .input-group-text {
    background: #faf8fb;
    border: 0;
    color: var(--qf-primary);
    font-size: 1.05rem;
    padding-inline: .9rem;
}

.login-form-side .input-group .form-control {
    border: 0;
    box-shadow: none;
}

.login-form-side .input-group .form-control:focus {
    box-shadow: none;
}

.password-toggle-wrap {
    position: relative;
    border: 1px solid var(--qf-border);
    border-radius: .35rem;
    background: var(--qf-white);
}

.password-toggle-wrap:focus-within {
    border-color: var(--qf-primary);
    box-shadow: 0 0 0 .2rem rgba(102, 45, 97, .15);
}

.password-toggle-wrap .form-control {
    border: 0;
    box-shadow: none;
    padding-right: 2.75rem;
}

.login-form-side .form-control:focus,
.login-form-side .form-select:focus {
    border-color: var(--qf-primary);
    box-shadow: 0 0 0 .2rem rgba(102, 45, 97, .15);
}

.login-form-side .form-check-input:checked {
    background-color: var(--qf-primary);
    border-color: var(--qf-primary);
}

.mobile-group .input-group-text {
    background: var(--qf-white);
    border-right: 0;
    color: var(--qf-primary);
    min-width: 110px;
}

.mobile-group .form-select {
    border-left: 0;
    border-right: 0;
    max-width: 130px;
}

.mobile-group .form-control {
    border-left: 0;
}

.password-toggle-btn {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--qf-muted);
    padding: 0;
    line-height: 1;
}

.password-toggle-btn:hover {
    color: var(--qf-primary);
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: .75rem 0 1rem;
    font-size: .88rem;
}

.login-options .form-check-label {
    color: var(--qf-text);
    font-weight: 500;
}

.login-options a {
    color: var(--qf-primary);
    font-weight: 600;
    text-decoration: none;
}

.login-options a:hover {
    color: var(--qf-primary-dark);
}

.btn-login {
    background: var(--qf-primary);
    border-color: var(--qf-primary);
    color: var(--qf-white);
    min-height: 42px;
    font-size: .95rem;
    font-weight: 600;
    border-radius: .25rem;
}

.btn-login:hover,
.btn-login:focus {
    background: var(--qf-primary-dark);
    border-color: var(--qf-primary-dark);
    color: var(--qf-white);
}

.login-footer-note {
    margin-top: 1rem;
    font-size: .78rem;
    color: var(--qf-muted);
    font-weight: 500;
}

.login-brand-side {
    background: var(--qf-primary-light);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
}

.login-brand-side::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C200,120 400,0 600,60 C800,120 1000,0 1200,60 L1200,120 L0,120 Z' fill='%23e8d5e6'/%3E%3C/svg%3E") no-repeat bottom center;
    background-size: cover;
    opacity: .8;
}

.brand-visual {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 360px;
}

.brand-visual .brand-logo-large {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: .5rem;
    box-shadow: 0 .75rem 1.5rem rgba(102, 45, 97, .18);
}

.brand-visual h2 {
    color: var(--qf-primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .25rem;
}

.brand-visual p {
    color: #6d5f6c;
    margin-bottom: .75rem;
    font-size: .88rem;
}

.icon-orbit {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.icon-orbit .center-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--qf-white);
    color: var(--qf-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 .5rem 1.5rem rgba(102, 45, 97, .18);
}

.icon-orbit .orbit-icon {
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--qf-white);
    color: var(--qf-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 .35rem 1rem rgba(102, 45, 97, .12);
}

.icon-orbit .orbit-icon:nth-child(2) { top: 4px; left: 50%; transform: translateX(-50%); }
.icon-orbit .orbit-icon:nth-child(3) { top: 30px; right: 12px; }
.icon-orbit .orbit-icon:nth-child(4) { bottom: 30px; right: 12px; }
.icon-orbit .orbit-icon:nth-child(5) { bottom: 4px; left: 50%; transform: translateX(-50%); }
.icon-orbit .orbit-icon:nth-child(6) { bottom: 30px; left: 12px; }
.icon-orbit .orbit-icon:nth-child(7) { top: 30px; left: 12px; }

.otp-panel .otp-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--qf-primary-light);
    color: var(--qf-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.otp-panel .alert {
    background: var(--qf-primary-light);
    border: 1px solid #dbc9d9;
    color: var(--qf-text);
    font-size: .92rem;
    font-weight: 500;
}

.otp-panel .btn-link {
    color: var(--qf-primary);
    font-weight: 600;
}

/* iziToast readability */
.iziToast {
    border: 1px solid #ddd3dc !important;
    box-shadow: 0 .75rem 1.75rem rgba(31, 26, 36, .18) !important;
}

.iziToast > .iziToast-body .iziToast-texts .iziToast-message {
    font-weight: 600 !important;
    line-height: 1.45 !important;
}

.iziToast > .iziToast-close {
    opacity: .7;
}

@media (max-width: 991.98px) {
    body.login-body {
        background: #f7f4f8;
    }

    .login-page {
        padding: .5rem;
        gap: .5rem;
    }

    .login-form-side {
        padding: 1.25rem 1.25rem;
        overflow-y: auto;
    }

    .login-brand-side {
        display: none !important;
    }
}

@media (max-height: 720px) {
    .login-page-title-inner {
        padding: .45rem 1rem;
    }

    .login-page-title .brand-logo {
        width: 36px;
        height: 36px;
    }

    .login-page-title .brand-main {
        font-size: 1.25rem;
    }

    .login-form-side {
        padding: 1rem 1.25rem;
    }

    .login-form-side .mb-3,
    .login-form-side .mb-2 {
        margin-bottom: .65rem !important;
    }

    .login-footer-note {
        margin-top: .65rem;
    }

    .icon-orbit {
        width: 170px;
        height: 170px;
    }
}
