/* Login-only styles; authenticated console surfaces keep their own theme. */
.login-shell {
  color-scheme: light;
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  font: 14px/1.6 "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  font-synthesis: none;
  background: linear-gradient(180deg, #0863e5 0%, #1488fa 24%, #39a8fa 49%, #5fc4fa 74%, #88d9fa 100%);
}
.login-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(76vw, 1080px);
  height: min(76vw, 1080px);
  left: -12%;
  top: 50%;
  transform: translateY(-48%) rotate(-12deg);
  background: linear-gradient(145deg, #ffffff1f, #1051ae14);
  mask: url('./wanyu-favicon.svg') center / contain no-repeat;
  pointer-events: none;
}
.login-shell button, .login-shell input { font: inherit; -webkit-tap-highlight-color: transparent; }
.login-shell button { cursor: pointer; }
.login-shell :focus-visible { outline: 3px solid #3980ed; outline-offset: 3px; }
.lgn-layout { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.lgn-brand { display: flex; flex-direction: column; min-width: 0; padding: 34px clamp(28px, 5vw, 80px) 26px; }
.lgn-header { display: flex; align-items: center; }
/* Keep the original full-color logo legible on the new blue canvas. */
.lgn-logo { display: block; width: 123px; height: 40px; box-sizing: content-box; padding: 9px 13px; background: #fff; border-radius: 12px; }
.lgn-story-content { width: 100%; max-width: 510px; margin: auto; padding: 42px 0; }
.lgn-eyebrow { display: inline-flex; padding: 7px 11px; border: 1px solid #ffffff3b; border-radius: 6px; background: #ffffff16; font-size: 12px; color: #fff; line-height: 1.4; }
.lgn-brand h1 { margin: 21px 0 20px; font-family: inherit; font-size: clamp(32px, 3.2vw, 46px); font-weight: 600; line-height: 1.42; letter-spacing: 0; color: #fff; }
.lgn-brand-description { margin: 0 0 0 1px; padding-left: 12px; border-left: 2px solid #ffffff52; color: #fff; font-size: 13px; line-height: 1.9; }
.lgn-team-art { position: relative; margin: 20px 0 0; transform: translateX(-35px); }
.lgn-team-art img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: contain; object-position: center top; }
.lgn-team-art figcaption { margin-top: 12px; color: #244b73; font-size: 11px; letter-spacing: 1px; text-align: center; }
.lgn-story-footer { font-size: 11px; letter-spacing: .5px; color: #244b73; }
.lgn-panel { min-width: 0; display: flex; flex-direction: column; gap: 28px; padding: 43px clamp(28px, 5vw, 80px) 28px 24px; }
.lgn-login-card { width: 100%; max-width: 460px; margin: auto; padding: 38px 42px; background: #fff; border: 1px solid #ffffffe6; border-radius: 20px; color: #252b35; box-shadow: 0 28px 75px -20px #28679633, 0 4px 16px #2867960a; }
.lgn-form-kicker { font-size: 12px; color: #2870db; }
.lgn-login-card h2 { margin: 13px 0 12px; font-size: 28px; font-weight: 600; line-height: 1.45; letter-spacing: 0; color: #232933; }
.lgn-subtitle { margin: 0 0 28px; font-size: 13px; color: #687586; }
.lgn-form-field { margin-top: 24px; }
.lgn-form-field label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 500; color: #34445c; }
.lgn-input-wrap { position: relative; }
.lgn-input-wrap input { width: 100%; min-width: 0; height: 54px; border: 1px solid #e0e7f0; border-radius: 12px; background: #f6f8fc; padding: 0 16px 0 46px; color: #21344f; font-size: 14px; box-shadow: inset 0 1px 2px #1b375c06; transition: border-color .18s, background-color .18s, box-shadow .18s; }
.lgn-input-wrap input[name=password] { padding-right: 52px; }
.lgn-input-wrap input::placeholder { color: #738198; font-size: 13px; }
.lgn-input-wrap input:hover { border-color: #bacce2; background-color: #f9fbff; }
.lgn-input-wrap input:focus { outline: none; border-color: #4a88f2; background-color: #fff; box-shadow: 0 0 0 3px #3276ef1a; }
.lgn-input-wrap input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #f6f8fc inset; -webkit-text-fill-color: #21344f; }
.lgn-input-icon { position: absolute; width: 19px; height: 19px; left: 17px; top: 17px; color: #8192aa; pointer-events: none; }
.lgn-eye { position: absolute; right: 5px; top: 5px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; color: #6c7e97; background: transparent; }
.lgn-eye svg { width: 19px; height: 19px; }
.lgn-eye:hover { color: #276bea; background: #eaf1fc; }
.lgn-eye-slash { display: none; }
.lgn-eye[aria-pressed=true] .lgn-eye-slash { display: block; }
.lgn-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin: 9px 0 19px; }
.lgn-options > span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #687586; }
.lgn-options button { min-height: 44px; padding: 0; border: 0; background: transparent; color: #52719b; font-size: 12px; }
.lgn-options button:hover { color: #246bf0; }
.lgn-help { margin: 0 0 16px; padding: 12px; border: 1px solid #e1eaf8; border-radius: 10px; background: #f4f8ff; color: #4f698c; font-size: 12px; }
.lgn-submit { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 52px; padding: 0 20px; border: 0; border-radius: 12px; background: linear-gradient(110deg, #2464ee, #317dfa); color: #fff; font-weight: 500; box-shadow: 0 7px 18px -6px #2464ee6b; }
.lgn-submit:hover { background: linear-gradient(110deg, #1b58dc, #266fee); }
.lgn-submit:disabled { opacity: .7; cursor: wait; }
.lgn-submit:disabled svg { display: none; }
.login-shell #loginError:not(:empty) { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; }
.lgn-input-wrap input[aria-invalid=true] { border-color: #d97c83; background-color: #fffafb; }
.lgn-input-wrap input[aria-invalid=true]:focus { box-shadow: 0 0 0 3px #c7515e17; }
.lgn-field-error { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: #b54b58; }
.lgn-copyright { text-align: center; font-size: 11px; color: #244b73; }
@media (min-width: 851px) and (max-height: 780px) {
  .lgn-story-content { padding: 26px 0; }
  .lgn-brand h1 { margin-top: 17px; margin-bottom: 16px; }
  .lgn-team-art { margin-top: 16px; }
  .lgn-team-art img { max-height: 280px; }
  .lgn-panel { padding-top: 28px; gap: 18px; }
  .lgn-login-card { padding: 28px 36px; }
}
@media (max-width: 1000px) {
  .lgn-brand { padding: 28px; }
  .lgn-panel { padding: 34px 28px 24px 12px; }
  .lgn-login-card { padding: 30px 25px; }
  .lgn-brand h1 { font-size: 32px; }
  .lgn-login-card h2 { font-size: 25px; }
  .lgn-team-art { transform: none; }
}
@media (max-width: 700px) {
  .lgn-layout { display: flex; flex-direction: column; }
  .lgn-brand { padding: 22px 24px 0; }
  .lgn-story-content, .lgn-story-footer { display: none; }
  .lgn-panel { flex: 1; padding: 24px 20px; gap: 24px; }
  .lgn-login-card { padding: 30px 24px; }
  .lgn-input-wrap input { font-size: 16px; }
  .login-shell::before { width: 125vw; height: 125vw; left: -38%; top: 38%; }
}
@media (prefers-reduced-motion: reduce) { .login-shell input { transition: none; } }
