:root {
  color-scheme: light;
  --page: #eef1f3;
  --card: #ffffff;
  --ink: #20252b;
  --muted: #707984;
  --line: #d9dee3;
  --surface: #f6f7f8;
  --focus: #1d67c1;
  --error: #b42318;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--page);
  background-image:
    linear-gradient(rgba(42, 51, 60, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 51, 60, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  font-family: "Avenir Next", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-shell {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 28px 16px;
}

.login-card {
  width: min(424px, 100%);
  overflow: hidden;
  border: 1px solid #d5dae0;
  border-top: 4px solid #252b32;
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(40, 48, 57, 0.13);
}

.login-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 1px solid #e5e8eb;
  background: #fafbfb;
}

.login-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: #252b32;
  font-size: 18px;
  font-weight: 900;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  font-size: 16px;
  font-weight: 900;
}

.login-brand strong .login-version {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  margin-left: 6px;
  padding: 0 6px;
  border: 1px solid #d7dce1;
  border-radius: 4px;
  color: #69737d;
  background: #f1f3f5;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  vertical-align: 2px;
}

.login-brand div > span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

#loginForm {
  padding: 28px 26px 30px;
}

.login-heading {
  margin-bottom: 24px;
}

.login-heading p {
  margin: 0 0 6px;
  color: #77818c;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.login-heading h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0;
}

label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: #4f5862;
  font-size: 12px;
  font-weight: 850;
}

input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input:hover {
  border-color: #bec5cc;
  background: #ffffff;
}

input:focus {
  border-color: var(--focus);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 103, 193, 0.12);
}

.captcha-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px 44px;
  gap: 8px;
  align-items: stretch;
}

.captcha-control input {
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.captcha-image-button,
.captcha-refresh {
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f3f5f6;
}

.captcha-image-button {
  overflow: hidden;
}

.captcha-image-button:hover,
.captcha-refresh:hover {
  border-color: #9fa8b2;
}

.captcha-image-button:focus-visible,
.captcha-refresh:focus-visible,
.login-submit:focus-visible {
  outline: 3px solid rgba(29, 103, 193, 0.18);
  outline-offset: 2px;
}

.captcha-image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.captcha-refresh {
  color: #39424b;
  font-size: 22px;
  font-weight: 800;
}

.login-status {
  min-height: 20px;
  margin: 14px 0 8px;
  color: var(--error);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.login-status.success {
  color: #16704a;
}

.login-submit {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: #252b32;
  font-size: 14px;
  font-weight: 900;
  transition: background 150ms ease, transform 150ms ease;
}

.login-submit:hover {
  background: #0f1317;
  transform: translateY(-1px);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.64;
  transform: none;
}

@media (max-width: 420px) {
  .login-shell {
    padding: 12px;
  }

  .login-brand {
    padding: 19px 20px;
  }

  #loginForm {
    padding: 24px 20px 26px;
  }

  .captcha-control {
    grid-template-columns: minmax(0, 1fr) 118px 42px;
  }
}
