/* ==========================================================================
   订单管理 CRM  ——  样式表
   还原参考图：白卡片 / 深色分区标签 + 斜线装饰 + 深蓝横线 / 彩色 radio 胶囊
   ========================================================================== */

:root {
  --bg: #f0f2f5;
  --card: #ffffff;
  --head-bg: #fafbfc;
  --border: #e8ebf0;
  --line: #dcdfe6;
  --txt: #303133;
  --txt-2: #606266;
  --txt-3: #909399;
  --muted: #c0c4cc;

  --brand: #17a589;
  --brand-d: #139077;
  --sec: #2c3b4e;
  --sec-line: #1e3a5f;
  --req: #f0473c;

  --radius: 4px;
  --radius-lg: 6px;
  --shadow: 0 1px 4px rgba(0, 0, 0, .08);

  /* 胶囊标签配色 */
  --c-red: #ec4b4b;
  --c-orange: #eda838;
  --c-yellow: #eec22f;
  --c-magenta: #e5188b;
  --c-green: #6cc04a;
  --c-cyan: #23b1d0;
  --c-gray: #9ea4ab;
  --c-blue: #4a6cf7;
  --c-dark: #565b62;
  --c-pink: #f08585;
  --c-wechat: #3dd77e;
  --c-wecom: #7b52f5;
  --c-bank: #7dc93a;
  --c-alipay: #6b5ce7;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
          "微软雅黑", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
input, select, textarea, button { font-family: inherit; }

/* ==========================================================================
   顶部导航
   ========================================================================== */
.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar .logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 600;
  color: var(--txt);
  letter-spacing: .3px;
}
.topbar .logo .mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--sec);
  color: #fff;
  font-size: 10px;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.topbar .nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  margin-left: 26px;
  min-width: 0;
  /* ⚠️ 这里不能设 overflow / overflow-x —— 会把品牌下拉菜单裁掉 */
}
.topbar .nav a {
  padding: 7px 11px;
  border-radius: var(--radius);
  color: var(--txt-2);
  font-size: 13.5px;
  white-space: nowrap;
  transition: all .15s;
}
.topbar .nav a:hover { background: #f2f4f7; color: var(--txt); }
.topbar .nav a.active { background: #eaf6f3; color: var(--brand); font-weight: 500; }

/* 品牌下拉菜单 */
.topbar .nav-dd { position: relative; }
.topbar .nav-dd-head {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 11px;
  border-radius: var(--radius);
  color: var(--txt-2);
  font-size: 13.5px;
  white-space: nowrap;
  cursor: default;
  transition: all .15s;
}
.topbar .nav-dd:hover .nav-dd-head,
.topbar .nav-dd-head.active {
  background: rgba(23, 165, 137, .1);
  color: var(--brand);
}
.topbar .nav-dd-head i {
  font-style: normal;
  font-size: 9px;
  opacity: .65;
  transform: translateY(1px);
}
.topbar .nav-dd-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  min-width: 152px;
  padding: 8px 6px 6px;
  /* ⚠️ 这里不能加 margin-top —— 留出的空隙不算在 :hover 区域内，
     鼠标从品牌名移向菜单时会经过空隙，菜单会立刻收起、点不到二级项 */
  margin-top: 0;
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
  display: none;
}
.topbar .nav-dd:hover .nav-dd-menu { display: block; }
.topbar .nav-dd-menu a {
  display: block;
  padding: 8px 13px;
  border-radius: 6px;
  color: var(--txt-2);
  font-size: 13.5px;
  white-space: nowrap;
}
.topbar .nav-dd-menu a:hover { background: #f2f8f6; color: var(--brand); }
.topbar .nav-dd-menu a.active { background: #eaf6f3; color: var(--brand); font-weight: 600; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.topbar .right .tip { color: var(--txt-3); font-size: 13px; }

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}
/* 后台宽表页面 */
.page.page-wide { max-width: 1520px; }

/* ==========================================================================
   卡片
   ========================================================================== */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card + .card { margin-top: 18px; }

.card-head {
  display: flex;
  align-items: center;
  padding: 15px 26px;
  background: var(--head-bg);
  border-bottom: 1px solid #eef0f3;
}
.card-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  color: var(--txt);
  letter-spacing: .5px;
}
.card-head .ico {
  margin-left: auto;
  width: 22px;
  height: 22px;
  color: #8b939e;
  cursor: pointer;
  line-height: 0;
}
.card-head .ico:hover { color: var(--txt-2); }
.card-head .sub {
  margin-left: 12px;
  font-size: 13px;
  color: var(--txt-3);
  padding: 2px 9px;
  background: #eef1f5;
  border-radius: 10px;
}

.card-body { padding: 22px 26px 4px; }

/* ==========================================================================
   分区标题：深色标签 + 斜线装饰 + 深蓝横线
   ========================================================================== */
.section {
  display: flex;
  align-items: flex-end;
  border-bottom: 2px solid var(--sec-line);
  margin: 0 0 22px;
  height: 30px;
}
.section .tag {
  background: var(--sec);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  padding: 8px 16px 8px 13px;
  letter-spacing: .5px;
  height: 30px;
  display: flex;
  align-items: center;
}
/* 斜线装饰 /// */
.section .deco {
  height: 30px;
  width: 32px;
  margin-left: 3px;
  transform: skewX(-20deg);
  background:
    linear-gradient(#8d97a4, #8d97a4) 0 4px / 4px 22px no-repeat,
    linear-gradient(#b3bbc5, #b3bbc5) 10px 4px / 4px 22px no-repeat,
    linear-gradient(#d5dae1, #d5dae1) 20px 4px / 4px 22px no-repeat;
}

/* ==========================================================================
   栅格
   ========================================================================== */
.grid12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 20px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 20px;
}
.s1  { grid-column: span 1; }
.s2  { grid-column: span 2; }
.s3  { grid-column: span 3; }
.s4  { grid-column: span 4; }
.s5  { grid-column: span 5; }
.s6  { grid-column: span 6; }
.s7  { grid-column: span 7; }
.s8  { grid-column: span 8; }
.s9  { grid-column: span 9; }
.s10 { grid-column: span 10; }
.s12 { grid-column: span 12; }

/* ==========================================================================
   表单
   ========================================================================== */
.field { min-width: 0; }
.field > label.lb {
  display: block;
  font-size: 14px;
  color: var(--txt);
  margin-bottom: 8px;
  line-height: 1.4;
}
.field > label.lb .req {
  color: var(--req);
  font-style: normal;
  margin-right: 1px;
}
.field.must > label.lb::before {
  content: "*";
  color: var(--req);
  margin-right: 1px;
}

.ipt, .sel {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--txt);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ipt::placeholder { color: var(--muted); }
.ipt:hover, .sel:hover { border-color: #c6ccd4; }
.ipt:focus, .sel:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(23, 165, 137, .12);
}

/* 只读字段（如「接单人」——由登录身份自动决定，不允许手工修改） */
.ipt[readonly] {
  background: #f5f7fa;
  color: var(--txt-3);
  border-color: #e6e9ee;
  cursor: default;
}
.ipt[readonly]:hover { border-color: #e6e9ee; }
.ipt[readonly]:focus { border-color: #e6e9ee; box-shadow: none; }

.sel {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.2 6 8l4-3.8' fill='none' stroke='%23a8b0ba' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.ipt[type="number"] { -moz-appearance: textfield; }
.ipt[type="number"]::-webkit-outer-spin-button,
.ipt[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

textarea.ipt {
  height: auto;
  min-height: 76px;
  padding: 8px 10px;
  line-height: 1.6;
  resize: vertical;
}

/* ==========================================================================
   彩色 radio 胶囊组
   ========================================================================== */
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 34px;
  padding-top: 1px;
}
.chips.cols6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 8px;
  row-gap: 14px;
}
.chips.cols3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 8px;
  row-gap: 14px;
}

.chip {
  --c: var(--c-gray);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  max-width: 100%;
}
.chip input[type="radio"],
.chip input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  border: 1.6px solid #c9cfd8;
  border-radius: 50%;
  background: #fff;
  position: relative;
  cursor: pointer;
  transition: border-color .15s;
}
.chip:hover input { border-color: var(--c); }
.chip input:checked { border-color: var(--c); }
.chip input:checked::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  background: var(--c);
}
.chip .tag {
  display: inline-block;
  background: var(--c);
  color: #fff;
  font-size: 13.5px;
  line-height: 1;
  padding: 6px 12px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: box-shadow .15s;
}
.chip input:checked + .tag {
  box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px var(--c);
}

/* 每项配色 */
.c-red     { --c: var(--c-red); }
.c-orange  { --c: var(--c-orange); }
.c-yellow  { --c: var(--c-yellow); }
.c-magenta { --c: var(--c-magenta); }
.c-green   { --c: var(--c-green); }
.c-cyan    { --c: var(--c-cyan); }
.c-gray    { --c: var(--c-gray); }
.c-blue    { --c: var(--c-blue); }
.c-dark    { --c: var(--c-dark); }
.c-pink    { --c: var(--c-pink); }
.c-wechat  { --c: var(--c-wechat); }
.c-wecom   { --c: var(--c-wecom); }
.c-bank    { --c: var(--c-bank); }
.c-alipay  { --c: var(--c-alipay); }
/* 扩展配色（驾照 / 公证模块） */
.c-slate      { --c: #566573; }   /* 换证驾照 */
.c-purple     { --c: #b0449c; }   /* 小语种版电子版 */
.c-lime       { --c: #a5c93a; }   /* NAATI小白本 */
.c-indigo     { --c: #5c4ee5; }   /* NZTA电子版 */
.c-deeporange { --c: #ef7d24; }   /* 德语宣誓 */
.c-teal       { --c: #17b6a0; }   /* 法语宣誓 */
.c-plum       { --c: #c2338c; }   /* 吉林公证处 */
.c-brand      { --c: #17a589; }   /* 公证 */
/* 平台品牌色（色值取自客户提供的色块图） */
.c-tm-hy      { --c: #DD1F27; }   /* 天猫(火焱) */
.c-tm-yy      { --c: #313FA0; }   /* 天猫(云译) */
.c-tm-hjb     { --c: #961604; }   /* 天猫(海驾邦) */
.c-pdd        { --c: #E12A1F; }   /* 拼多多(海驾邦) */
.c-jd         { --c: #FF475D; }   /* 京东(海驾邦) */

/* 指定列数的 chips 网格（列数由 JS 通过 style="--cols:N" 注入） */
.chips.chips-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  column-gap: 8px;
  row-gap: 14px;
}

/* 金额输入框前缀 */
.money-wrap { position: relative; }
.money-wrap .ipt { padding-left: 26px; }
.money-wrap::before {
  content: "¥";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txt-3);
  font-size: 13px;
  pointer-events: none;
}

/* ==========================================================================
   底部操作区
   ========================================================================== */
.card-foot {
  margin-top: 26px;
  border-top: 1px dashed #e3e6ea;
  padding: 20px 0 26px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.btn {
  height: 38px;
  min-width: 152px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-d); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--txt-2); }
.btn-ghost:hover { border-color: #b9c0c9; color: var(--txt); background: #fafbfc; }
.btn-sm { height: 30px; min-width: 0; padding: 0 12px; font-size: 13px; }
.btn-danger { background: #fff; border-color: #f3c3c0; color: #e04b40; }
.btn-danger:hover { background: #fdf3f2; border-color: #e8a9a5; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ==========================================================================
   首页模块卡片
   ========================================================================== */
.hero {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px 34px;
  margin-bottom: 20px;
}
.hero h1 { margin: 0 0 8px; font-size: 22px; font-weight: 600; }
.hero p { margin: 0; color: var(--txt-3); font-size: 14px; }

.mods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
/* 其它模块：6 个挤成一行，卡片相应做紧凑一些 */
.mods.mods-4 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.mods-4 .mod { padding: 16px 14px 14px; }
.mods-4 .mod .m-ico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 17px;
  margin-bottom: 10px;
}
.mods-4 .mod h3 { font-size: 14px; margin-bottom: 4px; }
.mods-4 .mod p { font-size: 12px; margin-bottom: 12px; }
.mods-4 .mod .acts .btn { height: 30px; font-size: 12.5px; }

/* --------------------------------------------------------------------------
   首页品牌分组
   -------------------------------------------------------------------------- */
/* 品牌分组容器：4 列栅格，每个品牌按自己的模块数占列
   —— 模块少的品牌会自动并排在同一行 */
.brand-wrap {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 26px 18px;
}
.brand { min-width: 0; }
/* 5 列时卡片变窄，内边距收一点，保证两个按钮放得下 */
.brand .mod { padding: 20px 18px 18px; }
.brand-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 14px;
  font-size: 12px;          /* 比其它标题小，品牌名只作为弱化的分组标识 */
  font-weight: 400;         /* 不加粗 */
  letter-spacing: 2px;
  color: #9aa3ae;           /* 灰色 */
}
.brand-title::before,
.brand-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dfe4ea;
}

/* 首页分区小标题 */
.sec-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--txt-2);
  margin: 30px 0 14px 2px;
  letter-spacing: .3px;
}
.mod {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 24px 22px;
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.mod:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .1); }
.mod .m-ico {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.mod h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.mod p { margin: 0 0 18px; font-size: 13px; color: var(--txt-3); flex: 1; }
.mod .acts { display: flex; gap: 10px; }
/* padding 必须收窄：基础 .btn 是 0 22px，卡片窄的时候按钮内文字会被挤断行；
   max-width 则避免品牌被拉宽时（如海译邦占 3 格）按钮被撑成超长条 */
.mod .acts .btn {
  flex: 1;
  min-width: 0;
  max-width: 172px;
  height: 34px;
  font-size: 13px;
  padding: 0 8px;
}
.mod.off { opacity: .62; }
.mod.off:hover { transform: none; box-shadow: var(--shadow); }
.badge-soon {
  display: inline-block;
  font-size: 11px;
  color: #b7791f;
  background: #fdf6e3;
  border: 1px solid #f2e0b5;
  border-radius: 9px;
  padding: 1px 8px;
  margin-left: 8px;
  vertical-align: middle;
  font-weight: 400;
}

/* ==========================================================================
   后台管理
   ========================================================================== */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.stat {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  border-left: 3px solid var(--brand);
}
.stat .k { font-size: 13px; color: var(--txt-3); margin-bottom: 8px; }
.stat .v { font-size: 24px; font-weight: 600; color: var(--txt); line-height: 1.1; }
.stat .v small { font-size: 13px; font-weight: 400; color: var(--txt-3); margin-left: 3px; }
.stat.stat-blue { border-left-color: var(--c-blue); }
.stat.stat-orange { border-left-color: var(--c-orange); }
.stat.stat-magenta { border-left-color: var(--c-magenta); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.toolbar .ipt, .toolbar .sel { height: 34px; width: auto; min-width: 116px; }
.toolbar .grow { margin-left: auto; display: flex; gap: 10px; }

.table-wrap { overflow-x: auto; background: #fff; }
table.tb {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  white-space: nowrap;
}
table.tb th {
  background: #f7f9fb;
  color: var(--txt-2);
  font-weight: 500;
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
table.tb td {
  padding: 10px 10px;
  border-bottom: 1px solid #f0f2f5;
  color: var(--txt);
  vertical-align: middle;
}
/* 长文本截断（完整内容见 title 提示） */
.trunc {
  display: block;
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.tb tbody tr:hover { background: #f8fafb; }
table.tb tbody tr:last-child td { border-bottom: none; }
.num { font-variant-numeric: tabular-nums; }
.money { color: #d94a3d; font-weight: 600; }
.money.neg { color: var(--txt-3); font-weight: 400; }
.oid { color: var(--txt-2); font-size: 12.5px; }
.link { color: var(--brand); cursor: pointer; }
.link:hover { text-decoration: underline; }
.link + .link { margin-left: 10px; }
.link.danger { color: #e04b40; }

.pill {
  display: inline-block;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 10px;
  line-height: 1.6;
}
.pill.draft      { background: #f0f2f5; color: #7a8290; }
.pill.submitted  { background: #fdf3e3; color: #b7791f; }
.pill.processing { background: #e8f1fe; color: #2b6cb0; }
.pill.finished   { background: #e9f7f0; color: #1a7f5a; }
.pill.settled    { background: #eaf6f3; color: #0f7a63; }
.pill.cancelled  { background: #fdeceb; color: #c0392b; }

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--txt-3);
  font-size: 14px;
}
.empty .big { font-size: 34px; margin-bottom: 10px; opacity: .35; }

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  color: var(--txt-2);
}
.pager button {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--txt-2);
}
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager button.cur { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ==========================================================================
   模态框（详情 / 编辑）
   ========================================================================== */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 33, .45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 100;
}
.mask.hide { display: none; }
.dialog {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .22);
  overflow: hidden;
  animation: pop .18s ease-out;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
.dialog .card-head h2 { font-size: 17px; }
.dialog .card-body { padding: 18px 26px 4px; max-height: 68vh; overflow-y: auto; }
.dialog .card-foot { justify-content: flex-end; padding: 16px 26px; margin-top: 18px; }

.close-x {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #9aa2ad;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}
.close-x:hover { background: #f0f2f5; color: var(--txt); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px 22px;
}
/* 详情弹窗顶部的状态切换条 */
.dstatus {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px dashed #e3e6ea;
}
.dstatus .lbl { font-size: 13px; color: var(--txt-3); margin-right: 4px; }
.detail-grid .kv.wide { grid-column: span 3; }
.kv .k { font-size: 12.5px; color: var(--txt-3); margin-bottom: 5px; }
.kv .v {
  font-size: 14px;
  color: var(--txt);
  word-break: break-all;
  padding-bottom: 4px;
  border-bottom: 1px solid #f2f4f7;
  min-height: 24px;
}
.kv .v.money-v { color: #d94a3d; font-weight: 600; }
.kv .v.empty-v { color: var(--muted); }

/* ==========================================================================
   Toast
   ========================================================================== */
#toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: #2c3b4e;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 999;
  max-width: 80vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.ok { background: #17a589; }
#toast.err { background: #e04b40; }

/* ==========================================================================
   模块占位页（页面待设计的模块）
   ========================================================================== */
.placeholder {
  padding: 48px 24px 62px;
  text-align: center;
}
.placeholder .ph-icon {
  width: 66px;
  height: 66px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 18px;
}
.placeholder .ph-title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
}
.placeholder .ph-desc {
  font-size: 14px;
  color: var(--txt-3);
  margin-bottom: 24px;
}
.placeholder .ph-box {
  display: inline-block;
  text-align: left;
  background: #f7f9fb;
  border: 1px dashed #dfe4ea;
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  font-size: 13.5px;
  color: var(--txt-2);
  line-height: 2;
  max-width: 540px;
}
.placeholder .ph-box b { color: var(--txt); }

/* 卡片头部按钮（如「订单管理 →」）—— 绿底白字 */
.head-link {
  margin-left: auto;
  margin-right: 14px;
  font-size: 13px;
  background: var(--brand);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background .15s;
}
.head-link:hover { background: var(--brand-d); }

/* ==========================================================================
   统计页 · 店铺卡片
   ========================================================================== */
.shop-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.shop-card {
  position: relative;
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 10px;
  padding: 22px 20px 24px;
  text-align: center;
}
.shop-card .sc-head {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
/* 右上角小提示图标 */
.shop-card .sc-info {
  position: absolute;
  right: 13px;
  top: 15px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #7dc93a;
  color: #7dc93a;
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
  line-height: 15px;
  cursor: help;
}
/* 四项指标排成两行两列（一行四栏的话长数字放不下） */
.shop-card .sc-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 10px;
}
.shop-card .sc-item { min-width: 0; padding: 0 8px; }
/* 两列之间加一根分隔竖线（第 2、4 项左侧） */
.shop-card .sc-body > .sc-item:nth-child(even) {
  border-left: 1px solid #dde2ea;
}
.shop-card .sc-label {
  font-size: 12px;
  color: var(--txt-3);
  margin-bottom: 8px;
}
/* 「昨日支出」是每天最常看的，标签比其它三项大一号 */
.shop-card .sc-item.sc-primary .sc-label {
  font-size: 15px;
  color: var(--txt-2);
}
.shop-card .sc-label em {
  font-style: normal;
  color: #b6bcc6;
  font-size: 11px;
}
.shop-card .sc-val {
  font-size: 18px;
  font-weight: 400;          /* 不加粗 */
  color: #1f2d54;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   合计卡片
   ⚠️ 必须写在上面的 .shop-cards / .shop-card .sc-* 之后：
   两者的特异性相同（都是单类 + 单类），CSS 里「后定义者胜出」，
   写在前面会被通配规则覆盖掉。
   -------------------------------------------------------------------------- */
.shop-cards.shop-cards--1 {
  grid-template-columns: 1fr;      /* 横跨一整行 */
  margin-bottom: 18px;
}
.shop-card.shop-card--total .sc-head { font-size: 16px; margin-bottom: 20px; }
.shop-card.shop-card--total .sc-label { font-size: 15px; }
.shop-card.shop-card--total .sc-val { font-size: 22px; }
/* 合计的四项排成一行，两两之间用一根灰色竖线分隔 */
.shop-card.shop-card--total .sc-body {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}
.shop-card.shop-card--total .sc-item { padding: 0 10px; }
.shop-card.shop-card--total .sc-item + .sc-item {
  border-left: 1px solid #dde2ea;
}

/* 居中标题 + 两端横线（统计页的「店铺推广支出」） */
.sec-label--center {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0 20px;
  text-align: center;
  font-size: 28px;          /* 比其他小标题大（基础 .sec-label 是 14px） */
  font-weight: 600;
}
.sec-label--center::before,
.sec-label--center::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e0e4ea;
}
.sc-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--txt-3);
  padding: 40px 0;
  font-size: 14px;
}

/* 统计页 · 折线图 */
.chart-block { margin-top: 32px; }
/* 标题在卡片内部（由 JS 按容器的 data-title 渲染），不再单独占一行 */
.chart-head {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--txt);
  margin: 2px 0 12px;
}
.chart-card {
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 10px;
  padding: 16px 18px 8px;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--txt-2);
}
.chart-legend .lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;          /* 可点击：点一下高亮对应的线 */
  user-select: none;
  transition: color .15s, opacity .15s;
}
.chart-legend .lg:hover { color: var(--txt); }
.chart-legend .lg.on { color: var(--txt); font-weight: 600; }
.chart-legend .lg i {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}
.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   人员权限管理页
   ========================================================================== */
.page-wide { max-width: 1460px; }

.perm-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 10px;
  padding: 4px;
}
.perm-table { width: 100%; border-collapse: collapse; }
.perm-table th,
.perm-table td {
  border: 1px solid #edf0f3;
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
}
.perm-table th {
  background: #f7f9fb;
  color: var(--txt-2);
  font-weight: 600;
  white-space: nowrap;
}
.perm-table .pt-user {
  font-weight: 600;
  color: var(--txt);
  white-space: nowrap;
  text-align: left;
  padding-left: 14px;
}
.pt-btn {
  min-width: 74px;
  height: 30px;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
}
.pt-btn.on { background: #17a589; color: #fff; }
.pt-btn.off { background: #f0f2f5; color: #9aa3ae; }
.pt-btn:hover { opacity: .88; }
.pt-btn:disabled { opacity: .5; cursor: default; }

.pt-def {
  display: block;
  margin: 7px auto 0;
  min-width: 56px;
  height: 24px;
  border-radius: 5px;
  font-size: 11.5px;
  cursor: pointer;
  background: #fff;
  border: 1px solid #dfe4ea;
  color: var(--txt-3);
  transition: all .15s;
}
.pt-def.on { border-color: #17a589; color: #17a589; font-weight: 600; }

.perm-tip {
  margin: 14px 2px 0;
  font-size: 12.5px;
  color: var(--txt-3);
  line-height: 1.9;
}
.perm-tip b.ok { color: #17a589; }
.perm-tip b.no { color: #9aa3ae; }

/* 分页区：左侧总数 + 每页条数 */
.pager .pinfo {
  margin-right: auto;
  color: var(--txt-3);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pager .pgsize {
  height: 28px;
  padding: 0 6px;
  border: 1px solid #dfe4ea;
  border-radius: 5px;
  background: #fff;
  color: var(--txt-2);
  font-size: 13px;
  cursor: pointer;
}

/* ==========================================================================
   营业收入统计表（Tab + 卡片）
   ========================================================================== */
.rev-tabs {
  display: flex;
  flex-wrap: wrap;               /* Tab 变多（支出已有 6 个）后允许换行，避免横向溢出 */
  gap: 8px;
  margin: 14px 0 12px;
}
.rev-tab {
  height: 38px;
  padding: 0 20px;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  background: #fff;
  color: #4a5568;
  font-size: 14px;
  cursor: pointer;
  transition: .15s;
}
.rev-tab:hover { border-color: #b9c3cf; }
.rev-tab.on {
  background: #17a589;
  border-color: #17a589;
  color: #fff;
  font-weight: 500;
}

/* 一级 Tab（收入 / 支出 / 利润）：大一号、更醒目，
   下面带一条分隔线，把 Tab 区和内容区隔开 */
.rev-tabs--main {
  margin: 10px 0 20px;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid #d5dbe4;
  justify-content: flex-start;  /* 三个 Tab 左对齐 */
}
.rev-tab--main {
  height: 46px;
  padding: 0 36px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 10px;
}
/* 二级 Tab：常规尺寸 */
.rev-tabs--sub { margin: 4px 0 14px; }
/* 三级 Tab（日报 / 月报 / 年报）：做小一号做「层级感」 */
.rev-tabs--third {
  margin: -4px 0 16px;
}
.rev-tabs--third .rev-tab {
  height: 32px;
  padding: 0 16px;
  font-size: 13px;
  border-radius: 7px;
}

/* 通用隐藏（Tab 切换用） */
.hide { display: none !important; }
.rev-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}
.rev-title { font-size: 15px; font-weight: 600; color: #1f2d54; }
.rev-sub { font-size: 12px; color: #9aa3ae; }

/* 「今日营业详情」表独占整行，避免在 2 列网格里留半格空位 */
.shop-card .sc-item.sc-wide { grid-column: 1 / -1; }

/* 营业收入统计的「合计」卡：独占一整行、布局与普通卡一致（2 列），
   只把标题和数字强调一下。
   注意别用 .shop-card--total —— 那边的字号 / 间距是给支出卡调的。 */
.shop-card.shop-card--sum {
  grid-column: 1 / -1;          /* 放大占满一整行 */
  border-color: #cfe8e2;
}
.shop-card.shop-card--sum .sc-head { font-size: 17px; }
.shop-card.shop-card--sum .sc-label { font-size: 14px; }
.shop-card.shop-card--sum .sc-val { font-size: 26px; color: #17a589; }
/* 两项（今日/昨日）排成一行，项间用竖线分隔 */
.shop-card.shop-card--sum .sc-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));   /* 今日/昨日、本年/去年 */
  gap: 0;
}
.shop-card.shop-card--sum .sc-item { padding: 0 12px; }
.shop-card.shop-card--sum .sc-item + .sc-item { border-left: 1px solid #dde2ea; }

/* 月报：卡片是三项（本月 / 上月 / 去年同月）—— 合计卡与店铺卡都排成一行 */
#revCardsM .shop-card .sc-body {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
/* 三列时第 2、3 项都要有左侧竖线（基础规则只给偶数项加） */
#revCardsM .shop-card .sc-body > .sc-item:nth-child(3) {
  border-left: 1px solid #dde2ea;
}
/* 店铺卡片窄，三项平排时「去年同月 25/10」别折行 */
#revCardsM .shop-card:not(.shop-card--sum) .sc-label { white-space: nowrap; }

/* ==========================================================================
   营业收入卡片：突出「今日营业额」
   --------------------------------------------------------------------------
   字号按「格子自己的宽度」自适应（容器查询单位 cqw）——
   金额长短不一（¥0.00 ~ ¥1,120.00），写死字号在窄格子 / 长数字时会溢出。
   电脑端格子宽 → 取到上限；手机端格子窄 → 自动缩小。
   每行前一个值是兜底，浏览器不支持 cqw 时仍有个合理字号。
   ⚠️ 用 #revCards 限定在「营业收入」这片，别影响下面推广支出的卡片。
      月报 / 年报复用同一套卡片样式（#revCardsM / #revCardsY）。
   ========================================================================== */
:is(#revCards, #revCardsM, #revCardsY) .sc-item { container-type: inline-size; }
:is(#revCards, #revCardsM, #revCardsY) .sc-item:nth-child(1) .sc-label { font-size: 14px; }
:is(#revCards, #revCardsM, #revCardsY) .sc-item:nth-child(1) .sc-val   { font-size: 34px; font-size: clamp(17px, 18cqw, 38px); color: #17a589; }
/* 其余营业额标签（昨日）：字号统一成
   「今日营业详情」表头里「订单数」那一档 = 12.5px（用户要求这几处一样大）。
   日期后缀 em 沿用全局的 11px。 */
:is(#revCards, #revCardsM, #revCardsY) .sc-item:nth-child(n+2) .sc-label { font-size: 12.5px; }
:is(#revCards, #revCardsM, #revCardsY) .sc-item:nth-child(n+2) .sc-val   { font-size: 19px; font-size: clamp(13px, 12cqw, 21px); color: #1f2d54; }
/* 兜底：真遇到超长金额也不撑破格子。
   配上 nowrap，「内容比格子宽」才会稳定表现为横向溢出（否则可能折行），
   这样 JS 的 fitAmounts() 用一个 scrollWidth > clientWidth 就能量出来。 */
:is(#revCards, #revCardsM, #revCardsY) .sc-val { overflow: hidden; white-space: nowrap; }

/* 卡片里的「今日营业详情」表格（在 今日/昨日 下方） */
:is(#revCards, #revCardsM, #revCardsY) .sc-item.sc-table {
  display: block;               /* 覆盖上面的 flex，让表格能正常铺开 */
  grid-column: 1 / -1;
  min-width: 0;
  padding: 14px 12px 6px;
  border-left: 0;
}
.rev-detail {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12.5px;
}
.rev-detail th,
.rev-detail td {
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid #e2e6ec;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rev-detail th {
  font-weight: 500;
  color: #5a6472;
  background: #f7f9fc;
}
.rev-detail td.rd-name { text-align: left; color: #4a5568; }
.rev-detail td.rd-cnt { color: #4a5568; font-variant-numeric: tabular-nums; }
.rev-detail td.rd-amt {
  text-align: center;
  color: #1f2d54;
  font-variant-numeric: tabular-nums;
}
/* 窄表（店铺卡片，三列）：模块名 42% / 个数 22% / 金额 36% */
.rev-detail th:nth-child(1), .rev-detail td:nth-child(1) { width: 42%; }
.rev-detail th:nth-child(2), .rev-detail td:nth-child(2) { width: 22%; }
.rev-detail th:nth-child(3), .rev-detail td:nth-child(3) { width: 36%; }
/* 宽表（合计卡，六列 = 两组）：22% 10% 18% × 2 */
.rev-detail--wide th:nth-child(1), .rev-detail--wide td:nth-child(1) { width: 22%; }
.rev-detail--wide th:nth-child(2), .rev-detail--wide td:nth-child(2) { width: 10%; }
.rev-detail--wide th:nth-child(3), .rev-detail--wide td:nth-child(3) { width: 18%; }
.rev-detail--wide th:nth-child(4), .rev-detail--wide td:nth-child(4) { width: 22%; }
.rev-detail--wide th:nth-child(5), .rev-detail--wide td:nth-child(5) { width: 10%; }
.rev-detail--wide th:nth-child(6), .rev-detail--wide td:nth-child(6) { width: 18%; }
.rd-empty { font-size: 12.5px; color: #b6bcc6; padding: 12px 0; }
/* 明细表整行悬停高亮（与后台列表 table.tb 一致）。
   落在 td 上而不是 tr 上 —— td 有各自的前景色，tr 上色在部分浏览器会被 td 背景盖住。
   宽表左右两半同属一行，悬停时一起亮，方便横向对照。 */
.rev-detail tbody tr:hover > td { background: #e9f7f3; }

/* 权限表也加上同样的整行高亮 */
.perm-table tbody tr:hover > td { background: #e9f7f3; }

/* 「支出合计」卡片（推广+佣金+运费+宣誓+公证+其他 六类之和）：
   直接复用 .shop-card--total 的样式，这里只补下边距 ——
   它下面还有「每家店铺的总支出」一排卡片，再往下才是二级 Tab。 */
.exp-sum { margin: 0 0 16px; }

/* 每家店铺的总支出（同样是六类之和）：复用 .shop-card 默认的 2×2 布局 */
.exp-shops { margin: 0 0 16px; }

/* 「今日营业详情」表那一行不要左侧竖线 */
#revCards .sc-item.sc-table { border-left: 0 !important; }


/* 各格的「数字底边」对齐到同一水平线 ——
   首格字号比别人大，不这样会显得参差不齐。
   月报 / 年报复用同一套卡片样式，一起下对齐。 */
:is(#revCards, #revCardsM, #revCardsY) .sc-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* ==========================================================================
   登录页
   ========================================================================== */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1100px 520px at 50% -12%, #e4ebef 0%, rgba(240, 242, 245, 0) 65%),
    var(--bg);
}
.login-wrap { width: 100%; max-width: 396px; }
.login-card {
  background: #fff;
  border-radius: 10px;
  padding: 34px 34px 28px;
  box-shadow: 0 10px 40px rgba(20, 26, 33, .10);
}
.login-card .lbrand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--txt-2);
  margin-bottom: 26px;
}
.login-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .5px;
}
.login-card .lsub {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--txt-3);
}
.lfield { margin-bottom: 16px; }
.lfield label {
  display: block;
  font-size: 13px;
  color: var(--txt-2);
  margin-bottom: 7px;
}
.lfield .ipt { height: 40px; font-size: 14px; }
.lbtn {
  width: 100%;
  height: 42px;
  margin-top: 6px;
  font-size: 15px;
  letter-spacing: 3px;
}
.lerr {
  min-height: 19px;
  font-size: 13px;
  color: #e04b40;
  margin-bottom: 4px;
}
.lerr.ok { color: var(--brand); }
.lfoot {
  text-align: center;
  font-size: 12.5px;
  color: #a7aeb8;
  margin-top: 18px;
  letter-spacing: .3px;
}

/* 顶栏用户区 */
.userbox { display: flex; align-items: center; gap: 3px; }
.userbox .uname {
  font-size: 13px;
  color: var(--txt-2);
  background: #f2f4f7;
  border-radius: 14px;
  padding: 4px 12px;
  margin-right: 7px;
  white-space: nowrap;
}
.ubar-link {
  font-size: 13px;
  color: var(--txt-3);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.ubar-link:hover { color: var(--brand); background: #f0f7f5; }
.ubar-link.danger:hover { color: #e04b40; background: #fdf3f2; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1100px) {
  .mods.mods-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .mods-4 .mod { padding: 24px 24px 22px; }
}

@media (max-width: 900px) {
  .page { padding: 16px 14px 40px; }
  .grid12 > *, .grid3 > * { grid-column: span 12 !important; }
  .chips.cols6, .chips.cols5, .chips.cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mods, .mods.mods-4 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid .kv.wide { grid-column: span 2; }
  .topbar .nav { display: none; }
}

/* ==========================================================================
   手机（≤ 640px）
   --------------------------------------------------------------------------
   ⚠️ 首页「品牌 / 模块卡片」的列数、以及品牌占几格，是 index.html 里
      **JS 内联写死**的（style="grid-template-columns: repeat(N,...)"），
      普通媒体查询覆盖不掉 —— 必须用 !important。
   ========================================================================== */
@media (max-width: 640px) {

  /* ---------------- 顶栏 ---------------- */
  .topbar {
    height: auto;
    min-height: 52px;
    padding: 8px 14px;
    gap: 10px;
  }
  .topbar .logo { font-size: 15px; gap: 7px; }
  .topbar .logo .mark { width: 24px; height: 24px; font-size: 9px; border-radius: 5px; }
  .topbar .right .tip { display: none; }        /* 日期在手机上省掉，否则挤爆 */
  .userbox .uname { font-size: 12px; padding: 3px 9px; margin-right: 3px; }
  .ubar-link { font-size: 12px; padding: 3px 6px; }

  /* ---------------- 首页：品牌块各占一行，卡片 2 列 ---------------- */
  .brand-wrap { grid-template-columns: 1fr; gap: 22px; }
  .brand-wrap > .brand { grid-column: span 1 !important; }   /* 覆盖内联的 span N */
  .brand .mods,
  .mods,
  .mods.mods-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;   /* 覆盖内联列数 */
    gap: 12px;
  }
  .brand .mod, .mod { padding: 16px 14px 14px; border-radius: 12px; }
  .mod .m-ico { width: 36px; height: 36px; font-size: 17px; margin-bottom: 10px; border-radius: 9px; }
  .mod h3 { font-size: 15px; }
  .mod p { margin-bottom: 12px; font-size: 12px; }
  .mod .acts { gap: 8px; }
  /* 按钮收窄，否则窄卡片里文字会被挤成竖排 */
  .mod .acts .btn, .btn { padding: 0 12px; height: 34px; font-size: 13px; border-radius: 8px; }
  /* 卡片窄（2 列），两个按钮并排会把「订单录入」挤成竖排 →
     手机上改成上下堆叠，各自占满宽度，点击区域也更大 */
  .mod .acts { flex-direction: column; gap: 7px; }
  .mod .acts .btn { width: 100%; }

  .sec-label { font-size: 13px; margin: 22px 0 12px 2px; }
  .brand-title { font-size: 11px; gap: 10px; }

  /* ---------------- 录入页表单 ---------------- */
  /* 选项组（chips）：列数是 JS 内联的 --cols 变量，必须 !important 覆盖，
     否则「订单方向」那一排会横向溢出屏幕 */
  .chips.chips-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    row-gap: 10px;
  }
  /* 不分组的那种（自动换行）也把间距收一收 */
  .chips { gap: 10px 16px; }

  .card-head h2 { font-size: 16px; }
  input, select, .ipt { font-size: 14px; }      /* 手机上 <16px 会触发 iOS 自动放大 */

  /* ---------------- 列表页：横向滚动，别硬挤 ---------------- */
  /* 表格列多（接单人/多客服/金额/操作…），手机上左右滑动看。
     右侧留一道渐变阴影，暗示"右边还有内容" */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background:
      linear-gradient(to left, rgba(15, 23, 42, .07), rgba(15, 23, 42, 0) 22px) right center / 22px 100% no-repeat,
      #fff;
  }
  table.tb { font-size: 12px; }
  table.tb th, table.tb td { padding: 8px 10px; }
  .toolbar { gap: 8px; }

  .pager { flex-wrap: wrap; gap: 6px; }
  .pager .pinfo { width: 100%; order: -1; margin-bottom: 2px; font-size: 12px; }
  .pager button { padding: 5px 10px; font-size: 13px; }
  .pager .pgsize { height: 26px; }

  /* ---------------- 统计页 ---------------- */
  .rev-tabs { gap: 6px; }
  .rev-tab { height: 36px; padding: 0 14px; font-size: 13px; }
  /* 一级 Tab（收入表 / 支出表 / 利润表）：手机上三个按钮**平分整行、铺满** */
  .rev-tabs--main { gap: 8px; }
  .rev-tabs--main .rev-tab--main {
    flex: 1 1 0;
    min-width: 0;
    height: 42px;
    padding: 0 4px;
    font-size: 15px;
  }
  /* 二级 Tab（按店铺 / 按模块、日报 / 月报 / 年报、
     推广 / 佣金 / 运费 / 其他 / 宣誓 / 公证）：手机上横向平分、铺满整行；
     换行后每行也均分（flex-grow 配合 wrap 实现） */
  .rev-tabs--sub {
    gap: 6px;
  }
  .rev-tabs--sub .rev-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 6px;
    white-space: nowrap;
  }
  /* 支出二级 Tab（推广 / 佣金 / 运费 / 宣誓 / 公证 / 其他，共 6 个）：
     一行 6 个太挤 → 手机上强制 3 个一行、正好两行铺满 */
  #paneExpense .rev-tabs--sub {
    flex-wrap: wrap;
  }
  #paneExpense .rev-tabs--sub .rev-tab {
    flex: 0 0 auto;
    width: calc((100% - 12px) / 3);
    min-width: 0;
    box-sizing: border-box;
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* 三级 Tab（日报 / 月报 / 年报）：手机上三颗平分整行，铺满 */
  .rev-tabs--third .rev-tab {
    flex: 1 1 0;
    padding: 0 6px;
    height: 30px;
    font-size: 12.5px;
  }
  .rev-head { margin-bottom: 10px; }
  .rev-title { font-size: 14px; }

  .shop-cards { grid-template-columns: 1fr !important; gap: 12px; }
  .shop-card { padding: 18px 14px; }
  /* 营业收入合计卡：4 项挤一行会看不清，手机上排成 2 列 */
  .shop-card.shop-card--sum .sc-body {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 0;
  }
  /* 支出合计卡（推广 / 平台 / 运费）：4 项在手机上也排成 2×2 */
  .shop-card.shop-card--total .sc-body {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 0;
  }
  .shop-card.shop-card--total .sc-item { padding: 0 10px; }
  .shop-card.shop-card--sum .sc-item.sc-wide { grid-column: span 2; border-left: 0; }
  /* 字号已由上面的 clamp() + cqw 自适应，这里不用再写死 */

  .chart-card { padding: 14px 12px; }
  .chart-head { font-size: 14px; }
}

/* ==========================================================================
   统计页 · 接单人接单量小表
   --------------------------------------------------------------------------
   放在「合计卡」与「各店铺卡」之间，横跨整行（grid-column: 1 / -1）。
   收入表的日报 / 月报 / 年报三档共用同一套结构，只是行首标签不同
   （今日接单/昨日接单、本月接单/上月接单、本年接单/去年接单）。
   ========================================================================== */
.rcv-block {
  grid-column: 1 / -1;              /* 横跨整行，不被 3 列网格切开 */
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 10px;
  padding: 16px 20px 18px;
}
.rcv-title {
  font-size: 14px;
  font-weight: 700;
  color: #273444;
  margin-bottom: 10px;
}
.rcv-scroll { overflow-x: auto; }   /* 手机上表格横向滚动，不撑破卡片 */
.rcv-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  table-layout: fixed;
}
.rcv-table th,
.rcv-table td {
  border: 1px solid #e3e6ea;
  padding: 8px 6px;
  text-align: center;
  font-size: 13px;
  white-space: nowrap;
}
.rcv-table thead th {
  background: #fbfcfd;
  color: #5b6777;
  font-weight: 600;
}
.rcv-table th.rcv-lb,
.rcv-table td.rcv-lb {
  width: 96px;
  background: #fbfcfd;
  color: #5b6777;
  font-weight: 600;
}
.rcv-table td.rcv-num {
  color: #273444;
  font-variant-numeric: tabular-nums;
}
.rcv-table td.rcv-amt { font-weight: 600; }
/* 左右两半区之间的分隔线（比普通边框醒目一点） */
.rcv-table .rcv-sep { border-left: 2px solid #d9e0e7; }

/* 接单人表 · 鼠标移到某一列（人名）时整列高亮 —— 表头 + 两行数据一起变色 */
.rcv-table .rcv-hl {
  background: #e8f3fd !important;
  color: #0b5cad !important;
}
