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

:root {
  --bg-from: #f6f9fc;
  --bg-mid: #eef3f9;
  --bg-to: #f2f6fb;
  --card-bg: #ffffff;
  --card-border: #e6ecf3;
  --input-bg: #f5f7fa;
  --input-bg-focus: #ffffff;
  --text-main: #1a2233;
  --text-sub: #6b7a8f;
  --text-label: #41506a;
  --text-placeholder: #aeb8c6;
  --accent: #409eff;
  --accent-2: #2377e8;
  --accent-3: #40b8ff;
  --danger: #ef4444;
}

html, body { height: 100%; }
body {
  width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: linear-gradient(135deg, var(--bg-from) 0%, var(--bg-mid) 50%, var(--bg-to) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* ===== 数据平台调性背景：节点 + 连线网络图（SVG） ===== */
.network-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.network-bg .net-edges {
  opacity: .28;
  animation: edgeTwinkle 5s infinite ease-in-out;
}
.network-bg .net-edges line {
  animation: edgeTwinkle 5s infinite ease-in-out;
}
.network-bg .net-edges line:nth-child(2n)  { animation-delay: .8s; }
.network-bg .net-edges line:nth-child(3n)  { animation-delay: 1.6s; }
.network-bg .net-edges line:nth-child(5n)  { animation-delay: 2.6s; }
.network-bg .net-nodes circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: nodePulse 3.2s infinite ease-in-out;
}
.network-bg .net-nodes circle:nth-child(odd) { animation-delay: 0s; }
.network-bg .net-nodes circle:nth-child(3n)  { animation-delay: .9s; }
.network-bg .net-nodes circle:nth-child(5n)  { animation-delay: 1.8s; }
.network-bg .net-nodes circle:nth-child(7n)  { animation-delay: 2.4s; }
@keyframes nodePulse {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50%      { opacity: 1;   transform: scale(1.25); }
}
@keyframes edgeTwinkle {
  0%, 100% { opacity: .18; }
  50%      { opacity: .42; }
}

/* ===== 浮动光晕（数据节点感） ===== */
.bg-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(64, 158, 255, 0.20), rgba(64, 158, 255, 0) 70%);
  filter: blur(1px);
  animation: float 16s infinite ease-in-out;
  pointer-events: none;
  will-change: transform, opacity;
}
.p1 { width: 240px; height: 240px; top: 6%;   left: 5%;   animation-delay: 0s; }
.p2 { width: 170px; height: 170px; bottom: 8%; right: 7%;  animation-delay: 5s; }
.p3 { width: 120px; height: 120px; top: 38%;  right: 16%; animation-delay: 10s; }
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1);     opacity: .65; }
  50%      { transform: translateY(-32px) scale(1.08); opacity: 1; }
}

/* ===== 登录卡片（淡入上浮） ===== */
.login-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: clamp(440px, 32vw, 600px);
  padding: 20px;
  animation: cardIn .7s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(.985); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.login-card {
  padding: clamp(36px, 3.2vw, 56px) clamp(32px, 2.8vw, 50px) clamp(30px, 2.6vw, 44px);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: clamp(14px, 1.1vw, 20px);
  box-shadow: 0 10px 40px rgba(35, 60, 110, 0.08), 0 2px 8px rgba(35, 60, 110, 0.04);
}

/* ===== 卡片内元素错峰淡入 ===== */
.login-card > * { animation: fadeUp .55s both ease-out; }
.login-card > *:nth-child(1) { animation-delay: .18s; }
.login-card > *:nth-child(2) { animation-delay: .28s; }
.login-card > *:nth-child(3) { animation-delay: .38s; }
.login-card > *:nth-child(4) { animation-delay: .48s; }
.login-card > *:nth-child(5) { animation-delay: .58s; }
.login-card > *:nth-child(6) { animation-delay: .68s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== 品牌（logo 呼吸光） ===== */
.login-brand { text-align: center; margin-bottom: clamp(28px, 2.4vw, 40px); }
.brand-logo {
  width: clamp(60px, 4.6vw, 84px);
  height: clamp(60px, 4.6vw, 84px);
  margin: 0 auto clamp(12px, 1vw, 16px);
  border-radius: clamp(14px, 1.1vw, 18px);
  display: block;
  object-fit: cover;
  animation: logoPulse 3.2s infinite ease-in-out;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(64, 158, 255, 0.22); }
  50%      { box-shadow: 0 8px 28px rgba(64, 158, 255, 0.48); }
}
.login-brand h1 {
  font-size: clamp(22px, 1.7vw, 30px);
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.25em;
  text-indent: 0.25em;
  margin-bottom: 8px;
}
.brand-sub {
  font-size: clamp(11px, 0.85vw, 13px);
  color: var(--text-sub);
  letter-spacing: 2.5px;
  margin-top: 2px;
}

/* ===== 表单字段 ===== */
.field { margin-bottom: clamp(20px, 1.7vw, 28px); }
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-label);
  margin-bottom: 8px;
}
.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-placeholder);
  font-size: 14px;
  pointer-events: none;
  transition: color .25s, transform .25s;
}
.field input {
  width: 100%;
  height: clamp(44px, 3.3vw, 54px);
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 9px;
  padding: 0 16px 0 42px;
  font-size: clamp(14px, 1vw, 16px);
  color: var(--text-main);
  outline: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field input::placeholder { color: var(--text-placeholder); }
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.15);
  background: var(--input-bg-focus);
}
.input-wrap:focus-within .input-icon {
  color: var(--accent);
  transform: translateY(-50%) scale(1.12);
}

/* ===== 验证码行（hover 放大） ===== */
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .input-wrap { flex: 1; }
.captcha-img {
  height: clamp(44px, 3.3vw, 54px);
  width: clamp(130px, 9.5vw, 160px);
  flex-shrink: 0;
  border: 1px solid var(--card-border);
  border-radius: 9px;
  cursor: pointer;
  background: #f2f5fa;
  object-fit: cover;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.captcha-img:hover {
  transform: scale(1.04);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.15);
}
.captcha-img:active { transform: scale(.97); }

/* ===== 错误提示 ===== */
.login-tip {
  font-size: 13px;
  color: var(--danger);
  margin-bottom: 14px;
  padding: 9px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
}

/* ===== 登录按钮（hover 扫光 + 上浮） ===== */
.login-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: clamp(46px, 3.5vw, 56px);
  border: none;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
  color: #fff;
  font-size: clamp(14px, 1.05vw, 17px);
  font-weight: 500;
  letter-spacing: 2px;
  cursor: pointer;
  transition: box-shadow .25s, transform .15s, opacity .2s;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.login-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.40), transparent);
  transform: skewX(-20deg);
  transition: left .65s ease;
  pointer-events: none;
}
.login-btn:hover {
  box-shadow: 0 8px 22px rgba(64, 158, 255, 0.38);
  transform: translateY(-2px);
}
.login-btn:hover::after { left: 150%; }
.login-btn:active { transform: translateY(0); }
.login-btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.login-btn[disabled]::after { display: none; }
.login-btn i { letter-spacing: 0; }

/* ===== 底部提示 ===== */
.login-hint {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-sub);
}
.login-hint b { color: var(--accent-2); font-weight: 500; margin: 0 2px; }
.login-hint i { margin-right: 4px; color: var(--accent); }

/* ===== 页面底版权 ===== */
.page-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  z-index: 10;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: .3px;
  line-height: 1.7;
  padding: 0 20px;
  animation: fadeUp .8s .8s both ease-out;
}
.page-footer .dot {
  margin: 0 6px;
  opacity: .5;
}

/* ===== 移动端：全屏白卡片，关掉背景装饰 ===== */
@media (max-width: 768px) {
  body {
    display: block;
    overflow-y: auto;
    background: var(--bg-from);
  }
  .grid-bg,
  .network-bg,
  .bg-particle { display: none !important; }
  .login-wrap {
    max-width: 100%;
    width: 100%;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    animation: none;
  }
  .login-card {
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #ffffff;
    padding: clamp(60px, 12vh, 120px) 24px 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .login-card > * { animation: none; }
  .login-brand { margin-bottom: 32px; }
  .brand-logo { width: 64px; height: 64px; margin-bottom: 12px; }
  .login-brand h1 { font-size: 22px; }
  .brand-sub { font-size: 11px; letter-spacing: 2px; }
  .field { margin-bottom: 18px; }
  .field input { height: 46px; font-size: 15px; }
  .captcha-img { height: 46px; width: 130px; }
  .login-btn { height: 48px; font-size: 15px; }
  .page-footer {
    position: static;
    padding: 24px 24px 36px;
    background: var(--bg-from);
    text-align: center;
    animation: none;
  }
}