/* 骑骑养车 ERP（企云乐复刻站）样式 —— layui 风格 */
:root {
  --blue: #1e9fff;
  --blue-d: #1782d6;
  --rail-a: #3b8ce8;
  --rail-b: #1f6fd8;
  --bg: #f0f2f5;
  --line: #e6e6e6;
  --line-l: #f0f0f0;
  --text: #333;
  --text-2: #666;
  --text-3: #999;
  --green: #16b777;
  --red: #ff5722;
  --orange: #ffb800;
  --purple: #a233c6;
  --radius: 4px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 13px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: 13px; color: var(--text); outline: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c9ccd1; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
.hide { display: none !important; }

/* ------------------------------ 登录页 */
#login {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2b6fd6 0%, #1e9fff 55%, #34c6d6 100%);
  z-index: 100;
}
.login-card {
  width: 380px; background: #fff; border-radius: 8px; padding: 34px 34px 26px;
}
.login-card h1 { margin: 0 0 4px; font-size: 20px; font-weight: 500; color: #1c2b3a; }
.login-card .sub { color: var(--text-3); font-size: 12px; margin-bottom: 24px; }
.login-card label { display: block; font-size: 13px; color: var(--text-2); margin: 14px 0 6px; }
.login-card input {
  width: 100%; height: 40px; border: 1px solid #dcdfe6; border-radius: var(--radius);
  padding: 0 12px; transition: border-color .15s;
}
.login-card input:focus { border-color: var(--blue); }
.login-card button {
  width: 100%; height: 42px; margin-top: 22px; background: var(--blue); color: #fff;
  border: 0; border-radius: var(--radius); font-size: 15px; cursor: pointer;
}
.login-card button:hover { background: var(--blue-d); }
.login-tip { margin-top: 14px; font-size: 12px; color: var(--text-3); text-align: center; }
.login-err { color: var(--red); font-size: 12px; margin-top: 10px; min-height: 18px; }

/* ------------------------------ 主框架 */
#app { display: flex; height: 100vh; overflow: hidden; }

.rail {
  width: 70px; flex: 0 0 70px; background: linear-gradient(180deg, var(--rail-a), var(--rail-b));
  display: flex; flex-direction: column; align-items: center; padding-top: 8px; z-index: 30;
}
.rail .logo {
  width: 50px; height: 50px; background: #fff; border-radius: 8px; margin-bottom: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15;
}
.rail .logo b { color: #1f6fd8; font-size: 12px; font-weight: 600; letter-spacing: -.5px; }
.rail .logo i { font-style: normal; font-size: 9px; color: #7d93ad; }
.rail-item {
  width: 100%; height: 62px; color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; cursor: pointer; gap: 3px;
  border-left: 3px solid transparent; transition: background .15s;
}
.rail-item:hover { background: rgba(255, 255, 255, .12); }
.rail-item.on { background: rgba(255, 255, 255, .2); border-left-color: #fff; }
.rail-item svg { width: 21px; height: 21px; }
.rail-item span { font-size: 12px; }
.rail-foot { margin-top: auto; padding: 10px 0 14px; color: rgba(255, 255, 255, .75); font-size: 11px; text-align: center; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 46px; flex: 0 0 46px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 12px; gap: 10px;
}
.topbar .home-btn {
  width: 28px; height: 28px; border: 1px solid #e3e6ea; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: #4a5a6a;
}
.topbar .home-btn:hover { background: #f5f7fa; }
.topbar .shop { font-size: 14px; font-weight: 500; color: #22303f; }
/* 当前门店切换器：全站数据的门店口径总开关 */
.topbar .shop-sw { position: relative; display: flex; align-items: center; gap: 5px;
  padding: 3px 9px 3px 8px; border-radius: 6px; cursor: pointer; color: #22303f;
  border: 1px solid transparent; }
.topbar .shop-sw:hover { background: #f2f6fc; border-color: #dde6f2; }
.topbar .shop-sw.on { background: #eaf3ff; border-color: #bcd9ff; color: var(--blue); }
.topbar .shop-pop { position: absolute; top: 32px; left: -6px; z-index: 60; min-width: 240px;
  background: #fff; border: 1px solid #e6eaf0; border-radius: 8px; box-shadow: 0 8px 26px rgba(20,40,80,.14);
  padding: 5px; }
.topbar .shop-pop .sp-head { font-size: 11px; color: var(--text-3); padding: 6px 10px 4px; }
.topbar .shop-pop a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px;
  font-size: 13px; color: #22303f; cursor: pointer; }
.topbar .shop-pop a:hover { background: #f4f7fb; }
.topbar .shop-pop a.cur { background: #eaf3ff; color: var(--blue); font-weight: 500; }
.topbar .shop-pop a .ck { margin-left: auto; font-size: 12px; }
.topbar .shop-pop a small { color: var(--text-3); font-weight: 400; }
.mch-lock { font-size: 11px; color: var(--text-3); margin-top: 2px; }
select:disabled { background: #f5f7fa; color: #6b7280; }
.topbar .sep { color: #dfe3e8; }
.topbar .expire { font-size: 12px; color: var(--text-3); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-2); }
.topbar .right a { color: var(--text-2); }
.topbar .right a:hover { color: var(--blue); }
.topbar .who { display: flex; align-items: center; gap: 4px; cursor: pointer; }

.tabbar {
  height: 36px; flex: 0 0 36px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: stretch; overflow: hidden; padding-left: 4px;
}
.tabbar .navbtn {
  width: 26px; display: flex; align-items: center; justify-content: center;
  color: #a8b0b8; cursor: pointer; border-right: 1px solid #f2f2f2;
}
.tabbar .navbtn:hover { color: var(--blue); }
.tabbar .tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
.tabbar .tabs::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: center; gap: 6px; padding: 0 14px; white-space: nowrap;
  cursor: pointer; color: var(--text-2); font-size: 13px; border-right: 1px solid #f2f2f2;
  border-top: 2px solid transparent;
}
.tab.on { color: var(--blue); border-top-color: var(--blue); background: #f7fbff; }
.tab .x { color: #c0c6cc; font-size: 12px; }
.tab .x:hover { color: var(--red); }

.content { flex: 1; overflow: auto; padding: 12px; position: relative; }

/* ------------------------------ 弹出子菜单（推开内容，不遮挡表格） */
.flyout {
  flex: 0 0 232px; width: 232px; background: #fff;
  border-right: 1px solid var(--line); z-index: 20; overflow-y: auto;
  padding: 10px 0 20px;
}
.flyout h3 {
  font-size: 12px; color: var(--text-3); font-weight: 500; margin: 12px 16px 6px;
  padding-bottom: 6px; border-bottom: 1px solid #f2f2f2;
}
.flyout a {
  display: block; padding: 8px 16px 8px 22px; color: #3d4a57; font-size: 13px; cursor: pointer;
}
.flyout a:hover { background: #f2f8ff; color: var(--blue); }
.flyout a.on { background: #eaf4ff; color: var(--blue); font-weight: 500; }

/* ------------------------------ 卡片 / 面板 */
.card { background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card-h { font-size: 14px; font-weight: 500; color: #22303f; margin: 0 0 14px; }
.card-h .more { font-size: 12px; color: var(--text-3); font-weight: 400; float: right; }

.kpis { display: flex; gap: 12px; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); flex: 1; }
.kpi {
  padding: 14px 16px; border-right: 1px solid var(--line-l); text-align: center;
}
.kpi:last-child { border-right: 0; }
.kpi .v { font-size: 22px; font-weight: 500; color: #1c2b3a; line-height: 1.3; }
.kpi .l { font-size: 12px; color: var(--text-3); }
.kpi .d { font-size: 11px; color: #b6bcc4; }
.kpi-pend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 0; background: #fff; padding: 12px 6px; }
.kpi-pend .kpi { border-right: 1px solid #f5f5f5; padding: 6px 4px; }
.kpi-pend .kpi:nth-child(3n) { border-right: 0; }
.kpi-pend .v { font-size: 18px; }

.quick { display: flex; flex-wrap: wrap; gap: 12px; }
.q-big {
  width: 190px; height: 92px; border-radius: var(--radius); color: #fff; padding: 16px 18px;
  cursor: pointer; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(135deg, #4aa3ff, #1e7fe8);
}
.q-big.alt { background: linear-gradient(135deg, #a6d4ff, #7dbcf7); color: #1b5fa8; }
.q-big b { font-size: 17px; font-weight: 500; }
.q-big span { font-size: 12px; opacity: .9; }
.q-sm {
  height: 42px; min-width: 118px; display: flex; align-items: center; gap: 7px;
  padding: 0 15px; background: #f7f8fa; border-radius: var(--radius); cursor: pointer;
  color: #3d4a57; font-size: 13px;
}
.q-sm:hover { background: #eef4fd; color: var(--blue); }
.q-sm svg { width: 15px; height: 15px; }

.sumgrid { display: grid; grid-template-columns: repeat(8, 1fr); text-align: center; }
.sumgrid .v { font-size: 17px; font-weight: 500; color: #1c2b3a; }
.sumgrid .l { font-size: 12px; color: var(--text-3); }

/* ------------------------------ 表格 */
.toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: #fff;
  padding: 10px 12px; border-radius: var(--radius); margin-bottom: 10px;
}
.toolbar .sp { flex: 1; }
.btn {
  height: 32px; padding: 0 14px; border: 1px solid #dcdfe6; background: #fff; color: var(--text);
  border-radius: var(--radius); cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.pri { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.pri:hover { background: var(--blue-d); border-color: var(--blue-d); color: #fff; }
.btn.dan { background: var(--red); border-color: var(--red); color: #fff; }
.btn.dan:hover { opacity: .88; color: #fff; }
.btn.mini { height: 26px; padding: 0 9px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.inp, .sel {
  height: 32px; border: 1px solid #dcdfe6; border-radius: var(--radius); padding: 0 9px;
  background: #fff; min-width: 130px;
}
.inp:focus, .sel:focus { border-color: var(--blue); }
.field { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.field > label { white-space: nowrap; }
.chk { display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: 13px; color: var(--text-2); }

.grid { background: #fff; border-radius: var(--radius); overflow: hidden; }
table.tb { width: 100%; border-collapse: collapse; }
table.tb th {
  background: #fafbfc; font-weight: 500; color: #4a5a6a; text-align: left; white-space: nowrap;
  padding: 10px 10px; border-bottom: 1px solid var(--line); font-size: 13px; position: sticky; top: 0; z-index: 2;
}
table.tb td {
  padding: 8px 10px; border-bottom: 1px solid var(--line-l); color: #3d4a57; font-size: 13px;
  vertical-align: middle;
}
table.tb tbody tr:hover { background: #f7fbff; }
table.tb tfoot td { background: #fffdf5; font-weight: 500; color: #d2451e; border-bottom: 0; }
table.tb td.num, table.tb th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tb td.ctr, table.tb th.ctr { text-align: center; }
table.tb .ell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.link { color: var(--blue); cursor: pointer; }
.link:hover { text-decoration: underline; }
.empty { padding: 46px 0; text-align: center; color: #b6bcc4; }

.tag {
  display: inline-block; padding: 1px 7px; border-radius: 2px; font-size: 12px; line-height: 18px;
}
.tag.g { background: #eafaf1; color: var(--green); border: 1px solid #c7f0da; }
.tag.r { background: #fff0ec; color: var(--red); border: 1px solid #ffd5c8; }
.tag.o { background: #fff8e6; color: #c98a00; border: 1px solid #ffe6ad; }
.tag.b { background: #eef5ff; color: var(--blue); border: 1px solid #cfe4ff; }
.tag.n { background: #f4f5f7; color: #9099a5; border: 1px solid #e6e8ec; }

.acts { display: flex; gap: 5px; flex-wrap: wrap; }
.act {
  padding: 1px 7px; border-radius: 2px; font-size: 12px; cursor: pointer; color: #fff;
  line-height: 18px; white-space: nowrap;
}
.act.b { background: var(--blue); }
.act.p { background: var(--purple); }
.act.o { background: #f0a020; }
.act.g { background: var(--green); }
.act.r { background: var(--red); }
.act.n { background: #98a3b0; }
.act:hover { opacity: .85; }

.pager {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #fff;
  border-top: 1px solid var(--line-l); font-size: 13px; color: var(--text-2); flex-wrap: wrap;
}
.pager .pg {
  min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid #dcdfe6; background: #fff;
  border-radius: 2px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.pager .pg.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager .pg:hover:not(.on) { border-color: var(--blue); color: var(--blue); }

/* ------------------------------ 表单 */
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 16px; }
.form-grid .f { display: flex; flex-direction: column; gap: 5px; }
.form-grid .f > label { font-size: 12.5px; color: var(--text-2); }
.form-grid .f.req > label::before { content: "*"; color: var(--red); margin-right: 3px; }
.form-grid .f input, .form-grid .f select, .form-grid .f textarea {
  height: 34px; border: 1px solid #dcdfe6; border-radius: var(--radius); padding: 0 9px; width: 100%;
}
.form-grid .f textarea { height: 62px; padding: 7px 9px; resize: vertical; }
.form-grid .f.wide { grid-column: span 2; }
.form-grid .f.full { grid-column: 1 / -1; }

.items-tb { width: 100%; border-collapse: collapse; }
.items-tb th {
  background: #fafbfc; font-weight: 500; color: #4a5a6a; padding: 8px 6px; font-size: 12.5px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.items-tb td { padding: 4px 5px; border-bottom: 1px solid var(--line-l); }
.items-tb input, .items-tb select {
  width: 100%; height: 30px; border: 1px solid #e3e6ea; border-radius: 2px; padding: 0 7px;
}
.items-tb input:focus, .items-tb select:focus { border-color: var(--blue); }
.items-tb .rowop { display: flex; gap: 3px; justify-content: center; }
.items-tb .rowop i {
  width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; color: #fff; font-style: normal; font-size: 13px; cursor: pointer; line-height: 1;
}
.items-tb .rowop i.add { background: var(--green); }
.items-tb .rowop i.del { background: var(--red); }
.items-tb tfoot td { padding: 9px 6px; font-weight: 500; }

.sum-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 4px 0; }
.sum-bar .item { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.sum-bar .item b { color: #d2451e; font-size: 15px; font-weight: 500; }
.save-bar {
  display: flex; justify-content: center; gap: 12px; padding: 16px 0 4px;
  border-top: 1px solid var(--line-l); margin-top: 14px;
}

/* ------------------------------ 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.modal { background: #fff; border-radius: 6px; width: 560px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; }
.modal.wide { width: 880px; }
.modal-h {
  padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-h .x { cursor: pointer; color: #b6bcc4; font-size: 18px; line-height: 1; }
.modal-h .x:hover { color: var(--red); }
.modal-b { padding: 18px; overflow: auto; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

.toast {
  position: fixed; left: 50%; top: 24px; transform: translateX(-50%); z-index: 400;
  padding: 9px 20px; border-radius: 4px; color: #fff; background: #333c47; font-size: 13px;
}
.toast.ok { background: #16b777; }
.toast.err { background: #ff5722; }

/* ------------------------------ 图表 */
.chart-wrap { position: relative; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-3); justify-content: flex-end; padding-bottom: 6px; }

/* ------------------------------ 建设中 */
.building { padding: 70px 0; text-align: center; }
.building .ico { font-size: 34px; color: #d6dbe1; }
.building h2 { font-size: 16px; font-weight: 500; color: #4a5a6a; margin: 14px 0 6px; }
.building p { color: var(--text-3); font-size: 13px; margin: 3px 0; }
.building .path { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: #b6bcc4; }

@media (max-width: 1100px) {
  .kpis { flex-direction: column; }
  .sumgrid { grid-template-columns: repeat(4, 1fr); gap: 10px 0; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------ 商品选择器（三级分类筛选 + 多选） */
/* 加了「辅助属性」列后 1080 偏挤，加宽到 1180 */
.modal.xwide { width: 1180px; }
.pk-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pk-filter .inp { flex: 1; }
.pk-filter select { flex: 0 0 190px; height: 32px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.pk-count { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.pk-tree { border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 10px; background: #fafbfc; margin-bottom: 10px; }
.pk-row { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; }
.pk-row + .pk-row { border-top: 1px dashed var(--line-l); }
.pk-lb { flex: 0 0 38px; font-size: 12px; color: var(--text-3); padding-top: 4px; }
.pk-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2); font-size: 12px;
  cursor: pointer; user-select: none; transition: all .12s; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip em { font-style: normal; opacity: .65; font-size: 11px; }
.chip.off { opacity: .4; cursor: not-allowed; }
.chip.off:hover { border-color: var(--line); color: var(--text-2); }
.pk-tbl { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.pk-tbl table { width: 100%; border-collapse: collapse; }
.pk-tbl thead th { position: sticky; top: 0; z-index: 2; }
.pk-tbl tbody tr { cursor: pointer; }
.pk-tbl tbody tr:hover { background: #f5f9ff; }
.pk-tbl tbody tr.sel, .pk-tbl tbody tr.sel:hover { background: #e4efff; }
.pk-tbl tbody tr.sel td { color: var(--blue); }
.pk-selinfo { font-size: 12px; color: var(--blue); font-weight: 600; margin-right: 6px; }
.pk-cls { font-size: 12px; color: var(--text-3); }
/* 辅助属性：轮胎这类商品的型号就记在属性里（3.00-10 / 90/90-10…），
   名称规格可能一模一样，所以属性做成醒目标签，一眼能挑对 */
.pk-tbl td.pk-name { max-width: 320px; }
.pk-tbl td.pk-attr { white-space: nowrap; }
.pk-tbl .atag { display: inline-block; max-width: 112px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom; padding: 1px 6px; border-radius: 3px;
  background: #eef4ff; border: 1px solid #d5e3fb; color: #2b5cbd; font-size: 12px; font-weight: 600; }
.pk-tbl tbody tr.sel .atag { background: #d9e8ff; border-color: #b9d3f8; }
.pk-tbl .pk-none { color: #c8cdd5; }

/* ------------------------------ 以旧换新单（一单两区：新机 / 旧件） */
.items-tb tbody tr.tr-old { background: #fff8f0; }
.items-tb tbody tr.tr-old td:first-child { box-shadow: inset 3px 0 0 #e2a03f; }
.items-tb tbody tr.tr-old input[data-k="price"] { color: #b9770e; font-weight: 600; }
.items-tb select.role-sel { font-weight: 600; }
.sum-bar .item b.pk-old { color: #b9770e; }

/* ------------------------------ 版本守卫条
   服务端前端资源已更新、而本标签页仍在跑内存里的旧 JS 时浮出。
   目的是让「改了但界面没变」这件事自己暴露出来，而不是让用户去猜。 */
#verbar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 9999; display: flex; align-items: center; gap: 12px;
  background: #fff7e6; border: 1px solid #f0c36d; color: #7a5200;
  padding: 9px 18px; border-radius: 999px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}
#verbar a { color: var(--blue); font-weight: 600; cursor: pointer; text-decoration: none; }
#verbar a:hover { text-decoration: underline; }

/* ------------------------------ 折叠式查询条件栏（商品/库存/单据列表共用） */
.cond-bar {
  background: #fff; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px;
}
.cond-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.cond-row .chk { white-space: nowrap; }
.cond-row .chk input { margin: 0; }
.cond-more {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
}
.cond-bar .sp { flex: 1; }

/* 「批量」这类下拉菜单 */
.pop-wrap { position: relative; display: inline-block; }
.pop {
  position: absolute; top: 34px; left: 0; z-index: 30; min-width: 148px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .12); padding: 4px 0;
}
.pop a {
  display: block; padding: 7px 14px; font-size: 13px; color: var(--text); cursor: pointer;
  white-space: nowrap;
}
.pop a:hover { background: #f2f7ff; color: var(--blue); }
.pop a.dan { color: var(--red); }
.pop a.dan:hover { background: #fff2ee; }

/* 单身（明细）栏位设置对话框 */
.colset-tip { color: var(--text-3); font-size: 12.5px; line-height: 1.7; margin-bottom: 10px; }
.colset-list { list-style: none; margin: 0; padding: 0; }
.colset-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 6px; background: #fff;
}
.colset-list li.off { background: #fafbfc; opacity: .72; }
.colset-list li .chk { flex: 1; }
.colset-list li .colset-op { display: flex; align-items: center; gap: 6px; }
.colset-list li .colset-op b {
  width: 22px; height: 22px; line-height: 20px; text-align: center; cursor: pointer;
  border: 1px solid #dcdfe6; border-radius: 3px; color: var(--text-2); font-weight: 500;
}
.colset-list li .colset-op b:hover { border-color: var(--blue); color: var(--blue); }
.colset-list li .colset-op i.lock { font-style: normal; font-size: 11.5px; color: var(--text-3); }

/* 明细表头部的栏位设置入口 */
.items-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px 6px;
}
.items-bar .sp { flex: 1; }
.items-bar .q-sm { color: var(--text-3); font-size: 12.5px; }

/* ===== 报表页「门店口径」条（2026-09-27） =====
   报表是「按门店分开管理」的主战场，以前页面完全不提门店：
   切了顶栏门店也看不出这张表已经按店统计。这条把口径写明并可原地切换。 */
.mch-scope {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 8px 12px;
  background: #f0f7ff; border: 1px solid #cfe4ff; border-radius: 4px;
  font-size: 13px; color: var(--text-1, #22303f);
}
.mch-scope .ms-label { color: var(--text-2, #5b6b7f); }
.mch-scope .ms-sel {
  height: 28px; padding: 0 6px; font-size: 13px;
  border: 1px solid #c7d3e0; border-radius: 3px; background: #fff;
  color: var(--text-1, #22303f);
}
.mch-scope .ms-tip { color: var(--text-3, #8a94a0); font-size: 12px; }
