:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  color: #26364a;
  background: #f3f5f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #26364a;
  --navy: #17283e;
  --teal: #087f80;
  --muted: #5d6c7d;
  --line: #e1e7ed;
  --canvas: #f3f5f7;
  --red: #b83e48;
  --shadow: 0 2px 10px rgb(29 48 69 / 5%), 0 1px 2px rgb(29 48 69 / 4%);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); font-size: 14px; line-height: 1.6; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
h1, h2, p, dl, dd { margin: 0; }

.topbar { min-height: 62px; padding: 14px max(24px, calc((100vw - 1000px) / 2)); display: flex; align-items: center; background: var(--navy); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 42px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgb(255 255 255 / 28%); border-radius: 10px; color: #9be1d8; font-size: 12px; font-weight: 800; }
.brand-copy { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.brand-title { color: #fff; font-size: 16px; font-weight: 700; }
.brand-subtitle { color: #bac7d5; font-size: 12px; }

.login-layout { width: min(1000px, calc(100% - 48px)); margin: 72px auto 48px; display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: 64px; }
.login-intro, .login-card { min-width: 0; }
.eyebrow { margin-bottom: 10px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
h1 { color: var(--navy); font-size: clamp(28px, 4vw, 40px); line-height: 1.3; letter-spacing: -.025em; }
.intro-description { margin-top: 16px; color: var(--muted); font-size: 15px; }
.features { margin-top: 32px; }
.features > div { padding: 14px 0; border-top: 1px solid var(--line); }
.features dt { color: var(--navy); font-weight: 700; }
.features dd { margin-top: 3px; color: var(--muted); font-size: 13px; }

.login-card { width: 100%; padding: 32px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
h2 { color: var(--navy); font-size: 20px; line-height: 1.4; }
.card-description { margin-top: 8px; color: var(--muted); font-size: 13px; }
#login-form { margin-top: 26px; }
#login-form label { display: block; margin-bottom: 8px; font-weight: 700; }
.password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
#access-password { width: 100%; min-width: 0; min-height: 46px; padding: 10px 11px; border: 1px solid #d5dde5; border-radius: 7px; background: #fff; font-size: 16px; line-height: 1.5; }
#access-password[aria-invalid="true"] { border-color: var(--red); }
.password-toggle { min-width: 60px; min-height: 46px; padding: 8px 10px; border: 1px solid #d9e1e8; border-radius: 7px; background: #fff; color: var(--muted); font-size: 13px; font-weight: 600; }
.password-toggle:hover:not(:disabled) { border-color: #9ccbc6; color: var(--teal); background: #fbfefe; }
.password-hint { margin-top: 8px; color: var(--muted); font-size: 12px; }
.login-status { min-height: 3.2em; margin: 12px 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.login-status[data-state="error"] { color: var(--red); }
.login-status[data-state="pending"] { color: var(--teal); }
.login-submit { width: 100%; min-height: 46px; padding: 10px 16px; border: 1px solid var(--teal); border-radius: 7px; background: var(--teal); color: #fff; font-weight: 700; }
.login-submit:hover:not(:disabled) { border-color: #066b6c; background: #066b6c; }
.admin-help { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.noscript-message { margin-top: 12px; color: var(--red); font-size: 13px; }

@media (max-width: 760px) {
  .login-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 36px; }
  .login-card { max-width: 420px; justify-self: center; }
  .features { margin-top: 20px; }
}

@media (max-width: 420px) {
  .topbar { padding-right: 16px; padding-left: 16px; }
  .login-layout { width: calc(100% - 32px); margin-top: 28px; margin-bottom: 32px; }
  .login-card { padding: 24px; }
}
