/* =========================================================
   商衢同传 · 管理后台
   配色跟手机端同一套：中性灰底 #F2F2F2、纯白卡片、纯黑文字，
   红色 #E60012 只出现在「需要人动手」和 LOGO 那一点上。
   不用彩色底、不用渐变，层次靠留白、细线和字重区分。
   ========================================================= */

:root {
  --ink: #000;
  --ink-2: #2a2a2a;
  --muted: #767676;
  --muted-2: #9a9a9a;
  --line: #e6e6e6;
  --line-2: #f0f0f0;
  --bg: #f2f2f2;
  --card: #fff;
  --soft: #f5f5f5;
  --hover: #fafafa;
  --accent: #e60012;
  --accent-deep: #b8000f;
  --ok: #1a1a1a;
  --ok-bg: #f0f0f0;
  --warn: #b8000f;
  --warn-bg: #fceceb;
  --info: #1a1a1a;
  --info-bg: #fff;
  --live: #fff;
  --live-bg: #111;
  --danger: #b8000f;
  --danger-bg: #fceceb;
  --r: 14px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 13.5px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0 0 10px; }
pre, code, .mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }
table { border-collapse: collapse; width: 100%; }
button { font: inherit; cursor: pointer; }
svg { display: block; }

/* ---------------- 布局 ---------------- */
.app { display: flex; min-height: 100vh; }

.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: 218px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--line);
  z-index: 20;
}

/* 左上角品牌：机构 LOGO（黑字 + 红点）。换图同名覆盖 assets/logo-bhdt.png 即可 */
.brand { padding: 22px 16px 16px; }
.brand-link { display: block; max-width: 100%; line-height: 0; }
.brand-logo { display: block; height: 34px; width: auto; max-width: 100%; }
.brand-sub { display: block; margin-top: 12px; font-size: 11.5px; letter-spacing: .2em; color: var(--muted-2); }

.nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(27, 26, 23, .12); border-radius: 3px; }

.nav-group { margin-top: 18px; }
.nav-label { padding: 0 10px 6px; font-size: 11px; letter-spacing: .06em; color: var(--muted); }

.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; margin-bottom: 2px;
  border-radius: 999px;
  font-size: 13px; color: #3d3d3d;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: #f5f5f5; color: var(--ink); }
.nav-item.is-active { background: var(--ink); color: #fff; font-weight: 600; }
.nav-item .count {
  margin-left: auto; font-size: 11px; color: var(--muted-2);
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.nav-item.is-active .count { color: rgba(255, 255, 255, .62); }

.side-foot { padding: 12px 12px 14px; border-top: 1px solid var(--line); }
.side-user { display: flex; align-items: center; gap: 9px; padding: 4px 6px; border-radius: 6px; }
.side-user:hover { background: #f5f5f5; }
.side-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--ink); flex: none;
  display: grid; place-items: center; color: #fff; font-size: 11.5px; font-weight: 600;
}
.side-user-txt { display: grid; min-width: 0; }
.side-user-name { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.side-user-role { font-size: 11px; color: var(--muted-2); line-height: 1.4; }
.side-foot-bar {
  display: flex; align-items: center; gap: 12px;
  margin-top: 10px; padding: 0 6px; font-size: 12px; color: var(--muted);
}
.side-foot-bar form { margin: 0; }
.side-foot-bar a:hover, .side-foot-bar .link-btn:hover { color: var(--ink); }
.link-btn {
  padding: 0; border: 0; background: transparent;
  font-size: 12px; color: var(--muted);
}

.main { flex: 1; min-width: 0; margin-left: 218px; display: flex; flex-direction: column; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  height: 54px; padding: 0 26px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.crumb .sep { color: #c8c8c8; }
.crumb strong { color: var(--ink-2); font-weight: 600; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); }
.top-pending { font-variant-numeric: tabular-nums; }
.top-pending b { font-weight: 600; color: var(--ink); }
.top-pending:hover b { color: var(--accent); }
.top-date { font-variant-numeric: tabular-nums; color: var(--muted-2); }

/* 「查看小程序」：顶栏常驻入口，后台任意页面都能掏出小程序码 */
.qr-pop { position: relative; flex: none; }
.qr-pop-btn { height: 28px; padding: 0 11px 0 10px; font-size: 12px; gap: 6px; }
.qr-glyph { width: 13px; height: 13px; flex: none; }
.qr-pop-btn .qr-caret { width: 9px; height: 6px; color: var(--muted); transition: transform .15s; }
.qr-pop-btn[aria-expanded="true"] { background: #f5f5f5; border-color: #cfcfcf; color: var(--ink); }
.qr-pop-btn[aria-expanded="true"] .qr-caret { transform: rotate(180deg); }
.qr-pop-panel {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 90;
  width: 232px; padding: 14px 14px 13px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .13), 0 2px 6px rgba(0, 0, 0, .04);
  animation: qrIn .14s ease-out;
}
.qr-pop-panel[hidden] { display: none; }
.qr-pop-img { width: 188px; height: 188px; display: block; margin: 0 auto 10px; border-radius: 4px; }
.qr-pop-title { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.qr-pop-hint { margin-top: 3px; font-size: 11px; color: var(--muted); line-height: 1.5; }
@keyframes qrIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

/* 二级页签：同一件事的几个面，横向切换 */
.subnav {
  display: flex; gap: 20px; padding: 0 26px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.subnav a {
  padding: 10px 0 9px; margin-bottom: -1px;
  font-size: 12.5px; color: var(--muted);
  border-bottom: 2px solid transparent;
}
.subnav a:hover { color: var(--ink); }
.subnav a.is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.subnav .n { margin-left: 5px; font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* 订单子栏目：两块并排的大方块，白底常态 / 黑底悬停或选中 */
.type-tiles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 14px;
  background: var(--card);
  border: 1px solid var(--ink); border-radius: var(--r-sm);
  overflow: hidden;
}
.type-tile {
  display: flex; flex-direction: column; gap: 3px;
  padding: 13px 20px 15px;
  background: var(--card); color: var(--ink);
  transition: background-color .16s ease, color .16s ease;
}
.type-tile + .type-tile { border-left: 1px solid var(--ink); }
.type-tile-name { font-size: 19px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.type-tile-num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.type-tile:hover, .type-tile:focus-visible, .type-tile.is-active { background: var(--ink); color: #fff; }
.type-tile:hover .type-tile-num, .type-tile:focus-visible .type-tile-num,
.type-tile.is-active .type-tile-num { color: rgba(255, 255, 255, .68); }
.type-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* 鼠标在整块区域里移动时，只让指针下的那一块变黑，选中的那块先退回白底，避免两块同时黑 */
.type-tiles:hover .type-tile.is-active:not(:hover) { background: var(--card); color: var(--ink); }
.type-tiles:hover .type-tile.is-active:not(:hover) .type-tile-num { color: var(--muted); }

.page { padding: 24px 26px 48px; max-width: 1380px; width: 100%; }

/* ---------------- 页头 ---------------- */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.page-head > div:first-child { flex: 1; min-width: 0; }
.page-head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-top: 2px; flex: none; }
.page-title { font-size: 20px; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
.page-desc { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.page-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; padding-top: 1px; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }
.card-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--line-2);
}
.card-title { font-size: 13.5px; font-weight: 600; }
.card-desc { font-size: 11.5px; color: var(--muted-2); }
.card-head .spacer { margin-left: auto; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

/* ---------------- 数字条 ----------------
   一组相关数字共用一张卡，靠竖线分开，比一排各自带框的小卡片安静一些 */
.statbar {
  display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden;
}
.statbar .cell { padding: 13px 18px 14px; border-right: 1px solid var(--line-2); }
.statbar .cell:last-child { border-right: 0; }
.statbar .k { font-size: 12px; color: var(--muted); }
.statbar .v { margin-top: 2px; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; }
.statbar .v small { margin-left: 3px; font-size: 12px; font-weight: 500; color: var(--muted); }
.statbar .f { font-size: 11.5px; color: var(--muted-2); }
.statbar .f b { color: var(--ink-2); font-weight: 600; }

/* ---------------- 表格 ---------------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { font-size: 12.5px; }
.table th {
  text-align: left; font-weight: 600; font-size: 11.5px;
  color: var(--muted);
  padding: 9px 14px; background: transparent; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover td { background: var(--hover); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { font-variant-numeric: tabular-nums; }
.table .right { text-align: right; }
.table .nowrap { white-space: nowrap; }
.table .muted { color: var(--muted); }
.table .strong { font-weight: 600; }
.table a.strong:hover { text-decoration: underline; }
.table tr.is-clickable { cursor: pointer; }

/* ---------------- 会员单元格 ---------------- */
.person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 12.5px; font-weight: 600;
}
.person-name { font-weight: 600; line-height: 1.35; }
.person-meta { font-size: 11.5px; color: var(--muted); line-height: 1.35; }

/* ---------------- 徽标 ---------------- */
.row-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.row-acts form { display: inline-flex; margin: 0; }
.row-acts .btn-sm { padding: 3px 8px; font-size: 11.5px; }

/* 徽标只走「黑白灰 + 一个红点」：黑=正在进行／身份，浅灰=正常，描边=待确认，
   红=要人动手（待服务、待安排、缺配置），极浅灰=已结束不再管 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
  background: #f2f2f2; color: #3d3d3d;
}
.badge.is-ok { background: #f0f0f0; color: #1a1a1a; }
.badge.is-warn { background: var(--warn-bg); color: var(--warn); }
.badge.is-warn::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; flex: none;
}
.badge.is-info { background: #fff; color: #111; box-shadow: inset 0 0 0 1px #111; }
.badge.is-live { background: #111; color: #fff; }
.badge.is-ink { background: #111; color: #fff; }
.badge.is-mute { background: #f7f7f7; color: #a0a0a0; }
.badge.is-line { background: #fff; color: #3d3d3d; box-shadow: inset 0 0 0 1px #dcdcdc; }
.badge.is-sim { background: #fff; color: #111; box-shadow: inset 0 0 0 1px #d2d2d2; }
.badge.is-escort { background: #f2f2f2; color: #3d3d3d; }
.badge.is-manual { background: #fff; color: #111; box-shadow: inset 0 0 0 1px #111; border-radius: 4px; }
.badge.is-en { background: #eef4ff; color: #1d4ed8; box-shadow: inset 0 0 0 1px #bcd0f7; border-radius: 4px; font-weight: 700; font-size: 11px; letter-spacing: .04em; }
.badge.is-danger { background: var(--danger-bg); color: var(--danger); }
.dot-badge { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  border: 1px solid #e0e0e0; background: var(--card); color: var(--ink-2);
  font-size: 12.5px; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: #f5f5f5; border-color: #cfcfcf; color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.btn-danger { color: var(--danger); border-color: #e8e8e8; background: var(--card); }
.btn-danger:hover { background: var(--danger-bg); border-color: #e8c9c6; color: var(--danger); }
.btn-sm { height: 27px; padding: 0 11px; font-size: 12px; }
.btn-icon { width: 27px; height: 27px; padding: 0; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------- 筛选栏 ---------------- */
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 9px;
  padding: 13px 16px; border-bottom: 1px solid var(--line-2); background: var(--card);
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label, .field > span:first-child { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  height: 31px; padding: 0 9px;
  border: 1px solid #dcdcdc; border-radius: var(--r-sm);
  background: #fff; color: var(--ink); font-size: 12.5px; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.textarea { height: auto; min-height: 74px; padding: 8px 9px; line-height: 1.65; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: #8a8a8a; box-shadow: 0 0 0 3px rgba(27, 26, 23, .05);
}
.input.w-sm { width: 120px; }
.input.w-md { width: 190px; }
.input.w-lg { width: 260px; }
.select { padding-right: 26px; }
.filters .spacer { margin-left: auto; }
.filters-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ---------------- 分页 ---------------- */
.pager {
  display: flex; align-items: center; gap: 5px;
  padding: 11px 16px; border-top: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--muted);
}
.pager .spacer { margin-left: auto; }
.pager a, .pager span.pg {
  min-width: 27px; height: 27px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid #e0e0e0; background: var(--card); color: var(--ink-2);
}
.pager a:hover { background: var(--hover); }
.pager .is-current { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.pager .gap { border: 0; background: transparent; color: var(--muted-2); }

/* ---------------- 标签页 ---------------- */
.tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--card); border-radius: var(--r) var(--r) 0 0; }
.tab {
  position: relative; padding: 11px 10px 10px; font-size: 12.5px; font-weight: 600;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.tab .n { font-size: 11px; font-weight: 500; color: var(--muted-2); margin-left: 5px; font-variant-numeric: tabular-nums; }

/* 状态筛选小条：一排可点的圆角标签 */
.chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 27px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  font-size: 12px; color: var(--ink-2);
}
.chip:hover { border-color: #cfcfcf; background: var(--hover); }
.chip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-on b { color: #fff; }

/* ---------------- 进度条 ---------------- */
.bar { height: 5px; border-radius: 3px; background: #f0f0f0; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.bar.soft > i { background: var(--muted-2); }

/* ---------------- 空状态 ---------------- */
.empty { padding: 40px 20px; text-align: center; color: var(--muted-2); font-size: 12.5px; }
.empty b { display: block; color: var(--ink-2); font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }

/* ---------------- 提示条 ---------------- */
/* 提示条做成悬浮 toast：页面滚到任何位置保存都能立刻看到结果 */
.flashes {
  position: fixed; right: 22px; bottom: 22px;
  z-index: 9999; width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 44px); overflow-y: auto;
  display: grid; gap: 8px; margin: 0;
  pointer-events: none;
}
.flash { pointer-events: auto; }
.flash {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px; border-radius: 10px; font-size: 13px; line-height: 1.6;
  border: 1px solid transparent; box-shadow: 0 10px 28px rgba(16, 24, 40, .18);
  animation: flash-in .2s ease-out;
}
.flash.is-ok { background: var(--ok-bg); color: var(--ok); border-color: #dcdcdc; }
.flash.is-error { background: var(--danger-bg); color: var(--danger); border-color: #f2cdca; }
.flash-msg { flex: 1 1 auto; }
.flash-x {
  flex: 0 0 auto; margin: -2px -4px 0 2px; padding: 0 6px; border: 0; background: transparent;
  color: currentColor; font-size: 16px; line-height: 1.4; opacity: .55; cursor: pointer;
}
.flash-x:hover { opacity: 1; }
.flash.is-out { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
@keyframes flash-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------------- 详情栅格 ---------------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; }

.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-2); word-break: break-all; }

/* 会员详情头部 */
.profile { display: flex; align-items: center; gap: 16px; padding: 18px; }
.profile .avatar { width: 56px; height: 56px; font-size: 20px; border-radius: 50%; }
.profile-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.profile-meta { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.profile-actions { margin-left: auto; display: flex; gap: 8px; }

.mini-stat { display: flex; gap: 22px; padding: 14px 18px; border-top: 1px solid var(--line-2); }
.mini-stat div { min-width: 64px; }
.mini-stat b { display: block; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.mini-stat span { font-size: 11.5px; color: var(--muted); }

/* 城市列表（会员详情） */
.city-list { display: grid; gap: 2px; }
.city-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line-2); font-size: 13px;
}
.city-row:last-child { border-bottom: 0; }
.city-row:hover { background: var(--hover); }
.city-row.is-active { background: #f5f5f5; box-shadow: inset 3px 0 0 var(--ink); }
.city-row.is-active .name { color: #000; }
.city-row .name { font-weight: 600; }
.city-row .orders { color: var(--muted); font-size: 12px; }
.city-row .last { margin-left: auto; font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* 排行榜 */
.rank-no {
  width: 22px; height: 22px; border-radius: 999px; display: inline-grid; place-items: center;
  font-size: 11.5px; font-weight: 600; background: #f2f2f2; color: var(--muted); font-variant-numeric: tabular-nums;
}
.rank-no.top { background: var(--ink); color: #fff; }
.city-link { font-weight: 600; }
.city-link:hover { text-decoration: underline; }

/* 趋势图 */
.trend { display: flex; align-items: flex-end; gap: 6px; height: 128px; padding: 6px 2px 0; max-width: 100%; overflow-x: auto; }
.trend .col { flex: 1; min-width: 24px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; position: relative; }
.trend .col i {
  display: block; width: 100%; max-width: 20px; border-radius: 3px 3px 1px 1px;
  background: #3d3d3d; min-height: 2px;
  transition: background .12s;
}
.trend .col:hover i { background: var(--ink); }
.trend .col span { font-size: 10px; color: var(--muted-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.trend .col b {
  position: absolute; top: -2px; font-size: 10.5px; font-weight: 600; color: var(--ink-2);
  opacity: 0; transition: opacity .12s;
}
.trend .col:hover b { opacity: 1; }

/* 富文本编辑器（TinyMCE 7，资源在 assets/tinymce） */
.rich-editor { border-top: 1px solid var(--line-2); background: #fff; }
.rich-editor > textarea {
  display: block; width: 100%; min-height: 420px; border: 0; outline: none; resize: vertical;
  padding: 16px 18px; font: 14px/1.8 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--ink-2);
}
.rich-foot { border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; }
.rich-count { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* 让 TinyMCE 外观与后台卡片融为一体 */
.rich-editor .tox-tinymce { border: 0 !important; border-radius: 0 !important; }
.rich-editor .tox .tox-editor-header { box-shadow: none !important; border-bottom: 1px solid var(--line-2); }
.rich-editor .tox .tox-menubar,
.rich-editor .tox .tox-toolbar-overlord,
.rich-editor .tox .tox-toolbar__primary,
.rich-editor .tox .tox-toolbar__overflow { background: var(--hover); }
.rich-editor .tox .tox-statusbar { border-top: 1px solid var(--line-2); background: var(--hover); color: var(--muted); }
.rich-editor .tox .tox-statusbar a,
.rich-editor .tox .tox-statusbar__path-item { color: var(--muted); }
.rich-editor .tox .tox-statusbar__branding { display: none; }
.rich-editor .tox .tox-edit-area::before { border: 0 !important; }
.rich-editor .tox:not(.tox-tinymce-inline) .tox-editor-header { padding: 2px 0; }

/* 语言管理 */
.switch { position: relative; display: inline-block; width: 34px; height: 19px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #d4d4d4; transition: background .16s; }
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
  border-radius: 50%; background: #fff; transition: transform .16s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(15px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(20,22,26,.15); }

/* 表单弹层（简单区块，非模态） */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* 代录订单：传译方向 = 源语言 → 目标语言，两个下拉并排 */
.dir-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.dir-pair .select { width: 100%; }
.dir-arrow { color: var(--muted); font-size: 14px; line-height: 1; user-select: none; }
@media (max-width: 560px) {
  .dir-pair { grid-template-columns: minmax(0, 1fr); }
  .dir-arrow { transform: rotate(90deg); justify-self: center; }
}
.form-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.form-foot .spacer { margin-left: auto; }
.help { font-size: 11.5px; color: var(--muted-2); }

/* 可折叠卡片（会员编辑资料） */
details.card > summary { cursor: pointer; list-style: none; border-radius: var(--r); }
details.card > summary::-webkit-details-marker { display: none; }
details.card[open] > summary { border-bottom: 1px solid var(--line-2); }

/* 语言管理：按钮式开关 */
.switch-btn {
  position: relative; width: 34px; height: 19px; padding: 0; border: 0;
  border-radius: 20px; background: #d4d4d4; transition: background .16s;
}
.switch-btn i {
  position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.22);
  transition: transform .16s;
}
.switch-btn.is-on { background: var(--ink); }
.switch-btn.is-on i { transform: translateX(15px); }
.switch-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* 常见问题：正在编辑行 */
tr.is-editing td { background: #f7f7f7 !important; }
tr.is-editing td:first-child { box-shadow: inset 3px 0 0 #e60012; }

/* 登录页 */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background: var(--bg);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 420px; background: var(--card); border-radius: var(--r);
  border: 1px solid var(--line); box-shadow: var(--shadow); padding: 38px 32px 28px;
}
.login-brand { display: block; max-width: 100%; line-height: 0; }
.login-logo { display: block; height: 46px; width: auto; max-width: 100%; }
.login-sub { margin-top: 14px; font-size: 13px; color: var(--muted); }
.login-form { margin-top: 22px; display: grid; gap: 12px; }
.login-form .input { height: 40px; font-size: 14px; border-radius: 10px; }
.login-btn { height: 42px; border-radius: 999px; background: var(--ink); color: #fff; border: 0; font-size: 14px; font-weight: 600; margin-top: 4px; }
.login-btn:hover { background: var(--ink-2); }
.login-err { background: var(--danger-bg); color: var(--danger); border-radius: 10px; padding: 9px 12px; font-size: 12.5px; }
.login-tip { margin-top: 18px; padding: 10px 12px; background: var(--soft); border-radius: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.login-foot { margin-top: 16px; text-align: center; font-size: 11px; color: var(--muted-2); }

/* 响应式：≤1200 收窄 KPI；≤900 侧栏转顶部横向 */
@media (max-width: 1240px) {
  .statbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statbar .cell:nth-child(2) { border-right: 0; }
  .statbar .cell:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
  .grid-2, .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .side { position: static; width: 100%; inset: auto; }
  .app { flex-direction: column; }
  .main { margin-left: 0; }
  .brand { padding: 12px 14px 10px; }
  .brand-logo { height: 24px; }
  .brand-sub { margin-top: 4px; letter-spacing: .14em; }
  .nav { display: flex; gap: 4px; overflow-x: auto; padding: 6px 10px 8px; }
  .nav-group { margin: 0; display: flex; gap: 4px; }
  .nav-group:first-child .nav-item, .nav-item { white-space: nowrap; }
  .nav-label, .side-foot { display: none; }
  .page { padding: 16px 14px 32px; }
  .top { padding: 0 14px; }
  .subnav { padding: 0 14px; gap: 16px; overflow-x: auto; }
  .type-tile { padding: 11px 14px 13px; }
  .type-tile-name { font-size: 16px; }
  .statbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .page-head { flex-wrap: wrap; gap: 10px; }
  .page-head > div:first-child { flex: 1 1 100%; }
  .page-actions { margin-left: 0; }
  .trend { height: 108px; gap: 3px; }
  .trend .col span { font-size: 9px; }
}

/* ---------------- 订单详情：与小程序端一一对应的 5 个卡片 ---------------- */
.od-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.od-block + .od-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.od-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.od-note {
  position: relative; padding: 12px 14px; border-radius: 8px; background: #f5f5f5;
  font-size: 13px; line-height: 1.9; color: var(--ink-2); white-space: pre-wrap; word-break: break-word;
}
.od-note.has-more { max-height: 148px; overflow: hidden; }
.od-note.has-more::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34px;
  background: linear-gradient(180deg, rgba(247, 248, 250, 0), #f7f7f7 78%);
}
.od-note.is-open { max-height: none; }
.od-note.is-open::after { display: none; }
.od-more { margin-top: 8px; height: 26px; padding: 0 10px; font-size: 12px; }
.od-empty {
  padding: 12px 14px; border-radius: 9px; background: var(--hover);
  border: 1px dashed var(--line); font-size: 12.5px; color: var(--muted-2);
}
.od-docs { display: grid; gap: 6px; }
.od-doc {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff;
}
.od-doc-ico {
  flex: 0 0 auto; padding: 2px 6px; border-radius: 4px; background: #f0f0f0;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; color: #4a4a4a;
}
.od-doc-name { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-doc-size { flex: 0 0 auto; font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.od-doc-hint { flex: 0 0 auto; font-size: 11px; color: var(--muted-2); }
.od-doc .btn-sm { height: 26px; padding: 0 9px; font-size: 11.5px; }
.od-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.od-upload .input { flex: 0 1 340px; height: 32px; padding: 4px 8px; font-size: 12px; }
.od-interp { display: flex; align-items: center; gap: 12px; }
.od-interp-avatar {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px;
  display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 16px; font-weight: 700;
}
.od-interp-avatar.is-wait { background: #f0f0f0; color: #8a8a8a; }
.od-interp-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.od-interp-title { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.od-tip {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 9px; background: #f7f7f7;
  font-size: 12px; line-height: 1.75; color: var(--muted);
}
@media (max-width: 1240px) {
  .od-grid { grid-template-columns: minmax(0, 1fr); }
}

/* 订单变更记录：备注框下方的时间倒序列表 */
.od-log {
  margin-top: 14px; padding: 12px 14px 6px; border: 1px solid var(--line-2);
  border-radius: 10px; background: #fafafa;
}
.od-log-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; }
.od-log-title { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.od-log-head .help { font-size: 11px; }
.od-log-toggle { height: 24px; padding: 0 9px; font-size: 11.5px; }
.od-log-empty {
  padding: 12px 0 14px; font-size: 12.5px; color: var(--muted-2);
}
.od-log-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.od-log-list.is-collapsed .od-log-item:nth-child(n+4) { display: none; }
.od-log-item {
  padding: 9px 0; border-top: 1px dashed var(--line-2);
}
.od-log-item:first-child { border-top: 0; }
.od-log-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.od-log-time { font-size: 11.5px; color: var(--muted); }
.od-log-who { font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.od-log-act {
  font-size: 10.5px; color: #4a4a4a; background: #f0f0f0; border-radius: 4px;
  padding: 1px 6px; letter-spacing: .02em;
}
.od-log-items { display: flex; flex-direction: column; gap: 3px; }
.od-log-row { display: flex; align-items: baseline; gap: 8px; font-size: 12px; line-height: 1.7; }
.od-log-label { flex: 0 0 auto; min-width: 76px; white-space: nowrap; color: var(--muted); font-size: 11.5px; }
.od-log-val { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.od-log-row.is-stack .od-log-val { display: block; }
.od-log-row.is-stack .od-log-arrow { display: none; }
.od-log-row.is-stack .od-log-from,
.od-log-row.is-stack .od-log-to { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.od-log-row.is-stack .od-log-to { margin-top: 1px; }
.od-log-row.is-stack .od-log-to::before { content: "→ "; color: var(--muted-2); font-weight: 400; }
.od-log-from { color: var(--muted-2); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.22); }
.od-log-arrow { color: var(--muted-2); font-size: 11px; }
.od-log-to { color: var(--ink); font-weight: 600; }
.od-log-text { color: var(--ink-2); }
.od-log-row i.muted { font-style: normal; color: var(--muted-2); }
.od-log-diff summary {
  cursor: pointer; color: var(--info); font-size: 12px; list-style: none;
}
.od-log-diff summary::-webkit-details-marker { display: none; }
.od-log-diff-hint { color: var(--muted-2); font-size: 11px; margin-left: 4px; }
.od-log-diff[open] summary { margin-bottom: 6px; }
.od-log-pre {
  margin: 0 0 6px; padding: 8px 10px; border-radius: 8px; background: #f7f7f7;
  font-size: 12px; line-height: 1.8; color: var(--ink-2); white-space: pre-wrap; word-break: break-word;
  max-height: 180px; overflow-y: auto;
}
.od-log-pre b { display: block; margin-bottom: 3px; font-size: 11px; color: var(--muted); font-weight: 600; }

/* ---------------- 会员头像：与 H5「我的资料」同一套（预设字形 / 上传照片） ---------------- */
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.avatar.is-glyph { color: #fff; }

.av-view { display: flex; align-items: center; gap: 14px; }
.av-view .help { margin: 0; }
.av-preview {
  flex: 0 0 auto; width: 76px; height: 76px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; color: #fff; font-size: 28px; font-weight: 700;
  background: #f0f0f0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.av-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 760px) {
  .av-view { flex-direction: column; align-items: flex-start; }
}

/* ---------------- 系统设置：会员默认头像 ---------------- */
.av-set { display: flex; align-items: flex-start; gap: 26px; }
.av-set-side { flex: 0 0 120px; display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.av-set-main { flex: 1; min-width: 0; }
.av-picks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.av-pick {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: #f0f0f0; color: #8a8a8a; font-size: 18px; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); transition: transform .12s, box-shadow .12s;
}
.av-pick:hover { transform: translateY(-1px); }
.av-pick input { position: absolute; opacity: 0; pointer-events: none; }
.av-pick.is-active { color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); }
.av-chip { display: inline-flex; align-items: center; gap: 4px; }
.av-chip .input { width: 62px; text-align: center; padding: 6px 4px; }
.av-chip-del {
  width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--line-2);
  color: var(--muted); font-size: 14px; line-height: 1; display: grid; place-items: center;
}
.av-chip-del:hover { background: var(--danger-bg); color: var(--danger); }
.av-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.av-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.av-upload .input { max-width: 340px; padding: 6px 8px; height: auto; }
.av-remove { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .av-set { flex-direction: column; gap: 16px; }
  .av-set-side { align-items: flex-start; }
  .av-set-side .help { text-align: left; }
}

/* 说明页里的代码块（小程序配置） */
.code-box { position: relative; display: inline-block; max-width: 100%; margin-top: 10px; }
.code-block {
  margin: 0; padding: 14px 66px 14px 16px; background: var(--soft);
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 12px; line-height: 1.8; color: var(--ink-2);
  overflow-x: auto; white-space: pre; tab-size: 2;
}
.code-copy {
  position: absolute; top: 8px; right: 8px; height: 24px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  color: var(--muted); font-size: 11.5px; line-height: 1; cursor: pointer;
  transition: color .12s, border-color .12s;
}
.code-copy:hover { color: var(--ink); border-color: #cfcfcf; }
.code-copy.is-done { color: var(--ink); border-color: var(--ink); }

/* H5 跳转小程序（settings.php）：一条短链一行，复制按钮跟在地址后面 */
.mp-link-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mp-link-cell code {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; color: var(--ink-2); background: var(--soft);
  padding: 4px 9px; border-radius: 7px;
}
.mp-link-cell .code-copy { position: static; flex: none; }

/* 品牌设置页（settings.php 的 brand 卡）*/
.brand-set { display: flex; align-items: flex-start; gap: 26px; }
.brand-set-main { flex: 1; min-width: 0; }
.brand-preview {
  flex: 0 0 260px; box-sizing: border-box; min-height: 92px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 22px 18px;
}
.brand-preview img { max-width: 100%; max-height: 56px; width: auto; height: auto; }
@media (max-width: 760px) {
  .brand-set { flex-direction: column; gap: 14px; }
  .brand-preview { flex: none; width: 100%; }
}

/* ---------------- 代录订单表单 ---------------- */
.orn-sub { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.orn-sub-head { display: flex; align-items: baseline; gap: 8px; }
.orn-sub-head b { font-size: 12.5px; font-weight: 650; }
.orn-sub-head .muted { font-size: 11.5px; color: var(--muted-2); }
/* 列表里「代录」徽标：不抢眼，但要能和自助下单区分开 */
.badge.is-manual { background: #fff; color: #111; }

/* 需求文档上传：一个可点击 / 可拖拽的虚线区 + 已选文件列表 */
.orn-drop {
  position: relative; margin-top: 10px;
  border: 1px dashed #d8d8d8; border-radius: var(--r-sm);
  background: #fafafa; transition: border-color .12s, background .12s;
}
.orn-drop:hover { border-color: #c8c8c8; background: #f7f7f7; }
.orn-drop.is-over { border-color: var(--ink); background: #f7f7f7; }
.orn-drop:focus-within { border-color: #8a8a8a; background: #f7f7f7; }
.orn-file-input {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  border: 0; opacity: 0; overflow: hidden; clip: rect(0 0 0 0);
}
.orn-drop-label { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; }
.orn-drop-ico {
  flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-size: 16px; font-weight: 400; color: var(--ink-2); line-height: 1;
}
.orn-drop-t { display: block; font-size: 13px; color: var(--ink-2); }
.orn-drop-t b { font-weight: 650; color: var(--ink); }
.orn-drop-h { display: block; margin-top: 1px; font-size: 11.5px; color: var(--muted-2); }

.orn-files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.orn-files[hidden] { display: none; }
.orn-file {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 6px; border: 1px solid var(--line); border-radius: 7px; background: #fff;
}
.orn-file-ico {
  flex: 0 0 auto; width: 34px; padding: 2px 0; border-radius: 4px; background: var(--line-2);
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-align: center; color: var(--muted);
}
.orn-file-name {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.orn-file-size { flex: 0 0 auto; font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.orn-file-del {
  flex: 0 0 auto; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
  background: var(--line-2); color: var(--muted); font-size: 14px; line-height: 1;
  display: grid; place-items: center;
}
.orn-file-del:hover { background: var(--danger-bg); color: var(--danger); }
.orn-files-sum { margin-top: 8px; font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.orn-files-sum.is-bad { color: var(--danger); }
.orn-files-err { margin-top: 6px; font-size: 11.5px; color: var(--danger); }
.orn-files-err[hidden] { display: none; }
.orn-sub .help { display: block; margin-top: 8px; }

/* =========================================================
   后台提醒：顶栏铃铛 + 新订单 / 即将开始弹窗
   ========================================================= */
.top-bell {
  position: relative; display: inline-grid; place-items: center;
  width: 29px; height: 29px; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted);
  transition: color .12s, border-color .12s, background .12s;
}
.top-bell:hover { color: var(--ink); border-color: #d0d0d0; background: var(--hover); }
.top-bell svg { width: 15px; height: 15px; }
.top-bell.has-new { color: var(--danger); border-color: #f0cfcc; background: #fceceb; }
.top-bell.has-new svg { animation: bell-swing 2.6s ease-in-out infinite; transform-origin: 50% 12%; }
@keyframes bell-swing {
  0%, 70%, 100% { transform: rotate(0); }
  76% { transform: rotate(11deg); }
  82% { transform: rotate(-9deg); }
  88% { transform: rotate(5deg); }
  94% { transform: rotate(-3deg); }
}
.top-bell-num {
  position: absolute; top: -6px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: #e60012; color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px #fff; font-variant-numeric: tabular-nums;
}
.top-bell-num[hidden] { display: none; }

body.bn-modal-open { overflow: hidden; }

.bn-modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 24px; }
.bn-modal-mask {
  position: absolute; inset: 0; background: rgba(16, 18, 22, .44);
  backdrop-filter: blur(2px); animation: bn-fade .18s ease-out;
}
.bn-modal-card {
  position: relative; display: flex; flex-direction: column;
  width: min(560px, 100%); max-height: calc(100vh - 48px);
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 28px 64px -22px rgba(10, 12, 16, .55);
  animation: bn-pop .22s cubic-bezier(.2, .9, .3, 1.15);
}
.bn-modal-card.is-closing { animation: bn-pop-out .16s ease-in forwards; }
@keyframes bn-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bn-pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes bn-pop-out { to { opacity: 0; transform: translateY(8px) scale(.985); } }

.bn-modal-head { display: flex; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line-2); }
.bn-modal-ico {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; background: #f2f2f2; color: #111;
}
.bn-modal-ico.is-new { background: var(--danger-bg); color: #b8000f; }
.bn-modal-ico svg { width: 20px; height: 20px; }
.bn-modal-ttl { flex: 1; min-width: 0; }
.bn-modal-ttl h3 { font-size: 15px; }
.bn-modal-ttl p { margin: 3px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.bn-modal-x {
  flex: 0 0 auto; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); font-size: 18px; line-height: 1;
}
.bn-modal-x:hover { background: var(--line-2); color: var(--ink); }

.bn-modal-body { padding: 8px; overflow-y: auto; display: grid; gap: 2px; }
.bn-nrow {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid transparent;
  transition: background .12s, border-color .12s;
}
.bn-nrow:hover { background: var(--hover); border-color: var(--line); color: inherit; }
.bn-nrow-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.bn-nrow-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bn-nrow-no { font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.bn-nrow-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-nrow-side { flex: 0 0 auto; display: grid; gap: 5px; justify-items: end; }
.bn-nrow-when { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.bn-nrow-when.is-urgent { color: #b8000f; font-weight: 650; }
.bn-nrow-go {
  font-size: 11.5px; color: var(--ink-2); background: var(--line-2);
  border-radius: 6px; padding: 3px 8px; transition: background .12s, color .12s;
}
.bn-nrow:hover .bn-nrow-go { background: var(--ink); color: #fff; }

.bn-modal-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--line-2); background: var(--hover);
}
.bn-modal-foot .spacer { flex: 1; }
.bn-mute {
  border: 0; background: transparent; color: var(--muted);
  font-size: 12px; padding: 4px 6px; border-radius: 6px;
}
.bn-mute:hover { background: var(--line-2); color: var(--ink-2); }
.bn-mute.is-off { color: var(--muted-2); }
.bn-mute::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px;
  border-radius: 50%; background: #111; vertical-align: 1px;
}
.bn-mute.is-off::before { background: #c8c8c8; }

@media (max-width: 640px) {
  .top-date { display: none; }
  .qr-pop-txt { display: none; }
  .qr-pop-btn { padding: 0 9px; }
  .statbar { grid-template-columns: minmax(0, 1fr); }
  .statbar .cell { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .statbar .cell:last-child { border-bottom: 0; }
  .bn-modal { padding: 12px; }
  .bn-modal-card { max-height: calc(100vh - 24px); }
  .bn-nrow-meta { white-space: normal; }
  .bn-modal-foot .btn { flex: 1; }
  .bn-modal-foot .bn-mute { order: 3; }
}

/* 系统开了「减少动效」时不做弹窗动画（也方便截图 / 自动化测试） */
@media (prefers-reduced-motion: reduce) {
  .bn-modal-card, .bn-modal-mask, .bn-modal-card.is-closing { animation: none !important; }
  .top-bell.has-new svg { animation: none !important; }
}

/* ---------------- 订单详情 · 下单会员：名字右侧「内部备注」 ---------------- */
.od-member { flex: 1; min-width: 0; }
.od-member .profile-name { flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 5px; }
.od-member-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 备注跟名字同一行；放不下时整块换行，且始终给右侧「会员详情」留出间距 */
.mem-remark {
  flex: 1 1 auto; min-width: 0; max-width: 100%;
  padding: 2px 8px; border-radius: 6px;
  background: var(--warn-bg); color: var(--warn);
  border: 1px solid #e0e0e0;
  font-size: 11.5px; font-weight: 500; line-height: 1.55; letter-spacing: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------------- 子账号权限勾选 ---------------- */
.perm-groups { margin-top: 14px; display: grid; gap: 10px; }
.perm-group { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px 12px; }
.perm-group-label { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.perm-items { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.perm-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; padding: 4px 2px; }
.perm-item input { width: 15px; height: 15px; accent-color: var(--primary, #111); cursor: pointer; }
.perm-item:hover { color: var(--ink); }
.perm-tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 420px; }

/* ---------------- 订单列表：多选与批量删除 ---------------- */
.col-check { width: 36px; padding-right: 0; }
.col-check input { width: 15px; height: 15px; margin: 0; vertical-align: middle; cursor: pointer; accent-color: var(--danger); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.row-actions form { display: inline-flex; margin: 0; }
.bulkbar {
  display: none; align-items: center; gap: 8px;
  padding: 9px 16px; border-bottom: 1px solid var(--line-2); background: var(--danger-bg);
}
.bulkbar.is-on { display: flex; }
.bulkbar-info { margin-right: auto; font-size: 12.5px; color: var(--ink-2); }
.bulkbar-info b { color: var(--danger); font-size: 13.5px; }

/* ---------------- 订单回收站 ---------------- */
.trash-note {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; margin-bottom: 14px;
  background: var(--warn-bg); border: 1px solid #f2d3cf; border-radius: var(--r-sm);
}
.trash-note-main { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.trash-note-main b { font-size: 13px; color: var(--danger); }
.trash-note-day { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.trash-note-day b { font-size: 15px; color: var(--danger); font-variant-numeric: tabular-nums; }

/* 回收站里预览：处理表单只读（隐藏输入区与保存按钮，保留变更记录） */
.card.is-locked .form-grid, .card.is-locked .form-foot { display: none; }

.trash-meta { display: flex; flex-direction: column; gap: 2px; }
.trash-days { font-variant-numeric: tabular-nums; white-space: nowrap; }
.trash-days b { color: var(--danger); }
.trash-days.is-safe b { color: var(--ink); }
