/* 登录页 — 简洁舒适（与注册页同语感） */
.sp-login {
  --ink: #12161c;
  --soft: #3d4f63;
  --muted: #6b7c8f;
  --line: rgba(18, 22, 28, 0.1);
  --sea: #c45c26;
  --sea-deep: #9e4518;
  --paper: #f3f5f8;
  --surface: #ffffff;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Sora", "Noto Sans SC", "PingFang SC", sans-serif;
  --ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  font-family: var(--ui);
  color: var(--ink);
  min-height: calc(100vh - 72px);
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(196, 92, 38, 0.07), transparent 60%),
    radial-gradient(700px 400px at 90% 80%, rgba(196, 165, 116, 0.06), transparent 55%),
    var(--paper);
  padding: 64px 24px 80px;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.sp-login *,
.sp-login *::before,
.sp-login *::after {
  box-sizing: border-box;
}

.sp-login a {
  color: var(--sea);
  text-decoration: none;
}

.sp-login a:hover {
  color: var(--sea-deep);
}

.sp-login__inner {
  width: min(400px, 100%);
  animation: sp-login-in 0.8s var(--ease) both;
}

.sp-login__brand {
  margin: 0 0 28px;
  text-align: center;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.sp-login__panel {
  background: var(--surface);
  border: 1px solid rgba(18, 22, 28, 0.06);
  border-radius: 12px;
  padding: 36px 32px 28px;
  box-shadow: 0 10px 40px rgba(18, 22, 28, 0.04);
  overflow: hidden;
}

.sp-login__head {
  margin-bottom: 24px;
  text-align: center;
}

.sp-login__head h1 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
}

.sp-login__head p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Tabs */
.sp-login .login-tab {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 22px;
  padding: 4px;
  background: rgba(18, 22, 28, 0.05);
  border-radius: 8px;
}

.sp-login .login-tab .sep {
  display: none;
}

.sp-login .login-tab a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 0 !important;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted) !important;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.sp-login .login-tab a.active {
  color: var(--ink) !important;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(18, 22, 28, 0.06);
}

.sp-login .login-tab a.active::after {
  display: none;
}

/* 覆盖旧站 .signform 固定宽度，避免输入框撑破卡片 */
.sp-login .signform,
.sp-login .pc-login,
.sp-login form {
  width: 100% !important;
  max-width: 100% !important;
}

.sp-login .form-group,
.sp-login .signform .form-group {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 20px !important;
  float: none !important;
}

.sp-login .control-label,
.sp-login .signform .control-label {
  display: none !important;
}

.sp-login__label {
  display: block;
  margin: 0 0 12px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--soft);
  line-height: 1.4;
}

.sp-login .form-control,
.sp-login .signform .form-control {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 48px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(18, 22, 28, 0.11) !important;
  border-radius: 8px !important;
  background: #fafbfc !important;
  font: inherit;
  font-size: 0.95rem !important;
  line-height: 48px !important;
  color: var(--ink);
  box-sizing: border-box !important;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.sp-login .form-control::placeholder {
  color: #a0afbd;
}

.sp-login .form-control:hover {
  border-color: rgba(18, 22, 28, 0.18);
}

.sp-login .form-control:focus {
  outline: 0;
  background: #fff !important;
  border-color: rgba(196, 92, 38, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.1);
}

.sp-login .form-group:has(#codeno) .form-control,
.sp-login .form-group:has(input[name="codeno"]) .form-control {
  padding-right: 108px !important;
}

.sp-login .absolute-right,
.sp-login a.absolute-right,
.sp-login .signform .absolute-right {
  position: absolute;
  right: 12px;
  top: calc(0.86rem + 12px + 12px) !important;
  bottom: auto !important;
  transform: none !important;
  line-height: 24px !important;
  padding: 0 !important;
  font-size: 0.86rem;
  font-weight: 600;
  z-index: 2;
}

.sp-login .form-error,
.sp-login #sign-error,
.sp-login .signform .form-error {
  min-height: 0 !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  font-size: 0.86rem;
  color: #b42318;
  line-height: 1.5;
  background: transparent !important;
}

.sp-login .form-error:empty,
.sp-login #sign-error:empty {
  display: none;
  margin: 0;
}

.sp-login .btn-primary,
.sp-login button.btn-primary,
.sp-login .signform .btn-primary {
  display: flex !important;
  align-items: center;
  justify-content: center;
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 50px;
  height: auto !important;
  margin-top: 4px;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--sea) !important;
  color: #fff !important;
  font-size: 1rem !important;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: none !important;
  overflow: visible !important;
  transition: background 0.25s, transform 0.2s;
  box-sizing: border-box !important;
}

.sp-login .btn-primary:hover {
  background: var(--sea-deep) !important;
  transform: translateY(-1px);
}

.sp-login .form-attach,
.sp-login .signform .form-attach {
  display: flex !important;
  float: none !important;
  justify-content: flex-end;
  margin-top: 14px;
  padding: 0 !important;
  line-height: 1.4 !important;
  font-size: 0.88rem;
}

.sp-login .form-attach .sep,
.sp-login .form-attach .text-blue {
  display: none;
}

.sp-login .form-attach .text-light {
  color: var(--muted);
}

.sp-login .login-other {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sp-login .login-other > label,
.sp-login .login-other .orline {
  display: none;
}

.sp-login .login-other a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  color: var(--soft) !important;
  font-size: 0.86rem;
}

.sp-login .login-other a:hover {
  border-color: rgba(196, 92, 38, 0.3);
  background: #fff;
}

.sp-login .login-other a.hidden {
  display: none !important;
}

.sp-login__foot {
  margin-top: 22px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

@keyframes sp-login-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body:has(.sp-login) .sp-footer__main {
  padding-top: 32px;
  padding-bottom: 24px;
}

@media (max-width: 520px) {
  .sp-login {
    padding: 36px 16px 56px;
  }

  .sp-login__panel {
    padding: 28px 20px 22px;
  }
}
