/* Tenant layout boundary: keep legacy page grids inside the content region. */
body.tenant-workspace:has(#workspace-sidebar) .bold-shell.clean-shell {
  display:grid; grid-template-columns:248px minmax(0,1fr); align-items:start;
  min-height:100dvh; width:100%; margin:0; padding:0; gap:0; background:#f4f6fa;
}
body.tenant-workspace:has(#workspace-sidebar) .bold-shell.clean-shell > .bold-main {
  display:block; width:100%; min-width:0; min-height:100dvh; margin:0; padding:0;
}
body.tenant-workspace:has(#workspace-sidebar) #workspace-sidebar {
  position:sticky; top:0; width:248px; height:100dvh; overflow-y:auto;
  padding:24px 18px; background:#fff; border-right:1px solid #e5eaf2; box-shadow:none;
}
body.tenant-workspace:has(#workspace-sidebar) #workspace-sidebar .tenant-sidebar-brand { margin:0; padding:12px; }
body.tenant-workspace:has(#workspace-sidebar) #workspace-sidebar .tenant-nav-link { padding:12px; min-height:46px; color:#46536a; font-size:14px; }
body.tenant-workspace:has(#workspace-sidebar) #workspace-sidebar .tenant-nav-link.is-active { color:#2457c5; background:#eaf0fd; box-shadow:none; }
body.tenant-workspace:has(#workspace-sidebar) .bold-main > .app-topbar {
  position:sticky; top:0; z-index:40; display:flex; align-items:center; justify-content:space-between;
  width:100%; min-height:76px; height:auto; margin:0; padding:14px 28px; gap:20px;
  background:#fff; border-bottom:1px solid #e5eaf2; border-radius:0; box-shadow:none;
}
body.tenant-workspace:has(#workspace-sidebar) .workspace-navigation-head { flex:1; min-width:0; }
body.tenant-workspace:has(#workspace-sidebar) .app-topbar-actions { display:flex; align-items:center; gap:12px; flex:0 0 auto; }
body.tenant-workspace:has(#workspace-sidebar) .workspace-topbar-context { display:none; }
body.tenant-workspace:has(#workspace-sidebar) .workspace-breadcrumb ol { display:flex; flex-wrap:wrap; }
body.tenant-workspace:has(#workspace-sidebar) .bold-main > :is(.bold-content,.reference-content) {
  display:flex; flex-direction:column; align-items:stretch; gap:24px;
  width:100%; max-width:none; margin:0; padding:28px; min-width:0;
}
body.tenant-workspace:has(#workspace-sidebar) .bold-content > * { width:100%; min-width:0; grid-column:auto; }
body.tenant-workspace:has(#workspace-sidebar) .bold-page-title h1 { font-size:clamp(24px,2.2vw,32px); line-height:1.25; letter-spacing:-.035em; }
body.tenant-workspace:has(#workspace-sidebar) .bold-page-title p { font-size:14px; line-height:1.7; color:#637087; }
body.tenant-workspace:has(#workspace-sidebar) :is(.bold-panel,.clean-panel,.reference-card) { border-radius:18px; border:1px solid #e5eaf2; background:#fff; box-shadow:0 3px 12px #182e4e05; min-width:0; }
body.tenant-workspace:has(#workspace-sidebar) :is(.bold-widget-head,.clean-panel-head) { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; }
body.tenant-workspace:has(#workspace-sidebar) .bold-client-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
body.tenant-workspace:has(#workspace-sidebar) .bold-client-actions > * { flex:0 0 auto; }
body.tenant-workspace:has(#workspace-sidebar) .reference-tabs { margin:0; padding:0; gap:8px; }
body.tenant-workspace:has(#workspace-sidebar) .reference-tabs a { padding:10px 18px; font-size:14px; }
body.tenant-workspace:has(#workspace-sidebar) .reference-grid { gap:20px; }
body.tenant-workspace:has(#workspace-sidebar) .reference-visual { min-height:260px; }
body.tenant-workspace:has(#workspace-sidebar) :is(input,select,textarea) { max-width:100%; }
body.tenant-workspace:has(#workspace-sidebar) :is(a,button,input,select,textarea):focus-visible { outline:3px solid #8baef7; outline-offset:3px; }
@media(max-width:1199px) {
 body.tenant-workspace:has(#workspace-sidebar) .reference-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:991.98px) {
 body.tenant-workspace:has(#workspace-sidebar) .bold-shell.clean-shell { display:block; }
 body.tenant-workspace:has(#workspace-sidebar) #workspace-sidebar { position:fixed; inset:0 auto 0 0; width:min(300px,86vw); z-index:1100; transform:translateX(-100%); visibility:hidden; }
 body.tenant-workspace:has(#workspace-sidebar).workspace-menu-open #workspace-sidebar { transform:translateX(0); visibility:visible; }
 body.tenant-workspace:has(#workspace-sidebar) .bold-main > .app-topbar { padding:12px 16px; gap:12px; min-height:68px; }
 body.tenant-workspace:has(#workspace-sidebar) .bold-main > :is(.bold-content,.reference-content) { padding:20px; gap:20px; }
 body.tenant-workspace:has(#workspace-sidebar) .workspace-breadcrumb li[aria-current] span { max-width:40vw; }
}
@media(max-width:767.98px) {
 body.tenant-workspace:has(#workspace-sidebar) .reference-grid { grid-template-columns:minmax(0,1fr); }
 body.tenant-workspace:has(#workspace-sidebar) .reference-grid > * { grid-column:1 / -1; }
 body.tenant-workspace:has(#workspace-sidebar) .reference-stats { grid-template-columns:minmax(0,1fr); }
 body.tenant-workspace:has(#workspace-sidebar) .bold-main > :is(.bold-content,.reference-content) { padding:16px; gap:18px; }
 body.tenant-workspace:has(#workspace-sidebar) .app-topbar-actions { gap:6px; }
 body.tenant-workspace:has(#workspace-sidebar) :is(.admin-form-grid,.staff-detail-grid) { grid-template-columns:minmax(0,1fr); }
 body.tenant-workspace:has(#workspace-sidebar) :is(.bold-panel,.clean-panel,.reference-card) { padding:18px; }
 body.tenant-workspace:has(#workspace-sidebar) .bold-client-row { grid-template-columns:minmax(0,1fr); gap:12px; }
 body.tenant-workspace:has(#workspace-sidebar) .bold-client-actions { grid-column:1 / -1; }
 body.tenant-workspace:has(#workspace-sidebar) .bold-client-actions :is(a,button) { min-height:44px; }
}
body.tenant-workspace:has(#workspace-sidebar) #workspace-sidebar { display:flex; flex-direction:column; justify-content:flex-start; gap:0; }
body.tenant-workspace:has(#workspace-sidebar) #workspace-sidebar .tenant-nav-list { display:flex; flex-direction:column; justify-content:flex-start; flex:0 0 auto; height:auto; gap:4px; }
body.tenant-workspace:has(#workspace-sidebar) #workspace-sidebar .tenant-nav-link { flex:0 0 auto; margin:0; }
@media(max-width:767.98px) {
 body.tenant-workspace:has(#workspace-sidebar) .bold-client-actions :is(a,button,form) { width:auto; }
 body.tenant-workspace:has(#workspace-sidebar) .bold-widget-head { text-align:left; }
}
/* Shared header has two regions: breadcrumb and account actions. */
.bold-shell.clean-shell:has(#workspace-sidebar) .bold-main > .bold-nav.clean-topbar.app-topbar {
 display:flex; flex-wrap:nowrap; align-items:center; justify-content:space-between;
 gap:20px; min-height:76px; height:auto; padding:14px 24px;
 background:#fff; border-bottom:1px solid #e5eaf2; position:sticky; top:0; z-index:40;
}
.bold-shell.clean-shell .app-topbar .workspace-navigation-head { flex:1 1 auto; min-width:0; }
.bold-shell.clean-shell .app-topbar .app-topbar-actions { flex:0 0 auto; align-self:center; margin:0; }
.bold-shell.clean-shell .app-topbar .admin-user-menu { position:relative; }
.bold-shell.clean-shell .app-topbar .admin-user-dropdown { right:0; left:auto; max-width:calc(100vw - 32px); }
@media(max-width:767.98px) {
 .bold-shell.clean-shell:has(#workspace-sidebar) .bold-main > .bold-nav.clean-topbar.app-topbar { padding:12px; gap:8px; min-height:68px; }
 .bold-shell.clean-shell .app-topbar .admin-user-name { display:none; }
 .bold-shell.clean-shell .app-topbar .workspace-breadcrumb ol { flex-wrap:wrap; }
}

/* Customer create/edit: consistent field grid and accessible action sizing. */
.bold-shell:has(.customer-form) .bold-content{padding:24px!important;max-width:1120px!important;width:100%!important;margin:0 auto}
.bold-shell:has(.customer-form) .bold-page-title{margin-bottom:20px}
.bold-shell:has(.customer-form) .bold-panel{padding:24px!important;border:1px solid #e1e7f0;border-radius:18px;box-shadow:0 5px 24px #213b5908}
.bold-shell:has(.customer-form) .bold-widget-head{margin-bottom:22px;text-align:left;justify-content:flex-start}
.customer-form{display:block!important}
.customer-form .admin-form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:20px 24px!important;align-items:start}
.customer-form .admin-field{display:flex!important;flex-direction:column!important;gap:7px;min-width:0;width:100%;margin:0!important;font-size:13px;font-weight:600;color:#34455d}
.customer-form .admin-field:has(#LocationId){grid-column:1/-1;padding:14px;background:#f4f7fc;border:1px solid #e3eaf5;border-radius:12px}
.customer-form .admin-field input,.customer-form .admin-field select{width:100%!important;min-width:0;height:46px;box-sizing:border-box;border:1px solid #cfd9e6;border-radius:9px;padding:10px 12px!important;font-size:14px;font-weight:400;background:white;color:#20344e}
.customer-form .admin-field input:focus,.customer-form .admin-field select:focus{outline:3px solid #e5edff;border-color:#2457c5;box-shadow:none}
.customer-form .admin-field small{font-size:12px;font-weight:400;line-height:1.5;color:#64748b}
.customer-form .admin-field:has([data-val-required])>span:first-child::after{content:' *';color:#b42335}
.customer-form .admin-check-row{display:flex!important;align-items:center;gap:10px;padding:12px 14px;background:#f0f8f5;border:1px solid #d5e9df;border-radius:10px;min-height:46px;font-size:13px;margin:0}
.customer-form .admin-check-row input{width:18px;height:18px;accent-color:#2457c5}
.customer-form .notification-submit-row{display:flex!important;justify-content:flex-end!important;align-items:center;gap:10px;padding-top:20px;margin-top:22px;border-top:1px solid #e5eaf2}
.customer-form .notification-submit-row button,.customer-form .notification-submit-row a{min-height:44px;padding:11px 20px!important;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;font-size:13px;text-decoration:none}
.customer-form .validation-summary-valid{display:none}
@media(max-width:640px){
 .bold-shell:has(.customer-form) .bold-content{padding:16px 12px 88px!important}
 .bold-shell:has(.customer-form) .bold-panel{padding:16px!important;border-radius:14px}
 .bold-shell:has(.customer-form) .bold-page-title h1{font-size:24px}
 .customer-form .admin-form-grid{grid-template-columns:minmax(0,1fr)!important;gap:16px!important}
 .customer-form .admin-field input,.customer-form .admin-field select{font-size:16px}
 .customer-form .notification-submit-row{position:sticky;bottom:0;background:white;padding:12px 0!important;flex-wrap:nowrap!important;z-index:3}
 .customer-form .notification-submit-row button{flex:1}
 .customer-form .notification-submit-row a{flex:0 0 auto}
}
