/* v2.5.1 — navigation interaction and authentication viewport hotfix */
#sidebar {
  position: relative;
  z-index: 60;
  pointer-events: auto !important;
}
#sidebar #nav,
#sidebar #nav .nav,
#sidebar #nav [data-nav],
#sidebar #nav [data-amoda-target] {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Hidden overlays must never intercept the application shell. */
#amodaAuthScreen[style*="display: none"],
#mobileSidebarBackdrop:not(.active),
#amodaQuickActionOverlay19:not(.active),
.modal:not(.active) {
  pointer-events: none !important;
}

/* Keep the full authentication card inside every viewport. */
#amodaAuthScreen {
  box-sizing: border-box;
  align-items: flex-start !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  padding: clamp(.6rem, 2vh, 1rem) !important;
}
#amodaAuthScreen > div {
  margin: auto;
  max-height: calc(100dvh - clamp(1.2rem, 4vh, 2rem));
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-height: 820px) {
  #amodaAuthScreen > div > div:first-child { padding: 1rem 1.25rem !important; }
  #amodaAuthScreen > div > div:first-child h1 { font-size: 1.35rem !important; margin-top: .25rem !important; }
  #amodaAuthScreen > div > div:first-child p:last-child { margin-top: .25rem !important; }
  #amodaLoginForm { padding: 1rem 1.25rem !important; gap: .65rem !important; }
  #amodaLoginForm label { font-size: .8rem !important; }
  #amodaLoginForm input,
  #amodaLoginForm select,
  #amodaLoginForm button { min-height: 40px !important; padding-top: .55rem !important; padding-bottom: .55rem !important; }
  #amodaLoginForm .border-t { margin-top: .5rem !important; padding-top: .65rem !important; }
}

@media (max-width: 560px) {
  #amodaAuthScreen { padding: .5rem !important; }
  #amodaAuthScreen > div { max-height: calc(100dvh - 1rem); border-radius: 1rem !important; }
  #amodaLoginForm .grid-cols-\[150px_1fr\] { grid-template-columns: 1fr !important; }
}
