/**
 * Auth pages — allow vertical scroll when forms/content exceed the viewport.
 * Add class "auth-layout-scroll" on <html> (split-panel pages).
 * Add "auth-center-layout" on <html> for role-selection / centered layouts.
 */
html.auth-layout-scroll,
html.auth-layout-scroll body {
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-layout-scroll .page {
  display: flex;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  max-height: none;
  align-items: stretch;
}

.auth-layout-scroll .left,
.auth-layout-scroll .right {
  flex: 1 1 50%;
  min-width: 0;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-layout-scroll .left::-webkit-scrollbar,
.auth-layout-scroll .right::-webkit-scrollbar {
  width: 8px;
}

.auth-layout-scroll .left::-webkit-scrollbar-thumb,
.auth-layout-scroll .right::-webkit-scrollbar-thumb {
  background: rgba(17, 24, 39, 0.14);
  border-radius: 999px;
}

.auth-layout-scroll .form-wrapper,
.auth-layout-scroll .left .form-area {
  flex: 1 0 auto;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  padding-top: 24px;
  padding-bottom: 56px;
  min-height: min-content;
  margin-top: 0;
}

.auth-layout-scroll .right {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-layout-scroll .left {
  padding-bottom: 48px;
}

.auth-layout-scroll .left-footer {
  position: relative;
  bottom: auto;
  left: auto;
  margin-top: 24px;
  flex-shrink: 0;
}

/* Centered auth (choose role, select role) */
html.auth-center-layout,
html.auth-center-layout body {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-center-layout header {
  flex-shrink: 0;
}

.auth-center-layout main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
  padding: 32px 24px 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .auth-layout-scroll .page {
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .auth-layout-scroll .left,
  .auth-layout-scroll .right {
    flex: 1 1 auto;
    min-height: auto;
    max-height: none;
  }
}
