* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: #333;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button, input {
  font: inherit;
}

button, a, input {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.login-page {
  width: 100%;
  max-width: 448px;
  margin: 0 auto;
  padding: 40px 20px 24px;
}

.system-name {
  margin-bottom: 24px;
  text-align: center;
}

.system-name h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.4;
}

.system-name p {
  margin: 8px 0 0;
  color: #666;
}

.auth-card, .support-card {
  padding: 24px;
  border: 1px solid #e4e4e4;
  border-top: 6px solid #bb4025;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.07);
}

h2 {
  margin: 0 0 20px;
  font-size: 22px;
  text-align: center;
}

.form-intro {
  margin: -8px 0 20px;
  color: #555;
  font-size: 14px;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #888;
  border-radius: 5px;
  background: #fff;
  color: #333;
  font-size: 16px;
}

input::placeholder {
  color: #666;
  opacity: 1;
}

input[aria-invalid="true"] {
  border-color: #a32916;
}

.password-field {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.password-field input {
  flex: 1;
}

.password-toggle {
  flex: 0 0 56px;
  min-height: 48px;
  padding: 0 6px;
  border: 1px solid #888;
  border-radius: 5px;
  background: #fff;
  color: #555;
  font-size: 14px;
  cursor: pointer;
}

.field-hint {
  margin: 6px 0 0;
  color: #555;
  font-size: 14px;
}

.form-feedback {
  min-height: 24px;
  margin: 0 0 12px;
  color: #555;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.form-feedback.is-error {
  color: #a32916;
}

.form-feedback.is-success {
  color: #25632d;
}

.submit {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 0;
  border-radius: 5px;
  background: #bb4025;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.submit:hover {
  background: #a7351d;
}

.submit:disabled {
  background: #8f482f;
  cursor: wait;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 12px;
}

.auth-links-center {
  justify-content: center;
}

.text-button {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #a7351d;
  cursor: pointer;
}

.text-button:hover, .support-link:hover {
  text-decoration: underline;
}

button:focus-visible, a:focus-visible, input:focus {
  outline: 3px solid #9d351e;
  outline-offset: 3px;
}

.support-card {
  margin-top: 20px;
  border-top-width: 3px;
}

.support-card h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.support-card p {
  margin: 0 0 12px;
  color: #555;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.support-text {
  white-space: pre-line;
}

.support-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #a7351d;
}

.support-qrcode {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  margin: 12px auto 0;
}

.copyright {
  margin-top: 28px;
  color: #666;
  text-align: center;
  font-size: 12px;
}

.noscript-notice {
  color: #a32916;
}

@media (max-width: 359px) {
  .login-page {
    padding: 24px 12px;
  }

  .auth-card, .support-card {
    padding: 20px 16px;
  }

  .system-name h1 {
    font-size: 24px;
  }
}

@media (min-width: 768px) {
  .login-page {
    padding-top: 72px;
  }
}
