/* ==========================================================================
   铁流智脑 V0.3 · 登录页布局定稿（最后加载，优先级最高）
   --------------------------------------------------------------------------
   背景：style.css 里 #pageLogin 相关规则重复了 392 处、分散在 9200 行中，
   多处 !important 互相覆盖，导致"改一处不知哪处生效"。
   本文件只做一件事：把登录页布局锁成当前已验证正确的状态，
   以后调登录页布局只改这里，不要再往 style.css 里加。

   已实测正确状态（1280x800 视口）：
     登录框 left=1050  right=1280  宽 230px  贴右侧通栏
     军旗区 #loginHero 占满左侧，z-index 2，在登录框之下
   ========================================================================== */

/* ---- 1. 登录页容器：纵向居中、横向靠右，顶部留出 120px 蓝条 ---- */
#pageLogin.page,
#pageLogin.page.active {
  flex-direction: column !important;
  /* 【11-28 修】原来 justify-content:center 让登录框在剩余空间里垂直居中，
     导致蓝条下方多出一大块空白。改为 flex-start，紧贴蓝条下沿。 */
  justify-content: flex-start !important;
  align-items: flex-end !important;
  padding-top: 120px !important;   /* 顶部蓝条高度 */
  padding-right: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* ---- 2. 登录框：右侧通栏贴边，宽 230~272px ---- */
#pageLogin .login-frame,
#pageLogin.page.active .login-frame {
  width: clamp(230px, 17vw, 272px) !important;
  max-width: 272px !important;
  min-width: 0 !important;
  /* 【11-28 修】style.css 第 7442 行的 @media(min-width:901px) 里有
     margin:120px 0 0 0 + justify-content:space-between，
     导致蓝条下方空出一大块、内容上下均分。这里全部拉回。 */
  height: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}

/* 登录框内部内容：靠上自然排列，不再上下撑开 */
#pageLogin.page.active .login-frame .login-pane.active {
  flex: 0 0 auto !important;
  justify-content: flex-start !important;
}
#pageLogin.page.active .login-frame .security-notice {
  flex: 0 0 auto !important;
  margin-top: 12px !important;
}

/* ---- 3. 左侧军旗区：铺满左侧，盖在地图上、垫在登录框下 ---- */
#loginHero {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: calc(100vw - 351px) !important;
  height: 100vh !important;
  z-index: 2 !important;
  pointer-events: none !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ---- 4. 手机 / 窄屏：登录框居中独占，隐藏军旗区避免重叠 ---- */
@media (max-width: 860px), (orientation: portrait) and (max-width: 1100px) {
  #pageLogin.page,
  #pageLogin.page.active {
    justify-content: center !important;
    align-items: center !important;
    padding-top: 0 !important;
    padding-right: 0 !important;
    overflow-y: auto !important;
  }
  #pageLogin .login-frame {
    width: 94% !important;
    max-width: 94% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 auto !important;
    border-radius: 6px !important;
  }
  #loginHero {
    display: none !important;
  }
}
