/* 管理后台登录 — 霓虹对角呼吸 + 深色卡片 */
:root {
  --red: #e11d48;
  --red-hot: #f43f5e;
  --red-deep: #9f1239;
  --red-glow: rgba(225, 29, 72, 0.45);
  --blue: #2563eb;
  --blue-bright: #3b82f6;
  --blue-deep: #1e3a8a;
  --blue-glow: rgba(37, 99, 235, 0.45);
  --violet-mid: #7c3aed;
  --bg-deep: #050810;
  --card-bg: rgba(8, 12, 24, 0.94);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --input-bg: #060912;
  --input-border: #2d3a52;
  --font-sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 10px;
  --radius-lg: 20px;
  --input-h: 46px;
}

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

html {
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  min-height: 100vh;
  background: var(--bg-deep);
  position: relative;
  overflow-x: hidden;
}

/* 背景：左上→右下霓虹色带呼吸（尊重系统「减少动态效果」） */
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(145deg, #04060f 0%, #060912 45%, #050810 100%);
  pointer-events: none;
  animation: loginBgBasePulse 16s ease-in-out infinite alternate;
}

.login-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 78% 68% at 50% 42%, black 18%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 42%, black 18%, transparent 74%);
  animation: loginGridBreath 14s ease-in-out infinite alternate;
}

.login-bg-neon {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-bg-neon--beam {
  inset: -55%;
  background: linear-gradient(
    128deg,
    rgba(255, 0, 170, 0.22) 0%,
    rgba(0, 245, 212, 0.16) 14%,
    rgba(168, 85, 247, 0.18) 30%,
    rgba(250, 204, 21, 0.12) 46%,
    rgba(56, 189, 248, 0.17) 62%,
    rgba(255, 105, 180, 0.14) 78%,
    rgba(57, 255, 20, 0.11) 92%,
    rgba(255, 94, 0, 0.13) 100%
  );
  background-size: 320% 320%;
  mix-blend-mode: screen;
  opacity: 0.82;
  animation: neonBeamSweep 20s ease-in-out infinite;
}

.login-bg-neon--beam2 {
  opacity: 0.48;
  mix-blend-mode: lighten;
  animation: neonBeamSweep 26s ease-in-out infinite reverse;
  animation-delay: -11s;
  background: linear-gradient(
    128deg,
    rgba(255, 140, 0, 0.16) 0%,
    rgba(147, 112, 219, 0.2) 28%,
    rgba(0, 255, 200, 0.12) 55%,
    rgba(255, 20, 147, 0.15) 82%,
    rgba(0, 191, 255, 0.14) 100%
  );
  background-size: 300% 300%;
}

.login-bg-neon--corner {
  inset: -20%;
  background:
    radial-gradient(ellipse 55% 50% at 0% 0%, rgba(236, 72, 153, 0.2) 0%, transparent 58%),
    radial-gradient(ellipse 50% 48% at 100% 100%, rgba(34, 211, 238, 0.18) 0%, transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.65;
  animation: neonCornerBreath 12s ease-in-out infinite alternate;
}

.login-bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 92% 82% at 50% 48%, transparent 32%, rgba(2, 6, 18, 0.62) 100%);
  animation: loginVignetteShift 18s ease-in-out infinite;
}

@keyframes loginBgBasePulse {
  0% {
    filter: brightness(1);
  }
  100% {
    filter: brightness(1.06);
  }
}

@keyframes loginGridBreath {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0.52;
  }
}

@keyframes loginVignetteShift {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.03);
  }
}

@keyframes neonBeamSweep {
  0%,
  100% {
    background-position: 0% 0%;
    opacity: 0.62;
  }
  50% {
    background-position: 100% 100%;
    opacity: 0.98;
  }
}

@keyframes neonCornerBreath {
  0% {
    opacity: 0.45;
    transform: scale(1);
  }
  100% {
    opacity: 0.78;
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-bg,
  .login-bg::before,
  .login-bg-vignette,
  .login-bg-neon {
    animation: none !important;
  }
  .login-bg-neon--beam,
  .login-bg-neon--beam2 {
    opacity: 0.55;
    background-position: 40% 40%;
  }
  .login-bg-neon--corner {
    opacity: 0.5;
    transform: none;
  }
  .login-bg {
    filter: none;
  }
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 440px);
  max-width: 1200px;
  margin: 0 auto;
  align-items: stretch;
}

.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: clamp(28px, 5vw, 64px) clamp(24px, 4vw, 48px) clamp(28px, 5vw, 64px)
    clamp(32px, 6vw, 72px);
  border: none;
  background: transparent;
  box-shadow: none;
}

/* 品牌区：整体偏右 + 字号加大，无描边 */
.login-hero-inner {
  width: 100%;
  max-width: 460px;
  margin-right: 0;
  margin-left: clamp(2.5rem, 10vw, 7.5rem);
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.35rem, 2.8vw, 2rem);
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.login-kicker {
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.1vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
  background: linear-gradient(90deg, #f472b6, #a78bfa, #22d3ee, #facc15, #fb7185);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.login-brand {
  font-size: clamp(2.05rem, 4.8vw, 2.75rem);
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.02em;
  line-height: 1.18;
  margin-bottom: 0.55rem;
  text-shadow:
    0 0 36px rgba(236, 72, 153, 0.22),
    0 0 44px rgba(34, 211, 238, 0.18),
    0 0 52px rgba(167, 139, 250, 0.14);
}

.login-tagline {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 1.6rem;
}

.login-hero-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 0.95vw, 0.72rem);
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.login-hero-line span:first-child {
  width: 64px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ec4899 0%, #a855f7 35%, #22d3ee 70%, #facc15 100%);
  box-shadow:
    0 0 10px rgba(236, 72, 153, 0.4),
    0 0 14px rgba(34, 211, 238, 0.28);
}

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 40px);
  border: none;
  background: transparent;
  box-shadow: none;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem 1.75rem;
  box-shadow:
    0 0 0 1px rgba(244, 63, 94, 0.12) inset,
    0 0 0 1px rgba(59, 130, 246, 0.1) inset,
    -8px 0 36px -12px var(--red-glow),
    8px 0 36px -12px var(--blue-glow),
    0 20px 48px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.login-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.35rem;
  background: linear-gradient(90deg, #fda4af, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.login-header {
  margin-bottom: 1.65rem;
}

.login-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f1f5f9;
}

.login-form .form-group {
  margin-bottom: 1rem;
}

.login-form label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}

.login-form input[type="text"],
.login-form .pwd-wrap input {
  width: 100%;
  height: var(--input-h);
  padding: 0 14px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input[type="text"]:focus,
.login-form .pwd-wrap input:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.65);
  box-shadow:
    0 0 0 1px rgba(244, 63, 94, 0.2),
    0 0 0 3px rgba(37, 99, 235, 0.15);
}

.pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pwd-wrap input {
  padding-right: 48px;
}

.pwd-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.pwd-toggle:hover {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
}

.pwd-toggle:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
}

.pwd-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.pwd-toggle .icon-eye-off {
  display: none;
}

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

.pwd-toggle.is-visible .icon-eye-off {
  display: block;
}

.form-options {
  margin-bottom: 1.25rem;
}

.checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-wrap input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
  cursor: pointer;
}

.btn-login {
  width: 100%;
  height: 48px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.12em;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(
    95deg,
    #dc2626 0%,
    #b91c1c 18%,
    var(--violet-mid) 50%,
    #1d4ed8 82%,
    #2563eb 100%
  );
  background-size: 140% 100%;
  background-position: 50% 50%;
  box-shadow:
    0 4px 24px rgba(220, 38, 38, 0.35),
    0 4px 24px rgba(37, 99, 235, 0.3);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s, background-position 0.35s ease;
}

.btn-login:hover:not(:disabled) {
  filter: brightness(1.08) saturate(1.05);
  background-position: 65% 50%;
  box-shadow:
    0 6px 32px rgba(220, 38, 38, 0.42),
    0 6px 32px rgba(37, 99, 235, 0.38);
}

.btn-login:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-login:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-tip {
  margin-top: 12px;
  font-size: 0.78rem;
  text-align: center;
  min-height: 1.25rem;
  line-height: 1.4;
}

.form-tip.error {
  color: #fb7185;
}

.form-tip.success {
  color: #7dd3fc;
}

.login-footer {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(45, 55, 72, 0.85);
  text-align: center;
}

.login-company {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 0.65rem;
  line-height: 1.45;
}

.login-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.login-footer a {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.login-footer a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.login-footer-sep {
  margin: 0 10px;
  color: var(--input-border);
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .login-hero {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.1);
    padding-bottom: 1.5rem;
    padding-top: 2rem;
    text-align: center;
    align-items: center;
  }

  .login-hero-inner {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
  }

  .login-hero-line {
    justify-content: center;
  }

  .login-main {
    padding-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.75rem 1.35rem 1.5rem;
    border-radius: 16px;
  }
}
