/* ============================================================
   森煜 · 内部应用中心
   设计参考 HeroUI：中性底色、圆角卡片、克制的紫色主色
   ============================================================ */

:root {
  --bg: #f5f6fa;
  --bg-elevated: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f1f2f7;
  --surface-3: #e8eaf2;
  --text: #12141c;
  --text-soft: #3d4250;
  --muted: #6b7280;
  --muted-2: #9aa0ad;
  --border: #e7e9f1;
  --border-strong: #d7dae6;
  --primary: #5b5bd6;
  --primary-2: #7c5cf0;
  --primary-ink: #4644bd;
  --primary-soft: rgba(91, 91, 214, 0.09);
  --primary-soft-2: rgba(91, 91, 214, 0.16);
  --ok: #17a65f;
  --ok-soft: rgba(23, 169, 95, 0.11);
  --warn: #c07a09;
  --warn-soft: rgba(245, 165, 36, 0.14);
  --danger: #d92d20;
  --danger-soft: rgba(217, 45, 32, 0.09);
  --violet-soft: rgba(124, 92, 240, 0.12);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 2px 6px rgba(16, 24, 40, 0.05), 0 12px 28px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 60px rgba(18, 20, 28, 0.14);
  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --nav-h: 64px;
}

[data-theme="dark"] {
  --bg: #08090e;
  --bg-elevated: #0b0d13;
  --surface: #11131b;
  --surface-2: #171a24;
  --surface-3: #1e222e;
  --text: #eef0f6;
  --text-soft: #c9cede;
  --muted: #98a1b5;
  --muted-2: #6f788c;
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.13);
  --primary: #7b7bf0;
  --primary-2: #9a6ff5;
  --primary-ink: #a9a9ff;
  --primary-soft: rgba(123, 123, 240, 0.13);
  --primary-soft-2: rgba(123, 123, 240, 0.2);
  --ok: #3ddc84;
  --ok-soft: rgba(61, 220, 132, 0.11);
  --warn: #f5b544;
  --warn-soft: rgba(245, 181, 68, 0.12);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, 0.1);
  --violet-soft: rgba(154, 111, 245, 0.16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35), 0 16px 36px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-2);
}

button {
  font-family: inherit;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.is-hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.block {
  display: block;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------------------------- 顶部导航 ---------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.nav-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 6px 16px rgba(91, 91, 214, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 14.5px;
  letter-spacing: 0.01em;
}

.brand-text small {
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  font-weight: 600;
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.16s, color 0.16s;
}

.nav-links a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-links a.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-form {
  display: inline;
  margin: 0;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

.theme-icon-sun {
  display: none;
}

[data-theme="dark"] .theme-icon-sun {
  display: block;
}

[data-theme="dark"] .theme-icon-moon {
  display: none;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-soft-2), var(--violet-soft));
  color: var(--primary-ink);
  font-weight: 700;
  font-size: 13px;
}

.avatar--sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-meta strong {
  font-size: 12.5px;
  font-weight: 600;
}

.user-meta small {
  font-size: 10.5px;
  color: var(--muted-2);
}

/* ---------------------------- 通用布局 ---------------------------- */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 28px 56px;
}

.section {
  margin-top: 34px;
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.site-foot {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 28px 34px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: 12px;
}

.site-foot .dot {
  opacity: 0.6;
}

/* ---------------------------- 按钮 ---------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s, box-shadow 0.16s, background 0.16s, border-color 0.16s, color 0.16s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 6px 18px rgba(91, 91, 214, 0.24);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 10px 24px rgba(91, 91, 214, 0.34);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-soft);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-danger-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--danger);
}

.btn-danger-ghost:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-block {
  width: 100%;
  min-height: 44px;
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 9px;
}

.btn-xs {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
  border-radius: 7px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--primary-2);
}

/* ---------------------------- 表单 ---------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-label em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 4px;
  padding: 1px 5px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.field-hint {
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

.input-affix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-affix input {
  padding-right: 96px;
}

.affix-btn {
  position: absolute;
  right: 5px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.affix-btn:hover {
  background: var(--primary-soft);
}

.affix-btn:disabled {
  color: var(--muted-2);
  cursor: not-allowed;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field--full {
  grid-column: 1 / -1;
}

.color-input {
  padding: 5px !important;
  height: 42px;
  cursor: pointer;
}

.radio-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.radio-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
}

.radio-item input {
  accent-color: var(--primary);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.check-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  color: transparent;
  flex: 0 0 auto;
}

.check-box .icon {
  width: 12px;
  height: 12px;
}

.check-row input:checked + .check-box {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.check-label {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.check-label strong {
  font-size: 12.5px;
  font-weight: 600;
}

.check-label small {
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-picker {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--bg-elevated);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ---------------------------- 徽标 / 提示 ---------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge--soft {
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.badge--ghost {
  background: transparent;
  border: 1px solid var(--border);
}

.badge--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge--muted {
  background: var(--surface-2);
  color: var(--muted-2);
}

.badge--violet {
  background: var(--violet-soft);
  color: var(--primary-ink);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

.status--ok {
  color: var(--ok);
}

.status--warn {
  color: var(--warn);
}

.status--muted {
  color: var(--muted-2);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  margin-bottom: 14px;
}

.alert .icon {
  margin-top: 1px;
}

.alert--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.alert--info {
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.alert--success {
  background: var(--ok-soft);
  color: var(--ok);
}

.banner {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 15px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 12.5px;
}

.banner--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.banner strong {
  display: block;
  margin-bottom: 2px;
}

.banner span {
  color: color-mix(in srgb, currentColor 78%, var(--text));
}

/* ---------------------------- 登录 / 注册 ---------------------------- */

.auth-body {
  background: var(--bg);
}

.auth-page {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 600px at 8% 0%, rgba(124, 92, 240, 0.5), transparent 60%),
    radial-gradient(700px 500px at 90% 90%, rgba(45, 212, 191, 0.22), transparent 60%),
    linear-gradient(150deg, #12132a 0%, #1b1c3d 55%, #101322 100%);
  color: #fff;
}

.auth-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 30% 30%, #000 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 30%, #000 20%, transparent 72%);
}

.auth-visual-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.55;
  animation: float 14s ease-in-out infinite;
}

.auth-visual-glow--a {
  width: 340px;
  height: 340px;
  right: -80px;
  top: 12%;
  background: radial-gradient(circle, rgba(154, 111, 245, 0.55), transparent 65%);
}

.auth-visual-glow--b {
  width: 260px;
  height: 260px;
  left: 6%;
  bottom: -60px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 65%);
  animation-delay: -6s;
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -18px, 0) scale(1.04);
  }
}

.auth-visual-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 40px 48px 34px;
}

.brand--light,
.brand--light:hover {
  color: #fff;
}

.brand-mark--light {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.brand--light .brand-text small {
  color: rgba(255, 255, 255, 0.5);
}

.auth-copy {
  margin: auto 0;
  max-width: 470px;
  padding: 40px 0;
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.55);
}

.auth-copy h1 {
  margin: 16px 0 18px;
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.28;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.auth-copy > p {
  font-size: 14px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.66);
  max-width: 400px;
}

.auth-points {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.auth-points .icon {
  width: 30px;
  height: 30px;
  padding: 7px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

.auth-points strong {
  color: #fff;
  font-weight: 600;
}

.auth-visual-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.42);
}

.auth-visual-foot .icon {
  width: 14px;
  height: 14px;
}

.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 24px 24px;
  background: linear-gradient(180deg, var(--bg), var(--bg-elevated));
  position: relative;
}

.auth-card {
  width: 100%;
  max-width: 408px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card--wide {
  max-width: 560px;
}

.auth-card-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 24px;
}

.auth-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 8px 22px rgba(91, 91, 214, 0.28);
  flex: 0 0 auto;
}

.auth-card-head h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.auth-card-head p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border-radius: 11px;
  background: var(--surface-2);
}

.auth-tab {
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s, color 0.16s, box-shadow 0.16s;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-divider {
  position: relative;
  margin: 20px 0 16px;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--border);
}

.auth-divider span {
  position: relative;
  padding: 0 10px;
  background: var(--surface);
  color: var(--muted-2);
  font-size: 11px;
}

/* Altcha 人机校验：widget 使用 Shadow DOM，只能用 CSS 变量对齐表单控件 */
.altcha-row {
  /* 间距交给 .auth-form 的 gap，避免与相邻字段不一致 */
  margin: 0;
}

.altcha-row altcha-widget {
  display: block;
  width: 100%;
  /* 与 .field input 对齐：满宽、42px 高、10px 圆角、同边框同底色 */
  font-size: 13.5px;
  --altcha-max-width: 100%;
  --altcha-border-width: 1px;
  --altcha-border-radius: 10px;
  --altcha-border-color: var(--border-strong);
  --altcha-padding: 9px 12px;
  --altcha-color-base: var(--surface);
  --altcha-color-base-content: var(--text);
  --altcha-color-neutral: var(--border-strong);
  --altcha-color-primary: var(--primary);
  --altcha-color-success: #16a34a;
  --altcha-checkbox-size: 22px;
}

.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.auth-switch a {
  font-weight: 600;
}

.auth-legal {
  margin-top: 22px;
  font-size: 10.5px;
  color: var(--muted-2);
}

/* ---------------------------- 首页 ---------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(760px 340px at 8% -30%, var(--primary-soft-2), transparent 70%),
    radial-gradient(600px 300px at 95% 120%, rgba(45, 212, 191, 0.12), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.hero-glow {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
  mask-image: linear-gradient(110deg, #000, transparent 65%);
  -webkit-mask-image: linear-gradient(110deg, #000, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  padding: 34px 36px;
  flex-wrap: wrap;
}

.hero-copy h1 {
  margin: 9px 0 8px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.hero-sub {
  max-width: 560px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.hero-stats {
  display: flex;
  gap: 10px;
}

.stat {
  min-width: 96px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(6px);
}

.stat strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat span {
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 19px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.section-head p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
  max-width: 100%;
}

.search-box .icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.filter-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.chip {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s;
}

.chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.chip.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 16px;
}

.app-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: rise 0.4s ease both;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--app-accent, var(--primary)) 35%, var(--border));
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.app-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.app-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--app-accent, var(--primary)) 12%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--app-accent, var(--primary)) 22%, transparent);
  color: var(--app-accent, var(--primary));
  font-size: 21px;
  font-weight: 700;
  overflow: hidden;
  flex: 0 0 auto;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-icon--lg {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  font-size: 23px;
}

.app-icon--sm {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 15px;
}

.app-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-card-title h3 {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.app-desc {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 41px;
}

.app-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.app-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.app-card-foot .icon {
  width: 15px;
  height: 15px;
  color: var(--muted-2);
  transition: transform 0.18s, color 0.18s;
}

.app-card:hover .app-card-foot .icon {
  transform: translateX(3px);
  color: var(--app-accent, var(--primary));
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 60px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  color: var(--muted);
}

.empty .icon {
  width: 30px;
  height: 30px;
  color: var(--muted-2);
}

.empty h3 {
  font-size: 14px;
  color: var(--text);
}

.empty p {
  font-size: 12.5px;
}

.empty--sm {
  padding: 26px 16px;
}

.list-foot {
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--muted-2);
}

/* ---------------------------- 应用页 ---------------------------- */

.app-body .site-foot {
  display: none;
}

.app-body .page {
  height: calc(100vh - var(--nav-h));
  padding-top: 20px;
  padding-bottom: 14px;
  display: flex;
}

.app-page {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.app-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.back-link .icon {
  width: 14px;
  height: 14px;
}

.back-link:hover {
  color: var(--text);
}

.app-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-title-row h1 {
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.app-title-row p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  max-width: 640px;
}

.app-page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 18px;
}

.frame-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

.frame-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  transition: opacity 0.3s;
}

.frame-loading.is-hidden {
  opacity: 0;
  pointer-events: none;
  display: flex !important;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 2.5px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.app-page-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 12px;
  font-size: 11px;
  color: var(--muted-2);
}

.app-foot-note {
  margin-left: auto;
}

/* ---------------------------- 管理后台 ---------------------------- */

.admin-body {
  background: var(--bg);
}

.admin-shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.brand--side {
  padding: 0 8px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.16s, color 0.16s;
}

.admin-nav-item .icon {
  width: 17px;
  height: 17px;
}

.admin-nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.admin-nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-weight: 600;
}

.admin-side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}

.admin-back:hover {
  background: var(--surface-2);
  color: var(--text);
}

.admin-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.admin-main {
  min-width: 0;
}

.admin-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 34px 0;
}

.admin-top h1 {
  font-size: 24px;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-top: 5px;
}

.admin-sub {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted);
}

.admin-content {
  padding: 24px 34px 48px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  flex: 0 0 auto;
}

.stat-card div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.stat-card strong {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.stat-card div span {
  font-size: 11px;
  color: var(--muted);
}

.stat-card em {
  margin-left: auto;
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted-2);
}

.admin-columns {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.admin-columns--invite {
  grid-template-columns: 380px minmax(0, 1fr);
  align-items: start;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.panel-head h2 {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.panel-head p {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted-2);
}

.panel--form {
  padding-bottom: 0;
}

.panel--form .admin-form,
.panel--form .alert,
.panel--form .code-box {
  margin: 18px 20px;
}

.panel--form .panel-head {
  margin-bottom: 0;
}

.panel--form > .btn-block {
  margin: 0 20px 18px;
  width: calc(100% - 40px);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-soft);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: var(--bg-elevated);
}

.cell-app,
.cell-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cell-app div,
.cell-user div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.cell-app strong,
.cell-user strong {
  font-size: 12.5px;
  color: var(--text);
}

.cell-app span.mono,
.cell-user span.mono {
  font-size: 10.5px;
  color: var(--muted-2);
}

.cell-url {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.cell-actions {
  text-align: right;
  white-space: nowrap;
}

.cell-actions-inner {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
  align-items: center;
}

.cell-detail {
  max-width: 280px;
}

.cell-detail code {
  display: block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10.5px;
}

/* ------------------------------ 意见反馈 ------------------------------ */

.fb-hero {
  margin-bottom: 18px;
}

.fb-hero h1 {
  margin: 6px 0;
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.fb-hero-desc {
  max-width: 720px;
  font-size: 13px;
  color: var(--muted);
}

.fb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.fb-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px 20px;
}

.fb-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fb-type {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fb-type:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.fb-type.is-active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-ink);
  font-weight: 600;
}

.fb-drop {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.fb-drop.is-dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.fb-drop-hint {
  font-size: 11.5px;
  color: var(--muted-2);
}

.fb-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.fb-thumb {
  position: relative;
  display: block;
  width: 76px;
  height: 76px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}

.fb-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fb-thumb-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 20, 28, 0.66);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.fb-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fb-meta {
  font-size: 11.5px;
  color: var(--muted-2);
}

.fb-list {
  display: flex;
  flex-direction: column;
  padding: 4px 20px 12px;
}

.fb-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.fb-item:last-child {
  border-bottom: 0;
}

.fb-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.fb-item-time {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted-2);
}

.fb-item-content {
  font-size: 12.5px;
  color: var(--text-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.fb-reply {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--primary-soft);
}

.fb-reply-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary-ink);
}

.fb-reply p {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-soft);
  white-space: pre-wrap;
}

.fb-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

.fb-pager-info {
  font-size: 11.5px;
  color: var(--muted-2);
}

.fb-filter {
  flex-wrap: wrap;
  padding: 14px 20px 0;
}

.fb-admin-list {
  padding: 4px 20px 8px;
}

.fb-admin-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.fb-admin-item:last-child {
  border-bottom: 0;
}

.fb-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.fb-admin-who {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
}

.fb-admin-who strong {
  color: var(--text);
}

.fb-admin-who .mono,
.fb-admin-phone {
  font-size: 11px;
  color: var(--muted-2);
}

.fb-admin-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fb-admin-tags .fb-item-time {
  margin-left: 0;
}

.fb-admin-form {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.fb-admin-fields {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.fb-admin-fields .field-label {
  font-size: 11px;
}

.fb-admin-fields select,
.fb-admin-fields input {
  min-height: 36px;
  font-size: 12.5px;
}

.log-list {
  padding: 6px 20px 12px;
}

.log-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
}

.log-item:last-child {
  border-bottom: 0;
}

.log-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex: 0 0 auto;
}

.log-main {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  min-width: 0;
}

.log-main strong {
  font-size: 12px;
  font-weight: 600;
}

.log-main span {
  font-size: 10.5px;
  color: var(--muted-2);
}

.log-item time {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
}

.mini-app-list {
  padding: 8px 20px 14px;
}

.mini-app {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
}

.mini-app:last-child {
  border-bottom: 0;
}

.mini-app div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.mini-app strong {
  font-size: 12.5px;
}

.mini-app div span {
  font-size: 10.5px;
  color: var(--muted-2);
}

.mini-app .badge {
  margin-left: auto;
}

.code-box {
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--primary) 40%, var(--border));
  border-radius: 12px;
  background: var(--primary-soft);
}

.code-value {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 7px 0 6px;
}

.code-value code {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary-ink);
}

/* ---------------------------- 错误页 ---------------------------- */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  min-height: 50vh;
}

.error-code {
  font-size: 66px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page h1 {
  margin: 14px 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.error-page p {
  color: var(--muted);
  font-size: 13px;
  max-width: 460px;
}

.error-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
  justify-content: center;
}

.standalone-error {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: var(--bg);
}

/* ---------------------------- Toast ---------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  z-index: 90;
  max-width: min(92vw, 480px);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast--error {
  background: var(--danger);
  color: #fff;
}

/* ---------------------------- 响应式 ---------------------------- */

@media (max-width: 1080px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-columns,
  .admin-columns--invite,
  .fb-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-visual {
    display: none;
  }
  .auth-main {
    min-height: 100vh;
  }
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-side {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    overflow-x: auto;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .brand--side .brand-text {
    display: none;
  }
  .admin-nav {
    flex-direction: row;
    gap: 4px;
  }
  .admin-nav-item {
    white-space: nowrap;
    padding: 7px 10px;
  }
  .admin-side-foot {
    margin-top: 0;
    margin-left: auto;
    flex-direction: row;
    align-items: center;
  }
  .admin-back {
    display: none;
  }
  .admin-user {
    border-top: 0;
    padding-top: 0;
  }
  .admin-top,
  .admin-content {
    padding-left: 20px;
    padding-right: 20px;
  }
  .fb-admin-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-inner {
    padding: 0 16px;
    gap: 12px;
  }
  .nav-links {
    gap: 0;
  }
  .nav-links a {
    padding: 7px 9px;
    font-size: 12.5px;
  }
  .user-meta {
    display: none;
  }
  .user-chip {
    padding: 3px;
  }
  .page {
    padding: 22px 16px 40px;
  }
  .hero-inner {
    padding: 24px 20px;
    gap: 22px;
  }
  .hero-stats {
    width: 100%;
  }
  .stat {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
  }
  .stat strong {
    font-size: 18px;
  }
  .section-head {
    align-items: stretch;
  }
  .search-box {
    width: 100%;
  }
  .app-grid {
    grid-template-columns: 1fr;
  }
  .app-body .page {
    height: auto;
    display: block;
  }
  .app-page {
    height: auto;
    min-height: 0;
  }
  .frame-wrap {
    height: 68vh;
  }
  .app-page-actions {
    padding-top: 0;
  }
  .field-row,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-top {
    padding-top: 20px;
  }
  .admin-top-actions {
    display: none;
  }
  .data-table th,
  .data-table td {
    padding: 9px 10px;
  }
  .auth-card {
    padding: 24px 20px;
  }
  .auth-main {
    padding: 20px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
