:root {
  color-scheme: light;
  --login-red: #e72319;
  --login-red-dark: #c71c14;
  --login-ink: #26292e;
  --login-muted: #646b75;
  --login-line: #d9dde3;
  --login-surface: #f4f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--login-ink);
  background: linear-gradient(to bottom, var(--login-red) 0, var(--login-red) 260px, var(--login-surface) 260px, var(--login-surface) 100%);
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
[hidden] { display: none !important; }
.login-shell {
  width: min(100% - 32px, 380px);
  margin-inline: auto;
  padding-block: 64px 28px;
}
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
  color: #fff;
}
.login-logo {
  display: block;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.login-brand h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: .03em; line-height: 1.3; }
.login-card {
  padding: 24px 26px;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 10px;
  box-shadow: 0 12px 32px #1b20251f;
}
.login-heading { margin-bottom: 18px; text-align: center; }
.login-heading h2 { margin: 0; color: var(--login-red-dark); font-size: 20px; font-weight: 650; line-height: 1.5; }
.login-heading > span { display: block; width: 32px; height: 3px; margin: 10px auto 0; border-radius: 4px; background: var(--login-red); }
.login-field + .login-field { margin-top: 16px; }
.login-field label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 15px; top: 50%; width: 21px; height: 21px; transform: translateY(-50%); color: var(--login-muted); pointer-events: none; }
.input-wrap input {
  display: block;
  width: 100%;
  height: 46px;
  min-width: 0;
  padding: 10px 14px 10px 46px;
  border: 1px solid var(--login-line);
  border-radius: 8px;
  outline: none;
  color: var(--login-ink);
  background: #fff;
  font-size: 16px;
  line-height: 1.5;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.input-wrap input::placeholder { color: #747b85; }
.input-wrap input:hover:not(:disabled) { border-color: #a0a6b0; }
.input-wrap input:focus { border-color: var(--login-red); box-shadow: 0 0 0 3px #e723191c; }
.input-wrap input:disabled { color: var(--login-muted); background: #f7f8fa; }
.password-wrap input { padding-right: 66px; }
.password-toggle { position: absolute; right: 3px; top: 3px; min-width: 54px; height: 40px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: #505760; font-size: 14px; }
.password-toggle:hover:not(:disabled) { color: var(--login-red-dark); background: #fff1ef; }
.password-toggle:focus-visible, .login-submit:focus-visible { outline: 3px solid var(--login-ink); outline-offset: 3px; }
.login-error { margin: 16px 0 0; padding: 11px 12px; border-radius: 6px; background: #fff1ef; color: #b4231b; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.login-error:focus { outline: 2px solid #b4231b; outline-offset: 2px; }
.login-submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; margin-top: 20px; padding: 10px 18px; border: 1px solid var(--login-red); border-radius: 7px; color: #fff; background: var(--login-red); box-shadow: 0 3px 8px #e7231926; font-size: 16px; font-weight: 650; transition: background 160ms ease, border-color 160ms ease; }
.login-submit:hover:not(:disabled) { background: var(--login-red-dark); border-color: var(--login-red-dark); }
.login-submit:active:not(:disabled) { background: #ad1912; border-color: #ad1912; }
.login-submit:disabled { background: #ba2018; border-color: #ba2018; box-shadow: none; }
.login-spinner { width: 18px; height: 18px; border: 2px solid #ffffff70; border-top-color: #fff; border-radius: 50%; animation: login-spin .7s linear infinite; }
.login-footer { margin: 18px 0 0; color: var(--login-muted); font-size: 13px; text-align: center; }
.site-legal { margin-top: auto; padding: 16px 16px 20px; text-align: center; color: var(--login-muted); font-size: 13px; line-height: 1.6; }
.site-legal a { color: inherit; text-decoration: none; }
.site-legal a:hover { color: var(--login-red-dark); text-decoration: underline; }
.site-legal a:focus-visible { outline: 2px solid var(--login-red-dark); outline-offset: 4px; border-radius: 2px; }
@keyframes login-spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
  body { background: linear-gradient(to bottom, var(--login-red) 0, var(--login-red) 228px, var(--login-surface) 228px, var(--login-surface) 100%); }
  .login-shell { padding-top: 36px; }
  .login-brand h1 { font-size: clamp(23px, 6vw, 26px); }
  .login-card { padding: 22px 24px; }
  .input-wrap input { height: 48px; }
  .password-toggle { top: 2px; height: 44px; }
}
@media (max-height: 600px) and (min-width: 481px) {
  .login-shell { padding-top: 28px; }
  .login-brand { margin-bottom: 18px; }
  .login-card { padding-block: 22px; }
  .login-heading { margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
