/* 登录页:优先使用轻量 WebP 背景,保留 PNG 兜底。 */
.login-page {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  color: #ffffff;
  background-image: url("/images/login/login-bg-control-room.png");
  background-image: -webkit-image-set(
    url("/images/login/login-bg-control-room.webp") type("image/webp") 1x,
    url("/images/login/login-bg-control-room.png") type("image/png") 1x
  );
  background-image: image-set(
    url("/images/login/login-bg-control-room.webp") type("image/webp") 1x,
    url("/images/login/login-bg-control-room.png") type("image/png") 1x
  );
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(3, 15, 35, 0.62) 0%,
    rgba(3, 15, 35, 0.38) 42%,
    rgba(3, 15, 35, 0.18) 62%,
    rgba(3, 15, 35, 0.30) 100%
  );
}

.login-ribbon-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.login-topbar {
  position: absolute;
  z-index: 2;
  top: 32px;
  left: 27px;
  right: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}

.login-logo {
  display: block;
  width: auto;
  height: 38px;
  filter: drop-shadow(0 8px 20px rgba(0, 8, 22, 0.28));
  user-select: none;
}

.login-layout {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.login-copy {
  position: absolute;
  left: 72px;
  top: 42%;
  transform: translateY(-50%);
  width: min(680px, calc(100vw - 650px));
  min-width: 520px;
  color: #ffffff;
  text-shadow: 0 18px 36px rgba(0, 9, 24, 0.35);
}

.login-hero-title {
  max-width: 650px;
  margin: 0;
  color: #ffffff;
  font-size: 58px;
  line-height: 1.18;
  letter-spacing: 0;
  font-weight: 900;
}

.login-hero-title span {
  display: inline-block;
  color: #1a62fa;
  background: linear-gradient(90deg, #1a62fa 0%, #1677ff 48%, #32b4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-hero-sub {
  max-width: 560px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.85;
  font-weight: 650;
}

.login-card {
  position: absolute;
  top: 49.5%;
  right: clamp(102px, 6.8vw, 110px);
  transform: translateY(-50%);
  width: clamp(400px, 26.5vw, 435px);
  min-height: clamp(470px, 60vh, 570px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(30px, 3.7vh, 38px) clamp(30px, 2vw, 34px) clamp(32px, 4vh, 38px);
  border: 1px solid rgba(223, 229, 239, 0.92);
  border-radius: 16px;
  background: #ffffff;
  color: #152238;
  box-shadow: 0 16px 36px rgba(2, 12, 30, 0.14);
}

.login-card-head {
  margin-bottom: 2px;
}

.login-card-badge {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f1f6ff;
  color: #1266ff;
  font-size: 14px;
  font-weight: 900;
}

.login-card-badge-icon {
  width: 17px;
  height: 17px;
}

.login-title {
  margin: 0;
  color: #13213b;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
  font-weight: 900;
}

.login-card-sub {
  margin: 12px 0 0;
  color: #65718a;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.login-label {
  color: #1c2940;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 900;
}

.login-control {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  border: 1px solid rgba(205, 216, 232, 0.92);
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 1px 2px rgba(16, 31, 56, 0.04);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.login-control:hover {
  border-color: rgba(178, 193, 217, 0.96);
  background: rgba(255, 255, 255, 0.94);
}

.login-control:focus-within {
  border-color: #3370ff;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.13), 0 8px 18px rgba(30, 76, 154, 0.08);
}

.login-ico {
  width: 20px;
  height: 20px;
  color: #7d8aa3;
  flex: none;
}

.login-control:focus-within .login-ico {
  color: #166fff;
}

.login-control input {
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  box-shadow: none !important;
  color: #152238;
  font-size: 15px;
  font-weight: 400;
  transition: none;
}

.login-control input:focus {
  border: 0 !important;
  outline: none;
  background: transparent !important;
  box-shadow: none !important;
}

.login-control input::placeholder {
  color: #9aa6ba;
  font-weight: 400;
  opacity: 1;
}

.login-control input:-webkit-autofill,
.login-control input:-webkit-autofill:hover,
.login-control input:-webkit-autofill:focus {
  -webkit-text-fill-color: #16243d;
  border-radius: 0;
  transition: background-color 9999s ease-in-out 0s;
  box-shadow: 0 0 0 1000px #f8fbff inset;
}

.login-eye {
  width: 36px;
  height: 36px;
  min-height: 36px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #748098;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.login-eye:hover {
  background: rgba(51, 112, 255, 0.07);
  color: #3370ff;
}

.login-eye .ui-icon {
  width: 19px;
  height: 19px;
}

.login-options {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.login-remember,
.login-permission {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
}

.login-remember {
  color: #5d6980;
  font-weight: 400;
  cursor: pointer;
}

.login-remember input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #166fff;
  flex: none;
}

.login-permission {
  color: #128760;
  font-weight: 900;
  white-space: nowrap;
}

.login-permission-icon {
  width: 18px;
  height: 18px;
  color: #128760;
  flex: none;
}

.login-error {
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0 12px;
  border: 0 solid #f3bab4;
  border-radius: 8px;
  background: #fff2f0;
  color: #b42318;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  transition: max-height .18s ease, min-height .18s ease, padding .18s ease, border-width .18s ease;
}

.login-error.is-show {
  min-height: 40px;
  max-height: 96px;
  padding: 10px 12px;
  border-width: 1px;
}

.login-btn {
  position: relative;
  overflow: hidden;
  height: 51px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: #1266ff;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(18, 102, 255, 0.22);
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}

.login-btn:hover {
  background: #0d58e8;
  box-shadow: 0 14px 28px rgba(18, 102, 255, 0.26);
  transform: translateY(-1px);
}

.login-btn:disabled,
.login-btn.is-loading {
  cursor: progress;
  opacity: 0.82;
  transform: none;
}

@media (max-width: 1400px) {
  .login-copy {
    width: min(600px, calc(100vw - 640px));
    min-width: 0;
  }

  .login-card {
    top: 50%;
    right: 68px;
    width: 408px;
    min-height: clamp(470px, 60vh, 535px);
    padding: 34px 32px 36px;
  }

}

@media (max-width: 1260px) {
  .login-copy {
    width: min(540px, calc(100vw - 590px));
    min-width: 440px;
  }

  .login-hero-title {
    font-size: 48px;
  }

  .login-hero-sub {
    font-size: 18px;
  }

  .login-card {
    right: 36px;
    width: 380px;
    min-height: 510px;
    padding: 32px 30px 36px;
  }

}

@media (max-width: 992px) {
  .login-page {
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .login-topbar {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    padding: 24px 24px 0;
  }

  .login-logo {
    height: 30px;
  }

  .login-layout {
    min-height: calc(100svh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 24px 64px;
  }

  .login-copy {
    display: none;
  }

  .login-card {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: min(420px, 100%);
    min-height: 0;
  }

}

@media (max-width: 520px) {
  .login-topbar {
    padding: 18px 18px 0;
    gap: 12px;
  }

  .login-logo {
    height: 25px;
    max-width: 150px;
  }

  .login-layout {
    min-height: calc(100svh - 52px);
    padding: 28px 18px 58px;
  }

  .login-card {
    gap: 16px;
    padding: 28px 22px 26px;
    border-radius: 16px;
  }

  .login-card-badge {
    min-height: 32px;
    margin-bottom: 16px;
    font-size: 14px;
  }

  .login-title {
    font-size: 29px;
  }

  .login-card-sub {
    margin-top: 10px;
    font-size: 15px;
  }

  .login-label,
  .login-control input,
  .login-remember,
  .login-permission {
    font-size: 14px;
  }

  .login-control,
  .login-btn {
    height: 49px;
  }
}

@media (max-width: 380px) {
  .login-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

}
