:root {
  color-scheme: light;
  --ink: #243b32;
  --muted: #64756b;
  --green: #28634d;
  --line: #dce4dc;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #f4f6f2;
  color: var(--ink);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, p { margin: 0; }
.login-header {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.brand { color: var(--ink); font-size: 30px; font-weight: 750; letter-spacing: -1.5px; text-decoration: none; }
.brand span { font-weight: 450; }
.brand-note { color: var(--muted); font-size: 12px; border-left: 1px solid #ccd7cb; padding-left: 22px; }
main { flex: 1; display: grid; align-items: center; padding: 24px 40px 40px; }
.login-layout {
  width: min(480px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 64px #243b3209;
}
.login-panel { padding: 42px 44px 46px; }
.login-content { width: 100%; }
.login-mark { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 20px; border: 1px solid #dce7d8; border-radius: 12px; background: #f1f6ed; color: var(--green); }
svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
h1 { font-size: 27px; line-height: 1.5; font-weight: 600; letter-spacing: -.5px; text-align: center; }
.login-help { color: var(--muted); font-size: 13px; margin-top: 9px; text-align: center; }
form { margin-top: 27px; }
label { display: block; margin: 19px 0 8px; font-size: 13px; font-weight: 600; }
input, button { font: inherit; color: inherit; }
input:not([type=hidden]) {
  display: block;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 11px 14px;
  border: 1px solid #cdd8cc;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #89948c; opacity: 1; font-size: 13px; }
input:not([type=hidden]):focus { outline: none; border-color: #609173; box-shadow: 0 0 0 3px #28634d14; }
a:focus-visible, button:focus-visible { outline: 3px solid #86ad90; outline-offset: 3px; }
.password-field { position: relative; }
.password-field input { padding-right: 74px; }
#password-toggle { position: absolute; right: 4px; top: 4px; height: 40px; width: 60px; border: 0; border-radius: 5px; background: transparent; color: var(--green); font-size: 12px; cursor: pointer; }
#password-toggle:hover { background: #eff4ec; }
.login-submit { width: 100%; height: 49px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--green); border-radius: 8px; background: var(--green); color: #fff; font-size: 14px; font-weight: 550; cursor: pointer; margin-top: 27px; transition: background .15s; }
.login-submit svg { width: 17px; height: 17px; }
.login-submit:hover { background: #1e4f3c; }
.login-submit:disabled { background: #4e7561; border-color: #4e7561; cursor: wait; }
.login-error { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; margin-top: 20px; border: 1px solid #edcec5; border-radius: 8px; background: #fff5f1; color: #913e32; font-size: 13px; overflow-wrap: anywhere; }
.login-error > span { border: 1px solid currentColor; border-radius: 50%; width: 17px; height: 17px; flex: 0 0 17px; font-size: 11px; font-weight: 600; display: grid; place-items: center; line-height: 1; margin-top: 2px; }
footer { display: flex; gap: 10px; justify-content: center; align-items: center; color: #748078; font-size: 11px; padding: 0 20px 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 720px) {
  .login-header { width: min(520px, 100%); padding: 22px 24px 12px; gap: 17px; }
  .brand { font-size: 28px; }
  .brand-note { font-size: 10px; padding-left: 17px; }
  main { padding: 24px 20px 32px; }
  .login-layout { border-radius: 16px; }
  .login-panel { padding: 30px 28px 32px; }
  h1 { font-size: 24px; }
  form { margin-top: 23px; }
  input:not([type=hidden]) { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  input, .login-submit { transition: none; }
}
