.auth-page {
  --auth-paper: #fafaf7;
  --auth-panel: #ffffff;
  --auth-ink: #202020;
  --auth-muted: #646464;
  --auth-line: #d6d6d0;
  --auth-sub: #f1f1ed;
  --auth-accent: #9f181f;
  --auth-tint: #f6e8e9;
  --auth-danger: #9f181f;
  --auth-success: #286342;
  color-scheme: light;
  margin: 0;
  min-width: 280px;
  min-height: 100dvh;
  border-top: 3px solid #9f181f;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--auth-paper);
  color: var(--auth-ink);
  font: 14px/1.5 Arial, "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
[data-auth-theme="dark"] .auth-page {
  --auth-paper: #17191b;
  --auth-panel: #202326;
  --auth-ink: #eeeae4;
  --auth-muted: #b4b5b0;
  --auth-line: #414447;
  --auth-sub: #292d30;
  --auth-accent: #ed858b;
  --auth-tint: #442b30;
  --auth-danger: #f5a4a9;
  --auth-success: #9dceb0;
  color-scheme: dark;
}
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-page [hidden] { display: none !important; }
.auth-page a { color: var(--auth-accent); text-underline-offset: 3px; }
.auth-page a:hover { text-decoration-thickness: 2px; }
.auth-page button, .auth-page input { font: inherit; }
.auth-page button, .auth-page a { touch-action: manipulation; }
.auth-page button { cursor: pointer; }
.auth-page :is(button, a, input, summary):focus-visible { outline: 2px solid var(--auth-accent); outline-offset: 3px; }
.auth-page button:disabled { cursor: wait; opacity: .62; }
.auth-skip { position: fixed; top: -60px; left: 12px; z-index: 5; padding: 8px 12px; background: var(--auth-panel); }
.auth-skip:focus { top: 8px; }
.auth-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 30px; border-bottom: 1px solid var(--auth-line); }
.auth-brand { display: flex; align-items: center; gap: 23px; min-width: 0; color: var(--auth-ink) !important; text-decoration: none; }
.auth-logo { display: block; width: 164px; height: auto; flex: 0 0 auto; background: #fff; }
.auth-brand-name { padding-left: 21px; border-left: 1px solid var(--auth-line); font-size: 14px; font-weight: 700; white-space: nowrap; }
.auth-preferences { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.auth-quiet { border: 1px solid var(--auth-line); border-radius: 2px; padding: 6px 9px; min-height: 32px; background: var(--auth-panel); color: var(--auth-ink); font-size: 12px !important; }
.auth-quiet:hover { border-color: var(--auth-accent); color: var(--auth-accent); }
.auth-main { display: grid; place-items: center; padding: 42px 24px; min-width: 0; }
.auth-card { width: min(100%, 450px); padding: 29px 31px 20px; background: var(--auth-panel); border: 1px solid var(--auth-line); border-top: 3px solid #9f181f; border-radius: 2px; box-shadow: 0 8px 24px #20202006; }
.auth-card.auth-wide { width: min(100%, 900px); }
.auth-card-heading { margin-bottom: 24px; }
.auth-kicker { margin: 0 0 8px; color: var(--auth-accent); font-size: 11px; letter-spacing: .09em; font-weight: 700; text-transform: uppercase; }
.auth-card h1 { font-size: 27px; line-height: 1.2; letter-spacing: -.025em; margin: 0 0 10px; text-wrap: balance; }
.auth-intro { margin: 0; color: var(--auth-muted); font-size: 13px; }
.auth-form { display: grid; gap: 17px; }
.auth-field { display: grid; gap: 6px; min-width: 0; }
.auth-field > label { font-weight: 700; font-size: 12px; }
.auth-field input { width: 100%; height: 41px; border: 1px solid var(--auth-line); border-radius: 2px; padding: 8px 10px; color: var(--auth-ink); background: var(--auth-panel); min-width: 0; }
.auth-field input:hover { border-color: var(--auth-muted); }
.auth-field input:focus { border-color: var(--auth-accent); }
.auth-field input[readonly] { background: var(--auth-sub); color: var(--auth-muted); }
.auth-field .auth-hint { margin: 0; color: var(--auth-muted); font-size: 11px; line-height: 1.45; }
.auth-password { display: flex; align-items: stretch; border: 1px solid var(--auth-line); border-radius: 2px; background: var(--auth-panel); min-width: 0; }
.auth-password:focus-within { border-color: var(--auth-accent); }
.auth-password input { border: 0; background: transparent; }
.auth-password input:focus-visible { outline-offset: -3px; }
.auth-password button { min-width: 57px; flex: 0 0 auto; border: 0; border-left: 1px solid var(--auth-line); border-radius: 0; background: var(--auth-sub); color: var(--auth-muted); font-size: 11px; padding: 0 10px; }
.auth-password button:hover { color: var(--auth-accent); }
.auth-primary { width: 100%; min-height: 41px; border: 1px solid #9f181f; border-radius: 2px; padding: 8px 13px; background: #9f181f; color: #fff; font-weight: 700 !important; }
.auth-primary:hover { background: #801219; border-color: #801219; }
.auth-links { display: flex; gap: 12px 20px; flex-wrap: wrap; justify-content: space-between; margin: 18px 0 0; font-size: 12px; }
.auth-message { margin: 0 0 20px; padding: 10px 12px; border: 1px solid var(--auth-line); border-left: 3px solid var(--auth-accent); font-size: 12px; overflow-wrap: anywhere; }
.auth-error { color: var(--auth-danger); background: var(--auth-tint); }
.auth-notice { color: var(--auth-success); background: var(--auth-sub); }
.auth-message:focus { outline: 2px solid var(--auth-accent); outline-offset: 3px; }
.auth-card-footer { margin-top: 25px; padding-top: 14px; border-top: 1px solid var(--auth-line); color: var(--auth-muted); font-size: 11px; }
.auth-card-footer p { margin: 0; }
.auth-page-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; padding: 12px 20px 18px; color: var(--auth-muted); font-size: 10px; }
.auth-page-footer span + span { padding-left: 9px; border-left: 1px solid var(--auth-line); }
.auth-identity { margin: 0 0 20px; padding: 11px 12px; background: var(--auth-sub); border: 1px solid var(--auth-line); display: grid; gap: 3px; }
.auth-identity strong { font-size: 14px; overflow-wrap: anywhere; }
.auth-identity span { font-size: 12px; color: var(--auth-muted); overflow-wrap: anywhere; }
.auth-subheading { font-size: 16px; margin: 26px 0 16px; }
.auth-success-heading { margin: 0 0 9px; font-size: 19px; }
.auth-success-copy { margin: 0 0 22px; color: var(--auth-muted); font-size: 13px; }
.auth-primary-link { display: block; text-align: center; text-decoration: none; color: #fff !important; }
.auth-member-caption { margin: 0 0 14px; color: var(--auth-muted); font-size: 12px; }
.auth-members { border: 1px solid var(--auth-line); border-radius: 2px; overflow: hidden; }
.auth-member { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(90px, .6fr) auto; align-items: center; gap: 14px; padding: 13px 14px; border-top: 1px solid var(--auth-line); min-width: 0; }
.auth-member:first-child { border-top: 0; }
.auth-member-name { display: grid; gap: 2px; min-width: 0; }
.auth-member-name strong { font-size: 13px; }
.auth-member-name span { font-size: 12px; color: var(--auth-muted); overflow-wrap: anywhere; }
.auth-member-state { font-size: 11px; color: var(--auth-muted); }
.auth-member-state b { display: block; color: var(--auth-ink); font-weight: 400; }
.auth-member-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; max-width: 265px; }
.auth-member-actions .auth-quiet { min-height: 30px; padding: 5px 7px; font-size: 11px !important; }
.auth-danger-button { color: var(--auth-danger); }
.auth-confirm { grid-column: 1 / -1; padding: 12px; border: 1px solid var(--auth-danger); background: var(--auth-tint); }
.auth-confirm p { margin: 0 0 10px; font-size: 12px; }
.auth-confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.auth-member-link { grid-column: 1 / -1; display: grid; gap: 6px; }
.auth-member-link input { width: 100%; border: 1px solid var(--auth-line); padding: 8px; background: var(--auth-sub); color: var(--auth-ink); font: 11px/1.5 Consolas, monospace; }
.auth-member-link label { font-size: 11px; color: var(--auth-muted); }
.auth-pending { margin: 0; color: var(--auth-muted); font-size: 13px; }
.auth-divider { border: 0; border-top: 1px solid var(--auth-line); margin: 24px 0; }
@media (max-width: 650px) {
  .auth-header { padding: 15px 17px; gap: 10px; }
  .auth-logo { width: 134px; }
  .auth-brand-name { display: none; }
  .auth-preferences { gap: 4px; }
  .auth-quiet { padding: 6px 8px; }
  .auth-main { padding: 30px 17px; align-items: start; }
  .auth-card { padding: 24px 22px 19px; }
  .auth-card h1 { font-size: 25px; }
  .auth-member { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 13px 12px; }
  .auth-member-name { grid-column: 1 / -1; }
  .auth-member-actions { max-width: 230px; }
}
@media (max-width: 360px) {
  .auth-logo { width: 118px; }
  .auth-header { padding-inline: 12px; }
  .auth-card { padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) { .auth-page * { scroll-behavior: auto !important; } }
