:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: #171717;
  background: #f5f6f7;
  --auth-yellow: #ffe60f;
  --auth-yellow-hover: #ffdc00;
  --auth-ink: #171717;
  --auth-muted: #74777d;
  --auth-line: #e2e4e7;
  --auth-surface: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f5f6f7; }
.auth-shell { width: min(960px, 100%); height: min(680px, calc(100vh - 48px)); min-height: 560px; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(430px, 1.1fr); overflow: hidden; border: 1px solid var(--auth-line); border-radius: 8px; background: var(--auth-surface); box-shadow: 0 24px 64px rgba(25, 28, 33, .13); }
.auth-brand { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; overflow: hidden; padding: 40px; color: var(--auth-ink); background: var(--auth-yellow); }
.auth-brand img { width: 132px; height: 132px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .13)); }
.auth-slogan { width: min(100%, 290px); display: grid; justify-items: center; gap: 6px; margin: 24px 0 0; text-align: center; }
.auth-slogan span, .auth-slogan em { display: block; font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; letter-spacing: 0; }
.auth-slogan span { color: var(--auth-ink); font-size: 27px; font-weight: 900; line-height: 1.2; }
.auth-slogan em { color: #4c4700; font-size: 14px; font-style: normal; font-weight: 600; line-height: 1.5; }
.auth-slogan::after { width: 30px; height: 3px; margin-top: 8px; border-radius: 2px; background: var(--auth-ink); content: ""; }
.auth-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; overflow: auto; padding: 52px clamp(44px, 6vw, 72px); background: var(--auth-surface); }
.auth-segments { width: 100%; height: 44px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; flex: 0 0 44px; padding: 4px; border: 1px solid #eceef0; border-radius: 8px; background: #f3f4f5; }
.auth-segments button { border: 0; border-radius: 6px; color: #6b6f75; background: transparent; font-size: 14px; font-weight: 700; }
.auth-segments button:hover { color: var(--auth-ink); background: #e9ebed; }
.auth-segments button[aria-selected="true"] { color: var(--auth-yellow); background: var(--auth-ink); box-shadow: none; }
.auth-form { display: flex; flex-direction: column; gap: 18px; padding-top: 28px; }
.auth-form header { margin-bottom: 2px; }
.auth-form h1, .local-account-picker h1 { margin: 0; color: var(--auth-ink); font-size: 28px; font-weight: 800; line-height: 1.25; }
.auth-form p, .local-account-picker p { margin: 8px 0 0; color: var(--auth-muted); font-size: 13px; line-height: 1.55; }
.auth-form label { min-width: 0; display: grid; gap: 7px; color: #45484d; font-size: 13px; font-weight: 700; }
.auth-form input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #dfe2e5; border-radius: 8px; outline: 0; color: var(--auth-ink); background: #fafbfc; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.auth-form input:hover { border-color: #bfc3c8; background: #fff; }
.auth-form input:focus { border-color: #d4bd00; background: #fff; box-shadow: 0 0 0 3px rgba(255, 230, 15, .3); }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 14px; }
.auth-grid-wide { grid-column: 1 / -1; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; color: #74777d; background: transparent; }
.password-toggle:hover, .password-toggle:focus-visible { color: var(--auth-ink); outline: 0; background: #eff0f2; }
.password-toggle svg { width: 18px; height: 18px; }
.auth-submit { height: 48px; flex: 0 0 48px; border: 1px solid #dcc600; border-radius: 8px; color: var(--auth-ink); background: var(--auth-yellow); box-shadow: inset 0 -2px rgba(110, 97, 0, .14); font-weight: 800; transition: background-color .16s ease, transform .16s ease; }
.auth-submit:hover { background: var(--auth-yellow-hover); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { cursor: wait; opacity: .65; }
.auth-form .auth-error { margin: 0; padding: 10px 12px; border: 1px solid #f0c7c5; border-radius: 8px; color: #9e2722; background: #fff4f3; line-height: 1.45; }
.local-account-picker { gap: 22px; }
.local-account-list { display: grid; gap: 8px; }
.local-account-list button { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; color: #2f3338; border: 1px solid var(--auth-line); border-radius: 8px; background: #fff; text-align: left; }
.local-account-list button:hover, .local-account-list button:focus-visible { border-color: #dbc500; outline: 0; background: #fffde6; }
.local-account-list button > span { min-width: 0; display: grid; gap: 2px; }
.local-account-list button strong, .local-account-list button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.local-account-list button strong { font-size: 14px; }
.local-account-list button small { color: #7e848d; font-size: 11px; }
.local-account-list button svg { width: 17px; height: 17px; flex: 0 0 17px; color: #a18100; }
.local-account-empty { margin: 0; padding: 14px; color: #737983; border: 1px dashed #d6dbe1; border-radius: 8px; background: #f8f9fa; font-size: 13px; }
@media (max-width: 720px) {
  .auth-page { min-height: 100dvh; padding: 0; background: #fff; }
  .auth-shell { width: 100%; height: auto; min-height: 100dvh; grid-template-columns: 1fr; grid-template-rows: 220px auto; border: 0; border-radius: 0; box-shadow: none; }
  .auth-brand { min-height: 220px; padding: calc(22px + env(safe-area-inset-top)) 20px 20px; }
  .auth-brand img { width: 76px; height: 76px; }
  .auth-slogan { gap: 4px; margin-top: 10px; }
  .auth-slogan span { font-size: 20px; }
  .auth-slogan em { font-size: 11px; }
  .auth-slogan::after { width: 24px; height: 2px; margin-top: 5px; }
  .auth-panel { justify-content: flex-start; overflow: visible; padding: 28px max(20px, env(safe-area-inset-right)) calc(36px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
  .auth-segments { height: 42px; flex-basis: 42px; }
  .auth-form { gap: 16px; padding-top: 24px; }
  .auth-form h1, .local-account-picker h1 { font-size: 25px; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-grid-wide { grid-column: auto; }
}
@media (max-width: 900px) and (max-height: 500px) {
  .auth-page { display: block; min-height: 100dvh; padding: 0; }
  .auth-shell { width: 100%; height: auto; min-height: 100dvh; grid-template-columns: 230px minmax(440px, 1fr); grid-template-rows: 1fr; border: 0; border-radius: 0; box-shadow: none; }
  .auth-brand { min-height: 100dvh; padding-left: env(safe-area-inset-left); }
  .auth-brand img { width: 68px; height: 68px; }
  .auth-slogan { gap: 3px; margin-top: 10px; }
  .auth-slogan span { font-size: 18px; }
  .auth-slogan em { max-width: 190px; font-size: 10px; }
  .auth-slogan::after { width: 22px; height: 2px; margin-top: 4px; }
  .auth-panel { justify-content: flex-start; padding: 18px max(28px, env(safe-area-inset-right)) 22px 28px; }
  .auth-form { gap: 10px; padding-top: 14px; }
  .auth-form h1 { font-size: 20px; }
  .auth-form input, .auth-submit { height: 38px; }
  .password-toggle { top: 3px; right: 3px; width: 32px; height: 32px; }
}
