:root {
  color-scheme: light;
  --auth-bg: #ffffff;
  --auth-surface: #ffffff;
  --auth-fg: #292929;
  --auth-title: #171717;
  --auth-muted: #777777;
  --auth-border: #e4e4e4;
  --auth-accent: #171717;
  --auth-danger: #b34b3d;
  --auth-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body.auth-body {
  min-width: 320px;
  margin: 0;
  background: var(--auth-bg);
  color: var(--auth-fg);
  font-family: var(--auth-font);
  font-size: 15px;
  line-height: 1.5;
}

.auth-page {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 24px;
}

.auth-card {
  width: min(100%, 384px);
  padding: 32px;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  background: var(--auth-surface);
}

.auth-head { margin-bottom: 28px; text-align: center; }
.auth-title { margin: 0; color: var(--auth-title); font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
.auth-sub { margin: 7px 0 0; color: var(--auth-muted); font-size: 13px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.label { display: block; margin-bottom: 6px; color: var(--auth-title); font-size: 13px; font-weight: 500; }

.input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--auth-border);
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: var(--auth-fg);
  font: inherit;
  font-size: 14px;
}

.input::placeholder { color: #aaaaaa; }
.input:focus { border-color: var(--auth-accent); box-shadow: 0 0 0 2px rgba(23, 23, 23, .1); }

.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--auth-fg);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary { border-color: var(--auth-accent); background: var(--auth-accent); color: #fff; }
.btn-primary:hover { border-color: #363636; background: #363636; }
.btn-outline { border-color: var(--auth-border); background: #fff; }
.btn-outline:hover { border-color: #999999; }
.btn:disabled { cursor: default; opacity: .55; }
.auth-submit, .auth-wide { width: 100%; }

.auth-error { margin: 0; padding: 8px 10px; border-radius: 6px; background: #fdf1ef; color: var(--auth-danger); font-size: 13px; }
.auth-hint, .auth-footer { margin: 5px 0 0; color: var(--auth-muted); font-size: 12px; line-height: 1.65; }
.auth-strong { color: var(--auth-title); font-weight: 500; }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; color: var(--auth-muted); font-size: 12px; }
.auth-links a, .auth-link-accent, .auth-link-btn { color: var(--auth-title); text-decoration: none; }
.auth-links a:hover, .auth-link-accent:hover, .auth-link-btn:hover { text-decoration: underline; }
.auth-center { justify-content: center; }
.auth-link-btn { margin-left: 4px; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.auth-link-btn:disabled { color: var(--auth-muted); cursor: default; text-decoration: none; }
.auth-row { display: flex; gap: 8px; }
.auth-flex { min-width: 0; flex: 1; }
.auth-send-btn { flex: 0 0 auto; min-height: 40px; padding-right: 11px; padding-left: 11px; font-size: 12px; white-space: nowrap; }
.auth-code { width: min(176px, 100%); }
.auth-closed { display: flex; flex-direction: column; gap: 16px; text-align: center; }
.auth-closed p { margin: 0; color: var(--auth-muted); font-size: 14px; }
.auth-footer { margin-top: 18px; }

@media (max-width: 420px) {
  .auth-page { padding-right: 16px; padding-left: 16px; }
  .auth-card { padding: 24px 20px; }
  .auth-row { align-items: stretch; flex-direction: column; }
  .auth-send-btn { width: 100%; }
}
