/* ==========================================================================
   page-login.css
   登录页 - 登录面板、扫码登录、账号登录（换班弹窗复用）
   合并自: page-login.css
   ========================================================================== */

.container {
  /* 设置视距 */
  perspective: 5px;
  /* 设置3D元素的基点位置 */
  perspective-origin: 50% 50%;
}

.login-container {
  width: min-content;
}

/* 登录页头部 */
.login-header {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1920px;
  margin-left: -960px;
  height: 120px;
  background: url('../img/ui/login-header.png') no-repeat center center;
  background-size: auto 100%;
  z-index: 10;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.login-header .header-title {
  width: max-content;
  color: transparent;
  font-weight: 900;
  font-size: 40px;
  font-family: YouSheBiaoTiHei;
  letter-spacing: 1.78px;
  background: linear-gradient(to bottom, #fff 0% 30%, #77a6ff);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 4px 1px rgba(19, 80, 143, 0.66));
  -webkit-text-fill-color: transparent;
  transform: skewX(-6deg);
}

.form-box {
  /* 相对定位 */
  position: relative;
  overflow: hidden;
  /* width: 50.625vw; */
  /* min-width: 972px; */
  width: 972px;
  height: max-content;
  padding-bottom: 6.3vh;
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: 4.6296vh;
}
.form-box-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 0;
}
.form-box > *:not(.form-box-bg) {
  position: relative;
  z-index: 1;
}
.form-box .tit {
  font-weight: 500;
  font-size: 36px;
  color: #ffffff;
  line-height: 48px;
  text-align: left;
  font-style: normal;
  margin: 6.3vh auto;
}
/* 700px高度一下 */
@media (max-height: 700px) {
  .form-box {
    padding-bottom: 2vh;
  }
  .form-box .tit {
    margin: 2vh auto;
  }
}
.form-box input {
  width: 100%;
  font-size: 18px;
  height: 56px;
  background-color: transparent !important;
  text-indent: 65px;
  border: none;
  outline: none;
  color: #fff;
}
/* 去除浏览器自动填充的背景色 */
.form-box input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
  -webkit-text-fill-color: #fff !important;
  transition: background-color 5000s ease-in-out 0s;
}
.form-box input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}
.login_input_box {
  display: flex;
  align-items: center;
  text-align: center;
  position: relative;
  background: rgba(0, 0, 0, 0.1);
  margin-bottom: 28px;
  width: 100%;
}
.login_input_box > img:first-of-type {
  position: absolute;
  margin: 0 0 0 18px;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.login_input_box_code {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
  width: 100%;
}
.login_input_box_code .login_input_box {
  flex: 1;
  margin-bottom: 0px;
}
.login_input_box_code .login_input_code {
  width: 165px;
  height: 54px;
  margin-left: 16px;
  background: rgba(0, 0, 0, 0.1);
}
.login_input {
  display: inline-block;
}
.form-box button {
  width: 100%;
  height: 48px;
  border: none;
  background: url('../img/ui/btn.png') no-repeat center center;
  color: #fff;
  border-radius: 8px;
  letter-spacing: 5px;
  text-indent: 5px;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
}

/* 登录方式切换Tab */
.login-tabs {
  display: none;
}
.login-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 16px;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  user-select: none;
}
.login-tab:hover {
  color: rgba(255, 255, 255, 0.9);
}
.login-tab.active {
  color: #fff;
  border-bottom: 2px solid #337ab7;
  font-weight: bold;
}

/* 面板并排容器 */
.panels-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
}

/* 扫码登录面板 */
.login-panel-qrcode {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 59.67%;
  min-height: 260px;
}

/* 账号登录面板 */
.login-panel-account {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 35.596%;
}

.login-tips {
  font-weight: 400;
  font-size: 20px;
  color: #d4e5fb;
  line-height: 28px;
  text-align: left;
  font-style: normal;
  margin-top: 50px;
}

/* 二维码容器 */
.qrcode-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  background: url('../img/ui/qrcode-bg.png') no-repeat center center;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  margin: auto 16.461%;
}

/* 二维码过期遮罩 */
.qrcode-expired-mask {
  display: none;
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  z-index: 10;
  text-align: center;
}
.qrcode-expired-mask.qrcodeshow {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.qrcode-expired-mask .expired-text {
  color: #333;
  font-size: 14px;
  margin-bottom: 10px;
}
.qrcode-expired-mask .refresh-btn {
  color: #337ab7;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
}
.qrcode-expired-mask .refresh-btn:hover {
  color: #0098d4;
}

/* 扫码提示文字 */
.qrcode-tip {
  font-weight: 500;
  font-size: 18px;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 16px;
}
.qrcode-tip-sub {
  font-weight: 500;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 20px;
  margin-top: 10px;
}

/* 扫码成功状态 */
.qrcode-success-icon {
  display: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #52c41a;
  margin: 60px auto 20px auto;
  position: relative;
}
.qrcode-success-icon.show {
  display: block;
}
.qrcode-success-icon::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 20px;
  width: 16px;
  height: 28px;
  border: 3px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.qrcode-success-text {
  display: none;
  color: #52c41a;
  font-size: 16px;
  text-align: center;
  margin-bottom: 10px;
}
.qrcode-success-text.show {
  display: block;
}

/* 二维码加载中 */
.qrcode-loading {
  display: none;
  width: 200px;
  height: 200px;
  margin: 10px auto 15px auto;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  position: relative;
}
.qrcode-loading.qrcodeshow {
  display: flex;
}
.qrcode-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top: 3px solid #337ab7;
  border-radius: 50%;
  animation: qrcode-spin 0.8s linear infinite;
  position: absolute;
  top: calc(50% - 20px);
  left: calc(50% - 20px);
}
@keyframes qrcode-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* 扫码登录错误提示 */
.qrcode-error {
  color: red;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}

/* 定义动画 */
@keyframes move {
  0% {
    transform: rotate(0deg) translateZ(-500px);
  }
  100% {
    transform: rotate(90deg) translateZ(500px);
  }
}
.login_error {
  height: 15px;
  line-height: 15px;
  font-size: 14px;
  color: red;
  text-align: center;
}

/* ===== 屏幕小于1200px时：显示Tab切换 ===== */
@media (max-width: 1199px) {
  .login-header {
    width: 100%;
    left: 0;
    margin-left: 0;
  }
  .login-container {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .login-tabs {
    display: flex;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 10px;
  }
  .panels-container {
    display: block;
  }
  .login-panel-qrcode,
  .login-panel-account {
    width: 100%;
  }
  .login-panel-qrcode {
    display: none;
  }
  .login-panel-qrcode.active {
    display: flex;
  }
  .login-panel-account {
    display: none;
  }
  .login-panel-account.active {
    display: flex;
  }
  .form-box {
    min-width: 0;
    height: auto;
    min-height: 460px;
    padding: 20px 12px 40px;
    overflow: visible;
    display: block;
    flex-shrink: 0;
  }
  .form-box-bg {
    object-fit: cover;
  }
  .form-box .tit {
    margin: 10px auto 15px auto;
    font-size: 32px;
    text-align: center;
  }
  .qrcode-wrapper {
    margin: 10px auto;
  }
  .login-tips {
    font-size: 14px;
    margin-top: 20px;
  }
  .form-box,
  .login-tips {
    width: 100%;
    max-width: 520px;
  }
}
/* 大屏下tab隐藏，两个面板始终并排显示 */
@media (min-width: 1200px) {
  .login-tabs {
    display: none;
  }
  .login-panel-qrcode,
  .login-panel-account {
    display: flex;
  }
}
