/* R78-HF225 responsive viewport shell.
   Restrict new layout to report, project list, tender award pages. Other pages
   retain their existing layouts, with a non-destructive viewport scroll cap. */
:root{--hf225-view-height:calc(100dvh - 110px)}
#appView .content>.page.active{max-height:var(--hf225-view-height)!important;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}
#appView .content>.page.active:is(#page-report,#page-projectlist,#page-tenderawards){height:var(--hf225-view-height)!important;max-height:var(--hf225-view-height)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;min-height:0!important;box-sizing:border-box!important}
/* The global header/sidebar keep their own behavior. Content scrolls within the page. */
#page-report>.hero,#page-projectlist>.hero,#page-tenderawards>.hero{flex:0 0 auto}
#page-report>.card,#page-projectlist>.card{flex:1 1 0!important;min-height:0!important;margin-top:5px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
#page-report>.card>.reportfilters,#page-report>.card>.summarybox,#page-report>.card>.hf224-solid-tabs,
#page-projectlist>.card>.cardhead,#page-projectlist>.card>.hf224-solid-tabs{flex:0 0 auto!important}
#page-report>.card>.reportfilters{padding:7px 12px!important;gap:7px!important}
#page-report>.card>.summarybox{padding:6px 12px!important;gap:12px!important}
#page-report>.card>.hf224-solid-tabs,#page-projectlist>.card>.hf224-solid-tabs{padding:7px 12px!important;gap:7px!important}
#page-report .hf224-solid-tabs .hf224-tab,#page-projectlist .hf224-solid-tabs .hf224-tab{min-height:37px!important;padding:6px 12px!important;font-size:14px!important}
#page-projectlist>.card>.cardhead{padding-top:7px!important;padding-bottom:7px!important}
/* Report: each of the three views consumes the same bounded available area. */
#page-report>.card>.report-chart-card{flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;display:flex;flex-direction:column;padding:9px 13px!important}
#page-report[data-hf224-active="chart"] .report-chart-card .role-stack-legend{flex:0 0 auto}
#page-report[data-hf224-active="chart"] #personalProjectHoursChart{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain}
#page-report[data-hf224-active="summary"] #hf223ReportSummaryDisclosure{flex:1 1 auto!important;min-height:0!important;margin:7px 12px!important;overflow:auto!important;display:block!important}
#page-report[data-hf224-active="summary"] #hf223ReportSummaryDisclosure #groupCards{min-height:0;overflow:auto;align-content:start}
#page-report[data-hf224-active="detail"] #hf223ReportDetailTable{flex:1 1 auto!important;max-height:none!important;min-height:0!important;overflow:auto!important;overscroll-behavior:contain}
#page-report>.card>.hf224-report-detail-head{flex:0 0 auto!important;padding:9px 13px!important}
/* Project list: master table is outside .hours-analysis and must get full remaining height. */
#page-projectlist>.card>.hours-analysis{flex:1 1 0!important;min-height:0!important;overflow:hidden!important;display:flex;flex-direction:column;padding:9px 13px!important}
#page-projectlist[data-hf224-active="chart"] .hours-analysis>.summarybox,
#page-projectlist[data-hf224-active="chart"] .hours-analysis>.role-stack-legend{flex:0 0 auto!important}
#page-projectlist[data-hf224-active="chart"] #managerProjectHoursChart{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain}
#page-projectlist[data-hf224-active="summary"] #hf223ProjectSummaryDisclosure{flex:1 1 auto!important;min-height:0!important;margin:4px 0!important;display:flex!important;flex-direction:column;overflow:hidden!important}
#page-projectlist[data-hf224-active="summary"] #hf223ProjectSummaryDisclosure>.case-summary{flex:1 1 auto!important;max-height:none!important;min-height:0!important;overflow:auto!important;margin:0!important}
#page-projectlist[data-hf224-active="master"] .hours-analysis{display:none!important}
#page-projectlist[data-hf224-active="master"]>.card>.hf224-project-master-head{flex:0 0 auto!important;padding:8px 13px!important}
#page-projectlist[data-hf224-active="master"] #hf223ProjectMasterTable{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain}
:is(#page-report,#page-projectlist) :is(#hf223ReportDetailTable,#hf223ProjectMasterTable,#hf223ProjectSummaryDisclosure .tablewrap) thead th{position:sticky;top:0;z-index:2;background:#f8fafc}
/* Tender Award: search + results and batch import both remain visible in one window.
   Independent internal scrolling; input text sizes are intentionally NOT reduced. */
#page-tenderawards.active{gap:7px!important}
#page-tenderawards>.hero{display:none!important}
#page-tenderawards>.card{min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;margin-top:0!important}
#page-tenderawards>.card:nth-child(2){flex:1 1 51%!important}
#page-tenderawards>.card:nth-child(3){flex:1 1 49%!important}
#page-tenderawards>.card>.cardhead{flex:0 0 auto!important;padding:8px 12px!important}
#page-tenderawards>.card>.cardhead .cardsub{font-size:12px!important;line-height:1.35!important}
#page-tenderawards>.card:nth-child(2)>.bodypad{flex:0 0 auto!important;padding:8px 12px!important}
#page-tenderawards .hf62-award-search-grid{gap:7px!important}
#page-tenderawards .hf62-award-actions{margin-top:5px!important;gap:6px!important}
#page-tenderawards .hf62-award-tablewrap{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain}
#page-tenderawards>.card:nth-child(3)>.bodypad{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;padding:7px 12px!important;overscroll-behavior:contain}
#page-tenderawards .hf64-batch-entry{padding:7px 9px!important;margin-bottom:7px!important}
#page-tenderawards #hf64TenderBatchText{min-height:76px!important;max-height:26vh!important;line-height:1.4!important}
#page-tenderawards .hf64-batch-actions{margin-top:6px!important;gap:6px!important}
#page-tenderawards .hf64-batch-results{max-height:26vh!important;min-height:0!important;overflow:auto!important}
#page-tenderawards :is(.hf62-award-table,.hf64-batch-results) th{position:sticky;top:0;z-index:3}
@media(max-height:760px){
 #page-report>.card>.reportfilters{padding:5px 9px!important}
 #page-projectlist>.card>.cardhead{padding:5px 9px!important}
 #page-tenderawards>.card>.cardhead{padding:5px 9px!important}
 #page-tenderawards .hf62-award-search-grid{gap:4px!important}
 #page-tenderawards #hf64TenderBatchText{min-height:60px!important}
}
@media(max-width:1000px){
 #page-report>.card>.reportfilters{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #page-tenderawards .hf62-award-search-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:700px){
 #page-report>.card>.reportfilters{grid-template-columns:1fr!important}
 #page-report>.card>.hf224-solid-tabs,#page-projectlist>.card>.hf224-solid-tabs{padding:5px 7px!important}
 #page-report .hf224-tab,#page-projectlist .hf224-tab{font-size:12px!important;padding:5px 7px!important;min-height:34px!important}
 #page-projectlist>.card>.cardhead{overflow-x:auto}
 #page-tenderawards .hf62-award-search-grid{grid-template-columns:1fr!important}
 #page-tenderawards>.card:nth-child(2){flex:1 1 54%!important}
 #page-tenderawards>.card:nth-child(3){flex:1 1 46%!important}
}
@media print{
 #appView .content>.page.active{height:auto!important;max-height:none!important;overflow:visible!important}
 #appView .content>.page.active:is(#page-report,#page-projectlist,#page-tenderawards){height:auto!important;max-height:none!important;overflow:visible!important;display:block!important}
}
/* <details> may not form a reliable flex formatting context in Chromium.
   Explicitly cap its sole table scrollbox to the details viewport. */
#page-projectlist[data-hf224-active="summary"] #hf223ProjectSummaryDisclosure>.case-summary{height:100%!important;max-height:100%!important;min-height:0!important;overflow:auto!important}
#page-projectlist[data-hf224-active="summary"] #hf223ProjectSummaryDisclosure{position:relative!important}
#page-projectlist[data-hf224-active="summary"] #hf223ProjectSummaryDisclosure>.case-summary{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-height:none!important;box-sizing:border-box!important}
