/* Shared wrapping and dialog rules; native tables keep a bounded scroll container. */
/* Explicit flex basis keeps workflow actions aligned in Safari and narrow workspaces. */
#content .workspace-tools,#content .workflow-actions,#content .finance-head-actions,#content .flow-actions{display:flex;flex-flow:row wrap;align-items:center;gap:10px;min-width:0;max-width:100%;box-sizing:border-box}
#content .workspace-tools>*,#content .workflow-actions>*,#content .finance-head-actions>*,#content .flow-actions>*{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:650px){#content .workspace-tools>button,#content .workflow-actions>button,#content .finance-head-actions>button,#content .flow-actions>button{flex:1 1 145px;min-height:44px;white-space:normal;overflow-wrap:anywhere}dialog[open]{max-width:98vw}dialog[open]>header{min-width:0}dialog[open]>header>button{flex-shrink:0}}
#content,.workspace,.workspace main,.panel,.employee-portal,.hr22-window main{min-width:0}
#content :is(.page-head,.suite-toolbar,.child-page-actions,.hr22-actions,.flow-row-actions,.reg-actions){max-width:100%;box-sizing:border-box;flex-wrap:wrap;gap:10px}
#content .page-head>*,#content .suite-toolbar>*,.hr22-grid>*{min-width:0;max-width:100%;box-sizing:border-box}
#content :is(.module-tabs,.parent-tabs,.tw-tabs,.hr-tabs,.reg-tabs,.finance-tabs){display:flex!important;flex-wrap:wrap!important;height:auto!important;min-height:44px;gap:8px;overflow:visible;align-items:stretch}
#content :is(.module-tabs,.parent-tabs,.tw-tabs,.hr-tabs,.reg-tabs,.finance-tabs)>button{flex:0 1 auto;min-width:0;max-width:100%;height:auto!important;min-height:44px;white-space:normal!important;overflow-wrap:anywhere;line-height:1.45;box-sizing:border-box}
#content :is(button,.button,.btn){max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
#content :is(h1,h2,h3,p),dialog :is(h2,h3,p){overflow-wrap:anywhere}
.hr22-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.hr22-window,.mis-window{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);max-width:calc(100vw - 20px);overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
dialog.hr22-window>header,dialog.mis-window>header{height:auto!important;min-height:50px;align-items:center;flex-wrap:nowrap;padding-top:max(14px,env(safe-area-inset-top));box-sizing:border-box}
dialog.hr22-window>header h2,dialog.mis-window>header h2{flex:1 1 auto;min-width:0;line-height:1.4;white-space:normal}
dialog.hr22-window>header [data-close],dialog.mis-window>header [data-close]{flex:0 0 auto;min-width:64px;min-height:44px;position:relative!important;inset:auto!important;display:inline-flex!important;align-items:center;justify-content:center}
.table-scroll,.mis-table-scroll,.mis-sheet-scroll{max-width:100%;overflow:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.onboarding-launch{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:18px;margin:14px 0;border:1px solid #90c4ce;border-radius:17px;background:linear-gradient(120deg,#e8f7fc,#eff1ff);color:#143e52}
.onboarding-launch b{font-size:18px}.onboarding-launch small{display:block;margin-top:7px;line-height:1.6}
dialog.onboarding-window.mobile-close-safe>[data-mobile-close-bar],dialog.mis-window.mobile-close-safe>[data-mobile-close-bar]{display:none!important}
dialog.onboarding-window.mobile-close-safe>header,dialog.mis-window.mobile-close-safe>header{position:sticky!important;top:0!important;z-index:10001;flex-wrap:nowrap!important}
dialog.onboarding-window>header .flow-back,dialog.mis-window>header .flow-back{flex:0 0 auto;min-width:54px;padding:8px;margin:0;font-size:12px}
.workspace-load-error{padding:20px;border:1px solid #d5ae71;border-radius:14px;background:#fff6e6;color:#543e1c}.workspace-load-error button{min-height:44px;padding:10px 16px;border:1px solid #875d21;border-radius:9px;background:#fff;color:#543e1c}
.onboarding-launch button{min-height:44px;padding:10px 14px;border:1px solid #157d8b;border-radius:10px;background:#086c7d;color:white;white-space:normal;line-height:1.4;cursor:pointer}
.onboarding-steps{display:flex;gap:10px;flex-wrap:wrap;list-style:none;padding:0;margin:18px 0}.onboarding-steps li{flex:1 1 150px;padding:12px;border:1px solid #b2cddf;border-radius:10px;background:#edf6fc;font-weight:650;line-height:1.6}
.onboarding-editor{padding:18px;border:1px solid #acd1dc;border-radius:14px;background:#fff;margin:15px 0}.onboarding-editor>header{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between}.onboarding-editor h3{margin:0 0 12px}
.onboarding-progress{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}.onboarding-progress progress{width:min(280px,100%);height:18px;accent-color:#087e86}
.onboarding-window .hr22-actions{align-items:flex-end}.onboarding-window .hr22-actions>label{margin-bottom:0}.onboarding-window .hr22-actions>a{align-self:flex-end;display:inline-flex;align-items:center;justify-content:center;min-height:44px;flex:0 1 auto;box-sizing:border-box}
.onboarding-status{display:inline-block;padding:7px 10px;border:1px solid #c1ab6e;border-radius:9px;background:#fff4d9;color:#685116;font-weight:650}
.onboarding-docs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.onboarding-docs article{display:grid;gap:9px;min-width:0;padding:14px;border:1px solid #bcd4df;border-radius:12px;background:#f6fafc}.onboarding-docs a{overflow-wrap:anywhere}.onboarding-check{display:flex!important;align-items:center;gap:7px!important}.onboarding-check input{width:22px;height:22px;accent-color:#087e86}.onboarding-window small{display:block;line-height:1.5;margin-top:5px}
@media(max-width:650px){#content :is(.module-tabs,.parent-tabs,.tw-tabs,.hr-tabs,.reg-tabs,.finance-tabs)>button{flex:1 1 135px}.onboarding-launch{padding:14px}.onboarding-launch .hr22-actions{width:100%}.onboarding-launch button{flex:1 1 150px}.onboarding-editor{padding:12px}.onboarding-docs,.hr22-grid{grid-template-columns:1fr}.onboarding-window :is(input,select,textarea){font-size:16px;max-width:100%;min-width:0}.onboarding-window [type=file]{width:100%}.onboarding-steps li{flex:1 1 125px;font-size:13px;padding:10px}.onboarding-window main{min-width:0}.hr22-window .hr22-actions button{flex:1 1 140px;min-height:44px}}
@media(prefers-reduced-motion:reduce){.onboarding-window *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
/* Workspace sections grow with wrapped text and browser zoom.
   Only the application bar is sticky; nested card headers use normal flow. */
#content header{height:auto!important;min-height:0;position:relative;top:auto;max-width:100%;flex-wrap:wrap;gap:12px;padding:14px 16px;box-sizing:border-box}
#content header>div,#content header>section,#content .page-head>div{min-width:0;max-width:100%;flex:1 1 260px}
#content header h1,#content header h2,#content header h3{height:auto;line-height:1.35;white-space:normal;margin-top:0;margin-bottom:8px}
#content header p{height:auto;line-height:1.6;margin:6px 0 0;white-space:normal}
#content .hr22-priority>header{align-items:flex-start;padding:0 0 16px;margin-bottom:12px}
#content .hr22-priority>header>button{flex:0 1 auto;align-self:flex-start;white-space:normal;min-height:44px;line-height:1.4}
#content .hr22-categories{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;margin:12px 0;clear:both}
#content .hr22-categories>span{display:block;max-width:100%;height:auto;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
#content .hr22-priority details{min-width:0;max-width:100%}
#content .hr22-priority td,#content .hr22-priority th{white-space:normal;line-height:1.5;overflow-wrap:anywhere}
#content .hr22-priority td button{width:auto;margin:0;min-height:44px;max-width:100%;white-space:normal;line-height:1.4}
#content .finance-master-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr))}
#content .erp-dashboard-layout,#content .finance-dashboard-grid{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}
#content .parent-dashboard-grid>button,#content .master-actions,#content .reg-actions{min-width:0;max-width:100%;white-space:normal}
#content .parent-dashboard-grid>button>span{min-width:0;overflow-wrap:anywhere}
#content .workspace-tools-body{grid-template-columns:repeat(auto-fit,minmax(min(100%,195px),1fr))}
#content .workspace-tools-body button{height:auto;min-height:44px;white-space:normal;overflow-wrap:anywhere;line-height:1.45}
#content .table-scroll,#content .master-table-wrap,#content .invoice-table-wrap,#content .user-directory-table,#content .table-wrap,#content .professional-table-wrap{min-width:0;max-width:100%;overflow-x:auto}
#content .reg-form-grid,#content .master-form-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))!important}
#content input,#content select,#content textarea,dialog input,dialog select,dialog textarea{max-width:100%;min-width:0}
#sidebar .erp-parent{height:auto;white-space:normal;min-width:0;line-height:1.4}
#sidebar .erp-parent>span{min-width:0;overflow-wrap:anywhere}
#sidebar .erp-nav{min-height:0;flex:1 1 auto}
@media(max-width:1100px){#content .erp-dashboard-layout,#content .finance-dashboard-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){#content header{padding:12px}#content header>div{flex-basis:100%}#content .hr22-priority>header>button{flex:1 1 150px}#content .hr22-priority{padding:12px}#content .hr22-priority td button{min-width:135px}#content .erp-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){#content .erp-kpi-grid{grid-template-columns:minmax(0,1fr)}}
#content .fh-launch .fh-actions>button{width:auto;margin:0;min-height:44px;padding:10px 14px;border:1px solid #97becb;border-radius:10px;white-space:normal;line-height:1.45}
#content .fh-launch .fh-actions>button:not(.primary){background:white;color:#124a61}
#content .admin-breadcrumb{position:relative;top:auto;display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;max-width:100%;height:auto;overflow:visible}
#content .admin-breadcrumb>button,#content .admin-breadcrumb>b{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.45}
#content .master-category-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr))}
#content .master-category-grid>button{min-width:0;max-width:100%;height:auto;grid-template-columns:auto minmax(0,1fr);overflow-wrap:anywhere}
#content .master-data-panel>header>div:last-child{display:flex;flex-wrap:wrap;gap:10px}
#content .master-data-panel input,#content #userSearch{min-width:0;max-width:100%}
#content .report-filters{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));min-width:0;max-width:100%}
#content .report-filters>*,#content .report-hero>div,#content .report-title>div{min-width:0;max-width:100%}
#content .report-title,#content .report-hero{flex-wrap:wrap;height:auto}
#content .report-actions button,#content .report-filters>button{width:auto;margin:0;white-space:normal;min-height:44px}
#content .report-kpis{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr))}
#content .report-grid-wrap{min-width:0;max-width:100%;overflow:auto}
@media(max-width:1280px){#content .report-layout{grid-template-columns:minmax(0,1fr)}}




