/*
 * PRO-IT early auth paint
 * Prevents Frappe and Solvronix fallback UI from becoming visible
 * before final branding is ready.
 */

html {
    background: #040b13 !important;
}

/* Never show Frappe splash branding */
.splash {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    background: #040b13 !important;
    z-index: 2147483647 !important;
}

.splash img {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Keep every authentication card invisible during Solvronix async boot */
html:not(.proit-login-ready) .for-login,
html:not(.proit-login-ready) .for-forgot,
html:not(.proit-login-ready) .for-signup,
html:not(.proit-login-ready) .for-email-login,
html:not(.proit-login-ready) .for-login-with-email-link {
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Hide the surrounding Frappe website chrome during the same period */
@supports selector(body:has(.for-login)) {
    html:not(.proit-login-ready):has(.for-login),
    html:not(.proit-login-ready):has(.for-forgot),
    html:not(.proit-login-ready):has(.for-signup),
    html:not(.proit-login-ready):has(.for-email-login),
    html:not(.proit-login-ready):has(.for-login-with-email-link),
    html:not(.proit-login-ready):has(.for-login) body,
    html:not(.proit-login-ready):has(.for-forgot) body,
    html:not(.proit-login-ready):has(.for-signup) body,
    html:not(.proit-login-ready):has(.for-email-login) body,
    html:not(.proit-login-ready):has(.for-login-with-email-link) body {
        background: #040b13 !important;
    }

    html:not(.proit-login-ready):has(.for-login) body::before,
    html:not(.proit-login-ready):has(.for-forgot) body::before,
    html:not(.proit-login-ready):has(.for-signup) body::before,
    html:not(.proit-login-ready):has(.for-email-login) body::before,
    html:not(.proit-login-ready):has(.for-login-with-email-link) body::before {
        display: none !important;
    }

    html:not(.proit-login-ready):has(.for-login) .page-content-wrapper,
    html:not(.proit-login-ready):has(.for-forgot) .page-content-wrapper,
    html:not(.proit-login-ready):has(.for-signup) .page-content-wrapper,
    html:not(.proit-login-ready):has(.for-email-login) .page-content-wrapper,
    html:not(.proit-login-ready):has(.for-login-with-email-link) .page-content-wrapper {
        visibility: hidden !important;
    }
}

/* Explicit Frappe login route fallback */
html:not(.proit-login-ready) body[data-path="login"] {
    background: #040b13 !important;
}

html.proit-login-ready .for-login,
html.proit-login-ready .for-forgot,
html.proit-login-ready .for-signup,
html.proit-login-ready .for-email-login,
html.proit-login-ready .for-login-with-email-link {
    visibility: visible !important;
    opacity: 1 !important;
}
