/* HF153: the mounted tool owns the viewport. Restored cards keep the router's display:none. */
body #appView .content:has(>#page-projects.active),body #appView .content:has(#page-tasks.active #hf52ProjectHub.hf58-editing){max-width:none!important;margin-left:0!important;margin-right:0!important;padding-left:12px!important;padding-right:12px!important;box-sizing:border-box}
body #page-projects .tablewrap th,body #page-projects .tablewrap td{padding:4px 3px!important;line-height:1.35;font-size:11.5px!important}
body #appView .content:has(#page-tasks.active #hf52ProjectHub.hf58-editing){padding-bottom:8px!important}
body #page-tasks.active:has(#hf52ProjectHub.hf58-editing){height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
body #hf58WorkbenchBody[data-hf153-tool]{display:flex!important;flex-direction:column!important;height:var(--hf153-workspace-height)!important;min-height:0!important;max-height:none!important;overflow:hidden!important;box-sizing:border-box}
body #hf58WorkbenchBody[data-hf153-tool]>.hf58-mounted{width:100%!important;max-width:none!important;height:100%!important;flex:1 1 0!important;min-height:0!important;max-height:none!important;box-sizing:border-box}
body #hf58WorkbenchBody[data-hf153-tool=gantt]>.hf58-mounted{display:flex!important;flex-direction:column!important;overflow:hidden!important}
body #hf58WorkbenchBody[data-hf153-tool=gantt]>.hf58-mounted>.bodypad,body #hf58WorkbenchBody[data-hf153-tool=gantt] #taskProjectArea{display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;overflow:hidden!important}
body #hf58WorkbenchBody[data-hf153-tool=gantt] #hf50ProjectSummary{flex:0 1 auto!important;max-height:30%;min-height:0!important;overflow:auto!important}
body #hf58WorkbenchBody[data-hf153-tool=gantt] .progress-report-panel{flex:0 1 auto!important;max-height:20%;min-height:0!important;overflow:auto!important}
body #hf58WorkbenchBody .hf152-gantt-card.hf58-mounted .project-split-toolbar{flex:0 0 auto!important}
body #hf58WorkbenchBody[data-hf153-tool=gantt] #projectSplitView.hf143-preview{height:var(--hf152-preview-height,100%)!important;min-height:0!important;max-height:none!important;flex:1 1 0!important;width:100%!important;max-width:none!important;box-sizing:border-box}
body #hf58WorkbenchBody[data-hf153-tool=gantt] #projectSplitView.hf143-preview>.project-gantt-pane{height:auto!important;max-height:none!important;min-height:0!important;flex:1 1 0!important;box-sizing:border-box}
body #hf58WorkbenchBody[data-hf153-tool=gantt] #projectSplitView.hf143-preview #ganttChart{height:auto!important;max-height:none!important;min-height:0!important;flex:1 1 0!important;overflow:auto!important;box-sizing:border-box}
body #hf58WorkbenchBody[data-hf153-tool=org]>#page-orgchart{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}
body #hf58WorkbenchBody[data-hf153-tool=org] #page-orgchart .r59-org-workspace.hf143-preview{height:auto!important;flex:1 1 0!important;min-height:0!important;max-height:none!important;margin-top:0!important;box-sizing:border-box}
body #hf58WorkbenchBody[data-hf153-tool=org] #page-orgchart .r59-org-panel:not(.hf143-editor){height:auto!important;flex:1 1 0!important;min-height:0!important;max-height:none!important;box-sizing:border-box;padding:8px!important;overflow:hidden!important}
body #hf58WorkbenchBody[data-hf153-tool=org] #page-orgchart .r59-org-actions{flex:0 0 auto!important}
body #hf58WorkbenchBody[data-hf153-tool=org] #page-orgchart #r59OrgCanvas{height:auto!important;flex:1 1 0!important;min-height:0!important;max-height:none!important;box-sizing:border-box}
body #hf58WorkbenchBody[data-hf153-tool=bid]>#page-bidanalysis,body #hf58WorkbenchBody[data-hf153-tool=bid] #page-bidanalysis .hf66-bid-shell{display:flex!important;flex-direction:column!important;flex:1 1 0!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
body #hf58WorkbenchBody[data-hf153-tool=bid] #hf66BidFrame{height:auto!important;min-height:0!important;flex:1 1 0!important}
body #hf58WorkbenchBody[data-hf153-tool=supplier]>#page-projectsuppliers{min-height:0!important;overflow:auto!important;overscroll-behavior:contain}
body #hf58WorkbenchBody[data-hf153-tool=summary]>#hf145ProjectSummary{display:flex!important;flex-direction:column!important;min-height:0!important;padding:10px!important;overflow:hidden!important;gap:8px}
.hf153-summary-head{display:flex;align-items:center;justify-content:space-between;flex:0 0 auto;gap:8px;min-width:0}
.hf153-summary-head h2{font-size:17px!important;line-height:1.4;margin:0!important}
.hf153-summary-head button{flex:0 0 auto}
#hf153SummaryDetails{flex:0 1 auto;min-height:0;max-height:35%;overflow:auto;border:1px solid #dbe4ee;border-radius:8px}
#hf153SummaryDetails>summary{padding:6px 10px;cursor:pointer;background:#f8fafc;position:sticky;top:0;z-index:2;font-size:13px}
#hf153SummaryDetails #hf144ProjectDetail{padding:0!important}
#hf153SummaryDetails .hf144-project-details{padding:10px!important}
#hf145ProjectSummary:not(:has(#hf152SummaryAnalysis)) #hf153SummaryDetails,#hf145ProjectSummary:has(#hf152SummaryAnalysis[data-hf153-report-state=empty]) #hf153SummaryDetails{max-height:none;flex:1 1 auto}
#hf152SummaryAnalysis{display:flex;flex-direction:column;flex:1 1 0;min-height:0;min-width:0;margin:0;padding:0;background:#fff;gap:8px;overflow:hidden}
.hf153-report-head{display:flex;flex:0 0 auto;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
#hf152SummaryAnalysis h3{margin:0!important;color:#17365d;font-size:17px}
.hf153-report-head>[role=status]{margin:0;flex:1 1 auto;color:#64748b;font-size:12px}
.hf153-report-head>button{flex:0 0 auto;margin-left:auto}
.hf152-summary-report{display:block;width:100%;height:0;flex:1 1 0;min-height:0;max-height:none;border:1px solid #cbd5e1;border-radius:8px;box-sizing:border-box;background:#fff}
#hf152SummaryAnalysis:fullscreen{width:100dvw!important;height:100dvh!important;max-width:none!important;max-height:none!important;min-height:0!important;padding:12px!important;box-sizing:border-box;margin:0!important;border:0!important;zoom:1!important}
/* HF154: use the preview's remaining space and expose both scrollbar directions. */
body #hf58WorkbenchBody[data-hf153-tool=org] #page-orgchart .r59-org-workspace.hf143-preview{display:flex!important;flex-direction:column!important;width:100%!important;min-width:0!important}
body #hf58WorkbenchBody[data-hf153-tool=org] #page-orgchart #r59OrgCanvas{overflow:auto!important;scrollbar-width:auto!important;scrollbar-gutter:stable;overscroll-behavior:contain;position:relative!important}
body #hf58WorkbenchBody[data-hf153-tool=org] #page-orgchart #r59OrgCanvas::-webkit-scrollbar{width:12px!important;height:12px!important}
body #page-projects .tablewrap .btn{padding:3px 4px!important;min-width:0!important;font-size:11px!important;white-space:normal!important;line-height:1.3!important;max-width:100%!important}
body #page-projects .tablewrap .toolbar{gap:3px!important;flex-wrap:wrap!important;min-width:0!important}
#hf154SupplierChoices{width:min(1100px,94vw);max-width:94vw;height:min(850px,88dvh);max-height:88dvh;padding:0;border:1px solid #cbd5e1;border-radius:12px;box-sizing:border-box;color:#0f172a;background:#fff}
#hf154SupplierChoices[open]{display:flex;flex-direction:column}
#hf154SupplierChoices::backdrop{background:#0f172a88}
.hf154-supplier-choice-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid #cbd5e1;flex:0 0 auto}
.hf154-supplier-choice-body{flex:1 1 0;min-height:0;overflow:auto;padding:12px 16px}
.hf154-supplier-choice{display:grid;grid-template-columns:minmax(180px,1.2fr) 120px minmax(180px,1.2fr);gap:6px 12px;text-align:left;width:100%;padding:12px;margin:6px 0;background:#f8fafc;color:#0f172a;border:1px solid #cbd5e1;border-radius:8px;cursor:pointer;font-size:14px}
.hf154-supplier-choice:hover,.hf154-supplier-choice:focus-visible{border-color:#2563eb;background:#eff6ff}
.hf154-supplier-choice>span:last-child{grid-column:1/-1;color:#64748b;font-size:12px}
@media(max-width:700px){.hf154-supplier-choice{grid-template-columns:1fr}.hf154-supplier-choice>span:last-child{grid-column:auto}}
@media print{body #hf58WorkbenchBody[data-hf153-tool=org]>#page-orgchart,body #hf58WorkbenchBody[data-hf153-tool=bid]>#page-bidanalysis,body #hf58WorkbenchBody[data-hf153-tool=bid] #page-bidanalysis .hf66-bid-shell,body #hf58WorkbenchBody[data-hf153-tool],body #hf58WorkbenchBody[data-hf153-tool]>.hf58-mounted,body #hf58WorkbenchBody[data-hf153-tool=gantt]>.hf58-mounted>.bodypad,body #hf58WorkbenchBody[data-hf153-tool=gantt] #taskProjectArea,body #hf58WorkbenchBody[data-hf153-tool=gantt] #projectSplitView.hf143-preview,body #hf58WorkbenchBody[data-hf153-tool=gantt] #ganttChart,body #hf58WorkbenchBody[data-hf153-tool=org] #page-orgchart .r59-org-workspace.hf143-preview,body #hf58WorkbenchBody[data-hf153-tool=org] #page-orgchart #r59OrgCanvas{display:block!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}.hf153-summary-head button,#hf153ReportFullscreen{display:none!important}}
