/* The entrance, 2026-12-02: a dark page with a moving glow, a generated picture on the left and a glass card for the form.
   Every rule starts with .auth-body or .login-page so the site theme (loaded after this sheet) cannot undo it.
   Phones: logo, a strip of the picture, the form. All motion stops under prefers-reduced-motion. */
.auth-body { background: #04203f; color: #e8eefc; }
.auth-body .auth-main { max-width: none; width: 100%; padding: 0; }
.auth-body .messages { position: absolute; z-index: 6; top: max(14px, env(safe-area-inset-top)); left: 50%; width: min(92vw, 520px); margin: 0; transform: translateX(-50%); }

.login-page { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); min-height: 100vh; min-height: 100dvh; overflow: hidden;
  background: linear-gradient(160deg, #052549 0%, #041c39 55%, #03152c 100%); }
/* a faint grid, brightest behind the form */
.login-page::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(126,162,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(126,162,255,.07) 1px, transparent 1px); background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(60% 70% at 74% 50%, #000 0%, transparent 100%); mask-image: radial-gradient(60% 70% at 74% 50%, #000 0%, transparent 100%); }
.login-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.login-glow i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.login-glow i:nth-child(1) { width: 520px; height: 520px; right: -120px; top: -160px; background: #2f5fe6; animation: login-drift-a 18s ease-in-out infinite alternate; }
.login-glow i:nth-child(2) { width: 420px; height: 420px; right: 22%; bottom: -220px; background: #6b5cff; opacity: .4; animation: login-drift-b 22s ease-in-out infinite alternate; }
.login-glow i:nth-child(3) { width: 360px; height: 360px; left: 38%; top: 30%; background: #00d4ff; opacity: .16; animation: login-drift-a 26s ease-in-out infinite alternate-reverse; }
@keyframes login-drift-a { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-70px,60px,0) scale(1.15); } }
@keyframes login-drift-b { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(90px,-50px,0) scale(1.1); } }

/* ---------- left: the picture and the words ---------- */
.login-story { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 34px 52px 30px; overflow: hidden; }
.login-hero { position: absolute; inset: 0; z-index: -1; display: block; }
.login-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; display: block; transform-origin: 50% 80%; animation: login-breathe 16s ease-in-out infinite alternate;
  -webkit-mask-image: linear-gradient(90deg, #000 62%, transparent 100%); mask-image: linear-gradient(90deg, #000 62%, transparent 100%); }
@keyframes login-breathe { from { transform: scale(1); } to { transform: scale(1.045) translateY(-6px); } }
.login-sparks { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.login-sparks i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #bfe9ff; box-shadow: 0 0 12px 3px rgba(0,212,255,.55); opacity: 0; animation: login-twinkle 5s ease-in-out infinite; }
.login-sparks i:nth-child(1) { left: 16%; top: 52%; animation-delay: .2s; }
.login-sparks i:nth-child(2) { left: 78%; top: 44%; animation-delay: 1.4s; }
.login-sparks i:nth-child(3) { left: 60%; top: 70%; animation-delay: 2.6s; width: 3px; height: 3px; }
.login-sparks i:nth-child(4) { left: 30%; top: 84%; animation-delay: 3.3s; }
.login-sparks i:nth-child(5) { left: 88%; top: 62%; animation-delay: 4.1s; width: 3px; height: 3px; }
@keyframes login-twinkle { 0%, 100% { opacity: 0; transform: scale(.6); } 50% { opacity: .95; transform: scale(1.25); } }
.login-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.login-brand { display: inline-flex; border-radius: 8px; }
.login-brand img { width: 164px; height: auto; display: block; }
.login-header-label { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.78); font-size: 12px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.login-header-label .icon { width: 14px; height: 14px; }
.login-story-copy { margin-top: clamp(20px, 6vh, 64px); animation: login-rise .7s cubic-bezier(.2,.7,.2,1) both; }
.login-page .login-eyebrow { display: block; color: #8fb0ff; font-size: 11.5px; font-weight: 700; letter-spacing: 2.2px; line-height: 1.5; }
.login-story h2 { margin: 18px 0 14px; color: #fff; font-size: clamp(32px, 3.3vw, 46px); line-height: 1.32; letter-spacing: -1px; font-weight: 750; }
.login-story h2 em { font-style: normal; background: linear-gradient(90deg, #7ea2ff 0%, #5ee0ff 60%, #a9b8ff 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: login-shimmer 7s linear infinite alternate; }
@keyframes login-shimmer { from { background-position: 0 0; } to { background-position: 100% 0; } }
.login-story p { margin: 0; color: rgba(232,238,252,.78); font-size: 15px; line-height: 1.85; }
.login-points { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.login-points li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); font-size: 13px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.login-points .icon { width: 15px; height: 15px; color: #8fd8ff; }
.login-story-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 20px; color: rgba(232,238,252,.62); font-size: 12.5px; }
.login-story-number { font-size: 11px; letter-spacing: 1.4px; white-space: nowrap; }

/* ---------- right: the form ---------- */
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 40px 32px 0; }
.login-form-wrap { position: relative; width: 100%; max-width: 420px; margin: auto 0; padding: 36px 36px 30px; border: 1px solid rgba(255,255,255,.14); border-radius: 22px; background: rgba(255,255,255,.065);
  box-shadow: 0 30px 80px rgba(0,8,24,.45), inset 0 1px 0 rgba(255,255,255,.14); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); animation: login-rise .7s .08s cubic-bezier(.2,.7,.2,1) both; }
/* a slow light running round the card's edge */
@property --login-turn { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.login-form-wrap::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--login-turn), transparent 0 62%, rgba(126,162,255,.95) 76%, rgba(94,224,255,.95) 84%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: login-turn 9s linear infinite; }
@keyframes login-turn { to { --login-turn: 360deg; } }
@keyframes login-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.login-entry-icon { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-bottom: 20px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #2f5fe6, #6b5cff); box-shadow: 0 10px 26px rgba(47,95,230,.5), inset 0 1px 0 rgba(255,255,255,.3); }
.login-entry-icon .icon { width: 22px; height: 22px; }
.login-panel h1 { margin: 8px 0 8px; color: #fff; font-size: 27px; line-height: 1.35; letter-spacing: -.6px; font-weight: 750; }
.login-page .login-description { margin: 0 0 24px; color: rgba(232,238,252,.72); font-size: 14px; line-height: 1.7; }
.login-page .login-form .login-field { margin-bottom: 18px; }
.login-page .login-field label { display: block; margin-bottom: 8px; color: rgba(232,238,252,.92); font-size: 13.5px; font-weight: 600; }
.login-input-wrap { position: relative; }
.login-input-wrap > .icon { position: absolute; left: 15px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: rgba(200,214,245,.7); pointer-events: none; }
.login-page .login-form .login-input-wrap input { width: 100%; height: 52px; min-height: 52px; padding: 12px 15px 12px 44px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; background: rgba(4,24,50,.5); color: #fff; font-size: 16px; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); caret-color: #7ea2ff; transition: background .15s, border-color .15s, box-shadow .15s; }
.login-page .login-form .login-input-wrap:has([data-login-toggle]:not([hidden])) input { padding-right: 68px; }
.login-page .login-form .login-input-wrap input:hover { border-color: rgba(255,255,255,.32); }
.login-page .login-form .login-input-wrap input:focus { border-color: #7ea2ff; background: rgba(4,24,50,.72); outline: 0; box-shadow: 0 0 0 4px rgba(126,162,255,.24), 0 0 24px rgba(47,95,230,.35); }
/* a saved password fills the field: keep it dark instead of the browser's pale yellow */
.login-page .login-form .login-input-wrap input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 1000px #0a2a54 inset; box-shadow: 0 0 0 1000px #0a2a54 inset; caret-color: #fff; transition: background-color 9999s; }
.login-page .login-password-toggle { position: absolute; top: 4px; right: 4px; min-width: 54px; min-height: 44px; padding: 8px; border: 0; border-radius: 9px; background: transparent; color: #a9c1ff; font-size: 13px; font-weight: 600; cursor: pointer; }
.login-page .login-password-toggle[hidden] { display: none; }
.login-page .login-password-toggle:hover { background: rgba(255,255,255,.1); color: #fff; }
.login-page :is(button, a):focus-visible { outline: 2px solid #9db8ff; outline-offset: 3px; }
.login-account-help { margin: -2px 0 20px; color: rgba(232,238,252,.6); font-size: 12.5px; line-height: 1.7; }
.login-page .login-submit { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; min-height: 52px; overflow: hidden; border: 0; border-radius: 12px; color: #fff; font-size: 15px; font-weight: 650; cursor: pointer;
  background: linear-gradient(90deg, #2f5fe6 0%, #6b5cff 50%, #22b8ee 100%); background-size: 200% 100%; box-shadow: 0 12px 30px rgba(47,95,230,.5), inset 0 1px 0 rgba(255,255,255,.25); transition: background-position .5s ease, box-shadow .2s, transform .1s; }
.login-page .login-submit:hover { background-position: 100% 0; box-shadow: 0 16px 40px rgba(72,110,255,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.login-page .login-submit:active { transform: translateY(1px); }
.login-page .login-submit::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: login-shine 4.5s ease-in-out infinite; }
@keyframes login-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.login-page .login-submit .icon { width: 18px; height: 18px; transition: transform .2s; }
.login-page .login-submit:hover .icon { transform: translateX(4px); }
.login-page .login-submit[disabled] { opacity: .7; }
.login-help { margin: 18px 0 20px; color: rgba(232,238,252,.6); font-size: 12.5px; text-align: center; line-height: 1.8; }
.login-help span { color: rgba(232,238,252,.86); }
.login-page .ia-login-entry { margin: 0 0 20px; border: 1px dashed rgba(255,255,255,.28); background: rgba(255,255,255,.05); color: #fff; }
.login-security-note { display: flex; align-items: center; gap: 11px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.login-security-note > .icon { width: 21px; height: 21px; flex: none; color: #8fd8ff; }
.login-security-note b { display: block; margin-bottom: 3px; color: rgba(255,255,255,.92); font-size: 13px; font-weight: 600; }
.login-security-note span { display: block; color: rgba(232,238,252,.62); font-size: 12px; line-height: 1.6; }
.login-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 420px; min-height: 64px; color: rgba(232,238,252,.5); font-size: 11.5px; }
.login-footer > span:first-child { letter-spacing: 1.5px; }
.login-footer i { padding: 0 7px; font-style: normal; opacity: .6; }
.login-page .login-form .form-errors { margin-bottom: 18px; padding: 11px 14px; border: 1px solid rgba(255,128,150,.45); border-radius: 10px; background: rgba(255,82,110,.14); color: #ffd9e0; font-size: 13px; line-height: 1.7; }
.login-page .login-form .form-errors ul, .login-page .login-form .errorlist { margin: 0; padding: 0; list-style: none; }
.login-page .login-form .field-error input { border-color: #ff8096; }
.login-page .login-form .errorlist { margin-top: 6px; color: #ffb3c0; font-size: 12.5px; line-height: 1.7; }

@media (min-width: 801px) and (max-height: 760px) {
  .login-story { padding-top: 22px; padding-bottom: 20px; }
  .login-story-copy { margin-top: 22px; }
  .login-panel { padding-top: 18px; }
  .login-form-wrap { padding: 26px 32px 22px; }
  .login-entry-icon { display: none; }
  .login-page .login-description { margin-bottom: 16px; }
  .login-page .login-form .login-field { margin-bottom: 14px; }
  .login-help { margin: 14px 0; }
  .login-footer { min-height: 50px; }
}
@media (max-width: 1100px) and (min-width: 801px) {
  .login-story { padding-left: 32px; padding-right: 32px; }
  .login-story-number, .login-header-label { display: none; }
  .login-form-wrap { padding: 30px 26px 26px; }
}

/* ---------- phones: logo, a strip of the picture, the form ---------- */
@media (max-width: 800px) {
  .login-page { display: flex; flex-direction: column; padding: max(18px, env(safe-area-inset-top)) 0 env(safe-area-inset-bottom); }
  .login-page::before { -webkit-mask-image: radial-gradient(90% 60% at 50% 70%, #000 0%, transparent 100%); mask-image: radial-gradient(90% 60% at 50% 70%, #000 0%, transparent 100%); }
  .login-glow i:nth-child(1) { width: 320px; height: 320px; right: -120px; top: -120px; }
  .login-glow i:nth-child(2) { width: 300px; height: 300px; right: auto; left: -140px; bottom: 6%; }
  .login-glow i:nth-child(3) { display: none; }
  .login-story { flex: none; padding: 0 20px; overflow: visible; }
  .login-header { order: 1; justify-content: center; min-height: 52px; }
  .login-hero { order: 2; }
  .login-brand img { width: 150px; }
  .login-header-label, .login-story-copy, .login-story-bottom, .login-sparks { display: none; }
  .login-hero { position: relative; inset: auto; z-index: 0; height: clamp(150px, 26dvh, 230px); margin: 2px -20px -34px; }
  .login-hero img { object-position: 50% 62%; animation: login-float 7s ease-in-out infinite alternate;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 26%, #000 66%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 26%, #000 66%, transparent 100%); }
  .login-panel { position: relative; flex: 1; justify-content: flex-start; padding: 0 16px; }
  .login-form-wrap { max-width: 460px; margin: 0; padding: 24px 20px 20px; border-radius: 20px; background: rgba(8,32,66,.72); }
  .login-entry-icon, .login-panel .login-eyebrow { display: none; }
  .login-panel h1 { margin-top: 0; font-size: 23px; text-align: center; }
  .login-page .login-description { margin-bottom: 20px; text-align: center; }
  .login-security-note { display: none; }
  .login-help { margin-bottom: 4px; }
  .login-page .ia-login-entry { margin: 14px 0 0; }
  .login-footer { justify-content: center; max-width: 460px; min-height: 54px; margin-top: auto; font-size: 11px; }
  .login-footer > span:first-child { display: none; }
}
@keyframes login-float { from { transform: translateY(0) scale(1.02); } to { transform: translateY(-8px) scale(1.05); } }
@media (max-width: 800px) and (max-height: 640px) { .login-hero { height: 110px; margin-bottom: -26px; } .login-page .login-description { display: none; } .login-panel h1 { margin-bottom: 14px; } }
@media (max-width: 360px) { .login-form-wrap { padding: 20px 16px 18px; } .login-panel { padding: 0 12px; } }

@media (prefers-reduced-motion: reduce) {
  .login-page *, .login-page *::before, .login-page *::after { animation: none !important; transition: none !important; }
}

/* 中文 / EN on the entrance */
.login-header .lang-switch { margin-left: 10px; }
.login-header .login-header-label { margin-left: auto; }
@media (max-width: 1100px) and (min-width: 801px) { .login-header .lang-switch { margin-left: auto; } }
@media (max-width: 800px) { .login-header { position: relative; } .login-header .lang-switch { position: absolute; right: 0; top: 50%; transform: translateY(-50%); } .login-header .lang-switch button { min-width: 34px; padding: 1px 7px; } .login-brand img { width: 132px; } .login-header { justify-content: flex-start; } }
