/* 登录页 — 科技蓝（参考 hld_company，色调更深） */

.login-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ops-accent: #1d4ed8;
  --ops-accent-soft: #2563eb;
  --ops-accent-deep: #1e3a8a;
  --text: #0f172a;
  --muted: #64748b;
  --on-accent: #ffffff;
  color: var(--text);
  background:
    radial-gradient(ellipse 68% 52% at 88% 16%, rgba(37, 99, 235, 0.22), transparent 58%),
    radial-gradient(ellipse 58% 50% at 10% 84%, rgba(15, 40, 100, 0.55), transparent 55%),
    linear-gradient(135deg, #1e3a8a 0%, #172554 42%, #0a1628 100%);
  --login-w: clamp(360px, 26vw, 420px);
  --login-pad-x: clamp(28px, 2.2vw, 40px);
  --login-pad-y: clamp(32px, 3vh, 44px);
  --login-gap: clamp(14px, 1.2vw, 18px);
  --login-label: clamp(13px, 0.85vw, 14px);
  --login-input-h: clamp(44px, 3vw, 48px);
  --login-input-fs: clamp(14px, 0.9vw, 15px);
  --login-btn-fs: clamp(15px, 1vw, 16px);
  --login-radius: 12px;
  --login-logo: clamp(72px, 6vw, 96px);
  --login-hero-max: min(1120px, 74vw);
  --login-hero-min-h: clamp(360px, 48vh, 560px);
}

.login-deco {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-deco-shape {
  position: absolute;
  border: 2px solid rgba(147, 197, 253, 0.18);
  border-radius: 20px;
}

.login-deco-shape--1 {
  width: min(180px, 14vw);
  height: min(180px, 14vw);
  top: 12%;
  right: 38%;
  border-radius: 28px;
  transform: rotate(-18deg);
}

.login-deco-shape--2 {
  width: min(120px, 10vw);
  height: min(120px, 10vw);
  bottom: 18%;
  right: 8%;
  border-radius: 50%;
  border-width: 3px;
  opacity: 0.65;
}

.login-deco-shape--3 {
  width: min(90px, 8vw);
  height: min(90px, 8vw);
  top: 22%;
  left: 32%;
  border-radius: 16px;
  transform: rotate(12deg);
  opacity: 0.5;
}

.login-deco-shape--4 {
  width: min(60px, 5vw);
  height: min(60px, 5vw);
  bottom: 28%;
  left: 8%;
  border-radius: 50%;
  opacity: 0.45;
}

.login-deco-shape--5 {
  width: min(140px, 11vw);
  height: min(140px, 11vw);
  top: 8%;
  left: 18%;
  border-radius: 50%;
  border-style: dashed;
  opacity: 0.3;
}

.login-brand-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(18px, 2.2vh, 28px) clamp(24px, 3vw, 48px);
}

.login-brand-logo {
  width: var(--login-logo);
  height: var(--login-logo);
  object-fit: contain;
  border: none;
  padding: 0;
  flex-shrink: 0;
}

.login-brand-unit {
  color: #fff;
  font-size: clamp(24px, 2vw, 36px);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 12px rgba(7, 16, 40, 0.35);
  line-height: 1.35;
}

.login-brand-sub {
  display: block;
  margin-top: 4px;
  font-size: clamp(12px, 0.75vw, 14px);
  font-weight: 400;
  letter-spacing: 0.18em;
  color: rgba(191, 219, 254, 0.85);
}

.login-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2.5vw, 40px);
  padding: 0 clamp(16px, 2.5vw, 48px) clamp(28px, 3.5vh, 48px);
  min-height: 0;
}

.login-hero {
  flex: 1 1 75%;
  max-width: var(--login-hero-max);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: login-enter 0.75s ease-out both;
}

.login-hero-scan {
  position: absolute;
  inset: 6% 2% 10%;
  border-radius: 24px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.22;
  mask-image: radial-gradient(ellipse 78% 72% at 50% 50%, #000 35%, transparent 100%);
}

.login-hero-scan::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(147, 197, 253, 0.15), rgba(96, 165, 250, 0.85), rgba(147, 197, 253, 0.15), transparent);
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.45);
  animation: login-scan 6s linear infinite;
}

@keyframes login-scan {
  0% { top: -4%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 104%; opacity: 0; }
}

.login-hero-svg {
  width: 100%;
  max-width: var(--login-hero-max);
  min-height: var(--login-hero-min-h);
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(7, 16, 40, 0.4));
}

.login-hero-orbit {
  transform-origin: 460px 268px;
  animation: login-orbit-spin 48s linear infinite;
}

.login-hero-orbit--rev {
  animation-direction: reverse;
  animation-duration: 36s;
}

@keyframes login-orbit-spin {
  to { transform: rotate(360deg); }
}

.login-hero-node-float {
  animation: login-node-float 5.5s ease-in-out infinite;
}

.login-hero-node--hub .login-hero-node-float { animation-delay: 0s; }
.login-hero-node--alert .login-hero-node-float { animation-delay: 0.25s; }
.login-hero-node--m1 .login-hero-node-float { animation-delay: 0.45s; }
.login-hero-node--m2 .login-hero-node-float { animation-delay: 0.65s; }
.login-hero-node--m3 .login-hero-node-float { animation-delay: 0.85s; }
.login-hero-node--m4 .login-hero-node-float { animation-delay: 1.05s; }
.login-hero-node--m5 .login-hero-node-float { animation-delay: 1.25s; }
.login-hero-node--m6 .login-hero-node-float { animation-delay: 1.45s; }

@keyframes login-node-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.login-hero-links path {
  animation: login-link-dash 10s linear infinite;
}

.login-hero-links path:nth-child(2) { animation-delay: -1.2s; }
.login-hero-links path:nth-child(3) { animation-delay: -2.4s; }
.login-hero-links path:nth-child(4) { animation-delay: -3.6s; }
.login-hero-links path:nth-child(5) { animation-delay: -4.8s; }
.login-hero-links path:nth-child(6) { animation-delay: -6s; }
.login-hero-links path:nth-child(7) { animation-delay: -7.2s; }

@keyframes login-link-dash {
  to { stroke-dashoffset: -88; }
}

.login-hero-packet {
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.8));
}

.login-hero-packet--1 { animation: login-packet-a 3.2s ease-in-out infinite; }
.login-hero-packet--2 { animation: login-packet-b 3.6s ease-in-out infinite 0.4s; }
.login-hero-packet--3 { animation: login-packet-c 3.4s ease-in-out infinite 0.8s; }
.login-hero-packet--4 { animation: login-packet-d 3.5s ease-in-out infinite 1.2s; }
.login-hero-packet--5 { animation: login-packet-e 3.3s ease-in-out infinite 1.6s; }

@keyframes login-packet-a {
  0%, 100% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 1; }
  85% { opacity: 1; transform: translate(0, 48px); }
}

@keyframes login-packet-b {
  0%, 100% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 1; }
  85% { opacity: 1; transform: translate(-98px, 68px); }
}

@keyframes login-packet-c {
  0%, 100% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 1; }
  85% { opacity: 1; transform: translate(-158px, 0); }
}

@keyframes login-packet-d {
  0%, 100% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 1; }
  85% { opacity: 1; transform: translate(120px, -52px); }
}

@keyframes login-packet-e {
  0%, 100% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 1; }
  85% { opacity: 1; transform: translate(180px, 0); }
}

.login-wrap {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 100%;
  max-width: var(--login-w);
  margin-right: clamp(24px, 4vw, 72px);
  animation: login-enter 0.75s ease-out 0.12s both;
}

@keyframes login-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-card {
  padding: var(--login-pad-y) var(--login-pad-x);
  border-radius: var(--login-radius);
  background: #ffffff;
  border: none;
  box-shadow: 0 20px 56px rgba(7, 16, 40, 0.28);
}

.login-welcome {
  margin: 0;
  font-size: clamp(22px, 1.6vw, 28px);
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.04em;
}

.login-sub {
  margin: 8px 0 0;
  font-size: var(--login-label);
  color: var(--muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--login-gap);
  margin-top: clamp(22px, 2.4vh, 32px);
}

.login-form .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-form .field span {
  font-size: var(--login-label);
  color: var(--muted);
  letter-spacing: 0.04em;
}

.login-form .field input {
  height: var(--login-input-h);
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--text);
  font-size: var(--login-input-fs);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.login-form .field input::placeholder {
  color: #94a3b8;
}

.login-form .field input:focus {
  border-color: var(--ops-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.16);
}

.login-error {
  margin: 0;
  font-size: var(--login-label);
  color: #dc2626;
  text-align: center;
  min-height: 1.2em;
}

.btn-login {
  position: relative;
  height: var(--login-input-h);
  margin-top: 6px;
  border: none;
  border-radius: 8px;
  background: var(--ops-accent-deep);
  color: var(--on-accent);
  font-size: var(--login-btn-fs);
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 22px rgba(23, 37, 84, 0.35);
}

.btn-login::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.18) 48%,
    transparent 62%
  );
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.btn-login:hover:not(:disabled) {
  background: var(--ops-accent);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(29, 78, 216, 0.38);
}

.btn-login:hover:not(:disabled)::after {
  transform: translateX(120%);
}

.btn-login:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-login span {
  position: relative;
  z-index: 1;
}

.login-scene-pulse {
  animation: login-pulse 2s ease-in-out infinite;
}

@keyframes login-pulse {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .login-hero,
  .login-wrap,
  .login-hero-node-float,
  .login-hero-links path,
  .login-hero-orbit,
  .login-hero-packet,
  .login-hero-scan::after,
  .login-scene-pulse,
  .btn-login::after {
    animation: none !important;
  }
}

@media (min-width: 1280px) {
  .login-body {
    --login-hero-max: min(1200px, 78vw);
    --login-hero-min-h: clamp(420px, 52vh, 620px);
  }
}

@media (max-width: 960px) {
  .login-stage {
    flex-direction: column;
    justify-content: center;
    padding-top: 8px;
  }
  .login-hero {
    max-width: min(680px, 92vw);
    width: 100%;
  }

  .login-hero-svg {
    min-height: clamp(300px, 40vh, 440px);
  }
  .login-wrap {
    max-width: min(420px, 100%);
    margin-right: 0;
  }
}

@media (max-width: 560px) {
  .login-hero { display: none; }
  .login-deco-shape--1,
  .login-deco-shape--3,
  .login-deco-shape--5 { display: none; }
}

.hidden { display: none !important; }

.pwd-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 16, 40, 0.45);
}

.pwd-modal-card {
  width: min(420px, calc(100% - 32px));
  padding: 28px 24px 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 56px rgba(7, 16, 40, 0.28);
}

.pwd-modal-card h2 {
  margin: 0;
  font-size: 20px;
  color: #0f172a;
}

.pwd-modal-tip {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

.pwd-modal-card .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pwd-modal-card .field span {
  font-size: var(--login-label);
  color: var(--muted);
}

.pwd-modal-card .field input {
  height: var(--login-input-h);
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: var(--login-input-fs);
  outline: none;
}

.pwd-modal-card .field input:focus {
  border-color: var(--ops-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.16);
}
