/* 登录页 — 原冷灰底 + 网格背景 + 品牌深蓝 */

body.login-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #0a1128;
  background: #f9fafb;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 30%, transparent 100%);
}

.login-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.login-bg-glow--tl {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: rgba(26, 54, 168, 0.12);
}

.login-bg-glow--br {
  width: 480px;
  height: 480px;
  right: -100px;
  bottom: -140px;
  background: rgba(26, 54, 168, 0.08);
}

.login-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(32px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.login-panel {
  width: 100%;
  max-width: 400px;
}

.login-card {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.login-card-header {
  margin-bottom: 24px;
  text-align: center;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 8px;
}

.login-logo {
  display: block;
  width: 156px;
  height: auto;
  max-height: 46px;
  object-fit: contain;
  object-position: center;
}

.login-tagline {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  color: #6b7280;
  line-height: 1.2;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  background: #fef2f2;
  color: #dc2626;
}

.login-alert.is-hidden,
.login-alert[hidden] {
  display: none !important;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.login-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
}

.login-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1.4;
  color: #0a1128;
  background: #f3f4f6;
  transition: border-color 0.16s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.16s cubic-bezier(0.25, 0.1, 0.25, 1), background-color 0.16s cubic-bezier(0.25, 0.1, 0.25, 1);
  -webkit-appearance: none;
  appearance: none;
}

.login-input::placeholder {
  color: #9ca3af;
}

.login-input:hover {
  background: #eef0f3;
}

.login-input:focus {
  outline: none;
  background: #fff;
  border-color: rgba(26, 54, 168, 0.4);
  box-shadow: 0 0 0 3px rgba(26, 54, 168, 0.1);
}

.login-field.is-invalid .login-input {
  border-color: rgba(220, 38, 38, 0.45);
  background: #fff;
}

.login-field.is-invalid .login-input:focus {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.login-field-err {
  font-size: 0.8125rem;
  color: #dc2626;
  line-height: 1.35;
}

.login-field-err[hidden] {
  display: none !important;
}

.login-input-wrap {
  position: relative;
}

.login-input--has-toggle {
  padding-right: 48px;
}

.login-pwd-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.16s cubic-bezier(0.25, 0.1, 0.25, 1), background-color 0.16s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.login-pwd-toggle:hover {
  color: #6b7280;
  background: rgba(148, 163, 184, 0.15);
}

.login-pwd-toggle:active {
  background: rgba(148, 163, 184, 0.22);
}

.login-pwd-toggle:focus-visible {
  outline: 2px solid rgba(26, 54, 168, 0.4);
  outline-offset: 1px;
}

.login-pwd-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.login-pwd-icon--hide {
  display: none;
}

.login-pwd-toggle.is-visible .login-pwd-icon--show {
  display: none;
}

.login-pwd-toggle.is-visible .login-pwd-icon--hide {
  display: block;
}

.login-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin-top: 0;
}

.login-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.login-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.login-check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  background: #fff;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.16s cubic-bezier(0.25, 0.1, 0.25, 1), background-color 0.16s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.login-check input:checked + .login-check-box {
  border-color: #1a36a8;
  background: #1a36a8;
}

.login-check input:checked + .login-check-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.login-check-text {
  font-size: 0.875rem;
  color: #6b7280;
}

.login-submit {
  width: 100%;
  margin-top: 4px;
  min-height: 48px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  color: #fff;
  cursor: pointer;
  background: #1a36a8;
  box-shadow: none;
  transition: background-color 0.16s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.16s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.16s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.login-submit:hover {
  background: #142a86;
}

.login-submit:active {
  background: #142a86;
  opacity: 0.94;
  transform: scale(0.98);
}

.login-version {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  letter-spacing: 0;
  user-select: none;
}

@media (min-width: 480px) {
  .login-shell {
    padding-left: 24px;
    padding-right: 24px;
  }

  .login-card {
    padding: 28px;
  }

  .login-logo {
    width: 168px;
    max-height: 50px;
  }
}
