/* ============================================================
   群管 QQ 机器人控制台 — 现代 UI 样式体系
   版本 2.0 | 深色主题默认 + 浅色主题切换 | 无外部依赖
   ============================================================ */

/* ---------- 1. 设计令牌（Design Tokens） ---------- */
:root {
  /* 色板 — 深色（默认） */
  --bg: #0b0f17;
  --bg-2: #0f1521;
  --surface: #131a28;
  --surface-2: #182132;
  --surface-3: #202b40;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .12);
  --text: #e9eef7;
  --text-2: #a3aec2;
  --text-3: #67748c;
  --accent: #f3b14a;
  --accent-2: #4ad6c6;
  --accent-grad: linear-gradient(135deg, #f6c56a, #e29a2f);
  --accent-grad-2: linear-gradient(135deg, #4ad6c6, #2ea8d8);
  --danger: #ef6b6b;
  --danger-bg: rgba(239, 107, 107, .12);
  --ok: #62c58d;
  --ok-bg: rgba(98, 197, 141, .12);
  --warn: #f3c56a;
  --warn-bg: rgba(243, 197, 106, .12);

  /* 字体 */
  --font-sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Courier New", monospace;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .18);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .22);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .3);

  /* 布局 */
  --sidebar-w: 264px;
  --topbar-h: 60px;

  /* 过渡 */
  --t-fast: .16s ease;
  --t-base: .26s cubic-bezier(.4, 0, .2, 1);
}

/* 浅色主题 */
[data-theme="light"] {
  --bg: #f2f5fa;
  --bg-2: #e8edf6;
  --surface: #ffffff;
  --surface-2: #f4f7fc;
  --surface-3: #e9eef7;
  --border: rgba(15, 23, 42, .08);
  --border-strong: rgba(15, 23, 42, .14);
  --text: #1c2434;
  --text-2: #55627a;
  --text-3: #8a96ab;
  --danger: #d64545;
  --danger-bg: rgba(214, 69, 69, .1);
  --ok: #2f9e63;
  --ok-bg: rgba(47, 158, 99, .1);
  --warn: #b8860b;
  --warn-bg: rgba(184, 134, 11, .12);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, .12);
}

/* ---------- 2. 基础 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-sans);
  background:
    radial-gradient(1100px 480px at 12% -8%, rgba(243, 177, 74, .1), transparent 55%),
    radial-gradient(900px 420px at 105% 0%, rgba(74, 214, 198, .08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[data-theme="light"] body {
  background:
    radial-gradient(1100px 480px at 12% -8%, rgba(243, 177, 74, .14), transparent 55%),
    radial-gradient(900px 420px at 105% 0%, rgba(74, 214, 198, .12), transparent 55%),
    var(--bg);
}
a { color: var(--accent-2); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent); }
code, .mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); word-break: break-all; background: rgba(255,255,255,.04); padding: 1px 6px; border-radius: 6px; }
[data-theme="light"] code, [data-theme="light"] .mono { background: rgba(15,23,42,.05); }
::selection { background: rgba(243, 177, 74, .3); }

/* 动画 */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
main .page-head, main .hero, main > section, main > article { animation: slideUp var(--t-base) both; }
main > section:nth-child(2), main > article:nth-child(2) { animation-delay: .04s; }
main > section:nth-child(3), main > article:nth-child(3) { animation-delay: .08s; }

/* ---------- 3. 应用骨架 ---------- */
body { --sidebar-w: var(--sidebar-w); }
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; transition: grid-template-columns var(--t-base); }
body.sidebar-collapsed { --sidebar-w: 78px; }

/* ---------- 4. 侧边栏 ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 20px 14px 16px;
  gap: 8px;
  z-index: 40;
  transition: transform var(--t-base), width var(--t-base);
  overflow-x: hidden;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 8px 18px;
  min-width: 0;
}
.brand-logo {
  flex: 0 0 auto;
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--accent-grad);
  color: #241505;
  box-shadow: 0 6px 18px rgba(243, 177, 74, .35);
}
.brand-name { min-width: 0; transition: opacity var(--t-base); white-space: nowrap; }
.brand-name strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand-name small { display: block; color: var(--text-3); font-size: 11px; margin-top: 2px; }
.sidebar-collapse {
  margin-left: auto; flex: 0 0 auto;
  background: transparent; border: 1px solid var(--border); color: var(--text-3);
  width: 30px; height: 30px; border-radius: 9px; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  transition: all var(--t-fast);
}
.sidebar-collapse:hover { color: var(--accent); border-color: var(--border-strong); background: var(--surface-2); }
body.sidebar-collapsed .sidebar-collapse svg { transform: rotate(180deg); }
body.sidebar-collapsed .brand-name, body.sidebar-collapsed .nav-group-title, body.sidebar-collapsed .nav-text, body.sidebar-collapsed .sidebar-foot-label { opacity: 0; width: 0; overflow: hidden; }
body.sidebar-collapsed .brand { justify-content: center; gap: 0; }
body.sidebar-collapsed .nav-link { justify-content: center; padding: 12px; }
body.sidebar-collapsed .sidebar-foot { align-items: center; }

/* 导航 */
.nav { display: flex; flex-direction: column; gap: 18px; flex: 1; overflow-y: auto; scrollbar-width: thin; }
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-group-title {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); padding: 0 12px 6px; margin: 0;
  white-space: nowrap; transition: opacity var(--t-base);
}
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 12px;
  color: var(--text-2); font-weight: 500; font-size: 13.5px;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  white-space: nowrap; position: relative;
}
.nav-link svg { flex: 0 0 auto; opacity: .75; }
.nav-link:hover { background: var(--surface-2); color: var(--text); transform: translateX(2px); }
.nav-link.active {
  background: linear-gradient(90deg, rgba(243, 177, 74, .14), rgba(243, 177, 74, .03));
  color: var(--accent); font-weight: 600;
}
.nav-link.active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 3px; background: var(--accent-grad);
}
.nav-text { transition: opacity var(--t-base); }

/* 侧栏底部 */
.sidebar-foot {
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid var(--border); padding-top: 14px;
}
.sidebar-foot-label { font-size: 11px; color: var(--text-3); padding: 0 12px 4px; white-space: nowrap; transition: opacity var(--t-base); }
.sidebar-foot .nav-link.logout { color: var(--text-3); }
.sidebar-foot .nav-link.logout:hover { color: var(--danger); background: var(--danger-bg); transform: none; }

/* 顶部栏（移动端抽屉触发） */
.topbar {
  display: none;
  position: sticky; top: 0; z-index: 45;
  height: var(--topbar-h);
  align-items: center; gap: 12px; padding: 0 18px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); display: grid; place-items: center; cursor: pointer;
  transition: all var(--t-fast);
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--accent); }
.topbar-brand { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; }

/* 遮罩（移动端抽屉） */
.overlay {
  position: fixed; inset: 0; z-index: 35;
  background: rgba(5, 8, 14, .55);
  opacity: 0; pointer-events: none; transition: opacity var(--t-base);
}
body.sidebar-open .overlay { opacity: 1; pointer-events: auto; }

/* ---------- 5. 主内容区 ---------- */
.content { padding: 34px 40px 72px; min-width: 0; max-width: 1460px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.03em; line-height: 1.25; }
.eyebrow {
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  font-size: 11px; font-weight: 600; margin: 0 0 8px; display: flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--accent-grad); display: inline-block; }
h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
p, .lead { color: var(--text-2); line-height: 1.75; }
.hint { font-size: 13px; color: var(--text-3); }

/* ---------- 6. Hero ---------- */
.hero {
  display: flex; justify-content: space-between; gap: 28px; align-items: stretch;
  background:
    radial-gradient(700px 260px at 88% -30%, rgba(74, 214, 198, .16), transparent 60%),
    radial-gradient(600px 240px at -10% 110%, rgba(243, 177, 74, .14), transparent 55%),
    linear-gradient(160deg, var(--surface-3), var(--surface));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 30px 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 26px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,.03));
  pointer-events: none;
}
.hero h1 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.03em; }
.hero-meta { display: grid; gap: 10px; min-width: 300px; align-content: center; position: relative; z-index: 1; }
.hero-meta div {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: rgba(0, 0, 0, .16);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
[data-theme="light"] .hero-meta div { background: rgba(255,255,255,.55); }
.hero-meta div:hover { border-color: var(--border-strong); transform: translateX(-3px); }
.hero-meta span { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.hero-meta strong { color: var(--text); }

/* ---------- 7. 统计卡 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0 8px; }
.stats article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative; overflow: hidden;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.stats article::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent-grad); opacity: 0; transition: opacity var(--t-fast);
}
.stats article:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.stats article:hover::before { opacity: 1; }
.stat-head { display: flex; justify-content: space-between; align-items: center; }
.stat-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--accent-2);
}
.stats small { color: var(--text-3); font-size: 12.5px; }
.stats strong { display: block; font-size: 26px; letter-spacing: -.02em; line-height: 1.1; }

/* ---------- 8. 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 16px 0;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.card header a { font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; align-items: start; }

/* ---------- 9. 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); scrollbar-width: thin; }
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 13.5px; }
th { color: var(--text-3); font-weight: 600; font-size: 12px; letter-spacing: .02em; white-space: nowrap; }
tbody tr { transition: background var(--t-fast); }
tbody tr:hover { background: rgba(255, 255, 255, .025); }
[data-theme="light"] tbody tr:hover { background: rgba(15, 23, 42, .03); }
tbody tr:last-child td { border-bottom: 0; }
.empty { color: var(--text-3); text-align: center; padding: 28px 12px; }

/* ---------- 10. 状态胶囊 / 徽章 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--surface-3); color: var(--text-2);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.tag.approved, .tag.muted, .tag.active, .tag.auto_approved_by_platform { background: var(--ok-bg); color: var(--ok); }
.tag.pending, .tag.approved_by_platform { background: var(--warn-bg); color: var(--warn); }
.tag.approve_failed, .tag.left { background: var(--danger-bg); color: var(--danger); }
.tag.approved_by_platform { background: var(--warn-bg); color: var(--warn); }

/* ---------- 11. 列表 ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--border); align-items: center; }
.list li:last-child { border-bottom: 0; }
.list li:hover { background: rgba(255, 255, 255, .02); border-radius: 8px; }
[data-theme="light"] .list li:hover { background: rgba(15, 23, 42, .02); }

/* ---------- 12. 表单控件 ---------- */
label { display: grid; gap: 7px; color: var(--text-2); font-size: 13px; }
input, textarea, select {
  font: inherit; color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 13px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243, 177, 74, .18);
  background: var(--surface);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { resize: vertical; min-height: 80px; }

/* 美化 Select */
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a96ab' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 34px; cursor: pointer;
}
select:hover { border-color: var(--border-strong); }

/* Switch 开关（label.check 内的复选框自动生效） */
label.check { display: flex; align-items: center; gap: 10px; color: var(--text-2); cursor: pointer; }
label.check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 42px; height: 24px; flex: 0 0 auto;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  cursor: pointer; position: relative;
  transition: background var(--t-base), border-color var(--t-base);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .25);
}
label.check input[type="checkbox"]::before {
  content: ""; position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .3);
  transition: left var(--t-base), background var(--t-base);
}
label.check input[type="checkbox"]:checked {
  background: var(--accent-grad); border-color: transparent;
}
label.check input[type="checkbox"]:checked::before { left: 21px; }
label.check input[type="checkbox"]:focus-visible { box-shadow: 0 0 0 3px rgba(243, 177, 74, .25); }

/* 按钮 */
button {
  font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 13.5px; width: fit-content;
  transition: all var(--t-fast); white-space: nowrap;
}
button[type="submit"] {
  background: var(--accent-grad); color: #241505; border: 0;
  box-shadow: 0 4px 14px rgba(243, 177, 74, .3);
}
button[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(243, 177, 74, .4); }
button[type="submit"]:active { transform: translateY(0); }
button:hover { border-color: var(--border-strong); background: var(--surface-2); }
.ghost { background: transparent; border: 1px solid var(--border); color: var(--text-2); font-weight: 500; box-shadow: none; }
.ghost:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); transform: none; box-shadow: none; }
.btn-danger { background: transparent; border: 1px solid rgba(239, 107, 107, .4); color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form { display: inline-flex; }

/* ---------- 13. Alert / Toast ---------- */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-md);
  margin-bottom: 14px; font-size: 13.5px;
  border: 1px solid var(--border);
  animation: slideUp var(--t-base) both;
  position: relative;
}
.alert.error { background: var(--danger-bg); color: var(--danger); border-color: rgba(239, 107, 107, .25); }
.alert.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(98, 197, 141, .25); }
.alert-close {
  margin-left: auto; background: transparent; border: 0; color: inherit;
  width: 26px; height: 26px; padding: 0; border-radius: 8px; flex: 0 0 auto;
}
.alert-close:hover { background: rgba(255, 255, 255, .12); }
.alert.fade-out { opacity: 0; transform: translateY(-6px); transition: all .5s ease; }

/* 全局 Toast 容器 */
.toast-container { position: fixed; top: 18px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 260px; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md); padding: 12px 16px;
  box-shadow: var(--shadow-lg); font-size: 13.5px;
  animation: toastIn var(--t-base) both;
  display: flex; align-items: flex-start; gap: 10px;
}
.toast.ok { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--danger); }
.toast-icon { flex: 0 0 auto; margin-top: 1px; }

/* ---------- 14. Tab / 搜索 / 步骤 ---------- */
.tabs { display: flex; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 4px; }
.tabs a { padding: 7px 16px; border-radius: var(--radius-pill); color: var(--text-2); font-size: 13px; font-weight: 500; transition: all var(--t-fast); }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--accent-grad); color: #241505; font-weight: 600; box-shadow: 0 3px 10px rgba(243, 177, 74, .3); }
.search, .kw-row { display: flex; gap: 8px; }
.row-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.search input { flex: 1; min-width: 200px; }
.steps { color: var(--text-2); line-height: 2; padding-left: 20px; margin: 6px 0 2px; }
.steps li::marker { color: var(--accent); font-weight: 700; }

/* ---------- 15. 按钮菜单编辑器 ---------- */
.menu-row { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; margin: 12px 0; background: var(--surface-2); }
.menu-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--text-2); font-weight: 600; }
.menu-btns { display: grid; gap: 10px; }
.menu-btn { display: grid; grid-template-columns: 1fr 1fr 1fr 1.2fr 110px 90px 110px auto; gap: 8px; align-items: center; }
.menu-btn select, .menu-btn input { padding: 8px 10px; font-size: 12.5px; }

/* ---------- 16. 公开页（登录 / 初始化） ---------- */
body.public {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(800px 400px at 15% 10%, rgba(243, 177, 74, .12), transparent 55%),
    radial-gradient(700px 360px at 90% 85%, rgba(74, 214, 198, .1), transparent 55%),
    var(--bg);
  padding: 24px;
}
.public-wrap { width: min(460px, 100%); animation: slideUp var(--t-base) both; }
.public-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; }
.public-brand .brand-logo { width: 56px; height: 56px; border-radius: 18px; }
.public-brand .brand-logo svg { width: 30px; height: 30px; }
.public-brand h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.public-brand p { margin: 0; color: var(--text-3); font-size: 13px; }
.auth-card {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 30px 32px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { margin: 0 0 4px; font-size: 24px; }
.auth-card .eyebrow { justify-content: center; margin-bottom: 12px; }
.auth-card .eyebrow::before, .auth-card .eyebrow::after { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--accent-grad); }
.auth-card .eyebrow::after { display: inline-block; }
.auth-card .form { gap: 14px; }
.auth-card .lead { margin: 14px 0 4px; }
.public-foot {
  position: fixed; bottom: 18px; left: 0; right: 0;
  text-align: center; color: var(--text-3); font-size: 12px;
}

/* ---------- 17. 响应式 ---------- */
@media (max-width: 1280px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .content { padding: 28px 28px 60px; }
}
@media (max-width: 1024px) {
  body { --sidebar-w: 0px; }
  .app { grid-template-columns: 1fr; }
  .topbar { display: flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh;
    width: min(288px, 82vw);
    transform: translateX(-105%);
    box-shadow: var(--shadow-lg);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-collapse { display: none; }
  .content { padding: 24px 20px 56px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .hero { flex-direction: column; }
  .hero-meta { min-width: 0; width: 100%; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .content { padding: 18px 14px 48px; }
  .page-head h1 { font-size: 24px; }
  .hero { padding: 22px; }
  .menu-btn { grid-template-columns: 1fr 1fr; }
  .card { padding: 16px; }
}
