/* 登录页样式（与 app.css 的 shadcn 令牌保持一致，复用变量定义） */
.login-body {
  min-height: 100vh;
  margin: 0;
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  font-family: var(--font);
  font-size: 16px;
  display: grid;
  place-items: center;
  padding: 24px 16px 40px;
}

.login-wrap {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-card {
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-md);
  padding: 26px 24px 22px;
}

.login-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.login-title {
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.login-sub {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-top: 2px;
}

.login-notice {
  background: hsl(var(--info-bg));
  color: hsl(var(--info-fg));
  border: 1px solid hsl(var(--info-border));
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 16px;
}

.field { margin-bottom: 14px; }

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 550;
  margin-bottom: 6px;
}

.input {
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  padding: 0 12px;
  font-size: 1rem;
  font-family: inherit;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.input:focus-visible {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.18);
}

.input::placeholder { color: hsl(var(--muted-foreground)); }

.input-with-btn {
  display: flex;
  gap: 8px;
  align-items: center;
}
.input-with-btn .input { flex: 1; }

.captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.captcha-input {
  flex: 1;
  letter-spacing: .4em;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.captcha-img {
  padding: 0;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--muted));
  cursor: pointer;
  line-height: 0;
  overflow: hidden;
}
.captcha-img img { display: block; width: 132px; height: 48px; }
.captcha-img:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.25);
}

.hint {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 6px;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  font-size: 0.9375rem;
  font-family: inherit;
  font-weight: 550;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: hsl(var(--primary) / 0.9); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
}
.btn-ghost:hover { background: hsl(var(--accent)); }

.btn-sm { height: 34px; padding: 0 10px; font-size: 0.8125rem; }
.btn-block { width: 100%; height: 44px; font-size: 1rem; margin-top: 4px; }

.login-error {
  margin: 4px 0 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--destructive) / 0.35);
  background: hsl(var(--destructive) / 0.08);
  color: hsl(var(--destructive));
}

.alert { border-radius: var(--radius); }

.login-ok {
  background: hsl(142 70% 96%);
  border: 1px solid hsl(142 60% 82%);
  color: hsl(142 60% 22%);
  border-radius: calc(var(--radius) - 2px);
  padding: 10px 12px;
  font-size: 0.875rem;
  margin-bottom: 14px;
}

.login-alt {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid hsl(var(--border));
  text-align: center;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.login-alt .link-btn { font-size: 0.875rem; font-weight: 550; }

.login-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.link-btn {
  border: 0;
  background: none;
  color: hsl(var(--primary));
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-legal {
  font-size: 0.75rem;
  line-height: 1.65;
  color: hsl(var(--muted-foreground));
  padding: 0 6px;
  text-align: center;
}
.login-legal p { margin: 0 0 6px; }

@media (max-width: 420px) {
  .login-card { padding: 20px 16px 18px; }
  .captcha-img img { width: 112px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .input, .btn { transition: none; }
}