/**
 * @copyright © 2026 易企网ERP订货系统. 保留所有权利.
 * 本文件为系统源码之一，仅供授权使用，禁止未经授权的复制、修改与分发。
 */
/* ==========================================================================
   商户后台 · Ant Design 视觉体系（v1.2.7）
   --------------------------------------------------------------------------
   参照对象：jxc.erpsap.cn（Vben Admin 5 + Ant Design Vue 5）
   直接采用它的设计令牌（原样搬过来，保证观感一致）：

     --aierp-primary   #e5361f     主色
     --aierp-success   #52c41a
     --aierp-warning   #faad14
     --aierp-danger    #f5222d
     text  #333 / title #222 / muted #999
     border #dae1ea / border-light #eef2f6 / divider #f0f0f0
     bg-page #f5f7fb / panel #fff / header #f2f5fa / zebra #fafafa
     radius card 8 / table 6 / btn 4 / input 4
     shadow card 0 1px 2px rgba(16,24,40,.04)
     字号以 13px 为主，控件高 32~36px

   ★ 全部规则都以 body.merchant 限定 —— 平台端也引用 admin.css，
     不加限定会把平台端一起改掉。
   ★ 加载顺序：admin.css → theme.css → ui.css（本文件最后，负责覆盖）
   ========================================================================== */

body.merchant {
  /* ---- 设计令牌 ---- */
  --blue: #e5361f;
  --primary: #e5361f;
  --primary-hover: #ff7a5c;
  --primary-light: #fdeceb;
  --green: #52c41a;
  --orange: #faad14;
  --red: #f5222d;
  --txt: #333333;
  --title: #222222;
  --txt-2: #595959;
  --txt-3: #999999;
  --line: #f0f0f0;
  --line-2: #e8e8e8;
  --border: #dae1ea;
  --bg-page: #f5f7fb;
  --bg-panel: #ffffff;
  --bg-head: #fafafa;
  --radius: 10px;
  --radius-sm: 7px;
  --radius-btn: 4px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .03);
  --shadow-lg: 0 6px 20px rgba(15, 23, 42, .10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --transition: all .2s ease;
}

body.merchant {
  background: var(--bg-page);
  color: var(--txt);
  font-family: var(--font);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. 框架：深色侧栏 + 56px 白顶栏 + 下划线页签（对齐参考系统截图）
   --------------------------------------------------------------------------
   参考 jxc.erpsap.cn 的实际界面：
     侧栏  深色（近黑的深蓝灰），图标+文字，选中项蓝色图标 + 白字 + 左侧蓝条
     顶栏  纯白 56px，右侧 在线客服 / AI 助手 / 搜索(Ctrl K) / 图标组
     页签  白底 + 选中项蓝色下划线（不是胶囊）
     内容  浅灰 #f0f2f5
   ========================================================================== */

body.merchant .app { background: var(--bg-page); }

/* ---------------- 深色侧栏 ---------------- */
body.merchant .sidebar {
  width: 92px;
  background: #1a1d24;
  border-right: 0;
  box-shadow: none;
}

body.merchant .sb-brand {
  height: 60px;
  padding: 0;
  justify-content: center;
  gap: 0;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
body.merchant .sb-logo {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
  display: flex; align-items: center; justify-content: center;
  color: #1677ff;
}
body.merchant .sb-logo .ico { width: 17px; height: 17px; color: #1677ff; }
body.merchant .sb-name { display: none; }

body.merchant .sb-menu { padding: 4px 6px 6px; }
body.merchant .sb-menu-label {
  padding: 16px 12px 7px;
  font-size: 11px;
  letter-spacing: 1.6px;
  color: #5a6879;
  font-weight: 600;
  text-transform: none;
  user-select: none;
}
body.merchant .sb-menu-label:first-child { padding-top: 6px; }
body.merchant .sb-item { margin-bottom: 1px; }
body.merchant .sb-item > a {
  position: relative;
  height: 34px;
  padding: 0 6px;
  gap: 6px;
  border-left: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #9aa7b8;
  transition: background .16s ease, color .16s ease;
}
body.merchant .sb-item > a .ico { width: 17px; height: 17px; color: #9aa7b8; transition: color .16s ease; }
body.merchant .sb-item > a:hover { background: #232833; color: #e6ecf5; }
body.merchant .sb-item > a:hover .ico { color: #b9c4d4; }

/* 选中：整行圆角深灰蓝底 + 白字 + 图标亮蓝（对齐参考系统） */
body.merchant .sb-item.on > a {
  background: #2b3444;
  color: #fff;
  font-weight: 700;
  box-shadow: none;
}
body.merchant .sb-item.on > a .ico { color: #409eff; }
body.merchant .sb-item.on > a::before { display: none; }

body.merchant .sb-foot {
  display: none;
  height: 42px;
  border-top: 1px solid rgba(255, 255, 255, .05);
  font-size: 11.5px;
  color: #5a6879;
  background: transparent;
  letter-spacing: .3px;
}

/* ---------------- 顶栏 ---------------- */
body.merchant .topbar {
  height: 60px;
  padding: 0 20px;
  background: #fff;
  backdrop-filter: none;
  border-bottom: 1px solid #eef1f6;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
body.merchant .tb-title { font-size: 16px; font-weight: 600; color: var(--title); letter-spacing: -.2px; }
body.merchant .tb-crumb { font-size: 12.5px; color: var(--txt-3); }
body.merchant .tb-crumb::before { content: "/"; margin-right: 6px; color: #d9d9d9; }

body.merchant .tb-search {
  height: 34px;
  border-radius: 8px;
  background: #f5f7fb;
  border: 1px solid transparent;
  transition: var(--transition);
}
body.merchant .tb-search:focus-within { background: #fff; border-color: var(--blue); }
body.merchant .tb-search input { width: 190px; font-size: 13px; color: var(--txt); }
body.merchant .tb-search-btn {
  height: 24px; border-radius: var(--radius-btn); font-size: 12px;
  background: transparent; border-color: transparent; color: var(--txt-3);
}
body.merchant .tb-bell {
  width: 32px; height: 32px; border-radius: var(--radius-btn);
  background: transparent; color: var(--txt-2);
}
body.merchant .tb-bell:hover { background: #f5f5f5; }
body.merchant .tb-user { height: 32px; padding: 0 6px; border-radius: var(--radius-btn); }
body.merchant .tb-user:hover { background: #f5f5f5; }
body.merchant .tb-user .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue); font-size: 12px;
}
body.merchant .tb-uname { font-size: 13px; color: var(--txt); }
body.merchant .tb-menu {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 4px;
}
body.merchant .tb-menu a { border-radius: var(--radius-btn); font-size: 13px; padding: 7px 12px; }

/* ---------------- KPI 卡（★ v1.2.10：数字更醒目） ---------------- */
body.merchant .rpt-kpi {
  border-radius: var(--radius);
  border-color: #eef1f6;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: box-shadow .18s ease, transform .18s ease;
}
body.merchant .rpt-kpi:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
body.merchant .rpt-kpi .k { font-size: 12.5px; color: var(--txt-3); letter-spacing: .2px; }
body.merchant .rpt-kpi .v {
  font-size: 26px; font-weight: 650; margin-top: 7px;
  letter-spacing: -.8px; font-variant-numeric: tabular-nums;
  line-height: 1.2; color: #1a1f27;
}
body.merchant .rpt-kpi .s { font-size: 12px; color: var(--txt-3); margin-top: 6px; }
body.merchant .rpt-kpi.g .v { color: #16a34a; }
body.merchant .rpt-kpi.r .v { color: #dc2626; }
body.merchant .rpt-kpi.o .v { color: #d97706; }
body.merchant .rpt-kpi.b .v { color: #1677ff; }

/* ---------------- 二级菜单（浅灰白，与深色一级栏区分） ---------------- */
body.merchant .subnav {
  width: 168px;
  background: #fff;
  padding: 10px 0;
  border-right: 1px solid var(--line);
}
body.merchant .subnav a {
  margin: 2px 9px;
  padding: 9px 12px;
  border-left: 0;
  border-radius: 7px;
  font-size: 13px;
  color: var(--txt-2);
  transition: var(--transition);
}
body.merchant .subnav a:hover { background: #f5f5f5; color: var(--blue); }
body.merchant .subnav a.on {
  background: var(--primary-light);
  color: var(--blue);
  font-weight: 500;
  box-shadow: none;
}
body.merchant .sub-group {
  padding: 0 14px;
  margin: 12px 0 4px;
  font-size: 11px;
  letter-spacing: .5px;
  color: #bfbfbf;
}

/* ---------------- 页签：白底下划线（截图里「首页」那条蓝线） ---------------- */
body.merchant .tabs {
  min-height: 40px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  gap: 2px;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
}
body.merchant .tab {
  position: relative;
  height: 40px;
  line-height: 40px;
  padding: 0 14px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  color: var(--txt-2);
  transition: color .15s;
  white-space: nowrap;
}
body.merchant .tab:hover { background: transparent; color: var(--blue); }
body.merchant .tab.on {
  background: transparent;
  color: var(--blue);
  font-weight: 500;
  border-bottom-color: var(--blue);
}

body.merchant .page { padding: 16px; }
body.merchant .page > .card:first-child { margin-top: 0; }

/* ==========================================================================
   2. 卡片 / 表格 / 表单 / 按钮
   ========================================================================== */

body.merchant .card {
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
body.merchant .card + .card { margin-top: 14px; }
body.merchant .card-title {
  padding: 15px 18px;
  border-bottom: 1px solid #f0f3f8;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--title);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -.1px;
}
body.merchant .card-title::before {
  width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, #52a8ff, #1677ff);
}
body.merchant .card-body { padding: 18px; }
body.merchant .card-tip { font-size: 12px; font-weight: 400; color: var(--txt-3); }
body.merchant .toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- 表格 ---- */
body.merchant .tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
body.merchant .tbl th {
  background: #fafbfd;
  color: var(--txt-2);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 11px 14px;
  border-bottom: 1px solid #eef1f6;
  white-space: nowrap;
}
body.merchant .tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid #f5f5f5;
  color: var(--txt);
  vertical-align: middle;
}
body.merchant .tbl tbody tr:hover td { background: #fafafa; }
body.merchant .tbl tbody tr:last-child td { border-bottom: 0; }
body.merchant .tbl .ta-right,
body.merchant .tbl .td-num { text-align: right; font-variant-numeric: tabular-nums; }
body.merchant .tbl-empty { padding: 48px 0; text-align: center; color: var(--txt-3); font-size: 13px; }

/* ---- 表单 ---- */
body.merchant .form-row { display: flex; gap: 12px; flex-wrap: wrap; }
body.merchant .form-item { flex: 1; min-width: 200px; }
body.merchant .form-item.full { flex: 0 0 100%; }
body.merchant .form-label {
  display: block;
  font-size: 12.5px;
  color: var(--txt-2);
  margin-bottom: 6px;
}
body.merchant .form-label.req::after { content: " *"; color: var(--red); }
body.merchant .form-sec {
  font-size: 13px; font-weight: 600; color: var(--title);
  padding: 10px 0 8px; margin-top: 4px;
  border-bottom: 1px solid #f5f5f5;
}
body.merchant .form-tip { font-size: 12px; color: var(--txt-3); line-height: 1.7; margin-top: 8px; }

body.merchant .inp,
body.merchant .sel,
body.merchant textarea.inp {
  height: 32px;
  line-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-size: 13px;
  color: var(--txt);
  background: #fff;
  transition: var(--transition);
  width: 100%;
  box-sizing: border-box;
}
body.merchant textarea.inp { height: auto; line-height: 1.6; padding: 6px 9px; }
body.merchant .inp:hover,
body.merchant .sel:hover { border-color: var(--primary-hover); }
body.merchant .inp:focus,
body.merchant .sel:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, .12);
  outline: none;
}
body.merchant .inp:disabled { background: #f5f5f5; color: #bfbfbf; cursor: not-allowed; }
body.merchant .form-item .inp.sm { height: 28px; line-height: 26px; font-size: 12.5px; }

/* ---- 按钮 ---- */
body.merchant .btn {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--txt);
  box-shadow: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
}
body.merchant .btn:hover { border-color: var(--primary-hover); color: var(--blue); }
body.merchant .btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: none;
}
body.merchant .btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}
body.merchant .btn-default { background: #fff; border-color: var(--border); color: var(--txt); }
body.merchant .btn-default:hover { border-color: var(--primary-hover); color: var(--blue); }
body.merchant .btn-danger {
  background: #fff; border-color: #ffccc7; color: var(--red);
}
body.merchant .btn-danger:hover { background: #fff1f0; border-color: var(--red); }
body.merchant .btn-text {
  border-color: transparent; background: transparent; color: var(--blue); padding: 0 6px;
}
body.merchant .btn-text:hover { background: var(--primary-light); }
body.merchant .btn-sm { height: 26px; padding: 0 9px; font-size: 12.5px; border-radius: var(--radius-btn); }
body.merchant .btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---- 标签 ---- */
body.merchant .tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--radius-btn);
  font-size: 12px;
  line-height: 18px;
  background: #f5f5f5;
  color: var(--txt-2);
  border: 1px solid transparent;
}
body.merchant .tag-ok,
body.merchant .tag-success,
body.merchant .tag-green { background: #f6ffed; color: #389e0d; border-color: #b7eb8f; }
body.merchant .tag-danger,
body.merchant .tag-red { background: #fff1f0; color: #cf1322; border-color: #ffa39e; }
body.merchant .tag-warn,
body.merchant .tag-orange { background: #fffbe6; color: #d48806; border-color: #ffe58f; }
body.merchant .tag-blue { background: var(--primary-light); color: #096dd9; border-color: #91d5ff; }

/* ---- 提示条 ---- */
body.merchant .alert {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.7;
  border: 1px solid transparent;
  margin-bottom: 12px;
}
body.merchant .alert-ok { background: #f6ffed; border-color: #b7eb8f; color: #389e0d; }
body.merchant .alert-err { background: #fff1f0; border-color: #ffa39e; color: #cf1322; }
body.merchant .alert-warn { background: #fffbe6; border-color: #ffe58f; color: #d48806; }
body.merchant .alert-info { background: #fdeceb; border-color: #91d5ff; color: #096dd9; }

/* ---- 弹窗 ---- */
body.merchant .modal {
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
  border: 0;
}
body.merchant .modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
body.merchant .modal-title { font-weight: 600; color: var(--title); }
body.merchant .modal-body { padding: 18px; }
body.merchant .modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #fafafa;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
body.merchant .modal-close { color: #bfbfbf; font-size: 18px; }
body.merchant .modal-close:hover { color: var(--txt-2); }

/* ---- v1.2.17 商品编辑（参照参考系统「新增商品」更细致）---- */
body.merchant .modal-xl { max-width: 1100px; }
body.merchant .modal-xl .modal-body { max-height: 80vh; overflow: auto; }

/* ---- v1.2.17 售后工单 ---- */
body.merchant .badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; line-height: 18px; }
body.merchant .badge-warn { background: #fff4e0; color: #d98a00; }
body.merchant .badge-info { background: #e8f1ff; color: #1a73e8; }
body.merchant .badge-danger { background: #ffe9e9; color: #e0483c; }
body.merchant .badge-ok { background: #e6f7ec; color: #1a9d4b; }
body.merchant .badge-muted { background: #f0f1f4; color: #8a93a3; }
body.merchant .as-img-row { display: flex; gap: 8px; flex-wrap: wrap; }
body.merchant .as-img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #f3f5f9; }
body.merchant .as-log { border-left: 2px solid #e6eaf0; padding: 6px 0 6px 14px; margin-left: 4px; position: relative; }
body.merchant .as-log::before { content: ''; position: absolute; left: -5px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: #b9c2d0; }
body.merchant .as-log .t { color: var(--txt-2); font-size: 12px; }
body.merchant .as-kv { display: grid; grid-template-columns: 88px 1fr; gap: 6px 14px; font-size: 13px; margin: 0; }
body.merchant .as-kv dt { color: var(--txt-2); }
body.merchant .as-kv dd { margin: 0; color: var(--txt); }
body.merchant .pd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
body.merchant .pd-bread { color: var(--txt-2); font-size: 13px; }
body.merchant .pd-acts { display: flex; gap: 8px; }
body.merchant .pd-layout { display: flex; gap: 16px; align-items: flex-start; }
body.merchant .pd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
body.merchant .pd-aside { width: 300px; flex: none; }
body.merchant .pd-form { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
body.merchant .pd-form .form-item.full { grid-column: 1 / -1; }
body.merchant .pd-chk-group { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 4px 0; }
body.merchant .pd-chk-group .chk-line { margin: 0; }
body.merchant .pd-row-inline { display: flex; align-items: center; gap: 8px; }
body.merchant .pd-row-inline .inp { flex: 1; }
body.merchant .pd-suffix { color: var(--txt-2); font-size: 13px; white-space: nowrap; }
body.merchant .pd-color { width: 34px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
body.merchant .pd-sku-img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #f3f5f9; }
body.merchant .pd-sku-img.ph { display: inline-flex; align-items: center; justify-content: center; color: #b9c2d0; font-size: 18px; cursor: pointer; }

/* ---- 分页 ---- */
body.merchant .pager { display: flex; align-items: center; gap: 6px; padding: 12px 16px; justify-content: flex-end; }
body.merchant .pager a,
body.merchant .pager span {
  min-width: 28px; height: 28px; line-height: 26px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-btn);
  font-size: 12.5px; color: var(--txt-2); padding: 0 6px;
}
body.merchant .pager a:hover { border-color: var(--blue); color: var(--blue); }
body.merchant .pager .on { background: var(--blue); border-color: var(--blue); color: #fff; }

body.merchant .loading { padding: 40px; text-align: center; color: var(--txt-3); font-size: 13px; }
body.merchant .hint { font-size: 12.5px; color: var(--txt-3); line-height: 1.7; }
body.merchant .empty { padding: 40px; text-align: center; color: var(--txt-3); }

/* ==========================================================================
   3. 总览（重绘为 AntD 风格：浅色横幅 + 白卡片 KPI）
   ========================================================================== */

body.merchant .ov-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 20px 22px;
  border-radius: var(--radius);
  color: var(--title);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
body.merchant .ov-hero::after {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 144, 255, .10), transparent 70%);
  pointer-events: none;
}
body.merchant .ov-hero h2 { font-size: 18px; font-weight: 600; color: var(--title); }
body.merchant .ov-hero p { margin-top: 6px; font-size: 12.5px; color: var(--txt-3); }
body.merchant .ov-hero-meta { display: flex; gap: 34px; margin-top: 16px; flex-wrap: wrap; }
body.merchant .ov-hero-meta div b { display: block; font-size: 22px; font-weight: 600; color: var(--title); letter-spacing: -.3px; }
body.merchant .ov-hero-meta div span { font-size: 12px; color: var(--txt-3); }
body.merchant .ov-hero-acts { position: absolute; right: 20px; top: 18px; display: flex; gap: 8px; z-index: 2; }
body.merchant .ov-hero-acts .btn {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--txt);
  backdrop-filter: none;
}
body.merchant .ov-hero-acts .btn:hover { border-color: var(--blue); color: var(--blue); }

body.merchant .ov-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px; margin-bottom: 14px;
}
body.merchant .ov-kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
body.merchant .ov-kpi:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, .07); transform: none; }
body.merchant .ov-kpi .ki {
  width: 38px; height: 38px; border-radius: var(--radius-sm); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--blue);
}
body.merchant .ov-kpi .ki .ico { width: 18px; height: 18px; }
body.merchant .ov-kpi.g .ki { background: #f6ffed; color: #52c41a; }
body.merchant .ov-kpi.o .ki { background: #fffbe6; color: #faad14; }
body.merchant .ov-kpi.r .ki { background: #fff1f0; color: #f5222d; }
body.merchant .ov-kpi.p .ki { background: #f9f0ff; color: #722ed1; }
body.merchant .ov-kpi .k { font-size: 12.5px; color: var(--txt-3); }
body.merchant .ov-kpi .v { font-size: 21px; font-weight: 600; color: var(--title); letter-spacing: -.4px; margin-top: 3px; }
body.merchant .ov-kpi .v em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--txt-3); margin-left: 3px; }
body.merchant .ov-kpi .s { font-size: 11.5px; color: var(--txt-3); margin-top: 4px; }

body.merchant .ov-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 1180px) { body.merchant .ov-grid { grid-template-columns: 1fr; } }
body.merchant .ov-chart { height: 172px; display: flex; align-items: flex-end; gap: 5px; padding-top: 6px; }
body.merchant .ov-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
body.merchant .ov-bar i {
  display: block; border-radius: 3px 3px 0 0; min-height: 3px;
  background: #91d5ff;
  transition: var(--transition);
}
body.merchant .ov-bar:hover i { background: var(--blue); }
body.merchant .ov-bar-x { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10.5px; color: var(--txt-3); }

body.merchant .ov-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
body.merchant .ov-quick a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--txt-2);
  font-size: 12.5px;
  background: #fff;
  transition: var(--transition);
}
body.merchant .ov-quick a:hover { border-color: #91d5ff; background: #f0f8ff; color: var(--blue); transform: none; }
body.merchant .ov-quick .qi {
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--blue);
}

body.merchant .ov-todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
body.merchant .ov-todo-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 8px; background: #fff; text-align: center;
  cursor: pointer; transition: var(--transition);
}
body.merchant .ov-todo-item:hover { border-color: #91d5ff; background: #f0f8ff; }
body.merchant .ov-todo-item b { display: block; font-size: 20px; font-weight: 600; color: var(--txt-2); line-height: 1.2; }
body.merchant .ov-todo-item span { display: block; font-size: 12px; color: var(--txt-3); margin-top: 4px; }
body.merchant .ov-todo-item.on b { color: var(--red); }
body.merchant .ov-todo-item.on { border-color: #ffccc7; background: #fff8f8; }

body.merchant .ov-rank { display: flex; flex-direction: column; }
body.merchant .ov-rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed #f5f5f5; }
body.merchant .ov-rank-row:last-child { border-bottom: 0; }
body.merchant .ov-rank-row .no {
  width: 18px; height: 18px; border-radius: var(--radius-btn); flex: none;
  background: #f5f5f5; color: var(--txt-3); font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
body.merchant .ov-rank-row:nth-child(1) .no { background: var(--blue); color: #fff; }
body.merchant .ov-rank-row:nth-child(2) .no { background: #69c0ff; color: #fff; }
body.merchant .ov-rank-row:nth-child(3) .no { background: #b7eb8f; color: #fff; }
body.merchant .ov-rank-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--txt); }
body.merchant .ov-rank-row .amt { color: var(--txt-2); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   4. 新增页面组件（资金账户 / 收付款单 / 补货 / 调度）
   ========================================================================== */

/* 账户卡片 */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.acc-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; background: #fff; position: relative;
  transition: var(--transition);
}
.acc-card:hover { border-color: #91d5ff; box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.acc-card-top { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.acc-ico {
  width: 32px; height: 32px; border-radius: var(--radius-sm); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--blue); font-size: 13px; font-weight: 600;
}
.acc-ico.bank { background: #f6ffed; color: #52c41a; }
.acc-ico.wechat { background: #f6ffed; color: #07c160; }
.acc-ico.alipay { background: #fdeceb; color: #1677ff; }
.acc-ico.other { background: #f5f5f5; color: #8c8c8c; }
.acc-name { font-size: 13.5px; font-weight: 600; color: var(--title); }
.acc-sub { font-size: 11.5px; color: var(--txt-3); margin-top: 1px; }
.acc-bal { font-size: 22px; font-weight: 600; color: var(--title); letter-spacing: -.5px; }
.acc-bal small { font-size: 12px; color: var(--txt-3); font-weight: 400; margin-left: 3px; }
.acc-io { display: flex; gap: 16px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #f0f0f0; font-size: 12px; }
.acc-io .in { color: #389e0d; }
.acc-io .out { color: #cf1322; }
.acc-io em { font-style: normal; color: var(--txt-3); margin-right: 3px; }
.acc-acts { position: absolute; right: 12px; top: 12px; display: flex; gap: 2px; opacity: 0; transition: var(--transition); }
.acc-card:hover .acc-acts { opacity: 1; }

/* 核销行 */
.wo-list { border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 230px; overflow-y: auto; }
.wo-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-bottom: 1px solid #f5f5f5; font-size: 12.5px; }
.wo-item:last-child { border-bottom: 0; }
.wo-item .no { flex: 1; min-width: 0; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wo-item .dt { color: var(--txt-3); font-size: 11.5px; }
.wo-item .left { color: #cf1322; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wo-item .amt { width: 96px; }
.wo-item .amt .inp { height: 26px; line-height: 24px; font-size: 12.5px; text-align: right; }
.wo-total { display: flex; justify-content: space-between; padding: 9px 11px; background: #fafafa; border-top: 1px solid var(--line); font-size: 12.5px; }

/* 补货标记 */
.dot-lv { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dot-lv.out { background: #f5222d; }
.dot-lv.urgent { background: #faad14; }
.dot-lv.normal { background: #52c41a; }

/* 调度看板 */
.dsp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.dsp-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dsp-col-h {
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--title);
  display: flex; align-items: center; justify-content: space-between;
}
.dsp-col-h .n {
  background: #f5f5f5; color: var(--txt-2); border-radius: 10px;
  padding: 1px 8px; font-size: 11.5px; font-weight: 400;
}
.dsp-col-b { padding: 8px; max-height: 420px; overflow-y: auto; }
.dsp-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 11px; margin-bottom: 7px; font-size: 12.5px; background: #fff;
  transition: var(--transition);
}
.dsp-item:hover { border-color: #91d5ff; background: #fafcff; }
.dsp-item .r1 { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.dsp-item .nm { font-weight: 500; color: var(--title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsp-item .amt { color: #cf1322; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dsp-item .r2 { color: var(--txt-3); font-size: 11.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsp-empty { padding: 28px 10px; text-align: center; color: var(--txt-3); font-size: 12.5px; }

/* 通用小工具 */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gap-8 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 响应式：窄屏收起侧栏宽度 */
@media (max-width: 1280px) {
  body.merchant .sidebar { width: 92px; }
  body.merchant .subnav { width: 152px; }
}

/* ★ 960px 以下：admin.css 把侧栏折成 62px 图标栏，并隐藏文字。
   本文件的 body.merchant 前缀特异性更高，如果不再声明一次，
   会变成「208px 宽但只剩图标」的畸形布局。这里同步折叠尺寸。 */
@media (max-width: 960px) {
  body.merchant .sidebar { width: 60px; }
  body.merchant .subnav { width: 138px; }
  body.merchant .sb-brand { justify-content: center; padding: 0; }
  body.merchant .sb-item > a { justify-content: center; padding: 0; }
  body.merchant .sb-menu { padding: 4px 6px; }
  body.merchant .sb-menu-label { display: none; }
  body.merchant .sb-foot { display: none; }
}

/* ==========================================================================
   5. 首页工作台（对齐参考系统：待办网格 + 右侧快捷入口/预警/消息）
   ========================================================================== */

/* 两栏：左待办、右辅助 */
.ov-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
@media (max-width: 1240px) { .ov-wrap { grid-template-columns: minmax(0, 1fr); } }

/* 顶部欢迎条（窄一点，别抢待办的位置） */
.hm-bar {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 12px;
}
.hm-bar .who { font-size: 14px; font-weight: 600; color: var(--title); }
.hm-bar .sub { font-size: 12.5px; color: var(--txt-3); }
.hm-bar .sp { flex: 1; }
.hm-bar .btn { height: 30px; font-size: 12.5px; }

/* 卡片标题右侧的「自定义设置 / 查看全部」小链接 */
.card-link {
  margin-left: auto; font-size: 12.5px; font-weight: 400;
  color: var(--blue); cursor: pointer;
}
.card-link:hover { color: var(--primary-hover); }

/* ---- 待办网格：4 列，卡片右上角圆形彩色图标 ---- */
.td-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}
@media (max-width: 1500px) { .td-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .td-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.td-card {
  position: relative;
  border: 1px solid #ebedf0;
  border-radius: 6px;
  padding: 11px 13px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  min-width: 0;
}
.td-card:hover { border-color: var(--blue); box-shadow: 0 2px 8px rgba(24, 144, 255, .12); }
.td-card.active { border-color: var(--blue); }

.td-t {
  font-size: 13px;
  color: #5a6675;
  line-height: 1.4;
  padding-right: 30px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-ico {
  position: absolute; right: 11px; top: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.td-ico .ico { width: 12px; height: 12px; color: #fff; }
.td-ico.orange { background: #fa8c16; }
.td-ico.blue   { background: #e5361f; }
.td-ico.purple { background: #722ed1; }
.td-ico.green  { background: #52c41a; }
.td-ico.red    { background: #f5222d; }
.td-ico.cyan   { background: #13c2c2; }

.td-n {
  font-size: 22px;
  font-weight: 600;
  color: #1f2733;
  line-height: 1.15;
  margin-top: 5px;
  letter-spacing: -.4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-n.zero { color: #bfbfbf; font-weight: 500; }

/* ---- 快捷入口（浅蓝底按钮网格） ---- */
.qk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
.qk-grid a {
  display: block;
  background: #eaf4ff;
  color: #1e6fd9;
  text-align: center;
  padding: 9px 6px;
  border-radius: 4px;
  font-size: 13px;
  transition: background .15s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.qk-grid a:hover { background: #d6e9ff; color: var(--blue); }

/* ---- 预警信息 ---- */
.warn-list { padding: 4px 14px 12px; }
.warn-item {
  display: flex; gap: 7px; align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dashed #f0f0f0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #5a6675;
  cursor: pointer;
}
.warn-item:last-child { border-bottom: 0; }
.warn-item:hover { color: var(--blue); }
.warn-item .tag { flex: none; margin-top: 1px; }
.warn-item .tx { flex: 1; min-width: 0; }
.warn-empty { padding: 22px 0; text-align: center; color: #bfbfbf; font-size: 12.5px; }

/* ---- 消息通知 ---- */
.msg-list { padding: 4px 14px 12px; }
.msg-item {
  display: flex; gap: 8px; align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed #f0f0f0;
  font-size: 12.5px;
  color: #5a6675;
}
.msg-item:last-child { border-bottom: 0; }
.msg-item .who { color: #1f2733; font-weight: 500; flex: none; }
.msg-item .tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item .tm { color: #bfbfbf; flex: none; font-size: 11.5px; }


/* ==========================================================================
   v1.2.15 商城 / 车销 / 分拣 页面补充样式
   全部用 body.merchant 限定，绝不污染平台端
   ========================================================================== */
body.merchant .kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px; padding: 4px 0 6px;
}
body.merchant .kpi {
  background: #fff; border: 1px solid #e8edf4; border-radius: 10px;
  padding: 14px 16px; box-shadow: 0 1px 3px rgba(20,40,80,.04);
  transition: transform .18s, box-shadow .18s;
}
body.merchant .kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(20,40,80,.10); }
body.merchant .kpi-label { font-size: 12px; color: #8090a4; margin-bottom: 8px; }
body.merchant .kpi-num { font-size: 22px; font-weight: 650; color: #1f2733; letter-spacing: -.4px; }
body.merchant .kpi-num small { font-size: 12px; font-weight: 400; color: #93a1b3; margin-left: 4px; }

body.merchant .mini-chart {
  display: flex; align-items: flex-end; gap: 14px; height: 150px;
  padding: 12px 8px 0; border-bottom: 1px solid #e8edf4;
}
body.merchant .mini-bar { flex: 1; height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; position: relative; }
body.merchant .mini-bar-in {
  width: 100%; max-width: 46px; border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #4d8bff, #e5361f);
}
body.merchant .mini-bar span { font-size: 11px; color: #8090a4; margin-top: 6px; }
body.merchant .mini-bar em { font-size: 10.5px; color: #a3b0c0; font-style: normal; }

body.merchant .quick-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
}
body.merchant .quick-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border: 1px solid #e8edf4; border-radius: 9px;
  background: #fafbfe; color: #1f2733; text-decoration: none; transition: .18s;
}
body.merchant .quick-card:hover { background: #fdeceb; border-color: #b9d0ff; }
body.merchant .quick-card b { font-size: 13.5px; font-weight: 600; }
body.merchant .quick-card span { font-size: 13px; color: #e5361f; font-weight: 600; }

body.merchant .chk-grid {
  max-height: 260px; overflow: auto; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 12px;
  border: 1px solid #e8edf4; border-radius: 8px; padding: 10px 12px; background: #fafbfe;
}
body.merchant .chk-line { display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: #43506a; padding: 4px 0; }
body.merchant .chk-line input { accent-color: #e5361f; }

body.merchant .amount-line {
  margin-top: 12px; padding: 12px 14px; border-radius: 8px;
  background: #f6f8fc; font-size: 13px; color: #5a6675;
}
body.merchant .amount-line b { color: #d64545; font-size: 15px; }

body.merchant .progress {
  display: inline-block; width: 74px; height: 7px; border-radius: 4px;
  background: #e8edf4; overflow: hidden; vertical-align: middle; margin-right: 6px;
}
body.merchant .progress i { display: block; height: 100%; background: #e5361f; border-radius: 4px; }

body.merchant .form-title { font-size: 13px; font-weight: 600; color: #1f2733; }
body.merchant .muted { color: #a3b0c0; }
body.merchant .hint { font-size: 12px; color: #8090a4; line-height: 1.7; }

/* ==========================================================================
   v1.2.16 应用中心 —— 1:1 复刻参考系统「应用 → 插件市场」
   来源：真实登录 aierp 后抓取的 /app/adm/server/index?v=channelcrm 内联 CSS。
   类名保持原样（.lay-cate/.lay-ul/.wcont/.wicon/.wtag/.wstate/.wdes…），
   统一限定在 body.merchant .ac-market 作用域，绝不污染平台端与旧页面。
   ========================================================================== */
body.merchant .ac-market [hidden] { display: none !important; }
body.merchant .ac-market .laycont {
  display: flex; flex-direction: column; position: relative; min-height: 620px;
  padding: 0; background: #fff; border-radius: 10px; overflow: hidden;
}
body.merchant .ac-market .lay-body {
  display: flex; flex: 1; min-height: 0;
}
body.merchant .ac-market .lay-cate {
  width: 150px; flex-shrink: 0; background: #fff; border-right: #eef1f7 solid 1px;
  padding: 14px 0; display: flex; flex-direction: column;
}
body.merchant .ac-market .lay-cate .lay-cate-nav { padding: 0 12px 10px; }
body.merchant .ac-market .lay-cate .lc-cur {
  display: block; text-align: center; height: 34px; line-height: 34px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: #1677ff; background: #fdeceb;
}
body.merchant .ac-market .lay-cate h5 {
  padding: 8px 14px 6px; font-size: 13px; font-weight: 600; color: #1f2937;
}
body.merchant .ac-market .lay-cate dl {
  padding: 0 10px; display: flex; flex-direction: column; gap: 2px;
}
body.merchant .ac-market .lay-cate dd {
  height: 38px; line-height: 38px; padding: 0 14px; border-radius: 8px;
  font-size: 13px; color: #667085; cursor: pointer; user-select: none; transition: all .2s ease;
}
body.merchant .ac-market .lay-cate dd:hover { color: #2f8cff; background: #f2f7ff; }
body.merchant .ac-market .lay-cate dd.wact { color: #2f8cff; background: #eaf3ff; font-weight: 600; }
body.merchant .ac-market .lay-main {
  flex: 1; min-width: 0; padding: 0 16px; display: flex; flex-direction: column;
  box-sizing: border-box; background: #fff;
}
/* 右侧顶部：插件市场 / 应用列表 视图切换 + 搜索（参考系统，不在左侧竖栏） */
body.merchant .ac-market .lay-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; padding: 12px 14px; border-bottom: #eef1f7 solid 1px;
}
body.merchant .ac-market .lay-ttabs { display: flex; gap: 8px; }
body.merchant .ac-market .lay-ttabs .ttab {
  padding: 0 18px; height: 32px; line-height: 32px; border-radius: 16px;
  font-size: 13px; color: #5f6b7c; background: #f5f7fa; border: 1px solid #eef2f6;
  cursor: pointer; user-select: none; text-decoration: none; white-space: nowrap;
}
body.merchant .ac-market .lay-ttabs .ttab:hover { color: #1677ff; border-color: #b3d7ff; background: #ecf5ff; }
body.merchant .ac-market .lay-ttabs .ttab.on {
  background: linear-gradient(135deg,#2D8CF0,#1677ff); border-color: transparent; color: #fff; font-weight: 600;
}
body.merchant .ac-market .lay-main .lay-h5 {
  padding: 12px 14px 0; font-size: 15px; font-weight: 600; color: #1f2937;
  display: flex; align-items: center;
}
body.merchant .ac-market .ac-total { font-size: 12px; font-weight: 400; color: #98a2b3; margin-left: 6px; }
body.merchant .ac-market .plugin-search-wrap { display: flex; align-items: center; position: relative; }
body.merchant .ac-market .plugin-search {
  width: 220px; height: 30px; border: #dcdfe6 solid 1px; border-radius: 3px;
  padding: 0 28px 0 10px; font-size: 14px; outline: none; box-sizing: border-box; background: #fff;
}
body.merchant .ac-market .plugin-search:focus { border-color: #409eff; }
body.merchant .ac-market .plugin-search-reset {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%;
  background: #f56c6c; color: #fff; font-size: 12px; cursor: pointer; user-select: none;
}
body.merchant .ac-market .plugin-search-reset:hover { background: #f23c3c; }
/* v1.2.19：固定三列 —— 四列时卡片被挤到 240px，应用名称/描述/功能全看不清。
   三列每列约 340px，一行三个，信息密度与可读性平衡；窄屏再降为两列/一列。 */
body.merchant .ac-market .lay-ul {
  width: 100%; padding: 18px 14px 28px; box-sizing: border-box;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 14px;
}
@media (max-width: 1320px) { body.merchant .ac-market .lay-ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px)  { body.merchant .ac-market .lay-ul { grid-template-columns: minmax(0, 1fr); } }
body.merchant .ac-market .lay-li { width: 100%; min-width: 0; display: flex; }
body.merchant .ac-market .wcont {
  width: 100%; display: flex; align-items: center; background: #f4f7fd;
  border: #eaf0f8 solid 1px; border-radius: 16px; padding: 18px 18px; min-height: 96px;
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
body.merchant .ac-market .wcont:hover {
  transform: translateY(-1px); box-shadow: 0 12px 28px rgba(31,45,61,.06); border-color: #dbe4f2;
}
body.merchant .ac-market .wcont.theme1 { background: #fff8ef; border-color: #f4e8d4; }
body.merchant .ac-market .wcont.theme2 { background: #f0f9ff; border-color: #d4e9f7; }
body.merchant .ac-market .wcont.theme3 { background: #f5f3ff; border-color: #e3e0f7; }
body.merchant .ac-market .wcont.theme4 { background: #f0fdf4; border-color: #d4ede0; }
body.merchant .ac-market .wcont.theme5 { background: #eff6ff; border-color: #dbeafe; }
body.merchant .ac-market .wcont.is-linkable { cursor: pointer; }
body.merchant .ac-market .wbody { width: 100%; display: flex; align-items: center; gap: 14px; min-width: 0; }
body.merchant .ac-market .wicon {
  width: 52px; height: 52px; border-radius: 14px; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
body.merchant .ac-market .wicon svg { width: 52px; height: 52px; display: block; border-radius: 14px; }
body.merchant .ac-market .wmain { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
/* v1.2.19：三列后仍出现「AI…」「付…」被截断 —— 状态标签把标题挤没了。
   让标签可换行、标题最多两行，应用名称必须完整可读。 */
body.merchant .ac-market .whead { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; flex-wrap: wrap; }
body.merchant .ac-market .wtitle-wrap { min-width: 0; flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body.merchant .ac-market .wtitle {
  min-width: 0; font-size: 16px; font-weight: 700; line-height: 22px; color: #1f2937;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; word-break: break-all;
}
body.merchant .ac-market .wstate {
  display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 8px;
  border-radius: 999px; background: #ffefe8; color: #ff6b4a; font-size: 12px; line-height: 22px; flex-shrink: 0;
}
body.merchant .ac-market .wstate.is-lock { background: #f3f4f6; color: #98a2b3; }
body.merchant .ac-market .wtag {
  display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 8px;
  border-radius: 4px; background: #e8ecf3; color: #5f6b7c; font-size: 12px; line-height: 20px;
  flex-shrink: 0; font-weight: 500;
}
body.merchant .ac-market .wcont.theme1 .wtag { background: #fff0d9; color: #ff9f1a; }
body.merchant .ac-market .wcont.theme2 .wtag { background: #e0f2fe; color: #0ea5e9; }
body.merchant .ac-market .wcont.theme3 .wtag { background: #ede9fe; color: #8b5cf6; }
body.merchant .ac-market .wcont.theme4 .wtag { background: #dcfce7; color: #10b981; }
body.merchant .ac-market .wcont.theme5 .wtag { background: #dbeafe; color: #e5361f; }
/* v1.2.19：快捷功能常显 —— 原来只有鼠标悬停才出现，用户根本不知道应用能做什么。 */
body.merchant .ac-market .wextra {
  display: flex; align-items: center; justify-content: flex-start; gap: 6px; flex-wrap: wrap;
  opacity: 1; pointer-events: auto;
}
body.merchant .ac-market .whelper-btn {
  padding: 0 8px; height: 22px; line-height: 22px; border-radius: 999px; background: #fff;
  color: #5f6b7c; border: #dbe3ee solid 1px; font-size: 11px; cursor: pointer;
  white-space: nowrap; transition: all .2s ease;
}
body.merchant .ac-market .whelper-btn:hover { background: #eef5ff; color: #2f8cff; border-color: #b8d4ff; }
body.merchant .ac-market .wcont.theme1 .whelper-btn:hover { background: #fff0d9; color: #ff9f1a; border-color: #ffd294; }
body.merchant .ac-market .wdes {
  line-height: 19px; font-size: 13px; color: #667085; min-height: 38px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
/* 三列后卡片变宽，把功能清单也铺出来，而不是只留一行描述 */
body.merchant .ac-market .wfeat {
  display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 2px;
}
body.merchant .ac-market .wfeat span {
  font-size: 11px; line-height: 18px; padding: 0 7px; border-radius: 4px;
  background: #f2f5fa; color: #6b778c; white-space: nowrap;
}
/* 应用中心：应用分类在系统二级菜单；内容区顶部 .lay-top .ttab 仅做视图切换 */
body.merchant .ac-market .ac-empty { padding: 60px 20px; text-align: center; color: #98a2b3; font-size: 14px; }
body.merchant .ac-market .ac-list { padding: 14px; }

/* 应用工作台（每个应用点开后的真实业务页） */
body.merchant .ac-wb { display: flex; flex-direction: column; gap: 12px; }
body.merchant .ac-wb-hd {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: #fff; border: 1px solid #eef1f7; border-radius: 12px;
}
body.merchant .ac-wb-hd .wicon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
body.merchant .ac-wb-hd .wicon svg { width: 52px; height: 52px; }
body.merchant .ac-wb-t { flex: 1; min-width: 0; }
body.merchant .ac-wb-t h3 { margin: 0 0 6px; font-size: 18px; color: #1f2937; display: flex; align-items: center; gap: 8px; }
body.merchant .ac-wb-t p { margin: 0; font-size: 13px; color: #667085; line-height: 1.6; }
body.merchant .ac-wb-t .wtag, body.merchant .ac-wb-t .wstate {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: 4px; background: #e8ecf3; color: #5f6b7c; font-size: 12px; font-weight: 500;
}
body.merchant .ac-wb-t .wstate.is-lock { border-radius: 999px; background: #f3f4f6; color: #98a2b3; }
body.merchant .ac-wb-back { flex-shrink: 0; }
body.merchant .ac-wb .kpi-card {
  background: #fff; border: 1px solid #eef1f7; border-radius: 10px; padding: 12px 14px;
}
body.merchant .ac-wb .kpi-t { font-size: 12px; color: #98a2b3; }
body.merchant .ac-wb .kpi-v { font-size: 22px; font-weight: 700; color: #1f2937; margin: 4px 0 2px; }
body.merchant .ac-wb .kpi-s { font-size: 11px; color: #a3b0c0; }
body.merchant .ac-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
body.merchant .ac-tools .inp { width: 220px; }
body.merchant .ac-tools .sel { width: 150px; }
body.merchant .ac-pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 12px; font-size: 12px; color: #667085; }
body.merchant .ac-wb .form-row { display: flex; gap: 14px; margin-bottom: 10px; }
body.merchant .ac-wb .form-row .form-item { flex: 1; min-width: 0; }
body.merchant .ac-wb .form-tip { margin-top: 10px; font-size: 12px; color: #8090a4; line-height: 1.7; }

@media (min-width: 1680px) {
  body.merchant .ac-market .lay-li { width: calc(25% - 9px); }
}
@media (max-width: 1100px) {
  body.merchant .ac-market .lay-body { flex-direction: column; }
  body.merchant .ac-market .lay-cate {
    width: 100%; border-right: none; border-bottom: #eef1f7 solid 1px;
    flex-direction: row; align-items: center; padding: 10px 0;
  }
  body.merchant .ac-market .lay-cate .lay-cate-nav { padding: 0 10px; flex-shrink: 0; }
  body.merchant .ac-market .lay-cate .lc-cur { height: 32px; line-height: 32px; }
  body.merchant .ac-market .lay-cate h5 { display: none; }
  body.merchant .ac-market .lay-cate dl { flex-direction: row; flex-wrap: wrap; padding: 0 8px; }
  body.merchant .ac-market .lay-cate dd { padding: 0 12px; height: 34px; line-height: 34px; }
  body.merchant .ac-market .lay-li { width: calc(50% - 6px); }
}
@media (max-width: 768px) {
  body.merchant .ac-market .lay-li { width: 100%; }
  body.merchant .ac-market .wcont { padding: 16px; min-height: 88px; }
  body.merchant .ac-market .wbody { align-items: flex-start; }
  body.merchant .ac-market .wextra { opacity: 1; pointer-events: auto; }
}

/* ================================================================== */
/* 商城首页 DIY 装修 builder                                          */
/* ================================================================== */
.diy-wrap { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.diy-edit { flex: 1 1 380px; min-width: 320px; border: 1px solid #e7eaf0; border-radius: 8px; padding: 14px; background: #fff; }
.diy-edit-hd { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #5b6b7c; margin-bottom: 10px; }
.diy-list { display: flex; flex-direction: column; gap: 8px; }
.diy-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #eef1f5; border-radius: 8px; background: #fafbfc; }
.diy-item.diy-drag { opacity: .4; }
.diy-item.diy-over { border-color: #ff7a45; background: #fff5f0; }
.diy-handle { cursor: grab; color: #b6bfca; font-size: 18px; line-height: 1; user-select: none; }
.diy-item-main { flex: 1 1 auto; min-width: 0; }
.diy-item-name { font-weight: 600; font-size: 13px; color: #2b3a4b; margin-bottom: 4px; }
.diy-title { width: 100%; }
.diy-show { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #5b6b7c; white-space: nowrap; }
.diy-mv { display: inline-flex; flex-direction: column; gap: 3px; }
.diy-mv .btn { padding: 1px 7px; line-height: 1.4; font-size: 12px; }

.diy-prev { flex: 0 0 320px; display: flex; flex-direction: column; align-items: center; }
.diy-phone { width: 320px; border: 8px solid #2b3a4b; border-radius: 28px; overflow: hidden; background: #f5f6f8; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.diy-phone-hd { background: #ff5b39; color: #fff; text-align: center; font-size: 14px; font-weight: 600; padding: 10px 0; }
.diy-phone-bd { height: 540px; overflow-y: auto; padding: 10px; background: #f5f6f8; }
.diy-sec { margin-bottom: 10px; }
.diy-sec-t { font-size: 14px; font-weight: 700; color: #2b3a4b; margin: 6px 2px; }
.diy-search { background: #fff; border-radius: 16px; padding: 8px 12px; color: #9aa5b1; font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.diy-banner { height: 120px; border-radius: 10px; background: linear-gradient(135deg,#ff8a5b,#ff3d3d); }
.diy-notice { background: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12px; color: #4a5a6b; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diy-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.diy-chip { background: #fff; border-radius: 8px; text-align: center; padding: 10px 0; font-size: 12px; color: #5b6b7c; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.diy-topic { background: #fff; border-radius: 8px; padding: 12px; font-size: 13px; color: #2b3a4b; margin-top: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.diy-goods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.diy-good { background: #fff; border-radius: 8px; padding: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.diy-good-img { height: 60px; border-radius: 6px; background: #eef1f5; }
.diy-good-name { font-size: 11px; color: #4a5a6b; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diy-good-price { font-size: 12px; color: #ff5b39; font-weight: 600; margin-top: 2px; }
.diy-promo { background: linear-gradient(135deg,#ffd86b,#ff9a3d); border-radius: 8px; padding: 14px; color: #7a4b00; font-size: 13px; text-align: center; font-weight: 600; }
.diy-ph { color: #9aa5b1; font-size: 12px; text-align: center; padding: 10px 0; }

/* v1.2.18 应用深度工作台：功能清单 / 真实经营 KPI / 快捷入口 */
body.merchant .ac-market .wextra { opacity: 1; pointer-events: auto; }
body.merchant .ac-market .whelper-btn.is-quick { background: #f0f6ff; color: #2f6fed; border-color: #cfe0ff; font-weight: 600; }
body.merchant .ac-wb .ac-deep-tabs,
body.merchant .ac-wb .ac-deep-quick {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 10px 12px; background: #f8fafd; border: #eef1f7 solid 1px; border-radius: 10px;
}
body.merchant .ac-wb .ac-deep-label { font-size: 12px; font-weight: 600; color: #667085; margin-right: 4px; }
body.merchant .ac-wb .ac-deep-chip {
  padding: 3px 10px; border-radius: 999px; background: #fff;
  border: #e4e9f2 solid 1px; font-size: 12px; color: #475467;
}
body.merchant .ac-wb .ac-deep-sec { display: flex; flex-direction: column; }
body.merchant .ac-wb .ac-deep-h { font-size: 14px; font-weight: 600; color: #1f2937; margin: 2px 0 10px; }
body.merchant .ac-wb .ac-deep-h span { font-weight: 400; font-size: 12px; color: #98a2b3; margin-left: 8px; }
body.merchant .ac-wb .ac-deep-sec .kpi-grid { margin: 0; }
body.merchant .ac-wb .ac-deep-empty {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 0 12px; font-size: 12px; color: #98a2b3;
}


/* ==================================================================
   v1.2.19 商城营销插件页：右上角横排选项卡（细分类目）
   ================================================================== */
body.merchant .mkt-page { display: flex; flex-direction: column; gap: 12px; }
body.merchant .mkt-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #fff; border: 1px solid #eef1f7; border-radius: 12px; padding: 14px 18px; flex-wrap: wrap;
}
body.merchant .mkt-hd-l { min-width: 0; }
body.merchant .mkt-hd h3 { margin: 0 0 4px; font-size: 18px; color: #1f2937; }
body.merchant .mkt-hd p { margin: 0; font-size: 12px; color: #8a95a6; }
body.merchant .mkt-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
body.merchant .mkt-tabs .mtab {
  padding: 6px 14px; border-radius: 999px; border: 1px solid #e3e9f2; background: #fff;
  color: #5f6b7c; font-size: 13px; cursor: pointer; white-space: nowrap; transition: all .18s ease;
}
body.merchant .mkt-tabs .mtab:hover { color: #1677ff; border-color: #b3d7ff; background: #f2f8ff; }
body.merchant .mkt-tabs .mtab.on { color: #fff; background: #2f8cff; border-color: #2f8cff; font-weight: 600; }
body.merchant .mkt-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { body.merchant .mkt-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body.merchant .mkt-kpi .k { background: #fff; border: 1px solid #eef1f7; border-radius: 10px; padding: 12px 14px; }
body.merchant .mkt-kpi .k b { display: block; font-size: 20px; color: #1f2937; line-height: 28px; }
body.merchant .mkt-kpi .k span { font-size: 12px; color: #8a95a6; }
body.merchant .mkt-panel { background: #fff; border: 1px solid #eef1f7; border-radius: 12px; padding: 14px 16px; }
body.merchant .mkt-panel .tbl-wrap { border: 0; }
body.merchant .mkt-empty { padding: 34px 12px; text-align: center; color: #98a2b3; font-size: 13px; }

/* ==================================================================
   v1.2.19 售后工单：流程时间线 / 照片墙 / 订单选择器
   ================================================================== */
body.merchant .as-flow { display: flex; align-items: flex-start; gap: 0; margin: 4px 0 14px; flex-wrap: wrap; }
body.merchant .as-flow .step { flex: 1; min-width: 92px; text-align: center; position: relative; }
body.merchant .as-flow .step .dot {
  width: 22px; height: 22px; line-height: 22px; margin: 0 auto 6px; border-radius: 50%;
  background: #eef1f6; color: #98a2b3; font-size: 11px; font-weight: 700;
}
body.merchant .as-flow .step.done .dot { background: #2f8cff; color: #fff; }
body.merchant .as-flow .step .lb { font-size: 11px; color: #98a2b3; line-height: 16px; }
body.merchant .as-flow .step.done .lb { color: #2f8cff; font-weight: 600; }
body.merchant .as-flow .step .line {
  position: absolute; top: 11px; left: 50%; width: 100%; height: 2px; background: #eef1f6; z-index: -1;
}
body.merchant .as-flow .step.done .line { background: #bcd7ff; }
body.merchant .as-photos { display: flex; flex-wrap: wrap; gap: 8px; }
body.merchant .as-photos .ph { width: 88px; height: 88px; border-radius: 8px; overflow: hidden; border: 1px solid #e3e9f2; position: relative; }
body.merchant .as-photos .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.merchant .as-photos .ph em { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 10px; text-align: center; font-style: normal; }
body.merchant .as-photos .ph .rm { position: absolute; right: 2px; top: 2px; width: 18px; height: 18px; line-height: 16px; border-radius: 50%; background: #f56c6c; color: #fff; text-align: center; cursor: pointer; font-size: 12px; }
body.merchant .as-pick { border: 1px solid #e8edf5; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: #fafcff; }
body.merchant .as-pick .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
body.merchant .as-pick .hint { font-size: 12px; color: #8a95a6; margin-top: 6px; }
body.merchant .as-order-list { max-height: 260px; overflow: auto; margin-top: 8px; }
body.merchant .as-order-list .oi { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid #f0f3f8; cursor: pointer; font-size: 13px; }
body.merchant .as-order-list .oi:hover { background: #f2f8ff; }
body.merchant .as-order-list .oi .n { font-weight: 600; color: #2f8cff; min-width: 150px; }
body.merchant .as-order-list .oi .c { color: #4b5563; }
body.merchant .as-order-list .oi .t { margin-left: auto; color: #98a2b3; font-size: 12px; }
