/* One outer web shell; cabinets keep only their internal workspace/navigation. */
html:has(body.sb-site-layout) { background: #edf2f8; }
body.sb-site-layout {
 --app-max:1920px; --page:1920px; --workspace-max:1920px;
 display:flex; flex-direction:column; width:min(100%,1920px); max-width:none;
 min-width:320px; min-height:100dvh; margin:0 auto; padding:0;
 color:#0f172a; background:#fff; font-size:14px; line-height:1.45;
}
.sb-site-layout > .app-header { flex:none; width:100%; background:#fff; }
.sb-site-layout > main, .sb-site-content { flex:1 0 auto; min-width:0; }
.sb-site-content { width:100%; background:#fff; }
.sb-site-layout .app-width { width:calc(100% - 48px); max-width:none; margin-inline:auto; }
.sb-site-layout .app-header__inner { max-width:none; }
.sb-site-layout .app-header { color:#0f172a; font-size:14px; line-height:20px; }
.sb-site-layout .app-header a { text-decoration:none; }
.sb-site-layout .app-header .search-box input[type=search] { width:100%; min-width:0; border:0; background:transparent; color:#0f172a; font-size:14px; line-height:20px; border-radius:0; padding:0; }
.sb-site-layout .app-header .search-box { width:100%; border-radius:999px; }
.sb-site-layout .app-header .header-actions { align-items:center; }
.sb-site-layout .app-header .location-button { display:flex; align-items:center; justify-content:center; list-style:none; cursor:pointer; line-height:20px; }
.shell-location { position:relative; }
.shell-location > summary::-webkit-details-marker { display:none; }
.shell-location__panel {
 position:fixed; top:72px; right:max(12px,calc((100vw - 1920px)/2 + 24px)); z-index:120;
 display:grid; gap:10px; width:min(290px,calc(100vw - 24px));
 padding:16px; border:0; border-radius:18px; background:#fff; box-shadow:0 12px 35px #152e5326;
}
.shell-location__panel label { font-size:14px; font-weight:600; color:#0f172a; }
.shell-location__panel select, .shell-location__panel button {
 width:100%; min-height:44px; padding:10px 12px; border:0; border-radius:12px;
 background:#f1f5f9; color:#0f172a; font:inherit;
}
.shell-location__panel button { background:#e4edff; color:#1b56b5; cursor:pointer; }
.sb-site-layout .site-footer.home-footer { flex:none; width:100%; margin-top:0; background:#f7f8fc; color:#466185; font-size:14px; line-height:20px; }
.sb-site-layout .home-footer__group a, .sb-site-layout .home-footer__group button,
.sb-site-layout .home-footer__inactive, .sb-site-layout .home-footer__heading { font-size:14px; line-height:20px; }
.sb-site-layout .home-footer__heading { color:#102b4b; }
.sb-site-layout .home-footer__intro p { color:#64748b; font-size:14px; line-height:20px; }
.sb-site-layout .cabinet-shell, .sb-site-layout .master-shell, .sb-site-layout .adm-app {
 width:100%; max-width:none; margin:0; min-height:0;
}
.sb-site-layout .cabinet-sidebar, .sb-site-layout .master-sidebar, .sb-site-layout .adm-sidebar {
 height:auto; min-height:0; align-self:stretch; position:relative; top:auto;
}
.sb-site-layout .cabinet-main, .sb-site-layout .master-main, .sb-site-layout .adm-workspace { min-width:0; }
.sb-site-layout .cabinet-content { max-width:none; }
.sb-site-layout .client-container, .sb-site-layout .inbox-shell, .sb-site-layout .thread-wrap,
.sb-site-layout .admin-portal__shell, .sb-site-layout .adm-inbox-main, .sb-site-layout .adm-inbox-head {
 width:calc(100% - 48px); max-width:none; margin-inline:auto;
}
.sb-site-layout .auth-shell { width:calc(100% - 48px); max-width:480px; min-height:0; margin:32px auto 48px; padding:0; }
.sb-site-layout .auth-card, .sb-site-layout .registration-card { width:100%; }
.sb-site-layout .page-main { width:calc(100% - 48px); max-width:none; margin-inline:auto; }
.sb-site-layout .auth-panel { max-width:480px; margin-inline:auto; }
.sb-site-layout .adm-main { max-width:none; }
.sb-site-layout .thread-topbar, .sb-site-layout .inbox-topbar { position:static; }
.sb-site-layout .thread-main, .sb-site-layout .inbox-main, .sb-site-layout .client-main { padding-bottom:32px; }
.sb-cabinet-menu { display:none; margin:12px; border-radius:14px; background:#f1f5fb; }
.sb-cabinet-menu summary { min-height:44px; padding:12px 16px; cursor:pointer; font-weight:600; }
.sb-cabinet-menu__links { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; padding:8px; }
.sb-cabinet-menu__links a { display:flex; align-items:center; gap:8px; min-height:44px; padding:10px; color:#1b56b5; text-decoration:none; border-radius:10px; }
.sb-cabinet-menu__links a.is-active { background:#e4edff; }
@media (max-width:1023px) {
 .sb-site-layout .app-header .header-search .search-box input[type=search] { font-size:16px; min-height:40px; }
}
@media (max-width:959px) { .sb-cabinet-menu { display:block; } }
@media (min-width:960px) and (max-width:1179px) { .sb-site-content:has(.master-shell) > .sb-cabinet-menu { display:block; } }
@media (max-width:650px) {
 .sb-site-layout .app-width, .sb-site-layout .client-container, .sb-site-layout .inbox-shell,
 .sb-site-layout .thread-wrap, .sb-site-layout .admin-portal__shell,
 .sb-site-layout .adm-inbox-main, .sb-site-layout .adm-inbox-head, .sb-site-layout .page-main { width:calc(100% - 24px); }
 .sb-site-layout .auth-shell { width:calc(100% - 24px); margin-block:20px 32px; }
}
@media (min-width:1921px) {
 html:has(body.sb-site-layout) { background:#edf2f8 url('../media/editorial/kitchen.jpg') center/cover fixed; }
}

/* No empty private toolbar when the existing renderer has no logout action. */
.sb-site-layout .client-header:not(:has(form)) { display:none; }

/* In-content actions stop before the common footer. */
.sb-site-layout .thread-compose, .sb-site-layout .pp-mobile-action { position:sticky; inset:auto; bottom:0; width:100%; }
@media(max-width:720px) { .sb-site-layout .pp-page { padding-bottom:16px; } }
