/* Applies before application scripts/styles: no flash or focus into the editor. */
html.omniflow-entry-locked body > :not(#omniflowCloudLoginScreen):not(#omniflow-startup-error):not(#omniflowLockScreen):not(#omniConfirmOverlay),
html.omniflow-entry-locked body > :not(#omniflowCloudLoginScreen):not(#omniflow-startup-error):not(#omniflowLockScreen):not(#omniConfirmOverlay) * {
    visibility:hidden !important;
}
html.omniflow-entry-locked { background:#f5f3ee; }
html.omniflow-entry-locked body { margin:0; }
html.omniflow-entry-locked #omniflowCloudLoginScreen {
    position:fixed; inset:0; z-index:2147483000; display:block;
    padding:0; opacity:1; visibility:visible; background:#f5f3ee;
}
html.omniflow-entry-locked #omniflowCloudLoginScreen::before,
html.omniflow-entry-locked #omniflowCloudLoginScreen .pbz-landing-stage,
html.omniflow-entry-locked #omniflowCloudLoginScreen:not(.login-panel-open) .omniflow-lock-card {
    display:none;
}
html.omniflow-entry-locked #omniflowCloudLoginScreen .omniflow-login-shell {
    position:relative; width:100%; min-height:100svh; padding:0;
}
#omniflowLoginBuilding { position:absolute; inset:0; z-index:1; }
#omniflowLoginBuilding iframe { width:100%; height:100%; border:0; display:block; background:#f5f3ee; }

/* Paint the same exterior while the embedded tour and work area start. */
#omniflowBuildingPoster {
    position:absolute; inset:0; z-index:2; overflow:auto;
    background:#f5f3ee; color:#242729; font:14px/1.5 system-ui,sans-serif;
}
#omniflowBuildingPoster * { box-sizing:border-box; }
#omniflowCloudLoginScreen.building-ready #omniflowBuildingPoster,
#omniflowBuildingPoster [hidden] { display:none !important; }
#omniflowBuildingPoster .omniflow-poster-header {
    display:flex; align-items:center; justify-content:space-between; gap:16px;
    padding:20px 4%; min-height:85px; border-bottom:1px solid #d9d5ce;
}
.omniflow-poster-brand { display:flex; align-items:center; gap:10px; font-size:19px; font-weight:700; letter-spacing:.11em; line-height:1.05; }
.omniflow-poster-brand small { display:block; margin-top:6px; color:#69645e; font-size:8px; letter-spacing:.2em; }
.omniflow-poster-brand > span {
    position:relative; width:26px; height:34px; border:1px solid #8c664c; border-radius:13px 13px 3px 3px;
}
.omniflow-poster-brand > span::after {
    content:""; position:absolute; inset:5px; border:1px solid #8c664c; border-radius:7px 7px 1px 1px;
}
#omniflowPosterLogin, #omniflowBuildingRetry {
    display:inline-flex; align-items:center; justify-content:center; gap:15px;
    min-height:44px; padding:10px 16px; border:1px solid #242729; border-radius:4px;
    background:#242729; color:#fffdf8; font:600 13px/1.3 system-ui,sans-serif; cursor:pointer;
}
#omniflowPosterLogin {
    position:absolute; z-index:3; top:20px; right:4%; box-sizing:border-box;
    padding:10px 20px; gap:22px; white-space:nowrap;
}
#omniflowPosterLogin[aria-busy="true"] { cursor:progress; }
#omniflowCloudLoginScreen.login-panel-open #omniflowPosterLogin { visibility:hidden; }
#omniflowPosterLogin:focus-visible, #omniflowBuildingRetry:focus-visible {
    outline:2px solid #8c664c !important; outline-offset:3px; box-shadow:none !important;
}
#omniflowBuildingPoster .omniflow-poster-intro {
    display:grid; grid-template-columns:minmax(0,1.8fr) minmax(240px,1fr); align-items:center;
    gap:32px; padding:22px 4%; max-width:1700px; margin:auto;
}
#omniflowBuildingPoster h1 { color:#242729; margin:0; font:400 clamp(27px,2.5vw,38px)/1.15 Georgia,serif; letter-spacing:-.8px; }
#omniflowBuildingPoster h1 em { color:#8c664c; font-style:normal; }
#omniflowBuildingPoster p { margin:0; color:#69645e; font-size:13px; line-height:1.65; }
#omniflowBuildingPoster .omniflow-poster-intro > p { max-width:320px; justify-self:end; }
#omniflowBuildingPoster .omniflow-poster-eyebrow {
    margin:0 0 8px; color:#8c664c; font-size:9px; font-weight:600; line-height:1.3; letter-spacing:2px;
}
#omniflowBuildingPoster .omniflow-poster-location {
    display:flex; align-items:center; min-height:61px; padding:8px 4%; background:#faf8f4;
    border-block:1px solid #d9d5ce; font:600 11px/1.5 system-ui,sans-serif;
}
#omniflowBuildingPoster img {
    display:block; width:100%; height:auto; aspect-ratio:16/9; object-fit:cover;
    background:#d7d0c4;
}
#omniflowBuildingStatus {
    position:absolute; z-index:1; inset:auto 4% 4% auto; display:flex; flex-wrap:wrap;
    align-items:center; gap:10px 16px; max-width:min(85%,32rem); padding:12px;
    background:#fffdf8; border:1px solid #d9d5ce; border-radius:8px; box-shadow:0 8px 30px #24272922;
}
@media (min-width:900px) and (max-height:900px) {
    #omniflowPosterLogin { top:12px; }
    #omniflowBuildingPoster .omniflow-poster-header { min-height:69px; padding-block:12px; }
    #omniflowBuildingPoster .omniflow-poster-intro { padding-block:14px; }
    #omniflowBuildingPoster .omniflow-poster-eyebrow { margin-bottom:6px; }
}
@media (min-width:900px) {
    #omniflowBuildingPoster img { max-height:max(40vw,calc(100svh - 228px)); object-position:50% 55%; }
}
@media (max-width:800px) {
    #omniflowPosterLogin { top:16px; right:5%; }
    #omniflowBuildingPoster .omniflow-poster-intro { grid-template-columns:1.5fr 1fr; gap:24px; padding:20px 5%; }
}
@media (max-width:620px) {
    #omniflowBuildingPoster .omniflow-poster-header { min-height:75px; padding:15px 5%; }
    #omniflowPosterLogin { top:15px; padding:10px 14px; gap:13px; font-size:11px; }
    #omniflowBuildingPoster .omniflow-poster-intro { display:block; padding:18px 5%; }
    #omniflowBuildingPoster .omniflow-poster-eyebrow { display:none; }
    #omniflowBuildingPoster .omniflow-poster-location { align-items:flex-start; min-height:102px; padding:16px 5%; }
    #omniflowBuildingPoster h1 { max-width:360px; font-size:28px; }
    #omniflowBuildingPoster p { font-size:12px; line-height:1.5; }
    #omniflowBuildingPoster .omniflow-poster-intro > p { max-width:360px; margin-top:10px; }
}
/* Kept independent of the main styles so a missing stylesheet remains readable. */
#omniflow-startup-error {
    box-sizing: border-box;
    width: min(34rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow: auto;
    margin: auto;
    padding: 1.5rem;
    border: 1px solid #d9d5ce;
    border-radius: 1rem;
    background: #fffdf8;
    color: #242729;
    font: 1rem/1.6 system-ui, sans-serif;
}
#omniflow-startup-error::backdrop { background: rgb(0 0 0 / 65%); }
#omniflow-startup-error h1 { margin: 0 0 1rem; font: 700 1.4rem/1.3 system-ui, sans-serif; }
#omniflow-startup-error p { margin: 0 0 1.5rem; }
#omniflow-startup-error button {
    min-height: 44px;
    padding: .65rem 1rem;
    border: 0;
    border-radius: .5rem;
    background: #242729;
    color: #fff;
    font: 600 1rem/1.4 system-ui, sans-serif;
    cursor: pointer;
}
#omniflow-startup-error button:focus-visible { outline: 2px solid #8c664c; outline-offset: 4px; }

html.omniflow-entry-locked #omniConfirmOverlay { z-index:2147483100 !important; }
/* OmniFlow application entry only. Append to omniflow-startup-guard.css so the
   first paint is monochrome; the specificity/important rules survive later CSS.
   The embedded welcome iframe and building photos are deliberately untouched. */
html.omniflow-entry-locked { background:#FFFFFF !important; }
html.omniflow-entry-locked #omniflowCloudLoginScreen,
#omniflowCloudLoginScreen.omniflow-building-entry { background:#FFFFFF !important; }
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-login-shell::before {
    background:rgba(11,11,11,.45) !important;
}

/* First-paint poster, shown until the embedded tour is ready. */
#omniflowCloudLoginScreen #omniflowBuildingPoster {
    background:#FFFFFF !important; color:#0B0B0B !important;
}
#omniflowCloudLoginScreen #omniflowBuildingPoster .omniflow-poster-header {
    border-bottom-color:#D9D9D9 !important;
}
#omniflowCloudLoginScreen #omniflowBuildingPoster .omniflow-poster-brand {
    color:#0B0B0B !important;
}
#omniflowCloudLoginScreen #omniflowBuildingPoster .omniflow-poster-brand small,
#omniflowCloudLoginScreen #omniflowBuildingPoster p {
    color:#6B6B6B !important;
}
#omniflowCloudLoginScreen #omniflowBuildingPoster .omniflow-poster-brand > span,
#omniflowCloudLoginScreen #omniflowBuildingPoster .omniflow-poster-brand > span::after {
    border-color:#333333 !important;
}
#omniflowCloudLoginScreen #omniflowBuildingPoster h1 { color:#0B0B0B !important; }
#omniflowCloudLoginScreen #omniflowBuildingPoster h1 em,
#omniflowCloudLoginScreen #omniflowBuildingPoster .omniflow-poster-eyebrow {
    color:#333333 !important;
}
#omniflowCloudLoginScreen #omniflowBuildingPoster .omniflow-poster-location {
    background:#D9D9D9 !important; color:#333333 !important;
    border-color:#D9D9D9 !important;
}
#omniflowCloudLoginScreen #omniflowBuildingStatus {
    background:#FFFFFF !important; color:#0B0B0B !important;
    border-color:#D9D9D9 !important;
    box-shadow:0 8px 30px rgba(11,11,11,.16) !important;
}
#omniflowCloudLoginScreen #omniflowBuildingStatus p { color:#333333 !important; }
#omniflowCloudLoginScreen #omniflowPosterLogin,
#omniflowCloudLoginScreen #omniflowBuildingRetry {
    background:#1A1A1A !important; border-color:#1A1A1A !important;
    color:#FFFFFF !important;
}
#omniflowCloudLoginScreen #omniflowPosterLogin:hover:not(:disabled),
#omniflowCloudLoginScreen #omniflowBuildingRetry:hover {
    background:#333333 !important; border-color:#333333 !important;
}
#omniflowCloudLoginScreen #omniflowPosterLogin:focus-visible,
#omniflowCloudLoginScreen #omniflowBuildingRetry:focus-visible {
    outline:2px solid #0B0B0B !important; outline-offset:3px !important;
}

/* PIN and biometric panel in the application, never inside /welcome/. */
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card {
    --login-paper:#FFFFFF !important;
    --login-ink:#0B0B0B !important;
    --login-muted:#6B6B6B !important;
    --login-line:#D9D9D9 !important;
    --login-bronze:#333333 !important;
    background:#FFFFFF !important; color:#0B0B0B !important;
    border-color:#D9D9D9 !important;
    box-shadow:0 22px 72px rgba(11,11,11,.28) !important;
}
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-logo,
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-logo::after {
    border-color:#333333 !important;
}
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card .omniflow-lock-input {
    background:#FFFFFF !important; color:#0B0B0B !important;
    border-color:#6B6B6B !important;
}
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card .omniflow-lock-input::placeholder {
    color:#6B6B6B !important;
}
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card .omniflow-lock-input:focus {
    border-color:#0B0B0B !important;
}
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card :is(button,input):focus-visible {
    outline:2px solid #0B0B0B !important; outline-offset:2px !important;
}
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card .omniflow-login-primary {
    background:#1A1A1A !important; border-color:#1A1A1A !important;
    color:#FFFFFF !important;
}
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card .omniflow-login-primary:hover {
    background:#333333 !important; border-color:#333333 !important;
}
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card #omniflowCloudBiometricLoginBtn {
    background:#FFFFFF !important; border-color:#6B6B6B !important;
    color:#0B0B0B !important;
}
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card #omniflowCloudBiometricLoginBtn:hover,
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card .omniflow-login-secondary:hover,
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card .omniflow-login-close:hover {
    background:#D9D9D9 !important;
}
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card .omniflow-login-secondary {
    color:#333333 !important;
}
#omniflowCloudLoginScreen.omniflow-building-entry .omniflow-lock-card .omniflow-login-close {
    color:#0B0B0B !important; border-color:#D9D9D9 !important;
}
#omniflowCloudLoginScreen .omniflow-remember-device input {
    accent-color:#333333 !important;
}
#omniflowCloudLoginScreen #omniflowCloudContinueBtn {
    background:#1A1A1A !important; border-color:#1A1A1A !important;
    color:#FFFFFF !important;
}
#omniflowCloudLoginScreen #omniflowCloudContinueBtn:hover {
    background:#333333 !important; border-color:#333333 !important;
}
#omniflowCloudLoginScreen #omniflowCloudContinueBtn:focus-visible {
    outline:2px solid #0B0B0B !important; outline-offset:3px !important;
}
#omniflowCloudLoginScreen.building-ready:has(#omniflowCloudContinueBtn:not([hidden])) {
    background:#FFFFFF !important;
}
#omniflowCloudLoginScreen.building-ready:has(#omniflowCloudContinueBtn:not([hidden])) #omniflowLoginBuilding {
    border-bottom-color:#D9D9D9 !important;
}

/* Separate local unlock gate. Its logo artwork and error state stay intact. */
#omniflowLockScreen { background:#0B0B0B !important; color:#FFFFFF !important; }
#omniflowLockScreen::before {
    background:linear-gradient(135deg,#0B0B0B,#1A1A1A) !important;
}
#omniflowLockScreen::after {
    border-color:#333333 !important; box-shadow:0 0 90px #1A1A1A inset !important;
}
#omniflowLockScreen .omniflow-lock-ambient::before,
#omniflowLockScreen .omniflow-lock-ambient::after {
    background:linear-gradient(115deg,#333333,#1A1A1A 60%,transparent) !important;
}
#omniflowLockScreen .omniflow-lock-sparks span {
    background:#D9D9D9 !important; box-shadow:0 0 16px rgba(217,217,217,.35) !important;
}
#omniflowLockScreen .omniflow-lock-card {
    background:#1A1A1A !important; border-color:#6B6B6B !important;
    box-shadow:0 30px 90px rgba(0,0,0,.5) !important;
}
#omniflowLockScreen .omniflow-lock-card::before {
    background:linear-gradient(145deg,#6B6B6B,#333333,#D9D9D9) !important;
}
#omniflowLockScreen .omniflow-lock-title {
    background:none !important; color:#FFFFFF !important;
    -webkit-text-fill-color:#FFFFFF !important;
}
#omniflowLockScreen .omniflow-login-eyebrow,
#omniflowLockScreen .omniflow-lock-subtitle { color:#D9D9D9 !important; }
#omniflowLockScreen .omniflow-lock-input {
    background:#333333 !important; border-color:#6B6B6B !important;
    color:#FFFFFF !important;
}
#omniflowLockScreen .omniflow-lock-input::placeholder { color:#D9D9D9 !important; }
#omniflowLockScreen .omniflow-lock-input:focus {
    border-color:#D9D9D9 !important; box-shadow:0 0 0 3px #6B6B6B !important;
}
#omniflowLockScreen .omniflow-login-primary {
    background:#FFFFFF !important; border-color:#FFFFFF !important;
    color:#0B0B0B !important; box-shadow:none !important;
}
#omniflowLockScreen .omniflow-login-primary:hover {
    background:#D9D9D9 !important; border-color:#D9D9D9 !important;
}

/* Startup failure remains readable before the rest of the application loads. */
html.omniflow-entry-locked #omniflow-startup-error {
    background:#FFFFFF !important; color:#0B0B0B !important;
    border-color:#D9D9D9 !important;
}
html.omniflow-entry-locked #omniflow-startup-error button {
    background:#1A1A1A !important; color:#FFFFFF !important;
}
