/* =====================================================================
   EA 量化策略资源站 - 样式表
   深色 + 玻璃拟态（liquid glass）风格

   设计约定：所有颜色都走 CSS 变量，改主题只改 :root 即可
   ===================================================================== */

:root {
  --bg:              #000000;
  --bg-soft:         #0a0a0a;
  --surface:         rgba(255, 255, 255, 0.03);
  --surface-hover:   rgba(255, 255, 255, 0.06);
  --border:          rgba(255, 255, 255, 0.12);
  --border-strong:   rgba(255, 255, 255, 0.22);

  --text:            #ffffff;
  --text-dim:        rgba(255, 255, 255, 0.72);
  --text-mute:       rgba(255, 255, 255, 0.48);
  --text-faint:      rgba(255, 255, 255, 0.3);

  --accent:          #3b82f6;
  --accent-soft:     #93c5fd;
  --success:         #34d399;
  --warning:         #fbbf24;
  --danger:          #f87171;

  --radius:          9999px;
  --radius-lg:       16px;
  --radius-md:       12px;
  --radius-sm:       8px;

  --font-body:       "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-heading:    Georgia, "Times New Roman", serif;
  --font-mono:       "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --maxw:            1360px;

  /* ---- 主题系统扩展变量（默认值 = 原纯黑风格；后台换主题时由 ThemeService 覆盖）---- */
  --text-strong:     #ffffff;
  --side-bg:         #060606;
  --nav-bg:          linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.85) 60%, rgba(0,0,0,0) 100%);
  --bar-bg:          rgba(0,0,0,0.86);
  --glass-bg:        rgba(255, 255, 255, 0.01);
  --glass-bg-strong: rgba(255, 255, 255, 0.04);
  --glass-blur:      4px;
  --glass-blur-strong: 50px;
  --field-bg:        rgba(255,255,255,0.04);
  --field-bg-focus:  rgba(255,255,255,0.06);
  --option-bg:       #111111;
  --chip-bg:         rgba(255,255,255,0.12);
  --chip-soft-bg:    rgba(255,255,255,0.08);
  --row-head:        rgba(255,255,255,0.045);
  --row-hover:       rgba(255,255,255,0.03);
  --line-soft:       rgba(255,255,255,0.06);
  --soft-panel:      rgba(255,255,255,0.025);
  --thumb-bg:        linear-gradient(135deg, #111 0%, #1c1c1c 100%);
  --code-bg:         #0d0d0d;
  --toast-bg:        rgba(20,20,20,0.96);
  --shadow-lg:       0 10px 30px rgba(0,0,0,0.5);
  --shadow-card:     0 18px 50px rgba(0,0,0,0.45);
  --invert-bg:       #ffffff;
  --invert-text:     #000000;
  --invert-bg-hover: #e5e5e5;
  --accent-hover:    #2563eb;
  --accent-tint:     rgba(59,130,246,0.12);
  --accent-tint-soft: rgba(59,130,246,0.07);
  --accent-border:   rgba(147,197,253,0.5);
  --accent-banner:   linear-gradient(120deg, rgba(59,130,246,0.16) 0%, rgba(139,92,246,0.1) 100%);
  --bar-fill:        linear-gradient(180deg, rgba(147,197,253,0.85), rgba(59,130,246,0.35));
  --glow:            rgba(59,130,246,0.2);
  /* ---- 后台侧栏字号（想调大小，改这三个值即可，整栏统一生效）---- */
  --admin-menu-fs:    16px;   /* 一级菜单项：仪表盘/内容管理/分类管理/合作券商… */
  --admin-group-fs:   15px;   /* 分组标题：概览/内容/交易/用户/系统/其他 */
  --admin-submenu-fs: 14px;   /* 三级子菜单：基础信息/首页设置/投稿审核/授权码发布… */
  --admin-maxw:      100%;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-soft); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.3; }
h1 { font-size: 34px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p  { margin: 0 0 12px; }

.font-heading { font-family: var(--font-heading); }
.mono { font-family: var(--font-mono); }

.text-dim  { color: var(--text-dim); }
.text-mute { color: var(--text-mute); }
.text-faint{ color: var(--text-faint); }
.text-accent { color: var(--accent-soft); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

/* ---------------------------------------------------------------------
   玻璃拟态
   --------------------------------------------------------------------- */
.liquid-glass {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0) 40%,
    rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.15) 80%,
    rgba(255,255,255,0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.liquid-glass-strong {
  position: relative;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur-strong));
  -webkit-backdrop-filter: blur(var(--glass-blur-strong));
  box-shadow: 4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15);
  overflow: hidden;
}
.liquid-glass-strong::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.5) 0%,
    rgba(255,255,255,0.2) 20%,
    rgba(255,255,255,0) 40%,
    rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.2) 80%,
    rgba(255,255,255,0.5) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   布局
   --------------------------------------------------------------------- */
.site-main { min-height: 60vh; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

.page-header { padding: 24px 0 8px; }
.page-header h1 { margin-bottom: 8px; }
.page-header p { color: var(--text-mute); margin: 0; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 主内容 + 侧栏布局：桌面两列（侧栏宽度由内联 --side-w 控制，缺省 340px），
   窄屏自动塌成单列。取代各处「class="grid" + 内联 grid-template-columns:minmax(0,1fr) NNNpx」
   的写法——内联列定义优先级最高，会把移动端单列规则锁死，导致 H5 挤压变形。
   用法：<div class="ls-grid" style="--side-w:340px; margin-top:26px;"> */
.ls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side-w, 340px);
  gap: 20px;
  align-items: start;
}
/* 侧栏在左的反向布局（如生成器） */
.ls-grid.ls-grid--left { grid-template-columns: var(--side-w, 340px) minmax(0, 1fr); }
@media (max-width: 860px) {
  .ls-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: 26px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* 列表页网格：--cols / --cols-user 由后台「列表页每排卡片数」注入（2~12）。
   实际列数 = min(用户设定, --cols-cap)，--cols-cap 是按屏幕宽度给的上限，
   于是宽屏能真排到 8~12 列，窄屏又不会被挤成一条。
   第二条 grid-template-columns 是渐进增强：老浏览器不认 min() 就整个忽略它，
   继续走第一条 + 下面 !important 的窄屏兜底（二者的窄屏效果一致）。 */
.grid-flex {
  --gap: 18px;
  --cols-cap: 12;
  display: grid;
  gap: var(--gap);
  /* 固定 N 列：选几列就是几列。就算只有 1 张卡，也按 1/N 宽度摆位，不拉伸满宽 */
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  grid-template-columns: repeat(min(var(--cols-user, var(--cols, 3)), var(--cols-cap, 12)), minmax(0, 1fr));
}
/* 宽屏上限收敛：屏幕越窄，能排下的列数越少（只压上限，不会把小值放大） */
@media (max-width: 1700px) { .grid-flex { --cols-cap: 8; } }
@media (max-width: 1400px) { .grid-flex { --cols-cap: 6; } }
@media (max-width: 1100px) { .grid-flex { --cols-cap: 4; } }
@media (max-width: 820px)  { .grid-flex { --cols-cap: 2; } }
@media (max-width: 560px)  { .grid-flex { --cols-cap: 1; } }
/* 老浏览器兜底：不支持 min() 时直接压 --cols，!important 用于压过模板里内联的值 */
@media (max-width: 1100px) {
  .grid-flex { --cols: 3 !important; }
}
@media (max-width: 820px) {
  .grid-flex { --cols: 2 !important; }
}
@media (max-width: 560px) {
  .grid-flex { --cols: 1 !important; }
}

/* ---------------------------------------------------------------------
   导航
   --------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  padding: 12px 0 14px;
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.navbar-logo-mark {
  height: 44px;
  min-width: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 17px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.nav-left { display: flex; align-items: center; gap: 10px; }
/* 有图形 LOGO 时容器不再保留 68px 最小宽度，避免图形两侧出现大片空白 */
.navbar-logo-mark.has-img {
  min-width: auto;
  padding: 0;
}
/* 有图形 LOGO 时：站名紧跟图形（负外边距抵消），而 LOGO 组与导航之间留更宽的呼吸感 */
.nav-left:has(.navbar-logo-mark.has-img) { gap: 18px; }
.navbar-logo-mark.has-img + .navbar-logo-text { margin-left: -14px; }
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 6px;
  border-radius: var(--radius);
  gap: 2px;
}
.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--surface-hover); color: var(--text-strong); }
.nav-links a.active { background: var(--chip-bg); color: var(--text-strong); }

/* 导航主分类下拉：li.nav-drop hover/focus 展开面板 */
.nav-links li.nav-drop { position: relative; }
.nav-drop-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 168px;
  padding: 6px;
  border-radius: 12px;
  z-index: 50;
}
.nav-drop-panel a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-dim);
  white-space: nowrap;
}
.nav-drop-panel a:hover { background: var(--surface-hover); color: var(--text-strong); }
/* 触发区：li 与面板之间的 6px 空隙也计入 hover（用 ::before 桥接，防止鼠标划过时面板消失） */
.nav-drop::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: 8px;
}
.nav-drop:hover .nav-drop-panel,
.nav-drop:focus-within .nav-drop-panel { display: block; }
/* 移动端折叠菜单里：面板直接平铺展开（没有 hover） */
/* 导航项较多（含动态主分类可达 9+），≤1180px 必然挤压变形 → 收进右上角汉堡抽屉 */
/* ---------------------------------------------------------------------
   H5 侧边抽屉导航（右上角三条杠触发，≤1180px；桌面隐藏）
   形态参照 zibll：左侧滑出面板 + 遮罩，含搜索/全部分级导航/用户入口
   --------------------------------------------------------------------- */
.nav-drawer-mask { display: none; }
.nav-drawer { display: none; }

@media (max-width: 1180px) {
  .nav-drawer-mask {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 88;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .nav-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: min(320px, 84vw);
    z-index: 90;
    background: var(--bg);   /* 实底：背后页面文字不能透过抽屉 */
    border-right: 1px solid var(--line-soft);
    transform: translateX(-105%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  }
  body.nav-drawer-open .nav-drawer {
    transform: none;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.4);
  }
  body.nav-drawer-open .nav-drawer-mask { opacity: 1; pointer-events: auto; }
  body.nav-drawer-open { overflow: hidden; }  /* 抽屉打开时锁定背后页面滚动 */

  .nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 4px 12px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 12px;
  }
  .nav-drawer-brand {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-strong);
    font-family: var(--font-heading);
  }
  .nav-drawer-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 6px;
    display: flex;
  }
  .nav-drawer-close:hover { color: var(--text-strong); }

  .nav-drawer-search {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2px 6px 2px 12px;
    margin-bottom: 14px;
  }
  .nav-drawer-search input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-strong);
    font-size: 14px;
    font-family: inherit;
    padding: 9px 0;
  }
  .nav-drawer-search input::placeholder { color: var(--text-faint); }
  .nav-drawer-search button {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 8px;
    display: flex;
  }

  .nav-drawer-nav { display: flex; flex-direction: column; gap: 2px; }
  .nd-group { margin-bottom: 4px; }
  .nd-link {
    display: block;
    padding: 11px 14px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dim);
  }
  .nd-link:hover { background: var(--surface-hover); color: var(--text-strong); }
  .nd-link.is-on { background: var(--chip-bg); color: var(--text-strong); font-weight: 600; }
  /* 子分类横向流式：胶囊排满一行自动换行，不再竖排拉长抽屉 */
  .nd-subs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 2px 14px 10px 18px;
  }
  .nd-sub {
    display: inline-block;
    padding: 5px 11px;
    font-size: 12.5px;
    color: var(--text-mute);
    border: 1px solid var(--border);
    border-radius: 999px;
    white-space: nowrap;
  }
  .nd-sub:hover { color: var(--text-strong); border-color: var(--border-strong); }

  .nav-drawer-user {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .nd-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-strong);
    font-size: 14px;
    white-space: nowrap;
  }
  .nd-btn:hover { border-color: var(--border-strong); }
  .nd-btn-solid {
    background: var(--invert-bg);
    color: var(--invert-text) !important;
    border-color: transparent;
    font-weight: 500;
  }
}

.nav-spacer { flex: 1; }

.nav-search-form { display: block; }
.nav-search-box {
  display: flex;
  align-items: center;
  border-radius: var(--radius);
  padding: 2px 4px 2px 14px;
}
.nav-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-strong);
  font-size: 14px;
  font-family: inherit;
  width: 150px;
  padding: 8px 0;
}
.nav-search-input::placeholder { color: var(--text-faint); }
.nav-search-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
}
.nav-search-btn:hover { color: var(--text-strong); }

.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-right-link { font-size: 14px; color: var(--text-dim); padding: 8px 10px; }
.nav-cta-solid {
  background: var(--invert-bg);
  color: var(--invert-text) !important;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
}
.nav-cta-solid:hover { background: var(--invert-bg-hover); }

.nav-member-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
}
.nav-member-badge .member-text::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: middle;
}

.nav-toggle { display: none; background: transparent; border: none; color: var(--text-strong); cursor: pointer; padding: 8px; }

/* ≤1180px：右上角汉堡 → 侧边抽屉（导航项多，完整横排放不下）；
   ≤640px：手机再加底部 tab 导航（抽屉仍然可用，包含全部分级导航） */
@media (max-width: 1180px) {
  .nav-links, .nav-search-form, .nav-right { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
}

/* ---------------------------------------------------------------------
   按钮
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-strong);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--invert-bg); color: var(--invert-text); border-color: transparent; }
.btn-primary:hover { background: var(--invert-bg-hover); }

.btn-accent { background: var(--accent); color: var(--text-strong); border-color: transparent; }
.btn-accent:hover { background: var(--accent-hover); }

.btn-danger { background: rgba(248,113,113,0.14); color: var(--danger); border-color: rgba(248,113,113,0.35); }
.btn-danger:hover { background: rgba(248,113,113,0.22); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 13px 30px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------------
   徽章 / 标签
   --------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  white-space: nowrap;
}
.badge-free     { color: var(--success); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.1); }
.badge-trial    { color: var(--warning); border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.1); }
.badge-vip      { color: var(--accent-soft); border-color: rgba(147,197,253,0.35); background: rgba(59,130,246,0.12); }
.badge-svip     { color: #fbbf24; border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.12); }
.badge-self     { color: #c4b5fd; border-color: rgba(196,181,253,0.35); background: rgba(139,92,246,0.12); }
.badge-selected { color: #7dd3fc; border-color: rgba(125,211,252,0.3); background: rgba(14,165,233,0.1); }
.badge-famous   { color: #fca5a5; border-color: rgba(252,165,165,0.3); background: rgba(239,68,68,0.1); }
.badge-top      { color: #fcd34d; border-color: rgba(252,211,77,0.35); background: rgba(245,158,11,0.12); }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------------------------------------------------------------
   卡片
   --------------------------------------------------------------------- */
.card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.card-pad-0 { padding: 0; overflow: hidden; }
a.card:hover { border-color: var(--border-strong); background: var(--surface-hover); transform: translateY(-2px); }

.card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-soft);
}
.card-cover-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--thumb-bg);
  color: var(--text-faint);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 26px;
  letter-spacing: 0.05em;
}

.card-body { padding: 16px 18px 18px; }
.card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-summary {
  color: var(--text-mute);
  font-size: 13px;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-faint);
}

/* 统计数字块 */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.stat-item { text-align: center; padding: 18px 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.stat-num { font-family: var(--font-heading); font-size: 30px; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-mute); margin-top: 6px; letter-spacing: 0.08em; }
@media (max-width: 720px) { .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* 数据条下方的「当前在线」实时徽章
   （后台「系统设置 → 数据美化 → 在线人数」开启后由首页模板渲染） */
.live-online {
  display: flex; align-items: center; gap: 8px; width: max-content;
  margin: 16px auto 0; padding: 7px 18px;
  border: 1px solid var(--border); border-radius: 9999px;
  background: var(--surface); font-size: 13px; color: var(--text-mute);
}
.live-online b { color: var(--text); font-weight: 600; }
.live-online .lo-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--success);
  animation: lo-pulse 1.8s ease-out infinite;
}
@keyframes lo-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
@media (prefers-reduced-motion: reduce) { .live-online .lo-dot { animation: none; } }

/* ---------------------------------------------------------------------
   合作券商推荐位（首页横排小卡片，一排 5 个，数量后台可调）
   --------------------------------------------------------------------- */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.partner-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 14px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
  overflow: hidden;
}
.partner-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
/* 编号大字：两位/三位数字，等宽字体更有辨识度 */
.partner-code {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--accent-soft);
}
.partner-code-text { font-family: var(--font-heading); }
.partner-logo {
  height: 28px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: brightness(1.15);
}
.partner-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.partner-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-mute);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
/* 右上角外链小箭头，hover 时才亮起来 */
.partner-go {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--text-faint);
  opacity: 0.55;
  transition: opacity 0.18s, color 0.18s, background 0.18s;
}
.partner-card:hover .partner-go {
  opacity: 1;
  color: var(--accent-soft);
  background: var(--accent-tint);
}

/* 响应式：桌面一排 5 个，往下逐步收窄；手机一排 2 个 */
@media (max-width: 1100px) { .partner-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 900px)  { .partner-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 640px)  {
  .partner-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .partner-card { padding: 14px 12px 12px; }
  .partner-code { font-size: 20px; }
  .partner-desc { min-height: 0; }
}

/* ---------------------------------------------------------------------
   筛选栏
   --------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-bottom: 22px;
}
/* 每组内部保持一整行（空间不够时整组换行，而不是组内 chips 断成几行） */
.filter-group { display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; min-width: 0; }
.filter-label { font-size: 12px; color: var(--text-faint); margin-right: 4px; white-space: nowrap; }
.filter-item {
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
  transition: all 0.15s;
}
.filter-item:hover { border-color: var(--border-strong); color: var(--text-strong); }
.filter-item.active { background: var(--invert-bg); color: var(--invert-text); border-color: transparent; font-weight: 500; }
.filter-sep { width: 1px; height: 16px; background: var(--border); margin: 0 2px; flex: 0 0 auto; }

/* H5：分类导航改为每组一行横向滑动，避免换行挤压错乱 */
@media (max-width: 640px) {
  .filter-bar { padding: 10px 12px; gap: 6px; }
  .filter-sep { display: none; }
  .filter-group {
    flex: 0 0 auto;          /* 组不收缩：放不下就整组换行，保持每组一行 */
    width: max-content;      /* 防止 flex 把组压进剩余空间（fit-content 收缩） */
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .filter-group::-webkit-scrollbar { display: none; }
  .filter-label {
    flex: 0 0 auto;
    position: sticky; left: 0;
    background: var(--surface);
    padding-right: 8px;
    z-index: 1;
  }
  .filter-item { flex: 0 0 auto; padding: 7px 12px; }
}

/* ---------------------------------------------------------------------
   表单
   --------------------------------------------------------------------- */
.form-row { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.form-hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; line-height: 1.5; }

.form-control,
select.form-control,
textarea.form-control {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-strong);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.form-control:focus { border-color: var(--accent); background: var(--field-bg-focus); }
.form-control::placeholder { color: var(--text-faint); }
textarea.form-control { min-height: 110px; resize: vertical; line-height: 1.6; }
select.form-control { appearance: none; cursor: pointer; }
select.form-control option { background: var(--option-bg); color: var(--text-strong); }

.form-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-dim); cursor: pointer; }
.form-check input { accent-color: var(--accent); width: 16px; height: 16px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 18px; }
@media (max-width: 720px) { .form-grid { grid-template-columns: minmax(0,1fr); } }

/* 登录 / 注册 */
.auth-page { display: flex; justify-content: center; padding: 60px 20px 90px; }
.auth-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--soft-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 36px 32px 32px;
}
.auth-brand {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.auth-card h2 { font-size: 24px; margin-bottom: 22px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-mute); margin-top: 18px; }
.auth-switch a { color: var(--accent-soft); }

/* ---------------------------------------------------------------------
   提示条
   --------------------------------------------------------------------- */
.alert {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  line-height: 1.6;
}
.alert-error   { color: var(--danger);  border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.1); }
.alert-success { color: var(--success); border-color: rgba(52,211,153,0.35);  background: rgba(52,211,153,0.1); }
.alert-warning { color: var(--warning); border-color: rgba(251,191,36,0.35);  background: rgba(251,191,36,0.1); }
.alert-info    { color: var(--accent-soft); border-color: rgba(147,197,253,0.3); background: rgba(59,130,246,0.1); }

/* 全局 toast */
.toast-wrap {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}
.toast {
  border-radius: var(--radius-md);
  padding: 13px 18px;
  font-size: 13.5px;
  border: 1px solid var(--border-strong);
  background: var(--toast-bg);
  backdrop-filter: blur(12px);
  color: var(--text-strong);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.22s ease-out;
}
.toast-error   { border-color: rgba(248,113,113,0.5); color: #fecaca; }
.toast-success { border-color: rgba(52,211,153,0.5);  color: #a7f3d0; }
/* 后台若干处写的是 EA.toast(msg, 'ok')，type 直接拼进 class → .toast-ok。
   以前没有这条规则，那几处提示就退回默认白板样式，看不出是成功还是失败。 */
.toast-ok      { border-color: rgba(52,211,153,0.5);  color: #a7f3d0; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------
   详情页
   --------------------------------------------------------------------- */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .detail-layout { grid-template-columns: minmax(0,1fr); } }

.detail-hero {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  padding: 28px;
  margin-bottom: 22px;
}
.detail-title { font-size: 27px; margin-bottom: 12px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-mute);
}
.detail-stats b { color: var(--text-strong); font-weight: 600; }

.detail-hero-main { display: flex; gap: 22px; align-items: flex-start; }
.detail-hero-info { flex: 1 1 auto; min-width: 0; }
.detail-summary { font-size: 14.5px; line-height: 1.7; margin-bottom: 14px; }
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 12.5px;
  color: var(--text-mute);
}
.detail-meta b { color: var(--text-strong); font-weight: 600; }

.detail-cover {
  flex: 0 0 220px;
  width: 220px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}
.detail-cover img {
  width: 100%;
  height: 148px;
  object-fit: cover;
  display: block;
}
@media (max-width: 768px) {
  .detail-title { font-size: 22px; }
  .detail-hero-main { flex-direction: column; gap: 16px; }
  .detail-cover { flex: none; width: 100%; }
  .detail-cover img { height: auto; max-height: 180px; }
}

.prose { color: var(--text-dim); font-size: 15px; line-height: 1.85; }
.prose h3 { color: var(--text-strong); margin: 24px 0 10px; font-size: 17px; }
.prose h4 { color: var(--text-strong); margin: 20px 0 8px; font-size: 15px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--chip-soft-bg);
  padding: 2px 6px;
  border-radius: 5px;
  color: #fcd34d;
}
.prose pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
}
.prose pre code { background: none; padding: 0; color: var(--text-dim); }
.prose a { color: var(--accent-soft); text-decoration: underline; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 14px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose th { background: var(--surface); color: var(--text-strong); }
/* 正文插图（编辑页「插入图片」上传的参数截图/回测曲线等） */
.prose img { max-width: 100%; height: auto; border-radius: 10px; margin: 6px 0; }

/* 下载卡片 */
.download-panel {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--row-head);
  padding: 20px;
  margin-bottom: 18px;
}
.download-panel h3 { font-size: 15px; margin-bottom: 6px; }
.download-file {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-mute);
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 14px;
}
.download-file:last-of-type { border-bottom: none; }

.side-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 18px;
  margin-bottom: 18px;
}
.side-card h3 { font-size: 14px; color: var(--text-mute); margin-bottom: 14px; letter-spacing: 0.04em; }
.related-item { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
.related-item:last-child { border-bottom: none; }
.related-item .t { font-size: 13.5px; color: var(--text-strong); margin-bottom: 4px; }
.related-item .m { font-size: 12px; color: var(--text-faint); }

/* ---------------------------------------------------------------------
   定价页
   --------------------------------------------------------------------- */
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; align-items: stretch; }
@media (max-width: 1080px) { .plan-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px)  { .plan-grid { grid-template-columns: minmax(0,1fr); } }

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  padding: 26px 22px 22px;
  transition: border-color 0.18s, transform 0.18s;
}
.plan-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.plan-card.recommended { border-color: var(--accent-border); background: var(--accent-tint-soft); }
.plan-flag {
  position: absolute;
  top: -11px;
  right: 20px;
  background: var(--accent);
  color: var(--text-strong);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius);
}
.plan-name { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.plan-duration { font-size: 12.5px; color: var(--text-faint); margin-bottom: 16px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.plan-price .now { font-family: var(--font-heading); font-size: 34px; line-height: 1; }
.plan-price .was { font-size: 13px; color: var(--text-faint); text-decoration: line-through; }
.plan-per { font-size: 12px; color: var(--text-faint); margin-bottom: 18px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan-features li {
  font-size: 13px;
  color: var(--text-dim);
  padding: 7px 0 7px 22px;
  position: relative;
  line-height: 1.55;
}
.plan-features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 14px;
  width: 11px;
  height: 6px;
  border-left: 1.6px solid var(--success);
  border-bottom: 1.6px solid var(--success);
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------------------
   支付页
   --------------------------------------------------------------------- */
.pay-page { display: flex; justify-content: center; padding: 40px 20px 80px; }
.pay-card {
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  padding: 30px;
  text-align: center;
}
.pay-amount { font-family: var(--font-heading); font-size: 40px; margin: 6px 0 4px; }
.pay-qr {
  width: 220px;
  height: 220px;
  margin: 20px auto;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pay-qr canvas, .pay-qr img { width: 100% !important; height: 100% !important; }
.pay-status { font-size: 13.5px; color: var(--text-mute); margin-top: 12px; min-height: 22px; }

/* 当面付「条码支付」：扫码枪/付款码入口，默认折叠，不干扰正常扫码支付 */
.pay-barcode {
  margin-top: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
}
.pay-barcode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--text-mute);
}
.pay-barcode-body { margin-top: 12px; }
.pay-barcode-body .form-hint { text-align: left; margin-top: 8px; }

/* ---------------------------------------------------------------------
   用户中心
   --------------------------------------------------------------------- */
.user-layout { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 26px; align-items: start; padding: 26px 0 70px; }
@media (max-width: 860px) { .user-layout { grid-template-columns: minmax(0,1fr); } }

/* 账号卡：名字 + 身份一行，右侧退出按钮 */
.side-user-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; }
.su-name { font-size: 15px; color: var(--text-strong); font-weight: 500; margin-top: 2px; }
.su-tier { font-size: 12px; color: var(--text-mute); margin-top: 3px; }
.su-logout {
  flex: 0 0 auto; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); font-size: 12.5px; color: var(--text-mute);
}
.su-logout:hover { color: var(--text-strong); border-color: var(--border-strong); }

.side-nav {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 10px;
  position: sticky;
  top: 90px;
}
.side-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.side-nav a:hover { background: var(--surface-hover); color: var(--text-strong); }
.side-nav a.active { background: var(--chip-bg); color: var(--text-strong); font-weight: 500; }
.side-nav a.su-market { color: var(--text-mute); font-size: 13.5px; }
.side-nav a.su-market:hover { color: var(--text-strong); }

/* 用户中心侧导航（H5）：横向滑动胶囊条，全部菜单一目了然，不再折叠 */
@media (max-width: 768px) {
  .side-user-card { padding: 11px 13px; }
  .side-nav {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 10px 12px;
    scrollbar-width: none;
  }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a {
    flex: 0 0 auto;
    margin-bottom: 0;
    padding: 7px 13px;
    font-size: 13px;
    white-space: nowrap;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
  }
  .side-nav a.active {
    background: var(--invert-bg);
    color: var(--invert-text);
    border-color: transparent;
    font-weight: 500;
  }
  .side-nav a.su-market { margin-left: auto; color: var(--accent); border-style: dashed; }
}

.member-banner {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--accent-banner);
  padding: 22px 24px;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.member-banner .m-tier { font-family: var(--font-heading); font-size: 22px; margin-bottom: 4px; }
.member-banner .m-sub { font-size: 13px; color: var(--text-dim); }

/* ---------------------------------------------------------------------
   表格（后台）
   --------------------------------------------------------------------- */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--row-head);
  color: var(--text-mute);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
table.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-dim);
  vertical-align: middle;
}
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover { background: var(--row-hover); }
table.data-table td.strong { color: var(--text-strong); font-weight: 500; }
table.data-table .actions { display: flex; gap: 6px; flex-wrap: wrap; }

.table-scroll { overflow-x: auto; }

/* 分页 */
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; padding: 20px 0; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}
.pager a:hover { border-color: var(--border-strong); color: var(--text-strong); }
.pager .current { background: var(--invert-bg); color: var(--invert-text); border-color: transparent; font-weight: 600; }
.pager .disabled { opacity: 0.35; pointer-events: none; }

/* ---------------------------------------------------------------------
   后台布局
   --------------------------------------------------------------------- */
.admin-layout { display: grid; grid-template-columns: 272px minmax(0,1fr); min-height: 100vh; }
@media (max-width: 900px) { .admin-layout { grid-template-columns: minmax(0,1fr); } }

.admin-side {
  border-right: 1px solid var(--border);
  background: var(--side-bg);
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-brand {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 19px;
  padding: 6px 12px 20px;
  letter-spacing: 0.03em;
}
.admin-brand small { display: block; font-family: var(--font-body); font-style: normal; font-size: 13px; color: var(--text-faint); letter-spacing: 0.05em; margin-top: 4px; }

.admin-menu-group { font-size: var(--admin-group-fs); color: var(--text-mute); padding: 16px 12px 8px; letter-spacing: 0.1em; text-transform: uppercase; }
.admin-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: var(--admin-menu-fs);
  color: var(--text-dim);
  margin-bottom: 2px;
}
.admin-menu a:hover { background: var(--surface-hover); color: var(--text-strong); }
.admin-menu a.active { background: var(--chip-bg); color: var(--text-strong); font-weight: 500; }
.admin-menu .count {
  font-size: 12.5px;
  background: rgba(248,113,113,0.18);
  color: #fca5a5;
  padding: 1px 7px;
  border-radius: var(--radius);
}

.admin-main { padding: 0 26px 60px; min-width: 0; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  position: sticky;
  top: 0;
  background: var(--bar-bg);
  backdrop-filter: blur(12px);
  z-index: 20;
}
.admin-topbar h1 { font-size: 19px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.kpi {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 16px 18px;
}
.kpi .k-label { font-size: 12.5px; color: var(--text-mute); margin-bottom: 8px; }
.kpi .k-value { font-family: var(--font-heading); font-size: 26px; line-height: 1.1; }
.kpi .k-sub { font-size: 12px; color: var(--text-faint); margin-top: 6px; }

/* 简易柱状图 */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 10px; }
.bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bars .bar {
  width: 100%;
  max-width: 42px;
  background: var(--bar-fill);
  border-radius: 5px 5px 0 0;
  min-height: 3px;
}
.bars .bar-warn { background: linear-gradient(180deg, var(--danger) 0%, var(--bar-fill) 100%); }
.bars .bar-label { font-size: 11.5px; color: var(--text-faint); }

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-bottom: 22px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.panel-head h3 { font-size: 14.5px; }
.panel-body { padding: 18px; }

/* ---------------------------------------------------------------------
   页脚
   --------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 40px 0 34px;
  color: var(--text-faint);
  font-size: 13px;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--text-mute); }
.footer-links a:hover { color: var(--text-strong); }
.footer-note { max-width: 520px; line-height: 1.7; }

/* ---------------------------------------------------------------------
   空状态
   --------------------------------------------------------------------- */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-faint);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}
.empty .e-title { font-size: 15px; color: var(--text-mute); margin-bottom: 6px; }

/* 工具类 */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.items-center { align-items: center; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* =====================================================================
   H5 移动端适配
   说明：PC 端各组件自己的断点分散在上面对应区块里；这里集中放
   「整页通用」的移动端规则，集中在一起方便统一调整手机观感。
   ===================================================================== */

/* 首页 hero 标题规则集中在 .hero 区块（约 1260 行处）统一维护 */

@media (max-width: 768px) {
  /* 整页留白收紧，手机上内容更满 */
  .section { padding: 44px 0; }
  .section-sm { padding: 30px 0; }
  .container { padding: 0 16px; }

  h2 { font-size: 20px; }
  h3 { font-size: 16.5px; }

  /* 表格页：给横向滚动一个贴边体验，避免整页被撑宽 */
  .table-scroll { -webkit-overflow-scrolling: touch; }
  .table-scroll table { min-width: 640px; }

  /* 卡片按钮在小屏上更易点 */
  .btn { padding: 11px 20px; }
  .btn-lg { padding: 13px 24px; font-size: 15px; }

  /* 后台 / 用户中心布局在窄屏下单列（前面各区块已有同名规则，这里兜底） */
  .admin-layout, .user-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .stat-num { font-size: 25px; }
  .stat-item { padding: 14px 8px; }

  /* 首页 CTA 按钮在窄屏上占满一行，别挤成两列 */
  .flex .btn-lg { flex: 1 1 auto; min-width: 140px; }

  /* 表单页手机上通常单列（form-grid 已有规则），这里把提交按钮放宽 */
  .form-row .btn, form .btn-block { width: 100%; }
}

/* 安全区：iPhone 底部小黑条不遮住内容 */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .site-main { padding-bottom: env(safe-area-inset-bottom); }
  }
}

/* ---------------------------------------------------------------------
   H5 底部导航 + logo 去边框
   --------------------------------------------------------------------- */
.bottom-nav { display: none; }

@media (max-width: 640px) {
  /* 手机：底部 tab 常用入口 + 右上角汉堡抽屉（全部分类）双导航并存 */

  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: var(--nav-bg);
    border-top: 1px solid var(--line-soft);
    box-shadow: 0 -8px 24px -18px rgba(0, 0, 0, 0.5);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .bottom-nav .bn-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 2px;
    text-decoration: none;
    color: var(--text-mute);
    font-size: 11px;
    line-height: 1.2;
  }
  .bottom-nav .bn-item svg { width: 21px; height: 21px; }
  .bottom-nav .bn-item.is-on { color: var(--accent); }

  /* 内容区给底部导航让位（导航高约 58px + 安全区） */
  .site-main { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
}

/* logo 容器的玻璃边框全局去掉：logo 直接裸露更清爽 */
.navbar-logo-mark.liquid-glass,
.navbar-logo-mark {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.navbar-logo-mark.liquid-glass::before {
  content: none !important;   /* 玻璃描边是伪元素画的，一并去掉 */
}
@media (max-width: 860px) {
  .footer-glass.liquid-glass { border: none; box-shadow: none; }
}



/* =====================================================================
   首页 Hero 背景动效层
   ---------------------------------------------------------------------
   六种模式由后台「系统设置 → 外观」切换，实际绘制在 static/js/hero-bg.js：
     none / aurora（纯CSS极光） / particles（Canvas 粒子） /
     aurora_particles / grid（网格扫描） / video（自定义视频）
   这里的样式只负责「容器 + 层次 + 遮罩」，动效参数走 data-* 由 JS 读。
   ===================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 92px 0 76px;
}
.hero-inner { position: relative; z-index: 2; }

/* hero 文案排版：顶部小字 + 装饰线，标题/描述加柔和投影，在视频背景上保持干净可读 */
.hero-eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 12px; letter-spacing: 0.3em; text-indent: 0.3em;
  color: var(--text-faint); font-weight: 500;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: ""; flex: 0 0 36px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong, rgba(255,255,255,0.28)));
}
.hero-eyebrow::after { transform: scaleX(-1); }
.hero-title {
  margin: 20px 0 18px; font-size: 44px; line-height: 1.28; letter-spacing: 0.01em;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.5);
}
.hero-desc {
  max-width: 600px; margin: 0 auto 32px;
  font-size: 14.5px; line-height: 1.9; letter-spacing: 0.02em;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}
/* 手机端：标题与描述按宽度递减，eyebrow 收紧行距；同时收紧 hero 上下留白，
   避免 H5 出现大面积空白（PC 保持 92/76 不变） */
@media (max-width: 768px) {
  .hero { padding: 18px 0 18px; }
  .hero-title { font-size: 29px; margin: 13px 0 10px; }
  .hero-desc { font-size: 13.5px; margin-bottom: 18px; }
  .btn-lg { padding: 11px 24px; font-size: 14px; }
  /* 手机上板块间距大幅收紧：桌面 40px 的 section-sm 在 H5 会叠出 80px 空档 */
  .section { padding: 34px 0; }
  .section-sm { padding: 18px 0; }
  /* H5 hero 只有 ~270px 高，桌面 170px 的渐隐遮罩会把视频大部分盖住：
     收窄遮罩让视频内容能露出来（只影响遮罩，不动用户配置的视频本身） */
  .hero-fade { height: 64px; }
  .hero-fade-top    { background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%); }
  .hero-fade-bottom { background: linear-gradient(to top,    var(--bg) 0%, transparent 100%); }
}
@media (max-width: 480px) {
  .hero { padding: 14px 0 14px; }
  .hero-title { font-size: 22px; margin: 9px 0 7px; }
  .hero-desc { font-size: 13px; margin-bottom: 14px; }
  .hero-eyebrow { font-size: 10.5px; gap: 8px; }
  .hero-eyebrow::before, .hero-eyebrow::after { flex-basis: 18px; }
  .btn-lg { padding: 10px 20px; font-size: 13.5px; }
  .section { padding: 28px 0; }
  .section-sm { padding: 14px 0; }
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: var(--hero-opacity, 0.6);
}
.hero-bg > * { position: absolute; inset: 0; }

/* 上下渐隐：让背景动效自然融进页面底色，不会出现生硬的直角 */
.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 170px;
  z-index: 1;
  pointer-events: none;
}
.hero-fade-top    { top: 0;    background: linear-gradient(to bottom, var(--bg) 0%, var(--bg) 18%, transparent 100%); }
.hero-fade-bottom { bottom: 0; background: linear-gradient(to top,    var(--bg) 0%, var(--bg) 18%, transparent 100%); }

/* ---- 模式一：极光流光 ---- */
.hero-aurora { overflow: hidden; }
.hero-aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(64px);
  mix-blend-mode: screen;
  will-change: transform;
  opacity: 0.85;
  animation: eaAuroraDrift var(--dur, 26s) ease-in-out infinite;
}
.hero-aurora i:nth-child(1) {
  width: 46%; aspect-ratio: 1; left: 2%;  top: -6%;
  background: radial-gradient(circle at 50% 50%, var(--accent) 0%, transparent 66%);
}
.hero-aurora i:nth-child(2) {
  width: 40%; aspect-ratio: 1; right: 6%; top: 8%;
  background: radial-gradient(circle at 50% 50%, var(--accent-soft) 0%, transparent 64%);
  animation-duration: calc(var(--dur, 26s) * 1.35);
  animation-delay: -8s;
  opacity: 0.58;
}
.hero-aurora i:nth-child(3) {
  width: 34%; aspect-ratio: 1; left: 34%; bottom: -14%;
  background: radial-gradient(circle at 50% 50%, var(--accent) 0%, transparent 62%);
  animation-duration: calc(var(--dur, 26s) * 0.8);
  animation-delay: -15s;
  opacity: 0.46;
}
@keyframes eaAuroraDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  33%  { transform: translate3d(7%, -9%, 0) scale(1.14); }
  66%  { transform: translate3d(-8%, 6%, 0) scale(0.94); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

/* ---- 模式二：网格扫描 ---- */
.hero-grid::before {
  content: "";
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(to right, var(--accent) 1px, transparent 1px),
    linear-gradient(to bottom, var(--accent) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.12;
  animation: eaGridPan var(--dur, 24s) linear infinite;
  -webkit-mask-image: radial-gradient(ellipse at 50% 38%, #000 16%, transparent 76%);
  mask-image: radial-gradient(ellipse at 50% 38%, #000 16%, transparent 76%);
}
.hero-grid::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 190px;
  background: linear-gradient(to bottom, transparent, var(--accent-tint), transparent);
  animation: eaGridScan calc(var(--dur, 24s) * 0.42) ease-in-out infinite;
}
@keyframes eaGridPan {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 56px 56px, 56px 56px; }
}
@keyframes eaGridScan {
  0%   { top: -190px; opacity: 0; }
  18%  { opacity: 0.9; }
  100% { top: 100%;   opacity: 0; }
}

/* ---- 模式三：粒子星域 / 背景视频 ---- */
.hero-canvas { width: 100%; height: 100%; display: block; }
.hero-video  { width: 100%; height: 100%; object-fit: cover; }

/* 视频加载失败时的兜底提示（JS 会把 failed 类加上） */
.hero-bg.is-failed > video { display: none; }

/* 无障碍：系统开了「减少动态效果」就全部停掉 */
@media (prefers-reduced-motion: reduce) {
  .hero-aurora i,
  .hero-grid::before,
  .hero-grid::after { animation: none !important; }
}

/* =====================================================================
   入场动效（首屏文字聚焦浮出 + 区块滚动显现）
   ===================================================================== */
.blur-in { animation: eaBlurIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.blur-in-2 { animation-delay: 0.10s; }
.blur-in-3 { animation-delay: 0.20s; }
.blur-in-4 { animation-delay: 0.30s; }
.blur-in-5 { animation-delay: 0.38s; }
@keyframes eaBlurIn {
  from { opacity: 0; filter: blur(10px); transform: translateY(16px); }
  to   { opacity: 1; filter: blur(0);     transform: none; }
}

/* 只有确认 JS 可用时才隐藏待显现内容，避免脚本挂了页面一片空白 */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .blur-in { animation: none !important; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* =====================================================================
   后台视觉升级
   ---------------------------------------------------------------------
   目标：从「能用的表格后台」提升到「有层次的仪表盘」。
   全部走主题变量，换配色时后台跟着一起变。
   ===================================================================== */
.admin-layout { grid-template-columns: 272px minmax(0, 1fr); }

/* 窄屏兜底：上面的宽度规则无条件生效，会盖掉前面 900px/768px 的单列规则，
   所以这里必须放在它后面，否则手机上侧栏会占死 256px。 */
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  /* 选择器多带一层，避免被下面同区块的 .admin-side 规则盖掉 */
  .admin-layout .admin-side {
    position: static;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

/* ---- 侧栏 ---- */
.admin-side {
  background: var(--side-bg);
  border-right: 1px solid var(--border);
  padding: 16px 12px 24px;
  scrollbar-width: thin;
}
.admin-side::-webkit-scrollbar { width: 6px; }
.admin-side::-webkit-scrollbar-thumb { background: var(--chip-bg); border-radius: 99px; }
.admin-side::-webkit-scrollbar-track { background: transparent; }

.admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px 20px;
  font-size: 16px;
  font-style: normal;
  letter-spacing: 0;
  font-family: var(--font-heading);
}
.admin-brand .mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--accent);
}
.admin-brand .bt { line-height: 1.25; }
.admin-brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.admin-menu-group {
  font-size: var(--admin-group-fs);
  color: var(--text-mute);
  padding: 16px 12px 8px;
  letter-spacing: 0.14em;
}
.admin-menu a {
  position: relative;
  gap: 10px;
  padding: 10px 11px;
  border-radius: var(--radius-md);
  font-size: var(--admin-menu-fs);
  transition: background 0.16s, color 0.16s;
}
.admin-menu a svg { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.66; }
.admin-menu a .mi { flex: 1; min-width: 0; }
.admin-menu a:hover { background: var(--surface-hover); color: var(--text-strong); }
.admin-menu a:hover svg { opacity: 0.95; }
.admin-menu a.active {
  background: var(--accent-tint);
  color: var(--text-strong);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--accent-border);
}
.admin-menu a.active svg { opacity: 1; color: var(--accent-soft); }
.admin-menu a.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--glow);
}

/* ---- 主区 ---- */
.admin-main { padding: 14px 26px 60px; }
.admin-wrap { max-width: var(--admin-maxw); margin: 0 auto; }

.admin-topbar {
  padding: 13px 18px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bar-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}
.admin-topbar h1 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.admin-topbar .tb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--glow);
  flex-shrink: 0;
}
.admin-topbar .tb-right { display: flex; align-items: center; gap: 10px; }

.admin-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--soft-panel);
  font-size: 13px;
  color: var(--text-dim);
}
.admin-user-chip .av {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-soft));
}

/* ---- KPI 卡片 ---- */
.kpi-grid { gap: 16px; }
.kpi {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  background: var(--surface);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s, box-shadow 0.2s;
}
.kpi::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  opacity: 0.85;
}
.kpi:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-card);
}
.kpi .k-label { font-size: 12.5px; color: var(--text-mute); margin-bottom: 10px; letter-spacing: 0.02em; }
.kpi .k-value { font-size: 29px; }
.kpi .k-sub { font-size: 12px; color: var(--text-faint); margin-top: 8px; }
.kpi .k-icon {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-tint);
  color: var(--accent-soft);
}
.kpi .k-icon svg { width: 16px; height: 16px; }

/* ---- 面板 ---- */
.panel { background: var(--surface); }
.panel-head { background: var(--soft-panel); padding: 14px 18px; }
.panel-head h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.panel-head h3::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--glow);
}

/* ---- 表格 ---- */
.table-wrap { background: var(--surface); }
table.data-table th { font-weight: 600; letter-spacing: 0.04em; }
table.data-table tbody tr { transition: background 0.14s; }
table.data-table td .fs-12, table.data-table td.fs-12 { color: var(--text-mute); }
.row-line { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.row-line:last-child { border-bottom: none; }
.row-line .rl-t { color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 表单精细度 ---- */
.form-label { font-weight: 500; }
.form-control { border-radius: var(--radius-md); }
.form-control:focus { box-shadow: 0 0 0 3px var(--accent-tint); }

/* ---- 设置页：分组标题 ---- */
.form-section { margin: 30px 0 14px; }
.form-section:first-child { margin-top: 4px; }
.form-section h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.form-section h3 .fi {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--accent-tint);
  color: var(--accent-soft);
}
.form-section h3 .fi svg { width: 14px; height: 14px; }
.form-section .fdesc { font-size: 12px; color: var(--text-faint); margin: 6px 0 16px; }

/* ---- 主题选择器 ---- */
.theme-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .theme-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .theme-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.theme-opt { position: relative; cursor: pointer; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt .tcard {
  border: none;
  border-radius: var(--radius-md);
  padding: 10px;
  transition: transform 0.16s, opacity 0.16s;
}
.theme-opt:hover .tcard { transform: translateY(-2px); }
.theme-opt input:checked + .tcard { opacity: 1; }
.theme-opt input:not(:checked) + .tcard { opacity: 0.55; }
.theme-opt input:checked + .tcard .tn { color: var(--accent); }
.theme-opt .sw {
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 8px;
  overflow: hidden;
}
.theme-opt .sw i { display: block; width: 12px; height: 12px; border-radius: 50%; }
.theme-opt .sw i:nth-child(1) { width: 22px; border-radius: 5px; height: 8px; }
.theme-opt .tn { font-size: 13px; margin-top: 9px; color: var(--text-strong); }
.theme-opt .td { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; line-height: 1.5; }

/* ---- 宽度预设按钮组 ---- */
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-row label { cursor: pointer; }
.pick-row input { position: absolute; opacity: 0; pointer-events: none; }
.pick-row .pk {
  display: inline-block;
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-dim);
  transition: all 0.15s;
}
.pick-row label:hover .pk { border-color: var(--border-strong); color: var(--text-strong); }
.pick-row input:checked + .pk {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--text-strong);
  font-weight: 500;
}

/* ---- 亮色模式微调 ---- */
:root[data-ea-mode="light"] .liquid-glass::before,
:root[data-ea-mode="light"] .liquid-glass-strong::before {
  background: linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.02) 22%, rgba(0,0,0,0) 45%,
              rgba(0,0,0,0) 55%, rgba(0,0,0,0.02) 78%, rgba(0,0,0,0.10) 100%);
}
:root[data-ea-mode="light"] .hero-aurora i { mix-blend-mode: multiply; }
:root[data-ea-mode="light"] .toast { color: var(--text); }
:root[data-ea-mode="light"] .toast-error { color: #dc2626; }
:root[data-ea-mode="light"] .toast-success { color: #0f9d6e; }
:root[data-ea-mode="light"] .toast-ok { color: #0f9d6e; }

/* =====================================================================
   首页自适应卡片网格
   ---------------------------------------------------------------------
   首页「策略专区 / 交易工具 / 资源」的条数由后台决定（默认 5），
   固定 3 列会把 5 条排成 3+2、右边空一块，所以这里改成按可用宽度
   自动铺列：窄屏 1 列、中屏 2~3 列、宽屏最多 5 列。
   ===================================================================== */
/* =====================================================================
   首页卡片网格：每排几个由后台「首页板块每排卡片数」决定
   ---------------------------------------------------------------------
   0（默认）= 自适应：按可用宽度自动铺列，卡片大小恒定（即之前的排列方式）。
   填 N    = 固定每排 N 个，由控制器下发内联 style，这个文件不再干预列数。
   --cols-cap 只是「窄屏保护上限」：屏幕越窄允许的最大列数越少，
   免得设了 8~12 列在笔记本 / 手机上被挤成一条。实际列数 = min(设定值, cap)。
   ===================================================================== */
.grid-cards  { --cols-cap: 12; }
.grid-latest { --cols-cap: 12; }
@media (max-width: 1500px) { .grid-cards, .grid-latest { --cols-cap: 10; } }
@media (max-width: 1200px) { .grid-cards, .grid-latest { --cols-cap: 8; } }
@media (max-width: 1000px) { .grid-cards, .grid-latest { --cols-cap: 6; } }
@media (max-width: 800px)  { .grid-cards, .grid-latest { --cols-cap: 4; } }
@media (max-width: 640px)  { .grid-cards, .grid-latest { --cols-cap: 2; } }

/* =====================================================================
   站点标识（LOGO）
   ===================================================================== */
.navbar-logo-img {
  height: 30px;
  width: auto;
  max-width: 132px;
  object-fit: contain;
  display: block;
}
/* 图形 LOGO 旁的站名文字（Claude 式「图形 + 字标」横排组合） */
.navbar-logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
  line-height: 1;
  user-select: none;
}
@media (max-width: 700px) {
  /* 小屏保留站名，只把字号和图标收小一点，避免撑破导航 */
  .navbar-logo-text { font-size: 15px; display: inline-block; }
  .navbar-logo-img  { height: 26px; max-width: 96px; }
  .navbar-logo-mark { height: 40px; }
  .nav-left:has(.navbar-logo-mark.has-img) { gap: 12px; }
  .navbar-logo-mark.has-img + .navbar-logo-text { margin-left: -9px; }
}
.admin-brand .mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}
/* 后台品牌区没有图片时显示的文字标识 */
.admin-brand .mark { font-size: 17px; line-height: 1; letter-spacing: 0; }

/* 后台设置页的 LOGO 实时预览 */
.brand-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius);
  background: var(--soft-panel);
}
.brand-preview .bp-box {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: calc(var(--radius) * 0.8);
  background: var(--chip-bg);
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-strong);
  font-size: 19px;
  font-weight: 600;
  overflow: hidden;
}
.brand-preview .bp-box img { width: 100%; height: 100%; object-fit: contain; }
.brand-preview .bp-tip { font-size: 13px; color: var(--text-mute); }
.brand-preview .bp-tip small { display: block; color: var(--text-faint); margin-top: 3px; }

/* =====================================================================
   后台「系统设置」分组标签栏
   ===================================================================== */
.set-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  max-width: 920px;
  margin-bottom: 20px;
}
.set-tab {
  display: block;
  padding: 13px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--soft-panel);
  text-decoration: none;
  transition: border-color .18s, background .18s, transform .18s;
}
.set-tab:hover { border-color: var(--accent); transform: translateY(-1px); }
.set-tab .st-n {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 4px;
}
.set-tab .st-d { display: block; font-size: 12px; color: var(--text-faint); line-height: 1.5; }
.set-tab.active {
  border-color: var(--accent);
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.set-tab.active .st-n { color: var(--accent); }

/* =====================================================================
   后台侧边栏：菜单下的二级子项
   ===================================================================== */
.admin-submenu {
  display: flex;
  flex-direction: column;
  margin: 2px 0 6px 44px;
  padding-left: 12px;
  border-left: 1px solid var(--line-soft);
}
.admin-submenu a {
  display: block;
  padding: 6px 10px;
  font-size: var(--admin-submenu-fs);
  color: var(--text-faint);
  border-radius: calc(var(--radius) * 0.6);
  text-decoration: none;
  transition: color .16s, background .16s;
}
.admin-submenu a:hover { color: var(--text-strong); background: var(--row-hover); }
.admin-submenu a.active {
  color: var(--accent);
  background: var(--accent-tint);
  font-weight: 500;
}

/* =====================================================================
   分成计划（推广分销）
   ===================================================================== */
.aff-hero {
  position: relative;
  overflow: hidden;
  padding: 38px 30px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg, 18px);
  background: var(--soft-panel);
  margin-bottom: 22px;
}
.aff-hero .ah-glow {
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 260px;
  background: radial-gradient(50% 60% at 30% 0%, var(--accent-tint) 0%, transparent 70%),
              radial-gradient(40% 55% at 78% 10%, var(--accent-tint) 0%, transparent 72%);
  pointer-events: none;
}
.aff-hero h1 { position: relative; font-size: 30px; margin-bottom: 10px; }
.aff-hero .ah-sub { position: relative; color: var(--text-mute); font-size: 14.5px; line-height: 1.85; max-width: 640px; }

.aff-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.aff-stat {
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--soft-panel);
}
.aff-stat .as-n {
  font-size: 25px;
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.aff-stat .as-l { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }
.aff-stat.accent .as-n { color: var(--accent); }

.aff-copy {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.aff-copy input {
  flex: 1 1 320px;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}

.aff-steps { counter-reset: st; display: grid; gap: 12px; }
.aff-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--soft-panel);
}
.aff-step::before {
  counter-increment: st;
  content: counter(st);
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aff-step .ast-t { font-size: 14px; color: var(--text-strong); font-weight: 600; margin-bottom: 3px; }
.aff-step .ast-d { font-size: 13px; color: var(--text-mute); line-height: 1.75; }

.aff-gate {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--soft-panel);
  margin-bottom: 18px;
}
.aff-gate .ag-ic {
  flex: 0 0 34px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.aff-gate .ag-t { font-size: 15px; color: var(--text-strong); font-weight: 600; margin-bottom: 4px; }
.aff-gate .ag-d { font-size: 13px; color: var(--text-mute); line-height: 1.8; }

@media (max-width: 640px) {
  .aff-hero { padding: 26px 18px; }
  .aff-hero h1 { font-size: 22px; }
  .set-tabs { grid-template-columns: minmax(0, 1fr); }
}

/* =====================================================================
   v3 观感修正
   ---------------------------------------------------------------------
   这一整块是「按客户反馈做的统一收口」，规则集中放这里，方便以后整体调：
     1. 导航圆角收敛（原来是 9999px 的胶囊，改成小弧度）
     2. 后台整体去圆角（面板 / 表格 / 按钮 / 标签 / 主题选择卡 全部直角）
     3. 后台各页宽度统一（对齐「分类管理 / 合作券商」的满宽观感）
     4. 首页卡片网格按实际条数自适应
     5. 首页「视频展示区」
     6. 分成计划前台（高端版式 affx-*）
     7. 定制工单（tk-*）
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. 导航圆角：只收窄导航里的胶囊，不碰其它地方
   --------------------------------------------------------------------- */
.navbar-logo-mark { border-radius: 12px; }
.nav-links       { border-radius: 12px; padding: 5px; }
.nav-links a     { border-radius: 8px; }
.nav-search-box  { border-radius: 12px; }
.nav-cta-solid   { border-radius: 10px; }
.nav-member-badge{ border-radius: 10px; }

/* ---------------------------------------------------------------------
   2. 后台去圆角
   ---------------------------------------------------------------------
   后台是「工具型界面」，圆角越少越利落。这里用一条通配规则一次性
   清掉，避免漏掉某个组件又变成圆的。头像和状态小圆点保留圆形。
   --------------------------------------------------------------------- */
.admin-layout {
  --radius: 0px;
  --radius-lg: 0px;
  --radius-md: 0px;
  --radius-sm: 0px;
}
.admin-layout *:not(.tb-dot):not(.av) { border-radius: 0 !important; }
/* 这两处天生该是圆的：顶栏状态点、用户头像 */
.admin-layout .tb-dot,
.admin-layout .admin-user-chip .av { border-radius: 50% !important; }

/* ---------------------------------------------------------------------
   3. 后台宽度统一
   ---------------------------------------------------------------------
   「分类管理 / 合作券商」用的是自然满宽（--admin-maxw），观感好。
   设置页 / 支付设置 / 分成计划原来各自用内联 max-width:920px 收窄了，
   这里把标签栏上限解除，表单栅格在大屏上多铺一列，避免一行太长。
   --------------------------------------------------------------------- */
.set-tabs { max-width: none; }
.admin-layout .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1400px) {
  .admin-layout .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .admin-layout .form-grid { grid-template-columns: minmax(0, 1fr); }
}
/* 主题选择卡：满宽之后按屏宽自动铺 4 / 6 / 8 列，正好排成整行 */
.admin-layout .theme-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 1440px) { .admin-layout .theme-picker { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1880px) { .admin-layout .theme-picker { grid-template-columns: repeat(8, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------------
   4. 首页卡片网格：按条数自适应
   ---------------------------------------------------------------------
   原来 auto-fill 会先占满「能放几列」的轨道，条数不满时右边留一块空，
   看起来就是「固定在那不动」。换成 auto-fit：空轨道会被折叠，剩下的
   卡片按 1fr 均分整行 —— 设 4 条就是 4 等分，设 5 条就是 5 等分。
   条数很少（1~2 条）时再压一下单卡上限，免得被拉成巨块。
   --------------------------------------------------------------------- */
.grid-cards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.grid-latest {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.grid-cards[data-n="1"] { grid-template-columns: minmax(0, 380px); }
.grid-cards[data-n="2"] { grid-template-columns: repeat(auto-fit, minmax(230px, 400px)); justify-content: start; }
.grid-latest[data-n="1"] { grid-template-columns: minmax(0, 340px); }
.grid-latest[data-n="2"] { grid-template-columns: repeat(auto-fit, minmax(210px, 360px)); justify-content: start; }
@media (max-width: 640px) {
  .grid-cards  { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
  .grid-latest { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
}

/* ---------------------------------------------------------------------
   5. 首页「视频展示区」
   --------------------------------------------------------------------- */
.home-video { padding: 10px 0 44px; }
.hv-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--soft-panel);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.hv-glow {
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 300px;
  background:
    radial-gradient(45% 55% at 22% 0%, var(--accent-tint) 0%, transparent 72%),
    radial-gradient(38% 50% at 82% 8%, var(--accent-tint) 0%, transparent 74%);
  pointer-events: none;
}
.hv-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px 26px 18px;
}
.hv-head h2 { font-size: 22px; margin-bottom: 6px; }
.hv-head p { margin: 0; color: var(--text-mute); font-size: 13.5px; max-width: 640px; }
.hv-media {
  position: relative;
  margin: 0 26px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.hv-media video,
.hv-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hv-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(60% 60% at 50% 50%, rgba(0,0,0,0.34) 0%, rgba(0,0,0,0.12) 70%);
}
.hv-play button {
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: #0a0a0a;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  transition: transform .18s, background .18s;
}
.hv-play button:hover { transform: scale(1.06); background: #fff; }
.hv-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 22px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.4) 55%, rgba(0,0,0,0) 100%);
  color: #fff;
  pointer-events: none;
}
.hv-cap .hvc-t { font-size: 15px; font-weight: 600; }
.hv-cap .hvc-d { font-size: 12.5px; color: rgba(255,255,255,0.72); margin-top: 3px; }
.hv-points {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 0 26px 26px;
}
.hv-point {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-dim);
}
.hv-point b { color: var(--text-strong); font-weight: 600; display: block; font-size: 13.5px; margin-bottom: 2px; }
.hv-point .hvp-ic {
  flex: 0 0 26px; width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent-soft);
}
@media (max-width: 720px) {
  .hv-head { padding: 20px 16px 14px; }
  .hv-head h2 { font-size: 18px; }
  .hv-media { margin: 0 16px 16px; }
  .hv-points { padding: 0 16px 16px; }
  .hv-play button { width: 58px; height: 58px; }
}

/* ---------------------------------------------------------------------
   6. 分成计划前台（高端版式）
   --------------------------------------------------------------------- */
.affx-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  padding: 54px 0 46px;
  background:
    radial-gradient(60% 80% at 12% -10%, var(--accent-tint) 0%, transparent 62%),
    radial-gradient(50% 70% at 92% 0%, var(--accent-tint-soft) 0%, transparent 66%);
}
.affx-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 36px;
  align-items: center;
}
.affx-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}
.affx-badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.affx-hero h1 { font-size: 38px; line-height: 1.22; margin-bottom: 14px; }
.affx-hero h1 em { font-style: normal; color: var(--accent-soft); }
.affx-lead { color: var(--text-mute); font-size: 15px; line-height: 1.9; max-width: 620px; margin-bottom: 22px; }
.affx-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.affx-trust {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.affx-trust .at-i { display: flex; align-items: baseline; gap: 8px; }
.affx-trust .at-n {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.affx-trust .at-l { font-size: 12.5px; color: var(--text-faint); }

/* 右侧「收益怎么算」卡片 */
.affx-calc {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
.affx-calc h3 { font-size: 15px; margin-bottom: 4px; }
.affx-calc .ac-sub { font-size: 12.5px; color: var(--text-faint); margin-bottom: 18px; }
.affx-calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13.5px;
  color: var(--text-mute);
}
.affx-calc-row:last-of-type { border-bottom: none; }
.affx-calc-row b { color: var(--text-strong); font-weight: 600; font-variant-numeric: tabular-nums; }
.affx-calc-total {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  background: var(--accent-tint);
}
.affx-calc-total .act-l { font-size: 12.5px; color: var(--text-mute); margin-bottom: 4px; }
.affx-calc-total .act-n { font-size: 30px; font-weight: 700; color: var(--accent-soft); font-variant-numeric: tabular-nums; line-height: 1.1; }
.affx-calc-total .act-d { font-size: 12px; color: var(--text-faint); margin-top: 6px; }

/* 指标卡 */
.affx-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 14px;
  margin: 34px 0;
}
.affx-metric {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 18px 18px 16px;
}
.affx-metric .am-ic {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent-soft);
  margin-bottom: 12px;
}
.affx-metric .am-n { font-size: 26px; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; line-height: 1.15; }
.affx-metric .am-n.is-accent { color: var(--accent-soft); }
.affx-metric .am-l { font-size: 12.5px; color: var(--text-faint); margin-top: 5px; }

/* 区块标题 */
.affx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.affx-head h2 { font-size: 24px; margin-bottom: 6px; }
.affx-head p { margin: 0; color: var(--text-mute); font-size: 13.5px; }
.affx-sec { padding: 30px 0; }

/* 流程 */
.affx-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; counter-reset: afx; }
.affx-step {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 22px 20px 20px;
}
.affx-step::before {
  counter-increment: afx;
  content: "0" counter(afx);
  display: block;
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1;
  color: var(--accent-soft);
  opacity: 0.85;
  margin-bottom: 12px;
}
.affx-step .as-t { font-size: 15px; font-weight: 600; color: var(--text-strong); margin-bottom: 6px; }
.affx-step .as-d { font-size: 13px; color: var(--text-mute); line-height: 1.8; }

/* 两栏内容 */
.affx-grid2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 20px; align-items: start; }

/* 面板 */
.affx-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.affx-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--soft-panel);
}
.affx-panel-head h3 { font-size: 15px; }
.affx-panel-body { padding: 20px; }
.affx-panel-body.is-flush { padding: 0; }

/* 收益示例表 */
.affx-sample { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.affx-sample th, .affx-sample td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.affx-sample th { font-size: 12px; color: var(--text-faint); font-weight: 600; letter-spacing: 0.04em; background: var(--row-head); }
.affx-sample td.num { font-variant-numeric: tabular-nums; }
.affx-sample td.hi { color: var(--accent-soft); font-weight: 600; }
.affx-sample tr:last-child td { border-bottom: none; }

/* 规则列表 */
.affx-rules { list-style: none; margin: 0; padding: 0; }
.affx-rules li {
  position: relative;
  padding: 10px 0 10px 24px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.8;
}
.affx-rules li:last-child { border-bottom: none; }
.affx-rules li::before {
  content: "";
  position: absolute;
  left: 4px; top: 18px;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--accent);
}

/* FAQ */
.affx-faq { display: grid; gap: 10px; }
.affx-q {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.affx-q summary {
  cursor: pointer;
  padding: 15px 18px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-strong);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.affx-q summary::-webkit-details-marker { display: none; }
.affx-q summary::after {
  content: "+";
  color: var(--text-faint);
  font-size: 18px;
  line-height: 1;
  transition: transform .18s;
}
.affx-q[open] summary::after { transform: rotate(45deg); }
.affx-q .aq-a { padding: 0 18px 16px; font-size: 13.5px; color: var(--text-mute); line-height: 1.85; }

/* 底部 CTA */
.affx-band {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--accent-banner);
  padding: 34px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 34px 0 10px;
}
.affx-band h2 { font-size: 22px; margin-bottom: 8px; }
.affx-band p { margin: 0; color: var(--text-mute); font-size: 13.5px; }

/* 推广链接卡 */
.affx-link-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.affx-link-row input { flex: 1 1 320px; min-width: 0; font-family: var(--font-mono); font-size: 12.5px; }
.affx-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--text-strong);
}

/* 分享链接卡：置顶展示，视觉上要压过周围面板 */
.affx-share {
  border-color: color-mix(in srgb, var(--accent, #6ea8ff) 42%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #6ea8ff) 12%, transparent),
              0 14px 34px -20px color-mix(in srgb, var(--accent, #6ea8ff) 55%, transparent);
}
.affx-share > .affx-panel-head { border-bottom-color: color-mix(in srgb, var(--accent, #6ea8ff) 24%, transparent); }
.affx-share .affx-link-row input {
  font-size: 13.5px;
  padding: 11px 14px;
  background: color-mix(in srgb, var(--accent, #6ea8ff) 8%, var(--surface-2, transparent));
}
@media (max-width: 640px) {
  .affx-share .affx-link-row input { flex: 1 1 100%; }
  .affx-share .affx-link-row .btn { flex: 1 1 auto; }
}

/* 门槛提示 */
.affx-gate {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-bottom: 20px;
}
.affx-gate .ag-ic {
  flex: 0 0 40px; width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent-soft);
}
.affx-gate .ag-t { font-size: 17px; font-weight: 600; color: var(--text-strong); margin-bottom: 6px; }
.affx-gate .ag-d { font-size: 13.5px; color: var(--text-mute); line-height: 1.85; }

/* 推广链接：落地页切换 */
.affx-land {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.affx-land-t { font-size: 12.5px; color: var(--text-faint); margin-right: 2px; }
.affx-chip {
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  background: transparent;
  color: var(--text-mute);
  font-size: 12.5px;
  padding: 5px 13px;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.affx-chip:hover { color: var(--text, #fff); border-color: var(--accent, #6ea8ff); }
.affx-chip.is-on {
  color: var(--accent, #6ea8ff);
  border-color: var(--accent, #6ea8ff);
  background: var(--accent-tint-soft, rgba(110, 168, 255, 0.1));
}

@media (max-width: 980px) {
  .affx-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .affx-hero h1 { font-size: 28px; }
  .affx-grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .affx-hero { padding: 34px 0 30px; }
  .affx-hero h1 { font-size: 24px; }
  .affx-band { padding: 24px 18px; }
  .affx-calc { padding: 18px; }
}

/* ---------------------------------------------------------------------
   7. 定制工单
   --------------------------------------------------------------------- */
.tk-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  padding: 42px 0 34px;
  background:
    radial-gradient(55% 80% at 8% -20%, var(--accent-tint) 0%, transparent 64%),
    radial-gradient(45% 70% at 95% 0%, var(--accent-tint-soft) 0%, transparent 68%);
}
.tk-hero h1 { font-size: 32px; margin-bottom: 12px; }
.tk-hero p { color: var(--text-mute); font-size: 15px; max-width: 660px; margin: 0; line-height: 1.9; }

.tk-statusbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.tk-sb {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 16px 18px;
}
.tk-sb .ts-n { font-size: 24px; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.tk-sb .ts-n.is-accent { color: var(--accent-soft); }
.tk-sb .ts-l { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }

.tk-item {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 18px 20px;
  transition: border-color .16s, background .16s, transform .16s;
}
.tk-item:hover { border-color: var(--border-strong); background: var(--surface-hover); transform: translateY(-2px); }
.tk-item + .tk-item { margin-top: 12px; }
.tk-item-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tk-item-no { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.tk-item-title { font-size: 16px; font-weight: 600; color: var(--text-strong); margin-bottom: 7px; }
.tk-item-desc {
  font-size: 13px; color: var(--text-mute); line-height: 1.8; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tk-item-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-faint); }

.tk-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 26px; }
.tk-step {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 16px 16px 14px;
}
.tk-step .ks-n {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent-soft);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 10px;
}
.tk-step .ks-t { font-size: 14px; font-weight: 600; color: var(--text-strong); margin-bottom: 4px; }
.tk-step .ks-d { font-size: 12.5px; color: var(--text-mute); line-height: 1.75; }

/* 对话流 */
.tk-thread { display: grid; gap: 14px; }
.tk-msg { display: flex; gap: 12px; align-items: flex-start; }
.tk-msg .tm-av {
  flex: 0 0 34px; width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  background: var(--chip-bg);
  color: var(--text-strong);
}
.tk-msg.is-admin .tm-av { background: var(--accent-tint); color: var(--accent-soft); }
.tk-msg .tm-body { flex: 1; min-width: 0; }
.tk-msg .tm-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 5px; font-size: 12.5px; color: var(--text-faint); }
.tk-msg .tm-name { color: var(--text-strong); font-weight: 500; font-size: 13px; }
.tk-msg .tm-text {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--soft-panel);
  padding: 12px 15px;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.85;
  white-space: pre-line;
  word-break: break-word;
}
.tk-msg.is-admin .tm-text { border-color: var(--accent-border); background: var(--accent-tint-soft); }

/* 属性表 */
.tk-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--line-soft); }
.tk-field { background: var(--surface); padding: 13px 16px; }
.tk-field .tf-l { font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.04em; margin-bottom: 4px; }
.tk-field .tf-v { font-size: 13.5px; color: var(--text-strong); word-break: break-word; }

/* =====================================================================
   后台侧栏分组折叠：默认收起，点击展开（JS 把每组菜单包进 .am-items）
   ===================================================================== */
.admin-menu-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: color .16s;
}
.admin-menu-group:hover { color: var(--text-mute); }
.admin-menu-group::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .18s;
  opacity: 0.75;
  flex-shrink: 0;
}
.admin-menu-group.collapsed::after { transform: rotate(-45deg); }
.am-items { display: block; }
.am-items.collapsed { display: none; }
/* JS 未启用时（或脚本尚未执行）保持原始展开行为 */
html:not(.js) .am-items { display: block; }

/* ---- 三级子菜单折叠：带 .admin-submenu 的父项右侧出现小箭头，点箭头切换 ----
   collapsed 只由 JS 添加：无 JS 时子菜单始终展开，不会把链接藏起来 */
.admin-menu a .sub-toggle {
  width: 22px;
  height: 22px;
  margin-right: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  opacity: 0.65;
  cursor: pointer;
  flex-shrink: 0;
}
.admin-menu a .sub-toggle:hover { opacity: 1; background: var(--surface-hover); }
.admin-menu a .sub-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.18s;
}
.admin-menu a.sub-open .sub-toggle::after { transform: rotate(45deg); }
.admin-submenu.collapsed { display: none; }

/* =====================================================================
   USDT 收银台：横排专业版式（宽卡 + 三格信息条 + 链卡片并排）
   ===================================================================== */
.pay-card--usdt {
  max-width: 920px;
  padding: 26px 30px 30px;
  text-align: left;
}
.pay-card--usdt .pay-status { text-align: center; }

/* 顶部：品牌位 + 订单元信息 */
.pu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.pu-brand { display: flex; align-items: center; gap: 12px; }
.pu-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-soft);
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}
.pu-brand-t { display: flex; flex-direction: column; line-height: 1.35; font-size: 16px; font-weight: 600; color: var(--text-strong); }
.pu-brand-t small { font-size: 12px; font-weight: 400; color: var(--text-faint); }
.pu-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-faint); }

/* 三格信息条：应付金额 / 锁定汇率 / 应付数量 */
.pu-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 20px;
  border: 1px solid var(--line-soft);
  background: var(--soft-panel);
  overflow: hidden;
}
.pu-cell {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 20px;
  border-left: 1px solid var(--line-soft);
}
.pu-cell:first-child { border-left: none; }
.pu-l { font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.05em; }
.pu-v {
  font-family: var(--font-heading);
  font-size: 25px;
  line-height: 1.15;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pu-v-mid { font-size: 19px; }
.pu-cell-main { background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--accent-border); }
.pu-cell-main .pu-v { font-size: 30px; color: var(--accent-soft); }
.pu-cell-main .pu-l { color: var(--text-mute); }
.pu-cell-main .pu-v em {
  font-style: normal;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-faint);
  margin-left: 6px;
  letter-spacing: 0.08em;
}

/* 链卡片：并排展示，QR + 地址 + 复制 */
.pu-chains {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.usdt-chain {
  border: 1px solid var(--border);
  background: var(--soft-panel);
  padding: 16px 16px 14px;
  text-align: center;
  transition: border-color .16s;
}
.usdt-chain:hover { border-color: var(--accent-border); }
.uc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.uc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-soft);
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}
.uc-warn { font-size: 11.5px; color: var(--text-faint); }
.uc-qr {
  width: 170px;
  height: 170px;
  margin: 0 auto 12px;
  padding: 10px;
}
.uc-addr { display: flex; gap: 8px; }
.uc-addr .form-control { min-width: 0; flex: 1; }
.uc-addr .btn { flex-shrink: 0; }
.uc-tip { margin-top: 9px; font-size: 11.5px; color: var(--text-faint); }

/* 注意事项 */
.pu-notes {
  list-style: none;
  margin: 18px 0 0;
  padding: 14px 18px;
  border: 1px dashed var(--line-soft);
  display: grid;
  gap: 8px;
}
.pu-notes li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--text-mute);
  text-align: left;
}
.pu-notes li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--accent);
}
.pu-notes li strong { color: var(--text-strong); font-weight: 600; }

/* TXID 核验 */
.pu-txid {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.pu-txid-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.pu-txid-head .strong { font-size: 13.5px; color: var(--text-strong); }
.pu-txid-row { display: flex; gap: 10px; }
.pu-txid-row .form-control { flex: 1; min-width: 0; }
.pu-txid-row .btn { flex-shrink: 0; }

@media (max-width: 760px) {
  .pay-card--usdt { padding: 20px 16px 24px; }
  .pu-top { flex-direction: column; align-items: flex-start; }
  .pu-hero { grid-template-columns: 1fr; }
  .pu-cell { border-left: none; border-top: 1px solid var(--line-soft); }
  .pu-cell:first-child { border-top: none; }
  .pu-cell-main .pu-v { font-size: 26px; }
  .pu-txid-row { flex-direction: column; }
  .pu-txid-row .btn { width: 100%; }
}

/* ---- 首页实盘观摩账号板块（极简横排行式，每账号一行） ---- */
.obs-list { border-top: 1px solid var(--line-soft); }
.obs-item {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 11px 2px; border-bottom: 1px solid var(--line-soft);
}
.obs-head { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; min-width: 160px; }
.obs-name { font-size: 13px; color: var(--text-strong); }
.obs-fields { display: flex; align-items: center; gap: 20px; flex: 1 1 auto; flex-wrap: wrap; }
.obs-field { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.obs-k { flex: 0 0 auto; font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }
.obs-v { max-width: 240px; font-size: 12.5px; color: var(--text-strong); word-break: break-all; }
.obs-copy {
  flex: 0 0 auto; border: none; background: none; padding: 2px 4px;
  font-size: 12px; color: var(--accent); cursor: pointer;
}
.obs-copy:hover { color: var(--accent-hover); text-decoration: underline; }
.obs-note { flex: 1 1 50%; font-size: 12px; color: var(--text-faint); }
@media (max-width: 640px) {
  .obs-head { min-width: 100%; }
  .obs-fields { gap: 10px 16px; }
  .obs-v { max-width: 180px; font-size: 12px; }
}

/* ---- 首页站点公告（hero 下方正文区顶部，匀速无缝向上滚动） ---- */
.home-notice-sec { padding-top: 6px; padding-bottom: 0; }
.hero-notices {
  position: relative;
  max-width: 760px; margin: 0 auto; text-align: left;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 8px, #000 calc(100% - 8px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 8px, #000 calc(100% - 8px), transparent 100%);
}
/* 跑马灯轨道：JS 复制一份内容后做 translateY(0 → -50%) 无限循环 */
.hn-track { will-change: transform; }
@keyframes hn-marquee {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
/* 鼠标悬停暂停，移开继续 */
.hero-notices:hover .hn-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .hn-track { animation: none !important; }
}
.hn-item {
  display: flex; align-items: baseline; justify-content: center; gap: 10px;
  padding: 7px 2px;
  font-size: 13px; text-align: center;
}
.hn-tag {
  flex: 0 0 auto; font-size: 11px; line-height: 1; padding: 4px 7px;
  border-radius: 5px; color: var(--accent);
  background: var(--accent-tint); font-weight: 600;
}
.hn-date { flex: 0 0 auto; font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.hn-body { flex: 0 1 auto; min-width: 0; color: var(--text-strong); }
.hn-body b { font-weight: 600; }
.hn-text { margin-left: 8px; font-size: 12px; color: var(--text-mute); }
.hn-link {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px;
  font-size: 12px; color: var(--accent);
}
.hn-link:hover { color: var(--accent-hover); }

/* =====================================================================
   后台内容管理：顶部「各模块 / 各状态」条数统计，点一下就是筛选
   ===================================================================== */
.count-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.count-chip {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.count-chip:hover { border-color: var(--accent); color: var(--accent); }
.count-chip.is-active {
  border-color: var(--accent); background: var(--accent-tint); color: var(--accent);
}
.cc-label { font-size: 13px; }
.cc-num { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-strong); }
.count-chip.is-active .cc-num { color: var(--accent); }
@media (max-width: 640px) {
  .count-chips { gap: 8px; }
  .count-chip { padding: 6px 11px; }
  .cc-num { font-size: 14px; }
}

/* =====================================================================
   后台排版优化：可折叠面板 / 工具条 / 板块表格 / 吸底保存栏
   ---------------------------------------------------------------------
   颜色一律走变量（换主题自动跟随），不写死色值。
   ===================================================================== */

/* ---- 1. 可折叠面板 ---- */
.panel--fold > .panel-head {
  position: relative;
  padding-right: 46px;
  transition: background .15s ease;
}
.panel--fold > .panel-head:hover { background: var(--row-hover); }
.fold-btn {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  color: var(--text-mute);
  cursor: pointer;
  transition: transform .18s ease, color .15s ease, border-color .15s ease;
}
.fold-btn:hover { color: var(--text); border-color: var(--border-strong); }
.panel--fold.is-collapsed .fold-btn { transform: translateY(-50%) rotate(-90deg); }
.panel--fold.is-collapsed > .panel-body,
.panel--fold.is-collapsed > .panel-foot { display: none; }
.panel--fold.is-collapsed > .panel-head { border-bottom: none; }

/* ---- 2. 工具条（展开/收起全部 + 快捷锚点）---- */
.set-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
}
.set-toolbar .st-label { font-size: 12px; color: var(--text-faint); margin-right: 2px; }
.set-toolbar .st-btn {
  font-size: 12.5px; padding: 5px 11px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--soft-panel); color: var(--text-dim);
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: color .15s ease, border-color .15s ease;
}
.set-toolbar .st-btn:hover { color: var(--accent); border-color: var(--accent); }
.admin-layout .set-toolbar .st-btn { font-size: 12.5px; }

/* ---- 3. 首页板块「开关 + 排序」合并表 ---- */
.block-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.block-table th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--text-faint);
  padding: 0 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.block-table td {
  padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle;
}
.block-table tr:last-child td { border-bottom: none; }
.block-table tbody tr:hover { background: var(--row-hover); }
.block-table .bt-name { color: var(--text); }
.block-table .bt-key { font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); }
.block-table .bt-on { color: var(--success); }
.block-table .bt-off { color: var(--text-faint); }
.block-table .bt-weight { width: 96px; }
.block-table .bt-weight input { width: 84px; }
.block-table .bt-switch { width: 92px; }
.block-table tr.is-off .bt-name { color: var(--text-mute); }
/* 开关做成滑杆，比一排复选框清爽 */
.bt-switch input { position: absolute; opacity: 0; pointer-events: none; }
.bt-switch label {
  position: relative; display: inline-block; width: 40px; height: 22px;
  border-radius: 999px; background: var(--chip-bg); cursor: pointer;
  transition: background .18s ease;
}
.bt-switch label::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-dim); transition: transform .18s ease, background .18s ease;
}
.bt-switch input:checked + label { background: var(--accent); }
.bt-switch input:checked + label::after { transform: translateX(18px); background: #fff; }
@media (max-width: 720px) {
  .block-table th:nth-child(3), .block-table td:nth-child(3) { display: none; }
}

/* ---- 4. 吸底保存栏 ---- */
.save-bar {
  position: sticky; bottom: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 4px; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--toast-bg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}
.save-bar .sb-tip { font-size: 12.5px; color: var(--text-faint); }
.save-bar.is-dirty { border-color: var(--warning); }
.save-bar.is-dirty .sb-tip { color: var(--warning); }
@media (max-width: 720px) {
  .save-bar { padding: 10px 12px; }
  .save-bar .sb-tip { display: none; }
}


/* ==========================================================================
 * 后台批量选择：列表勾选用（.ba-th / .ba-td）+ 底部悬浮操作条（.batch-bar）
 * ========================================================================== */
.ba-th, .ba-td {
  width: 40px;
  text-align: center;
  vertical-align: middle;
}
.ba-th input, .ba-td input {
  width: 15px; height: 15px;
  margin: 0; cursor: pointer;
  accent-color: var(--accent);
}
.data-table tbody tr.is-picked { background: color-mix(in srgb, var(--accent) 8%, transparent); }

.batch-bar {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 60;
  transform: translate(-50%, 140%);
  opacity: 0;
  pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
}
.batch-bar.is-on {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}
.batch-bar .bb-inner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3);
  backdrop-filter: blur(14px);
  white-space: nowrap;
}
.batch-bar .bb-n { font-size: 15px; color: var(--accent); }
.batch-bar .bb-count { font-size: 13px; color: var(--text-dim); }
.batch-bar .bb-label { font-size: 12.5px; color: var(--text-faint); }
.batch-bar .bb-spacer { width: 6px; }
.batch-bar .bb-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .batch-bar .bb-inner { white-space: normal; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .batch-bar { left: 12px; right: 12px; transform: translateY(140%); }
  .batch-bar.is-on { transform: translateY(0); }
  .batch-bar .bb-inner { justify-content: space-between; }
  .batch-bar .bb-spacer { display: none; }
}

/* ---------------- 首页「限时优惠」板块卡片 ---------------- */
/* 同选择器后定义覆盖前：追加在文件尾部确保生效 */
.card-promo { position: relative; overflow: hidden; }
.card-promo-tag {
  position: absolute; left: 10px; top: 10px; z-index: 1;
  font-size: 11.5px; font-weight: 800; letter-spacing: .5px;
  padding: 3px 10px; border-radius: var(--radius);
  color: #1a1200; background: linear-gradient(120deg, #ffd76a, #ff9f43);
  box-shadow: 0 4px 14px rgba(255, 159, 67, .35);
}
.card-promo-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; }
.card-promo-price .now {
  font-size: 19px; font-weight: 800; color: var(--warning, #ffb020);
  font-family: var(--font-heading, inherit);
}
.card-promo-price .was { font-size: 12px; color: var(--text-faint); }
.card-promo-price .save {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius);
  color: var(--success); background: rgba(52, 199, 123, .12);
  border: 1px solid rgba(52, 199, 123, .35);
}

/* ---- 分类管理：模块行（与分类行同表，带「编辑」改模块名） ---- */
.cat-mod-row td { background: var(--surface-hover); }
.cat-mod-row td:first-child { border-left: 2px solid var(--accent); }

/* =====================================================================
   后台侧栏：整体折叠（收成图标窄条）+ 窄屏抽屉
   ---------------------------------------------------------------------
   开关：html.admin-folded；状态存 localStorage['ea-admin-side']，刷新保持。
   窄屏（<=900px）时侧栏改为从左侧滑出的抽屉，同一套开关按钮控制。
   ===================================================================== */
.admin-side-toggle {
  margin-left: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  transition: background 0.16s, color 0.16s, transform 0.18s;
}
.admin-side-toggle:hover { background: var(--surface-hover); color: var(--text-strong); }
.admin-side-toggle svg { width: 15px; height: 15px; }
.admin-folded .admin-side-toggle svg { transform: rotate(180deg); }

/* ---- 收起态：只留图标 ---- */
html.admin-folded .admin-layout { grid-template-columns: 68px minmax(0, 1fr); }
html.admin-folded .admin-side { padding: 16px 8px 24px; overflow: hidden; }
html.admin-folded .admin-brand { justify-content: center; gap: 0; padding: 8px 0 18px; }
html.admin-folded .admin-brand .bt { display: none; }
html.admin-folded .admin-brand .mark { margin: 0; }
html.admin-folded .admin-side-toggle { margin: 8px auto 0; }
html.admin-folded .admin-menu a { justify-content: center; padding: 10px 0; gap: 0; }
html.admin-folded .admin-menu a .mi,
html.admin-folded .admin-menu a .count,
html.admin-folded .admin-submenu { display: none; }
html.admin-folded .admin-menu a.has-sub .sub-toggle { display: none; }
html.admin-folded .admin-menu a.active::before { left: -8px; }
/* 分组标题收成一条分隔线，仍可点击展开/收起该组 */
html.admin-folded .admin-menu-group {
  font-size: 0;
  line-height: 0;
  height: 14px;
  padding: 7px 0 0;
  margin: 10px 8px;
  border-top: 1px solid var(--border);
  cursor: pointer;
}

/* ---- 顶部汉堡按钮：只在窄屏出现 ---- */
.admin-drawer-btn { display: none; }
.admin-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.admin-drawer-mask.show { opacity: 1; pointer-events: auto; }

/* ---- 窄屏：侧栏变抽屉（覆盖前面「窄屏把侧栏堆到顶部」的旧规则） ---- */
@media (max-width: 900px) {
  .admin-layout .admin-side {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 80;
    width: 272px;
    max-width: 86vw;
    height: 100vh;
    max-height: none;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    border-right: 1px solid var(--border);
    border-bottom: none;
  }
  .admin-layout .admin-side.is-open { transform: translateX(0); }
  /* 窄屏不做图标窄条，只做抽屉 */
  html.admin-folded .admin-layout { grid-template-columns: minmax(0, 1fr); }
  html.admin-folded .admin-side { padding: 16px 12px 24px; overflow: visible; }
  html.admin-folded .admin-brand { justify-content: flex-start; gap: 11px; padding: 8px 10px 20px; }
  html.admin-folded .admin-brand .bt { display: block; }
  html.admin-folded .admin-side-toggle { margin: 0 0 0 auto; }
  html.admin-folded .admin-menu a { justify-content: flex-start; padding: 10px 11px; gap: 10px; }
  html.admin-folded .admin-menu a .mi,
  html.admin-folded .admin-menu a .count { display: block; }
  html.admin-folded .admin-menu-group { font-size: var(--admin-group-fs); line-height: normal; height: auto; padding: 16px 12px 8px; margin: 0; border-top: none; }

  .admin-drawer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    flex: 0 0 auto;
  }
  .admin-drawer-btn:hover { background: var(--surface-hover); color: var(--text-strong); }
  .admin-drawer-btn svg { width: 17px; height: 17px; }
}
