*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.login {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
  color: #0f172a;
  background: #fff;
}

.login-split {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(380px, 1.05fr) minmax(360px, 0.95fr);
}
.login-split.is-shake .login-box {
  animation: loginShake 0.42s ease;
}

.login-side {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 36px 44px 32px;
  color: #e2e8f0;
  background:
    radial-gradient(ellipse 80% 70% at 8% 12%, rgba(13,148,136,0.32), transparent 52%),
    radial-gradient(ellipse 55% 60% at 92% 88%, rgba(2,132,199,0.22), transparent 48%),
    linear-gradient(155deg, #071018 0%, #0c1726 100%);
}
.login-side__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148,163,184,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,0.055) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 75% 70% at 30% 28%, #000 18%, transparent 72%);
}
.login-side__top,
.login-side__body,
.login-side__foot {
  position: relative;
  z-index: 1;
}

.login-side__top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.login-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #14b8a6, #0284c7);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  font-family: Consolas, "Microsoft YaHei", ui-monospace, monospace;
  box-shadow: 0 12px 28px rgba(13,148,136,0.35);
}
.login-side__name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.login-side__name strong {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.login-side__name span {
  font-size: 12px;
  font-weight: 600;
  color: #5eead4;
}

.login-side__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 420px;
  padding: 48px 0 32px;
}
.login-kicker {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  color: #5eead4;
  margin-bottom: 14px;
}
.login-side__body h1 {
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.8px;
  color: #f8fafc;
  margin-bottom: 16px;
}
.login-lead {
  font-size: 15px;
  line-height: 1.75;
  color: #94a3b8;
  margin-bottom: 28px;
}
.login-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.login-meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.2);
  background: rgba(255,255,255,0.04);
}
.login-meta i { color: #5eead4; font-size: 11px; }

.login-side__foot {
  font-size: 12px;
  color: #64748b;
}

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: #fff;
}
.login-box {
  width: 100%;
  max-width: 360px;
}
.login-box h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
  margin-bottom: 8px;
}
.login-box__sub {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 32px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.login-field__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.login-field__row label { margin-bottom: 0; }
.login-caps {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
}
.login-field input[type="text"],
.login-pwd input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  font-size: 15px;
  color: #0f172a;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-pwd input { padding-right: 44px; }
.login-field input::placeholder,
.login-pwd input::placeholder { color: #94a3b8; }
.login-field input:focus,
.login-pwd input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.14);
}
.login-pwd { position: relative; }
.login-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}
.login-eye:hover { background: #f1f5f9; color: #0f172a; }
.login-eye [hidden] { display: none !important; }

.login-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
}
.login-check input {
  accent-color: #0d9488;
  width: 15px;
  height: 15px;
}

.login-error {
  font-size: 13px;
  font-weight: 600;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 10px;
}

.login-submit {
  height: 46px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #0d9488;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  transition: background 0.15s, transform 0.12s;
}
.login-submit:hover:not(:disabled) { background: #0f766e; }
.login-submit:disabled { opacity: 0.65; cursor: not-allowed; }
.login-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loginSpin 0.7s linear infinite;
  display: none;
}
.login-submit.is-loading .login-spinner { display: block; }

@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
@keyframes loginSpin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .login-split { grid-template-columns: 1fr; }
  .login-side {
    min-height: auto;
    padding: 22px 22px 18px;
    padding-top: max(22px, env(safe-area-inset-top));
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
  }
  .login-side__body {
    padding: 20px 0 4px;
    max-width: none;
  }
  .login-side__body h1 { font-size: 24px; letter-spacing: -0.5px; }
  .login-lead { margin-bottom: 14px; font-size: 14px; }
  .login-side__foot { display: none; }
  .login-main {
    padding: 24px 22px calc(28px + env(safe-area-inset-bottom));
    align-items: flex-start;
  }
  .login-box { max-width: 420px; }
}

@media (max-width: 560px) {
  .login-side {
    padding: 14px 16px 12px;
    padding-top: max(14px, env(safe-area-inset-top));
  }
  .login-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
  .login-side__name strong { font-size: 13px; }
  .login-side__body { display: none; }
  .login-main {
    padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .login-box h2 { font-size: 22px; }
  .login-box__sub { margin-bottom: 22px; }
  .login-field input[type="text"],
  .login-pwd input {
    height: 48px;
    font-size: 16px; /* 避免 iOS 自动放大 */
  }
  .login-submit { height: 48px; }
  .login-eye { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-split.is-shake .login-box { animation: none; }
}
