/* Material Symbols Rounded 图标字体（与 APP 前端 style.css、admin.html 内联一致） */
@font-face{font-family:'Material Symbols Rounded';font-style:normal;font-weight:100 700;font-display:block;src:url(fonts/msr-subset.woff2) format('woff2')}
.msr{font-family:'Material Symbols Rounded';font-weight:400;font-style:normal;font-size:16px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-variation-settings:'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24;vertical-align:-.125em;}

/* 统一品牌图标：内联纯线性 SVG（与交付中心 jiaofu 一致：细线条随文字颜色、无背景块） */
.brand-ico{display:inline-flex;align-items:center;justify-content:center;vertical-align:-.25em;line-height:0;flex:none;margin-right:6px;color:currentColor;}
.brand-ico svg{display:block;width:1.4em;height:1.4em;stroke:currentColor;}
/* 总部管控台动态标题里的 hdLine 图标缩至 17px（默认 24px 偏大） */
.hq-card-title .hd-ic,.hq-detail-panel h4 .hd-ic,.pane-head h3 .hd-ic{width:17px;height:17px;}
/* 导航侧栏 / 头像里的 brand-ico 稍紧凑，避免挤压文字 */
.side-item .brand-ico,.tu-avatar .brand-ico{margin-right:8px;vertical-align:-.35em;}
.crm-node .brand-ico{margin-right:6px;vertical-align:-.3em;}
/* 学段/短语徽章（与前端 style.css 同语言：圆角渐变 + 阴影） */
.stage-badge{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;box-shadow:0 2px 6px rgba(29,78,216,.18);flex:0 0 auto;}
.stage-badge svg{width:24px;height:24px;}
.stage-badge.s1{background:linear-gradient(135deg,#dcfce7 0%,#86efac 100%);}
.stage-badge.s2{background:linear-gradient(135deg,#dbeafe 0%,#93c5fd 100%);}
.stage-badge.s3{background:linear-gradient(135deg,#ffedd5 0%,#fdba74 100%);}
.stage-badge.s4{background:linear-gradient(135deg,#ede9fe 0%,#c4b5fd 100%);}
.stage-badge.s5{background:linear-gradient(135deg,#ccfbf1 0%,#5eead4 100%);}
.stage-badge.s6{background:linear-gradient(135deg,#e0e7ff 0%,#a5b4fc 100%);}
.stage-badge.s7{background:linear-gradient(135deg,#fef3c7 0%,#fcd34d 100%);}
.stage-badge.s0{background:linear-gradient(135deg,#e2e8f0 0%,#cbd5e1 100%);}

:root {
  /* ===== 墨绿主色体系 ===== */
  --brand: #0e5b4f;
  --brand-dark: #0b4239;
  --brand-deeper: #092e28;
  --brand-accent: #16a085;
  --brand-soft: #e7f5f1;

  /* ===== 状态色 ===== */
  --ok: #16a34a;
  --warn: #f59e0b;
  --danger: #ef4444;
  --info: #5b8def;

  /* ===== 文字层级 ===== */
  --ink: #1f2a37;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --muted: #6b7280;
  --text: #1f2a37;          /* 老板 2026-07-23：兼容 App 主题的 --text 别名 */

  /* ===== 背景/边框 ===== */
  --bg: #f4f6f8;
  --card: #ffffff;
  --surface-2: #f3f6fb;   /* 卡片/按钮浅蓝底（对齐 APP style.css 规范样板） */
  --surface-3: #eef2f7;   /* 次级浅蓝底 */
  --line: #e5e7eb;
  --border-color: #e5e7eb;

  /* ===== 主色别名（修复后台 toast/弹窗白字 bug：app.css 的 --accent 等变量在 admin 缺失） ===== */
  --accent: #1d4ed8;          /* 主色（按钮强调） */
  --accent-soft: #dbeafe;      /* 主色浅底 */
  --primary: #16a085;          /* 兼容 App 主题的 --primary（指向品牌主色） */
  --primary-dark: #0b4239;     /* 兼容 App 主题的 --primary-dark */
  --primary-soft: #e7f5f1;     /* 兼容 App 主题的 --primary-soft */

  /* ===== 间距（4px 基准） ===== */
  --card-padding: 14px;
  --block-gap: 12px;
  --content-padding: 16px;

  /* ===== 字体层级 ===== */
  --font-h: 17px;
  --font-body: 14px;
  --font-tip: 12px;

  /* ===== 圆角 ===== */
  --radius: 10px;
  --radius-sm: 8px;

  /* ===== 阴影/动效 ===== */
  --shadow: 0 1px 3px rgba(16,24,40,.06);
  --transition: .2s ease;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 6px 0; }
.err { color: var(--danger); font-size: 13px; min-height: 18px; background: #fdecea; border: 1px solid #f5c6cb; padding: 8px 12px; border-radius: 6px; }
.err:empty { min-height: 0; padding: 0; border: 0; background: transparent; }
.btn { background: var(--brand-accent); color: #fff; border: 0; border-radius: var(--radius); padding: 11px 16px; font-size: 14px; cursor: pointer; transition:.15s; display:inline-flex; align-items:center; justify-content:center; gap:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:72px; max-width:220px; }
.btn:hover { background: var(--ok); }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--brand-soft); border-color: var(--brand-accent); color: var(--brand); }
.btn.danger { background: var(--danger); }

/* ===== 顶部通栏 Header ===== */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 22px; background: var(--brand-dark); color: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
/* 顶栏退出按钮 + 角色选择下拉：白字 + 品牌绿底 + 白色半透明边框，悬停亮青绿（总部/交付中心/代理商统一） */
.topbar .ui-btn.ghost,
.topbar .view-role-wrap select { background: var(--brand); border-color: rgba(255,255,255,.55); color: #fff; }
.topbar .ui-btn.ghost:hover,
.topbar .view-role-wrap select:hover { background: #17a07f; border-color: rgba(255,255,255,.85); color: #fff; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .logo { font-size: 25px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.12; }
.brand-txt b { font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.brand-txt span { font-size: 11px; color: var(--text-muted); }
.top-user { display: flex; align-items: center; gap: 10px; }
.tu-avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.tu-name { font-size: 14px; color: #eafff9; }
.top-user .btn.ghost { background: rgba(255,255,255,.12); color: #eafff9; border: 1px solid rgba(255,255,255,.28); }
.top-user .btn.ghost:hover { background: rgba(255,255,255,.22); color:#fff; border-color: #6fb3a4; }

/* ===== 主框架 ===== */
#main { display: flex; flex-direction: column; min-height: 100vh; align-items: stretch; }
.admin-body { display: flex; flex: 1; min-height: 0; }
.admin-side { width: 214px; background: var(--brand-dark); color: #cfe8e2; flex-shrink: 0; align-self: flex-start; position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto; display: flex; flex-direction: column; }
.side-brand { padding: 18px 18px 14px; font-size: 15px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-brand .logo-sm { font-size: 18px; }

/* ===== 聆梧云 LOGO 图片 ===== */
.logo-img{height:36px;width:auto;display:inline-block;object-fit:contain;vertical-align:middle;}
.logo-img-sm{height:22px;width:auto;display:inline-block;object-fit:contain;vertical-align:middle;}
.logo-img-lg{height:52px;width:auto;display:inline-block;object-fit:contain;vertical-align:middle;}
.side-nav { padding: 12px 11px; flex: 1; }
.side-item { position: relative; display: block; width: 100%; text-align: left; background: transparent; border: 0; color: #cfe8e2; padding: 12px 14px; border-radius: 9px; cursor: pointer; font-size: 14px; margin-bottom: 5px; transition: .15s; }
.side-item::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: transparent; }
.side-item:hover { background: rgba(79,195,247,.22); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.side-item:hover::before { background: #fff; }
.side-item.on { background: rgba(79,195,247,.22); color: #fff; font-weight: 700; }
.side-item.on::before { background: #4FC3F7; }
.side-foot { padding: 12px 18px; font-size: 11px; color: #6fb3a4; border-top: 1px solid rgba(255,255,255,.08); }

/* 侧边栏分组（体验优化：功能分组 + 更直观命名，不动任何 data-tab） */
.side-group { margin-bottom: 6px; }
.side-group-title {
  font-size: 16px; color: #fff; padding: 11px 13px;
  letter-spacing: .5px; font-weight: 900;
  background: #17a07f;  /* 亮青绿纯色（统一规则） */
  border-radius: 9px;
  margin: 3px 2px 6px; cursor: default;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.22);                            /* 微投影 */
  border-left: 4px solid #4FC3F7;                                    /* 天蓝左竖条 */
  transition: filter .2s;
}
.side-group-title:hover { filter: brightness(1.12); }               /* hover 提亮 */
.side-group.collapsible .side-group-title { cursor: pointer; }
.side-group.collapsible .side-group-title:hover { filter: brightness(1.12); }
.side-group:first-child .side-group-title { padding-top: 10px; }
.sg-caret { font-size: 10px; line-height: 1; opacity: .85; transition: transform .2s ease; }
.side-group.collapsed .sg-caret { transform: rotate(-90deg); }
.side-group.collapsed .side-item { display: none; }
.side-group.collapsed .side-item.on { display: block; }

/* 异步队列（RQ Worker）状态徽标 + 告警 */
.rq-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.rq-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.rq-online { color: var(--ok); background: rgba(10,143,91,.12); }
.rq-offline { color: var(--danger); background: rgba(214,69,61,.12); }
.rq-unknown { color: var(--text-muted); background: rgba(154,163,178,.14); }
.rq-alert { margin: 10px 0; padding: 10px 14px; border-radius: var(--radius); background: rgba(214,69,61,.1); border: 1px solid rgba(214,69,61,.3); color: var(--danger); font-size: 13px; font-weight: 600; }

.admin-content { flex: 1; min-width: 0; padding: 22px 26px; }

/* ===== 内容卡片化 ===== */
.tabpane { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 1px 3px rgba(16,24,40,.04); max-width: 100%; margin: 0; }
.tabpane > .pane-head:first-child { margin-bottom: 4px; }
.tabpane > .muted { background: var(--card) ; border-radius: var(--radius); padding: 10px 14px; border: 1px solid var(--line); }
.tabpane > .pane-head:not(:first-child) {
  background: var(--card) ; border-radius: var(--radius); padding: 12px 16px; margin-top: 16px;
  border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(16,24,40,.03);
}
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pane-head h3 { margin: 0; font-size: 16px; color: var(--text); font-weight: 700; letter-spacing: .3px; }
.pane-tools { display: flex; gap: 10px; align-items: center; }
.search { padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; width: 250px; max-width: 44vw; outline: none; transition: .15s; }
.search:focus { border-color: var(--brand-accent); box-shadow: 0 0 0 3px rgba(22,160,133,.15); }
/* 手机号模糊搜索下拉（输入几位出候选，点选填入） */
.phone-drop { position: absolute; top: 100%; left: 0; right: 0; z-index: 999; background: var(--card); border: 1px solid var(--line); border-radius: 9px; margin-top: 2px; box-shadow: 0 6px 20px rgba(0,0,0,.10); max-height: 240px; overflow-y: auto; }
.phone-drop .phone-opt { padding: 8px 12px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #f3f3f3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-drop .phone-opt:hover { background: var(--primary-soft); color: var(--brand-accent); }
.phone-drop .phone-hint { padding: 8px 12px; font-size: 12px; color: var(--text-muted); }
/* 手机号搜索🔍按钮（自动贴在输入框右侧，点击触发搜索） */
.phone-search-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 28px; min-width: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--brand-accent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: .15s; z-index: 2; }
.phone-search-btn:hover { background: var(--primary-soft); border-color: var(--brand-accent); }
.phone-search-btn:active { transform: translateY(-50%) scale(.96); }
.field { margin: 10px 0; }
.field label { display: block; font-size: 13px; margin-bottom: 5px; color: var(--text-secondary); font-weight: 500; }
.field input, .field select { width: 100%; max-width: 380px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; background: var(--card) }
.field input:focus, .modal input:focus, .modal select:focus { outline: none; border-color: var(--brand-accent); box-shadow: 0 0 0 3px rgba(22,160,133,.12); }

.login-box { max-width: 380px; margin: 12vh auto; background: var(--card); padding: 30px; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.login-box h2 { margin-top: 0; color: var(--brand); }
.login-box input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; margin: 10px 0; }

/* 词库列表 */
.bank-list { margin-top: 12px; display: grid; gap: 10px; }
.bank-item { background: var(--primary-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.bank-item img { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; }
.bank-main { flex: 1; }
.bank-name { font-weight: 600; }
.bank-sub { font-size: 12px; color: var(--muted); }
.bank-desc { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.bank-ops { display: flex; gap: 6px; flex-shrink: 0; }
.word-rows { display: grid; gap: 8px; margin: 12px 0; max-height: 50vh; overflow: auto; }
.word-row { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr auto; gap: 8px; align-items: center; }
.word-row-4 { grid-template-columns: 1fr 1.2fr 0.8fr 0.9fr auto; }
.word-row input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; box-sizing: border-box; }
.word-del { border: 0; background: var(--accent-soft); color: var(--danger); border-radius: 6px; padding: 6px 9px; cursor: pointer; font-size: 13px; flex: 0 0 auto; }
.word-del:hover { background: #c0392b; color: #fff; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 6px; margin-left: 6px; }
.tag.pub { background: var(--accent-soft); color: var(--accent); }
.tag.pri { background: #ffeef0; color: #c0392b; }
.mono { font-family: "SF Mono", "Cascadia Code", "Consolas", monospace; }
/* 分页大小选中态 */
.btn.pri { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.pub { background: transparent; color: var(--text); border-color: var(--line); }
.tag.pause { background: rgba(245,158,11,.14); color: #b45309; }

/* 图标 / 入口布局 */
.icon-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 12px 0; }
.icon-row { background: var(--primary-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.icon-row span { width: 26px; text-align: center; font-size: 18px; }
.icon-row input { flex: 1; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; }
.icon-sec-title { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: var(--brand); margin: 6px 0 2px; }
.ir-main { flex: 1; min-width: 0; }
.ir-main input { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; box-sizing: border-box; }
.mask-grid { display: grid; gap: 10px; margin: 10px 0; max-width: 480px; }
.mask-row { display: flex; align-items: center; gap: 10px; background: var(--primary-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.mask-row > span { width: 64px; font-weight: 600; font-size: 13px; }
.appui-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 6px 0; max-width: 860px; }
.appui-item { display: flex; align-items: center; gap: 10px; background: var(--primary-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.appui-item .ai-icon { font-size: 20px; }
.appui-item .ai-name { flex: 1; font-weight: 600; font-size: 13.5px; }
.appui-item .switch { font-size: 12.5px; }
.mask-row label { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.mask-row input { width: 58px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; }
.layout-list { margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.layout-card { background: var(--primary-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; cursor: grab; user-select: none; }
.layout-card.drag { opacity: .4; }
.layout-card .lic { font-size: 24px; }
.entry-card.selected { border-color: var(--brand-accent); border-width: 2px; background: var(--brand-soft); box-shadow: 0 0 0 2px rgba(22,160,133,.25); }
.entry-card { transition: border .15s, background .15s, box-shadow .15s; }
.entry-show { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; cursor: pointer; }
.entry-show input { width: auto; margin: 0 3px 0 0; vertical-align: middle; accent-color: var(--brand-accent); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 999; }
.modal-box { background: var(--card) ; border-radius: 16px; padding: 22px; width: 440px; max-width: 92vw; max-height: 90vh; overflow: auto; }
.modal-box h3 { margin-top: 0; color: var(--brand); }
.modal-box .field { margin: 8px 0; }
.modal-box .field label { display: block; font-size: 13px; margin-bottom: 4px; color: var(--text-secondary); }
.modal-box .field input, .modal-box select, .modal-box textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; box-sizing: border-box; }
/* 兼容：openModal 已改用 CRM 的 .ui-modal-box，沿用历史 .field 表单样式 */
.ui-modal-box .field { margin: 8px 0; }
.ui-modal-box .field label { display: block; font-size: 13px; margin-bottom: 4px; color: var(--text-secondary); }
.ui-modal-box .field input, .ui-modal-box .field select, .ui-modal-box .field textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; box-sizing: border-box; }
.ui-modal-box h3 { margin-top: 0; color: var(--brand); }
.modal { background: var(--card) ; border-radius: 16px; padding: 22px; width: 440px; max-width: 92vw; max-height: 90vh; overflow: auto; }
.modal h3 { margin-top: 0; color: var(--brand); }
.modal .field { margin: 8px 0; }
.modal .field label { display: block; font-size: 13px; margin-bottom: 4px; color: var(--text-secondary); }
.modal .field input, .modal select, .modal textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; box-sizing: border-box; }
.modal .btn { width: 100%; margin-top: 8px; }
.modal .btn.ghost { background: var(--card); color: var(--text-secondary); border: 1px solid var(--line); }
.modal-lg { width: 560px !important; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h3 { margin: 0; font-size: 17px; color: var(--ink); }
.modal-close { background: none; border: 0; font-size: 24px; color: var(--text-muted); cursor: pointer; line-height: 1; padding: 0 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { max-height: 55vh; overflow-y: auto; padding-right: 4px; }
.modal-foot { display: flex; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); justify-content: flex-end; align-items: center; }
.modal-foot .btn { width: auto; flex: 0 0 auto; margin-top: 0; min-width: 96px; }
.modal-foot .btn + .btn { margin-left: 4px; }
.req { color: var(--danger); margin-right: 2px; }
.radio-group { display: flex; flex-wrap: wrap; gap: 16px; padding: 6px 0; }
.radio-label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.radio-label input[type="radio"] { width: auto; margin: 0; accent-color: var(--brand-accent); }
.cover-upload { border: 2px dashed #cdd5df; border-radius: var(--radius); padding: 20px; text-align: center; cursor: pointer; transition: border-color .2s; background: var(--card); }
.cover-upload:hover { border-color: var(--brand-accent); background: var(--primary-soft); }
.cover-placeholder { color: var(--text-muted); font-size: 13px; }
.field-file input[type="file"] { padding: 6px 0; }

/* 下拉选项自定义行 */
.opt-row { display: flex; gap: 8px; align-items: stretch; }
.opt-row select { flex: 1 1 76%; min-width: 0; width: auto; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; }
.opt-add { flex: 0 0 22%; min-width: 64px; white-space: nowrap; padding: 8px 6px; font-size: 13px; border-radius: 9px; background: var(--brand-accent); color:#fff; border:0; cursor:pointer; }
.opt-add:hover { background: var(--ok); }
.up-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-bottom: 4px; }
.up-grid.tri { grid-template-columns: 1fr 1fr 1fr; }
.up-col { margin: 8px 0; }
.up-col .opt-row select { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .up-grid { grid-template-columns: 1fr; } }
.up-note { font-size: 13px; color: var(--accent); min-height: 18px; margin-top: 4px; }
.modal .field input, .modal .field select, .modal .field textarea { overflow: hidden; text-overflow: ellipsis; }
.modal-body.compact { padding: 8px 2px; }
.modal-body.compact .field { margin: 6px 0; }
.modal-body.compact .field label { font-size: 12px; margin-bottom: 3px; }
.modal-body.compact .up-grid { gap: 0 12px; }
.modal-body.compact .region-cascade { display: flex; gap: 6px; }
.modal-body.compact .region-cascade select { flex: 1; min-width: 0; padding: 7px 8px; font-size: 13px; }
/* 查重 / 合并 */
.dedup-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.dedup-gtitle { font-size: 13px; font-weight: 600; color: var(--brand-dark); margin-bottom: 6px; }
.dedup-row { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 0; cursor: pointer; }
.dedup-row input { width: auto; margin: 0; }
.dedup-group .btn { margin-top: 8px; }
/* 实物发货 */
.ship-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.ship-form .inp { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.ship-form textarea.inp { flex: 1; min-width: 200px; resize: vertical; }
.tag.pending { background: #fff4e0; color: #c8881a; }
.tag.shipped { background: #e6f0ff; color: #1a66d6; }
.tag.received { background: #e6f9ee; color: #07a050; }
.tag.returned { background: #fdeaea; color: #d24545; }

/* ===== CRM 统计大数字卡 ===== */
.crm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; margin: 14px 0; }
.crm-stats .cs { display: contents; }
.crm-stats .cs > div, .crm-stats .cs > .cs-title { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 8px; text-align: center; transition: .15s; cursor: default; }
.crm-stats .cs > div:hover, .crm-stats .cs > .cs-title:hover { box-shadow: 0 4px 14px rgba(14,91,79,.12); transform: translateY(-2px); }
.crm-stats .cs > .cs-title { background: linear-gradient(135deg, #ecfdf5, #d1fae5); font-size: 11px; font-weight: 700; color: #065f46; display: flex; align-items: center; justify-content: center; }
.crm-stats .cs > .cs-title span { font-size: inherit; color: inherit; }
.crm-stats .cs > .cs-role { cursor: pointer; }
.crm-stats .cs > .cs-role[data-role="member"] { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #86efac; }
.crm-stats .cs > .cs-role[data-role="vip"] { background: linear-gradient(135deg, #fefce8, #fef9c3); border-color: #fde047; }
.crm-stats .cs > .cs-role[data-role="service"] { background: linear-gradient(135deg, #eff6ff, #bfdbfe); border-color: #93c5fd; }
.crm-stats .cs > .cs-role[data-role="agent"] { background: linear-gradient(135deg, #fdf2f8, #fbcfe8); border-color: #f9a8d4; }
.crm-stats .cs > .cs-role[data-role="general_agent"] { background: linear-gradient(135deg, #f5f3ff, #ddd6fe); border-color: #c4b5fd; }
.crm-stats .cs > .cs-role b { font-size: 24px; }
.crm-stats .cs > .cs-sep { background: transparent !important; border: none !important; box-shadow: none !important; min-height: 0; padding: 0; }
.crm-stats b { display: block; font-size: 22px; color: var(--brand); font-weight: 800; line-height: 1.15; }
.crm-stats span { font-size: 11.5px; color: var(--muted); }

/* CRM 树型 + 列表 */
.crm-body { display: flex; gap: 16px; margin-top: 12px; align-items: flex-start; }
.crm-tree { width: 184px; flex-shrink: 0; background: var(--brand-soft); border: 1px solid #d6ece5; border-radius: 12px; padding: 10px; position: sticky; top: 12px; }
.crm-tree-title { font-size: 12px; font-weight: 700; color: var(--primary); padding: 4px 8px 8px; }
.crm-node { padding: 9px 11px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: #3a5a52; margin-bottom: 2px; transition: .15s; }
.crm-node:hover { background: #d6ece5; }
.crm-node.active { background: var(--brand-accent); color: #fff; font-weight: 600; }
.crm-sep { height: 1px; background: #cfe3dc; margin: 8px 4px; }
.crm-main { flex: 1; min-width: 0; width: 1px; }

.cust-list { margin-top: 12px; display: grid; gap: 10px; max-height: calc(100vh - 150px); overflow-y: auto; }
.cust-list table.crm-table { width: 100%; table-layout: fixed; }
.cust-item { background: var(--primary-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; transition: .15s; }
.cust-item:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(14,91,79,.06); }
.cust-main { flex: 1; min-width: 0; }
.cust-name { font-weight: 600; }
.cust-sub { font-size: 12px; color: var(--muted); margin: 2px 0; word-break: break-all; }
.cust-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.cust-ops { display: flex; gap: 6px; }

/* 分页条 */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager button { min-width: 34px; height: 34px; padding: 0 11px; border: 1px solid var(--line); background: var(--card) ; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: var(--ink); transition: .12s; }
.pager button:hover:not(:disabled) { border-color: var(--brand-accent); color: var(--brand-accent); }
.pager button.on { background: var(--brand-accent); color: #fff; border-color: var(--brand-accent); font-weight: 700; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager .pinfo { font-size: 13px; color: var(--muted); margin: 0 6px; }

/* 激活码 */
.code-list { margin-top: 12px; }
.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.code-idx { font-size: 11px; font-weight: 700; color: var(--brand-accent); background: var(--brand-soft); border-radius: 6px; padding: 1px 6px; min-width: 26px; text-align: center; }
.assign-panel { background: var(--primary-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 10px; }
.assign-results { position: absolute; left: 0; right: auto; top: 100%; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 4px; max-height: 100px; width: 320px; overflow-y: auto; box-shadow: 0 8px 24px rgba(14,91,79,.12); }
.assign-item { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-bottom: 1px solid #eef3f1; cursor: pointer; }
.assign-item:last-child { border-bottom: 0; }
.assign-item:hover { background: var(--brand-soft); }
.assign-item b { font-size: 13px; color: var(--ink); }
.assign-item span { font-size: 11px; color: var(--muted); }
.assign-target { font-size: 13px; color: var(--brand); font-weight: 600; padding: 8px 0; }
.agent-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.agent-lists .al-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.agent-lists .al-h { font-weight: 700; font-size: 13.5px; color: var(--brand-dark); margin-bottom: 8px; }
.agent-lists .al-body { max-height: 250px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.agent-lists .al-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 8px; border-radius: var(--radius-sm); background: var(--primary-soft); }
.agent-lists .al-code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--primary-dark); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-lists .al-tag { background: var(--primary-soft); color: var(--brand); border-radius: 6px; padding: 2px 7px; font-size: 11px; }
.agent-lists .al-tier { background: rgba(245,158,11,.12); color: #9a6700; border-radius: 6px; padding: 2px 7px; font-size: 11px; }
.agent-lists .al-st { color: var(--ok); font-weight: 600; }
.agent-lists .al-st.used { color: var(--warn); }
.agent-lists .al-name { font-weight: 600; color: var(--ink); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-lists .al-sub { color: var(--muted); font-size: 11px; }
@media (max-width: 720px) { .agent-lists { grid-template-columns: 1fr; } }
.code-cell { background: var(--primary-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.code-cell code { font-size: 15px; font-weight: 700; letter-spacing: 1px; color: var(--ink); }
.code-cell span { font-size: 11px; color: var(--muted); }
.code-cell em { font-style: normal; font-size: 11px; color: var(--brand); background: var(--brand-soft); padding: 1px 6px; border-radius: 6px; }
.code-cell.used { opacity: .55; }
.code-cell.used code { color: var(--text-muted); }
.code-copy { border: 0; background: var(--surface-2); color: var(--text-secondary); border-radius: 6px; padding: 2px 7px; cursor: pointer; font-size: 13px; flex: 0 0 auto; }
.code-copy:hover { background: var(--brand-accent); color: #fff; }
.code-st { font-size: 11px; padding: 1px 7px; border-radius: 6px; font-weight: 600; }
.code-st.unused { color: #065f46; background: #d1fae5; }
.code-st.used { color: #4b5563; background: #eef0f3; }
.code-user { font-style: normal; font-size: 11px; color: #8a5a00; background: rgba(245,158,11,.12); padding: 1px 6px; border-radius: 6px; }
.code-exp { font-style: normal; font-size: 11px; color: var(--brand); background: var(--brand-soft); padding: 1px 6px; border-radius: 6px; }
.code-pay { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 6px; font-weight: 600; }
.code-pay.paid { color: #065f46; background: #d1fae5; }
.code-pay.unpaid { color: #b45309; background: #fef3c7; }
.code-paybtn { border: 0; background: #d1fae5; color: #065f46; border-radius: 6px; padding: 2px 7px; cursor: pointer; font-size: 12px; flex: 0 0 auto; font-weight: 600; }
.code-paybtn:hover { background: #10b981; color: #fff; }
.code-del { border: 0; background: var(--accent-soft); color: var(--danger); border-radius: 6px; padding: 2px 7px; cursor: pointer; font-size: 13px; flex: 0 0 auto; margin-left: 2px; }
.code-del:hover { background: #c0392b; color: #fff; }
/* 激活码分类筛选 Tab */
.code-ftabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.code-ftab { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 6px 16px; font-size: 13px; cursor: pointer; transition: all .15s; }
.code-ftab:hover { border-color: var(--brand-accent); color: var(--brand); }
.code-ftab.on { background: var(--brand-accent); color: #fff; border-color: var(--brand-accent); font-weight: 600; box-shadow: 0 3px 10px rgba(45,130,246,.25); }
/* 产品工作区切换栏 */
.cw-bar { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 10px; margin: 6px 0 4px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.cw-tab { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text-secondary); border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .18s; white-space: nowrap; flex: 0 0 auto; }
.cw-tab .cw-ic { font-size: 16px; }
.cw-tab:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(23,32,51,.08); }
.cw-tab.on { background: var(--cw, var(--brand-accent)); color: #fff; border-color: var(--cw, var(--brand-accent)); box-shadow: 0 4px 14px rgba(23,32,51,.18); }
/* 当前产品工作区标题卡 */
.cw-head { margin: 8px 0 4px; }
.cw-headcard { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.cw-headic { font-size: 28px; }
.cw-headtitle { font-size: 20px; font-weight: 800; line-height: 1.2; }
.cw-headsub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cw-genname { color: inherit; }
@media (max-width: 720px) { .cw-headcard { padding: 12px; } .cw-headtitle { font-size: 17px; } .cw-tab { padding: 8px 14px; font-size: 13px; } }
/* 激活码报表 + 批量工具栏 */
.code-report { margin: 14px 0; }
.cr-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.cr-cards > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center; flex: 1 1 120px; min-width: 100px; }
.cr-cards b { display: block; font-size: 20px; color: var(--brand); font-weight: 800; line-height: 1.15; }
.cr-cards span { font-size: 11.5px; color: var(--muted); }
/* 代理商报表汇总卡 */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.report-grid .rc { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 8px; text-align: center; }
.report-grid .rc-v { font-size: 21px; color: var(--brand); font-weight: 800; line-height: 1.15; }
.report-grid .rc-n { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
/* 内部员工权限勾选 */
.perm-box { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 6px 0; }
.perm-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #334; cursor: pointer; }
.perm-chk input { width: 15px; height: 15px; }
.code-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.code-batchbar { display: flex; align-items: center; gap: 8px; }
.sel-count { font-size: 13px; color: var(--brand); font-weight: 600; }
.code-chk-wrap { display: inline-flex; align-items: center; margin-right: 2px; }
.code-cell .code-chk { width: auto; margin: 0 2px 0 0; accent-color: var(--brand-accent); }
.crm-filter { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.crm-filter select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; }
/* 客户列表表格 + 列宽拖动 */
.crm-table { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--card) ; font-size: 13px; }
.crm-table th { position: relative; text-align: left; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); font-weight: 700; color: var(--primary-dark); white-space: nowrap; overflow: hidden; }
.crm-table td { padding: 9px 12px; border: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.crm-table tbody tr:hover { background: #f5f9f8; }
.col-res { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; background: transparent; }
.col-res:hover, .col-res:active { background: var(--brand-accent); }
.col-res::after { content: ""; position: absolute; top: 0; right: 3px; width: 1px; height: 100%; background: #cdd9d4; }

/* ===== 移动端响应式（手机/平板竖屏，≤820px） =====
   根因：原 .admin-side 固定 214px 且 flex-shrink:0，手机窄屏下把内容区挤成窄条（只显示约 1/3）。
   方案：侧栏改为顶部横向滑动导航，内容区全宽；CRM 表格允许横向滚动。 */
@media (max-width: 820px) {
  .topbar { padding: 0 12px; }
  .top-user { gap: 7px; }
  .top-user .tu-name { display: none; }
  .top-user .btn.ghost.sm { padding: 6px 9px; font-size: 12px; }

  .admin-body { flex-direction: row; }
  .admin-side {
    width: 150px; height: auto; position: sticky; top: 60px;
    flex-direction: column;
  }
  .side-brand { display: none; }
  .side-nav { flex-direction: column; padding: 8px; gap: 4px; }
  .side-item { width: 100%; white-space: nowrap; margin-bottom: 0; padding: 10px 10px; font-size: 13px; }
  .side-item.on::before { left: 0; right: auto; top: 6px; bottom: 6px; width: 3px; height: auto; border-radius: 3px; }
  .side-foot { display: none; }

  /* 侧边栏分组（移动端：保持底色芯片 + 可折叠交互一致） */
  .side-group { margin-bottom: 4px; }
  .side-group-title {
    font-size: 12px; color: #bdeede; padding: 8px 10px;
    letter-spacing: .5px; font-weight: 800; opacity: 1;
    background: rgba(255,255,255,.08); border-radius: var(--radius-sm);
    margin: 3px 2px 4px; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  }
  .side-group:first-child .side-group-title { padding-top: 8px; }

  .admin-content { padding: 14px 12px; }
  .tabpane { padding: 14px 12px; }
  .pane-head { flex-direction: column; align-items: stretch; }
  .pane-tools { width: 100%; }
  .search { width: 100%; max-width: none; }
  .pane-tools .btn.sm { flex: 1; }

  .crm-body { flex-direction: column; }
  .crm-tree { width: 100%; position: static; }
  .crm-main { overflow-x: auto; }
  .crm-table { min-width: 680px; }

  .icon-list, .layout-list { grid-template-columns: 1fr 1fr; }
  .code-grid { grid-template-columns: 1fr 1fr; }
  .cr-cards { flex-wrap: wrap; }
  .crm-stats { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }

  .login-box { max-width: none; margin: 8vh 16px; }
}

/* F16：超小屏（<520px）宽表横向滚动容器，避免横向溢出；确认侧栏已折叠为顶栏 */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 520px) {
  .crm-main { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .crm-table { min-width: 560px; }
  .agent-lists { grid-template-columns: 1fr; }
  .code-grid { grid-template-columns: 1fr; }
  .cr-cards { flex-wrap: wrap; }
  .crm-stats, .report-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}

/* ---------- 数据备份 ---------- */
.backup-list { margin-top: 10px; }
.backup-tbl { width: 100%; border-collapse: collapse; background: var(--card) ; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.backup-tbl th, .backup-tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
.backup-tbl th { background: var(--bg); color: var(--brand-dark); font-weight: 600; }
.backup-tbl tr:last-child td { border-bottom: none; }
.backup-tbl td.bk-ops { white-space: nowrap; }
.backup-tbl .btn.ghost.sm { margin-right: 4px; }
/* 团队列表列宽拖拽（与词库列表一致的 .col-resizer 机制） */
#teamMembers table.team-tbl { table-layout: fixed; }
#teamMembers table.team-tbl colgroup col { width: auto; }
#teamMembers table.team-tbl thead th { position: relative; overflow: hidden; }
#teamMembers table.team-tbl thead th:hover .col-resizer::after { background: rgba(22,160,133,.45); }

/* 备份定时设置面板 */
.bk-settings { display: flex; flex-direction: column; gap: 12px; }
.bk-set-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-set-row .bk-sel, .bk-set-row .bk-num { padding: 6px 8px; border: 1px solid #cfe0db; border-radius: var(--radius-sm); font-size: 14px; }
.bk-set-row .bk-num { width: 76px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--brand-dark); }
.switch input { width: 18px; height: 18px; accent-color: var(--brand-accent); }

/* ---------- 行政区域三级联动 ---------- */
.region-cascade { display: flex; gap: 8px; flex-wrap: wrap; }
.region-cascade select { flex: 1 1 30%; min-width: 110px; padding: 8px 10px; border: 1px solid #cfe0db; border-radius: var(--radius-sm); font-size: 14px; background: var(--card) }
.region-cascade select:focus { outline: none; border-color: var(--brand-accent); }

/* ---------- 区域报表 ---------- */
.region-table { margin-top: 14px; }
.region-tbl { width: 100%; border-collapse: collapse; background: var(--card) ; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.region-tbl th, .region-tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
.region-tbl th { background: var(--bg); color: var(--brand-dark); font-weight: 600; }
.region-tbl tr:last-child td { border-bottom: none; }
.region-tbl .bar { display: inline-block; height: 8px; min-width: 2px; background: linear-gradient(90deg, #2d82f6, #07c160); border-radius: 4px; vertical-align: middle; margin-right: 6px; }
/* 邀请关系树 */
.tree-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; max-height: 320px; overflow: auto; }
.tree-sec { margin-bottom: 10px; }
.tree-sec:last-child { margin-bottom: 0; }
.tree-h { font-size: 13px; font-weight: 600; color: var(--brand-dark); margin-bottom: 6px; }
.tree-up, .tree-down ul { list-style: none; margin: 0; padding-left: 14px; }
.tree-up { padding-left: 2px; }
.tree-ch { border-left: 1px dashed var(--line); margin-left: 4px; }
.tree-up li, .tree-down li { font-size: 13px; padding: 2px 0; line-height: 1.5; }
.tag { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 600; vertical-align: middle; margin-left: 4px; background: #eef2f7; color: #555; }
.tag.agent { background: #e6f0ff; color: #1a66d6; }
.tag.vip { background: #fff4e0; color: #c8881a; }
.tag.provider { background: #f3e8ff; color: #8b3fd6; }
.tag.user { background: #eef2f7; color: #555; }

/* ---------- 激活码生成区两列布局 + 分页 ---------- */
.gen-grid2 { display: grid; grid-template-columns: auto auto; gap: 24px; align-items: end; }
.gen-grid2 .field { margin-bottom: 0; }
.gen-grid2 .field input, .gen-grid2 .field select { width: 10em; max-width: 100%; }

/* 产品独立定价列表（分润设置） */
.price-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.price-row { display: flex; align-items: center; gap: 10px; }
.price-row span { flex: 1; font-weight: 500; }
.price-row input { width: 8em; }
.price-row b { color: var(--text-muted); font-weight: 500; }
/* 激活码分级拿货价配置表 */
.pp-prod { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--card); }
.pp-pname { font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.pp-tier { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.pp-tier:last-child { border-bottom: 0; }
.pp-tlabel { width: 64px; font-size: 13px; color: var(--muted); font-weight: 600; flex: 0 0 auto; }
.pp-cell { display: flex; align-items: center; gap: 4px; }
.pp-cell label { font-size: 12px; color: var(--text-muted); }
.pp-cell input { width: 5.5em; }
/* 台账卡片（复用 cr-cards） */
.code-report .cr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 10px; }
.code-report .cr-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.code-report .cr-v { font-size: 22px; font-weight: 700; color: var(--brand); }
.code-report .cr-n { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.pager button { padding: 5px 10px; border: 1px solid #cfe0db; background: var(--card) ; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; }
.pager button.on { background: var(--brand-accent); color: #fff; border-color: var(--brand-accent); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager .pinfo { color: #7a8a86; font-size: 13px; margin: 0 4px; }
.code-cell[draggable="true"] { cursor: grab; }
.code-cell[draggable="true"]:active { cursor: grabbing; }
/* 拖拽排序：客户表 + 员工列表 */
.grip-h { width: 30px; padding: 0 !important; }
.crm-table td.grip, .grip { color: #b8c4c0; cursor: grab; text-align: center; user-select: none; font-size: 15px; }
.crm-table td.grip:active, .cust-item .grip:active { cursor: grabbing; }
.crm-table tr[draggable="true"] { cursor: grab; }
.crm-table tr.dragging { opacity: .4; background: var(--primary-soft); }
.crm-table tr.drag-over td { box-shadow: inset 0 2px 0 var(--brand-accent); }
.cust-item[draggable="true"] { cursor: grab; }
.cust-item .grip { margin-right: 8px; align-self: center; }
.cust-item.dragging { opacity: .4; background: var(--primary-soft); border-color: var(--brand-accent); }
.cust-item.drag-over { box-shadow: inset 0 2px 0 var(--brand-accent); }
.bank-sep { margin: 18px 2px 8px; font-size: 14px; color: var(--brand); font-weight: 700; background: #f3f7f6; padding: 6px 10px; border-left: 3px solid var(--primary); }

/* 词库分组表头：标题绝对整行居中（唯一视觉重心）+ 右侧两个统计小卡（缩小、不高于标题） */
.bank-head { position: relative; margin: 22px 2px 12px; min-height: 44px; }
.bank-head-title {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 24px; font-weight: 800; color: var(--brand);
  letter-spacing: .5px; text-align: center; white-space: nowrap;
}
/* 词库表头品牌图标（内联在标题前，与文字垂直居中对齐） */
.bank-head-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-right: 8px; vertical-align: middle;
  background: linear-gradient(135deg, #e0e7ff, #dbeafe);
  border-radius: 9px; box-shadow: 0 2px 6px rgba(29,78,216,.18);
}
.bank-head-ico svg { width: 20px; height: 20px; display: block; }
.bank-head-stats {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  display: inline-grid; grid-template-columns: auto auto; gap: 8px; vertical-align: middle;
}
.bank-head-stats .ui-stat-grid { grid-template-columns: auto auto; gap: 8px; width: auto; }
.bank-head-stats .ui-stat-card { min-width: 96px; padding: 6px 10px; }
.bank-head-stats .ui-stat-card b { font-size: 15px; }
.bank-head-stats .ui-stat-card span { font-size: 10px; }
/* 窄屏：标题整行居中在上，卡片在下方居中，避免重叠 */
@media (max-width: 640px) {
  .bank-head { min-height: 0; }
  .bank-head-title { position: static; transform: none; margin: 0 0 8px; font-size: 20px; display: flex; align-items: center; justify-content: center; }
  .bank-head-stats { position: static; transform: none; display: flex; justify-content: center; gap: 8px; }
}
.bank-item.builtin { background: #f3fbf8; }

/* ===== 词库表格（三大项通用） ===== */
.bank-table-wrap { width: 100%; overflow: auto; max-height: 60vh; border-radius: 12px; border: 1px solid var(--line); background: var(--card) }
.bank-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 640px; table-layout: fixed; }
.bank-table colgroup col { width: auto; }
.bank-table th { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; position: relative; overflow: hidden; }
.bank-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
/* 粘性表头：滚动时表头固定悬空（四个词库区块通用）
   注意：表头视觉与 CRM 公共组件 .ui-table 对齐（同为 --brand #0e5b4f / 700 字重）， */
.bank-table.bank-sticky thead th { background: #0e5b4f; color: #fff; font-weight: 700; position: sticky; top: 0; z-index: 3; border-bottom: 2px solid #0b4239; box-shadow: 0 2px 4px rgba(0,0,0,.08); }
.bank-table tbody tr:hover { background: var(--surface-2); }
.bank-table tbody tr:last-child td { border-bottom: none; }
/* 可拖拽列宽手柄 */
.col-resizer { position: absolute; right: 0; top: 0; width: 8px; height: 100%; cursor: col-resize; user-select: none; z-index: 2; }
.col-resizer::after { content: ""; position: absolute; right: 3px; top: 20%; height: 60%; width: 2px; background: transparent; border-radius: 2px; transition: background .15s; }
.bank-table thead th:hover .col-resizer::after { background: rgba(22,160,133,.45); }
.bt-code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--text-muted); font-size: 11.5px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.bt-name { font-weight: 600; color: var(--text); max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.bt-cover { width: 48px; height: 64px; border-radius: var(--radius-sm); object-fit: contain; display: block; background: var(--surface-2); border: 1px solid var(--line); }
.bt-cover-ph { width: 48px; height: 64px; border-radius: var(--radius-sm); background: var(--accent); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; }
.bt-ops { display: flex; gap: 4px; white-space: nowrap; }
.bt-ops .btn { padding: 5px 8px; font-size: 12px; }

/* ===== 表格表头统一品牌色（所有屏幕尺寸） ===== */
.study-table th,
.study-table thead th,
table.study-table thead th,
table.bank-table thead th,
table.crm-table thead th,
table.region-tbl thead th,
table.backup-tbl thead th,
.ord-table thead th,
.code-report table thead th { background: #0e5b4f; color: #fff; font-weight: 700; padding: 9px 12px; text-align: left; border-bottom: 2px solid #0b4239; }
.study-table th:first-child,
table thead th:first-child { border-top-left-radius: 8px; }
.study-table th:last-child,
table thead th:last-child { border-top-right-radius: 8px; }
.study-table tbody tr:nth-child(even) td,
table tbody tr:nth-child(even) td { background: #f7faf9; }
.study-table tbody tr:hover td,
table tbody tr:hover td { background: #e8f5f3; transition: background 0.15s; }

/* ---------- 移动端响应式 ---------- */
@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  /* 修复手机端内容被侧栏挤成约 1/3：侧栏满宽后必须改为纵向堆叠 */
  .admin-body { flex-direction: column; }
  #companionMain .admin-body, #agentMain .admin-body { flex-direction: column; }
  #companionMain .admin-side, #agentMain .admin-side { width: 100%; max-height: 50vh; overflow-y: auto; }
  .admin-side { width: 100%; max-height: 50vh; overflow-y: auto; flex-shrink: 0; }
  .admin-content { padding: 12px; }
  .side-brand { font-size: 16px; padding: 10px 14px; }
  .side-group-title { font-size: 12px; }
  .side-item { font-size: 13px; padding: 8px 14px; }
  .pane-head { flex-wrap: wrap; gap: 8px; }
  .pane-head h3 { font-size: 16px; }
  .gen-grid2 { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: repeat(2, 1fr); }
  .rc { padding: 12px; }
  .rc-v { font-size: 18px; }
  .code-report table { font-size: 12px; }
  .modal { width: 95%; margin: 10px auto; }
}

/* 订单明细（报表钻取） */
.ord-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.ord-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; align-items: center; gap: 6px; background: var(--primary-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 12px; font-size: 12.5px; cursor: pointer; transition: background .12s, transform .12s; }
.ord-row:hover { background: var(--primary-soft); }
.ord-row:active { transform: scale(.99); }
.ord-prod { font-weight: 600; color: var(--text); }
.ord-amt { color: var(--danger); font-weight: 600; }
.ord-comm { color: var(--ok); }
.ord-date { color: var(--muted); text-align: right; }
.modal .field { margin-bottom: 10px; }
.modal .field > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.modal .field .mv { font-size: 14px; font-weight: 600; color: var(--text); }
.modal .field .mv.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }

/* 内容管理编辑器 */
.li-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.li-row .li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.li-row .faq-q, .man-edit .man-title { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; }
.li-row .faq-a, .man-edit .man-path, .man-edit .man-faq { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; resize: vertical; min-height: 56px; }
.man-edit { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.man-edit .man-intro, .man-edit .man-icon { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; }
/* 删除键移到每个小组件最下面：与内容框同宽、靠右对齐 */
.faq-actions { display: flex; justify-content: flex-end; gap: 6px; width: 100%; box-sizing: border-box; margin-top: 2px; }
.faq-actions .btn { margin: 0; }

/* 品牌设置 与 联系客服 并列（两列） */
.setting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.setting-grid .pane-head { margin-top: 0; }
@media (max-width: 1000px) { .setting-grid { grid-template-columns: 1fr; } }

/* ===== 内容管理小组件：FAQ 6cm / Manual 10cm，多余空间给内容区 ===== */
/* FAQ（常见问题）：标题 + 答案(占满) + 删除按钮最下面 */
#faqList .li-row { display: block; height: 6cm; margin-bottom: 10px; }
#faqList .li-main { height: 100%; display: flex; flex-direction: column; gap: 6px; }
#faqList .faq-a { flex: 1; min-height: 0; resize: none; }
/* Manual（软件使用说明/分章节）：整体 10cm，标题/简介固定，图标+删除两列均分一行，内容区占满 */
.man-edit { height: 10cm; box-sizing: border-box; }
.man-edit .man-title, .man-edit .man-intro { flex-shrink: 0; }
.man-edit .man-path, .man-edit .man-faq { flex: 1; min-height: 0; resize: none; }
/* 图标 + 删除按钮：一行两列平均分配（各 50%），宽度不超过下面组件区域 */
.man-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; flex-shrink: 0; box-sizing: border-box; }
.man-row2 .man-icon { width: 100%; box-sizing: border-box; min-width: 0; }
.man-row2 .man-del { width: 100%; margin: 0; box-sizing: border-box; white-space: nowrap; }
.fb-item { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.fb-item.done { border-left-color: var(--ok); opacity: .8; }
.fb-top { display: flex; justify-content: space-between; font-size: 12px; }
.fb-type { font-weight: 700; color: var(--warn); }
.fb-item.done .fb-type { color: var(--ok); }
.fb-time { color: var(--muted); }
.fb-text { font-size: 13.5px; margin: 6px 0; line-height: 1.6; white-space: pre-wrap; }
.fb-item .fb-head { background: #f0f4f3; border-bottom: 1px solid #e3eae8; padding: 6px 8px; border-radius: 6px; }
.fb-sub { font-size: 12px; color: var(--muted); }
.fb-st { font-weight: 600; }
.fb-resolve { margin-top: 6px; }

/* ===== PC 宽屏响应式（≥1024px） ===== */
@media (min-width: 1024px) {
  .admin-side { width: 240px; }
  .admin-content { max-width: 1400px; padding: 24px; }
  /* 统计卡：一行4个 */
  #teamCards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
  #teamCards .rc { padding: 20px 16px; }
  #teamCards .rc-v { font-size: 26px; }
  #teamCards .rc-n { font-size: 13px; }
  /* 团队成员：横版（PC 多列） */
  #teamMembers { display: block; width: 100%; overflow-x: auto; }
  #teamMembers table { width: 100%; min-width: 800px; border: 1px solid var(--line); }
  #teamMembers table td, #teamMembers table th { border: 1px solid var(--line); }
  #teamMembers table tbody tr:nth-child(even) { background: var(--surface-2); }
  #teamMembers table tbody tr:hover { background: #eaf5f1; }
  #teamMembers .al-row {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e8ecf1);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  #teamMembers .al-name { font-weight: 600; font-size: 14px; color: var(--text, #1a1a2e); }
  #teamMembers .al-sub { font-size: 12px; color: var(--muted, #888); }
  /* 分月图表：横排 */
  #teamChart { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  #teamChart > div { min-width: 0 !important; }
  /* 表格居左撑满 */
  table { width: 100%; }
  .card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
  .stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
  /* tabpane 大屏适配 */
  .tabpane { padding: 24px 28px; }
  .crm-table, .bank-table { min-width: 800px; }

  /* ===== 表格表头统一品牌色 ===== */
  table thead th,
  table.study-table thead th,
  table.bank-table thead th,
  table.crm-table thead th,
  table.region-tbl thead th,
  table.backup-tbl thead th,
  .ord-table thead th,
  .code-report table thead th,
  .study-table thead th,
  #teamMembers table.team-tbl thead th {
    background: #0e5b4f;
    color: #ffffff !important;
    font-weight: 700;
    padding: 12px 14px;
    text-align: left;
    border: 2px solid #0b4239;
    font-size: 13.5px;
    letter-spacing: 0.3px;
  }
  table thead th:first-child { border-top-left-radius: 8px; }
  table thead th:last-child { border-top-right-radius: 8px; }
  table tbody tr:nth-child(even) td { background: #f7faf9; }
  table tbody tr:hover td { background: #e8f5f3; transition: background 0.15s; }
  /* section-title 加间距 */
  .section-title { margin-top: 20px; font-size: 15px; }
}

/* ===== 问题 4：FAQ 恢复弹窗提示框太长 ===== */
.assign-results .assign-item span[data-restore],
.assign-results .assign-item span[data-delfile] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80%; display: inline-block; vertical-align: middle; }
#faqRestoreMenu .assign-item span[data-restore],
#faqRestoreMenu .assign-item span[data-delfile] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }

/* ===== Toast 通知（右下角浮层） ===== */
.toast{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);right:auto;top:auto;max-width:min(80%,480px);min-width:240px;background:linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);color:#fff;padding:12px 18px;border-radius:10px;font-size:14px;font-weight:500;z-index:99999;opacity:0;transition:opacity .25s, transform .25s;pointer-events:none;box-shadow:0 6px 20px rgba(29,78,216,0.4);transform:translateX(-50%) translateY(8px);}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0);}

/* ===== 问题 5：页面内容不拥挤 ===== */
.card { margin-bottom: 16px; padding: 20px; }
.tabpane { padding: 24px; }
.admin-content { max-width: 1400px; margin-left: auto; margin-right: auto; }

/* ===== 问题 3：团队成员表格 PC 版（zebra striping + hover + 列宽） ===== */
@media (min-width: 1024px) {
  .backup-tbl { table-layout: fixed; }
  .backup-tbl th, .backup-tbl td { padding: 12px 16px; }
  .backup-tbl tbody tr:nth-child(even) { background: var(--surface-2); }
  .backup-tbl tbody tr:hover { background: #eaf5f1; }
  /* 团队成员列宽控制：列宽交由 colgroup（拖拽持久化），此处仅设最小宽度避免挤压 */
  #teamMembers table.team-tbl { width: 100%; min-width: 800px; }
}

/* ============ T4 伴学中心 ============ */
.pane-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-top: 10px; }
/* 星愿商城：管理后台商品卡片一行两列 */
.mall-card { width: calc(50% - 6px); box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card); }
.mall-card .mall-f { box-sizing: border-box; }
.sm-select { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; min-width: 160px; box-sizing: border-box; }
.ok-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #d1fae5; color: #065f46; font-size: 12px; font-weight: 600; }
.off-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--danger); font-size: 12px; font-weight: 600; }
.report-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.report-cards .rc { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 8px; text-align: center; }
.report-cards .rc-v { font-size: 21px; color: var(--brand); font-weight: 800; line-height: 1.15; }
.report-cards .rc-n { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
/* 伴学工作台与 HQ 后台共用 admin-body 布局 */
#companionMain .admin-body, #agentMain .admin-body { display: flex; min-height: calc(100vh - 56px); }
#companionMain .admin-content, #agentMain .admin-content { flex: 1; padding: 18px 22px; overflow-x: hidden; }
#companionMain .admin-side, #agentMain .admin-side { width: 210px; flex-shrink: 0; background: var(--brand-dark); color: #cfe8e2; border-right: 1px solid rgba(255,255,255,.08); padding: 14px 10px; }




/* =========================================================
   后台主题三态（浅色 / 深色 / 跟随系统）—— 由 <html data-theme> 驱动
   后台本身为墨绿深底，深色态仅深化内容区，保持品牌一致、安全可逆。
   ========================================================= */
:root[data-theme="dark"] {
  --brand: #0e5b4f;
  --brand-dark: #0b4239;
  --brand-deeper: #05531c;
  --brand-accent: #16a085;
  --brand-soft: #10203d;
  --ink: #e6edf2;
  --muted: #9aa7b4;
  --line: #27323d;
  --bg: #0e151b;
  --card: #1a2230;
  --text-secondary: #9aa7b4;
  --text-muted: #6a7a88;
}

:root[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
/* 后台主题切换悬浮按钮（已移除 - 2026-07-22 老板指令删除白天黑夜开关） */
/* .theme-toggle {
  position: fixed; top: 66px; right: 14px; z-index: 65;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1; cursor: pointer;
  background: var(--card, #fff); color: var(--ink, #1f2a37);
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  transition: transform .2s ease, background-color .35s ease, color .35s ease;
  user-select: none;
}
.theme-toggle:hover { transform: scale(1.08) rotate(8deg); }
.theme-toggle:active { transform: scale(.94); }
:root[data-theme="dark"] .theme-toggle { background: #16202a; color: #e6edf2; border-color: #2a3742; } */

/* ===== 移动端响应式 2026-07-24 ===== */
@media (max-width: 768px) {
  .side-nav { width: 100%; max-width: 200px; position: fixed; left: -220px; transition: left 0.3s; z-index: 99; background: #fff; padding: 10px; }
  .side-nav.open { left: 0; }
  .topbar { padding: 8px 12px; }
  .tabpane { padding: 10px; }
  .panel { flex-direction: column; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  table { font-size: 12px; overflow-x: auto; display: block; }
  td, th { white-space: nowrap; padding: 6px 8px; }
  .side-item { padding: 8px 12px; font-size: 13px; }
  .btn { padding: 8px 16px; font-size: 13px; }
  input, select, textarea { font-size: 14px; }
  .modal { width: 95%; margin: 20px auto; }
}
@media (max-width: 480px) {
  .side-nav { max-width: 160px; }
  .topbar-brand { font-size: 14px; }
  .pane-head h3 { font-size: 15px; }
  .study-table-wrap { overflow-x: scroll; }
}
/* 汉堡菜单按钮 */
.mobile-toggle { display: none; }
@media (max-width: 768px) { .mobile-toggle { display: block; position: fixed; top: 8px; left: 8px; z-index: 100; font-size: 24px; background: none; border: none; cursor: pointer; } }

/* ===== 手风琴侧栏 2026-07-24（深化：品牌绿主色 + 天蓝辅助色） ===== */
.acc-group {
  margin-bottom: 8px;
  background: var(--brand-dark);              /* 品牌绿（与侧栏同色） */
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.acc-header {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 12px; cursor: pointer; font-weight: 700; font-size: 14px;
  letter-spacing: .3px;
  color: #fff;
  background: #17a07f;  /* 亮青绿纯色 */
  border: none; width: 100%; text-align: left;
  border-radius: 8px; transition: all .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.22);                            /* 微投影 */
}
.acc-header:hover { filter: brightness(1.12); }                      /* hover 提亮 */
.acc-header .arrow { font-size: 10px; transition: transform .2s; margin-left: auto; opacity: .9; }
.acc-group.open .acc-header .arrow { transform: rotate(90deg); }
.acc-body { display: none; padding: 5px 2px 3px; }
.acc-group.open .acc-body { display: block; }
.acc-body .side-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; padding: 8px 10px; border-radius: 7px; margin: 2px 0;
  color: rgba(207,232,226,.85);              /* 品牌绿底上浅字 */
  background: transparent;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.acc-body .side-item:hover, .acc-body .side-item.on {
  background: rgba(79,195,247,.22);   /* hover 与选中同色：浅天蓝 */
  color: #fff;
}
.acc-body .side-item:hover {
  border-left-color: #fff;            /* hover：白色左竖条 + 投影 */
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.acc-body .side-item.on {
  font-weight: 600;
  border-left-color: #4FC3F7;         /* 选中：天蓝左竖条 */
}

/* 顶部Tab筛选条 */
.tab-strip { display: flex; overflow-x: auto; gap: 2px; padding: 8px 0; border-bottom: 2px solid #e0e0e0; margin-bottom: 12px; }
.tab-chip {
  padding: 6px 16px; font-size: 13px; white-space: nowrap; cursor: pointer;
  border: none; background: none; border-radius: 4px 4px 0 0; font-weight: 500;
  color: #666; transition: all 0.15s;
}
.tab-chip:hover { color: var(--brand); background: rgba(14,91,79,0.06); }
.tab-chip.on { color: var(--brand); background: rgba(14,91,79,0.1); border-bottom: 2px solid var(--brand); font-weight: 600; }
.tab-sub-strip { display: flex; gap: 4px; margin-bottom: 10px; }
.tab-sub-chip { padding: 4px 14px; font-size: 12px; border-radius: 16px; cursor: pointer; border: 1px solid #ddd; background: #fff; color: #555; }
.tab-sub-chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 筛选栏 */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.filter-bar input { padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; width: 160px; }
.filter-bar .btn { padding: 6px 16px; font-size: 13px; }

/* 分页组件样式 */
/* replaced */
.pagi-nav { margin: 8px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
/* replaced */
.pagi-nav .btn.pri { background: var(--primary); color: #fff; border-color: var(--primary); }
/* replaced */
.pagi-nav .btn.pub { background: transparent; color: var(--text); border-color: var(--line); }

/* 词库区块统计卡片 + 分页组件（2026-08-10） */
/* 需求1：分页组件单行三栏：左=统计文案 / 中=页码区+翻页(居中) / 右=每页条数下拉(靠右) */
.bank-pager { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; margin: 8px 0 4px; width: 100%; max-width: 100%; box-sizing: border-box; }
.bank-pager .pagi-stat { font-size: 13px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.bank-pager .pagi-sel { font-size: 12px; padding: 3px 8px; min-width: 88px; width: auto; white-space: nowrap; flex-shrink: 0; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
/* 中栏：占满剩余空间、居中；min-width:0 防止页码过多时撑大父容器导致整页横向滚动 */
.bank-pager .pagi-nav { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; justify-content: center; overflow-x: auto; margin-left: 2px; }
.bank-pager .pagi-nav .btn { padding: 2px 8px; font-size: 13px; line-height: 1.4; }
.bank-pager .pagi-nav .btn.pri { background: var(--primary); color: #fff; border-color: var(--primary); }
.bank-pager .pagi-nav .pagi-dis { padding: 2px 8px; color: #ccc; font-size: 14px; }
.bank-pager .pagi-nav .pagi-dots { padding: 2px 4px; font-size: 13px; color: #999; }

/* ===== 新增：空状态 / 批量操作条 / 吸顶表头 / 金额列（admin 改版 2026-07-28） ===== */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; color: var(--muted); text-align: center; gap: 12px; }
.empty-state .es-icon { font-size: 40px; opacity: .5; }
.empty-state .es-text { font-size: 14px; }
.empty-state .es-actions { display: flex; gap: 8px; margin-top: 4px; }

.bulk-bar { display: flex; align-items: center; gap: 10px; background: #f3f7f6; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 10px; position: sticky; top: 0; z-index: 3; }
.bulk-bar .bb-count { font-weight: 700; color: var(--brand); }
.bulk-bar .bb-spacer { flex: 1; }

/* 粘性表头：通用规则（theah 上加 sticky-head 类时生效） */
thead.sticky-head th, .sticky-head thead th { position: sticky; top: 0; z-index: 2; }

/* 粘性表头强化：审计/应用日志专属，深绿渐变 + 阴影 + 顶部偏移 topbar（老板 2026-08-02） */
.backup-tbl.sticky-head{border-collapse:separate;border-spacing:0;}
.backup-tbl.sticky-head thead th{position:sticky;top:60px;z-index:5;background:linear-gradient(135deg,#0b4239,#0f2a5e);color:#fff;font-weight:700;font-size:13px;letter-spacing:.5px;padding:12px 14px;border-bottom:2px solid #0a3329;box-shadow:0 3px 8px rgba(11,66,57,.18);text-shadow:0 1px 1px rgba(0,0,0,.2);}

.amount-cell { text-align: right; font-variant-numeric: tabular-nums; }

.study-table th, .study-table td,
.bank-table th, .bank-table td,
.crm-table th, .crm-table td { padding: 9px 12px; }

/* 部署回滚点：当前部署标记 */
.tag-now{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;font-size:11px;line-height:1.6;color:#0e5b4f;background:#d6f3ea;border:1px solid #9adbc6;vertical-align:middle;}
