/* 炫影电竞 · 管理后台样式（品牌红 #dc143c / 暗色侧栏） */
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  font-size: var(--fs-base);
}
.ic { display: inline-block; width: 1em; height: 1em; vertical-align: middle; }
.muted { color: var(--muted); font-size: var(--fs-base); }
body.modal-open { overflow: hidden; }

/* ============ 全局滚动条（细 + 跨平台一致，跟品牌风格协调） ============ */
/* Firefox */
* { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.2) transparent; }
/* WebKit / Chromium / Edge / Safari */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.32); }
*::-webkit-scrollbar-thumb:active { background: rgba(0,0,0,.42); }
*::-webkit-scrollbar-corner { background: transparent; }
/* 暗色侧边栏：滑块用浅色，避免暗底深色对比过强 */
.sidebar, .sidebar * { scrollbar-color: rgba(255,255,255,.15) transparent; }
.sidebar ::-webkit-scrollbar-thumb, .sidebar *::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
.sidebar ::-webkit-scrollbar-thumb:hover, .sidebar *::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.28); }
.sidebar ::-webkit-scrollbar-thumb:active, .sidebar *::-webkit-scrollbar-thumb:active { background: rgba(255,255,255,.4); }

:root {
  /* 品牌 */
  --brand: #dc143c;
  --brand-d: #a30f2e;
  --brand-l: #fef2f4;      /* 极浅红，hover/selected 背景 */
  --brand-bright: #ff3b5c; /* 强调红：角标 / 高亮 / 主动作态 */

  /* 中性 / 背景 */
  --bg: #f6f7f9;           /* 极浅灰背景 */
  --card: #ffffff;
  --side: #1c1e26;

  /* 文字 */
  --text: #1f2937;         /* 主文字 */
  --text-2: #4b5563;       /* 次文字 */
  --muted: #8a8fa3;        /* 辅助文字 */
  --text-3: #aab0bd;       /* 三级文字：元信息 / 极小标注 */
  --ink: #111827;          /* 标题 / 强文字，近黑 */

  /* 语义色 */
  --ok: #10b981;
  --ok-d: #047857;         /* 语义深绿：文字 / 描边 */
  --warn: #f59e0b;
  --warn-d: #b45309;       /* 语义深琥珀：文字 / 描边 */
  --danger: #ef4444;
  --danger-d: #b91c1c;     /* 语义深红：文字 / 描边 */

  /* 装饰（仅福利元素使用） */
  --gold: #ffd700;         /* 金 */
  --silver: #c0c0c0;       /* 银灰 */
  --line: #eef0f3;         /* 发丝线：弱于 --border */

  /* 边框 */
  --border: #e5e7eb;       /* 极浅边框 */
  --border-d: #d1d5db;

  /* 间距基准 */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px;

  /* 圆角基准 */
  --radius-sm: 6px; --radius: 10px; --radius-lg: 14px;

  /* 阴影基准 */
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
}

/* ==========================================================================
   字号体系（2026-12-02）：全站统一 6 档，全部用 clamp 随视口自适应。
   背景：用户反馈「所有页面的字体和字体大小能不能根据当前分辨率自适应」——
   此前全站散落 400+ 处硬编码 px（13px×101、12px×72、11px×59…），
   既不一致也不会随分辨率变化。现收敛为 6 档语义变量，只改这一处即可全局调档。
   区间按 1280–1920 桌面宽度标定：下限保证小屏可读，上限避免大屏过大。
   ========================================================================== */
:root {
  --fs-2xs: clamp(9.5px, 0.62vw, 11px);    /* 极小：徽标、角标、极小辅助文字 */
  --fs-xs: clamp(10.5px, 0.70vw, 12px);    /* 小：字段名前缀、次要标签 */
  --fs-sm: clamp(11.5px, 0.78vw, 13px);    /* 中小：表格正文、表单值、说明 */
  --fs-base: clamp(12.5px, 0.86vw, 14px);  /* 基准：正文、菜单、按钮 */
  --fs-md: clamp(13.5px, 0.94vw, 15px);    /* 中：强调正文、弹窗标题下级 */
  --fs-lg: clamp(15px, 1.05vw, 17px);      /* 大：页面标题、区块标题 */
  --fs-xl: clamp(18px, 1.30vw, 22px);      /* 特大：空状态标题、品牌副标 */
  --fs-2xl: clamp(24px, 1.75vw, 32px);     /* 最大：品牌名、大数字 */
}


/* ============ 布局 ============ */
/* 布局（2026-12-01）：新增顶栏 —— **当前登录态从侧栏底部搬到右上角**（对标抖店后台顶栏账号区）。
   grid：顶栏跨整行，其下左侧栏 + 右侧主区。侧栏**保留深色**，只改结构。 */
.app-wrap {
  display: grid;
  /* 2026-12-02：侧栏收窄为视口 1/10（clamp 160–240px，防窄屏挤爆 / 超宽屏过宽） */
  grid-template-columns: clamp(200px, 15vw, 220px) minmax(0, 1fr);
  grid-template-rows: 52px minmax(0, 1fr);
  grid-template-areas: "top top" "side main";
  min-height: 100vh; background: var(--bg);
}
.topbar { grid-area: top; }
.sidebar { grid-area: side; }
.main { grid-area: main; }
.main { flex: 1; padding: 20px 24px; overflow: auto; min-width: 0; }

/* ===== 顶栏（2026-12-01）===== */
/* 顶栏最深一档（2026-12-01 用户拍板）：侧栏比顶栏浅一档、主区最浅，三层递进。 */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; background: #14161c; border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky; top: 0; z-index: 45;
}
.tb-brand { display: flex; align-items: center; gap: 9px; font-size: var(--fs-lg); font-weight: 600; color: #f2f3f6; }
.tb-brand .ic { width: 20px; height: 20px; color: #ff2d3a; }
.tb-brand em { font-style: normal; font-size: var(--fs-xs); padding: 2px 7px; border-radius: 20px; background: rgba(220,20,60,.18); color: #ff5b66; }
.tb-spacer { flex: 1; }
.tb-icon-btn {
  position: relative; width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #c2c6d2; cursor: pointer; transition: .15s;
}
.tb-icon-btn:hover { background: rgba(255,255,255,.09); color: #fff; }
.tb-icon-btn .ic { width: 17px; height: 17px; }
.tb-icon-btn.tb-quick { color: #ff5b66; }
.tb-collapse { color: #c2c6d2; }
.tb-collapse:hover { background: rgba(255,255,255,.09); color: #fff; }
.tb-badge {
  position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 8px; background: var(--brand); color: #fff;
  font-size: var(--fs-2xs); line-height: 15px; text-align: center; font-weight: 600;
}
/* 账号区 + 下拉 */
.tb-me { position: relative; display: flex; align-items: center; gap: 8px; padding-left: 6px; }
.tb-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); font-weight: 600;
}
.tb-me-text { display: flex; flex-direction: column; line-height: 1.25; }
.tb-name { font-size: var(--fs-base); color: #f2f3f6; }
.tb-role { font-size: var(--fs-xs); color: #9298a6; }
.tb-caret { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: #9298a6; cursor: pointer; border-radius: 4px; }
.tb-caret:hover { background: rgba(255,255,255,.09); color: #fff; }
.tb-caret .ic { width: 14px; height: 14px; }
.tb-menu {
  position: absolute; top: 40px; right: 0; min-width: 176px; z-index: 50;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(31,41,55,.14); padding: 6px; overflow: hidden;
}
.tb-menu[hidden] { display: none; }
.tb-menu-head { display: flex; align-items: center; gap: 9px; padding: 8px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tb-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: none; background: none; border-radius: 6px;
  font-size: var(--fs-base); color: var(--text-2); cursor: pointer; text-align: left;
}
.tb-menu-item:hover { background: var(--bg); color: var(--brand); }
.tb-menu-item .ic { width: 15px; height: 15px; }
/* 通知中心浮层 */
.tb-notify-panel {
  position: fixed; top: 58px; right: 16px; width: 340px; max-height: 62vh; z-index: 90;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 36px rgba(31,41,55,.16); display: flex; flex-direction: column; overflow: hidden;
}
.tb-notify-head { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: var(--fs-base); font-weight: 600; color: var(--text); }
.tb-notify-body { overflow: auto; }
.tb-notify-item { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tb-notify-item:last-child { border-bottom: none; }
.tb-notify-item.unread { background: var(--brand-l); }
.tb-notify-title { font-size: var(--fs-base); color: var(--text); font-weight: 500; }
.tb-notify-text { font-size: var(--fs-sm); color: var(--text-2); margin-top: 3px; line-height: 1.5; }
.tb-notify-time { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.tb-notify-empty { padding: 30px 14px; text-align: center; font-size: var(--fs-sm); color: var(--muted); }

/* 侧边栏（比顶栏浅一档：顶栏 #14161c → 侧栏 #2b2f39 → 主区浅色） */
.sidebar {
  width: clamp(200px, 15vw, 220px); flex-shrink: 0;
  background: linear-gradient(180deg, #2b2f39, #21242d);
  color: #cfd2dc; display: flex; flex-direction: column;
  position: sticky; top: 52px; height: calc(100vh - 52px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; color: #fff; font-weight: 700; font-size: var(--fs-lg); }
.brand .ic { color: var(--brand); width: 24px; height: 24px; }
.brand em { margin-left: auto; font-style: normal; font-size: var(--fs-xs); padding: 2px 8px; border-radius: 20px; background: rgba(220,20,60,.16); color: var(--brand); }
.sidebar nav { flex: 1; padding: 6px 12px; overflow: auto; }
.nav-btn {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 12px 14px; margin-bottom: 4px; border: none; background: transparent;
  border-radius: 10px; color: #b9bdc9; font-size: var(--fs-md); cursor: pointer; transition: .15s;
}
.nav-btn .ic { width: 18px; height: 18px; color: #7e8290; }
.nav-btn:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-btn.active { background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: #fff; font-weight: 600; }
.nav-btn.active .ic { color: #fff; }
/* 侧边栏分组（集合）：可折叠
   —— 视觉层级（2026-11-09 调整）——
   之前一级分组（数据看板/商品管理…）是 14px/600/亮色 + 18px 图标，而二级项是 12px/常规/暗色，
   **一级比二级更显眼**，扫视时眼睛先被"目录标题"吃掉，再去找具体功能 → 看着累。
   现在把重心交给二级项与当前选中态：
     一级 → 退后（13px / 500 / 暗灰 / 16px 淡图标 / hover 不再跳白）
     二级 → 进前（13px / 常规 / 亮一档），当前页仍是唯一的红底高饱和锚点
   另修子分组标题被两列网格"割裂"的错位感：子分组之间给足呼吸，标题降为小节标签。 */
.nav-group { margin-bottom: 12px; }
.nav-group-title {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 9px 12px; border: none; background: transparent; cursor: pointer;
  border-radius: 10px; color: #949aa9; font-size: var(--fs-base); font-weight: 500;
  letter-spacing: .02em; transition: .15s;
}
/* 一级分组图标展开态也显示（2026-12-02 抖店截图对标） */
.nav-group-title:hover { background: rgba(255,255,255,.045); color: #e2e5ec; }
.nav-group-title .caret {
  margin-left: auto; width: 7px; height: 7px; border-right: 2px solid #6f7583; border-bottom: 2px solid #6f7583;
  transform: rotate(45deg); transition: transform .2s; opacity: .7;
}
.nav-group.collapsed .caret { transform: rotate(-45deg); }
.nav-group-body { padding: 4px 8px 2px; overflow: hidden; transition: max-height .25s ease, padding .25s ease; }
.nav-group.collapsed .nav-group-body { max-height: 0 !important; padding-top: 0; padding-bottom: 0; }
.nav-group:not(.collapsed) .nav-group-body { max-height: 800px; }
/* 分组内子项两列网格（对标抖店） */
.nav-group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 6px; }
.nav-group-grid .nav-btn {
  padding: 8px 8px; font-size: var(--fs-base); font-weight: 400; color: #c6cad6;
  border-radius: 8px; margin-bottom: 0; gap: 6px; line-height: 1.25;
}
/* 二级菜单图标（2026-12-01 对标抖店：一级纯文字、二级带图标） */
.nav-group-grid .nav-btn .ic { width: 14px; height: 14px; flex: none; color: #8f95a4; }
.nav-group-grid .nav-btn.active .ic { color: #fff; }
.nav-group-grid .nav-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nav-group-grid .nav-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
/* 子分组：左侧小竖线分隔标题 + 两列网格
   —— 子分组标题降级为"小节标签"（更暗更小、字距拉开），并给子分组之间留足间距，
      避免"标题 + 两列 + 标题 + 两列"糊成一片（之前 gap 只有 4px，标题贴着上面的网格）。 */
.nav-subgroup { margin-bottom: 10px; }
.nav-subgroup:last-child { margin-bottom: 2px; }
.nav-subgroup-title {
  display: flex; align-items: center; color: #7d8391; font-size: var(--fs-xs); letter-spacing: .06em;
  padding: 3px 0 3px 7px; margin: 0 0 5px 3px; border-left: 2px solid rgba(255,255,255,.08);
}
/* 侧栏底部收起按钮（2026-12-01 对标抖店侧栏底部） */
.side-foot { padding: 10px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.side-collapse {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 12px; border: none; border-radius: 8px; background: transparent;
  color: #aeb4c2; font-size: var(--fs-base); cursor: pointer; transition: .15s;
}
.side-collapse .ic { width: 16px; height: 16px; color: #8f95a4; }
.side-collapse:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-wrap.nav-collapsed .side-collapse { justify-content: center; padding: 9px 0; }
.app-wrap.nav-collapsed .side-collapse span { display: none; }

/* 移动端抽屉 */
.menu-toggle { display: none; }
.sidebar-backdrop { display: none; }
@media (max-width: 860px) {
  /* 侧栏变抽屉后不再占 grid 列，主区占满；顶栏保留（用户入口在那） */
  .app-wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  /* 窄屏：品牌文字与角色标签收起，保证 3 个快捷入口 + 账号区不挤 */
  .tb-brand span, .tb-brand em { display: none; }
  .tb-role { display: none; }
  .tb-notify-panel { top: 58px; right: 8px; left: 8px; width: auto; }
  .sidebar { position: fixed; left: 0; top: 52px; bottom: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s; width: 260px; }
  .app-wrap.nav-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }
  .app-wrap.nav-open .sidebar-backdrop { display: block; }
  .menu-toggle {
    display: inline-flex; position: fixed; left: 14px; bottom: 18px; z-index: 58;
    width: 48px; height: 48px; border-radius: 50%; border: none; background: var(--brand);
    color: #fff; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(220,20,60,.4); cursor: pointer;
  }
  .menu-toggle .ic { width: 24px; height: 24px; }
  .main { padding: 18px 16px; }
}
@media (max-width: 640px) {
  .main { padding: 14px 14px; }
  .toolbar .search { flex-basis: 100%; max-width: none; }
  .view-head h3 { font-size: var(--fs-lg); }
}

/* ============ 头部 / 工具条 ============ */
.view-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.view-head h3 { margin: 0; font-size: var(--fs-lg); font-weight: 600; color: var(--text); }
.view-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .search { flex: 1 1 320px; max-width: 460px; min-width: 180px; height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; font-size: var(--fs-base); font-family: inherit; box-sizing: border-box; background: #fff; transition: border-color .15s, box-shadow .15s; }
.toolbar .search::placeholder { color: #b0b5bc; }
.toolbar .search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.count { margin-left: auto; font-size: var(--fs-sm); color: var(--muted); }
/* 状态分类标签页（2026-12-01，对标电商后台「全部/售卖中/已下架/草稿/回收站」） */
.status-tabs {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.status-tab {
  appearance: none; border: none; background: transparent;
  padding: 8px 14px 9px; margin-bottom: -1px;
  font-size: var(--fs-base); font-family: inherit; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.status-tab:hover { color: var(--text); }
.status-tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* 商品信息合并列（2026-12-01，对标电商后台）：缩略图 + 标题两行截断 + ID + 类目 */
.prod-cell { display: flex; gap: 10px; align-items: flex-start; min-width: 240px; }
.prod-thumb {
  flex: 0 0 56px; width: 56px; height: 56px;
  border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border); background: var(--bg, #f7f8fa);
}
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.prod-main { flex: 1; min-width: 0; }
.prod-title {
  font-size: var(--fs-base); font-weight: 600; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.prod-id { margin-top: 3px; font-size: var(--fs-xs); color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.prod-sub { margin-top: 2px; font-size: var(--fs-xs); color: var(--muted); }

/* 区间筛选（2026-12-01）：数值区间 / 日期范围，对标电商后台「价格 ¥x ~ ¥y」「创建时间 起 ~ 止」。
   单行内联排布，高度与下拉/搜索框对齐，避免工具栏高低不平。 */
.cs-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}
.cs-range .range-label { font-size: var(--fs-base); color: var(--muted); white-space: nowrap; }
.cs-range .range-in {
  width: 92px;
  height: 26px;
  padding: 0 6px;
  border: none;
  background: transparent;
  font-size: var(--fs-base);
  font-family: inherit;
  color: var(--text);
  box-sizing: border-box;
}
.cs-range .range-in:focus { outline: none; }
.cs-range .range-in::placeholder { color: #b0b5bc; }
.cs-range .range-sep { font-size: var(--fs-sm); color: #b0b5bc; }
.cs-range:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
/* 日期类型宽度略宽，容下 yyyy-mm-dd */
.cs-range .range-in[type="date"] { width: 128px; }

/* ============ 下拉框（统一） ============ */
/* 自定义箭头 + 高度对齐按钮 + focus 高亮；覆盖 toolbar 筛选/排序、表单 select、分类选择 */
.toolbar select, .field-ctrl select, select.cat-select, select.sub-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  border: 1px solid var(--border); border-radius: 5px;
  font-size: var(--fs-base); font-family: inherit; color: var(--text); background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8fa3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px;
  cursor: pointer; box-sizing: border-box; padding-right: 28px;
}
.toolbar select { height: 32px; padding-left: 10px; }
.toolbar select:hover { border-color: #d5d8e2; }
.toolbar select:focus, .field-ctrl select:focus, select.cat-select:focus, select.sub-select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1);
}

/* ============ 自定义下拉 CustomSelect（跨平台一致，跟品牌主色协调） ============ */
.cs-host { position: relative; display: inline-block; vertical-align: middle; }
.cs-host.block { display: block; width: 100%; }
.cs-host.block .cs-trigger { width: 100%; }
.cs-trigger {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text); font-size: var(--fs-base); font-family: inherit;
  cursor: pointer; transition: .15s; box-sizing: border-box; line-height: 1;
}
.cs-trigger:hover { border-color: #d5d8e2; }
.cs-trigger:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.cs-trigger.is-disabled { background: #f6f7f9; color: var(--muted); cursor: not-allowed; opacity: .7; }
.cs-trigger .cs-label { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-trigger .cs-label.placeholder { color: var(--muted); }
.cs-trigger .cs-arrow { color: #8a8fa3; flex-shrink: 0; transition: transform .15s; }
/* 打开态：边框/阴影弱化（红色边太抢眼），箭头变红提示展开 */
.cs-host.open .cs-trigger { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.06); }
.cs-host.open .cs-arrow { transform: rotate(180deg); color: var(--brand); }
.cs-panel {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 100%; max-width: 320px;
  max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid var(--border);
  border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 95; padding: 4px;
  box-sizing: border-box;
}
.cs-host.cs-right .cs-panel { left: auto; right: 0; }
.cs-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 7px 10px; border-radius: 4px; font-size: var(--fs-base); color: var(--text); cursor: pointer;
  white-space: nowrap; line-height: 1.4;
}
.cs-opt:hover { background: var(--brand-l); color: var(--brand); }
.cs-opt.active { color: var(--brand); font-weight: 500; background: var(--brand-l); }
.cs-opt .cs-check { color: var(--brand); flex-shrink: 0; }
.cs-empty { padding: 16px; text-align: center; color: var(--muted); font-size: var(--fs-base); }

/* ============ 按钮 ============ */
/* 极简扁平：统一 32px、小圆角 5px、纯色实心（无渐变无阴影），跟品牌主色协调。 */
.btn-primary, .btn-ghost, .btn-soft, .btn-sm, .btn-danger, .btn-retry {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; line-height: 1; white-space: nowrap; box-sizing: border-box;
  font-family: inherit; cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s;
}
.btn-primary {
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  height: 32px; padding: 0 14px; border-radius: 5px; font-size: var(--fs-base); font-weight: 500;
}
.btn-primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn-ghost {
  background: #fff; border: 1px solid var(--border); color: var(--text);
  height: 32px; padding: 0 14px; border-radius: 5px; font-size: var(--fs-base);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost.danger { color: var(--danger); border-color: var(--danger); }
.btn-ghost.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-soft {
  background: #fff; border: 1px solid var(--border); color: var(--text-2);
  height: 32px; padding: 0 12px; border-radius: 5px; font-size: var(--fs-base);
}
.btn-soft:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  height: 26px; padding: 0 10px; border-radius: 4px; font-size: var(--fs-sm);
}
.btn-sm.del { color: var(--danger); border-color: var(--danger); }
.btn-sm.del:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm.warn { color: #b45309; border-color: #f59e0b; }
.btn-sm.warn:hover { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.btn-retry {
  height: 32px; padding: 0 12px; border-radius: 5px; font-size: var(--fs-base);
  border: 1px solid var(--border); background: #fff; color: var(--text);
}
.btn-retry:hover { border-color: var(--brand); color: var(--brand); }
.link { background: none; border: none; color: var(--brand); cursor: pointer; font-size: var(--fs-base); padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.btn-primary:disabled, .btn-ghost:disabled, .btn-soft:disabled, .btn-sm:disabled, .btn-danger:disabled, .btn-retry:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-primary:focus-visible, .btn-ghost:focus-visible, .btn-soft:focus-visible, .btn-sm:focus-visible, .btn-danger:focus-visible, .btn-retry:focus-visible { outline: 2px solid rgba(220,20,60,.3); outline-offset: 1px; }
.btn-primary.block { width: 100%; display: inline-flex; justify-content: center; align-items: center; gap: 5px; }
.is-busy { opacity: .85; }
/* 按钮交互反馈：悬浮轻微抬升 + 阴影，按下回弹，强化可点感 */
.btn-primary:hover, .btn-ghost:hover, .btn-soft:hover, .btn-retry:hover, .btn-danger:hover { box-shadow: 0 2px 8px rgba(17,24,39,.12); }
.btn-primary:active, .btn-ghost:active, .btn-soft:active, .btn-retry:active, .btn-sm:active, .btn-danger:active { transform: translateY(1px); box-shadow: none; }

/* ============ 表格 ============ */
/* ⚠️ 2026-11-03：原来是 overflow:hidden → **列多的表右侧被直接裁掉，用户看不到**。
   根因：.tbl th 是 white-space:nowrap（表头不换行），9 列表头总宽超过容器宽度，
   而容器又把溢出裁掉了 → 右侧列彻底看不见（不是换行、是被裁）。
   改为横向可滚动：列宽不足时用户左右拖就能看到全部列，信息一条不丢。
   ⚠️ overflow-y 仍为 hidden：纵向不产生滚动条，保持原有观感。 */
.table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: 6px; overflow-x: auto; overflow-y: hidden; }
/* 宽表（服务中看板 / 陪玩收益看板）列多：让表格按内容撑宽 + 单元格不换行，
   否则列宽被平均压扁、文字挤成两三行，纵向反而变长、右侧更容易看不全。 */
.table-wrap[data-module="service_live"] .tbl,
.table-wrap[data-module="companion_earnings"] .tbl { min-width: max-content; }
.table-wrap[data-module="service_live"] .tbl th,
.table-wrap[data-module="service_live"] .tbl td,
.table-wrap[data-module="companion_earnings"] .tbl th,
.table-wrap[data-module="companion_earnings"] .tbl td { white-space: nowrap; }
/* 用户页列多（含 openid/unionid/bio 等长字段），原 overflow:hidden 会裁掉右侧列；
   仅对用户表开启横向滚动：表随内容撑宽，超宽时可左右滚动查看全部信息。 */
.table-wrap[data-module="users"] { overflow-x: auto; overflow-y: hidden; }
.table-wrap[data-module="users"] .tbl { width: 100%; min-width: max-content; }
.table-wrap[data-module="users"] .tbl th,
.table-wrap[data-module="users"] .tbl td { white-space: nowrap; }
.table-wrap[data-module="users"] .tbl td[data-key="bio"] { white-space: normal; min-width: 200px; max-width: 260px; }
/* 陪玩列表列多：按内容撑宽且不折行，操作按钮保持一行，避免中文逐字竖排、行高被撑大 */
.table-wrap[data-module="companions"] .tbl { width: 100%; min-width: max-content; }
.table-wrap[data-module="companions"] .tbl th,
.table-wrap[data-module="companions"] .tbl td { white-space: nowrap; padding: 9px 10px; }
.table-wrap[data-module="companions"] .op-group { flex-wrap: nowrap; }
/* 审核类通用引擎（入驻审核 / 考核申请 / 提现 / 完单 / 录用审批）：列多且含长字段（昵称 / 手机 / 微信号 / 订单号），
   复用宽表策略——按内容撑宽 + 单元格不换行 + 操作按钮一行，杜绝中文逐字竖排、行高被撑大、表头与数据错位 */
.table-wrap[data-module="rv"] .tbl { width: 100%; min-width: max-content; }
.table-wrap[data-module="rv"] .tbl th,
.table-wrap[data-module="rv"] .tbl td { white-space: nowrap; }
.table-wrap[data-module="rv"] .op-group { flex-wrap: nowrap; }
/* 审核页筛选只有 3 个字段，改用自适应列数，避免落入默认 4 列网格后空出一列导致间距不均 */
.order-filter-panel.rv-filter .order-filter-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
/* 审核页流程说明：拉开行距，长流程串换行更从容、更易读 */
.rv-note .card-soft-title { line-height: 1.75; }
/* 资金流水：除「摘要」外单元格不换行，避免「正常 / 微信用户 / 时间」被挤成竖排；
   摘要是唯一允许换行的长文本列，吸收多余空间，其余列按内容紧凑排布 */
.table-wrap[data-module="records"] .tbl th,
.table-wrap[data-module="records"] .tbl td { white-space: nowrap; }
.table-wrap[data-module="records"] .tbl th[data-key="title"],
.table-wrap[data-module="records"] .tbl td[data-key="title"] { white-space: normal; }
.table-wrap[data-module="records"] .tbl th[data-key="title"] { max-width: 420px; }
.table-wrap[data-module="records"] .tbl td[data-key="openid"],
.table-wrap[data-module="records"] .tbl td[data-key="out_trade_no"] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-sm); color: var(--text-2); }
.tbl { width: 100%; border-collapse: collapse; }
/* 全量修复：内容表统一按内容撑宽（min-width:max-content），列宽不足时不再横向压缩导致
   中文竖排 / 右侧列被裁，改为整表横向滚动查看全部列（容器已 overflow-x:auto）。
   各模块 data-module 规则里可对「摘要」等长文本列放开换行。 */
.table-wrap .tbl { min-width: max-content; }
/* 订单表（2026-12-01）：列宽**不设限** —— 按内容自然撑开，
   横向滚动发生在 .table-wrap 容器内（overflow-x:auto），不会把整页撑宽。
   （真正会让整页横滚的是筛选区 input 固有宽度撑破 grid 列，那条已单独修） */
.tbl th, .tbl td { padding: 11px 12px; text-align: left; font-size: var(--fs-base); border-bottom: 1px solid var(--border); }
.tbl th { background: #f9fafb; color: var(--text-2); font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.tbl td { vertical-align: middle; color: var(--text); white-space: nowrap; transition: background .12s; }
.tbl tbody tr:hover td { background: #f5f8fb; }
.tbl .col-check { width: 40px; text-align: center; padding-left: 12px; padding-right: 6px; }
.tbl .th-sort { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; user-select: none; }
.tbl .th-sort:hover { color: var(--brand); }
.tbl .th-sort .sort-ic { color: #c0c5cf; font-size: var(--fs-xs); }
.tbl .th-sort.is-active { color: var(--brand); }
.tbl .th-sort.is-active .sort-ic { color: var(--brand); }
.row-check, .head-check { width: 15px; height: 15px; vertical-align: middle; cursor: pointer; accent-color: var(--brand); }
.mini-img { border-radius: 4px; overflow: hidden; flex-shrink: 0; background: #f0f2f7; display: inline-flex; }
.mini-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tag { font-weight: 500; padding: 2px 8px; border-radius: 4px; font-size: var(--fs-sm); background: #f1f3f5; color: var(--text-2); }
.tag-on { color: var(--ok); background: rgba(16,185,129,.1); }
.tag-off { color: var(--warn); background: rgba(245,158,11,.1); }
.tag-status { color: var(--brand); background: rgba(220,20,60,.08); }
.chip {
  display: inline-block; padding: 1px 8px; border-radius: 4px;
  background: rgba(220,20,60,.08); color: var(--brand); font-size: var(--fs-sm);
  white-space: nowrap; vertical-align: middle;
}
.op-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============ 表单字段 ============ */
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: var(--fs-base); color: var(--text-2); margin-bottom: 8px; font-weight: 500; }
/* 文本输入兜底：显式 type、隐式 type（无 type 属性）、password 全覆盖，避免漏网成原生样式 */
.field-ctrl input[type=text], .field-ctrl input[type=number], .field-ctrl input[type=password], .field-ctrl input:not([type]) {
  width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: var(--fs-md); font-family: inherit; background: #fff; box-sizing: border-box; color: var(--text);
}
.field-ctrl input[type=text], .field-ctrl input[type=number], .field-ctrl input[type=password], .field-ctrl input:not([type]) { padding: 0 11px; }
.field-ctrl select { padding: 0 28px 0 11px; }
.field-ctrl textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 5px;
  font-size: var(--fs-base); font-family: inherit; background: #fff; box-sizing: border-box; resize: vertical; color: var(--text);
}
/* ============ 富文本编辑器（richtext.js，SKU 商品详情） ============ */
.rt-wrap { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; }
.rt-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  padding: 6px 8px; background: #fafbfc; border-bottom: 1px solid var(--border);
}
.rt-btn {
  min-width: 30px; height: 28px; padding: 0 8px; border: 1px solid transparent; border-radius: 4px;
  background: none; color: var(--text); font-size: var(--fs-base); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; line-height: 1;
}
.rt-btn:hover { background: #eef0f3; border-color: var(--border); }
.rt-btn b, .rt-btn i, .rt-btn u { font-size: var(--fs-md); }
.rt-sep { width: 1px; height: 16px; background: var(--border); margin: 0 4px; flex-shrink: 0; }
.rt-sel {
  height: 28px; padding: 0 24px 0 8px; border: 1px solid var(--border); border-radius: 4px;
  font-size: var(--fs-sm); color: var(--text); background: #fff; cursor: pointer; max-width: 130px;
}
.rt-color-wrap {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px;
  border: 1px solid var(--border); border-radius: 4px; background: #fff; cursor: pointer;
}
.rt-color-label { font-size: var(--fs-base); font-weight: 600; text-decoration: underline; color: #e63226; }
.rt-color { width: 26px; height: 22px; padding: 0; border: none; background: none; cursor: pointer; }
.rt-color::-webkit-color-swatch-wrapper { padding: 0; }
.rt-color::-webkit-color-swatch { border: none; border-radius: 3px; }
.rt-editor {
  min-height: 160px; max-height: 420px; overflow-y: auto; padding: 10px 12px;
  font-size: var(--fs-md); line-height: 1.7; color: var(--text); outline: none;
}
.rt-editor:focus { box-shadow: inset 0 0 0 2px rgba(220,20,60,.08); }
.rt-editor img { max-width: 100%; height: auto; border-radius: 4px; margin: 4px 0; }
.rt-editor img[src^="cloud://"] { min-width: 60px; min-height: 40px; background: #f0f1f3; }
.rt-editor:empty::before { content: attr(data-placeholder); color: #aab0b8; pointer-events: none; }
/* 字段下方说明 hint（控件下方的小字提示，见 crud.js _controlHTML） */
.field-hint {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.field-ctrl input[type=text]:focus, .field-ctrl input[type=number]:focus, .field-ctrl input[type=password]:focus, .field-ctrl input:not([type]):focus, .field-ctrl textarea:focus, .field-ctrl select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1);
}
/* 通用 promptDialog 输入框（label.field 直包 input，无 field-ctrl） */
.dialog-modal .field input[data-role="input"] {
  width: 100%; height: 36px; padding: 0 11px; margin-top: 6px;
  border: 1px solid var(--border); border-radius: 5px; font-size: var(--fs-base);
  font-family: inherit; background: #fff; box-sizing: border-box; color: var(--text);
}
.dialog-modal .field input[data-role="input"]:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1);
}
/* 退款弹窗金额输入：单位「元」外置到输入框右侧（标签里不再重复），数字右对齐 + 等宽数字 */
.amt-input { position: relative; display: block; margin-top: 6px; }
.amt-input input {
  width: 100%; height: 38px; padding: 0 42px 0 12px;
  border: 1px solid var(--border); border-radius: 5px; font-size: var(--fs-md);
  font-family: inherit; background: #fff; box-sizing: border-box; color: var(--text);
  text-align: right; font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
}
.amt-input input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1);
}
.amt-input i {
  position: absolute; right: 12px; top: 0; height: 38px; line-height: 38px;
  font-style: normal; font-size: var(--fs-base); color: var(--muted); pointer-events: none;
}
/* dispatch 提现/白名单表单：row-inline 布局 + input 统一样式 */
.row-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-inline input {
  height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 5px;
  font-size: var(--fs-base); font-family: inherit; background: #fff; box-sizing: border-box;
  color: var(--text); min-width: 0;
}
.row-inline input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.card-soft { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 14px 16px; }
.card-soft-title { font-size: var(--fs-base); color: var(--text-2); font-weight: 500; margin-bottom: 10px; }

/* ============ 图片上传组件 ============ */
.img-upload { margin-top: 4px; display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.img-upload .iu-preview { width: 88px; height: 88px; min-width: 88px; min-height: 88px; flex-shrink: 0; border-radius: 5px; object-fit: contain; border: 1px solid var(--border); background: #fafbfc; }
.img-upload .iu-bar { display: flex; align-items: center; gap: 8px; }
.img-upload .iu-pick { background: var(--brand); color: #fff; border: 1px solid var(--brand); height: 36px; padding: 0 14px; border-radius: 6px; font-size: var(--fs-md); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.img-upload .iu-pick:hover { background: var(--brand-d); border-color: var(--brand-d); }
.img-upload .iu-status { font-size: var(--fs-sm); color: var(--muted); display: inline-block; max-width: 360px; word-break: break-all; vertical-align: middle; }
.img-upload .iu-status.ok { color: var(--ok); }
.img-upload .iu-status.err { color: var(--danger); }
.img-upload.drag { border-color: var(--brand); }
.img-upload.uploading { opacity: .7; }

/* ============ 弹窗 ============ */
.modal { position: fixed; inset: 0; background: rgba(15,18,30,.45); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.modal-box { background: #fff; width: 600px; max-width: 100%; max-height: 90vh; border-radius: 10px; display: flex; flex-direction: column; overflow: visible; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
/* 编辑弹窗宽度已统一由「全站弹窗改右侧抽屉」段控制（2026-12-02），此处不再单独设宽，
   否则 :not() 链的特异性(0,3,1)会盖掉抽屉的 820px。 */
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-head h3 { margin: 0; font-size: var(--fs-lg); font-weight: 600; }
.modal-x { background: none; border: none; color: #9aa0ad; cursor: pointer; display: inline-flex; padding: 4px; }
.modal-x .ic { width: 18px; height: 18px; }
.modal-x:hover { color: var(--brand); }
.modal-body { padding: 16px 20px; overflow: auto; flex: 1; min-height: 0; }
.modal.locked .modal-foot .btn-primary { opacity: .5; cursor: not-allowed; }
/* 业务约束：无分类时新建 SKU 的禁用横幅 */
.form-lock-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--brand-l); border: 1px solid #f3c2c2; color: var(--brand-d);
  border-radius: 6px; padding: 12px 14px; margin-bottom: 16px; font-size: var(--fs-base); line-height: 1.6;
}
.form-lock-banner .ic { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.form-lock-banner b { color: var(--brand); }
.modal.locked .modal-body .field { opacity: .55; }
.modal.locked .modal-body .field input,
.modal.locked .modal-body .field select,
.modal.locked .modal-body .field textarea { pointer-events: none; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); flex-shrink: 0; background: #fafbfc; }
.dialog-box { width: 420px; }
.dialog-msg { margin: 6px 0 0; color: var(--text-2); }

/* ============ 陪玩登录码弹窗 ============ */
.invite-modal { width: 420px; }
.invite-tip { margin: 0 0 14px; color: var(--text-2); font-size: var(--fs-base); line-height: 1.6; }
.invite-tip b { color: var(--brand); }
.invite-code-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px; background: #fafbfc; border: 1px solid var(--border); border-radius: 6px; }
.invite-code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: 6px; color: var(--text); padding-left: 6px; user-select: all; }
.invite-expire { margin: 12px 0 0; color: var(--muted); font-size: var(--fs-sm); text-align: center; }

/* ============ 价格档位编辑器 ============ */
.tiers-editor { margin-top: 4px; }
.tiers-head { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-base); color: var(--text-2); margin-bottom: 8px; }
.tier-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.tier-row input { flex: 1; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 5px; font-size: var(--fs-sm); box-sizing: border-box; font-family: inherit; color: var(--text); }
.tier-row input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.tier-row .del-tier { background: none; border: none; color: var(--danger); font-size: var(--fs-lg); cursor: pointer; line-height: 1; padding: 0 6px; }
.tiers-actions { display: inline-flex; gap: 12px; align-items: center; }

/* ============ 价格档位编辑器 · 规格类型化（SKU 规格：上类型/下档位矩阵，v4 上下结构） ============ */
.sku-spec-editor { display: flex; flex-direction: column; gap: 18px; margin-top: 4px; }
.sku-spec-left, .sku-spec-right { border: 1px solid var(--border); border-radius: 8px; padding: 14px; background: #fcfdfe; }
.sku-spec-title { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.spec-type-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.spec-type { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: #fff;
  display: flex; flex-direction: column; gap: 10px; }
.spec-type-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spec-type-idx { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: var(--fs-sm); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.spec-type-head .st-name { width: 180px; height: 32px; padding: 0 10px; border: 1px solid var(--border);
  border-radius: 4px; font-size: var(--fs-base); font-family: inherit; color: var(--text); background: #fff; }
.spec-type-head .st-name:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.spec-type-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.spec-type-actions button { font-size: var(--fs-sm); padding: 4px 10px; border: 1px solid var(--border); background: #fff;
  border-radius: 4px; color: var(--text-2); cursor: pointer; font-family: inherit; }
.spec-type-actions button:hover { color: var(--brand); border-color: var(--brand); }
.spec-type-actions .del-type-btn { color: var(--danger); border-color: var(--danger); }
.spec-type-actions .del-type-btn:hover { background: var(--danger); color: #fff; }
.spec-type-values { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sv-row { display: flex; align-items: center; gap: 2px; }
.sv-row .sv-input { width: 150px; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px;
  font-size: var(--fs-base); font-family: inherit; color: var(--text); background: #fff; }
.sv-row .sv-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.sv-row .sv-x { background: none; border: none; color: var(--muted); cursor: pointer; font-size: var(--fs-lg);
  padding: 2px 6px; line-height: 1; }
.sv-row .sv-x:hover { color: var(--danger); }
.st-empty { color: var(--muted); font-size: var(--fs-sm); }
.spec-type .add-value { font-size: var(--fs-sm); padding: 4px 12px; border: 1px dashed var(--border); border-radius: 4px;
  color: var(--brand); background: #fff; cursor: pointer; font-family: inherit; align-self: flex-start; }
.spec-type .add-value:hover { border-color: var(--brand); color: var(--brand); background: #fff5f6; }
.sku-spec-left > .link { font-size: var(--fs-sm); }

.spec-matrix { display: flex; flex-wrap: wrap; gap: 10px; }
.matrix-warn { background: #fff7e6; border: 1px solid #f5c76b; color: #8a5a00; border-radius: 6px;
  padding: 8px 12px; font-size: var(--fs-sm); line-height: 1.5; margin-bottom: 4px; flex-basis: 100%; }
.matrix-head { display: none; }
.matrix-row { position: relative; display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; background: #fff;
  min-width: 220px; flex: 1 1 240px; max-width: 300px; }
.m-combo { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.m-name { font-size: var(--fs-base); font-weight: 600; color: var(--text); word-break: break-all; padding-right: 20px; }
.m-specs { display: flex; flex-wrap: wrap; gap: 4px; }
.m-spec { display: inline-flex; align-items: center; gap: 4px; background: #f1f3f5; border-radius: 4px;
  padding: 1px 6px; font-size: var(--fs-xs); color: var(--text-2); }
.m-spec b { font-weight: 600; color: var(--muted); }
.m-price { width: 100%; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px;
  font-size: var(--fs-sm); font-family: inherit; color: var(--text); box-sizing: border-box; }
.m-price:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.m-price.m-price-missing { border-color: var(--danger); background: #fff5f5; }
/* 价格行：价格输入 + 「设基准」小按钮（同一行并排） */
.m-price-row { display: flex; gap: 6px; align-items: center; }
.m-price-row .m-price { flex: 1; min-width: 0; }
.m-base-btn { flex: none; padding: 4px 8px !important; font-size: var(--fs-xs) !important; white-space: nowrap; }
.m-base-btn.on { color: var(--brand); border-color: var(--brand); background: var(--brand-l); }
/* 游戏时长（小时）：数值型输入，与服务量「数量+单位」并列但语义独立 */
.m-hours { width: 100%; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px;
  font-size: var(--fs-sm); font-family: inherit; color: var(--text); box-sizing: border-box; }
.m-hours:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.m-hours::placeholder { color: var(--muted); }
/* 服务量（数量 + 单位）：两个输入并排，窄容器下也能填 */
.m-amount { display: flex; gap: 6px; }
.m-amount-num, .m-amount-unit {
  height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px;
  font-size: var(--fs-sm); font-family: inherit; color: var(--text); box-sizing: border-box;
}
.m-amount-num { width: 68px; flex: none; }
.m-amount-unit { flex: 1; min-width: 0; }
.m-amount-num:focus, .m-amount-unit:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.m-amount-num::placeholder, .m-amount-unit::placeholder { color: var(--muted); }
.m-vpay { width: 100%; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px;
  font-size: var(--fs-sm); font-family: inherit; color: var(--text); box-sizing: border-box; margin-top: 6px; }
.m-vpay:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.m-vpay::placeholder { color: var(--muted); }
.matrix-row .del-tier { position: absolute; top: 8px; right: 8px; background: none; border: none;
  color: var(--danger); font-size: var(--fs-lg); cursor: pointer; line-height: 1; padding: 2px 6px; }
.matrix-empty { color: var(--muted); font-size: var(--fs-sm); padding: 14px 2px; text-align: center; flex-basis: 100%; }
/* 常用规格类型快捷预设（时长/数量/大区/段位/服务方式） */
.spec-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.spec-presets .sp-label { font-size: var(--fs-sm); color: var(--muted); }
.spec-presets .sp-preset { font-size: var(--fs-sm); padding: 4px 10px; border: 1px dashed var(--border);
  border-radius: 4px; background: #fff; color: var(--text-2); cursor: pointer; font-family: inherit; }
.spec-presets .sp-preset:hover { border-color: var(--brand); color: var(--brand); background: #fff5f6; }
/* 「按倍数算价」工具条 + 上次算价结果说明 */
.matrix-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.matrix-toolbar .mt-hint { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.matrix-note-box { flex-basis: 100%; background: #fff7e6; border: 1px solid #f5c76b; color: #8a5a00;
  border-radius: 6px; padding: 8px 12px; font-size: var(--fs-sm); line-height: 1.6; margin-bottom: 4px; }
.matrix-note-box ul { margin: 4px 0 0; padding-left: 18px; }
.matrix-note-box li { margin-top: 2px; }
@media (max-width: 768px) {
  .sku-spec-editor { grid-template-columns: 1fr; }
}

/* SKU 编辑器模态框加宽（crud.js openEditor 给 .modal 加 .sku-editor 类） */
.sku-editor .modal-box { width: 1100px; max-width: 96vw; }
.sku-editor .modal-body { padding: 18px 22px; }
.sku-migrate-note { background: #fff7e6; border: 1px solid #f5c76b; color: #8a5a00; border-radius: 6px;
  padding: 8px 12px; font-size: var(--fs-sm); line-height: 1.6; margin-bottom: 10px; }

/* ============ 导出 ============ */
.export-grid { display: flex; gap: 12px; margin: 8px 0 18px; flex-wrap: wrap; }
.export-card { flex: 1; min-width: 160px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: var(--text); font-size: var(--fs-md); font-weight: 500; transition: .15s; }
.export-card .ic { width: 28px; height: 28px; color: var(--brand); }
.export-card:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-l); }

/* ============ 分类 ============ */
.cat-list { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 4px 0; }
.cat-item { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.cat-item:last-child { border-bottom: none; }
.cat-title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: var(--fs-md); }
.cat-title strong { font-weight: 600; }
.cat-title .cat-name { color: var(--text); }
.cat-title .cat-meta { color: var(--muted); font-size: var(--fs-sm); font-weight: 400; }
.cat-title .cat-ops { margin-left: auto; display: inline-flex; gap: 4px; }
.cat-title .cat-ops .btn-sm { height: 24px; padding: 0 8px; font-size: var(--fs-xs); border-radius: 4px; }
.cat-title .cat-ops .btn-sm.edit { color: var(--brand); border-color: var(--brand); background: var(--brand-l); }
.cat-title .cat-ops .btn-sm.edit:hover { background: var(--brand); color: #fff; }
.sub-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sub-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: #f1f3f5; border-radius: 4px; padding: 3px 8px 3px 10px; font-size: var(--fs-sm); color: var(--text-2);
  position: relative;
}
.sub-tag.muted { background: transparent; color: #aab; font-style: italic; padding-left: 0; }
.sub-tag .sub-tag-name { padding-right: 2px; }
.sub-tag .sub-tag-ops { display: none; gap: 2px; margin-left: 2px; }
.sub-tag:hover .sub-tag-ops { display: inline-flex; }
.sub-tag .sub-op {
  border: none; background: transparent; cursor: pointer; padding: 0;
  width: 20px; height: 20px; line-height: 18px; border-radius: 50%;
  font-size: var(--fs-xs); color: #6b7280;
}
.sub-tag .sub-op:hover { color: #fff; }
.sub-tag .sub-op.edit:hover { background: var(--brand); }
.sub-tag .sub-op.del:hover { background: var(--danger); }
.add-sub-row { display: flex; gap: 8px; margin-top: 8px; }
.add-sub-row .sub-input { flex: 1; height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px; font-size: var(--fs-sm); box-sizing: border-box; font-family: inherit; }
.add-row { display: flex; gap: 8px; margin-top: 14px; }
.add-row input { flex: 1; height: 32px; padding: 0 11px; border: 1px solid var(--border); border-radius: 5px; font-size: var(--fs-base); box-sizing: border-box; font-family: inherit; color: var(--text); }
.add-row input:focus, .add-sub-row .sub-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.cat-loading, .cat-empty, .cat-error { padding: 22px; color: var(--muted); text-align: center; }

/* ============ 骨架屏 / 旋转 ============ */
.sk-bar { display: inline-block; height: 9px; width: 80%; background: linear-gradient(90deg, #f0f1f5, #e6e8ef, #f0f1f5); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 3px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk-row td { padding: 9px 12px; }
.spinner { width: 12px; height: 12px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Toast ============ */
/* 2026-12-02：提示改到**屏幕中间偏上**并水平居中（用户反馈「放右上角不容易被关注到」）。
   top:18vh 让它在视线自然落点；translateX(-50%) 居中；align-items:center 让多条上下堆叠不歪。
   z-index 保持最高（200），确保盖过抽屉弹窗(80)/通知卡(110)/气泡(130)。 */
.toast-host {
  position: fixed; top: 18vh; left: 50%; right: auto;
  transform: translateX(-50%);
  z-index: 200;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;   /* 不挡下面的操作 */
}
.toast-host .toast { pointer-events: auto; }
.toast { display: flex; align-items: center; gap: 8px; background: #1f2330; color: #fff; padding: 9px 14px; border-radius: 6px; font-size: var(--fs-base); box-shadow: 0 8px 24px rgba(0,0,0,.2); opacity: 0; transform: translateY(-8px); transition: .25s; max-width: 360px; }
.toast.in { opacity: 1; transform: translateY(0); }
.toast .ic { width: 16px; height: 16px; flex-shrink: 0; }
.toast-success { background: var(--ok); }
.toast-error { background: var(--brand); }
.toast-info { background: #1f2330; }

/* ============ 登录 ============ */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #23262f, #191b22); }
.login-card { background: #fff; padding: 36px 32px; border-radius: 10px; width: 340px; max-width: 92vw; box-shadow: 0 16px 48px rgba(0,0,0,.25); text-align: center; }
.login-logo { display: flex; justify-content: center; color: var(--brand); margin-bottom: 6px; }
.login-logo .ic { width: 48px; height: 48px; }
.login-card h2 { margin: 8px 0 4px; font-size: var(--fs-xl); }
.login-sub { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 20px; }
.login-field { display: block; text-align: left; font-size: var(--fs-base); color: var(--text-2); margin-bottom: 12px; }
.login-field input { width: 100%; height: 38px; padding: 0 12px; margin-top: 6px; border: 1px solid var(--border); border-radius: 5px; font-size: var(--fs-base); font-family: inherit; box-sizing: border-box; }
.login-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.login-card > button { width: 100%; height: 38px; border: none; border-radius: 5px; background: var(--brand); color: #fff; font-size: var(--fs-md); font-weight: 500; cursor: pointer; transition: .15s; }
.login-card > button:hover { background: var(--brand-d); }
.login-tip { color: var(--muted); font-size: var(--fs-sm); margin-top: 12px; }
.err { color: var(--danger); font-size: var(--fs-base); min-height: 16px; margin: 6px 0 0; }

/* ===== 资金流水金额（国内财务习惯：入账红、出账绿） ===== */
.amt-in { color: var(--danger-d); font-weight: 600; font-variant-numeric: tabular-nums; }
.amt-out { color: var(--ok-d); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============================================================
   数据仪表盘（dashboard.js）
   布局铁律：等宽多列用 flex-wrap + 子项百分比宽度，间距靠子项 padding，
   不用 gap / grid，避免 rounding 溢出。
   ============================================================ */
.kpi-grid { display: flex; flex-wrap: wrap; margin: 0 -6px 16px; }
.kpi-card { width: 25%; box-sizing: border-box; padding: 0 6px 12px; }
.kpi-card > .kpi-val,
.kpi-card > .kpi-label { display: block; background: var(--card); border: 1px solid var(--border); }
.kpi-card > .kpi-val { border-radius: 6px 6px 0 0; padding: 14px 14px 2px; font-size: var(--fs-xl); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.3px; border-bottom: none; }
.kpi-card > .kpi-label { border-radius: 0 0 6px 6px; padding: 0 14px 12px; font-size: var(--fs-sm); color: var(--muted); border-top: 1px solid var(--border); }
.kpi-card.kpi-brand > .kpi-val { color: var(--brand); }
.kpi-card.kpi-warn > .kpi-val { color: var(--warn); }
.kpi-card.sk > .kpi-val,
.kpi-card.sk > .kpi-label { min-height: 20px; }

@media (max-width: 1200px) { .kpi-card { width: 33.333%; } }
@media (max-width: 992px)  { .kpi-card { width: 50%; } }
@media (max-width: 560px)  { .kpi-card { width: 100%; } }

.dash-row { display: flex; flex-wrap: wrap; margin: 0 -6px 16px; }
.dash-row > .panel { width: 100%; box-sizing: border-box; padding: 0 6px; margin-bottom: 12px; }
.dash-row-2 > .panel { width: 50%; }
@media (max-width: 992px) { .dash-row-2 > .panel { width: 100%; } }

.panel > .panel-head,
.panel > .panel-body { background: var(--card); border: 1px solid var(--border); }
.panel > .panel-head { border-radius: 6px 6px 0 0; border-bottom: none; padding: 11px 14px; font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.panel > .panel-head em { font-style: normal; font-weight: 400; font-size: var(--fs-sm); color: var(--muted); margin-left: 8px; }
.panel > .panel-body { border-radius: 0 0 6px 6px; border-top: none; padding: 12px 14px 14px; }

.trend-svg { width: 100%; height: auto; display: block; }

.mini-table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.mini-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: var(--fs-sm); padding: 6px 8px; border-bottom: 1px solid var(--border); }
.mini-table td { padding: 9px 8px; border-bottom: 1px solid #f4f4f8; color: var(--text); }
.mini-table tr:last-child td { border-bottom: none; }
.mini-table .ell { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sk-block { height: 160px; border-radius: 6px; background: linear-gradient(90deg, #f1f2f6 25%, #e8e9f0 37%, #f1f2f6 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; }
.sk-block.sm { height: 110px; }

/* ============ 子账号管理（accounts.js） ============ */
.acc-roles { display: flex; flex-wrap: wrap; }
.acc-roles > button { margin: 0 8px 8px 0; }
.acc-modules { display: flex; flex-wrap: wrap; }
.acc-check {
  width: 33.333%; box-sizing: border-box; padding: 5px 8px 5px 0;
  display: flex; align-items: center; font-size: var(--fs-base); color: var(--text); cursor: pointer;
}
.acc-check input { margin-right: 6px; }
@media (max-width: 560px) { .acc-check { width: 50%; } }

/* ===== 陪玩接单详情弹层（adminCompanionDetail） ===== */
.cdetail-modal { max-width: 800px; }
.cd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.cd-name { font-size: var(--fs-lg); font-weight: 600; color: var(--text); }
.cd-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cd-stat { flex: 1 1 96px; min-width: 96px; background: #fafbfc; border: 1px solid var(--border); border-radius: 6px; padding: 10px 8px; text-align: center; }
.cd-stat b { display: block; font-size: var(--fs-lg); color: var(--brand); }
.cd-stat .cd-rank { color: var(--brand); }
.cd-stat span { display: block; font-size: var(--fs-sm); color: var(--muted); margin-top: 4px; }
.cd-table-title { font-weight: 600; color: var(--text-2); margin-bottom: 8px; font-size: var(--fs-base); }
/* 考核成绩块（2026-11-30）：后台陪玩详情展示三局击杀 + 考核时间 + 考官评语。
   评语只在此处出现，C 端主页不下发。 */
.cd-exam {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: var(--fs-base);
  line-height: 1.9;
  color: var(--text);
}
.cd-exam b { color: var(--brand); font-family: ui-monospace, Menlo, monospace; }
.empty-td { text-align: center; color: #bbb; padding: 24px 0 !important; }

/* ===== VIP 管理（vip.js） ===== */
.vip-tip { background: #fff8e6; border: 1px solid #f0e0b8; color: #8a6d1a; padding: 10px 12px; border-radius: 6px; margin-bottom: 14px; font-size: var(--fs-base); line-height: 1.6; }
.vip-rules { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 5px; padding: 9px 11px; font-size: var(--fs-base); font-family: inherit; color: var(--text); min-height: 72px; resize: vertical; background: #fff; }
.vip-rules:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.vip-input { border: 1px solid var(--border); border-radius: 5px; padding: 0 10px; height: 30px; font-size: var(--fs-base); color: var(--text); width: 90%; box-sizing: border-box; font-family: inherit; background: #fff; }
.vip-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }

/* ============ 确认框视觉升级 + 空状态修复（2026-08-06） ============ */
.btn-danger {
  background: var(--danger); color: #fff; border: 1px solid var(--danger);
  height: 32px; padding: 0 16px; border-radius: 5px;
  font-size: var(--fs-base); font-weight: 500; cursor: pointer;
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }
.dialog-box { width: 420px; border-radius: 8px; }
.dialog-box .modal-head h3 { font-size: var(--fs-lg); }
.dialog-box .modal-head { padding: 14px 20px; }
.dialog-msg { margin: 8px 0 4px; color: var(--text-2); font-size: var(--fs-base); line-height: 1.7; white-space: pre-line; }
.dialog-box .modal-foot { padding: 12px 20px; }
.dialog-box .modal-foot .btn-ghost { min-width: 80px; }
.dialog-box .modal-foot .btn-danger { min-width: 100px; }

/* 空状态 / 错误态（列表 0 条时，避免图标撑爆） */
.state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 32px 20px; text-align: center; }
.state svg { width: 36px; height: 36px; stroke: #c8cdd4; stroke-width: 1.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.state p { margin: 0; font-size: var(--fs-base); color: var(--muted); }
.state span { font-size: var(--fs-sm); color: #b0b5bc; }
.state-err svg { stroke: #f0a0a0; }
.state-err p { color: var(--danger); }

/* ============ 分类管理升级（2026-08-06） ============ */
.add-cat-input { height: 32px; padding: 0 11px; border: 1px solid var(--border); border-radius: 5px; font-size: var(--fs-base); width: 180px; outline: none; transition: border-color .15s; box-sizing: border-box; font-family: inherit; }
.add-cat-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.cat-tip { font-size: var(--fs-sm); margin: 12px 4px 0; }
.add-sub-inline { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; }
.cat-loading { padding: 24px 20px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.cat-loading svg { width: 14px; height: 14px; }
.cat-item .cat-check { margin-right: 4px; }

/* 多级类目表格（最多 4 级，参考电商后台树状表格）
   视觉优化：一级品牌红层级色块 / 空单元格「—」弱化 + 连续合并 / 行高紧凑 */
.cat-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cat-toolbar .search { height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 5px; font-size: var(--fs-base); font-family: inherit; width: 240px; box-sizing: border-box; background: #fff; }
.cat-toolbar .search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
/* 容器：白底 + 细边框 + 圆角 + 轻微投影 */
.cat-table-wrap { background: #fff; border: 1px solid var(--border-d); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.cat-grid { width: 100%; font-size: var(--fs-base); border-collapse: collapse; table-layout: auto; }
.cat-grid thead { background: #f3f4f6; }
.cat-grid th { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 10px 12px; text-align: left; border: 1px solid #e5e7eb; border-bottom: 2px solid #d1d5db; color: #374151; }
/* 行高紧凑：8px 10px；rowspan 合并后不再用斑马纹（会制造割裂感），改 hover 浅灰反馈 */
.cat-grid td { vertical-align: middle; padding: 8px 10px; border: 1px solid #e5e7eb; cursor: pointer; transition: background .12s; }
.cat-grid tbody tr:hover td { background: #f3f4f6; }
.cat-grid tbody tr:last-child td { border-bottom: 1px solid #e5e7eb; }
/* 整行被上方 rowspan 完全覆盖时的占位行：保底行高，避免表格塌陷 */
.cat-grid tr.cat-span-row { height: 34px; }
/* L1：品牌红浅底 + 左侧 3px 品牌红竖条 + 加粗，让「独占多行」成为有意义的层级色块 */
.cat-grid td.cat-l1-cell {
  font-weight: 700; color: var(--text);
  background: rgba(220,20,60,.06);
  border-left: 3px solid var(--brand);
}
.cat-grid tbody tr:hover td.cat-l1-cell { background: rgba(220,20,60,.09); }
.cat-cell-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 分类主图：节点内缩略图 + 「主图」编辑按钮（2026-08-09） */
.cat-node-main { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.cat-ic-thumb {
  width: 20px; height: 20px; min-width: 20px; border-radius: 4px; overflow: hidden;
  background: #f0f2f7; border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cat-ic-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-ic-thumb-default .ic { width: 12px; height: 12px; color: #c0c5cf; }
.cat-ic-edit {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 22px; height: 22px; padding: 0; border: 1px solid var(--border); border-radius: 4px;
  background: #fff; color: var(--muted); cursor: pointer; transition: .15s;
}
.cat-ic-edit:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-l); }
.cat-ic-edit .ic { width: 13px; height: 13px; }
.cat-icon-modal .cat-ic-ctx { margin: 0 0 12px; }
.cat-icon-modal .cat-ic-ctx b { color: var(--text); font-weight: 600; }
/* 空单元格「—」：浅灰小字，弱化视觉噪音 */
.cat-empty-cell {
  color: rgba(0,0,0,.28);
  text-align: center;
  font-size: var(--fs-sm);
  font-style: normal;
  letter-spacing: .4px;
  background: #fcfcfd;
}
.cat-grid tbody tr:hover td.cat-empty-cell { background: #f3f4f6; }
/* 树状单选器（新增类目弹窗用）：层级缩进 + 单选高亮 */
.tree-picker { background: #fff; border: 1px solid var(--border); border-radius: 5px; padding: 4px 0; max-height: 220px; overflow-y: auto; }
.tree-pick-node { display: flex; align-items: center; gap: 6px; padding: 6px 8px; cursor: pointer; font-size: var(--fs-base); color: var(--text); border-radius: 4px; margin: 0 4px; transition: background .12s; }
.tree-pick-node:hover { background: #fafbfc; }
.tree-pick-node.selected { background: var(--brand-l); color: var(--brand); font-weight: 500; }
.tree-pick-node .tree-radio { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--border-d); flex-shrink: 0; box-sizing: border-box; position: relative; }
.tree-pick-node.selected .tree-radio { border-color: var(--brand); }
.tree-pick-node.selected .tree-radio::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); transform: translate(-50%, -50%); }
.tree-pick-node .tree-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* SKU 表单类目字段（树状选择） */
.cat-pick-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-pick-val { font-size: var(--fs-base); color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 通用类目选择器（catpicker.js，参考电商后台 4 列级联） ============ */
.cp-modal .modal-box { width: 880px; max-width: 96vw; }
.cp-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.cp-toolbar { display: flex; align-items: center; gap: 10px; }
.cp-toolbar .cp-search { flex: 1; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 5px; font-size: var(--fs-base); font-family: inherit; background: #fff; box-sizing: border-box; }
.cp-toolbar .cp-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.cp-toolbar .cp-hint { font-size: var(--fs-sm); }
.cp-cols { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; min-height: 320px; max-height: 60vh; }
.cp-col { flex: 1; border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; background: #fff; }
.cp-col:last-of-type { border-right: 1px solid var(--border); }
.cp-selected-col { width: 170px; flex-shrink: 0; display: flex; flex-direction: column; background: #fafbfc; }
.cp-col-title { padding: 8px 10px; font-size: var(--fs-sm); color: var(--muted); background: #f9fafb; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.cp-col-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.cp-col-list { flex: 1; overflow-y: auto; padding: 4px; }
.cp-empty { padding: 22px 10px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.cp-node { display: flex; align-items: center; gap: 4px; padding: 7px 8px; border-radius: 4px; cursor: pointer; font-size: var(--fs-base); color: var(--text); transition: background .12s; }
.cp-node:hover { background: #f4f5f8; }
.cp-node.active { background: var(--brand-l); color: var(--brand); font-weight: 500; }
.cp-node.picked { color: var(--brand); }
.cp-node.picked .cp-check { color: var(--brand); font-weight: 700; }
.cp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-arrow { color: #c0c5cf; flex-shrink: 0; }
.cp-check { color: var(--brand); flex-shrink: 0; }
.cp-edit-ops { display: none; gap: 2px; flex-shrink: 0; }
.cp-node:hover .cp-edit-ops { display: inline-flex; }
.cp-op { width: 18px; height: 18px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--muted); border-radius: 3px; cursor: pointer; }
.cp-op:hover { color: var(--brand); background: #fff; }
.cp-op.del:hover { color: var(--danger); }
.cp-op .ic { width: 12px; height: 12px; }
.cp-selected { flex: 1; overflow-y: auto; padding: 6px; }
.cp-picked { display: flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 4px; background: #fff; margin-bottom: 6px; font-size: var(--fs-sm); }
.cp-picked-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-rename-input { flex: 1; min-width: 40px; height: 24px; padding: 0 6px; border: 1px solid var(--brand); border-radius: 4px; font-size: var(--fs-sm); font-family: inherit; outline: none; box-shadow: 0 0 0 3px rgba(220,20,60,.1); box-sizing: border-box; }
/* 每列底部新增输入框 */
/* 新增框：跟在该列最后一个类目下面，随列表流式排列（不吸底） */
.cp-add-row { padding: 2px 0 6px; background: transparent; }
.cp-add-input { width: 100%; height: 30px; padding: 0 8px; border: 1px dashed var(--border); border-radius: 4px; background: transparent; font-size: var(--fs-sm); font-family: inherit; color: var(--text); box-sizing: border-box; outline: none; transition: border-color .15s, background .15s; }
.cp-add-input::placeholder { color: #b0b5bc; }
.cp-add-input:hover { border-color: var(--border-d); background: #fff; }
.cp-add-input:focus { border-color: var(--brand); border-style: solid; background: #fff; box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.cp-add-input:disabled { background: #f3f4f6; color: #b0b5bc; cursor: not-allowed; border-style: dashed; }
.cp-op.ren:hover { color: var(--brand); }


/* ============ 订单管理：状态标签 + 多条件筛选面板 ============ */
/* 状态分类 Tab（2026-12-01 对标电商后台）：改为**纯文字 + 选中下划线**，
   去掉胶囊边框 —— 边框 chip 在十几个 tab 并排时视觉噪声太大，且高度不齐。 */
/* 状态 Tab 行（2026-12-01 对标电商）：Tab **单行不换行**，右侧放计数。
   原来 11 个分组 Tab 会 wrap 成两行，白白吃掉一段纵向空间；改 nowrap + 溢出横滑。 */
.order-tabs-row {
  display: flex; align-items: stretch; gap: 12px;
  background: #fff; border: 1px solid var(--border-d); border-bottom: none;
  border-radius: 8px 8px 0 0; padding-right: 14px;
}
.order-tabs-row:has(.order-status-tabs:empty) { display: none; }
.order-status-tabs {
  display: flex; flex-wrap: nowrap; gap: 2px; flex: 1; min-width: 0;
  padding: 0 6px; background: transparent; border: none; border-radius: 0;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.order-status-tabs::-webkit-scrollbar { display: none; }
.order-status-tabs:empty { display: none; }
.ost-count { flex: none; align-self: center; font-size: var(--fs-sm); color: var(--muted); }
.order-tab {
  position: relative; display: inline-flex; align-items: baseline; gap: 4px; flex: none;
  padding: 11px 13px 10px; border: none; background: transparent;
  font-size: var(--fs-base); color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.order-tab::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 0;
  height: 2px; border-radius: 2px; background: transparent; transition: background .15s;
}
.order-tab:hover { color: var(--text); }
.order-tab.active { color: var(--brand); font-weight: 600; }
.order-tab.active::after { background: var(--brand); }
/* 计数用浅灰小字跟在标签后（不再是徽章），与电商「全部订单 586」的观感一致 */
.order-tab em { font-style: normal; font-size: var(--fs-sm); color: var(--muted); font-weight: 400; }
.order-tab.active em { color: var(--brand); font-weight: 600; }
.order-tab em { font-style: normal; font-size: var(--fs-sm); color: var(--muted); background: #f3f4f6; padding: 1px 5px; border-radius: 8px; }
.order-tab.active em { color: var(--brand); background: #fff; }

/* 筛选面板与下方表格之间要留出清晰呼吸空间：
   操作行在字段行内（不再独占一行），面板底部需额外内边距把按钮行与表头推开。 */
.order-filter-panel { background: #fff; border: 1px solid var(--border-d); border-top: 1px solid var(--border-d); padding: 16px 16px 26px; border-radius: 0 0 6px 6px; margin-bottom: 20px; }
.order-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 18px; }
@media (max-width: 1200px) { .order-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 992px) { .order-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .order-filter-grid { grid-template-columns: 1fr; } }
.of-field { display: flex; flex-direction: column; gap: 6px; }
.of-field > span { font-size: var(--fs-sm); color: var(--text-2); }
/* 快捷筛选行：用 flex 而非 grid —— 字段数量会随「更多筛选」增删，grid 固定列数易把
   最后一个字段挤到独占整行。flex 下每个字段按内容宽度排布、装不下才整行换行。
   保险：:scope > .of-field 只让「直接子级是字段」的元素参与排布；
   若日后 HTML 误把 .order-filter-actions 放进本容器，它不会挤进字段行。 */
/* 2026-12-02 第三版（用户口径）：改成 **8 列网格**，让短字段并排拼成一个长字段的宽度。
   他的原话：「陪玩 ID 比较短、派单模式比较短、接单状态比较短，那它两个拼在一起
   是不是就等于一个订单号这个长度」——要的是网格排布，不是按内容散排、也不是每个都拉满。
   一个「标准宽度」= 2 格（≈订单号宽度）；短下拉 = 1 格；下单时间 = 3 格。 */
.of-quick {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.order-filter-grid.of-quick { display: grid; gap: 12px; }
.of-quick > .of-field { grid-column: span 1; min-width: 0; }
/* 文本框：占标准 2 格（已在上面统一设置），这里只保证可压缩 */
.of-quick > .of-field:not(.of-sel):not(.of-date) { min-width: 0; }
/* 日期范围：3 格（比标准宽 50%，容得下「起始—结束」两个输入） */
.of-quick > .of-date { grid-column: span 3; min-width: 0; }
/* 2026-12-02：原 min-width:130px 把下拉区撑到远宽于内容（「全部状态」只需 ~90px），
   改为按内容自适应；仅给触发器一个下限防止极短值把框压得太窄。 */
.of-quick > .of-sel .cs-auto { min-width: 0; }
.of-quick > .of-sel .cs-trigger { min-width: 0; }
/* 2026-12-02 第 5 轮最终口径（用户划格）：以「陪玩ID」为 1 格基准 →
   订单号 1 格 + 用户信息 1 格 + 陪玩ID 1 格 + 订单状态 1 格 + 支付方式 1 格 + 下单时间 **2 格** = 7 格。
   所以全部字段默认 span 1，只有下单时间 span 2，容器 7 列刚好铺满一行。 */
.of-quick > .of-field { grid-column: span 1; }
.of-quick > .of-date,
.of-quick.collapsed > .of-date { grid-column: span 2; }
/* 窄屏减列：仍保持「短字段=半格」的比例关系 */
@media (max-width: 1440px) { .of-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .of-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px)  { .of-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } .of-quick > .of-field { grid-column: span 1; } .of-quick > .of-date { grid-column: span 2; } }
/* 日期控件要占满 .of-date 的宽度，否则 dr-trigger 仍按内容窄宽显示 */
.of-quick > .of-date > div,
.of-quick > .of-date .dr-root,
.of-quick > .of-date .dr-trigger { width: 100%; }
.of-quick > .of-date .dr-trigger { justify-content: flex-start; }
.of-field input[type="text"],
.of-field input[type="date"],
.of-field input[type="number"] { height: 36px; padding: 0 11px; border: 1px solid var(--border); border-radius: 6px; font-size: var(--fs-base); font-family: inherit; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.of-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.08); }
.of-field .cs-auto { min-height: 36px; }
.of-range-inputs { display: flex; align-items: center; gap: 8px; }
.of-range-inputs input { flex: 1; min-width: 0; }
.of-range-inputs i { color: var(--muted); font-style: normal; font-size: var(--fs-sm); }

/* 操作行(.order-filter-actions) 位于快捷字段行内部，排在「下单时间」右侧：
   1) 自身不换行（nowrap 防止被挤到下一行）；
   2) margin-left:auto 把它推到本行最右；
   3) align-items:flex-end 让按钮底边与日期框底边对齐（同一水平线）。 */
.order-filter-actions {
  display: flex; align-items: flex-end; gap: 10px;
  margin-left: auto; padding-left: 16px; flex: 0 0 auto;
  margin-top: 0; padding-top: 0; border-top: 0;
}
.order-filter-actions .count { margin-left: 4px; flex: 0 0 auto; white-space: nowrap; align-self: center; }
.order-filter-actions > .btn-primary,
.order-filter-actions > .btn-ghost,
.order-filter-actions > .btn-soft { height: 36px; padding: 0 18px; font-size: var(--fs-base); }
/* 「更多筛选」按钮内的已填条件角标（红点数字） */
.of-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 4px;
  border-radius: 8px; background: var(--brand); color: #fff;
  font-size: var(--fs-xs); font-style: normal; font-weight: 600; line-height: 1;
}
.of-badge[hidden] { display: none; }
/* 更多筛选：默认折叠的展开区。补上顶部分隔 + 内边距，让它与快捷区在视觉上分层 */
.order-filter-more {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.order-filter-more[hidden] { display: none; }

.order-tbl .tag-status { font-size: var(--fs-sm); padding: 2px 8px; border-radius: 4px; background: #f3f4f6; color: var(--text-2); }
/* 订单图标列：48px 方形缩略图，无图时显示占位图标 */
.order-tbl .ol-icon, .order-tbl .ol-icon-ph {
  width: 38px; height: 38px; border-radius: 6px; display: block;
  border: 1px solid var(--border); background: #fafbfc; object-fit: cover;
}
.order-tbl .ol-icon-ph { display: flex; align-items: center; justify-content: center; color: #c3c7d4; }
.order-tbl .ol-icon-ph svg { width: 18px; height: 18px; }
/* 老板信息列：昵称 / VIP+渠道 / 历史消费+单数，三行紧凑排布 */
.order-tbl .ol-boss-name { font-weight: 600; color: var(--text); font-size: var(--fs-base); line-height: 1.4; }
.order-tbl .ol-boss-extra { font-size: var(--fs-xs); color: var(--text-2); line-height: 1.5; margin-top: 1px; }
.order-tbl .ol-boss-vip { font-weight: 600; font-size: var(--fs-xs); }
.order-tbl .ol-status-extra { font-size: var(--fs-xs); color: var(--text-2); line-height: 1.5; margin-top: 2px; white-space: nowrap; }
/* 服务进度条 */
.ol-prog { height: 4px; border-radius: 999px; background: #e5e7eb; overflow: hidden; margin-top: 4px; min-width: 70px; }
.ol-prog-bar { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .3s; }
/* 订单号超链接：点击直接复制订单号（品牌红 + 下划线提示可点） */
.ol-order-id { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-family: inherit; }
.ol-order-id:hover { color: var(--brand); }

/* ============ 订单详情弹窗（分区 + 键值网格） ============ */
.of-section { margin-bottom: 18px; }
.of-section:last-child { margin-bottom: 0; }
.of-section-title { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
/* 订单详情里的链接卡片（代客付款链接 / 外派链接）：统一卡片视觉，避免裸输入框 */
.of-link-card { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.of-link-card .card-soft-title { display: flex; align-items: center; gap: 8px; font-size: var(--fs-base); font-weight: 600; color: var(--brand); }
.of-link-card .of-link-badge { display: inline-block; font-size: var(--fs-xs); padding: 2px 8px; border-radius: 20px; background: rgba(220,20,60,.1); color: var(--brand); }
.of-link-card .of-link-url { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.of-link-card .of-link-url input { flex: 1 1 260px; min-width: 0; height: var(--ctl-h); padding: 0 var(--ctl-pad-x); border: 1px solid var(--border); border-radius: var(--ctl-radius); font-size: var(--fs-sm); font-family: inherit; color: var(--text); background: #fff; box-sizing: border-box; }
.of-link-card .of-link-meta { font-size: var(--fs-xs); color: var(--muted); margin-top: 8px; line-height: 1.65; }
.of-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px 18px; }
.of-readonly { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; min-width: 0; }
.of-readonly > span { flex: 0 0 62px; font-size: var(--fs-sm); color: var(--muted); }
.of-readonly .ro-val { flex: 1; min-width: 0; font-size: var(--fs-base); color: var(--text); word-break: break-word; }

/* 老板档案卡片（详情弹窗） */
.ol-boss-card { border: 1px solid var(--border); border-radius: 8px; padding: 11px 13px; background: #fafbfc; }
.ol-boss-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.ol-boss-card-name { font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.ol-boss-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 14px; }
.ol-boss-card-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ol-boss-card-grid em { font-style: normal; font-size: var(--fs-xs); color: var(--muted); }
.ol-boss-card-grid b { font-size: var(--fs-base); font-weight: 500; color: var(--text); word-break: break-word; }

/* 服务状态块（详情弹窗） */
.ol-svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; }
.ol-svc-grid > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ol-svc-grid em { font-style: normal; font-size: var(--fs-xs); color: var(--muted); }
.ol-svc-grid b { font-size: var(--fs-base); font-weight: 500; color: var(--text); }

/* ============ 福利中心（子项面板容器） ============ */
.wf-panel[hidden] { display: none; }

/* ============ 经营罗盘（compass.js） ============ */
.cmp-range { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: #fff; }
.cmp-range button { border: none; background: transparent; padding: 6px 14px; font-size: var(--fs-sm); color: var(--text-2);
  cursor: pointer; font-family: inherit; transition: all .15s; }
.cmp-range button + button { border-left: 1px solid var(--border); }
.cmp-range button:hover { color: var(--brand); }
.cmp-range button.on { background: var(--brand); color: #fff; font-weight: 500; }
/* 时段分布柱状图 */
.cmp-hour-chart { display: flex; align-items: flex-end; height: 150px; gap: 3px; padding: 4px 2px 0; }
.cmp-hour-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.cmp-hour-bar { width: 100%; max-width: 16px; background: linear-gradient(180deg, rgba(220,20,60,.85), rgba(220,20,60,.45));
  border-radius: 3px 3px 0 0; min-height: 1px; transition: height .3s; }
.cmp-hour-col:hover .cmp-hour-bar { background: var(--brand); }
.cmp-hour-label { font-size: var(--fs-2xs); color: var(--muted); margin-top: 4px; height: 12px; }
/* 横向条形排行（商品 Top / 通用） */
.cmp-bar-list { display: flex; flex-direction: column; gap: 8px; padding: 2px 0; }
.cmp-bar-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cmp-bar-rank { flex: 0 0 18px; height: 18px; border-radius: 50%; background: #f1f3f5; color: var(--text-2);
  font-size: var(--fs-xs); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.cmp-rank-top { background: var(--brand); color: #fff; }
.cmp-bar-name { flex: 0 0 32%; max-width: 240px; font-size: var(--fs-sm); color: var(--text); }
.cmp-bar-track { flex: 1; height: 10px; background: #f1f3f5; border-radius: 999px; overflow: hidden; min-width: 40px; }
.cmp-bar-track i { display: block; height: 100%; border-radius: 999px; transition: width .3s; }
.cmp-bar-val { flex: 0 0 auto; font-size: var(--fs-sm); font-weight: 600; color: var(--text); min-width: 72px; text-align: right; }
/* 环形图（支付 / 状态占比） */
.cmp-donut-wrap { display: flex; align-items: center; gap: 16px; padding: 4px 2px; }
.cmp-donut { flex: 0 0 auto; width: 128px; }
.cmp-donut-svg { width: 100%; height: auto; color: var(--text); }
.cmp-legend { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cmp-legend-item { display: flex; align-items: center; gap: 7px; font-size: var(--fs-sm); color: var(--text-2); }
.cmp-legend-item i { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 3px; }
.cmp-legend-item span { flex: 1; min-width: 0; }
.cmp-legend-item b { font-weight: 600; color: var(--text); font-size: var(--fs-sm); }

/* ============ 图片大图预览（lightbox，ui.js previewImage / initImageZoom） ============ */
.js-zoom { cursor: zoom-in; }
.lightbox { padding: 24px; }
/* box 必须有最小占位尺寸（否则 src 加载失败/未完成时 box 收缩到 0，
   close 按钮 absolute 负偏移跑到屏幕中心，造成「只看到一个 ×」的假象） */
.lightbox-box { position: relative; min-width: 360px; min-height: 240px;
  max-width: 94vw; max-height: 92vh; display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 10px; box-shadow: 0 24px 70px rgba(0,0,0,.5); overflow: hidden; }
.lightbox-box img { display: block; width: 100%; max-width: 92vw; max-height: 84vh;
  object-fit: contain; background: #fafbfc; }
.lightbox-box .lightbox-fallback { padding: 24px; color: #8a8f99; font-size: var(--fs-base);
  display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 320px; text-align: center; }
.lightbox-box .lightbox-fallback .lf-ic { width: 36px; height: 36px; opacity: .5; }
/* close 按钮改在 box 内（不再用 -16px 负偏移，避免 box 收缩时按钮脱离 box 跑到中心） */
.lightbox-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px;
  border: none; border-radius: 50%; background: rgba(15,18,30,.72); color: #fff; font-size: var(--fs-lg);
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s; z-index: 2; }
.lightbox-close:hover { background: rgba(15,18,30,.9); }

/* ============ 热词管理（hotkeywords.js） ============ */
.hk-edit-row { display: flex; gap: 10px; margin-bottom: 12px; }
.hk-edit-row input { flex: 1; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; font-size: var(--fs-base); outline: none; font-family: inherit; }
.hk-edit-row input:focus { border-color: var(--brand); }
.hk-list-inner { display: flex; flex-wrap: wrap; gap: 8px; }
.hk-tag { display: inline-flex; align-items: center; gap: 6px; background: #f4f5f8; border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 6px 5px 12px; font-size: var(--fs-base); color: var(--text); }
.hk-del { border: none; background: transparent; color: #9aa0ad; cursor: pointer; font-size: var(--fs-md); line-height: 1; padding: 0 4px; border-radius: 50%; }
.hk-del:hover { color: var(--danger); background: #f1f1f4; }
.hk-cloud { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 8px 2px; }
.hk-cloud-chip { cursor: pointer; color: var(--brand); line-height: 1.3; transition: opacity .15s; }
.hk-cloud-chip:hover { opacity: .55; text-decoration: line-through; }

/* ============ 个性标签（tag-select） ============ */
.tag-select .ts-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ts-chip { display: inline-flex; align-items: center; padding: 5px 14px; border: 1px solid var(--border);
  border-radius: 999px; font-size: var(--fs-base); color: var(--text-2); background: #fafbfc; cursor: pointer; user-select: none; transition: .15s; }
.ts-chip:hover { border-color: var(--brand-l); color: var(--brand); }
.ts-chip.on { background: var(--brand-l); border-color: var(--brand); color: var(--brand-d); font-weight: 500; }
.ts-custom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ts-custom input { flex: 1; min-width: 180px; height: 32px; padding: 0 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: var(--fs-base); outline: none; font-family: inherit; }
.ts-custom input:focus { border-color: var(--brand); }
.ts-custom-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-chip.ts-custom-chip.on { background: var(--brand-l); }

/* ============ 语音条（audio-upload） ============ */
.audio-upload { display: flex; flex-direction: column; gap: 4px; }
.audio-upload .au-player { width: 100%; max-width: 320px; height: 36px; }

/* ============ 照片墙（img-wall） ============ */
.img-wall .iw-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.img-wall .iw-item { position: relative; width: 76px; height: 76px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.img-wall .iw-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-wall .iw-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: var(--fs-md); line-height: 1; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.img-wall .iw-del:hover { background: rgba(220,20,60,.85); }
.img-wall .iw-add { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.img-wall .iw-pick { height: 32px; padding: 0 12px; border: 1px dashed var(--border); background: #fafbfc; border-radius: 6px;
  font-size: var(--fs-base); color: var(--text-2); cursor: pointer; }
.img-wall .iw-pick:hover { border-color: var(--brand); color: var(--brand); }

/* ============ 列表列多图缩略 ============ */
.mini-imgs { display: flex; gap: 4px; align-items: center; }

/* 录音按钮 */
.au-rec { border: 1px solid var(--border); background: #fff; color: var(--text-2); }
.au-rec:hover { border-color: var(--brand); color: var(--brand); }
.au-rec.rec-on { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ============ 编辑表单双列排版 ============ */
.crud-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: start; }
.crud-form-grid .field.full { grid-column: 1 / -1; }
.crud-form-grid .field { margin-bottom: 16px; min-width: 0; }

/* ============ 陪玩管理（合并「陪玩」+「陪玩调度」的单一主 tab） ============ */
/* 顶部下拉选择器：按业务分组（陪玩 / 订单调度 / 入驻与邀请 / 资金结算）切换子页面 */
.cmg-panel { margin-top: 8px; }
.cmg-panel[hidden] { display: none; }
/* 分组子 tab 形态（若宿主改用分组子 tab 而非下拉，可复用以下样式） */
.cmg-group-title {
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-2);
  margin: 18px 0 6px; padding-left: 8px; border-left: 3px solid var(--brand);
}
.sub-tabs .sub-tab.group-sep { margin-left: 14px; }

/* ============ 协议文档中心（documents 模块） ============ */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.doc-card { border: 1px solid var(--border); border-radius: 8px; padding: 14px;
  background: #fff; display: flex; flex-direction: column; gap: 8px; transition: .15s; }
.doc-card:hover { border-color: var(--brand-l); box-shadow: 0 2px 10px rgba(220,20,60,.08); }
.doc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.doc-card-title { font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.doc-badge { flex-shrink: 0; font-size: var(--fs-xs); padding: 2px 8px; border-radius: 999px;
  background: #f2f3f5; color: var(--text-2); border: 1px solid var(--border); }
.doc-badge.on { background: var(--brand-l); border-color: var(--brand); color: var(--brand-d); font-weight: 500; }
.doc-card-desc { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.6; min-height: 20px; }
.doc-card-meta { font-size: var(--fs-xs); color: var(--text-3); }
.doc-card-actions { display: flex; justify-content: flex-end; margin-top: 2px; }

/* 编辑弹层 */
.doc-mask { position: fixed; inset: 0; background: rgba(15,18,30,.5); z-index: 900;
  display: flex; align-items: center; justify-content: center; padding: 24px; }
.doc-mask[hidden] { display: none; }
.doc-modal { width: 100%; max-width: 720px; max-height: 86vh; background: #fff; border-radius: 10px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.doc-modal-head { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: linear-gradient(135deg, var(--brand), var(--brand-bright)); color: #fff; flex-shrink: 0; }
.doc-modal-title { font-size: var(--fs-lg); font-weight: 600; }
.doc-modal-close { width: 28px; height: 28px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.2); color: #fff; font-size: var(--fs-lg); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; }
.doc-modal-close:hover { background: rgba(255,255,255,.32); }
.doc-modal-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.doc-modal-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  border-top: 1px solid var(--border); background: #fafbfc; flex-shrink: 0; }
.doc-field { display: flex; flex-direction: column; gap: 6px; }
.doc-label { font-size: var(--fs-base); color: var(--text-2); }
.doc-field input, .doc-field textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: var(--fs-base); font-family: inherit; color: var(--text); outline: none; background: #fff; box-sizing: border-box; }
.doc-field input:focus, .doc-field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.doc-field textarea { resize: vertical; line-height: 1.7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 640px) { .doc-grid { grid-template-columns: 1fr; } .doc-mask { padding: 12px; } }
.doc-card-id { font-size: var(--fs-xs); color: var(--text-3); margin-top: 6px; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ============ 复合详情页（detailPages 模块，2026-11-06） ============ */
.dp-mask { position: fixed; inset: 0; background: rgba(15,18,30,.5); z-index: 900; }
.dp-mask[hidden] { display: none; }
.dp-modal { width: 100%; max-width: 1040px; max-height: 90vh; background: #fff; border-radius: 10px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.dp-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
  border-bottom: 1px solid var(--border); }
.dp-modal-title { font-size: var(--fs-lg); font-weight: 600; }
.dp-modal-close { width: 28px; height: 28px; border: none; border-radius: 50%; background: rgba(0,0,0,.06);
  font-size: var(--fs-lg); line-height: 1; cursor: pointer; color: var(--text-2); }
.dp-modal-close:hover { background: rgba(0,0,0,.12); }
.dp-modal-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.dp-modal-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); justify-content: flex-end; }
.dp-field { display: flex; flex-direction: column; gap: 6px; }
.dp-label { font-size: var(--fs-base); color: var(--text-2); }
.dp-field input, .dp-field textarea, .dp-field select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: var(--fs-base); font-family: inherit; color: var(--text); outline: none; background: #fff; box-sizing: border-box; }
.dp-field input:focus, .dp-field textarea:focus, .dp-field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.1); }
.dp-field textarea { resize: vertical; line-height: 1.7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.dp-field-row { display: flex; gap: 12px; }
.dp-field-row .dp-field { flex: 1; }
.dp-sep { display: flex; align-items: center; gap: 12px; border-top: 1px dashed var(--border); padding-top: 12px; margin-top: 2px; }
.dp-sep > span { font-size: var(--fs-base); font-weight: 600; color: var(--text); }
.dp-sep > button { margin-left: auto; }
.dp-blocks { display: flex; flex-direction: column; gap: 12px; }
.dp-block { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: #fafbfc; }
.dp-block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dp-block-type { width: auto; min-width: 130px; padding: 6px 10px; }
.dp-mini { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px; background: #fff;
  cursor: pointer; color: var(--text-2); font-size: var(--fs-md); line-height: 1; }
.dp-mini:hover { border-color: var(--brand); color: var(--brand); }
.dp-mini.dp-del:hover { border-color: var(--danger); color: var(--danger); }
.dp-block-body { display: flex; flex-direction: column; gap: 10px; }
.dp-rows { display: flex; flex-direction: column; gap: 8px; }
.dp-row { display: grid; grid-template-columns: 1.4fr 1fr .8fr 1.6fr 28px; gap: 8px; align-items: center; }
.dp-row input { padding: 7px 10px; font-size: var(--fs-base); }
.dp-row-del { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px; background: #fff;
  cursor: pointer; color: var(--text-2); font-size: var(--fs-lg); line-height: 1; }
.dp-row-del:hover { border-color: var(--danger); color: var(--danger); }

/* 编辑器：按钮块自定义配色行 */
.dp-color-row { display: flex; gap: 12px; }
.dp-color-row .dp-field { flex: 1; }
.dp-color-row input[type="color"] { height: 38px; padding: 4px; cursor: pointer; }

/* 编辑器：标签切换块的行（引用子页 pageId） */
.dp-trows { display: flex; flex-direction: column; gap: 8px; }
.dp-trow { display: grid; grid-template-columns: 1fr 1.4fr 28px; gap: 8px; align-items: center; }
.dp-trow input { padding: 7px 10px; font-size: var(--fs-base); }

/* 编辑器：内容分区切换条（主内容 / 子集N / +新增子集） */
.dp-viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 9px 10px; border: 1px dashed var(--border); border-radius: 8px; background: #fafbfc; }
.dp-viewlabel { font-size: var(--fs-sm); color: var(--text-2); margin-right: 2px; }
.dp-view { border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 14px; padding: 5px 13px; font-size: var(--fs-base); cursor: pointer; font-family: inherit; line-height: 1.5; }
.dp-view:hover { border-color: var(--brand); color: var(--brand); }
.dp-view.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.dp-viewwrap { display: inline-flex; align-items: center; }
.dp-viewdel { width: 20px; height: 20px; margin-left: 3px; border: 1px solid var(--border); border-radius: 5px; background: #fff; color: var(--text-2); font-size: var(--fs-base); line-height: 1; cursor: pointer; padding: 0; }
.dp-viewdel:hover { border-color: var(--danger); color: var(--danger); }
.dp-viewadd { border: 1px dashed var(--brand); background: #fff; color: var(--brand); border-radius: 14px; padding: 5px 13px; font-size: var(--fs-base); cursor: pointer; font-family: inherit; line-height: 1.5; }
.dp-viewadd:hover { background: var(--brand); color: #fff; }
.dp-subtitle-field { margin-top: 2px; }

/* 编辑器：磁贴宫格行（两行卡片：上行 名称/图片/删除，下行 目标/链接/新建子页） */
.dp-mrows { display: flex; flex-direction: column; gap: 10px; }
.dp-mrow { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.dp-mrow-l1 { display: flex; gap: 8px; align-items: center; }
.dp-mrow-l1 input[data-mfield="name"] { flex: 1; min-width: 0; }
.dp-mrow-l2 { display: flex; gap: 8px; align-items: center; }
.dp-mrow-l2 select[data-mfield="target"] { flex: none; width: 96px; }
.dp-linkcell { flex: 1; min-width: 0; display: flex; }
.dp-linkcell select, .dp-linkcell input { flex: 1; min-width: 0; width: 100%; padding: 7px 10px; font-size: var(--fs-base); border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: #fff; box-sizing: border-box; }
.dp-newsub { flex: none; }

/* 编辑器：从子页返回类目页的导航条 */
.dp-navback { margin-bottom: 2px; }

/* 编辑器：图片字段（上传按钮 + 地址输入） */
.dp-imgbox { display: flex; gap: 6px; align-items: center; }
.dp-imgbox input { flex: 1; min-width: 0; }
.dp-up { flex: none; border: 1px solid var(--border); background: #fff; color: var(--text-2); border-radius: 6px; padding: 7px 11px; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; font-family: inherit; }
.dp-up:hover { border-color: var(--brand); color: var(--brand); }
.dp-up:disabled { opacity: .5; cursor: not-allowed; }

/* 编辑器：左编辑 / 右实时预览（格格电竞式可视化拼装） */
.dp-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.dp-edit-col { min-width: 0; }
.dp-preview-col { min-width: 0; position: sticky; top: 0; }
.dp-preview-label { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 6px; }
.dp-preview-box { max-height: 64vh; overflow: auto; border: 1px solid var(--border); border-radius: 12px; background: #f4f4f6; }
.dp-preview-box img { max-width: 100%; }
@media (max-width: 860px) {
  .dp-edit-grid { grid-template-columns: 1fr; }
  .dp-preview-col { position: static; order: -1; }
  .dp-preview-box { max-height: 50vh; }
}
.dp-add-row { align-self: flex-start; }
@media (max-width: 640px) { .dp-row { grid-template-columns: 1fr 1fr; } .dp-mask { padding: 12px; } .dp-field-row { flex-direction: column; } .dp-color-row { flex-direction: column; } .dp-mrow { grid-template-columns: 1fr 1fr; } .dp-trow { grid-template-columns: 1fr; } }

/* ============ 榜单管理（ranking 模块） ============ */
.rank-tabs { display: flex; gap: 8px; margin: 4px 0 14px; flex-wrap: wrap; }
.rank-tab { padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: var(--text-2); font-size: var(--fs-base); cursor: pointer; transition: .15s; }
.rank-tab:hover { border-color: var(--brand-l); color: var(--brand-d); }
.rank-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.rank-no { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px;
  padding: 0 6px; border-radius: 6px; background: #f2f3f5; color: var(--text-2); font-weight: 600; font-size: var(--fs-base); }
.rank-no.top { background: linear-gradient(135deg, #ffd54a, #ff9f1a); color: #5a3b00; }
.rank-no.top:nth-child(1) { background: linear-gradient(135deg, #ffe082, #ffb300); }

.rank-obj { display: flex; align-items: center; gap: 10px; }
.rank-avatar { position: relative; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: var(--fs-lg); overflow: hidden; }
.rank-avatar .ra-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rank-avatar .ra-initial { position: relative; z-index: 0; }
.rank-name { font-weight: 500; color: var(--text); }
.rank-sub { color: var(--text-2); }
.col-rank { width: 64px; text-align: center; }
.col-value { font-weight: 600; color: var(--brand-d); white-space: nowrap; }
.rank-note { margin: 12px 2px 0; font-size: var(--fs-sm); line-height: 1.6; }

/* —— 榜单管理：双栏（实际榜单 / 运营配置）—— */
.rank-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.rank-col { min-width: 0; }
.rank-col-cfg { background: #fafbfc; border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.panel-title { font-size: var(--fs-base); font-weight: 600; color: var(--text); margin: 2px 0 10px; }
.rank-curated { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 280px; overflow: auto; }
.rf-empty { font-size: var(--fs-sm); padding: 6px 0; }
.rc-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px; }
.rc-badge { flex-shrink: 0; font-size: var(--fs-xs); font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.rc-badge.pin { background: #fff3d6; color: #a76b00; }
.rc-badge.block { background: #fde8e8; color: #c0392b; }
.rc-main { flex: 1; min-width: 0; }
.rc-name { font-weight: 600; color: var(--text); font-size: var(--fs-base); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-meta { font-size: var(--fs-xs); color: var(--text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-form { border-top: 1px dashed var(--border); padding-top: 12px; }
.rf-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rf-label { width: 64px; flex-shrink: 0; font-size: var(--fs-sm); color: var(--text-2); text-align: right; }
.rf-input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--border);
  border-radius: 8px; font-size: var(--fs-base); background: #fff; color: var(--text); }
.rf-input:focus { border-color: var(--brand-l); outline: none; }
.rf-actions { margin-top: 4px; }
.rf-msg { font-size: var(--fs-sm); margin: 6px 0 0; min-height: 16px; }
.btn-mini { padding: 4px 10px; border: 1px solid var(--brand-l); border-radius: 7px; background: #fff;
  color: var(--brand-d); font-size: var(--fs-sm); cursor: pointer; transition: .15s; white-space: nowrap; }
.btn-mini:hover { background: var(--brand-l); color: #fff; }
.btn-mini.danger { border-color: #f0b4b4; color: #c0392b; }
.btn-mini.danger:hover { background: #c0392b; border-color: #c0392b; color: #fff; }
.col-act { width: 132px; white-space: nowrap; }
.col-act .btn-mini { margin-right: 4px; }
.rank-pin { display: inline-block; margin-left: 6px; font-size: var(--fs-2xs); font-weight: 600; color: #a76b00;
  background: #fff3d6; border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
@media (max-width: 992px) { .rank-cols { grid-template-columns: 1fr; } }

/* 复合详情页列表：草稿提示（未发布前台不可见） */
.doc-card-warn { margin-top: 6px; padding: 6px 10px; border-radius: 6px; background: rgba(255, 149, 0, .1); color: #a35b00; font-size: var(--fs-sm); line-height: 1.5; }

/* 复合详情页：微信接入状态诊断卡（微信内 H5 登录 / 扫码登录 / 分享，一眼看出还差哪几项后台配置） */
.dp-wxstatus{margin-bottom:14px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:#fbfbfc;}
.dp-wxstat-title{font-size: var(--fs-base); font-weight:700; color:#333; margin-bottom:8px;}
.dp-wxstat-row{display:flex; align-items:center; gap:8px; font-size: var(--fs-sm); color:var(--text-2); padding:3px 0; flex-wrap:wrap;}
.dp-wxstat-row b{margin-left:auto; font-weight:600;}
.dp-wxstat-dot{width:8px; height:8px; border-radius:50%; flex:none; background:#c9c9cf;}
.dp-wxstat-dot.ok{background:#28a745;}
.dp-wxstat-dot.no{background:#dc143c;}
.dp-wxstat-dot.wait{background:var(--warn);}
.dp-wxstat-copy{margin-left:8px; border:1px solid var(--line); background:#fff; border-radius:5px; padding:2px 8px; font-size: var(--fs-sm); cursor:pointer; color:#333;}
.dp-wxstat-copy:hover{border-color:var(--brand); color:var(--brand);}
.dp-wxstat-hint{margin-top:6px; padding:7px 10px; border-radius:6px; font-size: var(--fs-sm); line-height:1.6;}
.dp-wxstat-hint.error{background:rgba(220,20,60,.08); color:#a10e2f;}
.dp-wxstat-hint.warn{background:rgba(255,149,0,.1); color:#a35b00;}
.dp-wxstat-hint.info{background:#f0f0f4; color:#666;}

/* 复合详情页：后台预览的图片放大灯箱（运营核对图用） */
.dp-lightbox{position:fixed; inset:0; z-index:1200; background:rgba(0,0,0,.9); display:none; align-items:center; justify-content:center;}
.dp-lightbox.show{display:flex;}
.dp-lightbox img{max-width:92%; max-height:88%; object-fit:contain; display:block; border-radius:6px;}
.dp-lb-close{position:absolute; top:18px; right:18px; width:34px; height:34px; border-radius:50%; border:none; background:rgba(255,255,255,.18); color:#fff; font-size: var(--fs-xl); line-height:1; cursor:pointer;}
.dp-lb-close:hover{background:rgba(255,255,255,.3);}

/* 复合详情页：空磁贴宫格提示（防止把磁贴加错宫格） */
.dp-mrows-empty{margin-top:6px; padding:10px 12px; border:1px dashed #d8d8de; border-radius:8px; background:#fafafb; color:var(--muted); font-size: var(--fs-sm); line-height:1.6;}
.dp-mrows-empty strong{color:var(--brand);}

/* 复合详情页：素材规格说明条 */
.dp-optbar{display:flex; align-items:flex-start; gap:10px; flex-wrap:wrap; margin:0 0 12px; padding:10px 12px; border:1px solid #ffd9d9; border-left:3px solid var(--brand); border-radius:10px; background:#fff8f8;}

/* ============ 资金健康看板（2026-11-21）============
   目的：异常态要一眼可见 —— 平时全绿，出现资损风险立刻显红。
   配色：资损风险用 --danger（红），需关注用 --warn（琥珀），正常用 --ok（绿）。 */
.fh-head{display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:14px;}
.fh-title{display:flex; align-items:center; gap:8px; margin:0 0 4px; font-size: var(--fs-lg); font-weight:600;}
.fh-sub{margin:0; max-width:760px; line-height:1.6;}
.fh-meta{display:flex; gap:16px; flex-wrap:wrap; margin-bottom:12px; font-size: var(--fs-sm);}
.fh-banner{border-radius:10px; padding:12px 16px; margin-bottom:14px; border:1px solid var(--line);}
.fh-banner-ok{background:var(--ok-bg,#ecfdf5); border-color:rgba(16,185,129,.3);}
.fh-banner-alert{background:#fff5f5; border-color:rgba(239,68,68,.35);}
.fh-banner-inner{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.fh-banner-inner b{font-size: var(--fs-md);}
.fh-banner-inner .muted{font-size: var(--fs-base);}
.fh-skeleton{padding:24px; text-align:center; color:var(--muted); font-size: var(--fs-base);}
.fh-card{border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-bottom:10px; background:#fff;}
.fh-card.fh-critical{border-left:3px solid var(--danger); background:#fffafa;}
.fh-card.fh-warning{border-left:3px solid var(--warn); background:#fffdf7;}
.fh-card.fh-ok{border-left:3px solid var(--ok);}
.fh-card-head{display:flex; align-items:center; justify-content:space-between; gap:12px;}
.fh-card-title{display:flex; align-items:center; gap:8px; font-size: var(--fs-md); font-weight:600;}
.fh-dot{width:8px; height:8px; border-radius:50%; background:var(--muted); flex:none;}
.fh-critical .fh-dot{background:var(--danger);}
.fh-warning .fh-dot{background:var(--warn);}
.fh-ok .fh-dot{background:var(--ok);}
.fh-count{font-size: var(--fs-lg); font-weight:600; font-variant-numeric:tabular-nums;}
.fh-critical .fh-count{color:var(--danger);}
.fh-warning .fh-count{color:var(--warn-d);}
.fh-ok .fh-count{color:var(--ok-d);}
.fh-tag{font-size: var(--fs-xs); padding:1px 7px; border-radius:20px; font-weight:400;}
.fh-tag-critical{background:rgba(239,68,68,.12); color:var(--danger-d);}
.fh-tag-warning{background:rgba(245,158,11,.16); color:var(--warn-d);}
.fh-tag-ok{background:rgba(16,185,129,.12); color:var(--ok-d);}
.fh-desc{margin:6px 0 0; font-size: var(--fs-sm); color:var(--muted); line-height:1.6;}
.fh-action{margin:6px 0 0; font-size: var(--fs-sm); color:var(--brand-d); line-height:1.6;}
.fh-table-wrap{margin-top:8px; overflow-x:auto;}
.fh-table{width:100%; border-collapse:collapse; font-size: var(--fs-sm);}
.fh-table th{text-align:left; padding:5px 8px; border-bottom:1px solid var(--line); color:var(--muted); font-weight:400; white-space:nowrap;}
.fh-table td{padding:5px 8px; border-bottom:1px solid #f2f3f6; vertical-align:top;}
.fh-table tr:last-child td{border-bottom:none;}
.fh-table .fh-id{font-family:var(--mono,monospace); white-space:nowrap;}

/* ===== 推荐有礼配置（2026-11-23）===== */
.invite-rw { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.invite-rw label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); }
.invite-rw .field-ctrl { min-width: 88px; }
.invite-rw input[type=number] { width: 84px; }
.invite-rw select { min-width: 140px; }
.invite-form-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.invite-fld { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-base); color: var(--text-2); flex: 1; min-width: 150px; }
.invite-fld .field-ctrl { width: 100%; }
.invite-fld-block { width: 100%; }
.invite-fld-label { font-weight: 500; }
.invite-fld-textarea { min-height: 64px; resize: vertical; }
.invite-form-rewards .invite-fld { min-width: 260px; }
.invite-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ===== 订单列表列样式（2026-12-01 对标电商后台）===== */
/* 订单信息：订单号 + 复制 与 下单日期同一行（左右分列），下方一行放类型标签 */
.ol-oi { min-width: 0; }
.ol-oi-id { line-height: 1.5; }
.ol-oi-line { display: flex; align-items: center; gap: 8px; margin-top: 3px; flex-wrap: wrap; }
.ol-oi-time { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.ol-oi-tag { display: inline-flex; }
.ol-oi-extra { font-size: var(--fs-xs); color: var(--muted); margin-top: 3px; }
/* 商品信息：主图 + 标题 + 规格行（游戏·档位 × 人数） */
.ol-gi { display: flex; gap: 9px; align-items: flex-start; min-width: 0; }
.ol-gi-thumb-wrap {
  flex: none; width: 44px; height: 44px; border-radius: 6px; overflow: hidden;
  background: #f2f2f3; border: 1px solid var(--border);
}
.ol-gi-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.ol-gi-title {
  font-size: var(--fs-base); color: var(--text); line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ol-gi-spec { font-size: var(--fs-xs); color: var(--muted); margin-top: 3px; }

/* ===== 手机版卡片流（2026-12-01，对标抖音电商移动端商家后台）=====
   表格在手机上只能横着滚，实测极难用 —— ≤768px 时 crud 引擎改渲染「一条记录一张卡」。 */
.cc-list { display: none; }
@media (max-width: 768px) {
  .cc-list { display: block; }
  .cc-card {
    position: relative;
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; padding: 11px 12px; margin-bottom: 10px;
  }
  .cc-check { flex: none; padding-top: 2px; }
  .cc-check input { width: 16px; height: 16px; cursor: pointer; }
  .cc-all {
    display: flex; align-items: center; gap: 6px;
    font-size: var(--fs-sm); color: var(--muted); margin-bottom: 8px;
  }
  .cc-all input { width: 16px; height: 16px; }
  .cc-img { flex: none; }
  /* 卡片里的缩略图统一收成 52px（表格列宽是按 64px 定的，手机上偏大） */
  .cc-img .mini-img { width: 52px !important; height: 52px !important; border-radius: 6px; }
  .cc-main { flex: 1; min-width: 0; }
  .cc-title { font-size: var(--fs-base); color: var(--text); line-height: 1.5; }
  .cc-title .prod-title { font-size: var(--fs-base); }
  .cc-sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 3px; }
  .cc-meta { margin-top: 7px; border-top: 1px dashed var(--border); padding-top: 6px; }
  .cc-row { display: flex; gap: 8px; font-size: var(--fs-sm); line-height: 1.8; }
  .cc-k { flex: none; color: var(--muted); min-width: 60px; }
  .cc-v { flex: 1; min-width: 0; color: var(--text); word-break: break-all; }
  .cc-v .tag { font-size: var(--fs-2xs); }
  .cc-foot {
    flex: none; margin-left: auto; padding-left: 8px;
    display: flex; flex-direction: column; gap: 6px; align-items: flex-end;
  }
  .cc-foot .op-group { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
  .cc-foot .btn-sm { white-space: nowrap; }
  .cc-empty { padding: 30px 12px; text-align: center; color: var(--muted); font-size: var(--fs-base); }
}

/* ===== 手机版通用适配（2026-12-01）===== */
@media (max-width: 768px) {
  /* 工具条按钮：手机上换行铺满，避免挤成一行或溢出 */
  .view-head { gap: 8px; }
  .view-actions { width: 100%; gap: 6px; }
  .view-actions .btn-soft, .view-actions .btn-primary, .view-actions .btn-ghost,
  .view-actions .btn-danger { flex: 1 1 auto; justify-content: center; }

  /* 弹窗：手机上全屏化，底部按钮吸底 */
  .modal { padding: 0; align-items: stretch; }
  .modal-box,
  .modal:not(.sku-editor):not(.cp-modal) .modal-box,
  .sku-editor .modal-box { width: 100%; max-width: 100%; border-radius: 0; max-height: 100vh; height: 100vh; }
  .modal-body { padding: 14px; -webkit-overflow-scrolling: touch; }
  .modal-head { padding: 12px 14px; }
  .modal-foot { padding: 10px 14px; position: sticky; bottom: 0; z-index: 2; }
  .modal-foot .btn-primary, .modal-foot .btn-danger, .modal-foot .btn-ghost { flex: 1; justify-content: center; }

  /* 状态分类 Tab：横向滑动（对标电商手机版「全部/待支付/待发货…」） */
  .order-status-tabs, .sc-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; scrollbar-width: none; }
  .order-status-tabs::-webkit-scrollbar, .sc-tabs::-webkit-scrollbar { display: none; }
  .order-status-tabs > *, .sc-tabs > * { flex: none; }

  /* 表格仍偶有出现（如自定义看板）：允许横滚但给出提示色 */
  .table-wrap { -webkit-overflow-scrolling: touch; }
}

/* ==========================================================================
   订单管理表格：对标抖音电商 PC 订单页的排版节奏（2026-12-01）
   目标：解决拥挤 —— 行高放开、段间距拉开、信息分层清晰。
   范围：仅 .order-tbl（订单管理 / 订单售后等订单类表），不影响其他模块表格。
   ========================================================================== */
.order-tbl th {
  padding: 12px 14px;
  font-size: var(--fs-sm); font-weight: 500; color: #8a8f98;
  background: #f7f8fa; border-bottom: 1px solid #eceef1; letter-spacing: .02em;
}
/* 行间距**不设限**（2026-12-01 用户口径）：行高按内容自然撑开，
   不用压缩 padding / line-height 去凑紧凑 —— 我们的商品信息列有 4 层（订单号/标题/规格/标签），
   压行高会把内容挤在一起。列宽同理不设限，横向滚动交给 .table-wrap 容器。 */
.order-tbl td {
  padding: 16px 14px;
  vertical-align: top; line-height: 1.6;
  border-bottom: 1px solid #f0f1f3;
  white-space: normal;
}
.order-tbl tbody tr:hover td { background: #fafbfc; }
/* 不换行的列：订单信息 / 实付 / 状态 / 操作 */
.order-tbl td[data-key="orderInfo"],
.order-tbl td[data-key="finalPrice"],
.order-tbl td[data-key="status"],
.order-tbl td[data-key="op"] { white-space: nowrap; }
/* 实付列右对齐：数字列视线在同一竖线上，比左对齐好扫读 */
.order-tbl td[data-key="finalPrice"],
.order-tbl th[data-key="finalPrice"] { text-align: right; }

/* —— 商品信息列：图 + 标题 + 规格，三层递进 —— */
.order-tbl .ol-gi { gap: 12px; align-items: flex-start; }
.order-tbl .ol-gi-thumb-wrap { width: 56px; height: 56px; border-radius: 6px; }
.order-tbl .ol-gi-title {
  font-size: var(--fs-base); font-weight: 500; line-height: 1.6; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal;
}
.order-tbl .ol-gi-spec { font-size: var(--fs-sm); color: var(--muted); margin-top: 5px; }
.order-tbl .ol-gi-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.order-tbl .ol-gi-tag {
  font-size: var(--fs-xs); line-height: 1.6; padding: 1px 7px; border-radius: 3px;
  background: #f2f3f5; color: #6b7280; white-space: nowrap;
}

/* —— 订单信息列：订单号（主）+ 时间（次） —— */
/* 订单号 + 下单时间（2026-12-01 并入商品信息列顶行） */
.order-tbl .ol-oi-line1 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 9px; flex-wrap: wrap; }
.order-tbl .ol-ord-no {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-sm); color: var(--text-2); font-variant-numeric: tabular-nums; cursor: pointer;
}
.order-tbl .ol-ord-no:hover { color: var(--brand); }
.order-tbl .ol-copy-ic { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.order-tbl .ol-oi-time { font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
/* 商品编号（对外纯数字 sku_no） */
.order-tbl .ol-gi-id { font-size: var(--fs-xs); color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* —— 老板信息列：昵称（主）+ VIP/渠道 + 历史消费 —— */
.order-tbl .ol-boss-name { font-size: var(--fs-base); font-weight: 500; line-height: 1.45; }
.order-tbl .ol-boss-extra { font-size: var(--fs-xs); margin-top: 3px; line-height: 1.5; }
/* 状态说明小字：标签下补「为什么 / 到哪一步了」（对标电商的承诺说明层） */
.order-tbl .ol-status-note { font-size: var(--fs-xs); color: var(--muted); margin-top: 3px; line-height: 1.5; }
.order-tbl .ol-boss-vip { font-weight: 600; }

/* —— 实付：加粗右对齐，视觉锚点 —— */
.order-tbl .ol-money { font-size: var(--fs-md); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* —— 状态：彩色文字标签（对齐订单生命周期配色） —— */
.order-tbl .ol-status {
  display: inline-flex; align-items: center; font-size: var(--fs-sm); font-weight: 500;
  padding: 3px 9px; border-radius: 4px; line-height: 1.5;
}

/* —— 操作：竖排文字链（对齐电商后台的轻量操作区） —— */
/* 操作列分层（2026-12-01 对标抖店）：主操作描边按钮在上，次操作竖排文字链在下。
   注意：此前 orders.js 的 opButtons 没输出 .op-group 包裹，竖排规则从未生效。 */
.order-tbl .ol-ops { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.order-tbl .ol-ops-main { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.order-tbl .ol-ops-main .btn-sm {
  border: 1px solid var(--brand); color: var(--brand); background: #fff;
  height: 26px; padding: 0 14px; border-radius: 4px; font-weight: 500;
}
.order-tbl .ol-ops-main .btn-sm:hover { background: var(--brand-l); }
.order-tbl .ol-ops-links { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.order-tbl .ol-ops-links .btn-sm {
  border-color: transparent; background: transparent; color: var(--text-2);
  height: auto; padding: 0; border-radius: 0; font-size: var(--fs-sm);
}
.order-tbl .ol-ops-links .btn-sm:hover { color: var(--brand); }
.order-tbl .ol-ops-links .btn-sm.warn { color: var(--warn-d); }
.order-tbl .ol-ops-links .btn-sm.warn:hover { color: var(--brand); }
.order-tbl .ol-ops-links .btn-sm.ghost { color: var(--muted); }
.order-tbl .ol-ops-links .btn-sm.ghost:hover { color: var(--brand); }
.order-tbl .op-group { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.order-tbl .op-group .btn-sm { border-color: transparent; background: transparent; color: var(--text-2); padding: 2px 0; }
.order-tbl .op-group .btn-sm:hover { color: var(--brand); border-color: transparent; background: transparent; text-decoration: underline; }
.order-tbl .op-group .btn-sm.warn { color: #b45309; }
.order-tbl .op-group .btn-sm.warn:hover { color: var(--brand); }
.order-tbl .op-group .btn-sm.primary { color: var(--brand); }
.order-tbl .op-group .btn-sm.del { color: #b42318; }
.order-tbl .op-group .btn-sm.del:hover { color: var(--brand); }

/* —— 页面标题层级：大号黑色标题，与下方内容拉开呼吸感 —— */
.order-page .view-head { margin-bottom: 18px; }
.order-page .view-head h3 { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.01em; }

/* —— 筛选区：4 列网格 + 横排字段（标签左 / 控件右），对标电商后台 —— */
.order-page .order-filter-grid.of-quick {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 18px; align-items: center;
}
.order-page .of-field { flex-direction: row; align-items: center; gap: 10px; min-width: 0; }
.order-page .of-field > span { flex: none; width: 64px; text-align: right; font-size: var(--fs-sm); color: var(--muted); }
.order-page .of-field input,
.order-page .of-field .cs-auto { flex: 1; min-width: 0; width: 100%; }
/* ⚠ 溢出修复（2026-12-01）：input 是 flex item，默认 min-width:auto → 固有宽度（约 180px）
   会把 grid 列撑破，视觉上字段横铺出容器、整页出现横向滚动（截图里只剩「操作」列）。
   必须显式 min-width:0 + width:100% 让控件在列内收缩。 */
.order-page .of-field input[type="text"],
.order-page .of-field input[type="number"],
.order-page .of-field input[type="date"] { min-width: 0; }
/* 按钮行是 grid 的**兄弟节点**（2026-12-01 修）：放进 grid 会被「筛选排序：收起」一起隐藏，
   且 14 个字段曾被包进按钮行被 flex 挤出容器。flex-wrap 保证窄屏换行不截断。 */
/* 分页栏吸底（2026-12-01 晚，对标抖店）：翻页固定在视口底部，不随长表格滚走。 */
/* ⚠ 2026-12-02：原先这里是 position:sticky;bottom:0 —— 但 sticky 只对「已进入视口、
   即将滚出」的元素生效，分页条初始位置在视口**下方**时它不会被拉上来，
   所以用户必须滚到最底才看得见。现改由内部 .xy-pager 做 position:fixed（见下方统一规则），
   本容器退化为普通包裹层，不再定位。 */
.order-pager-dock { position: static; background: none; border: none; padding: 0; margin: 0; border-radius: 0; box-shadow: none; }

.order-page .order-filter-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px;
}
.order-page .order-filter-grid.of-quick[hidden] { display: none; }
@media (max-width: 1200px) { .order-page .order-filter-grid.of-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 992px)  { .order-page .order-filter-grid.of-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .order-page .order-filter-grid.of-quick { grid-template-columns: 1fr; }
  .order-page .of-field > span { width: auto; text-align: left; } }

/* —— 模块间距：标题 → Tab → 筛选 → 表格，逐层拉开 —— */
.order-status-tabs { padding: 14px 18px; gap: 10px; }
/* 2026-12-02：对标抖店，Tab 纯文字 + 计数，无图标 */
.order-tab { padding: 7px 15px; font-size: var(--fs-base); display: inline-flex; align-items: center; gap: 6px; }
.order-filter-panel { padding: 18px 18px 24px; }
.order-filter-grid { gap: 18px 20px; }
.order-filter-panel + .table-wrap { margin-top: 0; }

/* ===== 订单列表 7 列结构（2026-12-01 对标参考图）===== */
.order-tbl td[data-key="_check"] { width: 40px; padding-right: 0; }
.order-tbl .ol-row-check { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }
/* 🔴 2026-12-05：表头「全选本页」此前**没有任何样式**（浏览器默认 13px 灰白方块），
   与行 checkbox（.ol-row-check）、通用引擎（.head-check）视觉不一致 ⇒ 统一为同款。 */
.order-tbl .ol-head-check { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }
/* 商品信息：顶行订单号 + 下单时间，下方 图 + 标题/规格/编号/标签 */
.order-tbl .ol-gi { display: block; }
.order-tbl .ol-gi-row { display: flex; gap: 12px; align-items: flex-start; }
/* 单价 / 收入金额：主数字 + 副行 */
.order-tbl .ol-price { text-align: right; }
.order-tbl .ol-price-now { font-size: var(--fs-md); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.order-tbl .ol-price-sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.order-tbl td[data-key="price"], .order-tbl td[data-key="income"] { text-align: right; white-space: nowrap; }
.order-tbl th[data-key="price"], .order-tbl th[data-key="income"] { text-align: right; }

/* ===== 批量操作条（2026-12-01，位置在表格上方）===== */
.ol-bulkbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(31,41,55,.04);
}
.ol-bulkbar[hidden] { display: none; }
.ol-bulk-sel { font-size: var(--fs-base); color: var(--text); font-weight: 500; }
.ol-bulk-btn {
  height: 28px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--border);
  background: #fff; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer;
}
.ol-bulk-btn:hover { border-color: var(--brand); color: var(--brand); }
.ol-bulk-btn.danger { color: var(--danger); border-color: var(--danger); }
.ol-bulk-btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.ol-bulk-btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.ol-bulk-btn.ghost:hover { background: var(--bg); color: var(--text-2); }
.ol-bulk-right { margin-left: auto; font-size: var(--fs-sm); color: var(--text-3); }

/* 批量改价弹窗里的逐单列表 */
.ol-bulk-list { border: 1px solid var(--border); border-radius: 8px; max-height: 300px; overflow: auto; }
.ol-bulk-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.ol-bulk-row:last-child { border-bottom: none; }
.ol-bulk-info { flex: 1; min-width: 0; }
.ol-bulk-no { font-size: var(--fs-sm); color: var(--text); font-variant-numeric: tabular-nums; }
.ol-bulk-cur { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ol-bulk-row input {
  flex: none; width: 116px; height: 30px; padding: 0 9px; text-align: right;
  border: 1px solid var(--border); border-radius: 6px; font-size: var(--fs-base); font-family: inherit;
  outline: none; font-variant-numeric: tabular-nums;
}
.ol-bulk-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.08); }
@media (max-width: 768px) {
  .ol-bulkbar { padding: 9px 11px; }
  .ol-bulk-right { display: none; }
  .ol-bulk-row input { width: 92px; }
}

/* ===== 订单页独立大搜索框（2026-12-01 对标电商）===== */
.of-searchrow { margin-bottom: 14px; }
.of-searchbox {
  display: flex; align-items: center; gap: 8px; width: 100%;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 6px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.of-searchbox:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.08); }
.of-searchbox input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-size: var(--fs-base); font-family: inherit; }
.of-searchbox input::placeholder { color: var(--muted); }
.ic-search { width: 15px; height: 15px; stroke: var(--muted); fill: none; stroke-width: 1.5; stroke-linecap: round; flex: none; }

/* ===== 侧栏收起成图标栏（2026-12-01 对标抖店：图4 展开 / 图5 收起） ===== */
.tb-collapse {
  width: 30px; height: 30px; border-radius: 7px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); cursor: pointer; transition: .15s;
}
.tb-collapse:hover { background: var(--bg); color: var(--brand); }
.tb-collapse .ic { width: 16px; height: 16px; }

/* 收起态：侧栏收窄成图标栏，分组文字与子项隐藏 */
.app-wrap.nav-collapsed { grid-template-columns: 52px minmax(0, 1fr); }
/* 769–860px 断点修复（2026-12-01）：≤860px 侧栏是抽屉、不占 grid 列，
   但上面的收起态规则在其后且特异性更高 → 主区被塞进 52px 列。
   统一断点到 860px，与 JS matchMedia 兜底同口径。 */
@media (max-width: 860px) {
  .app-wrap.nav-collapsed { grid-template-columns: minmax(0, 1fr); }
}
.app-wrap.nav-collapsed .sidebar { width: 52px; }
.app-wrap.nav-collapsed .brand { padding: 16px 0; justify-content: center; }
.app-wrap.nav-collapsed .brand span,
.app-wrap.nav-collapsed .brand em { display: none; }
.app-wrap.nav-collapsed .nav-group-title {
  justify-content: center; padding: 11px 0; margin: 2px 6px;
}
.app-wrap.nav-collapsed .nav-group-title span,
.app-wrap.nav-collapsed .nav-group-title .caret { display: none; }
.app-wrap.nav-collapsed .nav-group-title .ic { display: inline-block; width: 19px; height: 19px; color: #9aa0ad; }
.app-wrap.nav-collapsed .nav-group-title:hover .ic { color: #fff; }
.app-wrap.nav-collapsed .nav-group-body { display: none; }
/* 分组图标悬停/点击 → 右侧飞出子菜单 */
.nav-flyout {
  position: absolute; left: 100%; top: 0; min-width: 168px; z-index: 70;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; display: none;
}
.app-wrap.nav-collapsed .nav-flyout.on { display: block; }
/* 2026-12-02：收起态气泡脱离 `.sidebar nav{overflow:auto}` 的裁剪。
   原 absolute;left:100% 会飞出 nav 的滚动区域被切掉（子类目上半截看不见），
   现由 JS 按图标位置给 fixed 坐标，这里只兜底定位与层级。 */
.app-wrap.nav-collapsed .nav-flyout {
  position: fixed; left: 60px; top: 80px; z-index: 130;
  max-height: calc(100vh - 24px); overflow-y: auto;
}
/* 🔴 2026-12-02 关键：`.sidebar` 是 position:sticky，**sticky 会创建层叠上下文**，
   因此气泡的 z-index:130 只在侧栏内部有效，整体层级仍由侧栏（z-index:auto）决定 ——
   主区里 z-index 更高的元素（固定分页条 30、表格冻结列 3-6）就会盖在气泡上面。
   修法：仅在气泡打开期间临时抬高侧栏层级（不常驻，避免破坏「顶栏45>侧栏>主区」的递进）。 */
.app-wrap.nav-flyout-open .sidebar { z-index: 100; }
/* 气泡左缘小箭头，指向图标，避免看起来像漂浮的白块 */
.app-wrap.nav-collapsed .nav-flyout::before {
  content: ''; position: absolute; left: -5px; top: 14px;
  width: 8px; height: 8px; background: #fff;
  border-left: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}
.nav-flyout-title { padding: 6px 10px 8px; font-size: var(--fs-xs); color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.nav-flyout .nav-btn { color: var(--text-2); margin-bottom: 2px; }
.nav-flyout .nav-btn:hover { background: var(--bg); color: var(--text); }
.nav-flyout .nav-btn.active { background: var(--brand-l); color: var(--brand); }
.app-wrap.nav-collapsed .nav-group { position: relative; }

/* ===== IM 独立站点（im.xuanying.vip，2026-12-01）=====
   只做客服 IM：不显示侧边栏，主区占满；顶栏提供「返回主后台」。 */
.app-wrap.im-site { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
.app-wrap.im-site .sidebar { display: none; }
.app-wrap.im-site .main { padding: 14px 18px 24px; }

/* ===== 子账号「可访问模块」列（2026-12-01）：限宽 + 超出折叠 ===== */
/* 此前该列输出一长串 chip，配合 .tbl{min-width:max-content} 把整张表撑出容器。
   现在用限宽 flex 容器：超出的折行显示，超过 4 个折叠成「+N」。 */
/* 列宽不设限：内容自然撑开，横向滚动交给 .table-wrap 容器。
   真正控制「别把表撑得太离谱」的是**折叠**（默认只显示 4 个 + 「+N」）。 */
.acc-modcell {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.chip-more { cursor: pointer; color: var(--brand); background: var(--brand-l); border-color: transparent; font-weight: 500; }
.chip-more:hover { background: var(--brand); color: #fff; }

/* ========================================================================== */
/* 字号整体缩小 2px（2026-12-01 用户拍板：对标抖店小字号、节省空间）          */
/* 只改 font-size，**不动行高/padding/间距**（用户同一轮明确「行高不动」）。   */
/* 集中覆盖便于整体回退；仅作用于管理后台，不影响 H5/detail/第三方库。        */
/* ========================================================================== */
.muted { font-size: var(--fs-xs); }
.view-head h3 { font-size: var(--fs-md); }
/* 顶栏 */
.tb-brand { font-size: var(--fs-base); }
.tb-brand em { font-size: var(--fs-2xs); }
.tb-name { font-size: var(--fs-xs); }
.tb-role { font-size: var(--fs-2xs); }
.tb-notify-head { font-size: var(--fs-xs); }
.tb-notify-title { font-size: var(--fs-xs); }
.tb-notify-text { font-size: var(--fs-2xs); }
.tb-notify-time { font-size: var(--fs-2xs); }
.tb-notify-empty { font-size: var(--fs-2xs); }
/* 侧栏 */
.brand { font-size: var(--fs-lg); }
.brand em { font-size: var(--fs-2xs); }
.nav-btn { font-size: var(--fs-sm); }
.nav-group-title { font-size: var(--fs-xs); }
.nav-group-grid .nav-btn { font-size: var(--fs-xs); }
.nav-subgroup-title { font-size: var(--fs-2xs); }
.side-collapse { font-size: var(--fs-xs); }
.side-foot { font-size: var(--fs-xs); }
/* 通用按钮与表单 */
.btn-primary, .btn-ghost, .btn-soft, .btn-sm, .btn-danger, .btn-retry { font-size: var(--fs-xs); }
.link { font-size: var(--fs-xs); }
.field-label { font-size: var(--fs-xs); }
/* 🔴 2026-12-02：input/textarea/select 默认**不继承** body 的 font-family（浏览器用 Arial），
   这是「占位符字体跟别处不一样」的根因。下面统一继承 + 走字号变量。 */
input, textarea, select, button { font-family: inherit; }
/* 2026-12-02 统一：表单控件字号一律 --fs-base（此前 sm/sm/md/base 四套并存） */
input, textarea, select { font-size: var(--fs-base); }
.tag { font-size: var(--fs-2xs); }
.card-soft-title { font-size: var(--fs-xs); }
.panel > .panel-head { font-size: var(--fs-sm); }
.panel > .panel-head em { font-size: var(--fs-2xs); }
/* 通用表格 */
.tbl th, .tbl td { font-size: var(--fs-xs); }
.tbl th { font-size: var(--fs-2xs); }
/* 订单页专属（对标抖店订单页） */
.order-tab { font-size: var(--fs-xs); }
.order-tab em { font-size: var(--fs-2xs); }
.of-field > span { font-size: var(--fs-2xs); }
.order-page .of-field > span { font-size: var(--fs-2xs); }
.order-tbl th { font-size: var(--fs-2xs); }
.order-tbl .ol-gi-title { font-size: var(--fs-xs); }
.order-tbl .ol-gi-spec { font-size: var(--fs-2xs); }
.order-tbl .ol-gi-tag { font-size: var(--fs-2xs); }
.order-tbl .ol-price-now { font-size: var(--fs-sm); }
.order-tbl .ol-price-sub { font-size: var(--fs-2xs); }
.order-tbl .ol-status-note { font-size: var(--fs-2xs); }
.order-tbl .ol-status-extra { font-size: var(--fs-2xs); }
.order-tbl .ol-ord-no { font-size: var(--fs-xs); }
.ol-bulk-sel { font-size: var(--fs-xs); }
.xy-pager button, .xy-pager select, .xy-pager input, .xy-pager .xy-pg-info { font-size: var(--fs-2xs); }

/* ========================================================================== */
/* 全后台列表/表单排版统一（2026-12-01 晚用户拍板：列距/行距/信息层级）        */
/* 排除订单页 .order-tbl —— 它的 16px/1.6 是此前专门拍板的「行间距不限」。      */
/* ========================================================================== */
/* 通用列表：列内边距收紧，行高按内容自然撑开 */
.tbl:not(.order-tbl) th, .tbl:not(.order-tbl) td { padding: 8px 10px; line-height: 1.5; }
.tbl:not(.order-tbl) th { padding: 9px 10px; }
/* 表单：字段间距收紧，与缩小后的字号协调 */
.field { margin-bottom: 12px; }
.field-label { margin-bottom: 6px; }
.field-ctrl input[type=text], .field-ctrl input[type=number],
.field-ctrl input[type=password], .field-ctrl input:not([type]) { height: 32px; }
.field-ctrl textarea { padding: 7px 10px; }
/* 弹窗表单区 */
.modal-body { padding: 14px 18px; }
/* 老板信息列：头像 + 两行文字 */
.ol-boss-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; background: #f1f3f8; }
.ol-boss-inits { width: 28px; height: 28px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-size: var(--fs-xs); font-weight: 600; }
.order-tbl .ol-boss-wrap { display: flex; align-items: center; gap: 8px; }
.order-tbl .ol-boss-text { min-width: 0; }
/* 操作列：全部超链文字（无按钮外观） */
.order-tbl .ol-ops { gap: 4px; }
.order-tbl .ol-link {
  border: none; background: none; padding: 1px 0; cursor: pointer;
  color: var(--text-2); font-size: var(--fs-xs); font-family: inherit; line-height: 1.5;
  text-align: right; white-space: nowrap;
}
.order-tbl .ol-link:hover { color: var(--brand); text-decoration: underline; }
.order-tbl .ol-link.primary { color: var(--brand); font-weight: 600; }
.order-tbl .ol-link.warn { color: var(--warn-d); }
.order-tbl .ol-link.ghost { color: var(--muted); }
/* 顶栏/侧栏去重复后的收起态留白：侧栏顶部不再有 brand，导航从顶部开始 */
.sidebar nav { padding-top: 14px; }

/* 老板头像：img 绝对定位铺在 initials 占位之上，加载失败自然露出底层（无内联 onerror） */
.order-tbl .ol-boss-row { display: flex; align-items: center; gap: 8px; }
.order-tbl .ol-boss-av { position: relative; width: 28px; height: 28px; flex: none; display: inline-block; }
.order-tbl .ol-boss-av .ol-boss-avatar { position: absolute; inset: 0; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #fff; }
.order-tbl .ol-boss-av .ol-boss-inits { position: absolute; inset: 0; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-size: var(--fs-xs); font-weight: 600; }
.order-tbl .ol-boss-text { min-width: 0; }

/* ========================================================================== */
/* 固定列（2026-12-01 20:46 用户拍板，对标抖店后台）                            */
/*   · 所有有操作列的列表：操作列钉在右侧，窄屏横滚时始终可见；                  */
/*   · SKU 管理额外把首列「商品信息」钉在左侧（左右都锁，中间价格/库存/销量横滚）；*/
/*   · 列宽跟随内容自然宽（不写死 px），sticky 靠内容撑开；                     */
/*   · 固定列必须不透明背景 + z-index，否则横滚时其它列内容会透过来。            */
/* ========================================================================== */
/* 右侧操作列（所有列表页） */
.tbl th[data-key="op"],
.tbl td[data-key="op"] {
  position: sticky; right: 0; z-index: 3;
  background: var(--card);
  box-shadow: -1px 0 0 var(--border), -4px 0 6px rgba(31,41,55,.04);
}
.tbl th[data-key="op"] { z-index: 5; background: #f9fafb; }
.tbl tbody tr:hover td[data-key="op"] { background: #f5f8fb; }
/* 订单页操作列（超链文字 + 右对齐，背景与行一致） */
.order-tbl th[data-key="op"],
.order-tbl td[data-key="op"] { background: #fff; }
.order-tbl tbody tr:hover td[data-key="op"] { background: #fafbfc; }
/* 左侧商品信息列（仅 SKU 管理：左右都锁） */
.table-wrap[data-module="skus"] .tbl th[data-key="title"],
.table-wrap[data-module="skus"] .tbl td[data-key="title"] {
  position: sticky; left: 0; z-index: 4;
  background: var(--card);
  box-shadow: 1px 0 0 var(--border), 4px 0 6px rgba(31,41,55,.04);
}
.table-wrap[data-module="skus"] .tbl th[data-key="title"] { z-index: 6; background: #f9fafb; }
.table-wrap[data-module="skus"] .tbl tbody tr:hover td[data-key="title"] { background: #f5f8fb; }

/* SKU 勾选列跟随商品信息一起锁左（对标电商后台：勾选+商品信息为固定区） */
.table-wrap[data-module="skus"] .tbl th.col-check,
.table-wrap[data-module="skus"] .tbl td.col-check {
  position: sticky; left: 0; z-index: 4;
  background: var(--card);
}
.table-wrap[data-module="skus"] .tbl th.col-check { z-index: 6; background: #f9fafb; }
.table-wrap[data-module="skus"] .tbl tbody tr:hover td.col-check { background: #f5f8fb; }
/* 商品信息列改为贴在勾选列右侧（left = 勾选列宽 40px） */
.table-wrap[data-module="skus"] .tbl th[data-key="title"],
.table-wrap[data-module="skus"] .tbl td[data-key="title"] { left: 40px; }

/* ========================================================================== */
/* crud 通用列表操作列：竖排超链文字（2026-12-01 21:21 用户拍板，与订单页统一） */
/* ========================================================================== */
.tbl td[data-key="op"] .op-group {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  flex-wrap: nowrap;
}
.tbl td[data-key="op"] .ol-link {
  border: none; background: none; padding: 1px 0; cursor: pointer;
  color: var(--text-2); font-size: var(--fs-xs); font-family: inherit; line-height: 1.5;
  text-align: right; white-space: nowrap;
}
.tbl td[data-key="op"] .ol-link:hover { color: var(--brand); text-decoration: underline; }
.tbl td[data-key="op"] .ol-link.primary { color: var(--brand); font-weight: 600; }
.tbl td[data-key="op"] .ol-link.del { color: var(--danger); }
.tbl td[data-key="op"] .ol-link.warn { color: var(--warn-d); }
.tbl td[data-key="op"] .ol-link .ic { width: 12px; height: 12px; vertical-align: middle; }

/* ========================================================================== */
/* 筛选框：字段名锁定在输入框内部左侧（2026-12-02 用户拍板，对标抖店）          */
/*   .of-lock 是带边框的容器；.of-label 是灰色锁定前缀（不可编辑）；            */
/*   内部 input / cs-auto / daterange 去掉自身边框，贴在右侧成为输入区。        */
/* ========================================================================== */
.order-page .of-field.of-lock {
  flex-direction: row; align-items: stretch; gap: 0; min-width: 0;
  height: 36px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff;
  /* 🔴 2026-12-02 修复：这里原本是 overflow:hidden（为裁内部输入框圆角），
     但它同时把 **下拉面板 .cs-panel 与日期面板 .dr-panel 一起裁掉了**
     —— 两者都是 position:absolute 定位在 of-lock 内部 ——
     表现就是「点筛选毫无反应」。改用 visible，左侧圆角交给 .of-label 自己处理。 */
  overflow: visible;
  transition: border-color .15s, box-shadow .15s;
}
.order-page .of-field.of-lock:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.08); }
.order-page .of-field.of-lock .of-label {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 9px; min-width: 62px;
  background: #f5f6f8; color: var(--text-2);
  font-size: var(--fs-xs); font-weight: 500; white-space: nowrap;
  border-right: 1px solid var(--border); user-select: none; cursor: default;
  border-radius: 5px 0 0 5px;   /* 容器不再 overflow:hidden，灰底要自己收圆角 */
}
.order-page .of-field.of-lock input,
.order-page .of-field.of-lock .cs-auto,
.order-page .of-field.of-lock [data-daterange] {
  flex: 1; min-width: 0; width: auto; height: 100%;
  border: none; border-radius: 0; background: transparent;
  box-shadow: none; outline: none;
}
.order-page .of-field.of-lock input { padding: 0 10px; font-size: var(--fs-xs); }
.order-page .of-field.of-lock input:focus { border: none; box-shadow: none; }
.order-page .of-field.of-lock .cs-auto { min-height: 0; }
/* 日期范围组件内部输入框也去边框 */
.order-page .of-field.of-lock [data-daterange] input { border: none; height: 100%; }

/* ========================================================================== */
/* 窄侧栏适配（2026-12-02：侧栏 = 视口 1/10，clamp 160–240px）                 */
/*   两列菜单网格保留，字号/图标/内边距再压一档以塞进 160px。                   */
/* ========================================================================== */
.sidebar nav { padding: 10px 8px; }
.nav-group { margin-bottom: 8px; }
.nav-group-title { padding: 7px 8px; font-size: var(--fs-2xs); gap: 5px; }
.nav-group-title .ic { width: 14px; height: 14px; }
.nav-group-body { padding: 2px 4px; }
.nav-group-grid { grid-template-columns: 1fr 1fr; gap: 3px 3px; }
.nav-group-grid .nav-btn { padding: 6px 4px; font-size: var(--fs-2xs); gap: 3px; border-radius: 6px; }
.nav-group-grid .nav-btn .ic { width: 12px; height: 12px; }
.nav-group-grid .nav-btn span { font-size: var(--fs-2xs); }
.nav-subgroup { margin-bottom: 7px; }
.nav-subgroup-title { font-size: var(--fs-2xs); padding: 2px 0 2px 5px; margin-left: 2px; }
.brand { padding: 14px 12px 12px; font-size: var(--fs-md); gap: 7px; }
.brand .ic { width: 20px; height: 20px; }
.brand em { font-size: var(--fs-2xs); padding: 1px 5px; }
.side-foot { padding: 8px 8px; }
.side-collapse { padding: 7px 8px; font-size: var(--fs-2xs); gap: 5px; }
.side-collapse .ic { width: 14px; height: 14px; }

/* ========================================================================== */
/* 侧栏留白对标抖店（2026-12-02 用户截图）：分组标题行更高、菜单项纵向更疏、     */
/*   两列横向间距更宽、分组之间留白更大。保留深色 + 两列网格 + 当前字号。        */
/* ========================================================================== */
.sidebar nav { padding: 16px 12px 20px; }
.nav-group { margin-bottom: 20px; }
.nav-group-title { padding: 10px 10px; min-height: 36px; }
.nav-group-body { padding: 6px 6px 2px; }
.nav-group-grid { gap: 6px 14px; }
.nav-group-grid .nav-btn { padding: 9px 6px; min-height: 30px; }
.nav-subgroup { margin-bottom: 14px; }
.nav-subgroup-title { padding: 4px 0 6px 8px; margin-left: 2px; }
.side-foot { padding: 12px 12px 16px; }
.side-collapse { padding: 10px 10px; min-height: 36px; }

/* ========================================================================== */
/* 侧栏标题层级对标抖店（2026-12-02 截图）：                                    */
/*   一级分组 = 图标 + 较大加粗标题；二级菜单 = 纯文字、比一级小一档。           */
/* ========================================================================== */
.nav-group-title { font-size: var(--fs-md); font-weight: 600; color: #e8eaf0; gap: 8px; }
.nav-group-title .ic { display: inline-block; width: 16px; height: 16px; color: #9aa0ad; }
.nav-group-title:hover .ic { color: #fff; }
.nav-group-grid .nav-btn { font-size: var(--fs-sm); padding-left: 4px; }
.nav-group-grid .nav-btn .ic { display: none; }
.nav-group-grid .nav-btn span { font-size: var(--fs-sm); }
.nav-subgroup-title { font-size: var(--fs-xs); }

/* ========================================================================== */
/* 侧栏纵向收紧（2026-12-02 10:29 用户截图反馈：展开后太长）                    */
/*   只收纵向：分组/菜单项/子分组的行距与 min-height；                          */
/*   保留两列横向间距 14px 与字号层级（一级 14px / 二级 12.5px）。              */
/* ========================================================================== */
.sidebar nav { padding: 10px 10px 14px; }
.nav-group { margin-bottom: 10px; }
.nav-group-title { padding: 6px 8px; min-height: 26px; }
.nav-group-body { padding: 2px 4px 0; }
.nav-group-grid .nav-btn { padding: 4px 4px; min-height: 22px; }
.nav-subgroup { margin-bottom: 6px; }
.nav-subgroup-title { padding: 1px 0 2px 6px; }
.side-foot { padding: 8px 10px 10px; }
.side-collapse { padding: 6px 8px; min-height: 28px; }

/* ========================================================================== */
/* 顶栏右上角线条图标 + 高亮（2026-12-02 用户拍板：不要灰底）                   */
/*   快捷按钮与登录态账号区统一：默认线条灰、hover 品牌红高亮，无灰色底块。      */
/* ========================================================================== */
.tb-icon-btn { background: transparent !important; color: #c2c6d2; }
.tb-icon-btn:hover { background: transparent !important; color: var(--brand); }
.tb-icon-btn .ic { fill: none; stroke: currentColor; stroke-width: 1.7; }
.tb-icon-btn.tb-quick { color: #c2c6d2; }
.tb-icon-btn.tb-quick:hover { color: var(--brand); }
/* 账号区：头像改线条描边，hover 高亮；去角色文字；箭头线条高亮 */
.tb-avatar {
  background: transparent; border: 1.5px solid #c2c6d2; color: #e8eaf0;
  transition: border-color .15s, color .15s;
}
.tb-me:hover .tb-avatar { border-color: var(--brand); color: var(--brand); }
.tb-role { display: none; }
.tb-caret { background: transparent !important; color: #9298a6; }
.tb-caret:hover { background: transparent !important; color: var(--brand); }
.tb-caret .ic { fill: none; stroke: currentColor; stroke-width: 1.7; }
.tb-menu-head .tb-avatar { background: linear-gradient(135deg, var(--brand), var(--brand-d)); border: none; color: #fff; }

/* ========================================================================== */
/* 顶栏右上角对标抖店（2026-12-02）：图标在上、文字在下，账号区两行             */
/* ========================================================================== */
.tb-icon-btn {
  width: auto; min-width: 56px; height: auto; padding: 4px 6px 3px;
  flex-direction: column; gap: 2px; border-radius: 6px;
}
.tb-icon-btn .tb-ico-wrap { position: relative; display: inline-flex; }
.tb-icon-btn .ic { width: 19px; height: 19px; }
.tb-entry-label { font-size: var(--fs-2xs); line-height: 1.2; white-space: nowrap; color: #c2c6d2; }
.tb-icon-btn:hover .tb-entry-label { color: var(--brand); }
.tb-icon-btn .tb-badge { top: -4px; right: -8px; }
/* 账号区：角色文字恢复显示（之前为极简隐藏），两行结构 */
.tb-role { display: block; font-size: var(--fs-2xs); }
.tb-name { font-size: var(--fs-sm); }
.tb-me-text { gap: 1px; }

/* ========== 后台登录页：手机号登录 + 官网一键登录（2026-12-02） ========== */
.login-oneclick { margin-top: 14px; }
.login-divider { display: flex; align-items: center; gap: 10px; color: #9aa0ad; font-size: var(--fs-xs); margin: 12px 0; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-hint { font-size: var(--fs-2xs); color: #9aa0ad; line-height: 1.6; margin-top: 6px; }
.login-hint code { background: rgba(0,0,0,.05); padding: 1px 4px; border-radius: 3px; font-size: var(--fs-2xs); }
#webLoginBtn { width: 100%; margin-top: 4px; }
.tb-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }

/* 账号头像去灰色边框（2026-12-02）：有真实头像时无边框；首字母占位用淡底 */
.tb-avatar { border: none !important; }
.tb-me:hover .tb-avatar { border: none !important; color: var(--brand); }

/* 快捷按钮去灰色圆角方块底（2026-12-02 11:52 用户拍板）：只留图标+文字，hover 也不出灰底 */
.tb-icon-btn, .tb-icon-btn:hover,
.tb-icon-btn.tb-quick, .tb-icon-btn.tb-quick:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* ========== 身份水印层（2026-12-02，防截图泄密） ==========
   fixed 全屏平铺，pointer-events:none 不拦截任何点击/滚动；
   z-index 高于内容但低于弹窗/错误提示，避免盖住交互。 */
.wm-layer {
  position: fixed; inset: 0; z-index: 46;
  pointer-events: none; user-select: none;
  background-repeat: repeat; background-position: 0 0;
}

/* ========================================================================== */
/* 订单筛选区收起分组 + 排版对齐（2026-12-02 用户截图反馈）                    */
/*   收起只隐藏非第一行常用字段；4 列固定；日期范围占满单列不被挤。             */
/* ========================================================================== */
.order-page .order-filter-grid.of-quick {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px 16px;
}
.order-page .order-filter-grid.of-quick.collapsed > .of-field:not(.of-primary) { display: none !important; }
/* 日期范围容器占满整列：内部 dr-trigger/input 必须 width:100% 不被内容挤窄 */
.order-page .of-field.of-date { min-width: 0; width: 100%; }
.order-page .of-field.of-lock [data-daterange],
.order-page .of-field.of-lock [data-daterange] > * { flex: 1 1 0; min-width: 0; width: 100%; }
.order-page .of-field.of-lock .of-label { min-width: 66px; }
/* 窄屏降级：仍是等宽列，不出现字段被挤出 */
@media (max-width: 1200px) { .order-page .order-filter-grid.of-quick { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 992px)  { .order-page .order-filter-grid.of-quick { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 640px)  { .order-page .order-filter-grid.of-quick { grid-template-columns: 1fr !important; } }

/* 用户信息列：用户编号小标签（2026-12-02） */
.order-page .ol-boss-uid { color: var(--brand); font-weight: 600; margin-left: 6px; font-size: var(--fs-xs); }

/* ========== 订单页手机端深度卡片（2026-12-02 B1） ==========
   ≤768px：table 变 block、thead 隐藏、tbody 作卡片容器。
   卡片仍渲染在 tbody（事件委托绑在 $body 上，不改绑定）。桌面端完全不受影响。 */
@media (max-width: 768px) {
  .order-page.orders-card-mode .table-wrap { overflow: visible; }
  .order-page.orders-card-mode .order-tbl,
  .order-page.orders-card-mode .order-tbl tbody { display: block; width: 100%; }
  .order-page.orders-card-mode .order-tbl thead { display: none; }
  .order-page.orders-card-mode .order-tbl tr { display: block; }
  /* 手机端全选本页（表头隐藏后的替代入口） */
  .order-page .ol-card-all { display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; font-size: var(--fs-sm); color: var(--text-2); }
  /* ===== 深度卡片 ===== */
  .order-page .ol-card {
    background: var(--surface, #fff); border: 1px solid var(--border, #e8eaef);
    border-radius: 10px; margin: 10px 12px; padding: 12px;
  }
  .order-page .ol-card-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border, #eef0f4); }
  .order-page .ol-card-check { flex: none; }
  .order-page .ol-card-status { flex: 1; min-width: 0; }
  .order-page .ol-card-after { flex: none; }
  .order-page .ol-card-goods { padding: 10px 0 6px; }
  .order-page .ol-card-boss { padding: 6px 0; }
  .order-page .ol-card-income { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
  .order-page .ol-card-label { font-size: var(--fs-xs); color: var(--muted, #8a90a0); flex: none; }
  .order-page .ol-card-ops { display: flex; flex-wrap: wrap; gap: 8px 12px; padding-top: 8px; border-top: 1px solid var(--border, #eef0f4); }
  .order-page .ol-card .ol-gi-thumb-wrap { width: 56px; height: 56px; }
  .order-page .ol-card .ol-gi-thumb { width: 56px; height: 56px; }
  /* 卡片内缩略图固定 56px、标题自然换行，避免沿表格列宽把文字挤没 */
  .order-page .ol-card .ol-gi-row { display: flex; gap: 10px; align-items: flex-start; }
  .order-page .ol-card .ol-gi-title { font-size: var(--fs-base); line-height: 1.6; }
}

/* ========== 派单页手机端卡片（2026-12-02 B1） ========== */
@media (max-width: 768px) {
  .dispatch-card-mode .table-wrap { overflow: visible; }
  .dispatch-card-mode .table-wrap .tbl,
  .dispatch-card-mode .table-wrap .tbl tbody { display: block; width: 100%; }
  .dispatch-card-mode .table-wrap .tbl thead { display: none; }
  .dispatch-card-mode .table-wrap tr { display: block; }
  .dp-card {
    background: var(--surface, #fff); border: 1px solid var(--border, #e8eaef);
    border-radius: 10px; margin: 10px 12px; padding: 12px;
  }
  .dp-card-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--border, #eef0f4); }
  .dp-card-id { font-size: var(--fs-xs); color: var(--muted, #8a90a0); }
  .dp-card-status { font-size: var(--fs-sm); font-weight: 600; color: var(--brand, #dc143c); }
  .dp-card-assign { margin-left: auto; font-size: var(--fs-xs); color: var(--muted, #8a90a0); }
  .dp-card-title { font-size: var(--fs-base); line-height: 1.6; padding: 8px 0 4px; }
  .dp-card-meta, .dp-card-worker, .dp-card-time { font-size: var(--fs-sm); color: var(--muted, #8a90a0); line-height: 1.7; }
  .dp-card-ops { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border, #eef0f4); }
}

/* 订单卡片灰底详情区（2026-12-02，对标参考图2） */
.order-page .ol-card-detail { background: var(--bg-subtle, #f7f8fa); border-radius: 6px; padding: 8px 10px; margin: 4px 0 8px; }
.order-page .ol-card-detail > div { display: flex; gap: 10px; font-size: var(--fs-xs); line-height: 1.8; color: var(--text, #333); }
.order-page .ol-card-detail span { flex: none; width: 32px; color: var(--muted, #8a90a0); }

/* ========== 客服IM手机端单栏分步（2026-12-02 B1） ========== */
@media (max-width: 768px) {
  .sc-host { display: block; height: calc(100vh - 170px); min-height: 400px; }
  .sc-host .sc-list { height: 100%; display: block; }
  .sc-host .sc-chat { display: none; height: 100%; }
  .sc-host.sc-m-chat .sc-list { display: none; }
  .sc-host.sc-m-chat .sc-chat { display: flex; }
  .sc-m-back { display: none !important; flex: none; background: none; border: none; color: var(--brand, #dc143c); font-size: var(--fs-base); padding: 4px 8px; }
  .sc-host.sc-m-chat .sc-m-back { display: inline-block !important; }
}

/* ========== 手机端底部 Tab（2026-12-02） ========== */
.mbtab { display: none; }
@media (max-width: 768px) {
  .mbtab {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--card, #fff); border-top: 1px solid var(--border, #e8eaef);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-sizing: border-box;
  }
  .mbtab button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: none; border: none; color: var(--muted, #8a90a0);
    font-size: var(--fs-xs); padding: 4px 0; cursor: pointer;
  }
  .mbtab button svg { width: 20px; height: 20px; }
  .mbtab button.active { color: var(--brand, #dc143c); }
  /* 手机端隐藏侧栏，主区留底部 Tab 空间 */
  .app-wrap:not(.im-site) .sidebar { display: none; }
  .app-wrap:not(.im-site) { grid-template-columns: minmax(0, 1fr) !important; grid-template-areas: "top" "main" !important; }
  .app-wrap .main { padding-bottom: 64px; }
  /* 顶栏三个快捷按钮与底部 Tab 重复，手机端隐藏（保留品牌与头像菜单） */
  .topbar .tb-icon-btn[data-tb="notify"],
  .topbar .tb-icon-btn[data-tb="im"],
  .topbar .tb-icon-btn[data-tb="quick"] { display: none; }
}

/* 手机端首页快捷入口九宫格（2026-12-02 对标参考图） */
.dash-quick { display: none; }
@media (max-width: 768px) {
  .dash-quick { display: block; background: var(--card, #fff); border: 1px solid var(--border, #e8eaef); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
  .dash-quick-title { font-size: var(--fs-base); font-weight: 600; margin-bottom: 10px; }
  .dash-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 4px; }
  .dash-quick-grid button { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: none; color: var(--text, #333); font-size: var(--fs-xs); padding: 0; }
  .dash-quick-grid .dq-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--bg-subtle, #f7f8fa); display: flex; align-items: center; justify-content: center; color: var(--brand, #dc143c); }
  .dash-quick-grid .dq-ic svg { width: 18px; height: 18px; }
}

/* ========== 子账号管理：模块列限宽换行（2026-12-02） ==========
   根因：全局 .table-wrap .tbl{min-width:max-content} 让表格按内容最大宽度撑开，
   .acc-modcell 的 flex-wrap 永远不触发 → 标签横排把表撑出画面。
   这里对该表用固定布局 + 百分比列宽，标签在单元格内换行纵向堆叠。 */
.table-wrap[data-module="accounts"] { overflow-x: auto; }
.table-wrap[data-module="accounts"] .tbl {
  width: 100%; min-width: 0; table-layout: fixed;
}
/* 8 列：账号/姓名/角色/状态/可访问模块/敏感信息/创建时间/操作（2026-12-02 对标参考图） */
.table-wrap[data-module="accounts"] .tbl th:nth-child(1),
.table-wrap[data-module="accounts"] .tbl td:nth-child(1) { width: 12%; }
.table-wrap[data-module="accounts"] .tbl th:nth-child(2),
.table-wrap[data-module="accounts"] .tbl td:nth-child(2) { width: 8%; }
.table-wrap[data-module="accounts"] .tbl th:nth-child(3),
.table-wrap[data-module="accounts"] .tbl td:nth-child(3) { width: 9%; }
.table-wrap[data-module="accounts"] .tbl th:nth-child(4),
.table-wrap[data-module="accounts"] .tbl td:nth-child(4) { width: 8%; }
.table-wrap[data-module="accounts"] .tbl th:nth-child(5),
.table-wrap[data-module="accounts"] .tbl td:nth-child(5) { width: 28%; }
.table-wrap[data-module="accounts"] .tbl th:nth-child(6),
.table-wrap[data-module="accounts"] .tbl td:nth-child(6) { width: 9%; }
.table-wrap[data-module="accounts"] .tbl th:nth-child(7),
.table-wrap[data-module="accounts"] .tbl td:nth-child(7) { width: 14%; }
.table-wrap[data-module="accounts"] .tbl th:nth-child(8),
.table-wrap[data-module="accounts"] .tbl td:nth-child(8) { width: 12%; }
/* 单元格内标签纵向堆叠（仅子账号表）：每个模块一行，超长省略，不再横向撑开。
   作用域限定在 [data-module="accounts"]，不改动全局 .acc-modcell 口径。 */
/* 2026-12-02：模块标签从「纵向单列」改为**多列网格**（列宽够时自动 2-3 列），
   避免一列长蛇把行拉高；仍受单元格宽度约束，不会撑破表格。 */
.table-wrap[data-module="accounts"] .acc-modcell {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 3px 6px;
  align-items: center;
}
.table-wrap[data-module="accounts"] .acc-modcell > .chip {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: center;
}
.table-wrap[data-module="accounts"] .acc-modcell > .chip-more { grid-column: span 1; }

/* 子账号「全部模块」右侧抽屉（2026-12-02）：纵向单列 + 可写/只读标记 */
.acc-mod-pop { position: fixed; inset: 0; z-index: 120; background: rgba(10,10,10,.28); }
.acc-mod-pop-box {
  position: absolute; right: 0; top: 0; bottom: 0; width: 340px; max-width: 86vw;
  background: var(--card, #fff); border-left: 1px solid var(--border, #e8eaef);
  display: flex; flex-direction: column;
}
.acc-mod-pop-head {
  display: flex; align-items: center; gap: 8px; padding: 14px 16px;
  border-bottom: 1px solid var(--border, #eef0f4); font-size: var(--fs-base); font-weight: 600;
}
.acc-mod-pop-head > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-mod-pop-x {
  flex: none; width: 26px; height: 26px; border-radius: 6px; border: none;
  background: var(--bg-subtle, #f4f5f7); color: var(--text, #333);
  font-size: var(--fs-lg); line-height: 1; cursor: pointer;
}
.acc-mod-pop-body { flex: 1; overflow-y: auto; padding: 8px 10px 16px; }
.acc-mod-pop-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px; border-bottom: 1px solid var(--border, #f2f3f6); font-size: var(--fs-base);
}
.acc-mod-pop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-mod-pop-tag {
  flex: none; font-size: var(--fs-xs); padding: 1px 7px; border-radius: 4px;
  background: rgba(220,20,60,.1); color: var(--brand, #dc143c);
}
.acc-mod-pop-tag.readonly { background: var(--bg-subtle, #f4f5f7); color: var(--muted, #8a90a0); }

/* ========== 通知中心弹层（2026-12-02 重做：可关闭 + 可点击跳转） ========== */
.tb-notify-mask { position: fixed; inset: 0; z-index: 95; background: rgba(15, 18, 30, .28); }
/* 2026-12-02：通知中心也统一为右侧抽屉（与全站弹窗一致，高度用满、列表更长更好扫） */
.tb-notify-mask .tb-notify-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 380px; max-width: 92vw;
  max-height: 100vh; border-radius: 0; border: none; border-left: 1px solid var(--border, #e8eaef);
  box-shadow: -14px 0 48px rgba(0, 0, 0, .14);
  animation: xyDrawerIn .24s cubic-bezier(.22, .61, .36, 1) both;
}
.tb-notify-head { display: flex; align-items: center; gap: 8px; }
.tb-notify-head > span { flex: 1; min-width: 0; }
/* 通知中心「全部已读」（2026-12-06）：头部右侧文字按钮，与 × 同高 */
.tb-notify-allread {
  flex: none; height: 24px; padding: 0 8px; border-radius: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  font-size: var(--fs-2xs); font-family: inherit; cursor: pointer; white-space: nowrap;
}
.tb-notify-allread:hover { color: var(--brand); border-color: var(--brand); }
.tb-notify-allread:disabled { opacity: .6; cursor: default; }
.tb-notify-allread[hidden] { display: none; }
.tb-notify-x {
  flex: none; width: 24px; height: 24px; border-radius: 6px; border: none;
  background: var(--bg-subtle, #f4f5f7); color: var(--text-2, #555);
  font-size: var(--fs-lg); line-height: 1; cursor: pointer;
}
.tb-notify-x:hover { background: var(--brand-l, #fdeef0); color: var(--brand, #dc143c); }
.tb-notify-item { cursor: pointer; transition: background .12s; }
.tb-notify-item:hover { background: var(--bg-subtle, #f7f8fa); }
.tb-notify-item.unread:hover { background: var(--brand-l, #fdeef0); }


/* 授权项的控制菜单小字（2026-12-02）：让运营一眼看出勾了会开哪些后台菜单 */
.acc-check { align-items: flex-start; }
.acc-menu-hint { display: block; font-size: var(--fs-xs); color: var(--muted, #9aa0ab); font-style: normal; margin-top: 1px; line-height: 1.4; }

/* ========== 类目可见/隐藏滑动开关（2026-12-02） ========== */
.cat-switch { display: inline-flex; align-items: center; flex: none; margin-left: 6px; cursor: pointer; vertical-align: middle; }
.cat-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.cat-switch-track {
  display: block; width: 34px; height: 18px; border-radius: 9px;
  background: #cfd3da; transition: background .18s; position: relative;
}
.cat-switch-thumb {
  position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(31,41,55,.2); transition: transform .18s;
}
.cat-switch input:checked + .cat-switch-track { background: var(--brand, #dc143c); }
.cat-switch input:checked + .cat-switch-track .cat-switch-thumb { transform: translateX(16px); }
.cat-switch input:focus-visible + .cat-switch-track { outline: 2px solid var(--brand-l, #fdeef0); outline-offset: 1px; }
.cat-switch.is-locked { cursor: not-allowed; opacity: .45; }
.cat-cell-name.is-hidden { color: var(--muted, #9aa0ab); text-decoration: line-through; }

/* ========== 子账号页对标改造（2026-12-02） ========== */

/* 账号名称：主标识加粗，与参考图的「账号名称」列一致 */
.acc-name { font-weight: 500; color: var(--text, #1f2430); }

/* 账号状态：小圆点 + 文字（对标参考图的「已启用」绿点） */
.acc-state { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-sm); color: var(--ok, #22c55e); white-space: nowrap; }
.acc-state i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* 敏感信息：完整可见=品牌红，打码=灰 */
.acc-pii { font-size: var(--fs-sm); color: var(--muted, #8a90a0); white-space: nowrap; }
.acc-pii.on { color: var(--brand, #dc143c); }

.acc-time { font-size: var(--fs-sm); color: var(--muted, #8a90a0); white-space: nowrap; }

/* 操作列：竖排文字链（对标参考图，不用并列按钮） */
.acc-ops { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.acc-ops button {
  background: none; border: none; padding: 1px 0; cursor: pointer;
  font-size: var(--fs-sm); color: #1a56db; line-height: 1.55; text-align: left;
}
.acc-ops button:hover { color: var(--brand, #dc143c); text-decoration: underline; }
.acc-ops button.is-danger { color: var(--muted, #8a90a0); }
.acc-ops button.is-danger:hover { color: var(--brand, #dc143c); }

/* ========== 权限弹窗：左分类列 + 右多列网格（2026-12-02 重做） ==========
   原实现是「分组标题一行、胶囊一行」的一维堆叠 → 分组名和它管的东西被拉成两行，
   纵向空间完全没用上，横向却铺到溢出。现改为二维网格：
   左列固定 118px 放分类（父级复选框 + 计数），右列 auto-fill 多列排权限格子。 */
.acc-perm-tree { display: flex; flex-direction: column; }
.acc-perm-group {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border, #eceef3);
}
.acc-perm-group:last-child { border-bottom: none; }
.acc-perm-cat { display: flex; flex-direction: column; gap: 3px; padding-top: 3px; min-width: 0; }
.acc-perm-gcheck { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: var(--fs-base); font-weight: 500; color: var(--text, #1f2430); }
.acc-perm-gcheck input { width: 14px; height: 14px; accent-color: var(--brand, #dc143c); flex: none; }
.acc-perm-gcount { font-size: var(--fs-xs); color: var(--muted, #9aa0ab); font-variant-numeric: tabular-nums; font-style: normal; padding-left: 20px; }
.acc-perm-gcount.is-partial { color: var(--brand, #dc143c); }
.acc-perm-gbody {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: 6px;
  min-width: 0;
}
/* 权限格子：勾选框 + 名称，未选灰、已选品牌色淡底 */
.acc-perm-chip {
  display: flex; align-items: center; gap: 6px; cursor: pointer; min-width: 0;
  padding: 6px 9px; border-radius: 6px; font-size: var(--fs-sm); line-height: 1.45;
  border: 1px solid var(--border, #e6e9ef); background: #fff;
  color: var(--text-2, #4a5160); transition: border-color .12s, background .12s;
}
.acc-perm-chip:hover { border-color: var(--brand, #dc143c); color: var(--brand, #dc143c); }
.acc-perm-chip input { width: 13px; height: 13px; accent-color: var(--brand, #dc143c); flex: none; }
.acc-perm-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.acc-perm-chip:has(input:checked) {
  background: var(--brand-l, #fdeef0); border-color: var(--brand, #dc143c);
  color: var(--brand, #dc143c); font-weight: 500;
}
@media (max-width: 640px) {
  .acc-perm-group { grid-template-columns: 1fr; gap: 6px; }
  .acc-perm-gbody { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}

/* ==========================================================================
   全站弹窗改右侧抽屉（2026-12-02 用户拍板）
   背景：居中弹窗在字段多/详情长时「上下很局促、左右又空着」，改右侧抽屉后
   高度用满整屏、信息按列排布，扫描路径更短（对标抖店「修改权限」右侧面板）。
   实现：所有 .modal 默认走抽屉；仅确认框/图片灯箱/小图标弹窗保持居中。
   ========================================================================== */

/* —— 默认：右侧抽屉 —— */
.modal {
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  background: rgba(15, 18, 30, .38);
}
.modal .modal-box {
  width: 820px;
  max-width: 100%;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  box-shadow: -14px 0 48px rgba(0, 0, 0, .14);
  border-left: 1px solid var(--border, #e8eaef);
}
/* 抽屉滑入用 animation（hidden→open 同一帧，transition 不一定触发） */
.modal.open .modal-box { animation: xyDrawerIn .24s cubic-bezier(.22, .61, .36, 1) both; }
@keyframes xyDrawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* 抽屉内头部/底部贴边，正文吃满剩余高度 */
.modal .modal-head { padding: 16px 22px; flex-shrink: 0; }
.modal .modal-body { padding: 18px 22px 24px; }
.modal .modal-foot { padding: 12px 22px calc(12px + env(safe-area-inset-bottom)); flex-shrink: 0; border-top: 1px solid var(--border, #eef0f4); }

/* SKU 编辑器有档位矩阵，需要更宽 */
.modal.sku-editor .modal-box { width: 1080px; }

/* —— 例外：确认框 / 提示框 / 图片灯箱 / 小图标弹窗，保持居中且不铺满 —— */
.modal.dialog-modal,
.modal.lightbox,
.modal.cat-icon-modal {
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal.dialog-modal .modal-box,
.modal.lightbox .modal-box,
.modal.cat-icon-modal .modal-box {
  height: auto;
  max-height: 88vh;
  border-radius: 10px;
  border-left: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
}
.modal.dialog-modal.open .modal-box,
.modal.lightbox.open .modal-box,
.modal.cat-icon-modal.open .modal-box { animation: xyDialogIn .18s ease-out both; }
@keyframes xyDialogIn { from { opacity: 0; transform: translateY(6px) scale(.99); } to { opacity: 1; transform: none; } }

/* —— 移动端：抽屉全宽 —— */
@media (max-width: 768px) {
  .modal .modal-box,
  .modal.sku-editor .modal-box { width: 100%; max-width: 100%; }
  .modal .modal-head { padding: 12px 14px; }
  .modal .modal-body { padding: 14px; }
  .modal .modal-foot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
}

/* 类目开关：显式区分开/关底色（2026-12-02）
   排查发现「点开关后未选中态也显示粉色」的观感问题，这里用 :not(:checked) 显式压回灰底，
   避免任何同特异性规则在后面把 background 抢先设成品牌色。 */
.cat-switch input:not(:checked) + .cat-switch-track { background: #cfd3da; }
.cat-switch input:checked + .cat-switch-track { background: var(--brand, #dc143c); }
.cat-switch input:disabled + .cat-switch-track { background: #e2e5ea; }
.cat-switch input:checked:disabled + .cat-switch-track { background: #f0a8b4; }

/* ========== 右下角消息通知卡片（2026-12-02，对标电商后台新消息浮窗） ========== */
.tb-notify-card {
  position: fixed; right: 24px; bottom: 24px; z-index: 110;
  width: 340px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 12px;
  border: 1px solid var(--border, #e8eaef);
  box-shadow: 0 14px 44px rgba(15, 18, 30, .18);
  padding: 0; overflow: hidden;
  transform: translateY(16px); opacity: 0; pointer-events: none;
  transition: transform .22s cubic-bezier(.22,.61,.36,1), opacity .18s;
}
.tb-notify-card.show { transform: none; opacity: 1; pointer-events: auto; }
.tnc-head {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px 8px; font-size: var(--fs-base); font-weight: 500; color: var(--text, #1f2430);
}
.tnc-ico { display: inline-flex; color: var(--brand, #dc143c); }
.tnc-ico .ic { width: 15px; height: 15px; }
.tnc-title { flex: 1; min-width: 0; }
.tnc-close {
  flex: none; width: 22px; height: 22px; border: none; background: none;
  color: var(--muted, #9aa0ab); font-size: var(--fs-lg); line-height: 1; cursor: pointer; border-radius: 4px;
}
.tnc-close:hover { background: var(--bg-subtle, #f4f5f7); color: var(--text, #1f2430); }
.tnc-body { padding: 0 14px 10px; }
.tnc-tag {
  display: inline-block; font-size: var(--fs-xs); padding: 0 6px; border-radius: 3px;
  background: var(--brand-l, #fdeef0); color: var(--brand, #dc143c); margin-bottom: 5px;
}
.tnc-subject { font-size: var(--fs-base); color: var(--text, #1f2430); line-height: 1.5; }
.tnc-text {
  font-size: var(--fs-sm); color: var(--muted, #8a90a0); line-height: 1.6; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tnc-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  padding: 8px 14px 11px; border-top: 1px solid var(--border, #f0f1f4);
}
.tnc-btn {
  background: none; border: none; padding: 2px 0; cursor: pointer;
  font-size: var(--fs-sm); color: var(--muted, #8a90a0);
}
.tnc-btn:hover { color: var(--text, #1f2430); }
.tnc-btn.primary { color: var(--brand, #dc143c); font-weight: 500; }
.tnc-btn.primary:hover { text-decoration: underline; }
.tnc-pager {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  padding: 0 14px 9px; font-size: var(--fs-xs); color: var(--muted, #9aa0ab); font-variant-numeric: tabular-nums;
}
.tnc-pg {
  width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--border, #e6e9ef);
  background: #fff; color: var(--muted, #8a90a0); cursor: pointer; font-size: var(--fs-sm); line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.tnc-pg:hover:not(:disabled) { border-color: var(--brand, #dc143c); color: var(--brand, #dc143c); }
.tnc-pg:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 768px) {
  .tb-notify-card { right: 12px; left: 12px; bottom: 12px; width: auto; }
}

/* ========== 订单「用户信息」三行堆叠（2026-12-02） ==========
   层次：昵称+VIP / 用户ID / 渠道·消费·单数。原先 5 个信息点挤一行，靠「·」分隔扫读困难。 */
.order-page .ol-boss-line,
.order-tbl .ol-boss-line {
  display: flex; align-items: center; gap: 6px; line-height: 1.5; min-width: 0;
}
.order-page .ol-boss-line + .ol-boss-line,
.order-tbl .ol-boss-line + .ol-boss-line { margin-top: 2px; }
.order-page .ol-boss-line .ol-boss-name,
.order-tbl .ol-boss-line .ol-boss-name {
  font-size: var(--fs-base); font-weight: 500; color: var(--text); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-page .ol-boss-line .ol-boss-vip,
.order-tbl .ol-boss-line .ol-boss-vip { flex: none; font-size: var(--fs-xs); font-weight: 600; }
/* 用户编号：独立一行、等宽数字对齐，客服核对身份时一眼定位 */
.order-page .ol-boss-line .ol-boss-uid,
.order-tbl .ol-boss-line .ol-boss-uid {
  margin-left: 0; font-size: var(--fs-xs); font-weight: 600;
  color: var(--brand, #dc143c); font-variant-numeric: tabular-nums; letter-spacing: .2px;
}
.order-page .ol-boss-line .ol-boss-flag,
.order-tbl .ol-boss-line .ol-boss-flag {
  flex: none; font-size: var(--fs-2xs); line-height: 1.6; padding: 0 5px; border-radius: 3px;
  background: #fef3c7; color: #b45309; white-space: nowrap;
}
.order-page .ol-boss-meta,
.order-tbl .ol-boss-meta { font-size: var(--fs-xs); color: var(--muted, #8a90a0); }

/* ==========================================================================
   分页条固定在视口底部（2026-12-02 用户要求）
   「不管怎么滑它都锁定在下方，省得翻到最下面它才出现」。
   为什么不用 sticky：sticky bottom 只在元素已进入视口、即将滚出时才粘住；
   分页条位于列表末尾（初始在视口下方）时不会被拉进视口，这正是原实现的失效原因。
   用 fixed 后必须给滚动容器补底部内边距，否则最后一行数据会被分页条盖住。
   ========================================================================== */
.xy-pager {
  position: fixed;
  left: clamp(200px, 15vw, 220px);   /* 与侧栏 grid 列宽一致 */
  right: 0;
  bottom: 0;
  z-index: 30;
  margin: 0;
  padding: 9px 24px calc(9px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--border, #e8eaef);
  box-shadow: 0 -2px 10px rgba(31, 41, 55, .06);
}
/* 侧栏收起 / IM 独立站 / 移动端：分页条铺满 */
.app-wrap.nav-collapsed .xy-pager { left: 52px; }
.app-wrap.im-site .xy-pager { left: 0; }
/* 给滚动容器留出分页条高度，避免遮挡最后一行 */
.main { padding-bottom: 78px; }

@media (max-width: 860px) {
  .xy-pager { left: 0; }
}
@media (max-width: 768px) {
  .xy-pager { left: 0; right: 0; gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .xy-pager .xy-pg-info { margin-right: 0; width: 100%; }
  .main { padding-bottom: 104px; }
}

/* 客服 IM 没有分页条（.sc-host 用 calc(100vh - 170px) 精确撑满视口），
   不预留分页条的内边距，否则会多出一条无意义的滚动。 */
.app-wrap.im-site .main { padding-bottom: 20px; }

/* ==========================================================================
   订单筛选面板：宽度按内容自适应，不为对齐硬拉（2026-12-02 第二版）
   用户两轮反馈：
     第一轮「下单时间太短、订单状态太长」→ 我改成了固定 152/168px；
     第二轮「订单状态明明只有几个字，为什么要拉这么长去对齐？长的弥补短的就行，
              不需要全部对齐，观感很差」→ **固定宽度是错的方向，已撤回**。
   现口径：所有字段让内容决定宽度，长短自然错落；
   仅保留下限（避免极短值把框压碎）与下单时间的最小可用宽度。
   ========================================================================== */
.of-quick > .of-field.of-sel { flex: 0 0 auto; }              /* 下拉：按 label + 当前值宽度 */
.of-quick > .of-field.of-sel .cs-trigger { min-width: 86px; } /* 下限：再短也留出可点面积 */
/* 宽度全部交给 8 列网格（2026-12-02 第三版），此处不再写 flex/width，
   避免与 grid-column:span 互相干扰（flex 在 grid 容器里无效，残留只会误导后人）。 */

/* 筛选框内嵌下拉/日期：外层 .of-lock 已有边框，内部控件不必再留 12px 内边距，
   否则「只有几个字」的下拉会显得空荡、比内容宽一截（2026-12-02 用户观感反馈）。 */
.order-page .of-field.of-lock .cs-auto .cs-trigger { padding: 0 8px; }
.order-page .of-field.of-lock .cs-auto .cs-trigger .cs-label { padding-right: 2px; }
/* 日期区间：两个输入之间留一点呼吸，但不要撑高 */
.order-page .of-field.of-lock [data-daterange] .dr-trigger { padding: 0 6px; }

/* 收起态只保留 4 个常用筛选（.of-primary），让它们各占 2 格正好铺满 8 格整行，
   避免「4 个框 + 1 个空格」看起来零零散散（2026-12-02 用户观感反馈）。
   展开态订单状态恢复 1 格（短下拉），与其它短字段两两并排。 */

/* 筛选框字段名再压一档（2026-12-02 用户第 4 轮：短字段还是显长）。
   根因不是容器宽，而是**label 占位太宽**：「订单状态」4 字 @11px + 左右各 9px ≈ 62px，
   1 格只有 ~128px，label 就吃掉一半，看起来框很长却没多少可用输入区。
   压到 10.5px / padding 0 6px / min-width 46px 后，1 格能留出 ~72px 给实际内容。 */
.order-page .of-field.of-lock .of-label {
  font-size: var(--fs-2xs); padding: 0 6px; min-width: 46px; letter-spacing: 0;
}
/* 短字段里的下拉：再去掉一层内边距，让「全部状态」贴着 label 显示 */
.order-page .of-field.of-lock .cs-auto .cs-trigger { padding: 0 6px; gap: 4px; }
.order-page .of-field.of-lock .cs-auto .cs-trigger .cs-arrow { margin-left: 0; }

/* ==========================================================================
   筛选框「框里套框」修复（2026-12-02 第 5 轮，用户附实拍图指出）
   现象：.of-lock 是带边框的外框，但内部 **.cs-trigger / .dr-trigger 自己也带 border**
         → 大框里装个小框；下拉打开时 .cs-host.open .cs-trigger 还会再加一层品牌色描边，
           实拍图里那个红框就是它。
   对齐参考图：抖店筛选是**单层完整框**，字段名在框内左侧，下拉面板直接浮出。
   ========================================================================== */
.order-page .of-field.of-lock .cs-auto .cs-trigger,
.order-page .of-field.of-lock .cs-host.open .cs-trigger {
  border: none; box-shadow: none; border-radius: 0;
  background: transparent; height: 100%; width: 100%;
}
.order-page .of-field.of-lock .cs-auto .cs-trigger:hover { border: none; }
.order-page .of-field.of-lock [data-daterange] .dr-trigger {
  border: none; box-shadow: none; border-radius: 0;
  background: transparent; height: 100%; width: 100%;
}
/* 焦点态只留外框（.of-lock:focus-within 已有品牌色描边），内层不再重复提示 */
.order-page .of-field.of-lock .cs-auto .cs-trigger:focus,
.order-page .of-field.of-lock .cs-auto .cs-trigger:focus-visible { outline: none; }

/* 字段名去掉灰底色块，改为「灰字 + 无分割线」，让整个框在视觉上是**一个完整的框**
   （对标用户实拍的抖店筛选：整体白框、左侧灰字标签、右侧值，不像两段拼起来）。
   仍然保留 user-select:none 与灰字，语义上依旧是「锁定前缀」不可编辑。 */
.order-page .of-field.of-lock .of-label {
  background: transparent; border-right: none;
  color: var(--muted, #8a90a0); border-radius: 0;
  padding: 0 2px 0 10px; min-width: 0;
}
/* 值与字段名之间的自然间距 */
.order-page .of-field.of-lock input { padding: 0 8px 0 6px; }
.order-page .of-field.of-lock .cs-auto .cs-trigger { padding-left: 6px; }

/* ==========================================================================
   筛选框内日期控件对齐 + 字号统一（2026-12-02 第 6 轮）
   用户反馈：「开始日期和结束日期都飘到天上去了」「占位符字体都不一样」。
   ① 飘起来的根因：`.dr-root` 没有设定高度（width:100% 而已），
      所以 `.dr-trigger{height:100%}` 的百分比高度**无参照而失效**，退回自带的 36px，
      而 .of-lock 内容区只有 34px（36 − 上下 1px 边框）→ 竖向溢出/错位。
      修法：给 .dr-root 也补 height:100%，并显式 align-items:center。
   ② 字号：筛选框内此前 label 10.5px、input 11px、下拉值 14px、日期 13px 四套并存，
      现统一走 --fs-sm（输入值与控件）/ --fs-xs（字段名前缀）。
   ========================================================================== */
.order-page .of-field.of-lock [data-daterange],
.order-page .of-field.of-lock [data-daterange] .dr-root {
  height: 100%; min-height: 0; display: flex; align-items: stretch;
}
.order-page .of-field.of-lock [data-daterange] .dr-trigger {
  height: 100%; min-height: 0; max-height: 100%;
  padding: 0 8px; align-items: center; line-height: 1;
  font-size: var(--fs-sm);
}
.order-page .of-field.of-lock [data-daterange] .dr-seg {
  font-size: var(--fs-sm); min-width: 0; flex: 1 1 0;
  text-align: center; line-height: 1.2;
}
.order-page .of-field.of-lock [data-daterange] .dr-sep { font-size: var(--fs-sm); }
/* 筛选框内统一字号：字段名 = xs，值与控件 = sm */
.order-page .of-field.of-lock .of-label { font-size: var(--fs-xs); }
.order-page .of-field.of-lock input { font-size: var(--fs-sm); }
.order-page .of-field.of-lock .cs-auto .cs-trigger { font-size: var(--fs-sm); }
.order-page .of-field.of-lock .cs-auto .cs-label { font-size: var(--fs-sm); }

/* ==========================================================================
   响应式格局 + 信息完整展现（2026-12-02）
   用户要求：①「排版、格局也根据不同分辨率自适应」；②「尽可能完全展现所有信息，
   除非拉得很长」；③「拉得很长的可以堆叠 —— 同属一个属性下的信息堆起来，不只挤一条」。
   统一断点：1440（大屏）/ 1200（常规）/ 992（小屏）/ 860（侧栏抽屉）/ 768（平板）/ 640 / 560（手机）
   ========================================================================== */

/* —— 原则一：单元格允许换行。信息优先完整，不因列窄而砍字 —— */
.tbl td, .tbl th { white-space: normal; word-break: break-word; }

/* —— 原则二：同属性信息纵向堆叠，行数上限放宽（原来 2 行，长标题被砍） —— */
.order-tbl .ol-gi-title { -webkit-line-clamp: 3; }
.order-tbl .ol-boss-name { white-space: normal; word-break: break-word; }
.order-tbl .ol-boss-line { flex-wrap: wrap; }   /* 昵称 + VIP 空间不足时换行，不压缩 */

/* —— 大屏：空间富余时放宽内距，信息更舒展 —— */
@media (min-width: 1440px) {
  .order-tbl th, .order-tbl td { padding-left: 16px; padding-right: 16px; }
  .order-page .view-head h3 { font-size: var(--fs-xl); }
}

/* —— 常规屏：略收内距，但**不压缩内容** —— */
@media (max-width: 1200px) {
  .order-tbl th, .order-tbl td { padding-left: 10px; padding-right: 10px; }
}

/* —— 小屏（≤992）：给出保底表宽 + 横向滚动，
   宁可横滑也不要每列被压成一条竖缝（那样反而读不完信息） —— */
@media (max-width: 992px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .order-tbl { min-width: 940px; }
  .table-wrap[data-module="service_live"] .tbl,
  .table-wrap[data-module="companion_earnings"] .tbl { min-width: 1000px; }
}

/* —— 平板（≤768）：保留横滑；卡片模式下信息全部展开（不再 clamp） —— */
@media (max-width: 768px) {
  .order-page .ol-card .ol-gi-title { -webkit-line-clamp: unset; display: block; overflow: visible; }
  .order-page .ol-card .ol-boss-line { flex-wrap: wrap; }
  /* 卡片内同属性信息改为「标签 : 值」两列网格，纵向堆叠更整齐 */
  .order-page .ol-card .ol-card-boss { display: block; }
}

/* —— 手机（≤560）：表单/筛选默认全宽单列，避免两个极窄控件并排 —— */
@media (max-width: 560px) {
  .of-quick { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .of-quick > .of-field, .of-quick > .of-date { grid-column: span 2 !important; }
  .order-page .of-field.of-lock .of-label { min-width: 0; }
}

/* 居中后的 toast 稍微加宽、文字居中，视觉上更像「提示条」而不是角落小字 */
.toast { max-width: min(520px, 86vw); justify-content: center; text-align: center; padding: 11px 18px; }

/* ==========================================================================
   建单方式切换条（2026-12-02 合并「手工建单」与「代客下单」）
   两个入口本质是同一次建单、只是收款方式不同 → 合并为一个弹窗内的二选一。
   样式取向：两张并排的「说明卡」，选中态品牌色边框 + 淡底 + 打勾，
   让客服一眼看懂差别，而不是两个抽象的 radio 圆点。
   ========================================================================== */
.of-mode-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin: 4px 0 16px;
  padding: 12px;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.of-mode-label {
  grid-column: 1 / -1;
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: 2px;
}
.of-mode-opt {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border); background: #fff;
  transition: border-color .15s, background .15s;
}
.of-mode-opt:hover { border-color: #f3c2c2; }
.of-mode-opt.on { border-color: var(--brand); background: var(--brand-l); }
/* 选中指示器：不再用原生 radio（点一次切不过去），改成自绘圆点 + 对勾 */
.of-mode-tick {
  width: 15px; height: 15px; margin-top: 2px; flex: none;
  border: 1.5px solid #c9ced8; border-radius: 50%; background: #fff;
  position: relative; transition: border-color .15s, background .15s;
}
.of-mode-opt:hover .of-mode-tick { border-color: #f0a9b4; }
.of-mode-opt.on .of-mode-tick { border-color: var(--brand); background: var(--brand); }
.of-mode-opt.on .of-mode-tick::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px; border: solid #fff; border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}
.of-mode-opt:focus-visible { outline: 2px solid rgba(220,20,60,.35); outline-offset: 2px; }
.of-mode-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.of-mode-txt b { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.of-mode-opt.on .of-mode-txt b { color: var(--brand); }
.of-mode-txt em {
  font-size: var(--fs-2xs); color: var(--muted); font-style: normal; line-height: 1.5;
}
@media (max-width: 768px) {
  .of-mode-bar { grid-template-columns: 1fr; padding: 10px; }
}

/* ==========================================================================
   表单控件统一层（2026-12-02 用户要求：「所有下拉框 UI、选日期 UI 统一一下，
   有的很精致有的很粗糙；字体和占位符也不统一，自查全部」）
   —— 自查发现的三类不统一：
     1) `.dp-input` 被用 10 处却**从未定义样式** ⇒ 裸浏览器外观（最粗糙的那批）；
     2) placeholder 颜色三套并存（#b0b5bc / var(--muted) / 浏览器默认）；
     3) 原生 <select> 保留浏览器默认箭头与内距，和自定义下拉(精致那批)观感割裂；
        另 .toolbar .search 高 34px、.cs-trigger / .of-field input 高 36px，同屏不同高。
   这里用一组变量把「高/圆角/内距/占位色/边框」收敛为唯一来源。
   ========================================================================== */
:root {
  --ctl-h: 36px;          /* 所有单行控件统一高度 */
  --ctl-radius: 6px;      /* 圆角 */
  --ctl-pad-x: 11px;      /* 左右内距 */
  --ctl-bg: #fff;
  --ctl-ph: #a9aeb9;      /* placeholder 统一色（此前三套） */
  --ctl-arrow: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.75L6 8.25l3.5-3.5' stroke='%238a90a0' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* —— ① 全局 placeholder 统一（含 input / textarea / 自定义控件的输入态）—— */
input::placeholder,
textarea::placeholder { color: var(--ctl-ph); opacity: 1; }
/* Firefox 会额外降透明度，统一压回 1 */
input::-moz-placeholder,
textarea::-moz-placeholder { color: var(--ctl-ph); opacity: 1; }

/* —— ② 原生 <select> 统一为与自定义下拉一致的外观（自绘箭头、等高、同内距）—— */
select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  height: var(--ctl-h);
  padding: 0 30px 0 var(--ctl-pad-x);
  border: 1px solid var(--border);
  border-radius: var(--ctl-radius);
  background-color: var(--ctl-bg);
  background-image: var(--ctl-arrow);
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 12px 12px;
  font-size: var(--fs-sm);
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
select:hover { border-color: #d5d8e2; }
select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.08); }
select:disabled { background-color: #f6f7f9; color: var(--muted); cursor: not-allowed; }
/* 多选/列表型 select 保持原生渲染（自绘箭头会误导） */
select[multiple], select[size] { appearance: auto; -webkit-appearance: auto; background-image: none; height: auto; padding-right: var(--ctl-pad-x); }

/* —— ③ `.dp-input`（被用 10 处却没样式）补齐，与 .of-field input 完全对齐 —— */
.dp-input,
input.dp-input,
select.dp-input {
  width: 100%;
  height: var(--ctl-h);
  padding: 0 var(--ctl-pad-x);
  border: 1px solid var(--border);
  border-radius: var(--ctl-radius);
  background-color: var(--ctl-bg);
  color: var(--text);
  font-size: var(--fs-sm);
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
select.dp-input { padding-right: 30px; background-image: var(--ctl-arrow); background-repeat: no-repeat; background-position: right 9px center; background-size: 12px 12px; }
.dp-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,20,60,.08); }

/* —— ④ 同屏控件等高：把此前 34px 的搜索框并入 36px 档 —— */
.toolbar .search { height: var(--ctl-h); }
.of-field .cs-auto { min-height: var(--ctl-h); }
.cs-trigger { height: var(--ctl-h); border-radius: var(--ctl-radius); }
.dr-trigger { height: var(--ctl-h); border-radius: var(--ctl-radius); }

/* 控件字号收口（2026-12-02）：以下三处此前分别是 sm / md / base，现全部对齐 --fs-base，
   保证「输入框里的字 = 下拉里的字 = 下拉选项里的字」在视觉上完全一致。 */
.dp-input,
input.dp-input,
select.dp-input { font-size: var(--fs-base); }
.dp-field input, .dp-field textarea, .dp-field select { font-size: var(--fs-base); }
.cs-panel .cs-opt { font-size: var(--fs-base); }
.cs-trigger .cs-label { font-size: var(--fs-base); }
/* 日期控件内部（触发态与面板内日号）同步 */
.dr-trigger, .dr-seg, .dr-sep { font-size: var(--fs-base); }

/* ==========================================================================
   兜底：所有单行文本类输入框统一高度 / 圆角 / 字号（2026-12-02）
   为什么需要兜底：全站此前有 30/32/34/38px 四种控件高度并存（styles.css 各 10/19/3/8 处），
   逐个改规则风险大且容易漏；这里用**属性选择器兜底**一次覆盖所有单行输入，
   仅作用于单行 type（不碰 textarea 多行、checkbox/radio/file 等），
   已有更高优先级的定制（如 .of-lock 内去边框、表格内紧凑控件）不受影响。
   ========================================================================== */
input[type="text"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="url"] {
  height: var(--ctl-h);
  border-radius: var(--ctl-radius);
  font-size: var(--fs-base);
  box-sizing: border-box;
}
/* 多行文本框只统一圆角/字号，不锁高度 */
textarea {
  border-radius: var(--ctl-radius);
  font-size: var(--fs-base);
}

/* ==========================================================================
   日期 / 日期时间输入框统一（2026-12-02 用户反馈「预约时间这个框还是很突兀」）
   突兀的三个来源：
     1) 浏览器原生 calendar-picker 图标是深黑实心，和整体细线图标风格不搭；
     2) 原生控件默认不给 padding-right，图标会压在文字上或把框撑宽；
     3) 空值时会显示「年/月/日 --:--」占位，颜色与真正的 placeholder 不一致。
   处理：统一高度/内距/字距，图标降透明度并右对齐留位，空值文字用占位色。
   ========================================================================== */
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"] {
  height: var(--ctl-h);
  padding: 0 8px 0 var(--ctl-pad-x);
  border: 1px solid var(--border);
  border-radius: var(--ctl-radius);
  background: var(--ctl-bg);
  color: var(--text);
  font-size: var(--fs-base);
  font-variant-numeric: tabular-nums;   /* 数字等宽，切换时间不跳动 */
  cursor: pointer;
  box-sizing: border-box;
}
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
input[type="month"]:focus,
input[type="week"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(220,20,60,.08);
  outline: none;
}
/* 图标：压成浅灰、hover 才变品牌色，与全站细线图标一致 */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .38;
  transition: opacity .15s;
  margin-left: 4px;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover { opacity: .85; }
/* 空值（浏览器渲染的 年/月/日 --:--）用占位色，视觉上等同 placeholder */
input[type="date"]:not(:focus):not(:valid),
input[type="datetime-local"]:not(:focus):not(:valid),
input[type="time"]:not(:focus):not(:valid) { color: var(--ctl-ph); }
/* Firefox 的日期段分段器同步 */
input[type="date"]::-moz-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-moz-datetime-edit-fields-wrapper { color: inherit; }

/* ---------- 外援管理模块（2026-12-04） ---------- */
.spa-head { padding: 4px 0 12px; }
.spa-title { display: flex; align-items: center; gap: 8px; font-size: var(--fs-lg); font-weight: 700; color: var(--text); margin: 0; }
.spa-sub { margin: 6px 0 0; font-size: var(--fs-sm); line-height: 1.7; }
.spa-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.spa-tab { position: relative; padding: 9px 14px; border: 0; background: none; font-size: var(--fs-md); color: var(--text-2); font-family: inherit; cursor: pointer; }
.spa-tab.on { color: var(--text); font-weight: 600; }
.spa-tab.on::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--primary-grad); border-radius: 2px; }
.spa-body { min-height: 160px; }
.spa-tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
/* 2026-12-06 外派管理表格对齐订单管理：表头/行 hover/勾选列 */
.spa-tbl th { background: #f7f8fa; color: var(--text-2); font-weight: 500; font-size: var(--fs-xs); white-space: nowrap; }
.spa-tbl tbody tr:hover td { background: #fafbfc; }
.spa-tbl td[data-key="orderInfo"], .spa-tbl td:first-child { white-space: nowrap; }
.spa-tbl .ol-head-check, .spa-tbl .ol-row-check { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.spa-filter-panel { margin-bottom: 12px; }
.spa-filter-grid.of-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.spa-filter-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.spa-bulkbar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 10px; border-radius: 8px; background: var(--brand-l, #fef2f4); border: 1px solid var(--brand, #dc143c); }
.spa-bulkbar[hidden] { display: none; }
.spa-bulkbar .ol-bulk-sel { font-size: var(--fs-sm); color: var(--brand); font-weight: 600; }
.spa-bulkbar .ol-bulk-btn { height: 28px; padding: 0 12px; border: 1px solid var(--brand); border-radius: 6px; background: #fff; color: var(--brand); font-size: var(--fs-xs); font-family: inherit; cursor: pointer; }
.spa-bulkbar .ol-bulk-btn:hover { background: var(--brand); color: #fff; }
.spa-tbl th { padding: 10px 12px; text-align: left; font-size: var(--fs-xs); font-weight: 500; color: var(--text-3); background: #f7f8fa; white-space: nowrap; }
.spa-tbl td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.spa-strong { font-weight: 600; color: var(--text); }
.spa-mini { font-size: var(--fs-xs); line-height: 1.6; }
.spa-price { color: var(--brand); font-variant-numeric: tabular-nums; }
.spa-score { font-size: var(--fs-lg); color: #2f7a3a; font-variant-numeric: tabular-nums; }
.spa-score.low { color: var(--brand); }
.spa-ops { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* 外援管理 2.0（2026-12-04 改版）：统计卡 / 工具条 / 明细卡 */
.spa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.spa-stat { padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--border); cursor: pointer; }
.spa-stat[data-goto]:hover { border-color: var(--primary); }
.spa-stat-val { font-size: var(--fs-lg); font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.spa-stat-label { margin-top: 4px; font-size: var(--fs-xs); color: var(--text-3); }
.spa-stat.ok .spa-stat-val { color: #2f7a3a; }
.spa-stat.warn .spa-stat-val { color: #B45309; }
.spa-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.spa-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spa-input { height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: var(--fs-sm); font-family: inherit; color: var(--text); min-width: 120px; }
.spa-input:focus { outline: none; border-color: var(--primary); }
.spa-badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: var(--fs-2xs); font-style: normal; line-height: 16px; }
.spa-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: var(--fs-xs); background: #f2f3f5; color: var(--text-2); white-space: nowrap; }
.spa-chip.b-claimed { background: #fff7e6; color: #B45309; }
.spa-chip.b-serving { background: #eef7ee; color: #2f7a3a; }
.spa-chip.b-done { background: #eef2ff; color: #3b4bb8; }
.spa-chip.b-invalid { background: #f5f5f6; color: #9aa0aa; }
.spa-warn { color: #B45309; }
.spa-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.spa-detail-card { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fafbfc; }
.spa-detail-title { display: flex; align-items: center; gap: 8px; font-size: var(--fs-md); font-weight: 700; color: var(--text); margin-bottom: 8px; }
.spa-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: var(--fs-sm); color: var(--text-2); }
.spa-kv b { color: var(--text); font-weight: 600; }
.spa-field-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spa-field-inline .spa-input { flex: 1; min-width: 160px; }

/* 外援管理 3.0（分区标签 + 云端真分页）：仅 .spa-* 作用域 */
.spa-chip.b-open { background: #f2f3f5; color: var(--text-2); }
.spa-chip.b-settle_pending { background: #fff7e6; color: #B45309; }
.spa-chip.b-settle_ready { background: #eef7ee; color: #2f7a3a; }
.spa-chip.b-abnormal { background: #fdeeee; color: var(--brand); }
.spa-ok { color: #2f7a3a; }
.spa-link { color: var(--primary); text-decoration: none; border-bottom: 1px solid currentColor; }
.spa-link:hover { color: var(--brand); }
.spa-tip { margin: 10px 0 0; }
.spa-pager-slot { margin-top: 12px; }
.spa-stat:not([data-goto]) { cursor: default; }
/* 宽表只在模块内的 .table-wrap 横滚，不撑破整页 */
.spa-body .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.spa-body .spa-tbl { min-width: 960px; }
.spa-detail-card .spa-tbl { min-width: 620px; }
@media (max-width: 768px) {
  .spa-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .spa-tabs { gap: 2px; }
  .spa-tab { padding: 8px 9px; font-size: var(--fs-sm); }
  .spa-badge { margin-left: 4px; padding: 0 4px; }
  .spa-filters { width: 100%; }
  .spa-filters .spa-input { min-width: 0; flex: 1 1 140px; width: 100%; }
  .spa-field-inline .spa-input { min-width: 0; }
  .spa-pager-slot .xy-pager { justify-content: flex-start; }
}


/* 后台订单详情陪玩信息卡片（2026-12-06） */
.ol-comp-card{display:flex;align-items:center;gap:10px;padding:9px 11px;margin-bottom:8px;border:1px solid var(--line);border-radius:8px;background:#fff;}
.olc-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;flex:none;background:#f2f3f6;}
.olc-fallback{display:flex;align-items:center;justify-content:center;color:#fff;font-weight:600;background:var(--brand);}
.olc-info{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;font-size:var(--fs-base);}
.olc-info em{font-size:var(--fs-xs);color:var(--text-2);font-style:normal;}

@media (max-width: 992px) { .spa-filter-grid.of-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .spa-filter-grid.of-quick { grid-template-columns: 1fr; } }
