/* 登录页 2026-11-27：浅灰背景 + 白色质感卡片，品牌行与页签居中 */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #f7f8fa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
               "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  color: #1f2329;
  -webkit-font-smoothing: antialiased;
}

/* 背景层：两团很淡的品牌色光晕，不抢卡片 */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(520px 400px at 12% 16%, rgba(47, 139, 255, .07), transparent 68%),
    radial-gradient(480px 420px at 88% 84%, rgba(47, 139, 255, .06), transparent 66%);
  pointer-events: none;
}

.login-stage {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 96px;
  overflow: hidden;
}

/* ---------- 漂浮装饰点（浅底回归柔和蓝灰） ---------- */
.deco { position: absolute; inset: 0; pointer-events: none; }

.deco-halo {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(174, 196, 224, .4) 0%, rgba(174, 196, 224, 0) 70%);
  animation: haloFloat 9s ease-in-out infinite;
}
.deco-dot {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(160deg, #b9cbe0, #8fa9c6);
  animation: dotFloat 7s ease-in-out infinite;
}
.deco-halo-a { width: 210px; height: 210px; left: 6%; top: 12%; animation-delay: -1.2s; }
.deco-dot-a  { width: 56px; height: 56px; left: calc(6% + 64px); top: calc(12% + 58px); opacity: .5; }
.deco-halo-b { width: 120px; height: 120px; left: 16%; top: 58%; animation-delay: -3.4s; }
.deco-dot-b  { width: 34px; height: 34px; left: calc(16% + 44px); top: calc(58% + 42px); opacity: .4; animation-delay: -2s; }
.deco-link {
  position: absolute; left: calc(6% + 40px); top: calc(12% + 92px); width: 160px; height: 1px;
  background: linear-gradient(90deg, rgba(143, 169, 198, .5), rgba(143, 169, 198, 0));
  transform: rotate(24deg); transform-origin: left center;
}
.deco-halo-c { width: 170px; height: 170px; right: 5%; top: 16%; animation-delay: -5s; }
.deco-dot-c  { width: 28px; height: 28px; right: calc(5% + 70px); top: calc(16% + 84px); opacity: .42; animation-delay: -4s; }
.deco-link-b {
  position: absolute; right: calc(5% + 28px); top: calc(16% + 38px); width: 200px; height: 1px;
  background: linear-gradient(90deg, rgba(143, 169, 198, 0), rgba(143, 169, 198, .45));
  transform: rotate(-32deg);
}
.deco-dot-d  { width: 22px; height: 22px; left: 9%; bottom: 14%; opacity: .34; animation-delay: -6s; }

@keyframes haloFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(10px, -14px) scale(1.06); }
}
@keyframes dotFloat {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-8px, 10px); }
}

/* ---------- 登录卡片 ---------- */
.login-panel {
  position: relative;
  width: 412px;
  padding: 42px 40px 38px;
  background: rgba(255, 255, 255, .96);
  border-radius: 18px;
  box-shadow:
    0 20px 48px rgba(30, 50, 90, .14),
    0 4px 12px rgba(30, 50, 90, .08),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  animation: panelIn .5s cubic-bezier(.22, .8, .34, 1) both;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* 品牌行整体居中 */
.brand-row { display: flex; align-items: center; justify-content: center; gap: 13px; text-align: center; }
/* 品牌 logo：用荀草物联云朵图形（透明底 PNG），不再套色块 */
.brand-logo {
  width: 74px; flex: none; display: inline-flex;
}
.brand-logo img { width: 100%; height: auto; display: block; }
.brand-text h1 {
  margin: 0; font-size: 25px; line-height: 1.25; font-weight: 700;
  letter-spacing: .5px; color: #101828;
}
/* 副标题独立成行：相对整个品牌行（logo+标题）居中；
   letter-spacing 会在末字后多出 2.5px，加同量缩进抵消保证视觉居中 */
.brand-sub {
  margin: 5px 0 0; font-size: 12px; color: #93a0b2;
  letter-spacing: 2.5px; text-indent: 2.5px;
  text-align: center;
}

/* 页签居中 */
.login-tabs { margin: 30px 0 22px; border-bottom: 1px solid #eef1f6; display: flex; justify-content: center; }
.login-tabs .tab {
  display: inline-block; padding: 0 2px 11px; font-size: 15px; color: #5a6472;
  position: relative;
}
.login-tabs .tab.is-active { color: #1668dc; font-weight: 600; }
.login-tabs .tab.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #2f8bff, #1668dc);
}

.login-error {
  display: flex; align-items: center; gap: 6px;
  margin: -4px 0 14px; padding: 10px 12px;
  background: #fff2f0; border: 1px solid #ffd6d1; border-radius: 8px;
  color: #d4380d; font-size: 13px;
}
.err-dot { width: 6px; height: 6px; border-radius: 50%; background: #f0453a; flex: none; }

/* ---------- 表单 ---------- */
.field { position: relative; margin-bottom: 16px; }
.field-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #9aa6b6; display: inline-flex; pointer-events: none;
  transition: color .15s;
}
.field input {
  width: 100%; height: 48px; padding: 0 14px 0 40px;
  border: 1px solid #e2e7ef; border-radius: 10px; background: #f6f8fb;
  font-size: 14px; color: #1f2329; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input::placeholder { color: #a9b3c2; }
.field input:hover { border-color: #c9d3e0; background: #f3f6fa; }
.field input:focus {
  border-color: #2f8bff; background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 139, 255, .14);
}
.field input:focus + .field-icon, .field:focus-within .field-icon { color: #2f8bff; }

.captcha-row { display: flex; gap: 10px; margin-bottom: 16px; }
.captcha-row .field { flex: 1; margin-bottom: 0; min-width: 0; }
.captcha-img {
  width: 138px; height: 48px; border-radius: 10px; border: 1px solid #e2e7ef;
  cursor: pointer; flex: none; background: #f6f8fb;
  transition: box-shadow .15s, transform .15s;
}
.captcha-img:hover { box-shadow: 0 2px 10px rgba(22, 119, 255, .18); transform: translateY(-1px); }

.auto-login {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: #5a6472; cursor: pointer; margin-bottom: 24px;
  user-select: none;
}
.auto-login input { width: 15px; height: 15px; accent-color: #1668dc; cursor: pointer; }

.submit {
  width: 100%; height: 48px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, #2f8bff 0%, #1668dc 100%);
  color: #fff; font-size: 15.5px; letter-spacing: 6px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(22, 119, 255, .34), inset 0 1px 0 rgba(255,255,255,.18);
  transition: filter .15s, transform .15s, box-shadow .15s;
}
.submit:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 24px rgba(22, 119, 255, .42);
  transform: translateY(-1px);
}
.submit:active { filter: brightness(.95); transform: translateY(1px); box-shadow: 0 4px 10px rgba(22, 119, 255, .3); }

/* ---------- 页脚（浅底用灰字） ---------- */
.login-footer {
  position: absolute; left: 0; right: 0; bottom: 30px;
  text-align: center; pointer-events: auto;
}
.login-links {
  display: flex; justify-content: center; gap: 30px; margin-bottom: 10px;
}
.login-links a { color: #8a93a0; font-size: 12.5px; }
.login-links a:hover { color: #1668dc; }
.login-copy { margin: 0; font-size: 12px; color: #b3bbc5; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .login-stage { justify-content: center; padding: 36px 16px 90px; }
  .deco-halo-b, .deco-dot-b, .deco-link, .deco-link-b,
  .deco-dot-c, .deco-halo-c, .deco-dot-d { display: none; }
  .login-panel { width: 100%; max-width: 412px; padding: 34px 26px 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .deco-halo, .deco-dot, .login-panel { animation: none; }
}
