/* V4: fixed-size branding for both browser and standalone PWA */
:root { --th-logo-sidebar: 52px; }
html,body,#appShell,.app-shell,.app-main { max-width: 100%; }
.side-brand,.sidebar .side-brand { overflow: hidden !important; min-width:0; }
.side-brand .brand-mark,
.sidebar .side-brand .brand-mark {
 box-sizing: border-box !important; position:relative !important;
 width:var(--th-logo-sidebar) !important; height:var(--th-logo-sidebar) !important;
 min-width:var(--th-logo-sidebar) !important; min-height:var(--th-logo-sidebar) !important;
 max-width:var(--th-logo-sidebar) !important; max-height:var(--th-logo-sidebar) !important;
 flex:0 0 var(--th-logo-sidebar) !important;
 display:flex !important; align-items:center !important; justify-content:center !important;
 overflow:hidden !important; contain:layout paint !important;
}
.side-brand .brand-mark img,.sidebar .side-brand .brand-mark img,
.brand-mark img,.seal img,.login-hero .seal img {
 box-sizing:border-box !important; display:block !important;
 position:static !important; inset:auto !important;
 width:100% !important;height:100% !important;
 max-width:100% !important;max-height:100% !important;
 min-width:0 !important;min-height:0 !important;
 object-fit:contain !important; object-position:center !important;
 transform:none !important; margin:0 !important;
}
.login-hero .seal {width:72px !important;height:72px !important;min-width:72px !important;max-width:72px !important;min-height:72px !important;max-height:72px !important;overflow:hidden !important;contain:layout paint !important;}
@media (max-width:800px), (display-mode:standalone) and (max-width:1024px) {
 :root{--th-logo-sidebar:42px}
 .sidebar .side-brand{overflow:hidden!important;}
 .sidebar .side-brand .brand-mark{display:none!important;} /* safe-mode: logo hidden in mobile sidebar; favicon remains official */
 .login-hero .seal{display:none!important;}
 .side-brand>div:last-child{min-width:0;max-width:100%;overflow:hidden;}
}
