:root {
  color-scheme: light;
  --blue: #2563eb;
  --ink: #0f172a;
  --muted: #7b8797;
  --line: #e4e8ee;
  font-family: "Microsoft YaHei", Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: #f8fafc; color: var(--ink); }
button, input { font: inherit; }
.auth-header { height: 64px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #e9edf2; background: white; }
.auth-brand { display: flex; align-items: center; gap: 7px; color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 750; }
.auth-brand b { color: var(--blue); }
.auth-logo { position: relative; width: 22px; height: 25px; }
.auth-logo::before { content: ""; position: absolute; left: 7px; top: 1px; width: 7px; height: 12px; border: 2px solid var(--blue); border-radius: 5px; }
.auth-logo::after { content: ""; position: absolute; left: 2px; bottom: 1px; width: 18px; height: 13px; border-radius: 10px 10px 4px 4px; background: linear-gradient(90deg, #72a7f8 0 43%, white 44% 54%, var(--blue) 55%); }
.auth-site-logo { width: 27px; height: 27px; border-radius: 7px; object-fit: contain; }
.auth-main { min-height: calc(100vh - 64px); display: flex; justify-content: center; padding: 25px 18px 0; }
.auth-card { width: 448px; align-self: flex-start; padding: 39px 40px 30px; border: 1px solid #edf0f4; border-radius: 24px; background: white; box-shadow: 0 16px 35px #2f4a6b10; }
.auth-title { margin: 0; text-align: center; font-size: 31px; line-height: 1.25; letter-spacing: -.05em; }
.auth-title .blue { color: var(--blue); }
.auth-subtitle { margin: 8px 0 32px; color: var(--muted); text-align: center; font-size: 16px; letter-spacing: .03em; }
.auth-form { display: grid; gap: 20px; }
.field-label { display: flex; justify-content: space-between; align-items: center; margin: 0 4px 7px; color: #273449; font-size: 13px; font-weight: 700; }
.required { color: var(--blue); }
.forgot-link { padding: 0; border: 0; background: transparent; color: var(--blue); font-size: 12px; }
.input-wrap { position: relative; }
.field-icon { position: absolute; left: 17px; top: 50%; width: 20px; transform: translateY(-50%); color: #aab4c2; font-size: 20px; text-align: center; }
.field-icon svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.input-wrap input { width: 100%; height: 52px; padding: 0 45px 0 48px; border: 1px solid #dfe4ea; border-radius: 12px; outline: none; background: #fbfcfd; color: var(--ink); font-size: 15px; transition: .18s; }
.input-wrap input::placeholder { color: #aab2bf; }
.input-wrap input:focus { border-color: #7aa0f7; background: white; box-shadow: 0 0 0 3px #2563eb12; }
.password-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 29px; height: 24px; padding: 0; border: 0; border-radius: 5px; background: #aeb7c5; color: white; font-size: 12px; }
.code-input-wrap input { padding-right: 122px; }
.verification-send { position: absolute; right: 8px; top: 50%; height: 36px; min-width: 102px; padding: 0 12px; transform: translateY(-50%); border: 0; border-radius: 9px; background: #e8f0ff; color: var(--blue); font-size: 12px; font-weight: 700; cursor: pointer; }
.verification-send:disabled { color: #8aa4ce; cursor: wait; opacity: .8; }
.invite-state { min-height: 16px; margin: 5px 4px -9px; color: var(--muted); font-size: 11px; }
.invite-state.valid { color: #15966a; }
.invite-state.invalid, .form-error { color: #d23d4b; }
.form-error.success-message { color: #15966a; }
.submit-button { height: 52px; margin-top: 0; border: 0; border-radius: 12px; background: var(--blue); color: white; font-size: 16px; font-weight: 750; box-shadow: 0 10px 20px #2563eb2b; cursor: pointer; }
.submit-button:hover { background: #1f58d6; }
.submit-button:disabled { cursor: wait; opacity: .65; }
.secondary-button { height: 52px; border: 0; border-radius: 12px; background: #f1f5f9; color: #526174; font-size: 16px; font-weight: 750; cursor: pointer; }
.secondary-button:hover { background: #e7edf4; }
.secondary-button:disabled { cursor: wait; opacity: .65; }
.form-error { min-height: 18px; margin: -10px 2px 0; font-size: 12px; text-align: center; }
.auth-switch { margin: 32px 0 22px; color: #687486; text-align: center; font-size: 13px; }
.auth-switch a { margin-left: 6px; color: var(--blue); font-weight: 700; text-decoration: none; }
.reset-note { margin: 22px 0; color: #8994a5; text-align: center; font-size: 11px; }
[hidden] { display: none !important; }
.auth-footer { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid #edf0f4; color: #8994a5; text-align: center; font-size: 11px; }
.auth-footer b { color: #536176; letter-spacing: .08em; }
.register-card .auth-subtitle { margin-bottom: 32px; }
.register-card .auth-form { gap: 19px; }
.success-panel { display: grid; justify-items: center; gap: 12px; padding: 35px 0; text-align: center; }
.success-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e9f8f2; color: #15966a; font-size: 30px; }
.success-panel h2 { margin: 0; }
.success-panel p { margin: 0; color: var(--muted); }
.admin-login-card { position: relative; }
.admin-login-badge { display: grid; width: 52px; height: 52px; margin: -10px auto 16px; place-items: center; border-radius: 16px; background: #e8f0ff; color: var(--blue); }
.admin-login-badge svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.admin-login-note { margin: 24px 0 0; color: #8994a5; font-size: 11px; line-height: 1.7; text-align: center; }
.admin-login-note code { padding: 2px 4px; border-radius: 4px; background: #f1f5f9; color: #526174; }

@media (max-width: 520px) {
  .auth-main { padding: 0; }
  .auth-card { width: 100%; min-height: calc(100vh - 64px); padding: 34px 25px 25px; border: 0; border-radius: 0; box-shadow: none; }
  .auth-title { font-size: 27px; }
}
