/* ==========================================================================
   登录 / 注册页样式
   ========================================================================== */

.login-body {
  background: #0b1227;
  min-height: 100vh;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(480px, 0.85fr);
  min-height: 100vh;
}

/* ------------------------------- 左侧行业视觉 --------------------------- */
.login-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 34px 54px 22px;
  color: #e8ecff;
  background:
    radial-gradient(900px 500px at 18% 8%, rgba(79, 70, 229, 0.34), transparent 62%),
    radial-gradient(620px 420px at 82% 78%, rgba(34, 211, 238, 0.14), transparent 62%),
    linear-gradient(138deg, #080f23 0%, #101a3b 50%, #161f47 100%);
}
.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 255, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 42%, #000 20%, transparent 76%);
  pointer-events: none;
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(5, 9, 22, 0.55));
  pointer-events: none;
}
.visual-glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.glow-a { width: 420px; height: 420px; left: -120px; top: 18%; background: rgba(79, 70, 229, 0.3); }
.glow-b { width: 320px; height: 320px; right: -80px; bottom: 8%; background: rgba(34, 211, 238, 0.14); }

.visual-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-cube { display: inline-flex; filter: drop-shadow(0 8px 22px rgba(79, 70, 229, 0.5)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 17px; letter-spacing: 0.04em; color: #f3f5ff; }
.brand-text span { font-size: 8.5px; letter-spacing: 0.28em; color: rgba(165, 180, 252, 0.72); }
.brand-version {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(199, 210, 254, 0.58);
  border: 1px solid rgba(165, 180, 252, 0.24);
  border-radius: 999px;
  padding: 3px 10px;
}

.visual-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin-top: 42px;
}
.visual-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: rgba(165, 180, 252, 0.82);
}
.visual-kicker::before { content: ""; width: 26px; height: 1px; background: rgba(165, 180, 252, 0.5); }
.visual-copy h1 {
  margin-top: 14px;
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: #f6f7ff;
  font-weight: 800;
}
.visual-copy h1 span {
  background: linear-gradient(100deg, #c7d2fe 0%, #818cf8 46%, #5eead4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.visual-copy > p {
  margin-top: 16px;
  max-width: 520px;
  font-size: 13px;
  line-height: 1.85;
  color: rgba(203, 213, 245, 0.68);
}
.visual-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 20px;
}
.visual-points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: rgba(224, 231, 255, 0.82);
}
.visual-points i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  color: #a5b4fc;
  border: 1px solid rgba(165, 180, 252, 0.3);
  border-radius: 5px;
  padding: 1px 5px;
}

.visual-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px -10px 0;
}
.scene { width: 100%; max-width: 660px; max-height: 440px; height: auto; }
.scene text { font-family: var(--font); }

.float-card { animation: floatCard 7s ease-in-out infinite; transform-origin: center; }
.card-b { animation-delay: -1.8s; }
.card-c { animation-delay: -3.2s; }
.card-d { animation-delay: -2.4s; }
.card-e { animation-delay: -4.2s; }
.card-f { animation-delay: -0.9s; }
.cube-group { animation: cubeFloat 8s ease-in-out infinite; transform-origin: 300px 210px; }
.mini-cube { animation: miniFloat 6s ease-in-out infinite; transform-origin: center; }
.cube-b { animation-delay: -2.6s; }
.flow { stroke-dasharray: 4 8; animation: dash 6s linear infinite; }
.flow-lines { opacity: 0.9; }

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes cubeFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(0.6deg); }
}
@keyframes miniFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes dash { to { stroke-dashoffset: -120; } }

.visual-foot {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 10px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(148, 163, 220, 0.48);
}

/* ------------------------------- 右侧表单 ------------------------------ */
.login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 52px 34px;
  background:
    radial-gradient(600px 320px at 100% 0%, rgba(79, 70, 229, 0.08), transparent 65%),
    linear-gradient(180deg, #fbfcff 0%, #f4f6fc 100%);
}
.panel-topline {
  position: absolute;
  top: 28px;
  left: 52px;
  right: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--soft);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(18, 167, 107, 0.12);
}
.panel-topline-sep { color: #cdd3e1; }

.auth-card {
  width: min(448px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid #eaedf5;
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.1), 0 2px 0 rgba(255, 255, 255, 0.8) inset;
  padding: 30px 32px 24px;
  position: relative;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #4f46e5, #818cf8 55%, #22d3ee);
}
.auth-head { display: flex; gap: 14px; align-items: flex-start; }
.auth-mark {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(145deg, #eef0ff, #f8f9ff);
  border: 1px solid #e5e8fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-head h2 { font-size: 22px; letter-spacing: -0.02em; margin-top: 2px; }
.auth-head p { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.auth-head .eyebrow { font-size: 9px; letter-spacing: 0.2em; }

.auth-tabs {
  display: flex;
  gap: 26px;
  margin: 24px 0 4px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.auth-tab {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0 1px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--soft);
  transition: color 0.15s ease;
}
.auth-tab:hover { color: var(--ink-2); }
.auth-tab.active { color: var(--ink); }
.auth-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}
.auth-tab-ink { display: none; }

.auth-pane { padding-top: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form .field > label { font-size: 12px; }
.auth-form .form-grid { gap: 13px 12px; }
.auth-form .input { height: 42px; border-radius: 10px; background: #fbfcff; }
.auth-form .input:focus { background: #fff; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-left: 37px; }
.input-icon {
  position: absolute;
  left: 12px;
  display: inline-flex;
  color: #9aa3b5;
  pointer-events: none;
}
.eye-btn {
  position: absolute;
  right: 6px;
  height: 26px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: var(--soft);
  font-size: 11px;
}
.eye-btn:hover { background: #f1f3f9; color: var(--ink-2); }

.form-error {
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--red-soft);
  border: 1px solid #f6cfd0;
  color: #c5393d;
  font-size: 12px;
  line-height: 1.6;
  animation: shake 0.24s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
.auth-form .btn.lg { height: 44px; margin-top: 3px; font-size: 14px; letter-spacing: 0.06em; }

.demo-hint {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f8fc;
  border: 1px dashed #dde2f0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.demo-label {
  display: inline-block;
  margin-right: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.08em;
}
.demo-hint code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid #e5e8f2;
  border-radius: 5px;
  padding: 1px 5px;
}

.demo-hint p { margin-top: 4px; font-size: 10.5px; color: var(--soft); }

.register-agree { align-items: flex-start; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.register-agree input { margin-top: 2px; flex-shrink: 0; }
.register-note { margin-top: 14px; font-size: 11px; color: var(--soft); line-height: 1.7; }

.auth-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 10.5px;
  color: var(--soft);
}
.panel-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  width: min(448px, 100%);
  margin: 22px auto 0;
  font-size: 10px;
  color: var(--soft);
  letter-spacing: 0.03em;
}

@media (max-width: 1120px) {
  .login-shell { grid-template-columns: minmax(0, 1fr) minmax(430px, 0.9fr); }
  .login-visual { padding: 30px 36px 20px; }
  .visual-copy { margin-top: 30px; }
  .login-panel { padding: 68px 34px 28px; }
  .panel-topline { left: 34px; right: 34px; }
}

@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { min-height: 560px; padding: 26px 30px 18px; }
  .visual-copy { margin-top: 22px; }
  .visual-copy h1 { font-size: 32px; }
  .visual-copy > p { max-width: 640px; }
  .visual-stage { min-height: 330px; }
  .login-panel { padding: 64px 30px 30px; }
  .panel-topline { left: 30px; right: 30px; }
}

@media (max-width: 680px) {
  .login-visual { min-height: auto; padding: 22px 22px 16px; }
  .visual-copy { margin-top: 20px; }
  .visual-copy h1 { font-size: 27px; }
  .visual-copy > p { font-size: 12px; }
  .visual-points { display: none; }
  .visual-stage { min-height: 240px; margin-top: 6px; }
  .visual-foot { display: none; }
  .login-panel { padding: 58px 20px 24px; }
  .panel-topline { left: 20px; right: 20px; }
  .auth-card { padding: 24px 20px 20px; }
  .auth-card::before { left: 20px; right: 20px; }
  .auth-tabs { gap: 20px; }
  .auth-foot { display: none; }
}

@media (max-height: 780px) and (min-width: 961px) {
  .login-visual { padding-top: 26px; }
  .visual-copy { margin-top: 26px; }
  .visual-copy h1 { font-size: 34px; }
  .visual-copy > p { margin-top: 12px; font-size: 12px; line-height: 1.75; }
  .visual-points { margin-top: 14px; }
  .visual-stage { min-height: 240px; }
  .login-panel { padding-top: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  .float-card, .cube-group, .mini-cube, .flow { animation: none !important; }
}
