/* SKGA Portfolio 5.3.9.58.47 — scoped UI refinement, no permission changes */
/* Topbar: prevent logout button stretching in a flex/grid parent. */
#portfolioTopActions53944.portfolio-top-actions-53944 {
  display:flex !important; flex:0 0 auto !important; width:auto !important;
  min-width:0 !important; margin-left:auto !important;
  justify-content:flex-end !important; align-items:center !important;
  flex-wrap:nowrap !important; gap:10px !important;
}
#portfolioTopIdentity53945.portfolio-top-identity-53945 {
  display:flex !important; flex:0 1 auto !important; flex-direction:row !important;
  width:auto !important; min-width:0 !important; max-width:100% !important;
  align-items:center !important; justify-content:flex-end !important;
  flex-wrap:nowrap !important; gap:10px !important; white-space:nowrap !important;
}
#portfolioTopIdentity53945 .portfolio-top-name-53945 {
  display:block !important; width:auto !important; max-width:240px !important;
  min-width:0 !important; overflow:hidden !important; text-overflow:ellipsis !important;
  white-space:nowrap !important; line-height:1.3 !important; font-size:13px !important;
}
#portfolioRoleSwitcherWrap53945.portfolio-role-switcher-wrap-53945 {
  display:inline-flex !important; flex:0 0 auto !important; margin:0 !important;
  width:auto !important; max-width:225px !important; align-items:center !important;
}
#portfolioRoleSwitcherWrap53945 > span {display:none !important}
#portfolioRoleSwitcher53945 {
  box-sizing:border-box !important; width:190px !important; min-width:135px !important;
  max-width:190px !important; height:38px !important; padding:7px 29px 7px 11px !important;
  font-size:12px !important; border-radius:10px !important;
}
#portfolioTopActions53944 #logout.portfolio-top-logout-53944 {
  box-sizing:border-box !important; display:inline-flex !important;
  width:auto !important; min-width:100px !important; max-width:132px !important;
  flex:0 0 auto !important; align-self:center !important;
  padding:8px 14px !important; height:38px !important; min-height:38px !important;
  justify-content:center !important; white-space:nowrap !important;
  font-size:13px !important; line-height:1.2 !important;
}
/* Same-looking tabs in the common administration screen. */
#content > .tabs, #content .tabs:has(> button[data-s]) {
  display:flex; align-items:center; flex-wrap:wrap; gap:8px;
  padding:0; margin:0 0 16px; border:0; background:transparent;
}
#content .tabs > button[data-s] {
  box-sizing:border-box; flex:0 0 auto; width:auto; min-height:39px;
  padding:9px 15px !important; border:1px solid #d7dfe9 !important;
  background:#fff !important; color:#243247 !important;
  border-radius:10px !important; box-shadow:none !important;
  font-size:13px !important; font-weight:600 !important; line-height:1.3;
}
#content .tabs > button[data-s].active,
#content .tabs > button[data-s][aria-selected="true"] {
  background:#78100f !important; border-color:#78100f !important; color:#fff !important;
}
html[data-theme="dark"] #content .tabs > button[data-s] {
  background:#242830 !important; border-color:#39414d !important;
  color:#e5eaf2 !important;
}
html[data-theme="dark"] #content .tabs > button[data-s].active,
html[data-theme="dark"] #content .tabs > button[data-s][aria-selected="true"] {
  background:#79100f !important; border-color:#8a1715 !important; color:#fff !important;
}
#content .tabs > button[data-s]:focus-visible,
#portfolioRoleSwitcher53945:focus-visible,
#portfolioTopActions53944 #logout:focus-visible {outline:2px solid #b94747 !important; outline-offset:3px !important}
/* Moderator institute header: keep title and KPIs together. */
.mod37-shell .mod37-heading {
  display:flex !important; align-items:center !important; justify-content:space-between !important;
  flex-wrap:wrap !important; gap:12px 24px !important;
  padding:4px 0 12px !important; margin:0 0 14px !important;
}
.mod37-shell .mod37-heading > div:first-child {min-width:240px; flex:1 1 320px}
.mod37-shell .mod37-heading h2 {margin:4px 0 6px !important; line-height:1.2 !important}
.mod37-shell .mod37-heading p {margin:0 !important; line-height:1.5 !important}
.mod37-shell .mod37-stats {
  display:flex !important; flex:0 1 auto !important; align-items:center !important;
  justify-content:flex-end !important; margin:0 !important; padding:10px 13px !important;
  min-height:38px !important; border-radius:10px !important;
  line-height:1.5 !important; white-space:normal !important;
  color:#4a586b !important; background:#f4f6fa !important; border:1px solid #e0e5ed !important;
}
html[data-theme="dark"] .mod37-shell .mod37-stats {
  color:#c2cad7 !important; background:#23272e !important; border-color:#39404a !important;
}
.mod37-shell .mod37-stats b {color:#911616 !important; font-variant-numeric:tabular-nums}
html[data-theme="dark"] .mod37-shell .mod37-stats b {color:#f1f4fa !important}
@media(max-width:1050px){
  #portfolioTopIdentity53945 .portfolio-top-name-53945 {max-width:170px !important}
  #portfolioRoleSwitcher53945 {width:165px !important}
  .mod37-shell .mod37-stats {justify-content:flex-start !important}
}
@media(max-width:740px){
  #portfolioTopActions53944.portfolio-top-actions-53944 {gap:6px !important}
  #portfolioTopIdentity53945 .portfolio-top-name-53945 {display:none !important}
  #portfolioRoleSwitcher53945 {width:145px !important; min-width:115px !important}
  #portfolioTopActions53944 #logout.portfolio-top-logout-53944 {
    min-width:72px !important; max-width:90px !important; padding:7px 9px !important; font-size:12px !important;
  }
  #content .tabs > button[data-s] {padding:8px 11px !important; font-size:12px !important}
  .mod37-shell .mod37-heading {align-items:flex-start !important}
}
