/* ==========================================================================
   发财系统 · 动感登录页
   极光动态背景 + 毛玻璃卡片 + 浮动标签 + 入场动效（纯 CSS）
   ========================================================================== */
:root {
  --teal: #1ab394;
  --teal-dark: #12a184;
  --ink: #070d18;
  --text: #e8edf5;
  --muted: #93a1b7;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body.login-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: radial-gradient(1200px 800px at 20% 10%, #0d1b2a 0%, #070d18 55%, #04070d 100%);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 动态极光背景 ---------- */
.aurora { position: fixed; inset: 0; overflow: hidden; z-index: 0; }

.aurora .blob {
  position: absolute;
  width: 46vw;
  height: 46vw;
  min-width: 420px;
  min-height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  will-change: transform;
}
.aurora .b1 {
  left: -8vw; top: -12vh;
  background: radial-gradient(circle at 30% 30%, #1ab394, rgba(26, 179, 148, 0) 68%);
  animation: drift1 22s ease-in-out infinite alternate;
}
.aurora .b2 {
  right: -10vw; top: 8vh;
  background: radial-gradient(circle at 60% 40%, #2563eb, rgba(37, 99, 235, 0) 66%);
  opacity: .5;
  animation: drift2 26s ease-in-out infinite alternate;
}
.aurora .b3 {
  left: 28vw; bottom: -22vh;
  background: radial-gradient(circle at 50% 50%, #7c3aed, rgba(124, 58, 237, 0) 66%);
  opacity: .38;
  animation: drift3 30s ease-in-out infinite alternate;
}
@keyframes drift1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(10vw, 8vh, 0) scale(1.15); }
}
@keyframes drift2 {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to { transform: translate3d(-12vw, 10vh, 0) scale(.92); }
}
@keyframes drift3 {
  from { transform: translate3d(0, 0, 0) scale(.95); }
  to { transform: translate3d(-8vw, -10vh, 0) scale(1.12); }
}

/* 网格 */
.aurora .grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(rgba(120, 170, 210, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 210, .055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 72%);
}

/* 旋转光环 */
.aurora .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(26, 179, 148, .18);
  pointer-events: none;
}
.aurora .r1 {
  width: 720px; height: 720px;
  left: 50%; top: 50%;
  margin: -360px 0 0 -360px;
  border-style: dashed;
  animation: spin 46s linear infinite;
}
.aurora .r2 {
  width: 980px; height: 980px;
  left: 50%; top: 50%;
  margin: -490px 0 0 -490px;
  border-color: rgba(37, 99, 235, .12);
  animation: spin 70s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 浮动粒子 */
.aurora .particle {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #7ff0da;
  box-shadow: 0 0 10px 2px rgba(127, 240, 218, .55);
  opacity: 0;
  animation: rise 12s linear infinite;
}
.aurora .p1 { left: 12%; bottom: -4%; animation-delay: 0s; }
.aurora .p2 { left: 28%; bottom: -4%; animation-delay: 2.4s; animation-duration: 14s; }
.aurora .p3 { left: 47%; bottom: -4%; animation-delay: 4.8s; }
.aurora .p4 { left: 63%; bottom: -4%; animation-delay: 1.2s; animation-duration: 16s; }
.aurora .p5 { left: 78%; bottom: -4%; animation-delay: 6s; }
.aurora .p6 { left: 90%; bottom: -4%; animation-delay: 3.6s; animation-duration: 15s; }
@keyframes rise {
  0% { transform: translateY(0) scale(.8); opacity: 0; }
  12% { opacity: .85; }
  80% { opacity: .35; }
  100% { transform: translateY(-105vh) scale(1.1); opacity: 0; }
}

/* ---------- 主容器 ---------- */
.login-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1000px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-card {
  width: 100%;
  display: flex;
  min-height: 560px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(22, 34, 52, .82), rgba(9, 16, 28, .88));
  border: 1px solid rgba(140, 200, 220, .16);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(255, 255, 255, .03) inset,
    0 1px 0 rgba(255, 255, 255, .08) inset;
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  animation: cardIn .9s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 卡片顶部流光边 */
.login-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(120deg, rgba(26, 179, 148, .0), rgba(26, 179, 148, .55), rgba(37, 99, 235, .35), rgba(26, 179, 148, 0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderFlow 8s linear infinite;
  pointer-events: none;
}
.login-card { position: relative; }
.login-card > * { position: relative; z-index: 1; }

/* 跟随鼠标的光斑 */
.login-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 35%), rgba(26, 179, 148, .14), transparent 72%);
  pointer-events: none;
  z-index: 0;
  transition: background .15s linear;
}
@keyframes borderFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.login-card::before { background-size: 220% 220%; }

/* ---------- 左侧品牌区 ---------- */
.brand-pane {
  flex: 1 1 54%;
  padding: 54px 52px 44px;
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    radial-gradient(560px 320px at 12% 8%, rgba(26, 179, 148, .18), transparent 70%),
    radial-gradient(520px 340px at 92% 100%, rgba(37, 99, 235, .16), transparent 70%);
}
.brand-pane::after {
  content: "";
  position: absolute;
  top: 40px; bottom: 40px; right: 0;
  width: 1px;
  background: linear-gradient(transparent, rgba(150, 200, 220, .18), transparent);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  color: #fff;
  animation: fadeUp .8s .15s both;
}
.brand-mark .dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--teal);
  box-shadow: 0 0 14px rgba(26, 179, 148, .9);
}

.brand-title {
  margin: 40px 0 16px;
  font-size: 42px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  animation: fadeUp .8s .25s both;
}
.grad-text {
  background: linear-gradient(92deg, #4ff0d0 0%, #1ab394 32%, #4d9bff 72%, #a78bfa 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradMove 7s linear infinite;
}
@keyframes gradMove { to { background-position: 220% center; } }

.brand-sub {
  max-width: 360px;
  margin: 0 0 34px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--muted);
  animation: fadeUp .8s .35s both;
}
.brand-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeUp .8s .45s both;
}
.brand-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #c8d4e4;
}
.brand-points li i {
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 13px;
  color: #6ef0d8;
  background: rgba(26, 179, 148, .12);
  border: 1px solid rgba(26, 179, 148, .28);
}
.brand-foot {
  margin-top: auto;
  padding-top: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #7f8ea6;
  animation: fadeUp .8s .55s both;
}
.pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  position: relative;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(26, 179, 148, .55);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.6); opacity: .9; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- 右侧表单 ---------- */
.form-pane {
  flex: 0 0 46%;
  padding: 52px 46px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(6, 12, 22, .42);
  animation: fadeUp .8s .2s both;
}
.form-head h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: .5px;
  color: #fff;
}
.form-head p {
  margin: 0 0 30px;
  font-size: 12.5px;
  color: var(--muted);
}

.field { position: relative; margin-bottom: 18px; }
.field .form-control {
  width: 100%;
  height: 52px;
  padding: 20px 42px 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(140, 170, 200, .22);
  background: rgba(8, 16, 28, .62);
  color: #eef3fa;
  -webkit-text-fill-color: #eef3fa;
  caret-color: #eef3fa;
  font-size: 13.5px;
  outline: none;
  box-shadow: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field .form-control:hover { border-color: rgba(140, 170, 200, .36); }
.field .form-control:focus {
  border-color: rgba(26, 179, 148, .85);
  background: rgba(8, 22, 20, .78);
  box-shadow: 0 0 0 4px rgba(26, 179, 148, .12), 0 0 24px rgba(26, 179, 148, .16);
}
.field > label[for] {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #8594aa;
  pointer-events: none;
  transition: none;
}
.login-card.ready .field > label[for] { transition: all .18s ease; }
.field .form-control:focus ~ label[for],
.field .form-control:not(:placeholder-shown) ~ label[for],
.field .form-control:-webkit-autofill ~ label[for] {
  top: 14px;
  font-size: 10.5px;
  letter-spacing: .6px;
  color: #5fdcc4;
}
.field-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #6d7c92;
  pointer-events: none;
  transition: color .2s;
}
.field .form-control:focus ~ .field-icon { color: #5fdcc4; }

/* 验证码 */
.captcha-field .form-control { padding-right: 156px; }
.captcha-box {
  position: absolute;
  right: 6px;
  top: 5px;
  width: 142px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(140, 170, 200, .25);
  background: rgba(255, 255, 255, .9);
}
.captcha-box .imgcode {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

/* 记住我 */
.form-extra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 22px;
}
.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 400;
  color: #9aa9bf;
  cursor: pointer;
}
.remember input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  margin: 0;
  border-radius: 5px;
  border: 1px solid rgba(140, 170, 200, .45);
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  position: relative;
  transition: .15s;
}
.remember input:checked {
  background: var(--teal);
  border-color: var(--teal);
}
.remember input:checked::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 4px; height: 9px;
  border: solid #06251f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* 登录按钮 */
.btn-login {
  position: relative;
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 4px;
  color: #052a24;
  background: linear-gradient(100deg, #35e0bf 0%, #1ab394 46%, #26c2a4 100%);
  box-shadow: 0 12px 30px rgba(26, 179, 148, .28), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn-login i {
  font-size: 13px;
  letter-spacing: 0;
  transition: transform .2s;
}
.btn-login::after {
  content: "";
  position: absolute;
  top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg);
  transition: left .55s ease;
}
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(26, 179, 148, .38), 0 0 26px rgba(53, 224, 191, .22);
  filter: brightness(1.04);
}
.btn-login:hover::after { left: 120%; }
.btn-login:hover i { transform: translateX(3px); }
.btn-login:active { transform: translateY(0) scale(.995); }
.btn-login[disabled] { opacity: .7; cursor: wait; }

.form-note {
  margin: 18px 0 0;
  text-align: center;
  font-size: 11px;
  color: #6f7f95;
}

/* 错误提示与自动填充 */
.field label.error {
  position: static !important;
  transform: none !important;
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: #ff7b8a;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: #eef3fa !important;
  -webkit-box-shadow: 0 0 0 1000px #0b1624 inset !important;
  box-shadow: 0 0 0 1000px #0b1624 inset !important;
  background-color: #0b1624 !important;
  background-image: none !important;
  caret-color: #eef3fa;
  transition: background-color 9999s ease-out;
}
input:autofill {
  background-color: #0b1624 !important;
  color: #eef3fa !important;
}

/* 页脚 */
.page-foot {
  margin: 22px 0 0;
  font-size: 11.5px;
  color: #64748b;
  animation: fadeUp .8s .5s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  body.login-page { overflow: auto; padding: 24px 0; }
  .login-shell { padding: 16px; }
  .login-card { flex-direction: column; min-height: 0; }
  .brand-pane {
    flex: none;
    padding: 30px 28px 24px;
  }
  .brand-pane::after { display: none; }
  .brand-title { margin: 18px 0 10px; font-size: 28px; }
  .brand-sub { margin-bottom: 20px; }
  .brand-points, .brand-foot { display: none; }
  .form-pane { flex: none; padding: 28px 28px 32px; }
  .form-head p { margin-bottom: 22px; }
  .aurora .r1 { width: 520px; height: 520px; margin: -260px 0 0 -260px; }
  .aurora .r2 { display: none; }
}
@media (max-width: 420px) {
  .form-pane { padding: 24px 20px 28px; }
  .captcha-field .form-control { padding-right: 132px; }
  .captcha-box { width: 118px; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora .blob, .aurora .ring, .aurora .particle, .grad-text,
  .login-card, .login-card::before, .pulse::after { animation: none !important; }
}
