/* Visual overrides only: retain Flexigrid's measured column widths and scrolling. */
.flexigrid{color:#40556c;background:#fff;border:1px solid #dce5eb;border-radius:14px;box-shadow:0 6px 24px #172c4308;font-size:12px}
.flexigrid div.mDiv,.flexigrid div.tDiv,.flexigrid div.sDiv,.flexigrid div.pDiv{background:#f8fafb;border:0;border-bottom:1px solid #e3eaef;color:#40556c}
.flexigrid div.mDiv{background:#edf7f6;color:#146b70}
.flexigrid div.tDiv{padding:10px}
.flexigrid div.tDiv2{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.flexigrid div.fbutton{float:none;display:flex;align-items:center;border:1px solid #dce5eb;border-radius:8px;background:#fff;color:#40556c;padding:0;margin:0;min-height:32px}
.flexigrid div.fbutton:hover,.flexigrid div.fbutton.fbOver{padding:0;border:1px solid #b7d8d5;background:#edf7f6;color:#146b70}
.flexigrid div.fbutton div,.flexigrid div.fbutton:hover div,.flexigrid div.fbutton.fbOver div{padding:2px 6px;border:0}
.flexigrid div.fbutton span{line-height:1.8}
.flexigrid div.btnseparator{border:0;border-inline-start:1px solid #dce5eb;height:22px;margin:2px 4px}
.flexigrid div.hDiv{background:#edf5f5;border:0;border-bottom:1px solid #d6e5e4;color:#365f64}
.flexigrid div.hDiv th{font-weight:bold;color:#365f64}
.flexigrid div.hDiv th.sorted{background:#dfeeed;color:#10585c}
.flexigrid div.hDiv th.thOver div,.flexigrid div.hDiv th.sorted.thOver div{border-bottom-color:#146b70}
.flexigrid div.hDiv th,.flexigrid div.bDiv td{border-left-color:transparent;border-right-color:#e8eef1}
.flexigrid div.bDiv{border:0;background:#fff;scrollbar-width:thin;scrollbar-color:#b7cece #f5f8fa}
.flexigrid div.bDiv table{margin-bottom:0;border-bottom:0}
.flexigrid div.bDiv td{color:#40556c;border-bottom:1px solid #edf1f4}
.flexigrid div.bDiv td div{line-height:1.8}
.flexigrid div.bDiv tr.erow td{background:#f8fafb;border-bottom-color:#edf1f4}
.flexigrid div.bDiv tr td.sorted,.flexigrid div.bDiv tr.erow td.sorted{background:#f0f6f6;border-bottom-color:#e5eeee}
.flexigrid div.bDiv tr:hover td,.flexigrid div.bDiv tr:hover td.sorted,.flexigrid div.bDiv tr.trOver td{background:#eaf5f3;border-bottom:1px solid #cee5e1}
.flexigrid div.bDiv tr.trSelected td,.flexigrid div.bDiv tr.trSelected td.sorted,.flexigrid div.bDiv tr.trSelected:hover td,.flexigrid div.bDiv tr.trSelected:hover td.sorted{background:#ffe3a3;color:#513b13;border-bottom:1px solid #d6a648;border-left-color:#ffe3a3;border-right-color:#ffe3a3}
.flexigrid div.bDiv tr.trSelected td:first-child{box-shadow:inset 4px 0 #b77912}
.flexigrid div.bDiv a{color:#146b70;text-decoration:none}
.flexigrid div.bDiv a:hover{text-decoration:underline;color:#10585c}
.flexigrid div.tDiv input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),.flexigrid div.tDiv select,.flexigrid div.sDiv input:not([type="checkbox"]):not([type="radio"]),.flexigrid div.sDiv select,.flexigrid div.pDiv input,.flexigrid div.pDiv select{box-sizing:border-box;min-height:32px;border:1px solid #ccd9e1;border-radius:7px;background:#fff;color:#40556c;padding:4px 8px;font:12px/1.6 wyekan,Tahoma,sans-serif}
.flexigrid div.tDiv input[type="button"],.flexigrid div.tDiv input[type="submit"],.flexigrid div.sDiv input[type="button"],.flexigrid div.sDiv input[type="submit"]{background:#146b70!important;color:#fff!important;border-color:#146b70!important;cursor:pointer}
.flexigrid div.pDiv{padding:8px;border-top:1px solid #e3eaef;border-bottom:0;white-space:normal}
.flexigrid div.pDiv div.pDiv2{display:flex;align-items:center;flex-wrap:wrap;gap:6px;width:auto;float:none;margin:0;direction:ltr}
.flexigrid div.pDiv .pGroup{display:flex;align-items:center;gap:4px;float:none;height:auto;margin:0 3px}
.flexigrid div.pDiv .pPageStat,.flexigrid div.pDiv .pcontrol{top:0;line-height:32px}
.flexigrid div.pDiv input{top:0;vertical-align:middle}
.flexigrid div.pDiv div.pButton,.flexigrid div.pDiv div.pButton:hover,.flexigrid div.pDiv div.pButton.pBtnOver{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px solid #dce5eb;border-radius:7px;background-color:#fff}
.flexigrid div.pDiv div.pButton:hover{background-color:#e0f0ee;border-color:#b7d8d5}
.flexigrid div.pDiv div.pButton:hover span,.flexigrid div.pDiv div.pButton.pBtnOver span{border:0;width:20px;height:20px}
.flexigrid div.nDiv{background:#fff;border:1px solid #dce5eb;border-radius:9px;box-shadow:0 8px 24px #172c4320}
.flexigrid div.nDiv tr:hover td{background:#edf7f6;border-color:#dce5eb}
.flexigrid div.vGrip{background:#f5f8fa;border-color:#dce5eb}
.flexigrid input:focus-visible,.flexigrid select:focus-visible,.flexigrid button:focus-visible,.flexigrid a:focus-visible{outline:2px solid #7ac8cc;outline-offset:1px}
/* Grid page frames and their existing section tabs. */
.portal-grid-shell{border:1px solid #dce5eb!important;border-radius:16px;background:#fff;padding:10px;box-shadow:0 6px 24px #172c4308}
.portal-grid-shell .SelectedTabFirst,.portal-grid-shell .SelectedTabCenter,.portal-grid-shell .SelectedTabLast,.portal-grid-shell .UnSelectedTabFirst,.portal-grid-shell .UnSelectedTabCenter,.portal-grid-shell .UnSelectedTabLast{box-sizing:border-box;background:#f5f8fa;color:#40556c;border:0;border-radius:8px;height:30px;line-height:30px;padding:0 10px;font-weight:normal}
.portal-grid-shell .SelectedTabFirst,.portal-grid-shell .SelectedTabCenter,.portal-grid-shell .SelectedTabLast{background:#e0f0ee;color:#10585c;font-weight:bold}
.portal-grid-shell #ListContainer{margin:10px 0 0!important}
@media(max-width:600px){.flexigrid div.tDiv{padding:7px}.flexigrid div.tDiv2{gap:4px}.portal-grid-shell{padding:7px}.flexigrid div.pDiv .pPageStat{width:100%}}

/* Full-window layout only for main grid pages; popup grids keep their own sizes. */
body:has(.ContentMain .portal-grid-shell){margin:0;background:#fff!important;overflow:hidden}
.Whole:has(.ContentMain .portal-grid-shell){height:100vh;height:100dvh;display:flex;flex-direction:column;min-width:0;background:#fff}
.Whole:has(.portal-grid-shell)>.TopMenu{flex:0 0 auto}
.Whole:has(.portal-grid-shell)>.ContentMainContainer{flex:1 1 0;min-height:0;width:100%;height:auto;padding:0;display:flex;flex-direction:column}
.ContentMainContainer:has(.portal-grid-shell)>center{display:flex;flex:1 1 0;min-height:0;width:100%}
.ContentMain:has(.portal-grid-shell){display:flex;flex-direction:column;flex:1 1 0;min-height:0;min-width:0;width:100%!important;max-width:none;height:auto;margin:0;padding:0}
.ContentMain .portal-grid-shell{box-sizing:border-box;display:flex;flex-direction:column;flex:1 1 0;min-height:0;min-width:0;width:100%!important;height:auto!important;margin:0;padding:0;border:0!important;border-radius:0;box-shadow:none}
.ContentMain .portal-grid-shell>div:not(#Grid){flex:0 0 auto;padding:6px 10px;background:#fff}
.ContentMain .portal-grid-shell #Grid{display:flex;flex-direction:column;flex:1 1 0;min-height:0;min-width:0;width:100%;margin:0}
.ContentMain .portal-grid-shell #Grid>div:has(>.flexigrid),.ContentMain .portal-grid-shell #ListContainer{display:flex;flex-direction:column;flex:1 1 0;min-height:0;min-width:0;margin:0!important}
.ContentMain .portal-grid-shell #Grid>div:not(:has(*)){display:none}
.ContentMain .portal-grid-shell .flexigrid{box-sizing:border-box;display:flex;flex-direction:column;flex:1 1 0;min-height:0;width:100%!important;max-width:100%;border-radius:0;border-width:1px 0 0;box-shadow:none}
.ContentMain .portal-grid-shell .flexigrid>div{flex-shrink:0}
.ContentMain .portal-grid-shell .flexigrid div.bDiv{flex:1 1 0;min-height:0;height:0!important;width:100%!important;overflow:auto}
.ContentMain .portal-grid-shell .flexigrid div.tDiv{max-height:35vh;overflow:auto}
.ContentMain .portal-grid-shell .flexigrid div.hDiv,.ContentMain .portal-grid-shell .flexigrid div.pDiv{box-sizing:border-box;width:100%!important}
.ContentMain .portal-grid-shell .flexigrid div.sDiv2{box-sizing:border-box;max-width:100%;width:auto}
.ContentMain .portal-grid-shell .flexigrid div.vGrip,.ContentMain .portal-grid-shell .flexigrid div.hGrip{display:none}
.Whole:has(.portal-grid-shell)>.Footer{position:static;flex:0 0 auto;height:auto;max-height:none;overflow:visible;padding:0;background:#fff;border-top:1px solid #e3eaef}

/* DrawBox adds a fixed-size table between ContentMain and the grid page. */
.ContentMain #HomeMiddle:has(.portal-grid-shell){position:static;display:flex;flex-direction:column;flex:1 1 0;min-width:0;min-height:0;width:100%!important;height:auto!important;margin:0!important;padding:0!important;float:none}
.ContentMain #HomeMiddle>table:has(.portal-grid-shell),
.ContentMain #HomeMiddle>table>tbody:has(.portal-grid-shell),
.ContentMain #HomeMiddle>table>tbody>tr:has(.portal-grid-shell),
.ContentMain #HomeMiddle>table>tbody>tr>td:has(.portal-grid-shell){display:flex;flex-direction:column;flex:1 1 0;min-width:0;min-height:0;width:100%!important;max-width:none;height:auto!important;margin:0;padding:0!important;border:0!important}
.ContentMain #HomeMiddle>table:has(.portal-grid-shell)>tbody>tr:not(:has(.portal-grid-shell)),
.ContentMain #HomeMiddle>table>tbody>tr:has(.portal-grid-shell)>td:not(:has(.portal-grid-shell)){display:none}
.ContentMain .portal-message-shell #Grid>.portal-message-filters{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;flex:0 0 auto;gap:8px;height:auto!important;margin:0!important;padding:8px 12px!important}
.ContentMain .portal-message-shell #Grid>.portal-message-content{display:flex;flex-direction:row;flex:1 1 0;min-height:0;min-width:0;width:100%;gap:0}
.ContentMain .portal-message-shell #MessageMenuLeft{box-sizing:border-box;float:none!important;flex:0 0 180px;width:180px!important;height:auto!important;min-height:0;overflow:auto;padding:10px;border:0!important;border-inline-end:1px solid #e3eaef!important;background:#f8fafb}
.ContentMain .portal-message-shell #MessageList{display:flex;flex-direction:column;flex:1 1 0;min-width:0;min-height:0;width:auto!important;float:none!important}
@media(max-width:600px){.ContentMain .portal-message-shell #MessageMenuLeft{flex-basis:125px;width:125px!important;padding:4px}}

/* Anchor the page shell so focusing grid search cannot scroll the whole document. */
html:has(.ContentMain .portal-grid-shell){height:100%;overflow:hidden}
.Whole:has(.ContentMain .portal-grid-shell){position:fixed;inset:0;height:auto;overflow:visible}
.Whole:has(.portal-grid-shell)>.Footer{position:relative;bottom:auto;left:auto;box-sizing:border-box}

/* Comfortable spacing for the shared quick-search bar, including popup grids. */
.flexigrid div.sDiv2{box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;gap:10px 12px;width:auto;max-width:100%;padding:12px 16px}
.flexigrid div.sDiv2 .grid-search-label{white-space:nowrap;color:#40556c}
.flexigrid div.sDiv2 input,.flexigrid div.sDiv2 select{margin:0;float:none;min-height:36px;max-width:100%}
.flexigrid div.sDiv2 input[type="button"]{width:auto!important;padding:6px 16px;white-space:nowrap}
@media(max-width:600px){.flexigrid div.sDiv2{gap:10px;padding:12px}.flexigrid div.sDiv2 .grid-search-label{flex-basis:100%}.flexigrid div.sDiv2 .qsbox,.flexigrid div.sDiv2 select{flex:1 1 140px;min-width:0}}

/* Content-sized section navigation, shared by all permission-driven tabs. */
.portal-section-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:0 18px;width:100%;height:auto;border-bottom:1px solid #dce5eb;background:#fff}
.portal-section-tabs .portal-section-tab{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:0 0 auto;float:none;width:auto;min-height:40px;padding:9px 8px;box-sizing:border-box;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:#40556c;font:13px/1.6 wyekan,Tahoma,sans-serif;text-decoration:none;white-space:nowrap}
.portal-section-tabs .portal-section-tab:hover{color:#146b70;background:#f5f9f9}
.portal-section-tabs .portal-section-tab.is-active{color:#146b70;border-bottom-color:#146b70;font-weight:bold}
.portal-section-tab svg{flex:none}
.portal-section-tabs .portal-section-tab:focus-visible{outline:2px solid #7ac8cc;outline-offset:-2px}
@media(max-width:600px){.portal-section-tabs{gap:0 8px}.portal-section-tabs .portal-section-tab{min-height:44px;padding:9px 6px}}

/* Share a row when both tool groups fit; wrap whole groups on narrower grids. */
.flexigrid .portal-grid-tools{display:flex;flex-wrap:wrap;align-items:center;gap:0 12px;min-width:0;background:#f8fafb;border-bottom:1px solid #e3eaef}
.flexigrid .portal-grid-tools>div.tDiv,.flexigrid .portal-grid-tools>div.sDiv{box-sizing:border-box;flex:0 1 auto;width:max-content;max-width:100%;min-width:0;float:none;clear:none;border:0}
.flexigrid .portal-grid-tools>div.sDiv{margin-inline-start:auto}
.flexigrid .portal-grid-tools div.tDiv2{float:none;width:auto;max-width:100%}
.flexigrid .portal-grid-tools>div.tDiv>div[style="clear:both"]{display:none}
.flexigrid .portal-grid-tools div.sDiv2{padding:10px;gap:8px}
@media(max-width:600px){.flexigrid .portal-grid-tools>div.tDiv,.flexigrid .portal-grid-tools>div.sDiv{flex-basis:100%;width:100%}.flexigrid .portal-grid-tools>div.sDiv{margin-inline-start:0}}

/* Quick search participates in toolbar wrapping instead of occupying its own row. */
.flexigrid .portal-grid-tools>div.tDiv{flex:1 1 100%;width:100%}
.flexigrid .portal-grid-tools .tDiv2>div.sDiv{flex:0 1 auto;width:auto;max-width:100%;min-width:0;margin-inline-start:auto;float:none;clear:none;border:0;padding:0;position:static}
.flexigrid .portal-grid-tools .tDiv2>div.sDiv .sDiv2{float:none;padding:0;gap:6px;min-height:36px}
.flexigrid .portal-grid-tools .tDiv2>div.sDiv input.qsbox{width:180px}
.flexigrid .portal-grid-tools .tDiv2>div.sDiv select{max-width:180px}
@media(max-width:600px){.flexigrid .portal-grid-tools .tDiv2>div.sDiv{flex-basis:100%;margin-inline-start:0}}
