/* Tenant/owner/manager only. Existing routing, hidden states and desktop layout remain authoritative. */
@media(max-width:1024px),(orientation:portrait) and (max-width:1366px){
 body.signed-mode :is(#tenant,#owner,#management){min-width:0!important;max-width:100%;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.ws30-exec-grid,.baf2-two,.two-col){grid-template-columns:minmax(0,1fr)!important;gap:16px!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.ws30-kpis,.ws30-quick-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.panel,.ws30-panel,.commercial-panel){padding:18px!important;min-width:0;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.ws30-heading,.section-head,.panel-head){gap:12px!important;flex-wrap:wrap!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(button,.button,select,input:not([type=checkbox]):not([type=radio]):not([type=hidden])){min-height:44px!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(input,select,textarea){max-width:100%;font-size:16px!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.data-actions,.baf2-actions,.multiunit-actions,.ws30-tenant-actions){gap:8px!important;flex-wrap:wrap!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.data-actions,.baf2-actions,.multiunit-actions) :is(button,a){white-space:normal!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.table-wrap,.comparison-scroll){max-width:100%;overflow-x:auto;}
 body.signed-mode:has(:is(#tenant.active,#owner.active,#management.active)) :is(.theo-unified-more-item,.theo-unified-more-close){min-height:48px!important;}
 body.signed-mode:has(:is(#tenant.active,#owner.active,#management.active)) .theo-unified-more-sheet{max-height:calc(100dvh - 24px)!important;}
 body.signed-mode:has(:is(#tenant.active,#owner.active,#management.active)) .theo-unified-more-scroll{padding-bottom:calc(20px + env(safe-area-inset-bottom))!important;}
}
@media(max-width:700px){
 body.signed-mode:has(:is(#tenant.active,#owner.active,#management.active)) .content{padding-inline:12px!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.panel,.ws30-panel,.commercial-panel){padding:16px!important;border-radius:6px!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(h1,.view-head h1){font-size:26px!important;line-height:1.18!important;}
 body.signed-mode :is(#tenant,#owner,#management) h2{font-size:20px!important;line-height:1.25!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.ws30-kpi,.insight-card){padding:14px!important;min-width:0!important;min-height:0!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.ws30-kpis,.ws30-quick-grid){gap:8px!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.form-grid,.theo-form-grid,.multiunit-form-grid,.lifecycle-form-grid,.baf2-two){grid-template-columns:minmax(0,1fr)!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.data-row,.baf2-record,.baf2-line){gap:10px!important;flex-wrap:wrap!important;min-width:0;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.data-row,.baf2-record,.ws30-priority) :is(strong,small,span){overflow-wrap:anywhere;}
 body.signed-mode :is(#tenant,#owner,#management) .theo-mobile-records{display:block!important;width:100%!important;min-width:0!important;border:0!important;}
 /* Retain real headers in the accessibility tree. */
 body.signed-mode :is(#tenant,#owner,#management) .theo-mobile-records thead{display:table-header-group!important;position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;}
 body.signed-mode :is(#tenant,#owner,#management) .theo-mobile-records tbody{display:grid!important;gap:12px!important;}
 body.signed-mode :is(#tenant,#owner,#management) .theo-mobile-records tbody tr{display:grid!important;grid-template-columns:minmax(0,1fr)!important;padding:0!important;border:1px solid #dce5e9!important;background:#fff!important;}
 body.signed-mode :is(#tenant,#owner,#management) .theo-mobile-records tbody :is(td,th){display:block!important;grid-column:auto!important;width:auto!important;min-width:0!important;white-space:normal!important;overflow-wrap:anywhere!important;padding:10px 12px!important;text-align:left!important;background:transparent!important;border:0!important;border-bottom:1px solid #edf1f3!important;}
 body.signed-mode :is(#tenant,#owner,#management) .theo-mobile-records tbody :is(td,th)::before{content:attr(data-mobile-field)!important;display:block!important;margin-bottom:4px!important;font-size:11px!important;font-weight:600!important;color:#526675!important;}
 body.signed-mode :is(#tenant,#owner,#management) .theo-mobile-records tbody :is(td,th):first-child{background:#edf2f5!important;font-weight:650!important;color:#102b3b!important;}
 body.signed-mode :is(#tenant,#owner,#management) .theo-mobile-records tbody :is(td,th):last-child{border-bottom:0!important;}
 body.signed-mode:has(:is(#tenant.active,#owner.active,#management.active)) .theo-unified-more-grid{grid-template-columns:minmax(0,1fr)!important;}
}
@media(max-width:360px){
 body.signed-mode :is(#tenant,#owner,#management) :is(.ws30-kpis,.ws30-quick-grid,.ws30-mini-context){grid-template-columns:minmax(0,1fr)!important;}
 body.signed-mode :is(#tenant,#owner,#management) :is(.panel,.ws30-panel,.commercial-panel){padding:12px!important;}
}
@media(max-width:700px){
 body.signed-mode:has(:is(#tenant.active,#owner.active,#management.active)) :is(.ops-modal,.baf2-modal,.modal){width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important;max-height:calc(100dvh - 32px)!important;overflow-y:auto!important;}
 body.signed-mode:has(:is(#tenant.active,#owner.active,#management.active)) :is(.ops-modal,.baf2-modal,.modal) :is(.theo-form-grid,.form-grid,.lifecycle-form-grid){grid-template-columns:minmax(0,1fr)!important;}
 body.signed-mode:has(:is(#tenant.active,#owner.active,#management.active)) :is(.ops-modal,.baf2-modal,.modal) :is(input,select,textarea){font-size:16px!important;max-width:100%;}
}

@media(max-width:1024px),(orientation:portrait) and (max-width:1366px){
 body.signed-mode #management :is(.manager-property-selector,.manager-finance-panel,.manager-priority-panel,.manager-context-panel){min-width:0!important;max-width:100%;}
 body.signed-mode #management .manager-property-selector select{max-width:100%!important;min-width:0!important;}
}
@media(max-width:700px){
 body.signed-mode #management :is(.manager-finance-panel,.manager-priority-panel,.manager-context-panel){padding:16px!important;}
 body.signed-mode #management :is(.manager-property-selector,.ws301-manager-actions){flex-wrap:wrap!important;gap:8px!important;min-width:0!important;}
}
