/* 后台登录页本地样式（替代 cdn.tailwindcss.com，避免浏览器端编译卡顿） */
:root {
  --primary: #3b82f6;
  --primary-light: #93c5fd;
  --primary-dark: #2563eb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  padding: 16px;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: #111827;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
.toast {
  position: fixed; top: 16px; right: 16px; z-index: 50;
  padding: 12px 20px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  display: flex; align-items: center; gap: 8px;
  transition: transform .3s ease; transform: translateX(120%);
  max-width: min(360px, calc(100vw - 32px)); font-size: 14px;
}
.toast.show { transform: translateX(0); }
.toast.ok { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.toast.bad { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.toast button { border: 0; background: transparent; color: inherit; cursor: pointer; opacity: .7; margin-left: 8px; }
.wrap { width: 100%; max-width: 28rem; }
.card {
  background: #fff; border: 1px solid #d1d5db; border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); overflow: hidden;
}
.brand { text-align: center; margin-top: 32px; }
.brand a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 1.875rem; font-weight: 700; color: var(--primary);
}
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand p { color: #4b5563; margin: 16px 0 0; font-size: 14px; }
.body { padding: 32px; }
.alert {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  padding: 12px 16px; border-radius: 6px; margin-bottom: 24px; font-size: 14px;
}
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; font-weight: 500; color: #374151; margin-bottom: 4px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%; padding: 8px 16px; border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,.25);
}
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 42px; }
.pwd-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: #9ca3af; cursor: pointer; padding: 0;
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
}
.pwd-toggle:hover { color: var(--primary); }
.pwd-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.row-between a { font-size: 14px; }
.btn {
  width: 100%; display: inline-flex; justify-content: center; align-items: center;
  padding: 8px 16px; border-radius: 6px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: background .2s, border-color .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline {
  margin-top: 24px; background: #fff; color: var(--primary);
  border-color: rgba(59,130,246,.3);
}
.btn-outline:hover { background: #eff6ff; }
.divider { margin-top: 24px; position: relative; text-align: center; }
.divider::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  border-top: 1px solid #d1d5db;
}
.divider span {
  position: relative; background: #fff; padding: 0 8px;
  color: #6b7280; font-size: 14px;
}
.hint { margin-top: 4px; font-size: 12px; color: #6b7280; }
.check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 20px; font-size: 14px; color: #374151; }
.check input { margin-top: 3px; }
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.5); display: none;
  align-items: center; justify-content: center; padding: 16px;
}
.modal.open { display: flex; }
.modal-panel {
  background: #fff; border-radius: 8px; width: 100%; max-width: 28rem;
  overflow: hidden; transform: scale(.95); opacity: 0; transition: transform .25s, opacity .25s;
}
.modal.open .modal-panel { transform: scale(1); opacity: 1; }
.modal-head {
  padding: 20px 24px; border-bottom: 1px solid #e5e7eb;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-head h3 { margin: 0; font-size: 1.25rem; }
.modal-close {
  border: 0; background: transparent; color: #9ca3af; cursor: pointer;
  font-size: 20px; line-height: 1;
}
.modal-close:hover { color: var(--primary); }
.modal-body { padding: 24px; max-height: min(80vh, 640px); overflow: auto; }
