html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.app-shell {
  grid-template-columns: 250px minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar nav,
.sidebar .brand,
.sidebar-user,
.sidebar > .button {
  flex-shrink: 0;
}

.main-content {
  width: 100%;
  height: 100vh;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.login-body {
  width: 100%;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
}

@media (max-width: 1024px) {
  .app-body {
    padding-top: 58px;
  }

  .app-shell {
    display: block;
    height: calc(100dvh - 58px);
  }

  .sidebar {
    position: fixed;
    top: 58px;
    width: min(300px, calc(100vw - 32px));
    height: calc(100dvh - 58px);
  }

  .main-content {
    width: 100%;
    height: calc(100dvh - 58px);
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }
}
