/**
 * login.css — 登录/注册页专用样式（本地自持，不依赖任何外网 CDN）
 *
 * 这里按登录页实际用到的类，等价复刻 Tailwind v3 的 preflight + utilities，
 * 以及原来那段 <style type="text/tailwindcss"> 里的自定义类
 * （.form-input-focus / .divider-line / .btn-loading / .captcha-passed）。
 * 改登录页 HTML 时：如果引入了新的工具类，记得在这里补上对应规则。
 */

/* ── 1. preflight（最小子集）──────────────────────────── */
*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  margin: 0;
  line-height: inherit;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: inherit;
}

b,
strong {
  font-weight: bolder;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button,
select {
  text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

button,
[role="button"] {
  cursor: pointer;
}

[type="checkbox"] {
  padding: 0;
}

img,
svg,
video,
canvas {
  display: block;
  vertical-align: middle;
}

/* ── 2. 布局 / 尺寸 ──────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.hidden { display: none; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.block { display: block; }

.min-h-screen { min-height: 100vh; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-full { width: 100%; }
.max-w-md { max-width: 28rem; }
.min-w-\[100px\] { min-width: 100px; }

/* ── 3. 间距 ────────────────────────────────────────── */
.p-5 { padding: 1.25rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

/* ── 4. 排版 / 颜色 ─────────────────────────────────── */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.font-sans { font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; }

.text-white { color: #fff; }
.text-secondary { color: #6b7280; }
.text-link { color: #000; }
.bg-white { background-color: #fff; }
.bg-black { background-color: #000; }
.bg-primary { background-color: #000; }
.bg-gray-50 { background-color: #f9fafb; }
.border { border-width: 1px; }
.border-border { border-color: #e5e7eb; }

.bg-red-50 { background-color: #fef2f2; }
.text-red-700 { color: #b91c1c; }
.border-red-200 { border-color: #fecaca; }
.bg-green-50 { background-color: #f0fdf4; }
.text-green-700 { color: #15803d; }
.border-green-200 { border-color: #bbf7d0; }

/* ── 5. 圆角 / 阴影 ─────────────────────────────────── */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }

/* ── 6. 交互态 / 过渡 ───────────────────────────────── */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-opacity {
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.hover\:bg-gray-800:hover { background-color: #1f2937; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:underline:hover { text-decoration-line: underline; }

/* group-hover（父级 .group 悬停时生效） */
.group:hover .group-hover\:-translate-x-0\.5 { transform: translateX(-0.125rem); }
.group:hover .group-hover\:opacity-70 { opacity: 0.7; }

/* ── 7. 原 <style type="text/tailwindcss"> 里的自定义类 ── */
.form-input-focus:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 1px #000;
}

.divider-line {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 1rem 0;
}
.divider-line::before,
.divider-line::after {
  content: "";
  flex: 1 1 0%;
  height: 1px;
  background-color: #e5e7eb;
}
.divider-line span {
  padding: 0 0.75rem;
  color: #6b7280;
  font-size: 0.75rem;
  line-height: 1rem;
}

.btn-loading {
  opacity: 0.7;
  pointer-events: none;
}
.btn-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes login-spin {
  to { transform: rotate(360deg); }
}

.captcha-passed { background-color: #10b981 !important; }

/* 内联 SVG 图标尺寸（替掉 Font Awesome 后自己管） */
.icon-xs { width: 12px; height: 12px; }
.icon-sm { width: 16px; height: 16px; }
