/* =====================================================
   俱乐部系统 后台样式 v4.0.0
   主题：Arco 风格（参考 mer.opdj.top/dashboard）+ 图一/图二外壳
   风格：顶栏 + 页签条 + rail/panel 侧栏，响应式适配手机/电脑
   ===================================================== */

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* 主色 - Arco 蓝 */
  --primary: #165dff;
  --primary-light: #4080ff;
  --primary-dark: #0e42d2;
  --primary-bg: #e8f3ff;

  /* 点缀色 */
  --accent: #00b42a;
  --accent-light: #23c343;
  --accent-dark: #009a29;
  --accent-bg: #e8ffea;

  /* 中性色 */
  --sidebar-bg: #ffffff;
  --sidebar-bg2: #f7f8fa;
  --sidebar-border: #e5e6eb;
  --sidebar-text: #4e5969;
  --sidebar-hover: #f2f3f5;
  --sidebar-active: #ffffff;
  --sidebar-active-text: #165dff;

  --body-bg: #f2f3f5;
  --card-bg: #ffffff;
  --border: #e5e6eb;
  --border-light: #f2f3f5;

  --text-primary: #1d2129;
  --text-secondary: #4e5969;
  --text-muted: #86909c;

  /* 状态色 */
  --success: #00b42a;
  --success-bg: #e8ffea;
  --warning: #ff7d00;
  --warning-bg: #fff3e8;
  --danger: #f53f3f;
  --danger-bg: #ffece8;
  --info: #165dff;
  --info-bg: #e8f3ff;

  /* 尺寸 */
  --sidebar-width: 232px;
  --topbar-height: 56px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.03);
  --shadow: 0 2px 6px rgba(0,0,0,.05);
  --shadow-md: 0 6px 16px rgba(0,0,0,.07);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  background: var(--body-bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

/* ---------- 登录页 ---------- */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0e42d2 0%, #165dff 50%, #4080ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-body::before {
  content: '';
  position: absolute;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(255,255,255,.14) 0%, transparent 70%);
  top: -220px;
  right: -220px;
  border-radius: 50%;
}

.login-body::after {
  content: '';
  position: absolute;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 70%);
  bottom: -180px;
  left: -180px;
  border-radius: 50%;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-box {
  background: rgba(255,255,255,.98);
  border-radius: var(--radius-lg);
  padding: 40px 36px 32px;
  box-shadow: 0 25px 60px rgba(0,0,0,.28);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.25);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 10px 24px rgba(22,93,255,.35);
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.login-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13px;
  border: 1px solid #ffcdd2;
}

.login-form { margin-bottom: 24px; }

.login-field {
  position: relative;
  margin-bottom: 16px;
}

.login-field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-muted);
  z-index: 1;
}

.login-field input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-primary);
  background: #f7f8fa;
  transition: all .25s;
  outline: none;
}

.login-field input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22,93,255,.1);
}

.login-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 4px;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 12px rgba(22,93,255,.3);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(22,93,255,.4);
}

.login-btn:active { transform: translateY(0); }

.login-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

.login-footer .login-tip { color: var(--primary); }

.login-copyright {
  text-align: center;
  color: rgba(255,255,255,.45);
  font-size: 12px;
  margin-top: 20px;
}

/* ---------- 后台布局 ---------- */
.a-wrap {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.a-side {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--sidebar-border);
}

.a-side::-webkit-scrollbar { width: 4px; }
.a-side::-webkit-scrollbar-track { background: transparent; }
.a-side::-webkit-scrollbar-thumb { background: #c9cdd4; border-radius: 2px; }

.a-brand {
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--topbar-height);
}

.a-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(22,93,255,.25);
}

.a-brand .brand-icon svg {
  width: 21px;
  height: 21px;
  color: #fff;
}

.a-brand .brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.a-brand .brand-text small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* 紧凑菜单（无大空隙） */
.a-nav {
  flex: 1;
  padding: 8px 12px 16px;
}

.a-nav-sep {
  padding: 14px 8px 6px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: .5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.a-nav-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.a-nav > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 2px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  border-radius: 8px;
  transition: all .18s;
  white-space: nowrap;
  position: relative;
}

.a-nav > a:hover {
  background: var(--sidebar-hover);
  color: var(--text-primary);
}

.a-nav > a.active {
  background: var(--primary-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
}

.a-nav > a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.a-nav > a .menu-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.a-nav > a .menu-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: 0 auto;
}

.a-nav > a .menu-text { flex: 1; }

.nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  display: inline-block;
  font-style: normal;
}

.a-side-foot {
  padding: 12px 18px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--sidebar-border);
  text-align: center;
}

/* 主内容区 */
.a-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* 顶部导航 */
.a-top {
  height: var(--topbar-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

/* 抽屉遮罩（移动端） */
.a-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.a-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* 汉堡按钮（仅移动端显示） */
.a-top .a-burger {
  display: none;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 8px;
  background: var(--primary-bg);
  color: var(--primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 4px;
  transition: all .2s;
}

.a-top .a-burger:hover { background: #dbeafe; }
.a-top .a-burger:active { transform: scale(.94); }
.a-top .a-burger svg { width: 21px; height: 21px; }

.a-top .a-page {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.a-top .a-page::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.a-top .a-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.a-icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  font-size: 16px;
}

.a-icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

.a-icon-btn svg { width: 18px; height: 18px; }

.a-icon-btn .nav-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 10px;
  height: 16px;
  line-height: 16px;
  min-width: 16px;
}

.a-top .a-right .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 20px;
  background: var(--body-bg);
  cursor: default;
}

.a-top .a-right .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.a-top .a-right .username {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
}

.a-top .a-right a.logout-link {
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all .2s;
  font-size: 13px;
}

.a-top .a-right a.logout-link:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-bg);
}

/* ---------- 顶栏：页面搜索 ---------- */
.a-search {
  flex: 0 1 320px;
  min-width: 0;
  height: 36px;
  margin: 0 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--body-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 8px 0 10px;
  transition: all .2s;
}

.a-search:focus-within {
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 2px var(--primary-bg);
}

.a-search-ico { display: flex; color: var(--text-muted); flex-shrink: 0; }
.a-search-ico svg { width: 16px; height: 16px; }

.a-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
}

.a-search input::placeholder { color: var(--text-muted); }

.a-search-x {
  display: none;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.a-search-x:hover { background: var(--text-muted); color: #fff; }
.a-search-x svg { width: 11px; height: 11px; }
.a-search:focus-within .a-search-x { display: flex; }

/* ---------- 顶栏：深色模式按钮（双图标切换） ---------- */
.dark-btn { overflow: hidden; }
.dark-btn .dm-sun { display: none; }
html.a-dark .dark-btn .dm-moon { display: none; }
html.a-dark .dark-btn .dm-sun { display: flex; }
.dark-btn svg { width: 17px; height: 17px; }

/* ---------- 顶栏：通知铃铛 ---------- */
.a-bell { position: relative; }

.a-bell-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  pointer-events: none;
  transition: all .22s;
  z-index: 60;
}

.a-bell-panel.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.bell-head {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  background: var(--body-bg);
}

.bell-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.bell-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background .2s;
}

.bell-item:hover { background: var(--primary-bg); }

.bell-item b {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}

.bell-item span {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bell-foot {
  display: block;
  padding: 11px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  background: var(--body-bg);
}

.bell-foot:hover { background: var(--primary-bg); }

/* ---------- 深色模式（html.a-dark 覆盖全局变量） ---------- */
html.a-dark {
  --primary: #4080ff;
  --primary-light: #6aa1ff;
  --primary-dark: #165dff;
  --primary-bg: #1d2a45;
  --accent: #23c343;
  --accent-bg: #17331d;
  --sidebar-bg: #17181a;
  --sidebar-bg2: #202124;
  --sidebar-border: #2c2d30;
  --sidebar-text: #a9aeb8;
  --sidebar-hover: #232427;
  --sidebar-active: #202124;
  --sidebar-active-text: #4080ff;
  --body-bg: #141414;
  --card-bg: #1e1e20;
  --border: #2c2d30;
  --border-light: #232427;
  --text-primary: #e8e9ec;
  --text-secondary: #a9aeb8;
  --text-muted: #6f7480;
  --success-bg: #17331d;
  --warning-bg: #3a2a12;
  --danger-bg: #3a1f1f;
  --info-bg: #1d2a45;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 2px 6px rgba(0,0,0,.4);
  --shadow-md: 0 6px 16px rgba(0,0,0,.45);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.55);
}

html.a-dark .a-top .a-burger:hover { background: var(--sidebar-hover); }
html.a-dark .a-top .a-right .user-info { background: var(--sidebar-hover); }
html.a-dark .a-icon-btn { background: var(--card-bg); }

/* 主体内容 */
.a-body {
  padding: 20px 24px;
  flex: 1;
}

/* ---------- 数据看板：我的俱乐部（循环渐变） ---------- */
.club-hero {
  background: linear-gradient(120deg, #165dff 0%, #4080ff 30%, #8b5cf6 55%, #06b6d4 78%, #165dff 100%);
  background-size: 300% 300%;
  animation: clubGrad 14s ease infinite;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(22,93,255,.3);
}

@keyframes clubGrad {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .club-hero { animation: none; }
}

.club-hero::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
  right: -40px;
  top: -60px;
  border-radius: 50%;
}

.club-hero .club-info { position: relative; z-index: 1; }

.club-hero .club-label {
  font-size: 12px;
  opacity: .85;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.club-hero .club-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.club-hero .club-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

.club-hero .club-actions { display: flex; gap: 10px; position: relative; z-index: 1; flex-shrink: 0; }

.club-hero .btn {
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
  color: #fff;
}

.club-hero .btn.ghost {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
}

.club-hero .btn.ghost:hover { background: rgba(255,255,255,.28); }
.club-hero .btn.solid { background: #fff; color: var(--primary); font-weight: 600; }
.club-hero .btn.solid:hover { box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.club-hero .btn svg { width: 16px; height: 16px; }

/* ---------- 数据看板：常用功能 ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.quick-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 10px;
  text-align: center;
  transition: all .22s;
  display: block;
  color: var(--text-secondary);
}

.quick-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  color: var(--primary);
}

.quick-item .quick-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-item .quick-icon svg { width: 22px; height: 22px; }
.quick-item .quick-name { font-size: 13px; font-weight: 500; }

.quick-icon { position: relative; }
.quick-icon .quick-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(245,63,63,.4);
}

/* ---------- 数据看板：流水概览 ---------- */
.flow-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.flow-head h3 {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flow-head h3::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
}

.flow-tabs {
  display: flex;
  gap: 4px;
  background: var(--body-bg);
  border-radius: 8px;
  padding: 3px;
}

.flow-tabs a {
  padding: 5px 16px;
  font-size: 13px;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: all .2s;
}

.flow-tabs a.on {
  background: var(--card-bg);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.flow-item {
  background: var(--body-bg);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.flow-item .flow-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.flow-item .flow-label svg { width: 14px; height: 14px; }

.flow-item .flow-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.flow-item.grow .flow-val { color: var(--accent); }
.flow-item.shrink .flow-val { color: var(--danger); }
.flow-item.info .flow-val { color: var(--primary); }

/* ---------- 数据看板：经营统计 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all .22s;
  box-shadow: var(--shadow-sm);
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-card .stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card .stat-icon svg { width: 18px; height: 18px; }

.stat-card.i-blue .stat-icon { background: var(--primary-bg); color: var(--primary); }
.stat-card.i-green .stat-icon { background: var(--accent-bg); color: var(--accent); }
.stat-card.i-orange .stat-icon { background: var(--warning-bg); color: var(--warning); }
.stat-card.i-red .stat-icon { background: var(--danger-bg); color: var(--danger); }
.stat-card.i-gray .stat-icon { background: #f2f3f5; color: var(--text-secondary); }
.stat-card.i-purple .stat-icon { background: #f5e8ff; color: #722ed1; }
.stat-card.i-cyan .stat-icon { background: #e6fffb; color: #0fc6c2; }
.stat-card.i-gold .stat-icon { background: #fdf0d3; color: #b8860b; }

.stat-card .stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- 数据看板：最近列表 ---------- */
.recent-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.recent-col {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.recent-col .recent-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.recent-col .recent-head a { font-size: 12px; font-weight: 400; color: var(--primary); }

.recent-col ul { list-style: none; }
.recent-col li {
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.recent-col li:last-child { border-bottom: none; }

.recent-col li .r-main { flex: 1; min-width: 0; }
.recent-col li .r-title { color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-col li .r-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.recent-col li .r-val { font-weight: 600; color: var(--text-primary); font-size: 13px; flex-shrink: 0; }

.recent-col li .r-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.recent-col li .r-dot.ok { background: var(--accent); }
.recent-col li .r-dot.warn { background: var(--warning); }
.recent-col li .r-dot.bad { background: var(--danger); }
.recent-col li .r-dot.info { background: var(--info); }

.empty-mini {
  padding: 28px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- 1.25.0 数据看板：现代仪表盘（dash-*） ---------- */
.dash-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(110deg, #173c70 0%, #176b72 56%, #147d73 100%);
  box-shadow: 0 8px 20px rgba(23, 60, 112, .15);
}
.dash-hero__glow { display: none; }
.dash-hero__blobs { display: none; }
.dash-hero__title { text-shadow: none; letter-spacing: 0; }
.dash-kpi__ico { width: 32px; height: 32px; border-radius: 7px; }
.dash-kpi__ico svg { width: 16px; height: 16px; }
.dash-quick__ico { width: 30px; height: 30px; border-radius: 6px; }
.dash-quick__ico svg { width: 15px; height: 15px; }
.dash-kpi { padding: 14px 16px; }
.dash-quick__item { padding: 11px 13px; gap: 9px; }
.dash-hero__left { position: relative; z-index: 1; min-width: 0; }
.dash-hero__hello { font-size: 15px; opacity: .92; }
.dash-hero__hello b { font-weight: 700; }
.dash-hero__wave { display: inline-block; animation: dashWave 2.6s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes dashWave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(16deg); }
  20%, 40% { transform: rotate(-10deg); }
}
.dash-hero__title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .5px;
  margin: 6px 0 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,.14);
}
.dash-hero__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  opacity: .9;
}
.dash-hero__meta b { font-weight: 700; letter-spacing: 1px; }
.dash-hero__dash { opacity: .5; }
.dash-hero__copy {
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 11.5px;
  border-radius: 999px;
  padding: 1px 10px;
  cursor: pointer;
  transition: .2s;
  line-height: 20px;
}
.dash-hero__copy:hover { background: rgba(255,255,255,.3); }
.dash-hero__right { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.dash-hero .btn {
  border-radius: 999px;
  font-size: 12.5px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.dash-hero .btn svg { width: 15px; height: 15px; }
.dash-hero .btn.solid {
  background: #fff;
  color: var(--primary);
  border: none;
  font-weight: 600;
}
.dash-hero .btn.solid:hover { box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.dash-hero .btn.ghost {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.42);
  color: #fff;
}
.dash-hero .btn.ghost:hover { background: rgba(255,255,255,.28); }

/* 快捷入口 */
.dash-quick {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.dash-quick__item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: .22s;
  text-decoration: none;
  color: var(--text-primary);
}
.dash-quick__item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.dash-quick__ico {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-quick__ico svg { width: 20px; height: 20px; }
.dash-quick__ico.tone-blue   { color: #2563eb; background: #eff6ff; border: 1px solid #dbeafe; }
.dash-quick__ico.tone-purple { color: #7c3aed; background: #f5f3ff; border: 1px solid #ede9fe; }
.dash-quick__ico.tone-orange { color: #ea580c; background: #fff7ed; border: 1px solid #ffedd5; }
.dash-quick__ico.tone-green  { color: #16a34a; background: #f0fdf4; border: 1px solid #dcfce7; }
.dash-quick__ico.tone-cyan   { color: #0e7490; background: #ecfeff; border: 1px solid #cffafe; }
.dash-quick__ico.tone-red    { color: #dc2626; background: #fef2f2; border: 1px solid #fee2e2; }
.dash-quick__nm { font-size: 13.5px; font-weight: 600; }
.dash-quick__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239,68,68,.4);
}

/* KPI 卡片（渐变强调色 + 环比趋势） */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.dash-kpi {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: .22s;
}
.dash-kpi::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--kpi), transparent 80%);
}
.dash-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dash-kpi__ico {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--kpi);
  background: var(--kpi-bg);
}
.dash-kpi__ico svg { width: 22px; height: 22px; }
.dash-kpi__body { flex: 1; min-width: 0; }
.dash-kpi__num {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-kpi__label { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }
.dash-kpi__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 9px;
}
.dash-kpi__sub { font-size: 11.5px; color: var(--text-secondary); }
.dash-kpi__hint { font-size: 11px; color: var(--text-muted); }
.dash-trend {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.dash-trend.up   { color: #16a34a; background: #f0fdf4; }
.dash-trend.down { color: #dc2626; background: #fef2f2; }
.dash-trend.flat { color: #64748b; background: #f1f5f9; }

/* 图表区：双列布局 */
.dash-grid2 {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
  align-items: start;
}
.dash-col { display: flex; flex-direction: column; gap: 18px; }
.dash-panel { margin-bottom: 0; }
.dash-panel .panel-header h3 svg { width: 16px; height: 16px; color: var(--primary); }

/* 订单状态分布条 */
.dash-st__bars {
  display: flex;
  gap: 3px;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border-light);
}
.dash-st__bar { min-width: 6px; transition: .3s; }
.dash-st__total { font-size: 12px; color: var(--text-muted); }
.dash-st__lgwrap { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.dash-st__lg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.dash-st__lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dash-st__lg b { font-weight: 700; color: var(--text-primary); margin-left: 4px; font-variant-numeric: tabular-nums; }

/* 趋势 SVG（新序列配色：金额蓝 / 订单紫） */
.dash-panel .mk-chart { height: 250px; }
.dash-panel .mk-chart .line-p { stroke: #0ea5e9; }
.dash-panel .mk-chart .dot-p { fill: #fff; stroke: #0ea5e9; }
.dash-panel .mk-chart .area-b { fill: url(#mkGradB); }
.dash-panel .mk-chart .grid-line { stroke: #eef1f6; }
html.a-dark .dash-panel .mk-chart .grid-line { stroke: #2c2d30; }
html.a-dark .dash-panel .mk-chart .dot-p { fill: #1e1e20; }

/* 暗色适配 */
html.a-dark .dash-quick__ico.tone-blue   { color: #93b4ff; background: rgba(37,99,235,.18); border-color: rgba(147,180,255,.3); }
html.a-dark .dash-quick__ico.tone-purple { color: #c4a5ff; background: rgba(124,58,237,.18); border-color: rgba(196,165,255,.3); }
html.a-dark .dash-quick__ico.tone-orange { color: #ffb074; background: rgba(234,88,12,.18); border-color: rgba(255,176,116,.3); }
html.a-dark .dash-quick__ico.tone-green  { color: #4ade80; background: rgba(22,163,74,.18); border-color: rgba(74,222,128,.3); }
html.a-dark .dash-quick__ico.tone-cyan   { color: #4adfe3; background: rgba(14,116,144,.18); border-color: rgba(74,223,227,.3); }
html.a-dark .dash-quick__ico.tone-red    { color: #ff8f87; background: rgba(220,38,38,.18); border-color: rgba(255,143,135,.3); }
html.a-dark .dash-trend.up   { color: #4ade80; background: rgba(22,163,74,.2); }
html.a-dark .dash-trend.down { color: #ff8f87; background: rgba(220,38,38,.2); }
html.a-dark .dash-trend.flat { color: #94a3b8; background: rgba(100,116,139,.2); }
html.a-dark .dash-kpi::before { opacity: .9; }

/* 响应式 */
@media (max-width: 1400px) {
  .dash-kpis { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1200px) {
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-grid2 { grid-template-columns: 1fr; }
  .dash-quick { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .dash-hero { flex-direction: column; align-items: flex-start; }
  .dash-hero__title { font-size: 22px; }
}
@media (max-width: 640px) {
  .dash-kpis { grid-template-columns: 1fr; }
  .dash-quick { grid-template-columns: repeat(2, 1fr); }
}

/* 紧凑经营面板：保留原有服务端数据和交互，仅收敛视觉装饰 */
.dash-hero--m27 {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  background: var(--card-bg);
  box-shadow: none;
  animation: none;
}
.dash-hero--m27 .dash-hero__blobs,
.dash-hero--m27 .dash-hero__glow { display: none; }
.dash-hero--m27 .dash-hero__hello,
.dash-hero--m27 .dash-hero__meta { color: var(--text-secondary); opacity: 1; }
.dash-hero--m27 .dash-hero__title { font-size: 19px; margin: 2px 0 4px; text-shadow: none; }
.dash-hero--m27 .dash-hero__right { gap: 6px; }
.dash-hero--m27 .btn,
.dash-hero--m27 .btn.solid,
.dash-hero--m27 .btn.ghost,
.dash-hero--m27 .btn.poster {
  min-height: 32px; padding: 5px 10px; border: 1px solid var(--border);
  border-radius: 5px; color: var(--text-secondary); background: var(--card-bg);
  box-shadow: none; animation: none; transform: none;
}
.dash-hero--m27 .btn:hover { color: var(--primary); border-color: var(--primary); }
.dash-hero__copy { border-radius: 4px; color: var(--primary); background: var(--primary-bg); border-color: var(--border); }
.dash-quick { gap: 0; margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card-bg); }
.dash-quick__item { padding: 10px 12px; border: 0; border-right: 1px solid var(--border-light); border-radius: 0; box-shadow: none; }
.dash-quick__item:hover { transform: none; box-shadow: none; background: var(--sidebar-bg2); }
.dash-quick__ico { width: 28px; height: 28px; border: 0 !important; border-radius: 5px; background: transparent !important; }
.dash-quick__ico svg { width: 17px; height: 17px; }
.dash-kpis { gap: 0; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card-bg); overflow: hidden; }
.dash-kpi { min-height: 88px; gap: 10px; padding: 12px; border: 0; border-right: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); border-radius: 0; box-shadow: none; }
.dash-kpi::before { display: none; }
.dash-kpi:hover { transform: none; box-shadow: none; background: var(--sidebar-bg2); }
.dash-kpi__ico { width: 28px; height: 28px; border-radius: 5px; }
.dash-kpi__ico svg { width: 16px; height: 16px; }
.dash-kpi__num { font-size: 20px; }
.dash-kpi__foot { margin-top: 5px; }
.dash-grid2, .dash-col { gap: 12px; }
.dash-panel .mk-chart { height: 205px; }
.dash-panel .mk-chart .area-b { display: none; }
.dash-panel .mk-chart .grid-line { stroke-dasharray: none; }
.dash-panel .mk-chart .bar-r { fill: #9bbcff; }
.recent-cols { gap: 12px; }
@media (max-width: 640px) {
  .dash-hero--m27 { padding: 14px; }
  .dash-hero--m27 .dash-hero__right { width: 100%; }
  .dash-kpi { min-width: 0; }
  .dash-quick__item { padding: 9px; }
}

/* ---------- 旧统计卡片（兼容） ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.cards .c {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: all .22s;
  box-shadow: var(--shadow-sm);
}

.cards .c:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cards .c .n {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.cards .c.accent .n { color: var(--accent); }

.cards .c .l {
  color: var(--text-secondary);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cards .c .l::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.cards .c.accent .l::before { background: var(--accent); }

.cards .c .card-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  opacity: .12;
}

/* ---------- 面板 ---------- */
.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.panel-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-header h3::before {
  content: '';
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  box-shadow: 0 0 0 3px var(--primary-bg);
}

/* ---------- 表格 ---------- */
table.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.tbl th, .tbl td {
  padding: 11px 14px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}

.tbl th {
  background: var(--body-bg);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
}

.tbl th:first-child { border-top-left-radius: var(--radius-sm); }
.tbl th:last-child { border-top-right-radius: var(--radius-sm); }

.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover td { background: var(--sidebar-hover); }

.tbl tbody tr:last-child td { border-bottom: none; }

.tbl img.thumb {
  width: 52px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ---------- 分类导航条（兼容） ---------- */
.cat-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
}

.cat-nav a {
  padding: 6px 16px;
  font-size: 13px;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: all .2s;
}

.cat-nav a:hover { color: var(--primary); background: var(--primary-bg); }
.cat-nav a.on { background: var(--primary); color: #fff; font-weight: 500; }

/* ---------- 表单 ---------- */
.f-row { margin-bottom: 16px; }

.f-row label {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 500;
}

.f-row input, .f-row textarea, .f-row select {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--card-bg);
  outline: none;
  transition: all .2s;
  font-family: inherit;
}

.f-row input:focus, .f-row textarea:focus, .f-row select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.f-row textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

.f-row .hint {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 6px;
}

/* ---------- 权限勾选网格 ---------- */
.perm-box {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  padding: 12px 14px;
  max-height: 340px;
  overflow-y: auto;
}
.perm-group {
  margin-bottom: 14px;
}
.perm-group:last-child { margin-bottom: 0; }
.perm-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 6px 8px;
  background: var(--primary-bg);
  border-radius: 8px;
  margin-bottom: 8px;
}
.perm-group-head .check-all {
  margin-left: auto;
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
  user-select: none;
}
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .18s;
  background: var(--card-bg);
  font-size: 13px;
  color: var(--text-primary);
  user-select: none;
}
.perm-item:hover { border-color: var(--primary-light); background: var(--primary-bg); }
.perm-item.on {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 500;
}
.perm-item input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}
.perm-item .perm-en {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* ---------- 用户搜索选择器（保证金弹窗）---------- */
.pick-list {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  max-height: 240px;
  overflow-y: auto;
  background: var(--card-bg);
}
.pick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover { background: var(--primary-bg); }
.pick-item b { font-size: 14px; color: var(--text-primary); }
.pick-item small { color: var(--text-muted); font-size: 12px; }
.pick-meta { font-size: 12px; color: var(--accent); white-space: nowrap; }
.pick-empty { padding: 12px 14px; color: var(--text-muted); font-size: 13px; text-align: center; }

.f-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.f-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ---------- 图标快速选择 / 图片预览 / 表格副文本 ---------- */
.icon-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.icon-pick span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 20px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
}
.icon-pick span:hover { border-color: var(--primary); transform: translateY(-1px); }
.icon-pick span.on { border-color: var(--primary); background: var(--primary-bg); box-shadow: 0 0 0 3px rgba(22,93,255,.12); }

.img-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.img-preview:empty { display: none; }
.img-preview__thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(16,33,58,.08);
}

/* ---------- m11：点击上传图片（自动转链接） ---------- */
.up-field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.up-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1.5px dashed var(--primary);
  border-radius: 10px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.up-btn:hover { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(22,93,255,.22); }
.up-btn:disabled { opacity: .6; cursor: progress; }
.up-btn.up-done { border-style: solid; background: #e8faf0; border-color: #16a34a; color: #16a34a; }
.up-btn.up-done:hover { background: #16a34a; color: #fff; }
.up-field__file { display: none; }
.up-tip {
  width: 100%;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.up-tip::before { content: "💡 "; }
.up-preview { display: flex; flex-wrap: wrap; gap: 10px; }
.up-preview:empty { display: none; }
.up-preview img {
  width: 96px; height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(16,33,58,.08);
}
.up-clear {
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(220,38,38,.08);
  color: #dc2626;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid rgba(220,38,38,.22);
}
.up-clear:hover { background: #dc2626; color: #fff; }

/* ---------- m11：关于系统 · 站内路径速查 ---------- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.about-box {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}
.about-box__title {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.about-box__title::before {
  content: "";
  width: 4px; height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2, var(--primary)));
}
.about-ul { list-style: none; margin: 0; padding: 0; }
.about-ul li {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.about-ul li:last-child { border-bottom: none; }
.about-ul span { color: var(--text-muted); }
.about-ul b { color: var(--text); font-family: ui-monospace, Consolas, monospace; font-weight: 600; }
.about-paths { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.about-path {
  display: grid;
  grid-template-columns: 72px 110px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg, #f8fafc);
  transition: border-color .15s, box-shadow .15s;
}
.about-path:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(22,93,255,.08); }
.about-path__name {
  font-size: 12px; font-weight: 700;
  color: var(--primary);
  background: var(--primary-bg);
  border-radius: 6px;
  padding: 3px 8px;
  text-align: center;
}
.about-path__desc { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.about-path__code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11.5px;
  color: #0f766e;
  background: rgba(15,118,110,.07);
  border: 1px solid rgba(15,118,110,.16);
  border-radius: 6px;
  padding: 4px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.about-path__live { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-left: 8px; }
.about-path__live::before { content: '●'; color: #16a34a; margin-right: 4px; font-size: 9px; vertical-align: 1px; }
.about-paths-foot { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.tbl-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ---------- 按钮（m11-7：渐变底 + 内高光 + 彩色阴影） ---------- */
.btn {
  display: inline-block;
  padding: 8px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  text-align: center;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 2px 6px color-mix(in srgb, var(--primary) 30%, transparent);
}

.btn:hover {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 5px 14px color-mix(in srgb, var(--primary) 40%, transparent);
}

.btn:active { transform: translateY(0); }

.btn.gold {
  background: linear-gradient(180deg, #ffe08a, #ffc53d);
  color: #7a4d00;
  box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 2px 6px rgba(247,186,30,.35);
}

.btn.gold:hover {
  background: linear-gradient(180deg, #ffc53d, #f0a800);
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 5px 14px rgba(247,186,30,.45);
}

.btn.ghost {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  box-shadow: none;
}

.btn.ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
  box-shadow: none;
}

.btn.danger {
  background: linear-gradient(180deg, #ff7a6e, #f53f3f);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 2px 6px rgba(245,63,63,.3);
}

.btn.danger:hover {
  background: linear-gradient(180deg, #f53f3f, #e02727);
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 5px 14px rgba(245,63,63,.4);
}

.btn.sm {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-group { display: flex; gap: 8px; }

/* ---------- 动态支付方式列表（支付配置） ---------- */
.pm-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pm-row {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 0.9fr 0.7fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: 10px;
  transition: border-color .2s, background .2s;
}
.pm-row:hover { border-color: var(--primary); background: var(--primary-bg); }
.pm-row input, .pm-row select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.pm-row input:focus, .pm-row select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.pm-del { white-space: nowrap; }

/* ---------- 对接说明卡片（支付配置） ---------- */
.notify-box {
  flex: 1;
  min-width: 0;
}
.notify-box .hint { margin-top: 6px; }
.doc-box {
  margin: 14px 0 4px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--primary-bg, #f2f8ff), var(--card-bg));
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--text);
}
.doc-box .doc-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 8px;
}
.doc-box p { margin: 4px 0; }
.doc-box code {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 12px;
  color: var(--primary);
}
.doc-box .doc-ok {
  margin-top: 8px;
  padding: 8px 12px;
  background: #e8faf0;
  border: 1px solid #b6e6c8;
  border-radius: 8px;
  color: #16a34a;
  font-weight: 600;
}

/* ---------- 充值金额档位编辑器 ---------- */
.ra-editor { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.ra-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.ra-chip .ra-input {
  width: 92px;
  padding: 7px 22px 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.ra-chip .ra-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ra-x {
  position: absolute; right: 7px; top: 50%;
  margin-top: -9px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-style: normal;
  color: var(--text-muted);
  background: var(--sidebar-hover);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: all .2s;
}
.ra-x:hover { background: var(--danger); color: #fff; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 500;
  line-height: 1.6;
}

.tag.ok { background: var(--success-bg); color: var(--success); }
.tag.bad { background: var(--danger-bg); color: var(--danger); }
.tag.warn { background: var(--warning-bg); color: var(--warning); }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.muted { background: var(--sidebar-hover); color: var(--text-secondary); }

/* ---------- 分页 ---------- */
.pager {
  padding: 16px 0 4px;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}

.pager a {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  background: var(--card-bg);
  transition: all .2s;
  margin: 0 4px;
}

.pager a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- 提示信息 ---------- */
.tips {
  background: var(--warning-bg);
  border: 1px solid #ffd8a8;
  color: #b25e09;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.7;
}

.tips.ok {
  background: var(--success-bg);
  border-color: #b7eb8f;
  color: #0e7a0e;
}

.tips.err {
  background: var(--danger-bg);
  border-color: #ffcdd2;
  color: #b52626;
}

/* ---------- 操作栏 ---------- */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.action-bar .search-form {
  display: flex;
  gap: 8px;
}

.action-bar .search-form input {
  width: 240px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}

.action-bar .search-form input:focus {
  border-color: var(--primary);
}

/* ---------- 门户/端管理卡片 ---------- */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.portal-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all .22s;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.portal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.portal-card .portal-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}

.portal-card .portal-icon svg { width: 22px; height: 22px; }
.portal-card .portal-icon img { width: 28px; height: 28px; object-fit: cover; border-radius: 8px; }

.portal-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.portal-card .portal-path {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-family: 'Courier New', monospace;
}

.portal-card .portal-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.portal-card .portal-actions {
  display: flex;
  gap: 8px;
}

/* ---------- 开关 ---------- */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #c9cdd4;
  transition: .3s;
  border-radius: 22px;
}

.switch-slider::before {
  position: absolute;
  content: '';
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .3s;
  border-radius: 50%;
}

.switch input:checked + .switch-slider {
  background: var(--primary);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* ---------- 弹窗表单（后台所有「添加」统一为按钮 + 弹窗） ---------- */
.a-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
}
.a-modal.show { display: block; }

.a-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 26, .48);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: aModalFade .2s ease;
}

.a-modal-card {
  position: relative;
  margin: 6vh auto 0;
  width: min(640px, 92vw);
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 60% at 50% -8%, var(--primary-bg), transparent 58%),
    linear-gradient(180deg, var(--card-bg), var(--card-bg) 100%);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  border-radius: 20px;
  box-shadow:
    0 32px 70px -12px rgba(0, 0, 0, .32),
    0 0 0 1px rgba(255, 255, 255, .05) inset,
    0 10px 30px -12px color-mix(in srgb, var(--primary) 22%, transparent);
  animation: aModalUp .26s cubic-bezier(.16, 1, .3, 1);
}
.a-modal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  pointer-events: none;
}

.a-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 22px;
  border-bottom: 1px solid var(--border-light);
}
.a-modal-head h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.a-modal-head h3::before {
  content: '';
  width: 4px;
  height: 17px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}
.a-modal-x {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  line-height: 0;
  border-radius: 10px;
  transition: .2s;
}
.a-modal-x:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  transform: rotate(90deg);
}
.a-modal-x svg { width: 18px; height: 18px; }

.a-modal-body {
  padding: 20px 22px 22px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--primary) 28%, var(--border)) transparent;
}
.a-modal-body .f-row:last-child { margin-bottom: 12px; }
.a-modal-body .f-row input,
.a-modal-body .f-row select,
.a-modal-body .f-row textarea {
  transition: border-color .18s, box-shadow .18s;
}
.a-modal-body .f-row input:focus,
.a-modal-body .f-row select:focus,
.a-modal-body .f-row textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

@keyframes aModalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes aModalUp {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== 1.25.0 图库（media library）===== */
.lib-modal { z-index: 960; }
.lib-card { width: min(820px, 94vw); }
.lib-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.lib-toolbar .btn svg { width: 15px; height: 15px; }
.lib-search { position: relative; flex: 1; min-width: 200px; }
.lib-search svg {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-muted);
  pointer-events: none;
}
.lib-search input {
  width: 100%; padding: 8px 12px 8px 34px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.lib-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}
.lib-count { font-size: 12px; color: var(--text-muted); flex: none; }
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 12px;
  padding: 16px 20px;
  max-height: 46vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--primary) 28%, var(--border)) transparent;
}
.lib-item {
  position: relative;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all .18s;
}
.lib-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 18%, transparent);
}
.lib-item img {
  display: block; width: 100%; aspect-ratio: 1/1;
  object-fit: cover;
  background:
    linear-gradient(45deg, rgba(120,130,150,.10) 25%, transparent 25%, transparent 75%, rgba(120,130,150,.10) 75%),
    linear-gradient(45deg, rgba(120,130,150,.10) 25%, transparent 25%, transparent 75%, rgba(120,130,150,.10) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}
.lib-item .lib-nm {
  display: block;
  padding: 7px 9px 2px;
  font-size: 11.5px;
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lib-item .lib-meta {
  display: block;
  padding: 0 9px;
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lib-del {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px;
  border: none; border-radius: 50%;
  background: rgba(15,18,26,.55); color: #fff;
  font-size: 14px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: all .18s;
  z-index: 2;
}
.lib-item:hover .lib-del { opacity: 1; }
.lib-del:hover { background: #ef4444; transform: scale(1.08); }
.lib-empty { text-align: center; padding: 36px 20px; color: var(--text-muted); }
.lib-empty p { font-size: 13px; }
.lib-tip {
  padding: 10px 20px;
  font-size: 11.5px; color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}
/* 表单内「从图库选择」按钮 */
.up-btn--lib {
  border-style: solid;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
/* 图库管理页网格 */
.lib-grid--page {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  max-height: none;
  padding: 4px 0 6px;
}
.lib-grid--page .lib-del { opacity: 1; }
.lib-ops {
  display: flex; gap: 8px;
  padding: 8px 9px 9px;
}
.lib-ops .btn {
  flex: 1; justify-content: center;
  font-size: 11px; padding: 6px 4px;
}
.lib-ops .btn svg { width: 12px; height: 12px; }
/* 奖品卡片内图片图标 / 中奖记录小图标 */
.cat-card-ico-img { width: 26px; height: 26px; object-fit: cover; border-radius: 7px; }
.prize-ico-sm { width: 22px; height: 22px; object-fit: cover; border-radius: 5px; vertical-align: -5px; margin-right: 3px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .recent-cols { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .f-grid2 { grid-template-columns: 1fr; }
  .f-grid3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 210px; }

  .a-side {
    transform: translateX(-100%);
    transition: transform .3s;
    box-shadow: 8px 0 24px rgba(0,0,0,.08);
  }

  .a-side.open { transform: translateX(0); }

  .a-main { margin-left: 0; }

  .a-top { padding: 0 14px; }
  .a-top .a-burger { display: flex; }
  .a-top .a-right { gap: 6px; }
  .a-search { flex: 0 1 180px; margin: 0 12px; }
  .a-body { padding: 14px; }

  .cards { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: 1fr; }

  .club-hero { flex-direction: column; align-items: flex-start; }

  .login-box { padding: 28px 22px 24px; }

  .a-top .a-right .username { display: none; }
}

@media (max-width: 560px) {
  .a-search { display: none; }
  .a-top .a-right a[title="访问前台"] { display: none; }
  .a-bell-panel { width: 260px; right: -8px; }
}

/* ---------- UI设计主题选择 ---------- */
/* ---------- UI设计：主题模板预览（手机模型卡片） ---------- */
.tp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.tp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 22px 16px 18px;
  cursor: pointer;
  transition: all .22s;
  overflow: hidden;
}

.tp-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.tp-card.sel {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,93,255,.12);
}

.tp-card input { position: absolute; opacity: 0; width: 0; height: 0; }

/* ---- 手机模型 ---- */
.tp-phone {
  position: relative;
  width: 172px;
  height: 330px;
  flex-shrink: 0;
  border-radius: 26px;
  border: 6px solid #1b2330;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(15,23,42,.2);
  display: block;
}

.tp-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 62px;
  height: 11px;
  background: #1b2330;
  border-radius: 0 0 9px 9px;
  z-index: 3;
}

.tp-status {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  font-size: 8px;
  color: #fff;
  z-index: 2;
  font-style: normal;
}
.tp-status i { font-style: normal; }

.tp-head {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 46px;
  padding: 0 12px;
  color: #fff;
}

.tp-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #111;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tp-head-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tp-head-txt b { font-size: 10px; font-weight: 700; line-height: 1.1; }
.tp-head-txt i { font-size: 7px; font-style: normal; opacity: .75; }

.tp-bell {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
}

.tp-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 9px 44px;
  height: calc(100% - 46px);
  box-sizing: border-box;
}

.tp-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  border-radius: 8px;
  padding: 0 10px;
  color: #fff;
}
.tp-banner i { font-size: 9px; font-style: normal; font-weight: 700; }
.tp-banner u { font-size: 7px; text-decoration: none; background: rgba(255,255,255,.24); border-radius: 6px; padding: 2px 6px; }

.tp-row { display: flex; gap: 8px; }
.tp-prod {
  flex: 1;
  border-radius: 8px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tp-cover { display: block; height: 46px; border-radius: 6px; }
.tp-ln { display: block; height: 5px; border-radius: 3px; width: 90%; }
.tp-ln.short { width: 55%; }
.tp-price { font-size: 9px; font-weight: 700; }

/* ---- 底部 tabbar ---- */
.tp-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid rgba(0,0,0,.06);
  z-index: 2;
}
.tp-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 7px; }
.tp-tab i { width: 9px; height: 9px; border-radius: 3px; opacity: .9; }

/* ---- 说明区 ---- */
.tp-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  width: 100%;
}
.tp-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.tp-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.tp-swatches { display: flex; gap: 8px; margin-top: 2px; }
.tp-swatches i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.14);
}

.tp-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.6);
  transition: all .2s;
  z-index: 4;
}

.tp-card.sel .tp-check { opacity: 1; transform: scale(1); }

/* ---- 账单中心汇总卡 ---- */
.bills-sum {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.bills-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 4px solid var(--primary);
}
.bills-item.i-green { border-left-color: #16a34a; }
.bills-item.i-red { border-left-color: #e11d48; }
.bills-item.i-orange { border-left-color: #f59e0b; }
.bills-label { font-size: 12px; color: var(--text-muted); }
.bills-val { font-size: 22px; font-weight: 700; color: var(--text-primary); }

@media (max-width: 1100px) {
  .tp-grid { grid-template-columns: 1fr; }
  .bills-sum { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .bills-sum { grid-template-columns: 1fr; }
}

/* ---------- 客服聊天界面（u4 预留） ---------- */
.chat-layout {
  display: flex;
  gap: 16px;
  height: calc(100vh - 152px);
  min-height: 480px;
}

.chat-side {
  width: 300px;
  flex-shrink: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chat-side .chat-side-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-side .chat-side-list { flex: 1; overflow-y: auto; }

.chat-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background .15s;
}

.chat-user:hover { background: var(--body-bg); }
.chat-user.on { background: var(--primary-bg); }

.chat-user .cu-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.chat-user .cu-main { flex: 1; min-width: 0; }
.chat-user .cu-name { font-size: 13.5px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-user .cu-last { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat-user .cu-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  flex-shrink: 0;
}

.chat-main {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chat-main .chat-head {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-main .chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: var(--sidebar-bg2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble { display: flex; gap: 10px; }
.chat-bubble.in { align-items: flex-start; }
.chat-bubble.out { align-items: flex-end; justify-content: flex-end; }

.chat-bubble .cb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.chat-bubble .cb-body { max-width: 68%; }
.chat-bubble .cb-text {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.chat-bubble.out .cb-text {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.chat-bubble .cb-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.chat-bubble .cb-read {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-muted);
  border-radius: 999px;
}
.chat-bubble .cb-read.on { color: var(--success, #16a34a); background: rgba(22, 163, 74, .12); }
.chat-bubble .cb-read svg { width: 10px; height: 10px; }

.chat-main .chat-input-bar {
  border-top: 1px solid var(--border-light);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--card-bg);
}

.chat-main .chat-input-bar textarea {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13.5px;
  resize: none;
  outline: none;
  font-family: inherit;
  min-height: 44px;
  max-height: 120px;
  transition: border-color .2s;
}

.chat-main .chat-input-bar textarea:focus { border-color: var(--primary); }

.chat-quick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chat-quick .cq-btn {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
}

.chat-quick .cq-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }

@media (max-width: 900px) {
  .chat-layout { flex-direction: column; height: auto; }
  .chat-side { width: 100%; max-height: 260px; }
  .chat-main { min-height: 420px; height: 70vh; }
}

/* ---------- 二维码弹层 ---------- */
.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 26, .48);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.qr-modal.show { opacity: 1; pointer-events: auto; }

.qr-modal .qr-box {
  position: relative;
  background:
    radial-gradient(120% 60% at 50% -8%, var(--primary-bg), transparent 58%),
    var(--card-bg);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  border-radius: 20px;
  padding: 26px 24px 22px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow:
    0 32px 70px -12px rgba(0, 0, 0, .32),
    0 10px 30px -12px color-mix(in srgb, var(--primary) 22%, transparent);
  transform: scale(.92) translateY(8px);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}

.qr-modal.show .qr-box { transform: scale(1) translateY(0); }

.qr-modal .qr-box canvas, .qr-modal .qr-box img { margin: 0 auto 14px; display: block; }
.qr-modal .qr-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.qr-modal .qr-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; word-break: break-all; }
.qr-modal .qr-btns { display: flex; gap: 10px; justify-content: center; }

/* =====================================================
   后台外壳 v4（追加覆盖段：顶栏 + 页签条 + rail/panel 侧栏）
   参考图一（顶栏：菜单/刷新/标题 · 地球/头像/三点 · 页签条）
   参考图二（侧栏：左侧渐变图标 rail + 深色 flyout panel）
   通过变量与 media query 按浏览器宽度自动适配手机/电脑
   ===================================================== */
:root {
  --side-w: 232px;
  --side-mini-w: 76px;
  --tabs-h: 50px;
  --side-bg: #ffffff;
  --side-text: #5a6472;
  --side-text-strong: #1f2733;
  --side-hover: #f3f6fb;
  --pop-bg: #ffffff;
  --top-bg: rgba(255,255,255,.82);
  --top-border: rgba(255,255,255,.6);
}

html.a-dark {
  --side-bg: #191c24;
  --side-text: #8d99ab;
  --side-text-strong: #dbe1ec;
  --side-hover: #232834;
  --pop-bg: #23242a;
  --top-bg: rgba(28,28,32,.85);
  --top-border: rgba(0,0,0,.35);
}

/* ---- 主题套装（data-theme，10 套：主色 + 深色适配）---- */
/* 兼容旧 localStorage：JS 启动时把 aAccent 迁移为 aTheme */
html[data-accent="violet"], html[data-theme="violet"] { --primary:#7c3aed; --primary-light:#9d5cff; --primary-dark:#6d28d9; --primary-bg:#f1e9ff; --sidebar-active-text:#7c3aed; }
html[data-accent="green"],  html[data-theme="green"]  { --primary:#00b42a; --primary-light:#23c343; --primary-dark:#009a29; --primary-bg:#e8ffea; --sidebar-active-text:#00b42a; }
html[data-accent="orange"], html[data-theme="orange"] { --primary:#ff7d00; --primary-light:#ff9c38; --primary-dark:#e06a00; --primary-bg:#fff3e8; --sidebar-active-text:#ff7d00; }
html[data-accent="red"],    html[data-theme="red"]    { --primary:#f53f3f; --primary-light:#ff6b57; --primary-dark:#d03030; --primary-bg:#ffece8; --sidebar-active-text:#f53f3f; }
html[data-accent="cyan"],   html[data-theme="cyan"]   { --primary:#0fb9b5; --primary-light:#2bd4c4; --primary-dark:#0aa8a5; --primary-bg:#e6fffd; --sidebar-active-text:#0fb9b5; }
html[data-accent="pink"],   html[data-theme="pink"]   { --primary:#ec4899; --primary-light:#f472b6; --primary-dark:#db2777; --primary-bg:#fdf0f6; --sidebar-active-text:#ec4899; }
html[data-accent="gold"],   html[data-theme="gold"]   { --primary:#e6a23c; --primary-light:#f5b64f; --primary-dark:#d08c2b; --primary-bg:#fdf3e3; --sidebar-active-text:#e6a23c; }
html[data-accent="slate"],  html[data-theme="slate"]  { --primary:#475569; --primary-light:#64748b; --primary-dark:#334155; --primary-bg:#eef2f7; --sidebar-active-text:#475569; }
html[data-accent="teal"],   html[data-theme="teal"]   { --primary:#0d9488; --primary-light:#14b8a6; --primary-dark:#0f766e; --primary-bg:#e6fffc; --sidebar-active-text:#0d9488; }
html.a-dark[data-accent="violet"], html.a-dark[data-theme="violet"] { --primary:#a78bfa; --primary-light:#c4b5fd; --primary-dark:#8b5cf6; --primary-bg:#241b3d; }
html.a-dark[data-accent="green"],  html.a-dark[data-theme="green"]  { --primary:#34d158; --primary-light:#5fe57c; --primary-dark:#23a844; --primary-bg:#14281a; }
html.a-dark[data-accent="orange"], html.a-dark[data-theme="orange"] { --primary:#ff9c38; --primary-light:#ffb878; --primary-dark:#f07c14; --primary-bg:#2e2212; }
html.a-dark[data-accent="red"],    html.a-dark[data-theme="red"]    { --primary:#ff6b57; --primary-light:#ff8f80; --primary-dark:#e04a38; --primary-bg:#30191b; }
html.a-dark[data-accent="cyan"],   html.a-dark[data-theme="cyan"]   { --primary:#2bd4c4; --primary-light:#5fe6da; --primary-dark:#16b5a8; --primary-bg:#10272a; }
html.a-dark[data-accent="pink"],   html.a-dark[data-theme="pink"]   { --primary:#f472b6; --primary-light:#f9a8d4; --primary-dark:#ec4899; --primary-bg:#2b1520; }
html.a-dark[data-accent="gold"],   html.a-dark[data-theme="gold"]   { --primary:#f0bd6a; --primary-light:#f8d399; --primary-dark:#dfa03c; --primary-bg:#2b2113; }
html.a-dark[data-accent="slate"],  html.a-dark[data-theme="slate"]  { --primary:#94a3b8; --primary-light:#cbd5e1; --primary-dark:#64748b; --primary-bg:#171c24; }
html.a-dark[data-accent="teal"],   html.a-dark[data-theme="teal"]   { --primary:#2dd4bf; --primary-light:#5eead4; --primary-dark:#14b8a6; --primary-bg:#0f2422; }

/* 主题皮肤卡片（风格弹窗）（m11-9 改 2 列，减少拥挤） */
.a-theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 2px 8px 6px; }
.a-theme-card {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card-bg); cursor: pointer; text-align: left;
  font-family: inherit; transition: border-color .16s, transform .16s, box-shadow .16s;
}
.a-theme-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.a-theme-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-bg); }
.a-theme-card .tc-prev {
  flex: 0 0 auto;
  width: 30px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, var(--tc-a), var(--tc-b));
  position: relative; overflow: hidden;
}
.a-theme-card .tc-prev::after {
  content: ""; position: absolute; left: 6px; top: 4px;
  width: 9px; height: 9px; border-radius: 3px; background: rgba(255,255,255,.9);
  box-shadow: 3px 0 0 rgba(255,255,255,.45), 6px 0 0 rgba(255,255,255,.2);
}
.a-theme-card .tc-name { flex: 1; font-size: 11.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-theme-card.active .tc-name { color: var(--primary); font-weight: 600; }
.a-theme-card .tc-check { position: absolute; right: 6px; top: 6px; width: 14px; height: 14px; display: none; color: #fff; }
.a-theme-card.active .tc-check { display: block; }

/* ---- 整体背景：主色柔和晕染（图一淡紫渐变氛围）---- */
.a-wrap {
  background:
    radial-gradient(1100px 480px at 18% -8%, var(--primary-bg) 0%, transparent 58%),
    radial-gradient(900px 420px at 100% 0%, color-mix(in srgb, var(--primary-bg) 55%, transparent) 0%, transparent 52%),
    var(--body-bg);
}

/* ---- 侧栏：单条竖栏菜单（一级分组手风琴 + 二级/三级子菜单）---- */
.a-side {
  width: var(--side-w);
  background: var(--side-bg);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow: hidden;
  box-shadow: 8px 0 24px rgba(15,23,42,.06);
  transition: width .25s ease, transform .28s ease;
}

.a-nav { display: flex; flex-direction: column; height: 100%; }

/* 品牌行 */
.a-nav-brand {
  height: var(--topbar-height);
  padding: 0 14px;
  display: flex; align-items: center;
  gap: 10px;
  color: var(--side-text-strong);
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-light);
}
.a-nav-brand svg {
  width: 30px; height: 30px;
  padding: 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-sizing: content-box;
  flex-shrink: 0;
  box-shadow: 0 5px 12px color-mix(in srgb, var(--primary) 36%, transparent);
}
.a-nav-brand b { font-size: 15px; font-weight: 700; letter-spacing: .4px; white-space: nowrap; }

/* 菜单滚动区 */
.a-nav-body { flex: 1; overflow-y: auto; padding: 8px 10px 16px; scrollbar-width: thin; }
.a-nav-body::-webkit-scrollbar { width: 5px; }
.a-nav-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* 一级分组头 */
.a-nav-group { margin-bottom: 8px; }
.a-nav-group + .a-nav-group { padding-top: 8px; border-top: 1px dashed var(--border-light); }
.a-nav-head {
  width: 100%;
  border: none;
  background: transparent;
  display: flex; align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  color: var(--side-text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .16s, color .16s;
  text-align: left;
}
.a-nav-head:hover { background: var(--side-hover); color: var(--side-text-strong); }
.a-nav-group.active > .a-nav-head { color: var(--side-text-strong); font-weight: 700; }

/* 图标块（m11-6：软色淡底 + 彩色描边图标，现代非 AI 风） */
.a-nav-ico {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  background: var(--border-color);
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: transform .18s, background .18s, color .18s, border-color .18s;
}
.a-nav-head:hover .a-nav-ico { transform: scale(1.06); }
.a-nav-ico svg { width: 16px; height: 16px; }
.a-nav-ico.sm { width: 24px; height: 24px; border-radius: 8px; }
.a-nav-ico.sm svg { width: 13px; height: 13px; }
/* 一级分组 tone：低饱和淡色底 + 特征色图标 + 细描边 + 内高光 */
.a-nav-ico.tone-blue   { color:#2563eb; background: color-mix(in srgb,#2563eb 12%,transparent); border-color: color-mix(in srgb,#2563eb 32%,transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.a-nav-ico.tone-green  { color:#16a34a; background: color-mix(in srgb,#16a34a 12%,transparent); border-color: color-mix(in srgb,#16a34a 32%,transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.a-nav-ico.tone-purple { color:#7c3aed; background: color-mix(in srgb,#7c3aed 12%,transparent); border-color: color-mix(in srgb,#7c3aed 32%,transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.a-nav-ico.tone-orange { color:#ea580c; background: color-mix(in srgb,#ea580c 12%,transparent); border-color: color-mix(in srgb,#ea580c 32%,transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.a-nav-ico.tone-red    { color:#dc2626; background: color-mix(in srgb,#dc2626 12%,transparent); border-color: color-mix(in srgb,#dc2626 32%,transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.a-nav-ico.tone-cyan   { color:#0e7490; background: color-mix(in srgb,#0e7490 12%,transparent); border-color: color-mix(in srgb,#0e7490 32%,transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.a-nav-ico.tone-indigo { color:#4f46e5; background: color-mix(in srgb,#4f46e5 12%,transparent); border-color: color-mix(in srgb,#4f46e5 32%,transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.a-nav-ico.tone-pink   { color:#db2777; background: color-mix(in srgb,#db2777 12%,transparent); border-color: color-mix(in srgb,#db2777 32%,transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.a-nav-ico.tone-slate  { color:#475569; background: color-mix(in srgb,#64748b 14%,transparent); border-color: color-mix(in srgb,#64748b 32%,transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.a-nav-ico.tone-yellow { color:#ca8a04; background: color-mix(in srgb,#eab308 14%,transparent); border-color: color-mix(in srgb,#eab308 34%,transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
/* 打开的分组：图标随主题色高亮 */
.a-nav-group.open > .a-nav-head .a-nav-ico { color: var(--primary); background: var(--primary-bg); border-color: color-mix(in srgb, var(--primary) 38%, transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
/* 暗色模式：图标提亮 */
html.a-dark .a-nav-ico.tone-blue   { color:#93b4ff; background: color-mix(in srgb,#2563eb 22%,transparent); border-color: color-mix(in srgb,#93b4ff 36%,transparent); box-shadow: none; }
html.a-dark .a-nav-ico.tone-green  { color:#4ade80; background: color-mix(in srgb,#16a34a 22%,transparent); border-color: color-mix(in srgb,#4ade80 36%,transparent); box-shadow: none; }
html.a-dark .a-nav-ico.tone-purple { color:#c4a5ff; background: color-mix(in srgb,#7c3aed 22%,transparent); border-color: color-mix(in srgb,#c4a5ff 36%,transparent); box-shadow: none; }
html.a-dark .a-nav-ico.tone-orange { color:#ffb074; background: color-mix(in srgb,#ea580c 22%,transparent); border-color: color-mix(in srgb,#ffb074 36%,transparent); box-shadow: none; }
html.a-dark .a-nav-ico.tone-red    { color:#ff8f87; background: color-mix(in srgb,#dc2626 22%,transparent); border-color: color-mix(in srgb,#ff8f87 36%,transparent); box-shadow: none; }
html.a-dark .a-nav-ico.tone-cyan   { color:#4adfe3; background: color-mix(in srgb,#0e7490 22%,transparent); border-color: color-mix(in srgb,#4adfe3 36%,transparent); box-shadow: none; }
html.a-dark .a-nav-ico.tone-indigo { color:#a5b4fc; background: color-mix(in srgb,#4f46e5 22%,transparent); border-color: color-mix(in srgb,#a5b4fc 36%,transparent); box-shadow: none; }
html.a-dark .a-nav-ico.tone-pink   { color:#f9a8d4; background: color-mix(in srgb,#db2777 22%,transparent); border-color: color-mix(in srgb,#f9a8d4 36%,transparent); box-shadow: none; }
html.a-dark .a-nav-ico.tone-slate  { color:#cbd5e1; background: color-mix(in srgb,#64748b 24%,transparent); border-color: color-mix(in srgb,#cbd5e1 36%,transparent); box-shadow: none; }
html.a-dark .a-nav-ico.tone-yellow { color:#fde047; background: color-mix(in srgb,#eab308 26%,transparent); border-color: color-mix(in srgb,#fde047 38%,transparent); box-shadow: none; }

.a-nav-txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-nav-caret { flex-shrink: 0; display: flex; color: var(--text-muted); transition: transform .22s; }
.a-nav-caret svg { width: 14px; height: 14px; }
.a-nav-group.open > .a-nav-head .a-nav-caret { transform: rotate(180deg); }

/* 二级子菜单 */
.a-nav-sub { display: none; padding: 2px 0 4px; animation: panelIn .2s ease; }
.a-nav-group.open > .a-nav-sub { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: translateX(0); } }

.a-nav-item {
  display: flex; align-items: center;
  gap: 9px;
  padding: 7.5px 10px;
  margin: 1px 0;
  border-radius: 10px;
  color: var(--side-text);
  font-size: 13px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.a-nav-item:hover { background: var(--side-hover); color: var(--side-text-strong); }
.a-nav-item.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.a-nav-item .nav-badge { margin-left: auto; font-size: 10px; height: 15px; line-height: 15px; min-width: 15px; padding: 0 5px; background: var(--primary); }
.a-nav-item.lv3 { padding-left: 16px; font-size: 12.5px; }

.a-nav-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  margin-left: 2px;
  transition: background .15s, box-shadow .15s;
}
.a-nav-item.lv3:hover .a-nav-dot { background: var(--text-muted); }
.a-nav-item.lv3.active .a-nav-dot { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }

/* 二级分组（三级子菜单） */
.a-nav-sec { margin: 2px 0; border-radius: 10px; }
.a-nav-sec-head {
  width: 100%;
  border: none;
  background: transparent;
  display: flex; align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--side-text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
  text-align: left;
}
.a-nav-sec-head:hover { background: var(--side-hover); color: var(--side-text-strong); }
.a-nav-sec > .a-nav-sec-head .a-nav-caret { transform: rotate(-90deg); }
.a-nav-sec.show > .a-nav-sec-head .a-nav-caret { transform: rotate(0deg); }
.a-nav-sub2 { display: none; padding: 0 0 4px; animation: panelIn .2s ease; }
.a-nav-sec.show > .a-nav-sub2 { display: block; }

/* 底部：收起/展开 + 版本号 */
.a-nav-foot {
  flex-shrink: 0;
  display: flex; align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--border-light);
}
.a-nav-mini {
  border: none;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.a-nav-mini:hover { background: var(--side-hover); color: var(--primary); }
.a-nav-mini svg { width: 17px; height: 17px; }
.a-nav-ver { margin-left: auto; font-size: 11px; color: var(--text-muted); letter-spacing: .5px; white-space: nowrap; }

/* ---- 精简侧栏：只保留图标 ---- */
html.a-mini { --side-w: var(--side-mini-w); }
html.a-mini .a-nav-brand { justify-content: center; padding: 0; border-bottom: none; }
html.a-mini .a-nav-brand b,
html.a-mini .a-nav-txt,
html.a-mini .a-nav-caret,
html.a-mini .a-nav-sub,
html.a-mini .a-nav-ver { display: none; }
html.a-mini .a-nav-body { padding: 8px 7px; }
html.a-mini .a-nav-head { justify-content: center; padding: 9px 0; }
html.a-mini .a-nav-item, html.a-mini .a-nav-sec-head { justify-content: center; padding: 8px 0; }
html.a-mini .a-nav-foot { justify-content: center; padding: 10px 0; }

/* ---- 主内容区 ---- */
.a-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-left: var(--side-w);
  min-height: 100vh;
  transition: margin-left .25s ease;
}

/* ---- 顶栏（图一：透明玻璃质感）---- */
.a-top {
  height: var(--topbar-height);
  background: var(--top-bg);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--top-border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(15,23,42,.03);
}

.a-top .a-page { font-size: 15px; font-weight: 700; gap: 9px; }
.a-top .a-page::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-bg);
}

.a-top .a-right { gap: 6px; margin-left: auto; }

.a-icon-btn {
  border: none;
  border-radius: 10px;
  background: transparent;
  width: 36px; height: 36px;
}
.a-icon-btn:hover { border: none; background: var(--primary-bg); color: var(--primary); }
html.a-dark .a-icon-btn { background: transparent; }
html.a-dark .a-icon-btn:hover { background: var(--primary-bg); }
html.a-dark .a-user-btn { background: var(--body-bg); }
html.a-dark .a-user-btn:hover { background: var(--primary-bg); }

/* 页面搜索（胶囊） */
.a-search {
  flex: 0 1 220px;
  height: 34px;
  margin: 0 14px 0 6px;
  border-radius: 999px;
  background: var(--body-bg);
  border: 1px solid var(--border);
}
.a-search:focus-within { background: var(--card-bg); }
.a-search-ico svg { width: 15px; height: 15px; }
.a-search-x { background: var(--border); }

/* 头像入口（右上角，自动读取当前管理员信息与头像） */
.a-user-btn {
  display: flex; align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  margin-left: 2px;
  border: none;
  border-radius: 999px;
  background: var(--body-bg);
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.a-user-btn:hover { background: var(--primary-bg); }
.a-user-btn > svg { width: 12px; height: 12px; color: var(--text-muted); }
.a-user-name { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

.a-user-ava {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}
.a-user-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- 页签条（图一：主页 / API 密钥 ×）---- */
.a-tabs {
  position: sticky;
  top: var(--topbar-height);
  z-index: 49;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--body-bg);
  border-bottom: 1px solid var(--border-light);
}
.a-tabs-list { display: flex; gap: 5px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.a-tabs-list::-webkit-scrollbar { display: none; }

.a-tab {
  display: flex; align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  transition: all .16s;
  flex-shrink: 0;
}
.a-tab:hover { color: var(--primary); background: var(--card-bg); }
.a-tab.active {
  color: var(--primary);
  background: var(--card-bg);
  border-color: var(--border);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.a-tab-x {
  width: 15px; height: 15px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.a-tab-x:hover { background: var(--danger); color: #fff; }
.a-tab-x svg { width: 9px; height: 9px; }

.a-tabs-more {
  width: 30px; height: 30px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.a-tabs-more:hover { background: var(--card-bg); color: var(--primary); }
.a-tabs-more svg { width: 14px; height: 14px; transform: rotate(90deg); }

.a-tab-more-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 12px 12px;
}
.a-tab-more-item {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--body-bg);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all .15s;
}
.a-tab-more-item:hover { color: var(--primary); background: var(--primary-bg); }
.a-tab-more-item.active { color: var(--primary); background: var(--primary-bg); font-weight: 600; }

/* ---- 顶栏弹层（语言 / 头像 / 风格）---- */
.a-pop-wrap { position: relative; }

.a-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 250px;
  background: var(--pop-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-6px) scale(.97);
  transform-origin: top right;
  pointer-events: none;
  transition: all .2s ease;
  z-index: 130;
}
.a-pop.show { opacity: 1; transform: none; pointer-events: auto; }
.a-pop--lg { width: 340px; }
.a-pop--md { width: 300px; }
.a-pop-card { padding: 10px; }
.a-pop-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .5px;
  padding: 8px 8px 8px;
}
.a-pop-title:not(:first-child) { margin-top: 6px; border-top: 1px solid var(--border-light); padding-top: 12px; }

/* 头像弹层 */
.a-user-head {
  display: flex; align-items: center;
  gap: 12px;
  padding: 8px 8px 12px;
  border-bottom: 1px solid var(--border-light);
}
.a-pop .a-user-ava { width: 44px; height: 44px; font-size: 17px; }
.a-user-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.a-user-meta b { font-size: 14px; font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-user-meta em {
  align-self: flex-start;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-bg);
  border-radius: 999px;
  padding: 2px 9px;
}
.a-user-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
  padding: 8px 8px 2px;
  font-size: 12.5px;
}
.a-user-row span { color: var(--text-muted); flex-shrink: 0; }
.a-user-row b { color: var(--text-secondary); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-user-links {
  margin-top: 6px;
  border-top: 1px solid var(--border-light);
  padding-top: 6px;
  display: flex; flex-direction: column; gap: 2px;
}
.a-user-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all .15s;
}
.a-user-links a:hover { background: var(--primary-bg); color: var(--primary); }
.a-user-links a.danger:hover { background: var(--danger-bg); color: var(--danger); }
.a-user-links a svg { width: 16px; height: 16px; }

/* 语言弹层：国旗 + 原生名称 + 地区码（m11-8 重构为纵向卡片） */
.a-lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 2px 8px 8px;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.a-lang-item {
  position: relative;
  width: 100%;
  display: flex; flex-direction: column; align-items: stretch;
  gap: 3px;
  padding: 8px 9px 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--card-bg);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  text-align: left;
}
.a-lang-item:hover { border-color: var(--primary); background: var(--primary-bg); }
.a-lang-item.active { color: var(--primary); font-weight: 600; border-color: var(--primary); background: var(--primary-bg); box-shadow: 0 0 0 1px var(--primary) inset; }
.a-lang-item > svg {
  position: absolute;
  top: 8px; right: 8px;
  width: 15px; height: 15px;
  opacity: 0;
  transition: opacity .15s;
}
.a-lang-item.active > svg { opacity: 1; }
.a-lang-main { display: flex; align-items: center; gap: 7px; min-width: 0; }
.a-lang-flag {
  flex: 0 0 auto;
  width: 16px; height: 16px;
  font-size: 15px;
  line-height: 16px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.18));
}
.a-lang-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; padding-right: 18px; }

/* =====================================================
   m14-4 通用视觉增强：头像 / 列表 / 卡片
   ===================================================== */
/* 圆形头像（带渐变底） */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 14px; font-weight: 700; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}
.avatar.av-green { background: linear-gradient(135deg, #23c343, #009a29); }
.avatar.av-orange { background: linear-gradient(135deg, #ff9a3d, #ff7d00); }
.avatar.av-purple { background: linear-gradient(135deg, #b37feb, #722ed1); }
.avatar.av-cyan { background: linear-gradient(135deg, #33d6d2, #0fc6c2); }
.avatar.av-red { background: linear-gradient(135deg, #ff7a6e, #f53f3f); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.av-sm { width: 30px; height: 30px; font-size: 12px; }

/* 表格内用户单元（头像 + 账号昵称） */
.tbl-user { display: flex; align-items: center; gap: 10px; }
.tbl-user-copy { line-height: 1.35; }
.tbl-user-name { font-weight: 600; color: var(--text-primary); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.tbl-user-sub { font-size: 11.5px; color: var(--text-muted); }

/* 行内辅助小徽标 */
.inline-flag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--primary);
  background: var(--primary-bg); border-radius: 6px; padding: 1px 7px;
}
.inline-flag.fg-green { color: var(--success); background: var(--success-bg); }
.inline-flag.fg-orange { color: var(--warning); background: var(--warning-bg); }
.inline-flag.fg-red { color: var(--danger); background: var(--danger-bg); }
.inline-flag.fg-purple { color: #722ed1; background: #f5e8ff; }

/* 分类卡片网格（分类管理页） */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.cat-card {
  position: relative; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
  box-shadow: var(--shadow-sm); transition: all .22s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.cat-card.off { opacity: .62; }
.cat-card-top { display: flex; align-items: center; justify-content: space-between; }
.cat-card-ico {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, var(--primary-bg), #fff);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}
.cat-card-name { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-top: 12px; }
.cat-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.cat-card-ops { display: flex; gap: 8px; margin-top: 14px; }

/* 投诉卡片（后台投诉页） */
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.cp-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; transition: all .22s; }
.cp-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cp-card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border-light); }
.cp-card-body { padding: 14px 16px; }
.cp-card-content { font-size: 13.5px; color: var(--text-primary); line-height: 1.7; background: var(--sidebar-bg2); border-radius: 10px; padding: 12px 14px; }
.cp-card-reply { margin-top: 10px; font-size: 13px; color: var(--success); background: var(--success-bg); border-radius: 10px; padding: 10px 12px; line-height: 1.6; }
.cp-card-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border-light); gap: 8px; flex-wrap: wrap; }
.cp-imgs { display: flex; gap: 8px; margin-top: 10px; }
.cp-imgs a { font-size: 12px; }
.a-lang-code {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--text-muted);
  border-radius: 5px;
  background: var(--border-color);
  padding: 1px 6px;
}
.a-lang-item.active .a-lang-code { background: var(--primary); color: #fff; }

/* 风格弹层：模式段选 / 主题色板 / 精简开关（m11-9 改横向 + 2 列，去拥挤） */
.a-seg {
  display: flex;
  background: var(--body-bg);
  border-radius: 11px;
  padding: 3px;
  gap: 2px;
  margin: 2px 8px 10px;
}
.a-seg button {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 8px 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all .18s;
  font-family: inherit;
  white-space: nowrap;
}
.a-seg button svg { width: 15px; height: 15px; }
.a-seg button.active {
  background: var(--card-bg);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.a-accent-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 8px;
  padding: 2px 8px 12px;
  justify-items: center;
}
.a-accent {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid var(--pop-bg);
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
  padding: 0;
  transition: all .18s;
  position: relative;
}
.a-accent:hover { transform: scale(1.14); }
.a-accent.active { box-shadow: 0 0 0 2px var(--pop-bg), 0 0 0 4px var(--c); transform: scale(1.1); }
.a-mini-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 8px 6px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.a-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 38px; height: 21px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.a-toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .2s;
}
.a-toggle:checked { background: var(--primary); }
.a-toggle:checked::after { transform: translateX(17px); }

/* ---- 主体 ---- */
.a-body { padding: 18px 20px; }

/* ---- 响应式：按浏览器宽度自动适配（手机 / 平板 / 电脑）---- */
@media (max-width: 1240px) {
  .a-search { flex: 0 1 160px; }
}
@media (max-width: 1100px) {
  .a-search { display: none; }
  .a-user-name { display: none; }
}
@media (max-width: 900px) {
  /* 侧栏变抽屉：整体滑入 */
  html .a-side, html.a-mini .a-side {
    width: min(300px, 88vw);
    transform: translateX(-100%);
    box-shadow: 12px 0 40px rgba(15,23,42,.18);
  }
  html .a-side.open, html.a-mini .a-side.open { transform: translateX(0); }
  .a-main { margin-left: 0; }
  .a-top .a-burger { display: flex; }
  .a-top { padding: 0 12px; }
  .a-tabs { padding: 7px 12px; }
  .a-body { padding: 14px 14px 20px; }
  /* 移动端强制完整菜单（忽略精简模式） */
  html.a-mini .a-nav-brand { justify-content: flex-start; padding: 0 14px; border-bottom: 1px solid var(--border-light); }
  html.a-mini .a-nav-brand b,
  html.a-mini .a-nav-txt,
  html.a-mini .a-nav-caret,
  html.a-mini .a-nav-ver { display: inline; }
  html.a-mini .a-nav-sub { display: none; }
  html.a-mini .a-nav-group.open > .a-nav-sub { display: block; }
  html.a-mini .a-nav-head,
  html.a-mini .a-nav-item,
  html.a-mini .a-nav-sec-head { justify-content: flex-start; padding: 9px 10px; }
  html.a-mini .a-nav-foot { justify-content: space-between; padding: 10px 14px; }
}
@media (max-width: 620px) {
  .a-top { gap: 2px; padding: 0 8px; }
  .a-right { gap: 2px; }
  .a-user-btn { padding: 3px 6px 3px 3px; }
  .a-user-ava { width: 28px; height: 28px; }
  .a-pop { width: 236px; }
  .a-pop--lg { width: 320px; }
  .a-pop--md { width: 280px; }
  .a-bell-panel { width: 272px; right: -6px; }
}
@media (max-width: 400px) {
  .a-top .a-page { display: none; }
  .a-tabs-more { display: none; }
}

/* ============================================================
   表单增强（m6：添加用户 / 员工表单 UI 优化）
   ============================================================ */
/* 必填红星 */
.f-row label .req { color: #f43f5e; margin-left: 2px; font-style: normal; }
/* 输入框 hover 态 */
.f-row input:hover, .f-row textarea:hover, .f-row select:hover { border-color: #c4cfe0; }
.f-row input:focus, .f-row textarea:focus, .f-row select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,93,255,.10); }
/* 输入框前缀图标（如账号 / 昵称） */
.f-input {
  position: relative;
  display: flex;
  align-items: center;
}
.f-input > svg {
  position: absolute;
  left: 12px;
  width: 16px; height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.f-input input { padding-left: 36px; }
/* 密码可见性切换 */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px; }
.pw-wrap .pw-eye {
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer;
  color: var(--text-muted); border-radius: 8px;
  transition: color .18s, background .18s;
  padding: 0;
}
.pw-wrap .pw-eye:hover { color: var(--primary); background: var(--primary-bg); }
.pw-wrap .pw-eye svg { width: 17px; height: 17px; }
/* select 自定义箭头 */
.f-row select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 9.5 12 15l5.5-5.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
  padding-right: 34px;
  cursor: pointer;
}
/* 表单分组标题 */
.f-sec {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 14px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--primary-bg, #eef3ff);
  color: var(--primary, #165dff);
  font-size: 12.5px; font-weight: 600;
}
.f-sec svg { width: 16px; height: 16px; }
.f-sec .f-sec-line { flex: 1; height: 1px; background: rgba(22,93,255,.14); }
/* 底部操作区 */
.f-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 6px; padding-top: 14px;
  border-top: 1px dashed var(--border, #e5e9f2);
}
.f-actions .btn { min-width: 96px; }
.f-actions .btn.primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.f-actions .btn.primary svg { width: 15px; height: 15px; }
/* 弹窗内两列表单在窄屏回落为单列 */
.a-modal-body .f-grid2 { gap: 14px; }
@media (max-width: 620px) {
  .a-modal-body .f-grid2 { grid-template-columns: 1fr; gap: 12px; }
  .a-modal-body .f-actions { flex-direction: column-reverse; }
  .a-modal-body .f-actions .btn { width: 100%; }
}

/* ============================================================
   手机端适配（m7：后台手机版布局完善）
   ============================================================ */
/* 1) 宽表格 → 容器内横向滚动（不撑破布局） */
@media (max-width: 900px) {
  table.tbl {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .tbl th, .tbl td { padding: 10px 12px; }
}

/* 2) 统计卡：手机端 2 列更紧凑（覆盖既有 1 列过深） */
@media (max-width: 768px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
  .stat-card { padding: 13px 14px; gap: 11px; }
  .stat-card .stat-icon { width: 38px; height: 38px; border-radius: 10px; }
  .stat-card .stat-icon svg { width: 19px; height: 19px; }
  .stat-card .stat-num { font-size: 20px; }
  .stat-card .stat-label { font-size: 12px; }
}

/* 3) 概览卡 cards：手机端 2 列（此前 1 列过长） */
@media (max-width: 768px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cards .c { padding: 15px 16px; }
  .cards .c .n { font-size: 22px; }
}

/* 4) 面板 / 快捷入口 紧凑 */
@media (max-width: 768px) {
  .panel { padding: 15px 16px; margin-bottom: 14px; }
  .panel-header { margin-bottom: 12px; padding-bottom: 10px; }
  .quick-item { padding: 13px 6px; }
  .quick-item .quick-icon { width: 38px; height: 38px; margin-bottom: 8px; }
  .quick-item .quick-icon svg { width: 20px; height: 20px; }
}

/* 5) 分页 / 分类导航 紧凑换行 */
@media (max-width: 620px) {
  .cat-nav { padding: 6px; gap: 5px; }
  .cat-nav a { padding: 5px 11px; font-size: 12.5px; }
  .pager { padding: 12px 0 2px; line-height: 2.1; }
  .pager a { padding: 5px 11px; margin: 2px 3px; }
  .tbl th, .tbl td { padding: 9px 10px; }
}

/* 6) 弹窗：手机端近全屏 */
@media (max-width: 620px) {
  .a-modal-card { margin: 2vh auto 0; width: 94vw; max-height: 94vh; border-radius: 16px; }
  .a-modal-head { padding: 14px 18px; }
  .a-modal-body { padding: 16px 18px 18px; }
  .a-modal-body .f-row { margin-bottom: 14px; }
}

/* 7) 超窄屏：统计卡缩略 / 概览卡单列 */
@media (max-width: 420px) {
  .cards { grid-template-columns: 1fr; }
  .stat-card { padding: 12px; gap: 10px; }
  .stat-card .stat-icon { width: 34px; height: 34px; }
  .stat-card .stat-icon svg { width: 18px; height: 18px; }
}

/* ===================== 1.16.0 营销模块 ===================== */
/* 优惠券库存进度条 */
.bar { height: 6px; background: var(--bg-soft, #eef1f6); border-radius: 99px; overflow: hidden; width: 70px; }
.bar .bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary, #6366f1), #a78bfa); transition: width .3s; }

/* 营销页「规则/流水」双栏 */
.mkt-grid { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1080px) { .mkt-grid { grid-template-columns: 1fr; } }

/* 积分配置面板 */
.pts-rule .rule-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-bg, #eef2ff); color: var(--primary, #6366f1); margin-right: 8px; vertical-align: middle; }
.pts-rule .rule-ico svg { width: 17px; height: 17px; }
.pts-rule .f-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line, #e7eaf2); }
.pts-rule .f-switch-row:last-child { border-bottom: 0; }
.pts-rule .f-switch-row .lbl { flex: 1; }
.pts-rule .f-switch-row .lbl b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text, #1f2430); }
.pts-rule .f-switch-row .lbl span { font-size: 12px; color: #929aab; }
.pts-rule input[type="number"] { width: 88px; padding: 7px 10px; border: 1px solid var(--line, #e7eaf2); border-radius: 8px; font-size: 13px; background: var(--card, #fff); color: var(--text, #1f2430); }
.pts-rule input[type="number"]:focus { outline: none; border-color: var(--primary, #6366f1); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }

/* 开关（Switch）*/
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl { position: absolute; inset: 0; background: #d3d8e2; border-radius: 99px; transition: .25s; cursor: pointer; }
.switch .sl::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .sl { background: var(--primary, #6366f1); }
.switch input:checked + .sl::before { transform: translateX(18px); }

/* 看板趋势图 */
.mk-chart { width: 100%; height: 260px; display: block; }
.mk-chart .grid-line { stroke: var(--line, #eef1f6); stroke-width: 1; stroke-dasharray: 4 4; }
.mk-chart .axis-label { font-size: 11px; fill: #9aa3b5; }
.mk-chart .bar-r { fill: url(#mkGradR); }
.mk-chart .bar-b { fill: url(#mkGradB); }
.mk-chart .line-p { fill: none; stroke: #f59e0b; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mk-chart .dot-p { fill: #fff; stroke: #f59e0b; stroke-width: 2.2; }
.mk-chart-legend { display: flex; gap: 18px; margin-top: 6px; font-size: 12.5px; color: #6b7280; flex-wrap: wrap; }

/* ===================== 1.28.0 实时看板动态效果 ===================== */
/* 实时状态条（呼吸灯 + 倒计时） */
.dash-live {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 12px; padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px; color: var(--text-secondary);
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: default;
}
.dash-live__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  animation: dashLivePulse 2s infinite;
}
@keyframes dashLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
  70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.dash-live__count { font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
/* 趋势图：折线描边动画 + 柱子生长 */
.mk-chart .line-p {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: dashDraw 1.6s ease forwards;
}
@keyframes dashDraw { to { stroke-dashoffset: 0; } }
.mk-chart .bar-r {
  transform-origin: bottom center;
  animation: dashGrow .9s ease both;
}
@keyframes dashGrow { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
/* 流水卡片：动态流光扫过 */
.flow-item { position: relative; overflow: hidden; }
.flow-item::after {
  content: '';
  position: absolute; top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg);
  animation: dashSheen 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes dashSheen { 0% { left: -60%; } 55%, 100% { left: 135%; } }
/* 订单状态分布条：宽度过渡 */
.dash-st__bar { transition: flex .6s, min-width .6s; }

.mk-chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ===================== 1.26.0 四端门户（商家/打手/客服/工作室）复用样式 ===================== */
/* 四端视图此前基于 h5.css 移动端样式开发；1.26.0 起统一套用 admin_layout（总后台风格框架）。
   此处补齐视图所需的 h5 主题变量别名与组件样式，全部映射到 admin Arco 主题 */
:root {
  --theme-brand-primary: var(--primary);
  --theme-brand-primary-soft: var(--primary-bg);
  --theme-border: var(--border);
  --theme-text-primary: var(--text-primary);
  --theme-text-secondary: var(--text-secondary);
  --theme-text-muted: var(--text-muted);
  --theme-card-bg: var(--card-bg);
  --theme-card-border: var(--border);
  --theme-success: var(--success);
  --theme-warning: var(--warning);
  --theme-danger: var(--danger);
  --theme-info: var(--info);
  --theme-status-success-soft: var(--success-bg);
  --theme-status-warning-soft: var(--warning-bg);
  --theme-status-error-soft: var(--danger-bg);
  --theme-status-info-soft: var(--info-bg);
  --theme-head-grad: linear-gradient(135deg, var(--primary), #7c5cff 62%, #a855f7);
  --theme-shadow-accent: rgba(22, 93, 255, .28);
  --radius-l: 16px;
  --radius-m: 12px;
  --radius-s: 8px;
}

/* 图标尺寸（ico_svg 输出 24x24 viewBox，无固定宽高） */
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn.block svg { width: 16px; height: 16px; }
.empty .ico svg { width: 34px; height: 34px; }
.list .ico svg { width: 17px; height: 17px; }
.message-card__icon-wrap svg { width: 20px; height: 20px; }
.panel .avatar svg { width: 22px; height: 22px; }

/* ---------- 面板标题（h5 风格圆条） ---------- */
.panel > h3 { font-size: 15px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.panel > h3::before { content: ''; width: 4px; height: 14px; border-radius: 4px; background: linear-gradient(180deg, var(--primary-light), var(--primary)); box-shadow: 0 0 0 3px var(--primary-bg); }

/* ---------- 统计卡片（h5 .stat 结构） ---------- */
.stat { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.stat b, .stat .n { display: block; font-size: 22px; font-weight: 800; color: var(--primary); line-height: 1.25; }
.stat span, .stat .l { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.portal-merchant .stat-grid, .portal-booster .stat-grid { grid-template-columns: repeat(2, 1fr); }

/* ---------- 资料头 ---------- */
.profile-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border-light); margin-bottom: 4px; }
.profile-head > div:last-child { min-width: 0; }
.profile-head b { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.profile-head .hint { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; border-radius: 18px; }

/* ---------- 按钮补充 ---------- */
.btn.block { display: flex; width: 100%; align-items: center; justify-content: center; gap: 6px; }
.btn.primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.ok { background: linear-gradient(180deg, #23c343, #009a29); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 2px 6px rgba(0,180,42,.3); }
.btn.ok:hover { background: linear-gradient(180deg, #009a29, #007a20); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 5px 14px rgba(0,180,42,.4); }
.btn + .btn, .btn.block + .btn.block { margin-top: 8px; }
.tips.warn { background: var(--warning-bg); color: var(--warning); }

/* ---------- 徽标（badge） ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--sidebar-hover); color: var(--text-secondary); }
.badge.ok { background: var(--success-bg); color: var(--success); }
.badge.warn { background: var(--warning-bg); color: var(--warning); }
.badge.bad { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.gray { background: var(--sidebar-hover); color: var(--text-secondary); }
.badge.blue { background: var(--info-bg); color: var(--info); }
.badge svg { width: 12px; height: 12px; }

/* ---------- 小节标题 ---------- */
.sec-title { position: relative; margin: 14px 0 10px; padding-left: 11px; font-size: 15px; font-weight: 700; color: var(--text-primary); }
.sec-title::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 14px; border-radius: 4px; background: linear-gradient(180deg, var(--primary-light), var(--primary)); box-shadow: 0 0 0 3px var(--primary-bg); }

/* ---------- 键值行 ---------- */
.kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border-light); font-size: 13.5px; }
.kv span { color: var(--text-secondary); }
.kv b { color: var(--text-primary); font-weight: 600; }
.kv:last-child { border-bottom: 0; }

/* ---------- 流水行 ---------- */
.log-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.log-row:last-child { border-bottom: 0; }
.log-row b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.log-row .hint { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.amt-in { color: var(--success); font-weight: 700; font-size: 14px; }
.amt-out { color: var(--danger); font-weight: 700; font-size: 14px; }

/* ---------- 订单卡片 ---------- */
.order-card.oc-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.oc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.oc-top b { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.oc-top .price { flex-shrink: 0; }
.oc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.oc-status { margin-top: 8px; }
.price { font-size: 16px; font-weight: 700; color: var(--danger); }
.oc-card > .btn { margin-top: 12px; }
.oc-card .f-row { margin-top: 10px; }

/* ---------- 空状态 ---------- */
.empty { padding: 60px 24px 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; }
.empty .ico { display: flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--primary) 55%, transparent); color: var(--primary); background: var(--primary-bg); margin-bottom: 14px; animation: emptyFloat 2.6s ease-in-out infinite; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.empty-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.empty .btn { margin-top: 16px; }
@keyframes emptyFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- 收益头部 ---------- */
.withdraw-hero { position: relative; margin: 0 0 16px; padding: 20px 18px 16px; color: #fff; background: var(--theme-head-grad); border-radius: var(--radius-l); overflow: hidden; box-shadow: 0 10px 22px var(--theme-shadow-accent); }
.wh-glow { position: absolute; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.16); filter: blur(8px); top: -34px; right: -24px; pointer-events: none; }
.wh-label { font-size: 12px; font-weight: 600; opacity: .92; }
.wh-amount { font-size: 34px; font-weight: 800; line-height: 1.2; margin: 4px 0 10px; }
.wh-amount small { font-size: 16px; font-weight: 600; margin-left: 2px; opacity: .95; }
.wh-stats { display: flex; gap: 26px; margin-top: 4px; }
.wh-stat b { display: block; font-size: 17px; font-weight: 700; }
.wh-stat span { font-size: 11.5px; opacity: .88; }
.wd-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }

/* ---------- 邀请码 ---------- */
.invite-code { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: 4px; color: var(--primary); padding: 12px 8px; border: 1.5px dashed color-mix(in srgb, var(--primary) 45%, transparent); border-radius: var(--radius); background: var(--primary-bg); }
.invite-stats { display: flex; margin: 12px -8px 0; }
.invite-stat { flex: 1; text-align: center; padding: 4px 0; border-left: 1px solid var(--border-light); }
.invite-stat:first-child { border-left: 0; }
.invite-stat__num { display: block; font-size: 20px; font-weight: 800; color: var(--text-primary); }
.invite-stat__label { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---------- 列表行 ---------- */
.list .item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.list .item:last-child { border-bottom: 0; }
.list .ico { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-bg); color: var(--primary); flex-shrink: 0; }
.list .row { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.mt { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.md { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------- 客服消息卡片 ---------- */
.message-card--support { display: flex; gap: 12px; padding: 14px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.message-card__icon-wrap { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-bg); color: var(--primary); flex-shrink: 0; }
.message-card__body { flex: 1; min-width: 0; }
.message-card__title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.message-card__preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.message-card__foot { margin-top: 8px; }

/* ===================== 1.27.0 总后台多彩渐变看板 + 分享海报 + 四端门户主题 ===================== */

/* ---------- 1.27.0 多彩渐变欢迎区（更多颜色 + 动态光斑） ---------- */
.dash-hero--m27 {
  background: linear-gradient(120deg, #1d4ed8 0%, #4338ca 16%, #7c3aed 34%, #db2777 50%, #f59e0b 66%, #0d9488 82%, #0891b2 100%);
  background-size: 380% 380%;
  animation: clubGradM27 20s ease infinite;
  box-shadow: 0 12px 34px rgba(124, 58, 237, .28);
}
@keyframes clubGradM27 {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.dash-hero__blobs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(46px); opacity: .5; animation: blobFloat 13s ease-in-out infinite; }
.blob-a { width: 230px; height: 230px; background: rgba(236, 72, 153, .55); top: -86px; left: -44px; }
.blob-b { width: 270px; height: 270px; background: rgba(56, 189, 248, .5); bottom: -110px; left: 30%; animation-delay: -3.5s; }
.blob-c { width: 210px; height: 210px; background: rgba(250, 204, 21, .46); top: -64px; right: 12%; animation-delay: -6.5s; }
.blob-d { width: 250px; height: 250px; background: rgba(16, 185, 129, .5); bottom: -96px; right: -64px; animation-delay: -9.5s; }
.blob-e { width: 160px; height: 160px; background: rgba(167, 139, 250, .55); top: 28%; left: 56%; animation-delay: -5s; }
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(26px, -20px) scale(1.08); }
  66% { transform: translate(-20px, 16px) scale(.93); }
}
.dash-hero--m27 .dash-hero__left, .dash-hero--m27 .dash-hero__right { z-index: 1; }

/* 彩虹分享海报按钮（替代原二维码按钮） */
.dash-hero .btn.poster {
  background: linear-gradient(135deg, #f59e0b, #ef4444 45%, #d946ef 80%, #8b5cf6);
  background-size: 220% 220%;
  color: #fff;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(217, 70, 239, .38);
  animation: posterPulse 3.2s ease infinite;
}
.dash-hero .btn.poster:hover { background-position: 100% 50%; box-shadow: 0 6px 20px rgba(217, 70, 239, .52); transform: translateY(-1px); }
@keyframes posterPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(217, 70, 239, .32); }
  50% { box-shadow: 0 6px 22px rgba(245, 158, 11, .5); }
}

/* ---------- 分享海报弹层（替代原二维码弹层） ---------- */
.qr-modal .poster-box { max-width: 384px; }
.poster-preview {
  position: relative; margin: 14px auto 0; width: 220px; border-radius: 18px; padding: 18px 14px 16px; text-align: center; color: #fff; overflow: hidden;
  background: linear-gradient(160deg, #7c3aed 0%, #db2777 52%, #f59e0b 100%);
  box-shadow: 0 16px 32px -10px rgba(219, 39, 119, .42);
}
.poster-preview__grad { position: absolute; inset: 0; background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.26), transparent 55%), radial-gradient(circle at 92% 92%, rgba(255,255,255,.2), transparent 50%); }
.poster-preview__brand { position: relative; font-size: 16px; font-weight: 800; letter-spacing: 2px; }
.poster-preview__txt { position: relative; font-size: 12px; opacity: .93; margin: 4px 0 10px; }
.poster-preview__qr { position: relative; display: flex; justify-content: center; background: #fff; border-radius: 10px; padding: 8px; width: 168px; margin: 0 auto; }
.poster-preview__qr canvas, .poster-preview__qr img { margin: 0 !important; width: 150px !important; height: 150px !important; }
.poster-preview__hint { position: relative; font-size: 11px; opacity: .85; margin-top: 8px; }
.poster-link { display: flex; gap: 8px; margin-top: 8px; }
.poster-link input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--text-secondary); background: var(--bg); }

/* ---------- 1.27.0 四端门户主题（打手/客服/工作室/商家） ----------
   各端主色整体换肤：按钮/高亮/头部渐变随端变化 */
.portal-booster {
  --primary: #16a34a; --primary-dark: #15803d; --primary-light: #4ade80;
  --primary-bg: rgba(22, 163, 74, .10);
  --theme-head-grad: linear-gradient(135deg, #15803d, #22c55e 55%, #a3e635);
  --theme-shadow-accent: rgba(34, 197, 94, .30);
}
.portal-service {
  --primary: #0ea5e9; --primary-dark: #0369a1; --primary-light: #7dd3fc;
  --primary-bg: rgba(14, 165, 233, .10);
  --theme-head-grad: linear-gradient(135deg, #0369a1, #0ea5e9 55%, #38bdf8);
  --theme-shadow-accent: rgba(14, 165, 233, .30);
}
.portal-studio {
  --primary: #7c3aed; --primary-dark: #6d28d9; --primary-light: #a78bfa;
  --primary-bg: rgba(124, 58, 237, .10);
  --theme-head-grad: linear-gradient(135deg, #6d28d9, #8b5cf6 55%, #c084fc);
  --theme-shadow-accent: rgba(139, 92, 246, .30);
}
.portal-merchant {
  --primary: #ea580c; --primary-dark: #c2410c; --primary-light: #fdba74;
  --primary-bg: rgba(234, 88, 12, .10);
  --theme-head-grad: linear-gradient(135deg, #c2410c, #f97316 55%, #fbbf24);
  --theme-shadow-accent: rgba(249, 115, 22, .30);
}
/* 各端侧栏高亮跟随端主题色 */
.portal-booster .side-link.on, .portal-booster .rail-item.on { color: #16a34a; }
.portal-service .side-link.on, .portal-service .rail-item.on { color: #0ea5e9; }
.portal-studio .side-link.on, .portal-studio .rail-item.on { color: #7c3aed; }
.portal-merchant .side-link.on, .portal-merchant .rail-item.on { color: #ea580c; }

/* ---------- 1.27.0 合作方扩展 / 提现 / 创建订单 共用组件 ---------- */
.p-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.p-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.p-card__head b { font-size: 15px; font-weight: 700; color: var(--text-primary); display: inline-flex; align-items: center; gap: 7px; }
.p-card__head .sub { font-size: 11.5px; color: var(--text-muted); font-weight: 400; }
.p-rate-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #f59e0b, #ef4444); border-radius: 99px; padding: 3px 10px; }
.p-rate-tag.big { font-size: 20px; padding: 5px 16px; }
.p-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius); }
.p-qr-wrap canvas, .p-qr-wrap img { width: 140px !important; height: 140px !important; }
.p-link-box { display: flex; gap: 8px; }
.p-link-box input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 12px; color: var(--text-secondary); background: var(--bg); }
.p-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.p-grid2 .p-card { margin-bottom: 0; }
.p-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.p-table th { text-align: left; font-size: 12px; color: var(--text-muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.p-table td { padding: 10px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); }
.p-table tr:last-child td { border-bottom: 0; }
.p-table .rate { color: #ea580c; font-weight: 700; }
.p-table .ok { color: var(--success); font-weight: 600; }
.p-table .bad { color: var(--danger); font-weight: 600; }
.step-flow { display: flex; align-items: center; gap: 6px; margin: 4px 0 14px; flex-wrap: wrap; }
.step-flow .step { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-secondary); background: var(--primary-bg); border-radius: 99px; padding: 4px 12px; }
.step-flow .step b { color: var(--primary); }
.step-flow .arrow { color: var(--text-muted); font-size: 12px; }
.seg-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.seg-tabs .seg { flex: 1; text-align: center; padding: 10px 6px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: .2s; }
.seg-tabs .seg.on { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px var(--theme-shadow-accent); }
.seg-tabs .seg small { display: block; font-size: 11px; font-weight: 400; opacity: .85; margin-top: 2px; }
.mode-panel { display: none; }
.mode-panel.on { display: block; animation: modeIn .28s ease; }
@keyframes modeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.choose-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choose-item { position: relative; border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: .2s; background: var(--card-bg); }
.choose-item img { width: 100%; height: 86px; object-fit: cover; display: block; }
.choose-item .ci-body { padding: 8px 10px; }
.choose-item .ci-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.choose-item .ci-price { font-size: 12px; font-weight: 700; color: var(--danger); margin-top: 2px; }
.choose-item.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.choose-item.on::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.stat-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.stat-line:last-child { border-bottom: 0; }
.stat-line .sl-ico { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--primary-bg); color: var(--primary); flex-shrink: 0; }
.stat-line .sl-body { flex: 1; min-width: 0; }
.stat-line .sl-body b { display: block; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.stat-line .sl-body span { font-size: 11.5px; color: var(--text-muted); }
.stat-line .sl-val { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-align: right; }

/* ============ v4.1 视觉全面升级 ============ */
:root { --primary: #1664ff; --primary-light: #4d8bff; --primary-dark: #0b46d6; --accent: #00b96b; --grad: linear-gradient(135deg,#0b46d6,#1664ff 55%,#4d8bff); }
body { background: linear-gradient(180deg,#eef2f8 0%,#f5f7fb 100%); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c6cbd6; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #9aa2b4; }
/* 顶栏 */
.topbar, .top-bar { backdrop-filter: blur(12px); background: rgba(255,255,255,.85); box-shadow: 0 1px 10px rgba(20,30,60,.06); }
/* 侧栏激活态 */
.sidebar .nav-item.active, .side-nav .nav-item.active, .menu a.active, .sidebar li.active > a { background: var(--grad); color: #fff !important; box-shadow: 0 6px 16px rgba(22,100,255,.32); border-radius: 8px; }
/* 按钮 */
.btn, .button, .btn-primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 4px 12px rgba(22,100,255,.25); transition: all .22s; }
.btn:hover, .button:hover, .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(22,100,255,.4); }
.btn:active, .button:active { transform: translateY(0); }
.btn.ghost, .button.ghost { background: #fff; border: 1px solid #dce0e8; color: #333; box-shadow: none; }
.btn.danger, .btn-danger { background: linear-gradient(135deg,#f53f3f,#ff7875); box-shadow: 0 4px 12px rgba(245,63,63,.25); }
.btn.success { background: linear-gradient(135deg,#00b96b,#23c343); box-shadow: 0 4px 12px rgba(0,185,107,.25); }
/* 卡片/面板 */
.panel, .card { border: 1px solid rgba(220,224,234,.7); border-radius: 14px; box-shadow: 0 2px 10px rgba(30,40,70,.05); transition: box-shadow .25s, transform .25s; }
.panel:hover, .card:hover { box-shadow: 0 10px 28px rgba(30,40,70,.1); }
.panel-header h3, .card-title { position: relative; }
.panel-header h3::before, .card-title::before { content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%); width: 4px; height: 16px; border-radius: 4px; background: var(--grad); }
/* 表格 */
table.dtable, .dtable { border-radius: 12px; overflow: hidden; }
.dtable thead th { background: linear-gradient(180deg,#f7f9fd,#eef2f9); color: #4e5969; font-weight: 700; letter-spacing: .3px; }
.dtable tbody tr { transition: background .18s; }
.dtable tbody tr:hover { background: #f4f8ff; }
.dtable tbody tr:nth-child(even) { background: #fbfcfe; }
.dtable tbody tr:nth-child(even):hover { background: #f4f8ff; }
/* 输入框 focus 光晕 */
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], select, textarea { border: 1px solid #dce0e8; border-radius: 8px; transition: all .22s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(22,100,255,.14); outline: none; }
/* 徽章/状态点 */
.badge, .tag { border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
/* 弹窗 */
.modal-mask, .modal_mask { backdrop-filter: blur(3px); background: rgba(20,30,60,.45); }
.modal-card, .modal_card { animation: v41pop .26s cubic-bezier(.34,1.4,.64,1); border-radius: 16px; }
@keyframes v41pop { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
/* 统计卡 */
.stat-card, .stat { border: none; background: linear-gradient(160deg,#fff,#f7faff); border-radius: 16px; }
/* Toast */
.toast { border-radius: 12px; backdrop-filter: blur(10px); }

/* ============ 1.32.0 兼容修复：color-mix 回退（低版本浏览器按钮空白问题） ============ */
@supports not (background: color-mix(in srgb, red 30%, blue)) {
  .btn { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 2px 6px rgba(22,93,255,.25); }
  .a-nav-head:hover, .a-nav-item:hover, .a-tab:hover { background: #f2f3f5; }
  .a-nav-group.open > .a-nav-head { background: #f2f3f5; }
}
.btn { min-height: 32px; }
.btn.gold { color: #7a4d00; }
.btn.ghost { background: #fff; border: 1.5px solid #e5e6eb; color: #4e5969; }
.btn.danger { color: #fff; }

/* ============ 1.33.0 大表情字号统一收缩（各端 portal/奖品/板块图标不再放大） ============ */
.portal-card .portal-icon { font-size: 15px !important; }
.cat-card-ico { font-size: 15px !important; }
.prize-ico-sm { font-size: 14px !important; vertical-align: -4px; }
.portal-icon svg, .cat-card-ico svg, .prize-ico-sm svg { width: 16px !important; height: 16px !important; }
.portal-icon img, .cat-card-ico-img, .prize-ico-sm { width: 22px !important; height: 22px !important; }
