/**
 * 登录页关键布局：放在 public 下，以阻塞 stylesheet 写入每个页面的 HTML head。
 * 首页跳转登录时这份 CSS 已经在文档里，不依赖登录页异步 chunk。
 * 左侧用 background-image，避免 <img> 固有尺寸在分栏生效前把页面撑成上下布局。
 */
.page-login {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 1000 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

.page-login__brand {
  position: relative !important;
  flex: 0 0 58% !important;
  width: 58% !important;
  min-width: 58% !important;
  max-width: 58% !important;
  align-self: stretch !important;
  overflow: hidden !important;
  background-color: #ffd700 !important;
  background-image: url("/assets/login/pc-left-bg.png") !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

.page-login__brand-bg {
  display: none !important;
}

.page-login__panel {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: auto !important;
  align-self: stretch !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  background: #fff !important;
  padding: 32px 64px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

.page-login__form {
  width: 100% !important;
  max-width: 447px !important;
  margin-top: auto !important;
  margin-bottom: auto !important;
}

.page-login__brand-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
}

.page-login__brand-img--h5 {
  display: none !important;
}

@media screen and (max-width: 719px) {
  /* body 子节点全局固定高度且 overflow:hidden，H5 在登录容器内滚动 */
  .page-login {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .page-login__brand {
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 294px !important;
    background-image: url("/assets/login/h5-hero-bg.png") !important;
  }

  .page-login__brand-img--pc {
    display: none !important;
  }

  .page-login__brand-img--h5 {
    display: block !important;
  }

  .page-login__panel {
    flex: 0 0 auto !important;
    height: auto !important;
    align-items: flex-start !important;
    margin-top: -36px !important;
    border-radius: 16px 16px 0 0 !important;
    position: relative !important;
    z-index: 1 !important;
    padding: 24px 24px calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    overflow: visible !important;
  }

  .page-login__form {
    max-width: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}
