#moduleWindow .module-frame {
  min-height: 0;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto !important;
}

#moduleWindow #moduleBody {
  min-height: 0;
  overflow: hidden !important;
}

#moduleWindow #moduleBusy:not(.hidden) {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  color: #123f5b;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(218, 241, 248, 0.9), transparent 42%),
    #f4f9fc;
}

#moduleWindow #moduleBusy:not(.hidden) strong {
  font-size: 1.05rem;
  color: #073f63;
}

#moduleWindow #moduleBusy:not(.hidden) span {
  color: #55758d;
}

#moduleWindow #moduleTableWrap {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: auto !important;
  overscroll-behavior: contain;
}

#moduleWindow .module-footer {
  position: relative;
  z-index: 40;
  min-height: 64px;
  padding: 9px 16px;
  background: #f1f8fc;
  border-top: 1px solid #bdd5e5;
  box-shadow: 0 -8px 18px rgba(19, 64, 91, 0.07);
}

#moduleWindow .module-footer:has(.module-balance-pill:not(.hidden)) {
  grid-template-columns: minmax(310px, auto) 110px minmax(430px, 1fr);
  column-gap: 18px;
  align-items: center;
}

#moduleWindow .module-footer:has(.module-balance-pill:not(.hidden)) .module-footer-primary {
  grid-column: 1;
}

#moduleWindow .module-footer:has(.module-balance-pill:not(.hidden)) .module-count {
  grid-column: 2;
  justify-self: center;
  white-space: nowrap;
}

#moduleWindow .module-footer:has(.module-balance-pill:not(.hidden)) .module-hint {
  display: none;
}

#moduleWindow .module-footer .module-balance-pill:not(.hidden) {
  display: flex !important;
  grid-column: 3;
  justify-self: stretch;
  justify-content: center;
  align-items: center;
  gap: 20px;
  min-width: 0;
  min-height: 42px;
  padding: 7px 16px;
  overflow: visible;
}

#moduleWindow .movement-actions {
  position: relative;
  z-index: 45;
  flex-wrap: nowrap;
}

#moduleWindow .movement-new-menu {
  top: auto;
  bottom: calc(100% + 8px);
  z-index: 80;
}

@media (max-width: 980px) {
  #moduleWindow .module-footer:has(.module-balance-pill:not(.hidden)) {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 8px;
  }

  #moduleWindow .module-footer:has(.module-balance-pill:not(.hidden)) .module-footer-primary {
    grid-column: 1;
  }

  #moduleWindow .module-footer:has(.module-balance-pill:not(.hidden)) .module-count {
    grid-column: 2;
  }

  #moduleWindow .module-footer .module-balance-pill:not(.hidden) {
    grid-column: 1 / -1;
  }
}
