/* Paint the correct shell before AJAX returns. Existing form/card selectors
   take over as content arrives; this hint never grants access to application data. */
body[data-initial-screen="home"]:not(:has(#boxContainer > .DeskWork)):not(:has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor))) {
    background-color: #edf6f7;
    background-image: url("../img/emergency-background.svg");
    background-position: center bottom;
    background-size: cover;
    background-repeat: no-repeat;
}

body:is([data-initial-screen="login"], :has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor))):not(:has(#boxContainer > .DeskWork)) {
    background-color: #103e50;
    background-image: url("../img/emergency-login-background.svg");
    background-position: center bottom;
    background-size: cover;
    background-repeat: no-repeat;
}

body:is([data-initial-screen="login"], :has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor))):not(:has(#boxContainer > .DeskWork)) #footer {
    border-top-color: #63c7c3;
    border-bottom-color: rgba(178, 221, 224, .15);
    background: #0c2b3d;
    color: #e4f3f4;
    box-shadow: 0 4px 20px rgba(4, 25, 38, .08);
}

body:has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor)):not(:has(#boxContainer > .DeskWork)) .dialogForm:has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor)) {
    padding: 0;
    border-radius: 20px;
    box-shadow: 0 20px 65px rgba(5, 32, 46, .16);
}

@media (min-width: 1100px) {
    body:has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor)):not(:has(#boxContainer > .DeskWork)) .dialogForm:has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor)) {
        left: 75% !important;
        top: clamp(136px, 20vh, 200px) !important;
        max-height: calc(100dvh - clamp(136px, 20vh, 200px) - 24px) !important;
    }
}

@media (max-width: 1099px) {
    body:is([data-initial-screen="login"], :has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor))):not(:has(#boxContainer > .DeskWork)) {
        background-position: left bottom;
        background-size: auto max(100vh, 800px);
    }
}

@media (max-width: 768px) {
    body[data-initial-screen="home"]:not(:has(#boxContainer > .DeskWork)):not(:has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor))) {
        background-size: auto 100vh;
        background-position: left bottom;
    }
}

@media (max-width: 480px) and (min-height: 541px) {
    body:has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor)):not(:has(#boxContainer > .DeskWork)) .dialogForm:has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor)) {
        top: 112px !important;
        max-height: calc(100dvh - 128px) !important;
    }
}

@media (min-width: 1100px) and (max-height: 540px) {
    body:has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor)):not(:has(#boxContainer > .DeskWork)) .dialogForm:has(:is(#loginFrm1, #loginFrm2, #checkTwoFactor)) {
        top: 16px !important;
        max-height: calc(100dvh - 32px) !important;
    }
}
