:root {
  --auth-bg: #f4f7fd;
  --auth-panel: rgba(255, 255, 255, .9);
  --auth-panel-solid: #fff;
  --auth-line: rgba(83, 112, 166, .2);
  --auth-text: #10203b;
  --auth-muted: #586983;
  --auth-blue: #315fae;
  --auth-blue-dark: #254e96;
  --auth-blue-soft: #eaf2ff;
  --auth-green: #087c61;
  --auth-danger: #b82f4a;
  --auth-container: min(1180px, calc(100vw - 48px));
  --auth-shadow: 0 24px 70px rgba(43, 72, 123, .13);
  --auth-ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { background: var(--auth-bg); }
body.shield-page {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--auth-text);
  background:
    radial-gradient(circle 34rem at 83% 38%, rgba(255, 255, 255, .98) 0 28%, rgba(224, 234, 252, .8) 52%, transparent 75%),
    radial-gradient(ellipse 44rem 30rem at 12% 92%, rgba(216, 228, 249, .7), transparent 68%),
    linear-gradient(145deg, #fbfcff 0%, #f3f7ff 48%, #edf3fc 100%);
  font-family: "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.shield-page a { color: inherit; text-decoration: none; }
.shield-page button,
.shield-page input { font: inherit; }
.shield-page button { touch-action: manipulation; }
.shield-page img { display: block; max-width: 100%; }
.shield-page :focus-visible { outline: 3px solid rgba(49, 95, 174, .28); outline-offset: 3px; }

.shield-skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  z-index: 220;
  min-height: 44px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  color: #fff;
  background: #10203b;
  transform: translateY(-150%);
  transition: transform .2s ease;
}
.shield-skip-link:focus { transform: translateY(0); }

.shield-header { position: fixed; top: 16px; left: 0; right: 0; z-index: 70; }
.shield-nav {
  width: var(--auth-container);
  min-height: 66px;
  margin: auto;
  padding: 9px 10px 9px 16px;
  display: flex;
  align-items: center;
  gap: 28px;
  border: 1px solid rgba(76, 105, 157, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 28px rgba(52, 76, 122, .08);
  backdrop-filter: blur(22px) saturate(135%);
}
.shield-logo { min-height: 44px; display: flex; align-items: center; gap: 11px; min-width: max-content; font-weight: 850; }
.shield-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #1d3158, #315fae);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 16px rgba(49, 95, 174, .16);
  font-size: 16px;
  font-weight: 900;
}
.shield-logo-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.shield-links { margin: 0 auto; padding: 0; list-style: none; display: flex; align-items: center; gap: 28px; }
.shield-links a {
  position: relative;
  min-height: 44px;
  padding: 12px 0;
  display: inline-flex;
  align-items: center;
  color: #455671;
  font-size: 14px;
  transition: color .2s ease;
}
.shield-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--auth-blue);
  transition: right .2s ease;
}
.shield-links a:hover { color: #1b3565; }
.shield-links a:hover::after { right: 0; }
.shield-nav-actions { display: flex; align-items: center; gap: 8px; }
.shield-btn {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 780;
  cursor: pointer;
  transition: transform .2s var(--auth-ease), background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.shield-btn:hover { transform: translateY(-2px); }
.shield-btn:active { transform: translateY(0) scale(.985); }
.shield-btn:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.shield-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #376bc2, #2c58a5);
  box-shadow: 0 12px 24px rgba(49, 95, 174, .22);
}
.shield-btn-primary:hover { background: linear-gradient(135deg, #315fae, #244b8e); box-shadow: 0 15px 28px rgba(49, 95, 174, .27); }
.shield-btn-secondary { color: #263c65; border-color: rgba(75, 103, 153, .24); background: rgba(248, 250, 255, .9); }
.shield-btn-secondary:hover { border-color: rgba(49, 95, 174, .42); background: #fff; }
.shield-menu {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  color: #1f345a;
  background: transparent;
  cursor: pointer;
}
.shield-menu:hover { background: var(--auth-blue-soft); }

.shield-auth {
  position: relative;
  min-height: 100vh;
  padding-top: 104px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.shield-auth::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(50vw, 740px);
  aspect-ratio: 1;
  right: -7vw;
  top: 9vh;
  border: 1px solid rgba(73, 110, 177, .12);
  border-radius: 47% 53% 45% 55% / 58% 42% 58% 42%;
  background: linear-gradient(145deg, rgba(255, 255, 255, .55), rgba(194, 211, 243, .16));
  box-shadow: inset -38px -30px 70px rgba(105, 134, 190, .11);
  transform: rotate(-8deg);
  pointer-events: none;
}
.shield-auth::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 4vw;
  bottom: 8vh;
  width: 260px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(73, 104, 162, .3), transparent);
  pointer-events: none;
}
.shield-liquid-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .48; }
.shield-auth-main {
  position: relative;
  z-index: 1;
  width: var(--auth-container);
  margin: auto;
  padding: 50px 0 72px;
  display: grid;
  grid-template-columns: 1fr minmax(430px, 520px);
  gap: clamp(52px, 7vw, 104px);
  align-items: center;
}
.shield-kicker { display: inline-flex; align-items: center; gap: 9px; color: var(--auth-blue); font-weight: 800; font-size: 13px; }
.shield-kicker::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.shield-auth-copy h1 {
  max-width: 750px;
  margin: 18px 0 22px;
  font-size: clamp(46px, 5.35vw, 72px);
  line-height: 1.04;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.shield-auth-copy > p { max-width: 560px; margin: 0; color: #52627d; font-size: 17px; line-height: 1.8; }
.shield-auth-points { display: grid; gap: 13px; margin-top: 28px; }
.shield-auth-point { min-height: 32px; display: flex; align-items: center; gap: 12px; color: #334663; font-size: 14px; }
.shield-auth-point i { color: var(--auth-blue); }
.shield-form,
.shield-auth-card {
  padding: 34px;
  border: 1px solid rgba(75, 104, 157, .18);
  border-radius: 20px;
  background: var(--auth-panel);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(24px) saturate(125%);
}
.shield-auth-card h2 { margin: 0 0 7px; font-size: 29px; line-height: 1.25; letter-spacing: -.02em; }
.shield-auth-card > .shield-auth-sub { margin: 0 0 26px; color: #62718a; font-size: 14px; }
.shield-field { margin-bottom: 18px; }
.shield-field label { display: block; margin-bottom: 8px; color: #263958; font-size: 13px; font-weight: 780; }
.shield-input-wrap { position: relative; }
.shield-field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(82, 111, 163, .24);
  border-radius: 11px;
  outline: 0;
  color: #152540;
  background: rgba(249, 251, 255, .94);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.shield-field input::placeholder { color: #71809a; opacity: 1; }
.shield-field input:hover { border-color: rgba(67, 97, 153, .42); background: #fff; }
.shield-field input:focus { border-color: #5277bd; background: #fff; box-shadow: 0 0 0 4px rgba(82, 119, 189, .12); }
.shield-field input.error { border-color: var(--auth-danger); box-shadow: 0 0 0 4px rgba(184, 47, 74, .08); }
.error-msg { display: none; margin-top: 6px; color: var(--auth-danger); font-size: 12px; line-height: 1.5; }
.error-msg.show { display: block; }
.shield-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shield-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.shield-code-row .shield-btn { min-width: 118px; padding-inline: 16px; }
.shield-password-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: #60708c;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}
.shield-password-toggle:hover { color: var(--auth-blue); background: var(--auth-blue-soft); }
.shield-check {
  min-height: 44px;
  margin: 4px 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #55647e;
  font-size: 12px;
}
.shield-check input { width: 19px; height: 19px; flex: 0 0 auto; margin: 0; accent-color: var(--auth-blue); }
.shield-check a { min-height: 44px; display: inline-flex; align-items: center; color: var(--auth-blue-dark); font-weight: 700; }
.shield-auth-helper { margin: -6px 0 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #5e6c84; font-size: 12px; }
.shield-auth-helper a { min-height: 44px; display: inline-flex; align-items: center; color: var(--auth-blue-dark); font-weight: 700; }
.shield-auth-switch { margin-top: 19px; text-align: center; color: #5e6d86; font-size: 13px; }
.shield-auth-switch a { min-height: 44px; display: inline-flex; align-items: center; color: var(--auth-blue); font-weight: 800; }
.shield-auth-security { margin-top: 2px; padding-top: 16px; border-top: 1px solid var(--auth-line); display: flex; align-items: center; gap: 9px; color: #7b899f; font-size: 11px; }
.shield-auth-security i { color: var(--auth-green); }
.shield-auth-footer { position: relative; z-index: 1; margin-top: auto; padding: 18px 24px; border-top: 1px solid var(--auth-line); text-align: center; color: #64728a; font-size: 12px; }
.shield-auth-footer a { min-height: 44px; margin: 0 8px; display: inline-flex; align-items: center; }

.shield-register .shield-auth-main { grid-template-columns: .9fr minmax(520px, 600px); padding-top: 30px; }
.shield-register .shield-auth-card { padding: 28px 30px; }
.shield-register .shield-field { margin-bottom: 14px; }
.shield-register .shield-auth-copy h1 { font-size: clamp(43px, 4.75vw, 66px); }
.shield-onboarding { display: grid; gap: 15px; margin-top: 28px; }
.shield-onboarding-item { display: grid; grid-template-columns: 34px 1fr; gap: 13px; align-items: start; }
.shield-onboarding-item > span:first-child {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(49, 95, 174, .3);
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--auth-blue);
  background: rgba(255, 255, 255, .66);
  box-shadow: 0 8px 16px rgba(49, 95, 174, .06);
  font-size: 12px;
  font-weight: 800;
}
.shield-onboarding-item b { display: block; color: #2a3d5d; font-size: 14px; }
.shield-onboarding-item small { color: #62718a; }

.shield-toast-stack { position: fixed; right: 20px; top: 96px; z-index: 100; width: min(360px, calc(100vw - 40px)); display: grid; gap: 10px; }
.shield-toast {
  padding: 14px 16px;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  color: #1d2d49;
  background: #fff;
  box-shadow: 0 16px 36px rgba(47, 70, 111, .14);
}
.shield-toast.error { border-color: rgba(184, 47, 74, .35); }
.shield-toast.success { border-color: rgba(8, 124, 97, .35); }
.shield-loader { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: #f6f9ff; transition: opacity .35s ease, visibility .35s ease; }
.shield-loader.hidden { opacity: 0; visibility: hidden; }
.shield-loader-mark {
  position: relative;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(49, 95, 174, .18);
  border-radius: 50%;
  box-shadow: inset -8px -6px 16px rgba(92, 119, 170, .12);
  animation: auth-spin 1s linear infinite;
}
.shield-loader-mark::after { content: ""; position: absolute; inset: 8px; border-top: 2px solid var(--auth-blue); border-radius: 50%; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (max-width: 1040px) {
  :root { --auth-container: min(calc(100% - 32px), 920px); }
  .shield-links {
    position: absolute;
    top: 74px;
    left: 16px;
    right: 16px;
    padding: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    border: 1px solid var(--auth-line);
    border-radius: 15px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 40px rgba(47, 70, 111, .14);
  }
  .shield-links.open { display: flex; }
  .shield-links a { display: block; padding: 11px; border-radius: 9px; }
  .shield-links a:hover { background: var(--auth-blue-soft); }
  .shield-links a::after { display: none; }
  .shield-menu { display: grid; place-items: center; }
  .shield-auth-main,
  .shield-register .shield-auth-main { max-width: 720px; grid-template-columns: 1fr; }
  .shield-auth-copy { text-align: center; }
  .shield-auth-copy > p { margin-inline: auto; }
  .shield-auth-points,
  .shield-onboarding { max-width: 500px; margin-inline: auto; text-align: left; }
}

@media (max-width: 720px) {
  :root { --auth-container: calc(100% - 24px); }
  .shield-header { top: 8px; }
  .shield-nav { min-height: 58px; padding: 7px 8px 7px 10px; gap: 8px; border-radius: 15px; }
  .shield-logo { gap: 8px; font-size: 14px; }
  .shield-logo-mark { width: 34px; height: 34px; border-radius: 10px; }
  .shield-nav-actions { margin-left: auto; }
  .shield-nav-actions .shield-btn { min-height: 44px; padding: 0 13px; white-space: nowrap; font-size: 12px; }
  .shield-menu { width: 44px; height: 44px; }
  .shield-links { top: 68px; left: 10px; right: 10px; }
  .shield-auth { min-height: 100dvh; padding-top: 82px; }
  .shield-auth-main,
  .shield-register .shield-auth-main { gap: 30px; padding: 38px 0 46px; }
  .shield-auth-copy { display: none; }
  .shield-auth-card,
  .shield-register .shield-auth-card { padding: 25px 18px; border-radius: 18px; }
  .shield-auth-card h2 { font-size: 26px; }
  .shield-auth-card > .shield-auth-sub { margin-bottom: 24px; font-size: 14px; }
  .shield-form-row,
  .shield-register .shield-form-row { grid-template-columns: 1fr; gap: 0; }
  .shield-field { margin-bottom: 17px; }
  .shield-field label { font-size: 14px; }
  .shield-field input { min-height: 52px; font-size: 16px; }
  .shield-code-row { grid-template-columns: minmax(0, 1fr) 112px; }
  .shield-code-row .shield-btn { min-width: 0; padding-inline: 9px; font-size: 12px; }
  .shield-check { align-items: flex-start; font-size: 12px; }
  .shield-auth-security { line-height: 1.6; }
  .shield-auth::before { width: 140vw; right: -70vw; top: 6vh; opacity: .65; }
  .shield-toast-stack { top: 82px; right: 12px; width: calc(100vw - 24px); }
  .shield-auth-footer { padding: 15px 12px; line-height: 1.5; }
  .shield-auth-footer a { margin: 0 5px; }
}

@media (max-width: 370px) {
  .shield-nav-actions .shield-btn { display: none; }
  .shield-code-row { grid-template-columns: 1fr; }
  .shield-code-row .shield-btn { width: 100%; }
  .shield-auth-card,
  .shield-register .shield-auth-card { padding-inline: 16px; }
}

@media (max-height: 820px) and (min-width: 1041px) {
  .shield-auth-main { padding-top: 30px; padding-bottom: 38px; }
  .shield-auth-copy h1 { font-size: clamp(44px, 4.9vw, 64px); }
  .shield-auth-card { padding-top: 28px; padding-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
