:root {
  color-scheme: light;
  --ink: #15253b;
  --muted: #718096;
  --soft: #a1aec0;
  --line: #dfe7f0;
  --panel: rgba(255, 255, 255, .94);
  --blue: #2366d1;
  --blue-deep: #164ca7;
  --cyan: #45bfd5;
  --shadow: 0 28px 80px rgba(29, 54, 89, .13), 0 4px 16px rgba(29, 54, 89, .06);
  --ease-out: cubic-bezier(.22, .8, .26, .99);
  --ease-swift: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 14% 22%, rgba(135, 223, 227, .3), transparent 29%),
    radial-gradient(circle at 87% 78%, rgba(103, 151, 235, .22), transparent 34%),
    linear-gradient(135deg, #edf9f8 0%, #eef4fb 49%, #f8f9fd 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .3;
  background-image: linear-gradient(rgba(255,255,255,.36) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.36) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(120deg, black, transparent 70%);
}

/* 缓慢漂移的环境光晕，给静态背景一点呼吸感 */
body::after {
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(38% 30% at 22% 30%, rgba(69, 191, 213, .16), transparent 70%),
    radial-gradient(34% 28% at 80% 68%, rgba(35, 102, 209, .13), transparent 70%);
  animation: ambient-drift 26s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
  from { transform: translate3d(-1.6%, -1%, 0) scale(1); }
  to   { transform: translate3d(1.6%, 1.4%, 0) scale(1.04); }
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 520px);
  gap: clamp(44px, 7vw, 120px);
  align-items: center;
  width: min(1120px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 64px 0;
}

.login-brand { padding: 10px 0 10px 12px; }

/* —— 品牌区编排式入场：依次浮现 —— */
.login-brand > * {
  opacity: 0;
  transform: translateY(14px);
  animation: rise-in .72s var(--ease-out) forwards;
}
.login-brand > .brand-logo         { animation-delay: .05s; }
.login-brand > .brand-kicker       { animation-delay: .16s; }
.login-brand > h1                  { animation-delay: .26s; }
.login-brand > .brand-description  { animation-delay: .46s; }
.login-brand > .brand-capabilities { animation-delay: .58s; }
.login-brand > .brand-note         { animation-delay: .70s; }

@keyframes rise-in {
  to { opacity: 1; transform: translateY(0); }
}

.brand-logo {
  display: block;
  width: 52px;
  height: 52px;
  margin-bottom: 34px;
}

.brand-kicker, .panel-label {
  margin: 0;
  color: var(--blue);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .19em;
}

.brand-kicker { margin-bottom: 22px; }

.login-brand h1 {
  max-width: 570px;
  margin: 0;
  font-size: clamp(42px, 5.2vw, 72px);
  font-weight: 680;
  letter-spacing: -.065em;
  line-height: 1.09;
}

/* 逐行擦除式揭示 */
.login-brand h1 .line {
  display: block;
  clip-path: inset(0 0 101% 0);
  animation: line-reveal .8s var(--ease-swift) forwards;
}
.login-brand h1 .line:nth-child(1) { animation-delay: .34s; }
.login-brand h1 .line:nth-child(2) { animation-delay: .48s; }

@keyframes line-reveal {
  to { clip-path: inset(0 0 -8% 0); }
}

.login-brand h1 em { color: var(--blue); font-style: normal; }

.brand-description {
  max-width: 430px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.brand-capabilities {
  display: grid;
  gap: 2px;
  max-width: 470px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.brand-capabilities li {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: baseline;
  gap: 14px;
  padding: 11px 2px;
  border-top: 1px solid rgba(35, 102, 209, .12);
}
.brand-capabilities li:first-child { border-top: 0; }
.brand-capabilities strong { color: var(--ink); font-size: 14px; font-weight: 700; }
.brand-capabilities span { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.brand-capabilities em { color: var(--soft); font-size: 10px; font-style: normal; letter-spacing: .14em; white-space: nowrap; }

.brand-note {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
  padding: 10px 14px;
  border: 1px solid rgba(35, 102, 209, .15);
  border-radius: 999px;
  color: #4e6683;
  background: rgba(255, 255, 255, .5);
  font-size: 12px;
}

.note-dot, .status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #36b995;
  box-shadow: 0 0 0 4px rgba(54, 185, 149, .13);
}

/* 状态点呼吸脉冲 */
.note-dot::after, .status-dot::after {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(54, 185, 149, .55);
  content: "";
  animation: dot-pulse 2.4s ease-out infinite;
}

@keyframes dot-pulse {
  0%   { opacity: .9; transform: scale(.6); }
  70%  { opacity: 0;  transform: scale(1.9); }
  100% { opacity: 0;  transform: scale(1.9); }
}

/* —— 登录面板入场 —— */
.login-panel {
  position: relative;
  padding: 42px 44px 30px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(22px);
  animation: panel-in .78s var(--ease-out) .3s forwards;
}

@keyframes panel-in {
  to { opacity: 1; transform: translateY(0); }
}

.panel-topline, .field-heading, .captcha-header { display: flex; align-items: center; justify-content: space-between; }
.panel-status { display: inline-flex; align-items: center; gap: 8px; color: #708296; font-size: 11px; }
.login-panel h2 { margin: 44px 0 9px; font-size: 30px; letter-spacing: -.04em; }
.panel-description { margin: 0 0 34px; color: var(--muted); font-size: 14px; }

.field-heading { margin-top: 22px; }
.field-label { color: #41556e; font-size: 12px; font-weight: 700; }
.field-hint { color: var(--soft); font-size: 11px; }
.field-wrap { position: relative; margin-top: 9px; }
.field-icon { position: absolute; top: 50%; left: 17px; z-index: 1; color: #87a0bd; font-size: 16px; font-weight: 700; transform: translateY(-50%); transition: color .18s var(--ease-swift); }
.field-icon.lock { font-size: 23px; line-height: 1; transform: translateY(-53%) rotate(180deg); }
.field-wrap:focus-within .field-icon { color: var(--blue); }
input { width: 100%; height: 54px; padding: 0 48px; border: 1px solid var(--line); border-radius: 12px; outline: none; color: var(--ink); background: #fbfdff; font: inherit; font-size: 14px; transition: border-color .16s, box-shadow .16s, background .16s, transform .16s; }
input:focus { border-color: rgba(35, 102, 209, .65); background: #fff; box-shadow: 0 0 0 4px rgba(35, 102, 209, .1); }
input::placeholder { color: #a8b5c5; }
.reveal-button { position: absolute; top: 50%; right: 11px; padding: 7px; border: 0; border-radius: 7px; color: var(--blue); background: transparent; font: inherit; font-size: 11px; cursor: pointer; transform: translateY(-50%); transition: background .15s; }
.reveal-button:hover { background: rgba(35, 102, 209, .08); }

.captcha-area { margin-top: 25px; padding: 13px 15px; border: 1px dashed #cbd7e4; border-radius: 13px; background: #f8fbfe; transition: border-color .2s, background .2s; }
.captcha-area:has(.captcha-state.ready) { border-color: rgba(46, 159, 129, .4); background: #f4fbf8; }
.captcha-state { color: #7a8da3; font-size: 11px; transition: color .2s; }
.captcha-state.ready { color: #2e9f81; }
.captcha-state.error { color: #d35d5d; }
.captcha-element { min-height: 1px; }

.submit-button { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; height: 56px; margin-top: 24px; padding: 0 19px 0 22px; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(108deg, var(--blue-deep), var(--blue) 55%, #3d83e0); background-size: 180% 100%; background-position: 0% 0; box-shadow: 0 10px 24px rgba(35, 102, 209, .25); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: transform .16s, box-shadow .16s, opacity .16s, background-position .45s var(--ease-swift); }
.submit-button:hover { background-position: 92% 0; box-shadow: 0 13px 27px rgba(35, 102, 209, .33); transform: translateY(-1px); }
.submit-button:active { transform: translateY(0) scale(.99); }
.submit-button:disabled { cursor: wait; opacity: .65; transform: none; }
.submit-arrow { font-size: 22px; font-weight: 400; transition: transform .2s var(--ease-swift); }
.submit-button:hover .submit-arrow { transform: translateX(4px); }
.login-error { margin: 13px 1px 0; color: #c24f58; font-size: 12px; line-height: 1.5; }
.login-error:not([hidden]) { animation: rise-in .3s var(--ease-out); }
.security-caption { display: flex; gap: 7px; align-items: center; margin: 22px 0 0; color: #a3afbc; font-size: 10px; line-height: 1.5; }
.security-caption span { color: var(--cyan); }

:focus-visible { outline: 2px solid rgba(35, 102, 209, .55); outline-offset: 2px; }

@media (max-width: 840px) {
  .login-shell { grid-template-columns: 1fr; width: min(560px, calc(100% - 36px)); gap: 42px; padding: 42px 0; }
  .login-brand { padding-left: 0; }
  .brand-logo { width: 44px; height: 44px; margin-bottom: 24px; }
  .login-brand h1 { font-size: clamp(38px, 10vw, 58px); }
  .brand-capabilities li { grid-template-columns: 68px 1fr; }
  .brand-capabilities em { display: none; }
  .brand-note { margin-top: 24px; }
}

@media (max-width: 480px) {
  .login-shell { width: calc(100% - 24px); padding: 28px 0; }
  .login-panel { padding: 30px 22px 24px; border-radius: 22px; }
  .login-panel h2 { margin-top: 34px; font-size: 27px; }
  .brand-description { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .login-brand > *, .login-panel { opacity: 1; transform: none; animation: none; }
  .login-brand h1 .line { clip-path: none; animation: none; }
  .note-dot::after, .status-dot::after { animation: none; }
}
