/* One shared form-popup frame across owner, customer and admin workflows. */
html body #modal,html body:has(.adminApp) #modal,html body #modal.dhModal,html body:has(.adminApp) #modal.dhModal{
 width:min(1040px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px)!important;
 height:90dvh!important;min-height:90dvh!important;max-height:90dvh!important;
 margin:auto!important;padding:28px!important;box-sizing:border-box;overflow-y:auto!important;
 overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;color:#183448;background:#fff;
}
#modal #modalBody{min-width:0;max-width:100%;overflow-wrap:anywhere}
#modal .adminModal,#modal .ownerModal,#modal .onboarding,#modal .dh{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
#modal .field,#modal fieldset,#modal form{min-width:0}
#modal input,#modal textarea,#modal select{box-sizing:border-box;max-width:100%;min-width:0}
#modal button{white-space:normal;max-width:100%;min-height:44px}
#modal .outline,.onboardingPanel .outline,.activationPage .outline{
 background:#fff;color:#205468;border-color:#9bb4c3;
}
#modal .outline:hover,.onboardingPanel .outline:hover,.activationPage .outline:hover{background:#edf5f7}
@media(max-width:600px){
 html body #modal,html body:has(.adminApp) #modal,html body #modal.dhModal,html body:has(.adminApp) #modal.dhModal{
  width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;
  height:94dvh!important;min-height:94dvh!important;max-height:94dvh!important;padding:16px!important;
 }
 #modal .adminFacts,#modal .adminFormGrid{grid-template-columns:1fr}
}

/* Reveal only the completed dashboard, never a lone handover panel during refresh. */
#dashContent[aria-busy="true"]{visibility:hidden}
#dashboard:has(#dashContent[aria-busy="true"])::before{content:"Loading your dashboard…";display:block;padding:24px;color:#41546b}
#dashContent:not(:has(.dashShell,.adminApp)) #vrmDigitalHandovers{display:none}
