.mainWindow {
    border-top: 5px solid #C7C7C7;
}

body.mobile .auth-window {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    max-height: calc(100vh - 32px) !important;
    width: min(92%, 320px) !important;
}

body.mobile .auth-window .x-window-body {
    overflow-y: auto !important;
    max-height: calc(100vh - 72px) !important;
}

body:not(.mobile) .auth-window.manual-setup-open {
    top: 6% !important;
    left: 50% !important;
    transform: translate(-50%, 0) !important;
    max-height: calc(100vh - 32px) !important;
}

body:not(.mobile) .auth-window.manual-setup-open .x-window-body {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

.auth-window .x-window-body {
    overflow-y: auto;
    max-height: calc(100vh - 128px);
}

.login-title {
    padding-bottom: 30px;
    font-size: 16px;
    font-weight: 400;
    text-align: center;
}

body.mobile .login-title {
    padding-bottom: 20px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 20px 0;
}

body.mobile .logo-container {
    padding: 12px 0 12px 0;
}

.logo-container .portal-logo {
    margin: 0;
}

.logo-container::after {
    content: var(--portal-environment);
    font-size: 22px;
    font-weight: bold;
    color: #000;
    text-shadow: 1px 1px 0px #EEE;
    text-transform: capitalize;
    line-height: 10px;
}

.vendor {
    width: 56px;
    height: 34px;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAiCAYAAAAKyxrjAAAACXBIWXMAAAsSAAALEgHS3X78AAADRklEQVRYhd1Zy23cMBAdB7kvj0Eu2XMQIMol16iDbAdRUsGmA5WgEtRB5AoidyB3oNxy1FbAgMDQfn6m+JHtALsDEFqSo+E8DjV85F5Za+WS5dUZYqtEZBSRWURcdNqY8uv/59ezySQiX3KNnWMEnZxyFc8V4JSreK4As+XiAXKSaUTkICJGP+Qr6q+07KFt0ayWvWzUfq22UBa1MxbYqimTuuza39XcPgilsw/FtRlr7dFaO9u4uP6G7HGprbVjwo6TRX0xK3ZiNkbU5Y3eRe8X1D+JyCAi77R+0tkZdbb9Oy7yO63fah0javS9r9B2o20zRRVtnbQ+UNRG2CpuKOLRCNaRmRkiM2q0HyNQQd9Eto6RKDv9nvR5ZWAE29iqyQXYJ5aeL+jYom0MLrWMfeHPpXopgFOmQxytVgvKUGCLgYwr7U8GWBc65W3sNYoo+0Jbh5UoZgNM7YP8AeeI0/+uyWcH+teQUHJlIFp2KHw/CZCzV670mv2ewxZm47r05RTAks0bxaX8j9S2FeCSobMqL0XVeCndPsHR0mX9QFIAzUa7vJRKv2MUpnNFkgJYvOZ1UjiC7pv8udHHFMBoEFIAmw1R5Oz5R0Q+i8iPQjuiE7wLtGNuiE5ACqAzfixwyATuSFz9rYh82JDm18bOBphL1arMjZnplWcfntEsET7LpQn44e2ZXP9yAS4ZINkhBIOMZMoAeQiwIEt0DSdzlSunADKrbwN0a08niTUQTMRDpLsK6DFZR96LZ9QgiU8B9LPJh91JZ5MHXxLcsAlEZtQSaq8ChL2iCUEfegaaAxCXTR8ANWsEm8zvy6juGqiOQDBAXo7+xgEJ+F0/n+hdWv4Ndb6TOTspoWqhdOw3de4zdDGVK7H3NjGaEoCNDo5OjHCPUmmf73ftHeiygwjEgE4DulhvQNeADbTzaBJKI+gvk3oYaNC+TgF3APKgz171/MZ9VL0W/kzB41UHzz2sEj+eJxMjHM1aLR06zQBzmEajhitl+kik+c7UnwS+6W9/ohhVb1anjvp8o/1MD/0Yfmyjv2dYQYPafHDE2wKwRJwD75WPotN+KXlHfTT/anunjvqL4Aba/QTeXw3eg390JLvsP0BF5B+rmPDTzg9c8wAAAABJRU5ErkJggg==');
    margin: 0 auto 0 auto;
    position: fixed;
    top: 50%;
    left: 50%;
    margin-top: 296px;
    margin-left: -28px;
}

.firm {
    display: block;
    margin: 30px auto 0 auto;
    color: #fff;
    font-size: 11px;
    text-align: center;
    width: 400px;
    height: 50px;
    position: fixed;
    top: 50%;
    left: 50%;
    margin-top: 260px;
    margin-left: -200px;
}

.msg-label {
    margin: 0;
    padding: 10px 30px;
    font-size: 13px;
    text-align: center;
    margin-top: 12px;
}

.msg-error {
    background-color: rgba(239, 85, 82, 0.2);
    color: #EF5350;
    border-radius: 4px;
}

.msg-ok {
    background-color: rgba(15, 142, 6, 0.2);
    color: #109006;
}

.auth-window .btn.btn-primary,
.auth-window .btn.btn-secondary,
.auth-window .external-login-buttons .btn {
    padding: 0.5em 1em;
}

.btn-login {
    margin-bottom: 12px;
}

.btn-forgotpassword,
.btn-changepassword {
    margin-bottom: 12px;
    font-size: 12px;
    color: #777;
    border: 0;
    text-align: right;
}

    .btn-forgotpassword:hover a,
    .btn-changepassword:hover .x-btn-inner {
        text-decoration: none;
    }

.btn-forgotpassword {
}

.btn-changepassword .x-btn-button {
    text-align: right;
    height: auto;
}

.btn-changepassword .x-btn-inner {
    text-decoration: underline;
}

.login-ct {
}

body.mobile .login-ct {
    padding: 20px 20px 16px;
}

body.mobile, body.mobile.x-viewport,
html:has(body.mobile), html:has(body.mobile) .x-viewport {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100%;
    -webkit-overflow-scrolling: touch;
}

.login-ct-base {
}

body.mobile .login-ct-base {
    padding-top: 16px;
    padding-bottom: 20px;
}

.is-external-login-enabled .login-ct-base {
    padding-right: 20px;
}

body.mobile .changepwd-window .login-ct,
body.mobile .resetpwd-window .login-ct {
    padding-bottom: 12px;
}

.changepwd-window .btn-cancel,
.resetpwd-window .btn-cancel {
    margin-top: 12px;
}

.login-form .x-box-target > :last-child {
    margin-bottom: 2px;
}




/* External login section */

.is-base-login-enabled .login-ct-external {
    padding-left: 20px;
    box-shadow: 0px 0px 0px 1px #CCC;
}

body.mobile .login-ct-external {
    padding-bottom: 12px;
}

body.mobile .is-base-login-enabled .login-ct-external {
    padding-top: 0;
    border: 0px none;
}

    body.mobile .is-base-login-enabled .login-ct-external .login-title {
        border-top: 1px solid #CCC;
        padding-top: 12px;
    }

.external-login-buttons {
}


    .external-login-buttons .btn {
        background-repeat: no-repeat;
        font-weight: 400;
        border: 1px solid #CCC;
    }

        .external-login-buttons .btn.is-over {
            background-color: #F0F0F0;
        }

        .external-login-buttons .btn + .btn {
            margin-top: 12px;
        }

        .external-login-buttons .btn:last-child {
            margin-bottom: 12px;
        }

        .external-login-buttons .btn.google {
            background-position: 6px center;
            background-image: url(../Img/ExternalAuthProviders/Google/g-normal.png);
        }

        .external-login-buttons .btn.microsoft,
        .external-login-buttons .btn.azuread,
        .external-login-buttons .btn.adfs {
            background-position: 8px center;
            background-size: 20px;
            background-image: url(../Img/ExternalAuthProviders/Microsoft/microsoft.svg);
        }

        .external-login-buttons .btn.oidc {
            background-position: 8px center;
            background-size: 20px;
            background-image: url(../Img/ExternalAuthProviders/OIDC/openid-icon-100x100.png);
        }

        .external-login-buttons .btn.external-login-type-saml {
            background-position: 8px center;
            background-size: 20px;
            background-image: url(../Img/ExternalAuthProviders/SAML/saml-logo.svg);
        }

        .external-login-buttons .btn .x-btn-button {
            justify-content: flex-start;
            padding-left: 26px;
        }


/* QRCode MFA */

div:has(> .mfa-qrcode-container) {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* allow children to stretch to full width */
    padding-bottom: 30px;
}

/* keep the visual QR box centered while letting siblings stretch */
.mfa-qrcode-container {
    align-self: center;
}

.mfa-qrcode-container {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 170px;
    border: 1px solid #FAB450;
    border-radius: 4px;
    height: 170px;
}

.login-title:has(.mfa-otp-title),
.login-title:has(.mfa-otp-error),
.login-title:has(.mfa-qrcode-title) {
    padding-bottom: 20px;
}

.mfa-otp-title,
.mfa-qrcode-title {
    font-size: 15px;
    line-height: 19px;
}

.mfa-otp-error {
    color: #EF5350;
}

.mfa-otp-cnt {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    padding-bottom: 30px;
    padding-top: 10px;
}

    .mfa-otp-cnt > input {
        width: 36px;
        height: 36px;
        border: 1px solid #222;
        border-radius: 4px;
        font-weight: 600;
        text-align: center;
    }

        .mfa-otp-cnt > input:hover,
        .mfa-otp-cnt > input:focus,
        .mfa-otp-cnt > input.with-value {
            border-color: #FAB450;
        }

.mfa-qrcode-details-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 20px;
    text-align: center;
    max-height: min(360px, calc(100vh - 220px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mfa-qrcode-detail {
    margin-bottom: 14px;
}

    .mfa-qrcode-detail:last-child {
        margin-bottom: 0;
    }

body.mobile .mfa-qrcode-details-container {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
    text-align: center;
}

body.mobile .mfa-qrcode-value {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
    width: auto;
    display: inline-block;
    text-align: center;
    max-width: 100%;
}

.mfa-qrcode-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mfa-qrcode-label-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.mfa-qrcode-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}

.mfa-qrcode-detail .mfa-qrcode-value {
    margin-bottom: 12px;
}

.mfa-qrcode-link-container .mfa-qrcode-open-authenticator {
    max-width: 100%;
    padding: 0.75em 1.25em;
    font-size: 0.95rem;
    display: none;
    margin-bottom: 10px;
}

body.mobile .mfa-qrcode-link-container .mfa-qrcode-open-authenticator {
    display: inline-block;
}

.mfa-qrcode-manual-setup {
    margin-top: 4px;
}

.mfa-toggle-manual-setup {
    display: inline-block;
    color: var(--portal-primary-color);
    text-decoration: underline;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.95rem;
}

.mfa-toggle-manual-setup:hover {
    text-decoration: none;
}

.mfa-qrcode-link-container,
.mfa-qrcode-details-container {
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    align-self: stretch;
}

/* Force the details block to start on a new line under the link/button block */
.mfa-qrcode-link-container {
    display: block;
}
.mfa-qrcode-details-container {
    display: block;
    clear: both;
    margin-top: 14px;
}

.mfa-qrcode-link-container .mfa-qrcode-open-authenticator,
.mfa-qrcode-toggle-wrapper .mfa-toggle-manual-setup,
.mfa-qrcode-details-container .mfa-qrcode-detail {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.mfa-qrcode-details-container {
    margin-top: 12px;
}

/* Value: bold, larger, full-width box */
.mfa-qrcode-value {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111 !important;
    word-break: break-all;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    line-height: 1.4;
    text-align: center;
}

/* Copy button – small, sits beside the label */
.btn-copy {
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    color: var(--portal-primary-color);
    padding: 2px 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    line-height: 1;
}

    .btn-copy:hover {
        background-color: #f0f0f0;
    }

    .btn-copy i {
        font-size: 13px;
    }
