.login-page {
  display: grid;
  place-items: center;
}

.login-card {
  display: grid;
  width: min(100%, 440px);
  margin: 0 auto;
  padding: 30px;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.login-card > header span {
  color: var(--accent-text);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.login-card h1 {
  margin: 7px 0 0;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.login-card > header p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* 登录 / 注册 切换页签 */
.login-tabs {
  display: grid;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-sunken);
  grid-template-columns: 1fr 1fr;
}

.login-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  color: var(--muted-strong);
  background: none;
  font-size: 13px;
  font-weight: 700;
}

.login-tabs button[aria-selected="true"] {
  color: var(--accent-text);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(27, 29, 34, 0.1);
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form[hidden] {
  display: none;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.login-link {
  padding: 0;
  border: 0;
  color: var(--accent-text);
  background: none;
  font-size: 12px;
  font-weight: 600;
}

.login-link:hover {
  text-decoration: underline;
}

.login-link:disabled {
  color: var(--muted);
  text-decoration: none;
}

.login-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.login-field label,
.login-hint {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.login-hint {
  color: var(--muted);
  font-weight: 500;
}

.login-field input {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-raised);
  font-size: 15px;
}

.login-field input:read-only {
  color: var(--muted-strong);
}

.login-field input:focus {
  border-color: var(--accent);
  outline: none;
}

.login-field input[inputmode="numeric"] {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.45em;
  text-align: center;
}

.login-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--danger-line);
  border-radius: 7px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 12px;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.login-submit {
  min-height: 44px;
  flex: 1;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  color: white;
  background: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.login-submit:hover {
  background: var(--accent-hover);
}

.login-submit:disabled {
  opacity: 0.55;
}

.login-note {
  display: grid;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.login-notice {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.login-notice strong {
  color: var(--text);
  font-size: 12px;
}

.login-notice p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.7;
}

.login-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.7;
}

.login-consent input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.login-consent a {
  color: var(--accent-text);
}

.login-consent small {
  color: var(--muted);
}
