/* Desktop access screen: isolate the login from application navigation. */
@media (min-width: 769px) {
  body:has(#loginScreen:not(.hidden)) {
    overflow: hidden;
  }

  body:has(#loginScreen:not(.hidden)) :is(.sidebar, .topbar, .shell, .mobile-bottom-nav) {
    display: none !important;
  }

  #loginScreen {
    z-index: 80000;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    height: 100dvh;
    min-height: 0;
    padding: 32px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #loginForm {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 430px);
    min-width: 0;
    margin: auto;
    padding: 32px;
    gap: 18px;
    transform: none;
  }

  #loginForm img {
    display: block;
    width: min(220px, 100%);
    height: auto;
    max-height: 112px;
    object-fit: contain;
    justify-self: center;
  }

  #loginForm h2 {
    font-size: 1.9rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  #loginForm input,
  #loginForm .button {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    font-size: 16px;
    line-height: 1.4;
    transform: none;
  }

  #loginForm .button {
    white-space: normal;
    padding: 12px 16px;
  }
}
