:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #304835;
  background: #f7f6f0;
}
* { box-sizing: border-box; }
body.login-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(32px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.login-layout {
  width: 100%;
  max-width: 940px;
  margin-block: auto;
  border: 1px solid #dfe5d6;
  border-radius: 24px;
  background: #fffefa;
  box-shadow: 0 18px 60px #34412b07;
  overflow: hidden;
  flex-shrink: 0;
}
.login-header {
  min-height: 80px;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e8ecdf;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  border-radius: 11px;
  background: #3e5842;
  color: #fffefa;
  font: 29px/1 "Kaiti SC", "KaiTi", serif;
}
.brand-name { font: 23px/1.3 "Noto Serif CJK SC", "Songti SC", serif; letter-spacing: 3px; }
.login-header .login-language {
  position: static;
  border: 0;
  background: transparent;
  padding: 5px 0 5px 8px;
  gap: 8px;
  font-size: 12px;
}
.login-content { display: grid; grid-template-columns: 1fr 1fr; min-height: 470px; }
.login-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: linear-gradient(150deg, #edf2e6, #f3f4ec);
  border-right: 1px solid #e6ebdc;
  color: #536b50;
}
.login-landscape { width: 100%; max-width: 310px; height: auto; display: block; }
.welcome-copy { margin: 12px 0 16px; text-align: center; }
.welcome-copy>span { display: block; font-size: 14px; letter-spacing: 4px; color: #7d9072; }
.welcome-copy strong {
  display: block;
  margin-top: 12px;
  font: 30px/1.5 "Noto Serif CJK SC", "Songti SC", serif;
  font-weight: 400;
  letter-spacing: 3px;
}
.login-card { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 40px 48px; }
.login-form-wrap { width: 100%; max-width: 340px; }
h1 { margin: 0 0 28px; font-size: 27px; line-height: 1.4; font-weight: 500; letter-spacing: .5px; }
.field+.field { margin-top: 22px; }
label { display: block; font-size: 14px; line-height: 1.5; margin-bottom: 8px; color: #56694e; }
input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid #d4ddca;
  border-radius: 10px;
  background: #fbfcf7;
  color: #304835;
  font-size: 16px;
  line-height: 1.5;
  transition: border-color .15s, background-color .15s;
}
input:hover { border-color: #aaba9b; }
input:focus { border-color: #6e885e; background: #fffefa; outline: 3px solid #8fa27f24; outline-offset: 1px; }
input:autofill { box-shadow: 0 0 0 1000px #f0f4e9 inset; color: #304835; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #f0f4e9 inset; -webkit-text-fill-color: #304835; caret-color: #304835; }
.password-field { position: relative; }
.password-field input { padding-right: 56px; }
#toggle-password {
  display: grid;
  place-items: center;
  position: absolute;
  right: 4px;
  top: 4px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #7a8e6d;
  cursor: pointer;
}
#toggle-password:hover { color: #3e5842; background: #e9efdf; }
.password-eye { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.password-eye-slash { display: none; }
#toggle-password[aria-pressed=true] .password-eye-slash { display: block; }
#login-error { margin: 0; color: #a34c35; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
#login-error:not(:empty) { margin-top: 12px; }
.submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  width: 100%;
  margin-top: 24px;
  padding: 12px 48px;
  border: 1px solid #3e5842;
  border-radius: 10px;
  background: #3e5842;
  color: #fffefa;
  font-size: 16px;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color .15s;
}
.submit:hover { background: #324c36; }
.submit:disabled { opacity: .65; cursor: progress; }
.submit-arrow { position: absolute; right: 16px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.submit:disabled .submit-arrow { visibility: hidden; }
button:focus-visible { outline: 2px solid #ad6549; outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  .login-layout { max-width: 580px; }
  .login-content { grid-template-columns: minmax(0,1fr); min-height: 0; }
  .login-welcome { display: grid; grid-template-columns: 156px 1fr; gap: 18px; padding: 18px 36px; border-right: 0; border-bottom: 1px solid #e6ebdc; }
  .welcome-copy { margin: 0; text-align: left; }
  .welcome-copy strong { font-size: 27px; letter-spacing: 2px; margin-top: 8px; }
  .login-card { padding: 30px 40px 36px; }
  .login-form-wrap { max-width: 380px; }
}
@media (max-width: 500px) {
  body.login-page { padding: max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); }
  .login-layout { border-radius: 18px; }
  .login-header { min-height: 72px; padding: 14px 20px; gap: 12px; }
  .brand { gap: 9px; }
  .brand-mark { width: 33px; height: 36px; font-size: 26px; border-radius: 9px; }
  .brand-name { font-size: 21px; letter-spacing: 2px; }
  .login-header .login-language { font-size: 11px; gap: 6px; padding-left: 0; }
  .login-welcome { grid-template-columns: 108px minmax(0,1fr); padding: 16px 20px; gap: 14px; }
  .welcome-copy>span { font-size: 12px; letter-spacing: 3px; }
  .welcome-copy strong { font-size: 22px; margin-top: 7px; letter-spacing: 1px; white-space: nowrap; }
  .login-card { padding: 24px 24px 28px; }
  h1 { font-size: 25px; margin-bottom: 22px; }
  .field+.field { margin-top: 18px; }
}
@media (max-width: 360px) {
  .login-header { padding-inline: 16px; }
  .login-welcome { grid-template-columns: 82px minmax(0,1fr); gap: 12px; padding-inline: 16px; }
  .welcome-copy strong { font-size: 20px; }
  .login-card { padding-inline: 20px; }
}
@media (max-height: 600px) {
  body.login-page { padding-block: max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-bottom)); }
  .login-content { min-height: 0; }
  .login-card { padding-block: 22px 26px; }
  .login-welcome { padding-block: 20px; }
}
@media (max-height: 600px) and (max-width: 900px) { .login-welcome { display: none; } }
@media (prefers-reduced-motion: reduce) { input, .submit { transition: none; } }
