/* Login only: keep the page inside the viewport, including local confirmation. */
html:has(> body.access-page){height:100%;overflow:hidden;scrollbar-gutter:auto}
body.access-page{
 height:100vh;height:100dvh;min-height:0;max-width:100%;margin:0;
 display:flex;align-items:center;justify-content:center;
 padding:clamp(8px,2dvh,20px) clamp(12px,3vw,24px);overflow:hidden;
}
body.access-page .access{
 flex:0 1 440px;width:100%;min-width:0;min-height:0;max-height:100%;
 padding:clamp(16px,3.4dvh,28px) clamp(16px,4vw,32px);
 overflow-x:hidden;overflow-y:auto;scrollbar-width:none;overscroll-behavior:contain;
}
body.access-page .access::-webkit-scrollbar,
body.access-page dialog::-webkit-scrollbar{display:none;width:0;height:0}
body.access-page .brand{min-width:0;gap:10px;margin-bottom:clamp(12px,2.4dvh,20px)}
body.access-page .brand:not(:has(.login-flag)){grid-template-columns:48px minmax(0,1fr)}
body.access-page .brand .login-coat{width:48px;height:57px}
body.access-page .brand .login-flag{max-width:100%;width:68px;height:46px}
body.access-page .brand b{font-size:clamp(17px,2.6vw,20px);overflow-wrap:anywhere}
body.access-page h1{font-size:26px;line-height:1.15;margin:0 0 8px}
body.access-page .intro{font-size:14px;line-height:1.4;margin:0 0 14px}
body.access-page form{min-width:0;margin:0}
body.access-page label{margin:12px 0 6px}
body.access-page input{min-width:0;min-height:44px;font-size:16px;padding:10px 12px}
body.access-page button,body.access-page .retry{min-height:44px;margin-top:18px;padding:10px 16px}
body.access-page .foot{font-size:12px;line-height:1.4;margin:14px 0 0}
body.access-page .symbol-credit{margin-top:10px}
body.access-page .error{font-size:13px;line-height:1.4;padding:8px 10px;margin:10px 0}
body.access-page form h2{font-size:20px;line-height:1.2;margin:0 0 10px}
body.access-page form p{font-size:14px;line-height:1.4;margin:8px 0}
body.access-page #mfaQr{text-align:center;line-height:0}
body.access-page #mfaQr svg{display:block;width:min(160px,100%);height:auto;margin:8px auto}
body.access-page #mfaPanel code{font-size:12px;overflow-wrap:anywhere}
body.access-page form pre{font-size:12px;line-height:1.45;overflow-wrap:anywhere;white-space:pre-wrap}
body.access-page dialog.co-dialog{
 box-sizing:border-box;width:min(440px,calc(100vw - 24px));
 max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);
 margin:auto;padding:20px;border:1px solid #c4d3e5;border-radius:14px;
 overflow-x:hidden;overflow-y:auto;scrollbar-width:none;
 color:var(--buga-navy,#163b2b);background:#fff;
}
body.access-page dialog.co-dialog::backdrop{background:#05193980}
body.access-page dialog.co-dialog form{padding:0}
body.access-page dialog.co-dialog footer{display:flex;gap:10px;margin-top:16px}
body.access-page dialog.co-dialog footer button{flex:1;min-width:0;margin:0}
@media(max-height:650px){
 body.access-page .access{padding:16px 20px}
 body.access-page .brand{margin-bottom:12px}
 body.access-page .brand .login-coat{height:48px;width:40px}
 body.access-page .brand .login-flag{height:36px;width:54px}
 body.access-page label{margin-top:9px}
 body.access-page button{margin-top:12px}
 body.access-page .foot{margin-top:10px}
}
@media(min-width:640px) and (max-height:520px){
 body.access-page .access{
  flex-basis:720px;max-width:720px;display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:24px;
  grid-template-areas:"brand form" "title form" "intro form" "error error" "foot foot" "credit credit";
 }
 body.access-page .brand{grid-area:brand}
 body.access-page .access>h1{grid-area:title}
 body.access-page .access>.intro{grid-area:intro}
 body.access-page #accessForm{grid-area:form}
 body.access-page #accessError{grid-area:error}
 body.access-page .foot{grid-area:foot}
 body.access-page .symbol-credit{grid-area:credit}
 body.access-page #mfaQr svg{width:110px}
}
