/* ============================================================
   数字经营服务 · 超级管理员后台
   ============================================================ */
:root {
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-soft: #e9f2ff;
  --green: #22c55e;
  --green-soft: #e8f8ee;
  --amber: #f59e0b;
  --amber-soft: #fef4e4;
  --red: #ef4444;
  --red-soft: #fdecec;
  --pink: #ff4d7f;
  --teal: #2ed3a3;

  --text: #1d2635;
  --text-2: #4d586a;
  --muted: #8b95a7;
  --border: #e8edf4;
  --border-strong: #dfe5ee;
  --bg: #f3f6fa;
  --card: #ffffff;

  --sidebar-bg: #0b1828;
  --sidebar-bg-2: #0d1d31;
  --sidebar-text: #94a3b8;

  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .04);
  --shadow-lg: 0 18px 48px rgba(15, 28, 48, .16);

  --header-h: 58px;
  --pathbar-h: 42px;
  --sidebar-w: 212px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 13px; color: var(--text); }
svg { display: block; }

/* ---------------- Top bar ---------------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 50;
}
.brand {
  width: var(--sidebar-w);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  border-right: 1px solid var(--border);
  flex: none;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #1677ff, #36cfc9);
  color: #fff;
  box-shadow: 0 4px 10px rgba(22, 119, 255, .28);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.brand-tag {
  font-size: 9px; font-weight: 700; letter-spacing: .8px;
  color: var(--primary); background: var(--primary-soft);
  padding: 2px 5px; border-radius: 4px;
}
.menu-btn { margin-left: 14px; }

.topbar-title {
  display: flex; align-items: center; gap: 7px;
  margin-left: 6px;
  min-width: 0;
}
.topbar-title h1 { font-size: 16px; font-weight: 600; margin: 0; white-space: nowrap; }
.crumb-sep { color: #c2cad6; }
.crumb { font-size: 13px; color: var(--muted); white-space: nowrap; }

.topbar-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  padding-right: 18px;
}
.icon-btn {
  position: relative;
  width: 34px; height: 34px;
  border: none; border-radius: 8px;
  background: transparent; color: #5d687a;
  display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { background: #f2f5fa; color: var(--text); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); border: 2px solid #fff;
}
.icon-btn .dot.hide { display: none; }

.global-search {
  position: relative;
  display: flex; align-items: center; gap: 7px;
  width: 208px; height: 34px;
  padding: 0 11px;
  background: #f4f6fa;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  transition: all .18s;
}
.global-search:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,119,255,.1); }
.global-search svg { width: 15px; height: 15px; flex: none; }
.global-search input { border: none; background: transparent; outline: none; width: 100%; }
.global-search input::placeholder { color: #a4adbd; }
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 300px; background: #fff;
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px; display: none; z-index: 60;
  max-height: 340px; overflow: auto;
}
.search-results.show { display: block; }
.search-results .sr-empty { padding: 18px 12px; color: var(--muted); text-align: center; font-size: 13px; }
.sr-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 7px; cursor: pointer;
}
.sr-item:hover { background: #f4f8ff; }
.sr-item .sr-icon {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none;
}
.sr-item b { font-size: 13px; font-weight: 500; display: block; }
.sr-item small { color: var(--muted); font-size: 11px; }

.divider { width: 1px; height: 22px; background: var(--border); }

.user {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 4px 5px;
  background: transparent; border: none; border-radius: 8px;
  transition: background .15s;
}
.user:hover { background: #f3f6fa; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #1677ff, #6ea8ff);
  color: #fff; font-size: 13px; font-weight: 600;
  display: grid; place-items: center;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.user-meta b { font-size: 13px; font-weight: 600; }
.user-meta small { font-size: 10px; color: var(--muted); }
.user .chev { width: 14px; height: 14px; color: var(--muted); }

.lang-btn { gap: 6px; padding: 0 11px; height: 34px; font-size: 12px; }
.lang-btn svg { width: 15px; height: 15px; color: var(--muted); }

/* ---------------- Path tabs ---------------- */
.path-bar {
  position: sticky;
  top: var(--header-h);
  height: var(--pathbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 22px;
  z-index: 30;
}
.path-tabs {
  display: flex; align-items: center; gap: 6px;
  height: 100%; padding: 6px 0;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
}
.path-tabs::-webkit-scrollbar { display: none; }
.path-tab {
  display: flex; align-items: center; gap: 2px;
  height: 29px; padding: 0 6px 0 11px;
  border-radius: 6px;
  color: #5d687a; font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.path-tab:hover { background: #f2f6fc; color: var(--text); }
.path-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(22,119,255,.24);
}
.path-tab.active:hover { background: var(--primary-hover); color: #fff; }
.path-tab-close {
  width: 18px; height: 18px; padding: 0;
  border: none; border-radius: 4px;
  background: transparent; color: inherit;
  display: grid; place-items: center;
  opacity: .6;
  transition: background .14s, opacity .14s;
}
.path-tab-close svg { width: 10px; height: 10px; }
.path-tab-close:hover { opacity: 1; background: rgba(15, 28, 48, .1); }
.path-tab.active .path-tab-close:hover { background: rgba(255,255,255,.24); }

/* ---------------- Layout / Sidebar ---------------- */
.layout { padding-top: var(--header-h); min-height: 100vh; }

.sidebar {
  position: fixed;
  top: var(--header-h); bottom: 0; left: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--sidebar-bg-2), var(--sidebar-bg));
  z-index: 40;
  transition: transform .22s ease, width .22s ease;
  overflow: hidden;
}
.side-scroll {
  height: 100%;
  overflow-y: auto;
  display: flex; flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.14) transparent;
}
.side-scroll::-webkit-scrollbar { width: 5px; }
.side-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }

.nav { padding: 12px 0 20px; flex: 1; }
.nav-group { margin-bottom: 2px; }
.nav-ico {
  width: 17px; height: 17px;
  flex: none;
  margin-right: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-ico svg { width: 100%; height: 100%; display: block; }
.nav-label { flex: 1; text-align: left; }
.nav-group-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 18px;
  border: none; background: transparent;
  color: #a7b4c6; font-size: 12.5px; font-weight: 500;
  letter-spacing: .3px;
  transition: color .16s, background .16s;
}
.nav-group-head:hover { color: #fff; }
.nav-group-head .chev { width: 13px; height: 13px; transition: transform .2s; opacity: .65; }
.nav-group.open .nav-group-head { color: #dbe7f8; }
.nav-group.open .nav-group-head .chev { transform: rotate(180deg); }
.nav-group.active .nav-group-head {
  color: #fff;
  background: linear-gradient(90deg, rgba(22,119,255,.24), rgba(22,119,255,0));
  box-shadow: inset 2px 0 0 var(--primary);
}
.nav-items { display: none; padding: 2px 10px 8px; }
.nav-group.open .nav-items { display: block; }
.nav-item {
  display: flex; align-items: center;
  padding: 8px 12px 8px 20px;
  margin-bottom: 1px;
  border-radius: 6px;
  color: var(--sidebar-text);
  font-size: 13px;
  position: relative;
  transition: color .14s, background .14s;
  cursor: pointer;
}
.nav-item:hover { color: #e8eef8; background: rgba(255,255,255,.05); }
.nav-item.active {
  color: #fff;
  background: rgba(22,119,255,.2);
  font-weight: 500;
}
.nav-item.active::before {
  content: "";
  position: absolute; left: 8px; top: 50%;
  width: 3px; height: 14px;
  margin-top: -7px;
  border-radius: 2px;
  background: #4d9bff;
}
.nav-leaf {
  display: flex; align-items: center;
  padding: 11px 18px;
  color: #a7b4c6;
  font-size: 12.5px; font-weight: 500;
  letter-spacing: .3px;
  transition: color .16s, background .16s;
}
.nav-leaf:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-leaf.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(22,119,255,.24), rgba(22,119,255,0));
  box-shadow: inset 2px 0 0 var(--primary);
}
.side-foot {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #64748b;
  font-size: 11px;
  display: flex; align-items: center; gap: 7px;
}
.pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34,197,94,.16);
}

body.sidebar-collapsed { --sidebar-w: 68px; }
body.sidebar-collapsed .backdrop { display: none !important; }
body.sidebar-collapsed .brand { padding: 0 18px; justify-content: center; }
body.sidebar-collapsed .brand-name,
body.sidebar-collapsed .brand-tag { display: none; }
body.sidebar-collapsed .nav-group-head { justify-content: center; padding: 12px 0; }
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-group-head .chev { display: none; }
body.sidebar-collapsed .nav-ico { margin-right: 0; }
body.sidebar-collapsed .nav-items { display: none !important; }
body.sidebar-collapsed .nav-leaf { justify-content: center; padding: 12px 0; }
body.sidebar-collapsed .side-foot { justify-content: center; padding: 14px 0; }
body.sidebar-collapsed .side-foot .foot-text { display: none; }

.backdrop {
  position: fixed; inset: var(--header-h) 0 0 0;
  background: rgba(10, 20, 35, .4);
  z-index: 39; display: none;
}

.content {
  margin-left: var(--sidebar-w);
  min-width: 0;
  transition: margin-left .22s ease;
}

.main {
  padding: 20px 22px 40px;
  min-height: calc(100vh - var(--header-h) - var(--pathbar-h));
  min-width: 0;
}

/* ---------------- Generic ---------------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.page-head h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: .2px; }
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 34px; padding: 0 15px;
  border-radius: 7px; border: 1px solid transparent;
  font-size: 13px; font-weight: 500;
  transition: all .15s;
  white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 2px 6px rgba(22,119,255,.22); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ghost { background: #fff; border-color: var(--border-strong); color: var(--text-2); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); background: #f8fbff; }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover { background: #f66; }
.btn.sm { height: 29px; padding: 0 11px; font-size: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.link {
  border: none; background: none; padding: 0; margin-right: 12px;
  color: var(--primary); font-size: 12.5px;
}
.link:hover { color: var(--primary-hover); text-decoration: underline; }
.link.danger { color: var(--red); }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel + .panel { margin-top: 16px; }

/* ---------------- KPI ---------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.kpi-grid > *, .chart-grid > *, .mini-grid > *, .rule-grid > *, .service-grid > * { min-width: 0; }
.kpi {
  display: flex; align-items: center; gap: 13px;
  padding: 17px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .16s, box-shadow .16s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16,24,40,.07); }
.kpi-icon {
  width: 46px; height: 46px; border-radius: 8px;
  display: grid; place-items: center; flex: none;
  color: #fff;
}
.kpi-icon svg { width: 23px; height: 23px; }
.kpi-icon.blue { background: linear-gradient(135deg, #1677ff, #4096ff); }
.kpi-icon.green { background: linear-gradient(135deg, #22c55e, #52d98a); }
.kpi-icon.red { background: linear-gradient(135deg, #ff5b5b, #ff8f6b); }
.kpi-meta { min-width: 0; }
.kpi-label { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; white-space: nowrap; }
.kpi-value { font-size: 25px; font-weight: 600; letter-spacing: .3px; color: var(--primary); line-height: 1.15; }
.kpi-value.red { color: var(--red); }
.kpi-value .unit { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 2px; }

/* ---------------- Chart cards ---------------- */
.chart-grid {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.chart-grid.equal { grid-template-columns: 1fr 1fr; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid #f1f4f9;
  min-height: 48px;
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-head .head-extra { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11.5px; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 8px 0 0; }

.chart-wrap { position: relative; width: 100%; }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-svg .grid { stroke: #eef2f8; stroke-width: 1; }
.chart-svg .axis { fill: #98a2b3; font-size: 12px; }
.chart-svg .axis-x { fill: #98a2b3; font-size: 11.5px; }
.chart-svg .hit { fill: transparent; cursor: crosshair; }
.chart-tip {
  position: absolute;
  transform: translate(-50%, -112%);
  background: rgba(23, 34, 51, .94);
  color: #fff;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  line-height: 1.5;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .12s;
  z-index: 5;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.chart-tip.show { opacity: 1; }
.chart-tip .t-label { color: #a9b6c9; font-size: 10.5px; }
.chart-tip .t-val { font-weight: 600; font-size: 12.5px; margin-top: 1px; }
.chart-tip::after {
  content: ""; position: absolute; left: 50%; bottom: -4px;
  width: 8px; height: 8px; margin-left: -4px;
  background: rgba(23, 34, 51, .94);
  transform: rotate(45deg);
}

/* ---------------- Table ---------------- */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f4f9;
  flex-wrap: wrap;
}
.field {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 11px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--muted);
  transition: border-color .15s, box-shadow .15s;
}
.field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,119,255,.08); }
.field svg { width: 14px; height: 14px; flex: none; }
.field input { border: none; outline: none; width: 190px; background: transparent; }
.field select {
  border: none; outline: none; background: transparent;
  min-width: 92px; cursor: pointer;
  appearance: none;
  padding-right: 14px;
}
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 10px; top: 50%;
  width: 5px; height: 5px;
  border-right: 1.5px solid #9aa5b8;
  border-bottom: 1.5px solid #9aa5b8;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.filter-actions { margin-left: auto; display: flex; gap: 8px; }

/* 门店列表：网格筛选 */
.grid-filter { padding: 16px 18px 18px; border-bottom: 1px solid #f1f4f9; }
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 22px;
}
.filter-cell { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.filter-label { font-size: 12px; color: #7a8598; white-space: nowrap; }
.filter-input {
  height: 36px; width: 100%;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.filter-input::placeholder { color: #a4adbd; }
.filter-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,119,255,.08); }
.filter-cell .field { height: 36px; width: 100%; }
.filter-cell .field select { width: 100%; }
.date-range {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.date-range:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,119,255,.08); }
.date-range input {
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent;
  color: var(--text-2); font-size: 12.5px;
}
.date-range .range-sep { color: #b6c0cf; font-size: 12px; flex: none; }
.filter-cell-actions {
  grid-column: span var(--filter-span, 2);
  flex-direction: row; align-items: flex-end;
  gap: 8px;
}
.table-toolbar {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 18px 0;
}
.input.error, .textarea.error {
  border-color: #e5484d;
  box-shadow: 0 0 0 3px rgba(229, 72, 77, .08);
}
.filter-cell-actions .btn { height: 36px; }

/* 门店统计条 */
.store-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 12px 24px;
  background: var(--sidebar-bg);
  color: #fff;
}
.ss-item { display: flex; flex-direction: column; gap: 1px; }
.ss-item.right { align-items: flex-end; }
.ss-item span { font-size: 11.5px; color: #93a3b8; }
.ss-item b { font-size: 20px; font-weight: 600; letter-spacing: .4px; line-height: 1.25; }
.ss-item b em { font-size: 12px; font-style: normal; font-weight: 400; margin-left: 3px; color: #c8d3e2; }
.ss-item b.red { color: #ff7875; }
.ss-item b.red em { color: #ffb3b0; }
.store-card-head { min-height: 56px; }
.store-card-head h3 { font-size: 15px; }
.store-panel table.data { min-width: 1080px; }
table.data td.idx { color: #98a2b3; font-size: 12.5px; }
.more-link { display: inline-flex; align-items: center; gap: 1px; margin-right: 0; }
.more-link svg { width: 12px; height: 12px; }

/* 服务商悬浮列表 */
.hover-tip {
  position: fixed; z-index: 90;
  min-width: 210px; max-width: 280px;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 28, 48, .16);
  padding: 10px 0 6px;
  animation: tipIn .12s ease;
}
.hover-tip-head {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 0 14px 8px;
  border-bottom: 1px solid #f1f4f9;
  font-size: 12px; color: #7a8598;
}
.hover-tip ul { list-style: none; margin: 0; padding: 6px 0 0; max-height: 250px; overflow: auto; }
.hover-tip li {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 5px 14px;
  font-size: 12.5px; color: var(--text-2);
}
.hover-tip li:hover { background: #f6f9fe; }
.hover-tip li em { font-style: normal; font-size: 11.5px; color: #98a2b3; }
@keyframes tipIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

/* 审核状态抽屉 */
.audit-current {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 18px;
  background: #f7f9fc; border-radius: 8px;
  font-size: 13px; color: var(--text-2);
}
.audit-steps { list-style: none; margin: 0; padding: 0; }
.audit-steps li { position: relative; display: flex; gap: 12px; padding-bottom: 20px; }
.audit-steps li:last-child { padding-bottom: 0; }
.audit-steps li::before {
  content: ""; position: absolute; left: 5px; top: 15px; bottom: 0;
  width: 1px; background: #e4e9f2;
}
.audit-steps li:last-child::before { display: none; }
.audit-dot { width: 11px; height: 11px; margin-top: 5px; border-radius: 50%; background: #d3dbe7; flex: none; }
.audit-steps li.done .audit-dot { background: #22b07d; }
.audit-steps li.wait .audit-dot { background: #f0a020; }
.audit-steps li.fail .audit-dot { background: #e5484d; }
.audit-steps b { display: block; font-size: 13px; font-weight: 500; color: var(--text); }
.audit-steps em { font-style: normal; font-size: 12px; color: #8b96a8; }
.agreement-body { font-size: 13px; line-height: 1.9; color: var(--text-2); }
.agreement-body h4 { margin: 0 0 10px; font-size: 14px; color: var(--text); }
.agreement-body p { margin: 0 0 10px; }

.table-scroll { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse;
  min-width: 760px;
}
table.data th {
  text-align: left;
  padding: 11px 16px;
  font-size: 12px; font-weight: 500; color: #7a8598;
  background: #fafbfd;
  border-bottom: 1px solid #eef2f7;
  white-space: nowrap;
}
table.data td {
  padding: 12px 16px;
  border-bottom: 1px solid #f2f5f9;
  font-size: 13px; color: var(--text-2);
  white-space: nowrap;
}
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover td { background: #f8fbff; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td.money { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
table.data td.code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; color: var(--text-2); }
table.data td.strong { color: var(--text); font-weight: 500; }
table.data td .sub { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 2px; }
table.data .actions { white-space: nowrap; }
table.data .no-data { padding: 0; }

.table-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 13px 16px;
  border-top: 1px solid #f2f5f9;
  color: var(--muted); font-size: 12px;
  flex-wrap: wrap;
}
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn {
  min-width: 29px; height: 29px; padding: 0 7px;
  border: 1px solid var(--border);
  background: #fff; border-radius: 6px;
  color: var(--text-2); font-size: 12px;
  display: grid; place-items: center;
  transition: all .14s;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-size { display: flex; align-items: center; gap: 6px; }
.page-size select {
  height: 29px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; padding: 0 6px; color: var(--text-2); outline: none;
}

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  border-radius: 11px;
  font-size: 11.5px; font-weight: 500;
  background: #f1f4f9; color: #667085;
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-soft); color: #189a4b; }
.badge.red { background: var(--red-soft); color: #de3b3b; }
.badge.amber { background: var(--amber-soft); color: #c47b06; }
.badge.blue { background: var(--primary-soft); color: var(--primary); }
.badge.gray { background: #f1f4f9; color: #7b8798; }

.empty {
  padding: 46px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--muted);
}
.empty .empty-icon {
  width: 54px; height: 54px; border-radius: 50%;
  background: #f4f7fb; display: grid; place-items: center;
  color: #b6c0cf;
}
.empty .empty-icon svg { width: 26px; height: 26px; }
.empty b { font-size: 13px; font-weight: 500; color: #7c8798; }
.empty small { font-size: 11.5px; }

/* ---------------- Special pages ---------------- */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px; margin-bottom: 16px;
}
.mini-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow);
}
.mini-card .mini-label { color: var(--muted); font-size: 12px; }
.mini-card .mini-value { font-size: 22px; font-weight: 600; margin-top: 3px; }
.mini-card .mini-trend { font-size: 11.5px; margin-top: 4px; color: var(--green); }
.mini-card .mini-trend.down { color: var(--red); }
.mini-card .mini-trend.muted { color: var(--muted); }

.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.rule-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 17px 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 9px;
  transition: border-color .16s, box-shadow .16s;
}
.rule-card:hover { border-color: #cfe1ff; box-shadow: 0 10px 24px rgba(22,119,255,.08); }
.rule-top { display: flex; align-items: center; gap: 8px; }
.rule-top h4 { margin: 0; font-size: 14px; font-weight: 600; }
.rule-desc { color: var(--muted); font-size: 12.5px; line-height: 1.65; min-height: 40px; }
.rule-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 7px; border-top: 1px dashed #edf1f7; }
.rule-hits { color: var(--muted); font-size: 11.5px; }
.rule-hits b { color: var(--text); font-weight: 600; margin: 0 2px; }

.switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track {
  width: 34px; height: 19px; border-radius: 10px;
  background: #d9e0ea; position: relative;
  transition: background .18s;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: transform .18s;
}
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(15px); }
.switch .switch-label { font-size: 12px; color: var(--muted); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.service-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 17px; box-shadow: var(--shadow);
}
.service-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.service-name { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,.13); }
.status-dot.warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(245,158,11,.14); }
.status-dot.down { background: var(--red); box-shadow: 0 0 0 3px rgba(239,68,68,.13); }
.service-desc { color: var(--muted); font-size: 12px; margin: 8px 0 13px; }
.service-metrics { display: flex; gap: 22px; padding-top: 12px; border-top: 1px solid #f1f4f9; }
.service-metrics div small { display: block; color: var(--muted); font-size: 10.5px; margin-bottom: 2px; }
.service-metrics div b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.form-item label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; }
.form-item label .req { color: var(--red); margin-left: 2px; }
.input, .textarea, select.input {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--border-strong); border-radius: 7px;
  background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; padding: 9px 11px; resize: vertical; min-height: 78px; line-height: 1.6; }
.input:focus, .textarea:focus, select.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,119,255,.09);
}
.form-item .hint { color: var(--muted); font-size: 11px; margin-top: 5px; }
.form-item.full { grid-column: 1 / -1; }
.form-item.col2 { grid-column: 2; }
.modal.modal-lg { width: min(1000px, calc(100vw - 40px)); }
.modal.modal-lg .form-grid { gap: 14px 28px; }

.check-row { display: flex; flex-wrap: wrap; gap: 9px; }
.check-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 7px;
  font-size: 12.5px; color: var(--text-2);
  cursor: pointer; user-select: none;
  background: #fff;
  transition: all .15s;
}
.check-chip input { accent-color: var(--primary); margin: 0; }
.check-chip:has(input:checked) { border-color: var(--primary); background: #f5f9ff; color: var(--primary); }

.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 15px 4px;
  border-bottom: 1px solid #f2f5f9;
}
.settings-row:last-child { border-bottom: none; }
.settings-row .s-label { font-size: 13px; color: var(--text); font-weight: 500; }
.settings-row .s-desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; max-width: 520px; }

.progress {
  height: 8px; border-radius: 5px; background: #eef2f8; overflow: hidden;
}
.progress > i {
  display: block; height: 100%; width: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, #1677ff, #4facfe);
  transition: width .3s ease;
}
.sync-log {
  margin-top: 14px;
  background: #0f1d30;
  border-radius: 8px;
  padding: 13px 15px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px; line-height: 1.85;
  color: #9fb1c8;
  max-height: 208px; overflow: auto;
}
.sync-log .ok { color: #57d68d; }
.sync-log .warn { color: #ffc46b; }
.sync-log .time { color: #5f7590; margin-right: 8px; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f2f5f9;
  font-size: 12.5px; color: var(--text-2);
}
.list-plain li:last-child { border-bottom: none; }
.list-plain li .li-time { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.list-plain li .li-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex: none; }
.list-plain li .li-dot.red { background: var(--red); }
.list-plain li .li-dot.amber { background: var(--amber); }

.legend { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--muted); }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: 1px; }

/* ---------------- Drawer ---------------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(15, 25, 40, .42);
  z-index: 80;
  opacity: 0;
  transition: opacity .2s;
}
.overlay.show { opacity: 1; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 460px; max-width: 92vw;
  background: #fff;
  z-index: 81;
  box-shadow: -12px 0 40px rgba(15, 28, 48, .16);
  transform: translateX(100%);
  transition: transform .24s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.drawer.show { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.drawer-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.drawer-head p { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); }
.drawer-close {
  margin-left: auto;
  width: 30px; height: 30px; border: none; border-radius: 7px;
  background: #f4f6fa; color: #7a8598;
  display: grid; place-items: center;
}
.drawer-close:hover { background: #eaeef5; color: var(--text); }
.drawer-close svg { width: 16px; height: 16px; }
.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.drawer-foot {
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
  background: #fcfdff;
}

.detail-section { margin-bottom: 20px; }
.detail-section h4 {
  margin: 0 0 15px;
  font-size: 12.5px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 7px;
}
.detail-section h4::before {
  content: ""; width: 3px; height: 12px; border-radius: 2px;
  background: var(--primary);
}
.detail-list {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px 16px; margin: 0;
}
.detail-list > div { min-width: 0; }
.detail-list dt { color: var(--muted); font-size: 11.5px; margin-bottom: 3px; }
.detail-list dd {
  margin: 0; font-size: 13px; color: var(--text);
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.timeline { list-style: none; margin: 4px 0 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 18px 20px; border-left: 1px solid #e4eaf3; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -4px; top: 3px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #c7d3e4;
}
.timeline li:first-child::before { background: var(--primary); box-shadow: 0 0 0 3px rgba(22,119,255,.12); }
.timeline b { display: block; font-size: 12.5px; font-weight: 500; color: var(--text); }
.timeline span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------------- Modal ---------------- */
.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -46%) scale(.98);
  width: 520px; max-width: 92vw;
  max-height: 86vh;
  background: #fff;
  border-radius: 12px;
  z-index: 82;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  opacity: 0;
  transition: opacity .18s, transform .18s;
}
.modal.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal-head {
  padding: 18px 20px 12px;
  display: flex; align-items: center; gap: 10px;
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-head .drawer-close { margin-left: auto; }
.modal-body { padding: 6px 20px 20px; overflow-y: auto; }
.modal-foot {
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
  background: #fcfdff;
  border-radius: 0 0 12px 12px;
}
.modal-note {
  display: flex; gap: 9px;
  padding: 11px 13px;
  background: #f7f9fd;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 12px; line-height: 1.6;
  margin-bottom: 16px;
}
.modal-note svg { width: 16px; height: 16px; color: var(--primary); flex: none; margin-top: 1px; }

/* ---------------- Dropdown / popover ---------------- */
.menu-pop {
  position: fixed;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 90;
  min-width: 190px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .14s, transform .14s;
}
.menu-pop.show { opacity: 1; transform: translateY(0); }
.menu-pop.nav-flyout { min-width: 168px; }
.menu-pop .mp-head {
  padding: 8px 10px 9px;
  border-bottom: 1px solid #f2f5f9;
  margin-bottom: 4px;
}
.menu-pop .mp-head b { display: block; font-size: 12.5px; }
.menu-pop .mp-head small { color: var(--muted); font-size: 11px; }
.menu-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: none; background: transparent;
  border-radius: 6px;
  font-size: 13px; color: var(--text-2);
  text-align: left;
}
.menu-item:hover { background: #f4f8ff; color: var(--primary); }
.menu-item svg { width: 15px; height: 15px; color: #97a2b4; }
.menu-item:hover svg { color: var(--primary); }
.menu-item.danger { color: var(--red); }
.menu-item.danger svg { color: var(--red); }

.notify-pop { width: 330px; padding: 0; }
.notify-pop .np-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
}
.notify-pop .np-head button { border: none; background: none; color: var(--primary); font-size: 11.5px; padding: 0; }
.notify-pop .np-list { max-height: 320px; overflow: auto; }
.np-item { display: flex; gap: 10px; padding: 12px 15px; border-bottom: 1px solid #f4f7fb; }
.np-item:last-child { border-bottom: none; }
.np-item .np-ico {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; flex: none;
  background: var(--primary-soft); color: var(--primary);
}
.np-item .np-ico svg { width: 15px; height: 15px; }
.np-item .np-ico.amber { background: var(--amber-soft); color: #c47b06; }
.np-item .np-ico.green { background: var(--green-soft); color: #189a4b; }
.np-item b { display: block; font-size: 12.5px; font-weight: 500; }
.np-item p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.np-item time { display: block; font-size: 10.5px; color: #a8b2c2; margin-top: 3px; }

/* ---------------- Toast ---------------- */
.toast-root {
  position: fixed; top: 72px; right: 20px;
  z-index: 120;
  display: flex; flex-direction: column; gap: 9px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 9px;
  min-width: 240px; max-width: 360px;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(16,24,40,.12);
  font-size: 12.5px; color: var(--text-2);
  opacity: 0;
  transform: translateX(16px);
  transition: all .2s ease;
  pointer-events: auto;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--primary); }
.toast svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.toast .toast-icon { color: var(--green); }
.toast.error .toast-icon { color: var(--red); }
.toast.info .toast-icon { color: var(--primary); }

.sync-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 16px;
  align-items: start;
}
.hbar-list { display: flex; flex-direction: column; gap: 18px; padding: 8px 2px; }
.hbar-row {
  display: grid;
  grid-template-columns: 82px 1fr 34px;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-2);
}
.hbar-track { height: 10px; border-radius: 5px; background: #f1f5fa; overflow: hidden; }
.hbar-track > i { display: block; height: 100%; border-radius: 5px; transition: width .4s ease; }
.hbar-val { text-align: right; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1320px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1120px) {
  .chart-grid, .chart-grid.equal { grid-template-columns: 1fr; }
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-search { width: 170px; }
  .sync-grid { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .brand { width: auto; border-right: none; padding-right: 8px; }
  .brand-tag { display: none; }
  .topbar-title .crumb, .crumb-sep { display: none; }
  .sidebar { transform: translateX(-100%); box-shadow: 12px 0 40px rgba(0,0,0,.2); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .backdrop { display: block; }
  .content { margin-left: 0; }
  .main { padding: 16px 14px 32px; }
  .path-bar { padding: 0 14px; }
  body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
  .global-search { display: none; }
  .user-meta, .user .chev { display: none; }
  .lang-btn { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .topbar-title h1 { font-size: 15px; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .mini-grid { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
  .filter-bar { gap: 8px; }
  .field input { width: 150px; }
  .filter-actions { margin-left: 0; width: 100%; }
  .brand { padding: 0 10px; gap: 7px; }
  .brand-name { font-size: 15px; }
  .topbar-title { margin-left: 2px; }
  .topbar-title h1 { font-size: 14px; }
  .topbar-right { padding-right: 12px; gap: 6px; }
  .user { padding: 3px; }
  .divider { display: none; }
  .path-bar { padding: 0 14px; }
  .filter-grid { grid-template-columns: 1fr; }
  .filter-cell-actions { grid-column: span 1; }
  .table-toolbar { flex-wrap: wrap; padding: 10px 16px 0; }
  .store-summary { padding: 10px 16px; }
  .ss-item b { font-size: 17px; }
  .store-card-head { flex-wrap: wrap; }
  .modal.modal-lg .form-grid { grid-template-columns: 1fr; }
  .form-item.col2 { grid-column: 1; }
}

/* ============================================================
   门店交易统计
   ============================================================ */
.store-stats .stats-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.store-stats .stats-top h3 { font-size: 15px; font-weight: 600; color: var(--text); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  color: #6b7789; cursor: pointer;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn svg { width: 16px; height: 16px; }
.stats-filter-panel { padding: 16px 18px; }
.stats-filter-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.55fr 1fr 1fr;
  gap: 12px 18px;
}
.stats-filter-grid .filter-label {
  display: block; margin-bottom: 6px;
  font-size: 12px; color: #8b96a8;
}
.stats-filter-grid .input { width: 100%; height: 34px; }
.date-range { display: flex; align-items: center; gap: 8px; }
.date-range span { font-size: 12px; color: #98a2b3; }
.split-fields { display: grid; grid-template-columns: 1fr 1.1fr; gap: 8px; }
.stats-filter-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  padding-top: 14px;
}
.stats-filter-actions.left { justify-content: flex-start; }
.stats-table.data-stats-table { min-width: 1100px; }
.stats-dark {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: #0b1828;
  border-radius: 6px;
  margin-bottom: 16px;
  overflow: hidden;
}
.stats-dark-item { padding: 14px 18px; border-right: 1px solid rgba(255, 255, 255, .08); }
.stats-dark-item:last-child { border-right: none; }
.stats-dark-item em {
  display: block; text-align: center; font-style: normal;
  font-size: 12px; color: #b9c6d8;
}
.stats-dark-item strong {
  display: block; text-align: center;
  margin: 6px 0 10px;
  font-size: 16px; font-weight: 600; color: #fff;
}
.stats-dark-item ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stats-dark-item li {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12px; color: #c7d2e0;
}
.stats-dark-item li b { font-weight: 400; color: #e8eef7; }
.stats-dark-item strong.red { color: #ff5f66; }
.stats-table.refund-stats-table { min-width: 900px; }
.stats-dark.compact { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.stats-dark.compact .stats-dark-item { padding: 10px 12px; text-align: center; }
.stats-dark.compact .stats-dark-item em { font-size: 11.5px; }
.stats-dark.compact .stats-dark-item strong { margin: 4px 0 0; font-size: 13px; }
.stats-total-label { margin: 0 0 8px; font-size: 12.5px; color: #66727f; }
.stats-table.merchant-table { min-width: 1040px; }
.stats-table { min-width: 1120px; }
.stats-table thead th, .stats-table tbody td { padding: 8px 6px; font-size: 12px; }
.stats-table thead th { text-align: center; white-space: nowrap; }
/* 单行表头的明细表：表头与内容统一左对齐，避免信息错位 */
.split-table thead th,
.split-rules-table thead th,
.bills-table thead th:not(.checkbox-cell) { text-align: left; }
.stats-table thead th.group { border-left: 1px solid #eef2f7; }
.stats-table thead tr:nth-child(2) th:nth-child(odd) { border-left: 1px solid #eef2f7; }
.stats-table td.stats-empty {
  padding: 28px 0; text-align: center;
  color: #98a2b3; font-size: 12.5px;
}
.stats-summary { display: grid; gap: 10px; }
.stats-summary div {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  background: #f7f9fc; border-radius: 8px;
  font-size: 13px; color: var(--text-2);
}
.stats-summary b { font-weight: 600; color: var(--text); }
.stats-tip { margin: 14px 0 0; font-size: 12px; color: #98a2b3; }

/* 订单查询 */
.order-filters { display: grid; grid-template-columns: 1fr 1.2fr; gap: 22px 30px; }
.order-filter-col {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px 12px; align-content: start;
}
.order-filter-col.right { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.order-filter-col .span-3 { grid-column: span 3; }
.order-filter-col .span-4 { grid-column: span 4; }
.order-filter-col .span-12 { grid-column: span 12; }
.order-filter-col .input { width: 100%; height: 32px; font-size: 12.5px; }
.datetime-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.datetime-range > span { font-size: 12px; color: #98a2b3; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 26px; }
.input-suffix > span {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: #98a2b3;
}
.order-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.stats-dark.compact.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-dark.compact.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-table.order-table { min-width: 1040px; }
.provider-filter-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.3fr auto;
  gap: 16px; align-items: end;
}
.provider-filter-row .filter-label { display: block; margin-bottom: 6px; font-size: 12px; color: #8b96a8; }
.provider-filter-row .input { width: 100%; height: 34px; }
.provider-filter-actions { display: flex; gap: 8px; padding-bottom: 1px; }
.stats-table.provider-stats-table { min-width: 900px; }
.stats-table.settle-table { min-width: 1120px; }
.stats-table.settle-table thead th { background: #f5f7fa; color: #5c6779; }
.stats-dark.compact.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-table.split-table { min-width: 980px; }
.split-table .cell-strong { color: #1d2635; font-weight: 600; }
.split-table .cell-sub { margin-top: 3px; font-size: 12px; color: #98a2b3; }
.split-tag {
  display: inline-block; padding: 1px 8px; border-radius: 3px;
  background: #fff4e8; border: 1px solid #ffdcb8; color: #f28c28; font-size: 12px;
}
.split-status { color: #1677ff; }
.split-table .link { border: 0; background: none; color: #1677ff; cursor: pointer; padding: 0; font-size: 13px; }

/* 分账规则 */
.split-page-head { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }

/* 分账账单 */
.bill-filter-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.4fr;
  gap: 16px; align-items: end;
}
.bill-filter-grid .filter-label { display: block; margin-bottom: 6px; font-size: 12px; color: #8b96a8; }
.bill-filter-grid .input { width: 100%; height: 34px; }
.stats-dark.bills { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.stats-dark.bills .stats-dark-item strong { font-size: 12.5px; }
.bills-table { min-width: 1880px; }
.bills-table th, .bills-table td { white-space: nowrap; }
.checkbox-cell { width: 38px; text-align: center; padding-left: 10px !important; padding-right: 6px !important; }
.checkbox-cell input { width: 14px; height: 14px; accent-color: #1677ff; cursor: pointer; }
.bill-status { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 12px; }
.bill-status.fail { color: #e5484d; background: #fff1f0; border: 1px solid #ffd6d3; }
.bill-status.warn { color: #f28c28; background: #fff7e8; border: 1px solid #ffe1b8; }
.bill-status.ok { color: #1a9c62; background: #ecfbf2; border: 1px solid #c9f2da; }
.bill-actions { white-space: nowrap; }
.bill-icon {
  width: 24px; height: 24px; padding: 3px; margin-right: 6px;
  border: 0; background: none; color: #1677ff; cursor: pointer; vertical-align: middle;
}
.bill-icon svg { width: 100%; height: 100%; }
.page-jump {
  width: 40px; height: 26px; margin: 0 4px; text-align: center;
  border: 1px solid #dfe4ec; border-radius: 4px; font-size: 12.5px; color: #1d2635;
}
.bill-modal { width: 520px; max-width: calc(100vw - 32px); }
.bill-form { padding: 4px 2px 2px; }
.bill-field { margin-bottom: 16px; }
.bill-field > label { display: block; margin-bottom: 8px; font-size: 13px; color: #2b3444; font-weight: 500; }
.bill-field .input { width: 100%; height: 36px; }

/* 角色管理 */
.role-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; padding: 4px 2px 2px; }
.role-form .full { grid-column: span 2; }
.role-form .field-hint { margin-top: 6px; font-size: 12px; color: #8b96a8; }
.scope-box {
  border: 1px solid #dfe4ec; border-radius: 6px; padding: 10px 12px;
  max-height: 132px; overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px;
}
.scope-box.error { border-color: #e5484d; }
.scope-box label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #2b3444; cursor: pointer; }
.scope-box input { accent-color: #1677ff; }
.scope-box.role-scope { display: block; max-height: 240px; }
.role-scope .scope-group { margin-bottom: 12px; }
.role-scope .scope-group:last-child { margin-bottom: 0; }
.role-scope .scope-title { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #6b7688; }
.role-scope .scope-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }

/* 侧导航空状态 */
.nav-empty { padding: 18px; font-size: 12.5px; line-height: 1.7; color: rgba(255, 255, 255, .55); }

/* 课程管理 */
.course-filter-panel { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 16px; }
.course-filter-panel .input { width: 240px; height: 34px; }
.course-table { min-width: 1080px; }
/* 与门店列表表格样式保持一致：表头左对齐、单元格内边距统一 */
.course-table th, .course-table td { white-space: nowrap; }
.course-table thead th { text-align: left; padding: 11px 12px; }
.course-table tbody td { padding: 12px 12px; font-size: 13px; }
/* 表头与操作列固定，窄屏横向滚动时始终可见 */
.table-scroll table.data.pin-actions thead th:last-child,
.table-scroll table.data.pin-actions tbody td:last-child {
  position: sticky; right: 0; z-index: 2;
  background: #fff;
  box-shadow: -12px 0 16px -14px rgba(15, 23, 42, .35);
}
.table-scroll table.data.pin-actions thead th:last-child { background: #fafbfd; z-index: 4; }
.table-scroll table.data.pin-actions tbody tr:hover td:last-child { background: #f8fbff; }
.course-link { display: flex; align-items: center; gap: 6px; max-width: 180px; }
.course-link span { font-size: 12px; color: #6b7688; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; padding: 4px 2px 2px; }
.course-form .full { grid-column: span 2; }
.course-form .textarea { width: 100%; height: 84px; }
.copy-box { background: #f6f8fb; border: 1px dashed #dfe4ec; border-radius: 6px; padding: 12px 14px; }
.copy-box code { font-size: 12.5px; color: #1d2635; word-break: break-all; }

/* 课程新增 / 编辑二级页 */
.subpage-head { margin-bottom: 16px; }
.subpage-head h2 { font-size: 19px; font-weight: 600; color: var(--text); margin: 10px 0 5px; }
.subpage-head p { font-size: 12.5px; color: var(--muted); margin: 0; }
.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  border: 0; background: none; padding: 0;
  color: var(--text-2); font-size: 12.5px; cursor: pointer;
  transition: color .15s;
}
.back-link svg { width: 15px; height: 15px; }
.back-link:hover { color: var(--primary); }

.course-edit-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.course-edit-grid > .panel + .panel,
.course-detail-grid > .panel + .panel { margin-top: 0; }
.course-edit-grid > .panel { display: flex; flex-direction: column; }
.course-edit-grid > .panel > .card-body { flex: 1; }
.course-form-body { display: flex; flex-direction: column; gap: 16px; }
.course-form-body .form-label {
  display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px;
}
.req-tip { color: var(--red); margin-right: 3px; }
.course-form-body .input { height: 38px; }
.course-form-body .textarea { min-height: 92px; }

/* 课程简介富文本编辑器 */
.rich-editor {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.rich-editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22, 119, 255, .08); }
.rich-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  padding: 6px 8px;
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
}
.rt-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 8px;
  border: 1px solid transparent; border-radius: 5px;
  background: none; color: #5b667a;
  font-size: 12px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.rt-btn:hover { background: #eef4ff; border-color: #d6e4fb; color: var(--primary); }
.rt-btn b, .rt-btn i, .rt-btn u { font-size: 13px; line-height: 1; }
.rt-btn svg { width: 14px; height: 14px; }
.rt-sep { width: 1px; height: 16px; background: var(--border); margin: 0 2px; }
.rich-body {
  min-height: 104px; max-height: 280px; overflow-y: auto;
  padding: 10px 12px;
  font-size: 13px; line-height: 1.75; color: var(--text);
  outline: none;
}
.rich-body.is-empty::before {
  content: attr(data-placeholder);
  color: #a9b4c4;
  pointer-events: none;
}
.rich-body p { margin: 0 0 6px; }
.rich-body ul, .rich-body ol { margin: 4px 0 6px; padding-left: 20px; }
.rich-body img { display: block; max-width: 100%; margin: 6px 0; border-radius: 6px; }

/* 课程详情二级页 */
.course-detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.course-detail-grid .detail-list { gap: 16px 20px; }
.course-detail-grid .detail-list .full { grid-column: span 2; }
.detail-link { display: flex; align-items: center; gap: 8px; min-width: 0; }
.detail-link .link-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #6b7688; }
.detail-cover { aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #f8fafd; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-cover-empty { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #a9b4c4; font-size: 12px; }
.detail-cover-empty svg { width: 38px; height: 38px; }
.rich-content { font-size: 13px; line-height: 1.8; color: var(--text); word-break: break-word; }
.rich-content p { margin: 0 0 8px; }
.rich-content ul, .rich-content ol { margin: 6px 0 10px; padding-left: 20px; }
.rich-content img { display: block; max-width: 100%; margin: 8px 0; border-radius: 6px; }
.detail-empty-text { margin: 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 1024px) {
  .course-detail-grid { grid-template-columns: minmax(0, 1fr); }
}

.course-cover {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  aspect-ratio: 16 / 9; width: 100%;
  border: 1px dashed #c9d6e8; border-radius: var(--radius-sm);
  background: #f8fafd; color: #9aa7ba;
  cursor: pointer; overflow: hidden;
  transition: border-color .15s, background .15s;
}
.course-cover:hover { border-color: var(--primary); background: #f3f8ff; color: var(--primary); }
.course-cover svg { width: 38px; height: 38px; }
.course-cover b { font-size: 13px; font-weight: 500; }
.course-cover small { font-size: 11.5px; color: #a9b4c4; }
.course-cover.has-image { border-style: solid; border-color: var(--border); background: #fff; }
.course-cover.has-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-cover.error { border-color: #e5484d; background: #fff7f7; }
.cover-actions { display: flex; gap: 8px; margin-top: 12px; }
.cover-actions .btn { flex: 1; justify-content: center; }
.btn.ghost.danger-ghost { color: var(--red); border-color: #f4c9c9; }
.btn.ghost.danger-ghost:hover { background: var(--red-soft); border-color: #efb0b0; }
.cover-tip { font-size: 11.5px; color: var(--muted); line-height: 1.7; margin: 10px 0 0; }

.subpage-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 16px; padding: 14px 18px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.subpage-actions .btn { min-width: 96px; justify-content: center; }

@media (max-width: 900px) {
  .course-edit-grid { grid-template-columns: minmax(0, 1fr); }
  .course-cover-panel .card-body { max-width: 420px; }
}

/* 门店分账 */
.ss-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.ss-group { display: flex; flex-direction: column; gap: 12px; }
.ss-line { display: grid; gap: 12px; }
.ss-line.c2 { grid-template-columns: 1fr 1fr; }
.ss-line.c3 { grid-template-columns: 1fr 1fr 1fr; }
.ss-line .input { width: 100%; height: 34px; min-width: 0; }
.ss-date { grid-template-columns: 1fr auto 1fr; align-items: center; }
.ss-sep { color: #8b96a8; font-size: 12px; }
.ss-actions { display: flex; justify-content: center; gap: 8px; padding: 14px 0 4px; }
.stats-dark.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.store-split-table { min-width: 1260px; }
.store-split-table th, .store-split-table td { white-space: nowrap; }
.stats-filter-grid .daily-filter-actions { display: flex; flex-direction: row; align-items: center; gap: 8px; height: 34px; }
.daily-table { min-width: 1780px; }
.stats-filter-grid .withdraw-actions { display: flex; flex-direction: row; align-items: center; gap: 8px; height: 34px; }
.withdraw-grid { grid-template-columns: 1.35fr 1fr 1fr 1fr; }
.transfer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.transfer-actions { display: flex; gap: 8px; margin-top: 14px; }
.stats-dark.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.transfer-table { min-width: 1220px; }
.transfer-table th, .transfer-table td { white-space: nowrap; }
.stats-filter-grid .date-range .input { font-size: 12px; padding: 0 8px; }
.withdraw-table { min-width: 1420px; }
.withdraw-table th, .withdraw-table td { white-space: nowrap; }
.daily-table th, .daily-table td { white-space: nowrap; }
.daily-table thead tr:first-child th { border-bottom: 1px solid #e6ebf2; }
.daily-table thead tr:last-child th { font-size: 11.5px; color: #6b7688; }
.split-rules-table { min-width: 1560px; }
.split-rules-table th { white-space: nowrap; }
.split-actions { white-space: nowrap; }
.split-actions .link { margin-right: 12px; }
.fee-lines { font-size: 12px; color: #5c6779; line-height: 1.7; }
.fee-lines span { display: block; }
.muted { color: #c2c9d4; }
.outline-link {
  border: 1px solid #a9c9ff; background: #f5f9ff; color: #1677ff;
  font-size: 12px; padding: 2px 8px; border-radius: 3px; cursor: pointer;
}
.outline-link:hover { background: #eaf3ff; }
.link { border: 0; background: none; color: #1677ff; cursor: pointer; padding: 0; font-size: 13px; }
.danger-text { color: #e5484d !important; }
.confirm-text { font-size: 13.5px; color: #3d4757; line-height: 1.8; margin: 4px 0 2px; }
.btn.danger { background: #e5484d; border-color: #e5484d; color: #fff; }
.btn.danger:hover { background: #d93c41; border-color: #d93c41; }
.split-modal { width: 720px; max-width: calc(100vw - 32px); }
.split-form { border: 1px solid #eef1f5; border-radius: 6px; padding: 18px 18px 22px; }
.split-field { margin-bottom: 16px; }
.split-field > label { display: block; margin-bottom: 8px; font-size: 13px; color: #2b3444; font-weight: 500; }
.split-field .input, .split-field select.input { width: 100%; height: 36px; }
.radio-line { display: flex; gap: 26px; padding: 5px 0; }
.radio-line label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #3d4757; cursor: pointer; }
.radio-line input { width: 15px; height: 15px; accent-color: #1677ff; }
.suffix-input { display: flex; }
.suffix-input .input { border-radius: 4px 0 0 4px; }
.suffix-input > span {
  display: flex; align-items: center; padding: 0 12px; background: #f5f6f8;
  border: 1px solid #dfe4ec; border-left: 0; border-radius: 0 4px 4px 0;
  color: #5c6779; font-size: 12.5px; white-space: nowrap;
}
.split-toggle-row { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; font-size: 13px; color: #2b3444; }
.ml-auto { margin-left: auto; }
.split-receiver-table { width: 100%; border-collapse: collapse; }
.split-receiver-table th {
  background: #f5f6f8; text-align: left; padding: 10px 12px; font-size: 12.5px;
  color: #5c6779; font-weight: 500; border: 1px solid #eef0f4;
}
.split-receiver-table td { padding: 10px 12px; border: 1px solid #eef0f4; }
.switch { position: relative; display: inline-block; width: 38px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #d6dbe4; border-radius: 20px; transition: 0.2s; }
.switch i::after {
  content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: 0.2s;
}
.switch input:checked + i { background: #20b26c; }
.switch input:checked + i::after { transform: translateX(18px); }
.link-text { color: #1677ff; font-size: 13px; }
.split-form .input.error { border-color: #e5484d; }

@media (max-width: 980px) {
  .order-filters { grid-template-columns: 1fr; }
  .stats-dark.compact.four, .stats-dark.compact.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-filter-row { grid-template-columns: 1fr 1fr; }
  .provider-filter-actions { grid-column: span 2; }
  .bill-filter-grid { grid-template-columns: 1fr 1fr; }
  .stats-dark.bills { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ss-groups { grid-template-columns: 1fr; gap: 12px; }
  .stats-dark.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .order-filter-col { grid-template-columns: 1fr; }
  .order-filter-col .span-3, .order-filter-col .span-4, .order-filter-col .span-12 { grid-column: span 1; }
  .stats-dark.compact.four, .stats-dark.compact.three, .stats-dark.compact.two { grid-template-columns: 1fr; }
  .provider-filter-row { grid-template-columns: 1fr; }
  .provider-filter-actions { grid-column: span 1; }
  .bill-filter-grid { grid-template-columns: 1fr; }
  .stats-dark.bills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ss-line.c3 { grid-template-columns: 1fr; }
  .stats-dark.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .stats-filter-grid { grid-template-columns: 1fr 1fr; }
  .stats-dark, .stats-dark.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-dark-item { border-bottom: 1px solid rgba(255, 255, 255, .08); }
}
@media (max-width: 560px) {
  .stats-filter-grid { grid-template-columns: 1fr; }
  .stats-dark, .stats-dark.compact { grid-template-columns: 1fr; }
  .stats-dark-item { border-right: none; }
}

/* ============================================================
   菜单管理 · 分类 / 一级分类 / 二级分类权限矩阵
   ============================================================ */
.menu-perm-panel { overflow: hidden; }
.menu-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.menu-search { position: relative; width: 280px; max-width: 100%; }
.menu-search svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: #a3aec0; pointer-events: none;
}
.menu-search .input { width: 100%; height: 34px; padding-left: 32px; }
.menu-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.menu-count { font-size: 12px; color: #8b95a7; }
.menu-count b { color: var(--primary); font-weight: 600; }

.menu-matrix-wrap { overflow-x: auto; }
.menu-matrix { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 13px; }
.menu-matrix thead th {
  background: #f7f9fc; color: #45536a; font-weight: 600; text-align: left;
  padding: 13px 20px; border-bottom: 1px solid var(--border);
  border-right: 1px solid #eef2f7; white-space: nowrap;
}
.menu-matrix thead th:last-child { border-right: 0; }
.menu-matrix th.col-domain { width: 120px; }
.menu-matrix th.col-group { width: 200px; }
.menu-matrix td {
  padding: 16px 20px; border-bottom: 1px solid #eef2f7;
  border-right: 1px solid #eef2f7; vertical-align: top;
}
.menu-matrix td:last-child { border-right: 0; }
.menu-matrix tbody tr:last-child td { border-bottom: 0; }
.menu-matrix .menu-domain,
.menu-matrix .menu-group { background: #fbfcfe; vertical-align: middle; }
.menu-matrix .menu-domain .perm-check { font-weight: 600; color: #31405a; }
.menu-matrix .menu-group .perm-check { color: #3d4a5c; }

.menu-item-block { padding: 2px 0 12px; }
.menu-item-block + .menu-item-block { margin-top: 8px; border-top: 1px dashed #eef2f7; padding-top: 16px; }
.menu-item-block:last-child { padding-bottom: 0; }
.perm-children {
  position: relative; display: flex; flex-wrap: wrap;
  gap: 12px 26px; margin: 10px 0 0 26px; padding-left: 20px;
}
.perm-children::before {
  content: ''; position: absolute; left: 4px; top: -6px; bottom: 2px;
  width: 1px; background: #e4eaf3;
}

.perm-check {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; line-height: 1.5; color: #42506a;
  cursor: pointer; user-select: none;
}
.perm-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.perm-check .box {
  width: 16px; height: 16px; flex: 0 0 auto; position: relative;
  border: 1px solid #c7d1e0; border-radius: 4px; background: #fff;
  transition: background .15s, border-color .15s;
}
.perm-check:hover .box { border-color: #2f7cf6; }
.perm-check input:checked + .box,
.perm-check input:indeterminate + .box { background: #2f7cf6; border-color: #2f7cf6; }
.perm-check input:checked + .box::after {
  content: ''; position: absolute; left: 4.5px; top: 1.5px;
  width: 5px; height: 8px; border: 1.8px solid #fff;
  border-top: 0; border-left: 0; transform: rotate(42deg);
}
.perm-check input:indeterminate + .box::after {
  content: ''; position: absolute; left: 3px; top: 7px;
  width: 8px; height: 2px; border-radius: 1px; background: #fff;
}
.perm-check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(47, 124, 246, .18); }
.perm-check .warn { color: #f08a2e; }

@media (max-width: 760px) {
  .menu-search { width: 100%; }
  .menu-tools { width: 100%; justify-content: flex-end; }
}
