/* 登录页样式：中性、排版驱动，不使用渐变 / 模糊 / 装饰动画 */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  padding: 24px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f6f7;
  color: #18181b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 352px;
  padding: 30px 26px;
  background: #fff;
  border: 1px solid #e6e6e9;
  border-radius: 8px;
}

form { margin: 0; }

.field { margin-bottom: 12px; }

.field input {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #dcdce0;
  border-radius: 6px;
  background: #fff;
  color: #18181b;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.field input::placeholder { color: #9d9da6; }

.field input:hover { border-color: #c6c6cc; }

.field input:focus {
  border-color: #18181b;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.07);
}

.field.has-error input { border-color: #dc2626; }

.field.has-error input:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.09); }

.pwd-wrap { position: relative; }

.pwd-wrap input { padding-right: 54px; }

.toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #71717a;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
}

.toggle:hover { color: #18181b; background: #f4f4f5; }

.err {
  display: none;
  margin: 0 0 12px;
  font-size: 13px;
  color: #dc2626;
}

.err.show { display: block; }

.btn {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 20px;
  border: 1px solid #18181b;
  border-radius: 6px;
  background: #18181b;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.btn:hover:not(:disabled) { background: #2b2b31; border-color: #2b2b31; }

.btn:active:not(:disabled) { background: #000; border-color: #000; }

.btn:disabled { opacity: 0.55; cursor: default; }

.btn .spinner { display: none; }

.btn.loading .label { display: none; }

.btn.loading .spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.captcha-wrap { margin-bottom: 12px; }

.captcha-loading {
  padding: 8px 0;
  font-size: 12px;
  color: #9d9da6;
}

@media (max-width: 420px) {
  body { padding: 16px; }
  .card { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
