:root {
  --auth-bg: #07111f;
  --auth-panel: rgba(8, 20, 36, 0.88);
  --auth-card: rgba(10, 22, 39, 0.94);
  --auth-card-soft: rgba(255, 255, 255, 0.03);
  --auth-line: rgba(148, 163, 184, 0.14);
  --auth-line-strong: rgba(71, 123, 255, 0.32);
  --auth-text: #f6fbff;
  --auth-muted: rgba(205, 219, 235, 0.74);
  --auth-primary: linear-gradient(135deg, #10b6b0 0%, #2d6cf6 100%);
  --auth-accent-cyan: #10b6b0;
  --auth-accent-blue: #2d6cf6;
}

* { box-sizing: border-box; }

/* ── 浮动光晕 ── */
.auth-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0;
  animation: auth-glow-in 1.6s ease forwards;
}
.auth-glow-1 {
  width: 420px; height: 420px;
  top: -8%; left: 8%;
  background: radial-gradient(circle, rgba(16, 182, 176, 0.28), transparent 70%);
  animation-delay: 0s;
}
.auth-glow-2 {
  width: 360px; height: 360px;
  top: 12%; right: 4%;
  background: radial-gradient(circle, rgba(45, 108, 246, 0.24), transparent 70%);
  animation-delay: 0.3s;
}
.auth-glow-3 {
  width: 280px; height: 280px;
  bottom: 6%; left: 36%;
  background: radial-gradient(circle, rgba(99, 78, 240, 0.18), transparent 70%);
  animation-delay: 0.6s;
}
@keyframes auth-glow-in {
  0% { opacity: 0; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── 入场动画 ── */
.auth-fade-in {
  opacity: 0;
  transform: translateY(18px);
  animation: auth-fade-up 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.auth-fade-in-delay {
  animation-delay: 0.15s;
}
@keyframes auth-fade-up {
  to { opacity: 1; transform: translateY(0); }
}

body.auth-page-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 18%, rgba(0, 188, 212, 0.16), transparent 22%),
    radial-gradient(circle at 82% 20%, rgba(79, 110, 255, 0.14), transparent 24%),
    linear-gradient(180deg, #06111f 0%, #091524 48%, #07101a 100%);
  color: var(--auth-text);
  font-family: "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: dark;
  overflow-x: hidden;
}

body.auth-page-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(135, 163, 193, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(135, 163, 193, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.14;
  pointer-events: none;
}

.auth-page-shell {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
  gap: 24px;
  align-items: stretch;
}

.auth-brand-panel,
.auth-form-card {
  border: 1px solid var(--auth-line);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(8, 20, 36, 0.88), rgba(8, 16, 29, 0.96));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-brand-panel {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 22px;
}

.auth-brand-top {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--auth-text);
  margin-bottom: 4px;
  transition: transform 0.25s ease;
}
.auth-brand-top:hover { transform: translateX(3px); }

.auth-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: contain;
  background: rgba(77, 159, 255, 0.18);
  border: 1px solid var(--auth-line);
  padding: 4px;
}

.auth-brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(205, 219, 235, 0.7);
}

.auth-brand-copy h1,
.auth-form-head h2 {
  margin: 16px 0 0;
  color: var(--auth-text);
  letter-spacing: -0.04em;
}

.auth-brand-copy h1 {
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.08;
}

.auth-brand-copy {
  max-width: 620px;
}

.auth-brand-copy p,
.auth-form-head p,
.auth-point-text span,
.auth-point-item > span,
.auth-form-message,
.auth-checkbox-line,
.auth-inline-link,
.auth-secondary-link {
  color: var(--auth-muted);
}

.auth-brand-copy p,
.auth-form-head p {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.75;
}

.auth-point-list {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.auth-point-item {
  padding: 16px 18px 14px;
  border: 1px solid var(--auth-line);
  border-radius: 22px;
  background: var(--auth-card-soft);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.auth-point-item:hover {
  border-color: rgba(45, 108, 246, 0.26);
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}

.auth-point-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(16, 182, 176, 0.16), rgba(45, 108, 246, 0.16));
  color: var(--auth-accent-cyan);
  margin-top: 2px;
}

.auth-point-text {
  flex: 1;
  min-width: 0;
}

.auth-point-item strong,
.auth-point-text strong {
  display: block;
  color: var(--auth-text);
  font-size: 17px;
}

.auth-point-item span,
.auth-point-text span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.75;
}

.auth-form-panel {
  display: flex;
  align-items: center;
}

.auth-form-card {
  width: 100%;
  padding: 32px;
  background: linear-gradient(180deg, rgba(10, 22, 39, 0.96), rgba(8, 17, 30, 0.98));
}

.auth-form-head {
  margin-bottom: 24px;
}

.auth-form-head h2 {
  font-size: 34px;
  line-height: 1.15;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field-block {
  display: grid;
  gap: 10px;
}

.auth-field-block > span {
  color: #dbe8f5;
  font-size: 14px;
  font-weight: 600;
}

.auth-field-hint {
  font-weight: 400;
  font-style: normal;
  font-size: 12px;
  color: rgba(205, 219, 235, 0.52);
}

/* ── 输入框容器 ── */
.auth-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-field-icon {
  position: absolute;
  left: 16px;
  color: rgba(190, 204, 220, 0.48);
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 1;
}
.auth-field-wrap:focus-within .auth-field-icon {
  color: var(--auth-accent-cyan);
}

.auth-field-input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--auth-text);
  font-size: 15px;
  font-weight: 500;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  caret-color: #8fc4ff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.auth-field-input-icon {
  padding-left: 46px;
}
.auth-field-input-icon[type="password"],
.auth-field-wrap:has(.auth-pwd-toggle) .auth-field-input-icon {
  padding-right: 46px;
}

.auth-field-input::placeholder {
  color: rgba(190, 204, 220, 0.48);
  font-weight: 400;
}

.auth-field-input:-webkit-autofill,
.auth-field-input:-webkit-autofill:hover,
.auth-field-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--auth-text);
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.03) inset;
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.03) inset;
  border: 1px solid var(--auth-line);
  transition: background-color 9999s ease-in-out 0s;
}

.auth-field-input:-webkit-autofill::first-line {
  font-size: 15px;
  font-weight: 500;
}

.auth-field-input:focus {
  border-color: var(--auth-line-strong);
  box-shadow: 0 0 0 4px rgba(45, 108, 246, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

/* ── 密码切换按钮 ── */
.auth-pwd-toggle {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(190, 204, 220, 0.5);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  z-index: 1;
}
.auth-pwd-toggle:hover {
  color: var(--auth-text);
  background: rgba(255, 255, 255, 0.06);
}

.auth-form-meta,
.auth-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.auth-checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.auth-checkbox-line input {
  width: 16px;
  height: 16px;
  accent-color: #2d6cf6;
}

.auth-checkbox-line-agreement {
  align-items: flex-start;
  line-height: 1.7;
}

.auth-checkbox-line-agreement span {
  color: var(--auth-muted);
}

.auth-inline-link,
.auth-secondary-link {
  border: 0;
  background: transparent;
  padding: 0;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-form-note {
  margin-top: -2px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(205, 219, 235, 0.66);
}

.auth-form-footer {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.auth-form-actions {
  justify-content: flex-start;
  gap: 18px;
}

.auth-tertiary-link {
  width: fit-content;
  border: 0;
  background: transparent;
  padding: 0;
  color: rgba(205, 219, 235, 0.62);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-inline-link:hover,
.auth-secondary-link:hover,
.auth-tertiary-link:hover {
  color: #eef5ff;
}

.auth-primary-button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--auth-primary);
  color: #f8fcff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 14px 34px rgba(17, 115, 241, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
.auth-primary-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.auth-primary-button:hover::before { opacity: 1; }
.auth-primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(17, 115, 241, 0.32);
}
.auth-primary-button:active {
  transform: translateY(0);
  box-shadow: 0 10px 24px rgba(17, 115, 241, 0.22);
}

.auth-btn-arrow {
  transition: transform 0.25s ease;
}
.auth-primary-button:hover .auth-btn-arrow {
  transform: translateX(4px);
}

.auth-secondary-button {
  min-height: 54px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--auth-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.auth-secondary-button:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.06);
}
.auth-text-link {
  font-size: 14px;
}
.auth-form-footer-admin {
  display: flex;
  justify-content: flex-start;
}

.auth-form-message {
  min-height: 22px;
  font-size: 14px;
  line-height: 1.6;
}

.auth-form-message.is-error {
  color: #ffb4ae;
}

.auth-form-message.is-success {
  color: #8df0d8;
}

@media (max-width: 1040px) {
  .auth-page-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .auth-page-shell {
    padding: 18px 16px;
  }

  .auth-brand-panel,
  .auth-form-card {
    padding: 22px;
    border-radius: 24px;
  }

  .auth-brand-panel {
    gap: 18px;
  }

  .auth-brand-copy h1 {
    font-size: 34px;
  }

  .auth-form-head h2 {
    font-size: 28px;
  }

  .auth-form-meta,
  .auth-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-form-footer {
    gap: 12px;
  }

  .auth-glow-1, .auth-glow-2, .auth-glow-3 {
    display: none;
  }
}