/**
 * 登录页：飞机拖尾动画风格（仿113.44.89.61）
 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --el-color-primary: #5838fc;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 加载动画 */
.preloader {
  background: linear-gradient(135deg, #5838fc 0%, #7648fc 100%);
  width: 100%;
  height: 100%;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  width: 70px;
  height: 60px;
  position: relative;
}

.mask {
  position: absolute;
  border-radius: 2px;
  overflow: hidden;
  perspective: 1000;
  backface-visibility: hidden;
}

.plane {
  background: #fff;
  width: 400%;
  height: 100%;
  position: absolute;
  transform: translate3d(0px, 0, 0);
  z-index: 100;
  perspective: 1000;
  backface-visibility: hidden;
}

#top .plane {
  z-index: 2000;
  animation: trans1 1.3s ease-in infinite 0s backwards;
}

#middle .plane {
  transform: translate3d(0px, 0, 0);
  background: #fff;
  animation: trans2 1.3s linear infinite 0.3s backwards;
}

#bottom .plane {
  z-index: 2000;
  animation: trans3 1.3s ease-out infinite 0.7s backwards;
}

#top {
  width: 53px;
  height: 20px;
  left: 20px;
  transform: skew(-15deg, 0);
  z-index: 100;
}

#middle {
  width: 33px;
  height: 20px;
  left: 20px;
  top: 15px;
  transform: skew(-15deg, 40deg);
}

#bottom {
  width: 53px;
  height: 20px;
  top: 30px;
  transform: skew(-15deg, 0);
}

.preloader p {
  color: #fff;
  position: absolute;
  left: -50px;
  top: 60px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0;
  width: 200px;
}

@keyframes trans1 {
  from { transform: translate3d(53px, 0, 0); }
  to { transform: translate3d(-250px, 0, 0); }
}

@keyframes trans2 {
  from { transform: translate3d(-160px, 0, 0); }
  to { transform: translate3d(53px, 0, 0); }
}

@keyframes trans3 {
  from { transform: translate3d(53px, 0, 0); }
  to { transform: translate3d(-220px, 0, 0); }
}

/* 左右分栏 */
.login-split {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 100vh;
  width: 100%;
}

.login-visual {
  flex: 1 1 54%;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.login-panel {
  flex: 0 0 min(46%, 520px);
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.5rem;
  box-sizing: border-box;
  background: linear-gradient(165deg, #060a12 0%, #0f172a 42%, #080c18 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: -40px 0 100px rgba(0, 0, 0, 0.55);
  position: relative;
  z-index: 3;
}

.login-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  min-height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* 粒子背景 - 静止不晃 */
.login-starfield {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(88, 56, 252, 0.6);
  border-radius: 50%;
}

/* 光晕效果 */
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
}

.login-orb--1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #5838fc 0%, #7648fc 100%);
  top: 10%;
  right: -10%;
}

.login-orb--2 {
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, #00c9ff 0%, #92fe9d 100%);
  bottom: 10%;
  left: -10%;
}

/* 流星效果 - 静止 */
.login-meteors {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.login-meteor {
  position: absolute;
  top: var(--t, 5%);
  left: var(--l, 10%);
  width: 100px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), transparent);
  transform: rotate(-38deg);
  opacity: 0.3;
}

/* 背景模糊光晕 */
.login-bg-glow {
  position: absolute;
  width: 85%;
  height: 80%;
  top: 10%;
  left: 7.5%;
  background: linear-gradient(155deg, rgba(7,7,9,0.0823529412) 12%, #5838fc 36%, rgba(7,7,9,0.0823529412) 76%);
  filter: blur(100px);
  border-radius: 20px;
  opacity: 0.6;
  animation: glow-pulse 6s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
}

.login-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 0;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2.25rem 2rem 2rem;
  border-radius: 16px;
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(15, 23, 42, 0.65) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.15),
    0 24px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, #5838fc 30%, #7648fc 70%, transparent);
  opacity: 0.95;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.login-brand-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand-icon img {
  width: 52px;
  height: 52px;
  display: block;
  border-radius: 50%;
}

.login-card h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(120deg, #f8fafc 0%, #a78bfa 38%, #818cf8 72%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-sub {
  margin: 0 0 1.5rem;
  padding-left: 3.75rem;
  font-size: 0.875rem;
  color: rgba(148, 163, 184, 0.95);
  line-height: 1.5;
}

.login-card .alert {
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.login-card .alert-error {
  background: rgba(127, 29, 29, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

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

.login-card .form-row label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  max-width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.5);
  color: #f1f5f9;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-card input::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

.login-card input:focus {
  outline: none;
  border-color: rgba(88, 56, 252, 0.55);
  box-shadow: 0 0 0 3px rgba(88, 56, 252, 0.15);
}

.login-card input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-captcha-row .login-captcha-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.login-captcha-img {
  display: block;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  vertical-align: middle;
}

.login-captcha-refresh {
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.8);
  color: rgba(226, 232, 240, 0.9);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.login-captcha-refresh:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(88, 56, 252, 0.35);
  color: #f8fafc;
}

.login-card .btn-primary {
  margin-top: 0.25rem;
  width: 100%;
  max-width: none;
  padding: 0.75rem 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #5838fc 0%, #7648fc 50%, #8b5cf6 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(88, 56, 252, 0.35);
  transition: transform 0.12s, box-shadow 0.12s;
}

.login-card .btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(88, 56, 252, 0.45);
}

.login-card .btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.login-foot {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.75);
  text-align: center;
  letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .login-split {
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .login-visual {
    flex: 0 0 auto;
    min-height: min(42vh, 320px);
    height: min(42vh, 320px);
  }

  .login-panel {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.4);
    padding: 1.5rem 1.25rem 2rem;
  }

  .login-wrap {
    max-width: 440px;
  }
}

@media (max-width: 480px) {
  .login-sub {
    padding-left: 0;
    margin-top: 0.5rem;
  }
  .login-brand {
    flex-wrap: wrap;
  }
}