/* ==========================================================================
   万pay 控制台 · 后台通用样式（console.css）
   --------------------------------------------------------------------------
   与登录页（login/assets/login.css）共用同一套设计语言与色板：主色走 CSS 变量，
   靠 <body data-app="agent"> 切换。三个后台复用时只需要加一段 data-app 变量块。

   与登录页的差别只有一处：登录页是「一张居中卡片」，这里是「侧栏 + 内容区」。
   变量的名字、色值、圆角、字号都与登录页保持一致 —— 这样从登录页跳到后台
   不会有「换了一套系统」的割裂感。
   ========================================================================== */

:root {
  --accent: #3d8bfd;
  --accent-hover: #2f7bf0;
  --accent-ring: rgba(61, 139, 253, .12);
  --accent-deco: rgba(61, 139, 253, .07);

  --ink: #333;
  --ink-2: #666;
  --ink-3: #8a8f99;
  --ink-4: #b0b3b8;
  --line: #eef0f3;
  --border: #dcdfe6;
  --bg: #f4f6f9;
  --danger: #e34d59;
  --warn: #e6a23c;
  --ok: #17a673;
}

/* 三端统一主色 #3d8bfd（原型蓝），不再按 data-app 分色 */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ==========================================================================
   一、后台骨架（index.html）
   ========================================================================== */

/*
 * 骨架照「服务商后台设计」原型：.app 纵向 —— 顶栏横贯全宽，
 * .main 横向分侧栏 + 内容区。顶栏在侧栏上方，logo 从侧栏挪到了顶栏。
 */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 1080px;
}

.main {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ---------- 顶栏（1:1 照原型 .topbar） ---------- */

.topbar {
  flex: none;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 20px;
}

/*
 * logo 暂用 merchant 端同款 brand 块（渐变方块 + 万pay/端名双行），
 * 替代原型的虚线占位框；正式 logo 出来后换成 <img> 即可。
 */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3d8bff, #2f7bff);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 15px; font-weight: 700; color: #22303f; }
.brand-sub { font-size: 11px; color: #8a90a0; letter-spacing: .5px; }

.topbar-spacer { flex: 1; }

.top-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5a6270;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  margin-left: 26px;
  transition: color .15s;
}
.top-item:hover { color: var(--accent-hover); }
.top-item svg { display: block; }

/* 账号胶囊：照原型 .sp-chip；点开下拉（角色 + 退出登录） */
.sp-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 26px;
  padding: 5px 13px 5px 6px;
  background: #eef4ff;
  border-radius: 16px;
  color: var(--accent-hover);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.sp-chip .dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chip-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(31, 36, 48, .12);
  padding: 8px;
  z-index: 40;
}
.sp-chip.is-open .chip-menu { display: block; }

.chip-menu .cm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.chip-menu .cm-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-menu .cm-logout {
  width: 100%;
  height: 30px;
  border: none;
  background: none;
  border-radius: 5px;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
}
.chip-menu .cm-logout:hover { background: #fdf1f2; color: var(--danger); }

/* ---------- 侧栏 ---------- */

.sidebar {
  flex: none;
  width: 208px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: width .18s;
}

.sidebar.is-collapsed { width: 60px; }

.menu {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
}

.menu-group-title {
  padding: 12px 10px 6px;
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: .5px;
  white-space: nowrap;
}

.sidebar.is-collapsed .menu-group-title { visibility: hidden; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  transition: background .14s, color .14s;
}

.menu-item:hover { background: var(--accent-deco); color: var(--accent); }

.menu-item.is-active {
  background: var(--accent-deco);
  color: var(--accent);
  font-weight: 600;
}

.menu-item svg { flex: none; }

.menu-item .arrow {
  margin-left: auto;
  flex: none;
  color: var(--ink-4);
  transition: transform .16s;
}

.menu-item.is-open .arrow { transform: rotate(90deg); }

.menu-sub { overflow: hidden; }

/* 子菜单折叠：用 max-height 而不是 display，这样有过渡动画；
   折叠状态下不能点（pointer-events），否则会点到一个看不见的条目 */
.menu-sub.is-hidden {
  max-height: 0;
  pointer-events: none;
}

.menu-sub .menu-item {
  height: 34px;
  padding-left: 33px;
  font-size: 12.5px;
}

.sidebar-foot {
  flex: none;
  border-top: 1px solid var(--line);
  padding: 10px;
}

.collapse-btn {
  width: 100%;
  height: 30px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 5px;
  color: var(--ink-3);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.collapse-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 内容区 ---------- */

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

.role-tag {
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-deco);
  border: 1px solid var(--accent-ring);
}

.frame-wrap { flex: 1; min-height: 0; background: var(--bg); }

.frame-wrap iframe { width: 100%; height: 100%; border: none; display: block; }

/* ==========================================================================
   二、子页面通用（pages/*.html）
   --------------------------------------------------------------------------
   子页面跑在 iframe 里，所以不需要再画侧栏/顶栏，只负责内容。
   body 的 padding 由 .page 给，避免每个页面各写一遍。
   ========================================================================== */

.page { padding: 16px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.page-title { font-size: 16px; font-weight: 600; }

.page-desc {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 5px;
  line-height: 1.7;
  max-width: 720px;
}

.page-actions { flex: none; display: flex; align-items: center; gap: 8px; }

/* ---------- 卡片 ---------- */

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
}

.card-head {
  height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title {
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 区块序号：与官方文档的字段分组一一对应（①商户信息 ②结算卡 …），
   复查资料时能对着文档逐条核，不用猜「这一块归哪一类」 */
.card-no {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-deco);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.card-head .spacer { flex: 1; }

.card-body { padding: 16px; }

.card-body.is-flush { padding: 0; }

/* ---------- 按钮（与原型对齐：胶囊形 + 渐变主按钮 + 蓝描边次按钮） ---------- */

.btn {
  height: 30px;
  padding: 0 24px;
  border-radius: 15px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .14s;
  white-space: nowrap;
}

.btn:hover:not(:disabled) { background: #f5f9ff; }

.btn:disabled { cursor: not-allowed; opacity: .55; }

.btn-primary {
  background: linear-gradient(135deg, #4d9bff, #2f7bf0);
  border: none;
  color: #fff;
  box-shadow: 0 3px 10px rgba(61, 139, 253, .30);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #3d8bfd, #2569d8);
  box-shadow: 0 5px 14px rgba(61, 139, 253, .40);
  transform: translateY(-1px);
}

.btn-danger { color: var(--danger); border-color: #f3c9cd; }

.btn-danger:hover:not(:disabled) { background: var(--danger); border-color: var(--danger); color: #fff; }

.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }

.btn-link {
  border: none;
  background: none;
  padding: 0;
  height: auto;
  color: var(--accent);
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
}

.btn-link:hover:not(:disabled) { text-decoration: underline; color: var(--accent-hover); }

.btn-link.is-muted { color: var(--ink-3); }

.btn .spin {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.btn:not(.btn-primary) .spin { border-color: var(--accent-ring); border-top-color: var(--accent); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 筛选条 ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.filter-item { display: flex; flex-direction: column; gap: 5px; }

.filter-item label { font-size: 12px; color: var(--ink-3); }

.filter-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- 表单 ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px 18px;
}

.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.form-grid .span-full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.field > label { font-size: 12.5px; color: var(--ink-2); }

.field > label .req { color: var(--danger); margin-left: 3px; }

.field-hint { font-size: 11.5px; color: var(--ink-4); line-height: 1.6; }

.field-error { font-size: 11.5px; color: var(--danger); line-height: 1.6; }

/* 多选（如直付通的「商户使用服务」）：几个中文选项平铺一行。
   用 label 包 input 而不是 for/id —— 选项是动态渲染的，for 要手工保证 id 唯一，
   而重绘一次忘了改 id，点击就绑到上一行的框上去了 */
.multi { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }

.multi-item { display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }

.multi-item input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer;
  accent-color: var(--accent); }

.multi-item:hover span { color: var(--ink); }

/* 经营类目资质提示（多行，来自「进件 MCC 与资质要求」） */
.mcc-qual {
  font-size: 11.5px;
  color: #8a5a00;
  background: #fff7e6;
  border: 1px solid #ffe1a8;
  border-radius: 4px;
  padding: 6px 8px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

input[type="text"], input[type="password"], input[type="number"], input[type="date"],
input[type="datetime-local"], input[type="email"], select, textarea {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

textarea { min-height: 72px; resize: vertical; line-height: 1.6; }

/*
 * 占位提示统一调灰到 --ink-4（#b0b3b8）。
 *
 * 浏览器的默认 placeholder 是「正文色降一点透明度」，正文是 #333 时它仍是深灰，
 * 远看和已填的值分不出来 —— 在进件这种几十个字段的表单里，用户会反复确认
 * 「这格到底填没填」。把灰度跟正文拉开一档，「还没填」一眼可辨。
 *
 * 取值与既有的 .f-input / .dtp .dtp-input 保持一致，不新造一个色值。
 * opacity:1 是给 Firefox 用的：它默认还会再叠一层 0.54 的透明度。
 */
input::placeholder, textarea::placeholder { color: var(--ink-4); opacity: 1; }
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { color: var(--ink-4); }
input::-moz-placeholder, textarea::-moz-placeholder { color: var(--ink-4); opacity: 1; }
input:-ms-input-placeholder, textarea:-ms-input-placeholder { color: var(--ink-4); }

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

input:disabled, select:disabled, textarea:disabled {
  background: #fafbfc;
  color: var(--ink-3);
  cursor: not-allowed;
}

.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea {
  border-color: var(--danger);
}

.field.is-invalid > label { color: var(--danger); }

select { cursor: pointer; }

/* 三级联动（省/市/区）一行放三个，窄屏自动换行 */
.cascade { display: flex; gap: 8px; }
.cascade > * { flex: 1; min-width: 0; }

/* ---------- 单选/复选框组 ---------- */

.radio-row { display: flex; flex-wrap: wrap; gap: 16px; min-height: 34px; align-items: center; }

.radio-row label, .check-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
}

.radio-row input, .check-row input { accent-color: var(--accent); cursor: pointer; }

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fcfdfe;
}

/* ---------- 费率表 ---------- */

.rate-table { width: 100%; border-collapse: collapse; }

.rate-table th, .rate-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  font-size: 12.5px;
}

.rate-table th { background: #fafbfc; color: var(--ink-2); font-weight: 600; }

.rate-table tr:last-child td { border-bottom: none; }

.rate-table input { min-height: 30px; }

.rate-table .col-pay { width: 160px; }
.rate-table .col-card { width: 130px; }
.rate-table .col-rate { width: 150px; }
.rate-table .col-cap { width: 150px; }

/* ---------- 附件上传 ---------- */

.attach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 14px;
}

.attach-tile {
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fcfdfe;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s;
}

.attach-tile:hover { border-color: var(--accent); }

.attach-tile.is-required { border-color: #f0d3d5; background: #fffafa; }

.attach-tile.has-file { border-style: solid; border-color: var(--line); background: #fff; }

.attach-label { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }

.attach-label .req { color: var(--danger); }

.attach-thumb {
  position: relative;
  width: 100%;
  height: 104px;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f3f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attach-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.attach-thumb .empty {
  font-size: 11.5px;
  color: var(--ink-4);
  text-align: center;
  line-height: 1.7;
  padding: 0 10px;
}

.attach-thumb .mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .42);
  color: #fff;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity .15s;
}

.attach-thumb:hover .mask { opacity: 1; }

.attach-thumb .mask span { cursor: pointer; }

.attach-thumb .mask span:hover { text-decoration: underline; }

.attach-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.attach-pick {
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
}

.attach-pick:hover { text-decoration: underline; }

/* 自定义图片（自由补充材料）：名称输入 + 添加按钮 + 多张列表 */
.custom-attach { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border); }
.custom-attach-title { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-bottom: 10px; }
.custom-attach-row { display: flex; gap: 10px; margin-bottom: 14px; }
.custom-attach-row input { flex: 1; }
#customAttachList:empty { display: none; }

/* 附件同步状态：图已留档但还没换成通道 image_id —— 必须显式提示，
   否则用户以为传完了，到提交时才报错，那时代价更高 */
.sync-tag { font-size: 11px; }
.sync-tag.ok { color: var(--ok); }
.sync-tag.wait { color: var(--warn); }
.sync-tag.skip { color: var(--ink-4); }

/* ---------- 通道专属参数：特殊行业资质（图 + 类型码 成对） ---------- */

.qual-block { margin-top: 4px; }

.qual-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.qual-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }

.qual-rows { display: flex; flex-direction: column; gap: 10px; }

/* 三列：资质类型 / 对应图片 / 删除。图片列给最宽，因为要放缩略图 + 文件名 */
.qual-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.5fr) 52px;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.qual-row .field { margin: 0; }

.qual-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 8px;
  min-height: 58px;
  cursor: pointer;
  transition: border-color .15s;
}

.qual-pick:hover { border-color: var(--accent); }

.qual-pick.is-empty { color: var(--ink-4); }

.qual-thumb {
  width: 60px;
  height: 44px;
  border-radius: 4px;
  overflow: hidden;
  background: #f1f3f6;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--ink-4);
}

.qual-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.qual-meta { min-width: 0; }

.qual-file {
  font-size: 12.5px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qual-src { font-size: 11px; color: var(--ink-4); margin-top: 2px; }

.qual-del {
  font-size: 12px;
  color: var(--danger);
  cursor: pointer;
  text-align: right;
  padding-top: 26px;
}

.qual-del:hover { text-decoration: underline; }

/* 选图弹层：资料库已提交附件的缩略图网格 */
.pick-attach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
}

.pick-attach {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s;
}

.pick-attach:hover { border-color: var(--accent); }

.pick-attach.is-picked { border-color: var(--accent); border-width: 2px; }

.pick-attach .thumb {
  height: 78px;
  background: #f1f3f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--ink-4);
}

.pick-attach .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pick-attach .cap { padding: 6px 8px; }

.pick-attach .cap .n {
  font-size: 12px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick-attach .cap .s { font-size: 10.5px; color: var(--ink-4); }

.pick-attach-add {
  border: 1px dashed var(--border);
  border-radius: 6px;
  min-height: 112px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--accent);
  text-align: center;
  padding: 8px;
}

.pick-attach-add:hover { border-color: var(--accent); }

.pick-attach-add .field-hint { font-size: 10.5px; }

input[type="file"] { display: none; }

/* ---------- 表格 ---------- */

.table-wrap { overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; min-width: 760px; }

table.data th, table.data td {
  padding: 11px 12px;
  text-align: left;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data th {
  background: #fafbfc;
  color: var(--ink-2);
  font-weight: 600;
  white-space: nowrap;
}

table.data tbody tr:hover { background: #fbfcfd; }

table.data td.nowrap { white-space: nowrap; }

table.data .mono { font-family: Consolas, Monaco, monospace; font-size: 12px; }

table.data .row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- 状态徽章 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
  background: #f2f3f5;
  color: var(--ink-2);
  border: 1px solid transparent;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.badge.b-draft { background: #f2f3f5; color: #7d828b; }
.badge.b-process { background: #eef5ff; color: #2e7be6; border-color: #d8e6fb; }
.badge.b-success { background: #e9f8f2; color: var(--ok); border-color: #cdeee1; }
.badge.b-reject { background: #fdeef0; color: var(--danger); border-color: #f7d6da; }
.badge.b-fail { background: #fdf5e9; color: var(--warn); border-color: #f7e3c6; }

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11.5px;
  background: #f2f3f5;
  color: var(--ink-2);
}

.tag.tag-direct { background: var(--accent-deco); color: var(--accent); }
.tag.tag-indirect { background: #f2f3f5; color: #7d828b; }

/* ---------- 通道徽章（资料列表：一行里表达「进了哪些通道 + 各自到哪一步」） ---------- */

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
}

.chip:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.chip:disabled { cursor: default; }

.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); flex: none; }
.chip .dot.ok { background: var(--ok); }
.chip .dot.bad { background: var(--danger); }
.chip .dot.proc { background: var(--accent); }
.chip .dot.wait { background: var(--warn); }

/* ---------- 选通道弹层 ---------- */

.pick-row {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
}

.pick-row:hover { border-color: var(--accent); }
.pick-row.is-disabled { cursor: not-allowed; opacity: .6; background: #fafbfc; }
.pick-row input { margin-right: 8px; vertical-align: middle; }

.pick-title {
  font-size: 13px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pick-row .field-hint { margin: 4px 0 0 22px; display: block; }

/* ---------- 空态 / 加载 ---------- */

.empty {
  padding: 54px 20px;
  text-align: center;
  color: var(--ink-4);
  font-size: 12.5px;
  line-height: 1.9;
}

.empty .empty-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #f4f6f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-4);
}

.loading-mask {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
}

/* ---------- 分页 ---------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.pager .total { margin-right: auto; color: var(--ink-3); }

.pager button {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 4px;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
}

.pager button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }

.pager button:disabled { opacity: .5; cursor: not-allowed; }

.pager button.is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- 详情：描述列表 ---------- */

.desc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px 18px;
}

.desc-item { min-width: 0; }

.desc-item .k { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }

.desc-item .v {
  font-size: 13px;
  color: var(--ink);
  word-break: break-all;
  line-height: 1.6;
}

.desc-item .v.is-empty { color: var(--ink-4); }

.desc-item.span-full { grid-column: 1 / -1; }

/* ---------- 详情：提示条 ---------- */

.notice {
  border-radius: 6px;
  padding: 11px 14px;
  font-size: 12.5px;
  line-height: 1.75;
  margin-bottom: 14px;
  border: 1px solid transparent;
}

.notice.n-info { background: #eef5ff; border-color: #d8e6fb; color: #2b5fa8; }
.notice.n-warn { background: #fdf5e9; border-color: #f7e3c6; color: #96631a; }
.notice.n-danger { background: #fdeef0; border-color: #f7d6da; color: #a52f38; }
.notice.n-ok { background: #e9f8f2; border-color: #cdeee1; color: #12775a; }

.notice strong { font-weight: 600; }

/* ---------- 详情：通道交互流水 ---------- */

.log-item {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}

.log-item:last-child { border-bottom: none; }

.log-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.log-api { font-family: Consolas, Monaco, monospace; font-weight: 600; }

.log-time { color: var(--ink-3); margin-left: auto; }

.log-cost { color: var(--ink-3); }

.log-msg { margin-top: 6px; color: var(--ink-2); line-height: 1.7; word-break: break-all; }

.log-detail { margin-top: 8px; }

.log-detail summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--accent);
  outline: none;
}

.log-detail pre {
  margin-top: 8px;
  padding: 10px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: Consolas, Monaco, monospace;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 260px;
  overflow: auto;
}

/* 详情页：报文展开行的内联块（通道流水 + 审核通知共用） */
.log-block { padding: 8px 12px; }
.log-block .log-k {
  font-size: 12px;
  color: var(--ink-3);
  margin: 6px 0 4px;
}
.log-block .log-k:first-child { margin-top: 0; }
.log-block pre {
  margin: 0;
  padding: 10px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: Consolas, Monaco, monospace;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 280px;
  overflow: auto;
}

/* 空值占位（沿用旧版 — 的样式；desc-item .v.is-empty 已有，这里补 span 形态） */
.is-empty { color: var(--ink-4); }

/* ---------- 弹层 ---------- */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 45, .38);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-mask[hidden] { display: none; }

.modal {
  background: #fff;
  border-radius: 10px;
  width: 460px;
  max-width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 46px rgba(20, 30, 45, .2);
}

.modal-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close {
  border: none;
  background: none;
  font-size: 17px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  padding: 2px 4px;
}

.modal-close:hover { color: var(--danger); }

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-body .err-list { margin: 0; padding-left: 18px; }

.modal-body .err-list li { margin-bottom: 5px; color: var(--danger); }

.modal-body .kv { display: flex; gap: 10px; margin-bottom: 8px; }

.modal-body .kv .k { flex: none; width: 84px; color: var(--ink-3); }

.modal-body .kv .v { flex: 1; word-break: break-all; color: var(--ink); }

/* ---------- 轻提示 ---------- */

.toast-area {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: #333;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.6;
  padding: 9px 16px;
  border-radius: 5px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
  max-width: 560px;
  animation: toastIn .18s ease-out;
}

.toast.t-ok { background: #14795b; }
.toast.t-err { background: #b8353f; }
.toast.t-warn { background: #a5711c; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 提交前的校验结果清单 ---------- */

.check-list { margin: 0; padding: 0; list-style: none; }

.check-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}

.check-list li:last-child { border-bottom: none; }

.check-list .mark { flex: none; width: 15px; text-align: center; }

.check-list li.ok .mark { color: var(--ok); }
.check-list li.bad .mark { color: var(--danger); }
.check-list li.bad .txt { color: var(--danger); }

/* ==========================================================================
   三、响应式
   ========================================================================== */

@media (max-width: 1100px) {
  .form-grid .span-3 { grid-column: span 2; }
}

@media (max-width: 900px) {
  .sidebar { width: 60px; }
  .sidebar .brand-text, .sidebar .menu-group-title, .sidebar .menu-item span.t,
  .sidebar .menu-item .arrow { display: none; }
  .sidebar .menu-item { justify-content: center; padding: 0; }
  .sidebar .menu-sub .menu-item { padding-left: 0; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: span 1; }
  .filters { flex-direction: column; align-items: stretch; }
  .filter-actions { margin-left: 0; }
}

/* ==========================================================================
   四、进件：可折叠卡片 + 图片预览层
   ========================================================================== */

/* 可折叠卡片：点击 card-head 收起 / 展开 card-body */
.card.is-collapsible .card-head { cursor: pointer; user-select: none; }
.card.is-collapsible .card-head:hover { background: #fafbfc; }
.card.is-collapsible .fold-arrow {
  flex: none;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  transition: transform .16s;
}
.card.is-collapsible.is-folded .fold-arrow { transform: rotate(-90deg); }
.card.is-collapsible.is-folded .card-body { display: none; }
.card.is-collapsible .fold-tip { font-size: 12px; color: var(--ink-4); }

/* 图片预览层：点击缩略图弹大图 */
.img-viewer-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 30, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 36px;
  cursor: zoom-out;
}
.img-viewer-mask img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}
.img-viewer-mask .img-viewer-close {
  position: absolute;
  top: 16px;
  right: 24px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  opacity: .85;
}
.img-viewer-mask .img-viewer-close:hover { opacity: 1; }
.img-viewer-mask .img-viewer-caption {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 12.5px;
  background: rgba(0, 0, 0, .42);
  padding: 4px 12px;
  border-radius: 14px;
  max-width: 80vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 附件缩略图可点提示 */
.attach-thumb.is-previewable { cursor: zoom-in; }

/* ==========================================================================
   进件向导（6 步 stepper + 面板）—— 进件录入页专用
   --------------------------------------------------------------------------
   与设计稿（商户进件.html）的 .wiz / .stepper / .step / .panel 对齐，
   但色值全部改走本项目的 CSS 变量（--accent / --ink-* / --line / --border），
   这样切换 data-app（代理商=青、超管=紫）时步骤高亮会跟着主色走，
   而不是把设计稿里写死的蓝色搬进来、与侧栏主色撞车。

   为什么是「左侧竖排 stepper + 右侧面板」而不是「顶部横向步骤条」：
   进件的 6 步里，第 2/3/4 步是条件出现的（小微商户跳过执照、个人户跳过法人），
   用户需要能一眼看到「哪些步跟我有关」，并且能跳回去改。竖排列表能容纳
   每步的说明文字；横向条在窄屏只能挤成一排数字。
   ========================================================================== */

.wiz {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.stepper {
  position: sticky;
  top: 16px;
  padding: 14px 12px;
}

.stepper-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 12px;
  font-size: 12px;
  letter-spacing: .6px;
  color: var(--ink-3);
}

.stepper-tip::before {
  content: '';
  width: 14px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--accent);
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.step + .step { margin-top: 2px; }
.step:hover { background: var(--accent-deco); }

.step-no {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  transition: all .15s;
}

.step-tx { min-width: 0; padding-top: 1px; }
.step-tx b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}
.step-tx span {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-4);
}

.step.done .step-no {
  background: #e9f8f2;
  border-color: #c8ebd9;
  color: var(--ok);
}
.step.done .step-tx b { color: var(--ink-2); }

.step.now {
  background: var(--accent-deco);
  border-color: var(--accent-ring);
}
.step.now .step-no {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.step.now .step-tx b { color: var(--accent-hover); }

/* 步骤内容区的「可跳过」提示条（小微的执照/法人步骤）：照原型 .note */
.step-note {
  padding: 12px 15px;
  border: 1px solid var(--accent-ring);
  border-radius: 8px;
  background: var(--accent-deco);
  color: var(--accent-hover);
  font-size: 12.5px;
  line-height: 1.7;
}

.panel {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.panel-head b {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.panel-head b::before {
  content: '';
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--accent);
}
.panel-head span { font-size: 12px; color: var(--ink-4); }

.panel-body { padding: 20px; }

.panel-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fcfdff;
}
.panel-foot .sp { flex: 1; }

/* 选择控件（商户进件向导）：支付通道/服务类型（多选胶囊）+ 商户主体类型（单选胶囊卡）。
   原生控件隐藏，用 :has(input:checked) 驱动选中态，保持键盘可达 —— 1:1 照原型 */
.perm-box, .radio-box { display: flex; flex-wrap: wrap; gap: 10px; }
.perm-item, .radio-item {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px 9px 12px;
  border: 1.5px solid #d9dee6; border-radius: 8px;
  background: #fff;
  font-size: 13px; line-height: 1.4; color: var(--ink-2);
  cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s, box-shadow .15s, color .15s, transform .15s;
}
.perm-item input[type="checkbox"],
.radio-item input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0;
}
.perm-item::before {
  content: ''; flex: none; display: flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; border-radius: 50%;
  border: 1.6px solid #cfd8e4; background: #fff;
  font-size: 11px; line-height: 1; color: transparent;
  transition: all .15s;
}
.perm-item:hover, .radio-item:hover { border-color: var(--accent); background: #fbfdff; }
.perm-item:active, .radio-item:active { transform: scale(.985); }
/* 选中态 */
.perm-item:has(input:checked),
.radio-item:has(input:checked) {
  border-color: var(--accent);
  background: linear-gradient(180deg, #f4f9ff, #e9f2ff);
  color: var(--accent-hover);
  box-shadow: 0 2px 8px rgba(61, 139, 253, .14);
}
.perm-item:has(input:checked)::before {
  content: '\2713'; border-color: transparent; color: #fff;
  background: linear-gradient(145deg, #5a9cf8, var(--accent));
}
/* 键盘聚焦（原生控件已隐藏，用 :focus-visible 补上可见焦点） */
.perm-item:has(input:focus-visible),
.radio-item:has(input:focus-visible) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.radio-item em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--ink-3); }
.radio-item:has(input:checked) em { color: var(--accent-hover); opacity: .85; }

/* 胶囊里的名字；直连 / 间连 tag 由通用 .tag 提供 */
.perm-name { color: var(--ink); font-weight: 500; }
/*
 * 这里原有 `.perm-item.is-disabled` 与 `.perm-note`（胶囊尾部的「尚未接入」灰字），
 * 已随「未接入通道仍可选、可存表」一起删除：通道胶囊不再有置灰态，
 * 也就没有对应的样式需求。选通道弹层的置灰走的是 `.pick-row.is-disabled`（见上），别混用。
 */

/* 第 1 步 / 第 4 步服务类型的紧凑版胶囊（照原型 step-basic 与 zft.svc 的缩小尺寸） */
.step-basic .perm-box, .perm-sm { gap: 8px; }
.step-basic .perm-box .perm-item, .perm-sm .perm-item {
  padding: 6px 12px 6px 9px; font-size: 13px;
}
.step-basic .perm-box .perm-item::before, .perm-sm .perm-item::before {
  width: 16px; height: 16px; font-size: 10px;
}

/* 商户主体类型：三张等宽胶囊卡，em 副标题独占一行换行 */
.radio-box.radio-3col {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; align-items: stretch;
}
.radio-box.radio-3col .radio-item {
  width: 100%; align-items: flex-start; flex-wrap: wrap; row-gap: 2px;
  padding: 8px 12px; font-size: 13px;
}
.radio-box.radio-3col .radio-item em { flex: 1 1 100%; min-width: 0; line-height: 1.45; }

/* 第 4 步站点信息分组标题：在 grid 里独占一行，上方细线分隔 */
.zft-sec {
  grid-column: 1 / -1; margin-top: 4px; padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}

/* 日期区间行（执照/证件/结算人有效期）：起始 date 至 截止控件 + 长期有效胶囊 */
.date-range { display: flex; align-items: center; gap: 8px; }
.date-range > input, .date-range > select { min-width: 0; flex: 1 1 0; }
.date-sep { flex: none; color: var(--ink-3); font-size: 12.5px; }
.date-range .perm-item { flex: none; padding: 6px 12px 6px 9px; font-size: 13px; }
.date-range .perm-item::before { width: 16px; height: 16px; font-size: 10px; }

/* 经营地址行：详细地址输入 + 「同执照地址」按钮 */
.addr-row { display: flex; align-items: center; gap: 8px; }
.addr-row > input { min-width: 0; }

/* ==========================================================================
   进件材料上传（1:1 照原型 .upl 图片框） —— 见 proto-onboard upl 体系
   --------------------------------------------------------------------------
   原型的上传位不是「卡片 + 文字按钮」，而是**可直接点的方形图片框**：
     未传 → 虚线框内「+ 名称*」；已传 → 预览图铺满 + 左下角名称角标
            + 左上角放大 + 右上角删除；框下 .upl-name 显示文件名 · 大小。
   「示例样张」(.upl-sample) 是框旁的演示缩略图，点击走图片放大预览浮层。
   布局：.upl-row 横向排 [上传框, 示例, 上传框, 示例]；.upl-grid 纵向分组。
   ========================================================================== */

.upl-row { display: flex; flex-wrap: wrap; gap: 12px; }
.upl-grid { display: flex; flex-direction: column; gap: 12px; }

/* 特殊资质录入区（第 4 步末段，照原型 v75 的 .qual-line）：
   左侧「资质照片类型」可搜索下拉固定 320px，右侧「特殊资质照片」上传位占满剩余。
   grid-column: 1/-1 必需 —— .qual-line 本身是 .form-grid 的子项，
   不跨列就只能占半列（260px 起），右侧上传位会被挤到下一行。 */
.qual-line {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) {
  .qual-line { grid-template-columns: 1fr; gap: 18px; }
}

/* ---------- 可搜索下拉（资质类型，79 条） ----------
   照原型 v73 的 .ss：输入框 + 浮层内的过滤框/列表。原生 select 在 79 条上
   只能靠首字母跳，找一条「医疗器械经营许可证」要滚很久。 */
.ss { position: relative; }
.ss-pick { position: relative; }
.ss-input {
  width: 100%; min-width: 0; height: 38px; padding: 0 34px 0 12px;
  border: 1px solid var(--border); border-radius: 4px;
  font-family: inherit; font-size: 13px; color: var(--ink);
  background: #fff; cursor: pointer;
}
.ss-input::placeholder { color: var(--ink-4); }
.ss-input:hover { border-color: #b9c6da; }
.ss-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.ss-caret {
  position: absolute; right: 12px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  pointer-events: none; opacity: .55;
  border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s;
}
.ss.open .ss-caret { transform: rotate(-135deg) translate(-2px, -2px); }
.ss-pop {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
  display: none; flex-direction: column;
  padding: 8px; background: #fff;
  border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(29, 45, 71, .14);
}
.ss.open .ss-pop { display: flex; }
.ss-list { max-height: 258px; overflow-y: auto; overscroll-behavior: contain; }
.ss-item { padding: 8px 10px; border-radius: 4px; font-size: 13px; line-height: 1.45; cursor: pointer; }
.ss-item:hover { background: #f2f7ff; }
.ss-item.on { background: var(--accent-deco); color: var(--accent); font-weight: 500; }
.ss-empty { display: none; padding: 14px 10px; text-align: center; font-size: 12.5px; color: var(--ink-4); }

.upl-collapse { gap: 0; }
.upl-collapse > .upl-row + .upl-row {
  max-height: 0; opacity: 0; margin-top: 0; overflow: hidden; visibility: hidden;
  transition: max-height .22s ease, opacity .18s ease, margin-top .22s ease;
}
.upl-collapse.open > .upl-row + .upl-row {
  max-height: 200px; opacity: 1; margin-top: 12px; visibility: visible;
}
.upl-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 0; border: 0; background: none;
  font-family: inherit; font-size: 12.5px; color: var(--accent); cursor: pointer;
}
.upl-toggle:hover { color: var(--accent-hover); }
.upl-toggle-ic { display: inline-block; font-size: 11px; transition: transform .18s; }
.upl-collapse.open .upl-toggle-ic { transform: rotate(180deg); }

.upl-box { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }

/* 上传框本体：虚线方框，可点 */
.upl {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 180px; height: 122px;
  border: 2px dashed #c9d4e2; border-radius: 10px; background: #fbfcfe;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.upl:hover { border-color: var(--accent); background: #f4f9ff; transform: translateY(-1px); }
.upl.has { border-style: solid; border-color: #b7e3ca; background: #f4fcf8; }
.upl.invalid { border-color: var(--danger); background: #fdf3f4; box-shadow: 0 0 0 4px rgba(227, 77, 89, .10); }
.upl-plus { font-size: 30px; font-weight: 300; line-height: 1; color: var(--ink-4); }
.upl-ph { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.upl-txt { font-size: 12px; color: var(--ink-3); }
.upl-txt .req { margin-left: 2px; color: var(--danger); }
.upl-file { display: none; }
.upl-img { display: none; width: 100%; height: 100%; object-fit: cover; }
.upl-cap {
  display: none; position: absolute; left: 6px; bottom: 6px;
  padding: 1px 7px; border-radius: 999px;
  background: rgba(16, 42, 72, .62); color: #fff; font-size: 11px; line-height: 1.6;
  pointer-events: none;
}
.upl-del,
.upl-view {
  display: none; position: absolute;
  /* 必须显式居中：.upl.has 里是 flex，只写 flex 会让按钮贴到左上角 */
  align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(16, 42, 72, .55); color: #fff;
  line-height: 1; cursor: pointer;
  transition: background .15s;
}
.upl-del { top: 6px; right: 6px; font-size: 15px; }
.upl-del:hover { background: var(--danger); }
.upl-view { top: 6px; left: 6px; }
.upl-view:hover { background: var(--accent); }
.upl-view svg { display: block; }
.upl.has .upl-ph { display: none; }
.upl.has .upl-img { display: block; }
.upl.has .upl-cap { display: block; }
.upl.has .upl-del, .upl.has .upl-view { display: flex; }
.upl-name {
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; color: var(--ink-3);
}
.upl.has + .upl-name { color: var(--ok); }
.upl-note { width: 180px; margin-top: 2px; font-size: 12px; line-height: 1.55; color: var(--ink-3); text-align: center; }

/* 示例样张缩略图：纯展示，点击放大（不参与上传与提交） */
.upl-sample {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 180px; height: 122px;
  border: 1px solid #e6eaf1; border-radius: 10px; background: #f5f7fa;
  cursor: zoom-in; user-select: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.upl-sample:hover { border-color: #c9d4e2; box-shadow: 0 2px 8px rgba(16, 42, 72, .08); }
.upl-sample:active { transform: scale(.985); }
.upl-sample:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.upl-sample-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 10px; border-radius: 999px;
  background: #fff; border: 1px solid #e2e7ef;
  font-size: 12px; line-height: 1.4; color: #8a94a6;
}
.upl-sample-text { font-size: 13px; color: #a9b2c1; }

/* 提示条（照原型 .note）：小微「本步骤可跳过」等说明 */
.note {
  padding: 12px 15px; border: 1px solid var(--accent-ring); border-radius: 8px;
  background: var(--accent-deco); color: #3a5f9e;
  font-size: 12px; line-height: 1.7;
}

/* ---------- 费率卡片（照原型 .rate-card）：按支付方式成卡，卡内按卡种分行 ---------- */
.rate-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.rate-card {
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.rate-card:hover { border-color: var(--accent-ring); box-shadow: 0 4px 14px rgba(16, 42, 72, .07); }
.rate-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.rate-ic {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  color: #fff; font-size: 13px; font-weight: 700;
}
.rate-card-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.rate-card-row .rate-head { margin-bottom: 0; width: 96px; }
/* 费率行同时是 .field（带 data-for，便于按 key 标红）：这里把 .field 的纵向堆叠改成横排 */
.rate-line {
  display: flex; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-2);
}
/* 费率行的字段名用 span（照原型是 el('span', null, '商户费率')），不是 <label> */
.rate-line .rate-label { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.field.is-invalid .rate-label { color: var(--danger); }
.rate-line .field-error { flex: 1 1 100%; }
.rate-line + .rate-line { margin-top: 10px; }
.rate-tag {
  padding: 4px 10px; border-radius: 6px; background: #eef3fb; color: #3a6bb5;
  font-size: 12px; line-height: 1; white-space: nowrap;
}
.rate-in { display: inline-flex; align-items: center; gap: 4px; }
.rate-in input { width: 90px; min-height: 38px; padding: 7px 10px; border-radius: 6px; font-size: 13px; }
.rate-in span { font-size: 12px; color: var(--ink-3); }

/* ---------- 顶部强提醒（照原型 #topNotice）：通道互斥等阻断性提示 ---------- */
#topNotice {
  position: fixed; top: 20px; left: 50%; z-index: 130;
  transform: translateX(-50%);
  display: none; align-items: flex-start; gap: 10px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 18px;
  border: 1px solid #f5d9a8; border-left: 4px solid var(--warn);
  border-radius: 10px; background: #fff8ec;
  box-shadow: 0 12px 30px rgba(138, 82, 0, .16);
  animation: wpTopNoticeIn .2s both;
}
#topNotice.on { display: flex; }
#topNotice .tn-ico { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--warn); }
#topNotice .tn-body { min-width: 0; }
#topNotice b { display: block; margin-bottom: 3px; font-weight: 600; font-size: 13.5px; color: #8a5200; }
#topNotice span { display: block; font-size: 12.5px; line-height: 1.65; color: #9c6c1e; }
@keyframes wpTopNoticeIn {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 图片放大预览浮层（照原型 #lightbox） ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 34px 26px;
  background: rgba(9, 20, 35, .90);
}
#lightbox.on { display: flex; }
#lb-img {
  max-width: 92%; max-height: calc(100vh - 132px);
  border-radius: 8px; background: #fff;
  box-shadow: 0 20px 56px rgba(0, 0, 0, .45);
}
#lb-cap { max-width: 92%; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .88); }
#lb-close {
  position: absolute; top: 16px; right: 18px;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .16); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .15s;
}
#lb-close:hover { background: rgba(255, 255, 255, .32); }

/* 分账接收方小表 */
.split-list { width: 100%; border-collapse: collapse; }
.split-list th, .split-list td {
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  font-size: 12.5px;
}
.split-list th { color: var(--ink-2); font-weight: 600; background: #fafbfc; }

@media (max-width: 900px) {
  .wiz { grid-template-columns: 1fr; }
  .stepper {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 12px;
  }
  .stepper-tip { width: 100%; padding: 0 4px 6px; }
  .step { padding: 7px 12px; border-color: var(--line); }
  .step + .step { margin-top: 0; }
  .step-tx span { display: none; }
  .step-tx { padding-top: 0; }
  .panel-foot {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .96);
  }
}

/* 步骤内的小节标题（一个步骤里有多个子区块时用） */
.sub-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.sub-head::before {
  content: '';
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--accent);
}
.sub-head.mt { margin-top: 22px; }

/* 费率表内联提示 */
.rate-note {
  font-size: 11.5px;
  color: var(--ink-4);
  line-height: 1.6;
  margin-top: 6px;
}

/* 费率：三列卡片的紧凑布局（设计稿口径的 6 行费率） */
.rate-inline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.rate-inline .field label { font-size: 12.5px; }
.rate-inline .rate-unit {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rate-inline .rate-unit input { flex: 1; min-width: 0; }
.rate-inline .rate-unit .unit { font-size: 12px; color: var(--ink-3); }

/* ==========================================================================
   列表页通用件（商户列表 / 交易流水 / 交易汇总 / 交易统计 / 打款查询 共用）
   --------------------------------------------------------------------------
   这些是设计稿里反复出现的几种单元格形态，集中定义一次，
   避免每个页面各写一遍内联样式导致同类信息在不同页长得不一样。
   ========================================================================== */

/* 两行堆叠单元格：「商户详情」这类 编号+名称 的组合 */
.stack { line-height: 1.45; }
.stack .stack-main { font-size: 13px; color: var(--ink); }
.stack .stack-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* 状态标签：正常 / 待审核 / 停用，以及交易的 成功 / 处理中 / 失败 */
.status-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}
.status-tag.ok    { background: rgba(23, 166, 115, .10); color: #17a673; }
.status-tag.doing { background: rgba(46, 139, 230, .10); color: #2e8be6; }
.status-tag.wait  { background: rgba(240, 160, 32, .12); color: #d18b09; }
.status-tag.fail  { background: rgba(227, 77, 89, .10);  color: #e34d59; }
.status-tag.gray  { background: #f2f3f5;                 color: var(--ink-3); }

/* 只读描述表（弹窗里的「字段 / 值」两列） */
.desc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.desc-table td { padding: 7px 0; vertical-align: top; }
.desc-table td.k {
  width: 132px;
  color: var(--ink-3);
  padding-right: 12px;
  white-space: nowrap;
}
.desc-table td.v { color: var(--ink); word-break: break-all; }

/* 日期区间：两个日期输入并排，中间一个 ~ */
.range { display: flex; align-items: center; gap: 6px; }
.range input[type="date"] { width: 142px; }
.range .tilde { color: var(--ink-4); font-size: 12px; }

/* 占位灰字：区分「没有值」与「没渲染出来」 */
.muted { color: var(--ink-4); }

/* 表头/单元格居中（序号、状态、操作列） */
table.data th.ctr, table.data td.ctr { text-align: center; }

/* 详细地址列：超过一行的部分截断，完整值挂 title */
table.data td.col-addr {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 数字列右对齐 + 等宽数字：金额竖着看要对得齐，否则扫不出来大小 */
table.data th.num, table.data td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: Consolas, Monaco, monospace;
  font-size: 12.5px;
}
table.data td.num.neg { color: var(--danger); }

/* ==========================================================================
   统计卡片条（交易统计 / 汇总查询顶部的一排指标）
   ========================================================================== */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
}
.stat-bar .stat-cell { background: #fff; padding: 14px 16px; }
.stat-bar .stat-label {
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.stat-bar .stat-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat-bar .stat-value .unit { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 3px; }
.stat-bar .stat-sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* 指标名后的问号：鼠标悬停出 title 说明口径 */
.stat-bar .info-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #e3e6ea;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  cursor: help;
  flex: none;
}

/* ==========================================================================
   时段快捷选择（本周 / 上周 / 本月 / 上月 / 近10天）
   ========================================================================== */
.quick-range { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-range button {
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: all .15s;
}
.quick-range button:hover { color: var(--accent); border-color: var(--accent); }
.quick-range button.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ==========================================================================
   多行分组表头（交易汇总：订单信息 / 支付信息 / 商户信息 …）
   ========================================================================== */
table.data thead tr.group-row th {
  background: #f7f8fa;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 12.5px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding-top: 8px;
  padding-bottom: 8px;
}

/* ==========================================================================
   自定义列表字段弹窗（照原型 fieldModal）
   --------------------------------------------------------------------------
   居中 780px 模态框 + 双列（已选/未选）字段列表。
   之前的右侧抽屉版改成这个形状 —— 与原型的差异被用户点名，
   以原型为准。复用上方 .modal-mask/.modal 的骨架，这里只补字段区。
   ========================================================================== */
.col-modal { width: 780px; }

.select-all-row {
  padding: 0 0 10px;
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  gap: 6px;
  align-items: center;
}
.select-all-row input { accent-color: var(--accent); }

.field-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.field-col-title {
  background: #f7f8fa;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  border-radius: 4px 4px 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
}

.field-list {
  border: 1px solid var(--line);
  border-radius: 0 0 4px 4px;
  height: 320px;
  overflow-y: auto;
  background: #fff;
}
/* 拖动排序时的高亮落点 */
.field-list.is-over { border-color: var(--accent); background: rgba(61, 139, 253, .04); }

.field-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px dashed #f2f3f5;
  background: #fff;
  user-select: none;
}
.field-item:hover { background: #f7fbff; }
.field-item .drag { color: #c0c3c8; cursor: grab; font-size: 12px; flex: none; }
.field-item.selected { color: var(--accent); }
.field-item.is-dragging { opacity: .5; }
.field-item input { accent-color: var(--accent); flex: none; }

.field-tip {
  margin-top: 14px;
  background: #f0f6ff;
  border: 1px solid #d8e6ff;
  color: #667;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 4px;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .field-cols { grid-template-columns: 1fr; }
  .radio-box.radio-3col { grid-template-columns: 1fr; }
  .perm-item, .radio-item { padding: 8px 12px; font-size: 13px; }
  /* 上传框窄屏两列，保证点击热区够大 */
  .upl-box { flex: 1 1 calc(50% - 6px); }
  .upl { width: 100%; max-width: none; height: 104px; }
  .upl-name { max-width: 100%; }
  .upl-sample { width: 100%; height: 104px; }
  .upl-note { width: 100%; }
  .upl-view, .upl-del { width: 28px; height: 28px; }
  .upl-del { font-size: 17px; }
  .rate-grid { grid-template-columns: 1fr; }
  #lightbox { padding: 46px 14px 26px; }
  #lb-img { max-width: 100%; max-height: calc(100vh - 150px); }
  #lb-close { top: 12px; right: 12px; }
}

/* --------------------------------------------------------------------------
   列表单元格零碎件（进件列表 / 商户列表共用）
   -------------------------------------------------------------------------- */

/* 行内动作之间的竖线分隔。不加的话两个按钮会黏成一串看不出可点区域 */
table.data .v-sep {
  display: inline-block;
  margin: 0 8px;
  color: var(--ink-4);
  user-select: none;
}

/* 驳回/失败原因：紧凑挂在状态徽章下面，超长在渲染时截断、title 给全文 */
table.data .reason-tip {
  font-size: 12px;
  margin-top: 3px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

/* 单元格里的可点文字（档案号这种能跳走的） */
table.data a.link {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
table.data a.link:hover { color: var(--accent-hover); text-decoration: underline; }

/* 序号列窄且居中 */
table.data td.ctr, table.data th.ctr { text-align: center; }

/* ==========================================================================
   名称 → 下拉多选 筛选组件（交易流水页：门店/商户/服务商名称）
   一个「可搜索 + 可多选」的下拉框。触发条显示已选数量，面板里按名称模糊检索、
   勾选多项。选中后把编号 list 传给后端，名称与编号二选一互斥由页面脚本处理。
   ========================================================================== */
.npick { position: relative; width: 170px; }
.npick.is-wide { width: 190px; }
.npick-trigger {
  display: flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 5px 9px;
  border: 1px solid var(--border); border-radius: 4px;
  background: #fff; cursor: pointer; font-size: 12.5px; color: var(--ink);
  user-select: none; transition: border-color .15s, box-shadow .15s;
}
.npick-trigger:hover { border-color: var(--accent); }
.npick.is-open .npick-trigger {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring);
}
.npick-trigger .npick-text {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink-4);
}
.npick.has-val .npick-trigger .npick-text { color: var(--ink); }
.npick-trigger .npick-count {
  flex: none; font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 9px;
  background: var(--accent-deco); color: var(--accent); display: none;
}
.npick.has-val .npick-trigger .npick-count { display: inline-block; }
.npick-trigger .npick-clear {
  flex: none; width: 16px; height: 16px; line-height: 14px; text-align: center;
  border-radius: 50%; background: var(--ink-4); color: #fff; font-size: 12px;
  display: none; cursor: pointer;
}
.npick.has-val:hover .npick-trigger .npick-clear { display: inline-block; }
.npick-trigger .npick-arrow { flex: none; color: var(--ink-4); font-size: 10px; }
.npick-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 40;
  width: 280px; background: #fff; border: 1px solid var(--border);
  border-radius: 6px; box-shadow: 0 6px 22px rgba(0,0,0,.14);
}
.npick-search { padding: 8px; border-bottom: 1px solid var(--line); }
.npick-search input {
  width: 100%; min-height: 30px; padding: 4px 9px; font-size: 12.5px;
  border: 1px solid var(--border); border-radius: 4px; color: var(--ink);
}
.npick-search input:focus { border-color: var(--accent); }
.npick-list { max-height: 232px; overflow-y: auto; padding: 5px; }
.npick-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: 4px; cursor: pointer; font-size: 12.5px; color: var(--ink);
}
.npick-item:hover { background: #f5f7fa; }
.npick-item input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; accent-color: var(--accent); }
.npick-item .npick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.npick-item .npick-no { color: var(--ink-4); font-size: 11px; font-family: "Consolas", "Courier New", monospace; }
.npick-empty, .npick-loading { padding: 18px 10px; text-align: center; color: var(--ink-4); font-size: 12.5px; }

/* ==========================================================================
   原型筛选区样式（与资料库设计稿对齐）
   --------------------------------------------------------------------------
   .filter-bar   单行时段切换条（5 个快捷时段 tab + 自定义区间）
   .filter-grid  CSS grid auto-fill 平铺筛选项
   .f-item/.f-label/.f-input/.f-select  筛选项单元
   .dtp          自定义日期时间选择器（日历面板 + 时分秒下拉）
   .filter-btns  查询/重置/字段/下载 四按钮集中一行
   ========================================================================== */

/* ---------- 快捷时段切换条 ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
}
.tab-btn {
  height: 30px;
  padding: 0 16px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid #dcdfe6;
  border-radius: 15px;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all .15s;
}
.tab-btn:hover { border-color: #3d8bfd; color: #3d8bfd; background: #f5f9ff; }
.tab-btn.active {
  background: #3d8bfd;
  border-color: #3d8bfd;
  color: #fff;
}
.date-input {
  height: 28px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 13px;
  color: #333;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
}
.date-input:focus { outline: none; border-color: #3d8bfd; }
.date-sep { font-size: 13px; color: #999; margin: 0 4px; }

/* ---------- 筛选项网格 ---------- */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 94px 150px);
  align-items: center;
  column-gap: 0;
  row-gap: 12px;
  margin-top: 12px;
}
.f-item, .time-range { display: contents; }
.f-label {
  width: 94px;
  padding-right: 6px;
  text-align: right;
  font-size: 13px;
  color: #666;
  white-space: nowrap;
  box-sizing: border-box;
}
.f-input, .f-select {
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 0 8px;
  height: 30px;
  font-size: 13px;
  color: #333;
  font-family: inherit;
  background: #fff;
  width: 150px;
  box-sizing: border-box;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
/* 悬停浅蓝描边、聚焦蓝描边 + 3px 光晕 —— 原型（交易汇总/统计/打款）统一交互反馈 */
.f-input:hover, .f-select:hover { border-color: #a9c9f7; }
.f-input:focus, .f-select:focus {
  outline: none; border-color: #3d8bfd;
  box-shadow: 0 0 0 3px rgba(61,139,253,.12);
}
.f-input::placeholder { color: #b0b3b8; }

/* 商户打款页原型：label 左对齐 72px，一列 = 72 + 6(gap) + 150 = 228px。
   该页 f-item 用 flex 自占一列 —— 沿用 contents 模式会把 label 和输入框
   拆进两个 228px 列（输入框孤零零掉到下一行） */
.filter-grid.grid-left { grid-template-columns: repeat(auto-fill, 228px); column-gap: 12px; }
.filter-grid.grid-left .f-item { display: flex; align-items: center; gap: 6px; }
.filter-grid.grid-left .f-label { width: 72px; text-align: left; }
.filter-grid.grid-left .f-input, .filter-grid.grid-left .f-select { flex: 0 0 150px; width: 150px; }

/* 查询时间维度下拉 */
#fTimeType {
  width: 100%; padding: 0 13px 0 5px; font-size: 12px;
  -webkit-appearance: none; appearance: none; background-color: #fff;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23a8abb2' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center; background-size: 9px;
}

/* ---------- 自定义日期时间选择器 ---------- */
.dtp { position: relative; width: 150px; }
.dtp .dtp-input {
  width: 150px; padding: 0 23px 0 7px; font-size: 12px; cursor: pointer;
  background: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.2px;
}
.dtp .dtp-input::placeholder { color: #b0b3b8; font-size: 12px; }
.dtp .dtp-icon {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 13px; height: 13px; color: #a8abb2; pointer-events: none;
}
.dtp-open .dtp-input { border-color: #3d8bfd; box-shadow: 0 0 0 2px rgba(61,139,253,.12); }
.dtp-panel {
  position: fixed; z-index: 80; width: 252px; background: #fff;
  border: 1px solid #e4e7ed; border-radius: 6px; padding: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.13); font-size: 13px; user-select: none;
}
.dtp-head { display: flex; align-items: center; justify-content: space-between; height: 26px; }
.dtp-title { font-size: 13px; font-weight: 600; color: #333; }
.dtp-nav {
  width: 22px; height: 22px; line-height: 1; border: none; background: transparent;
  color: #8a8f99; font-size: 15px; cursor: pointer; border-radius: 4px;
}
.dtp-nav:hover { background: #f2f4f7; color: #3d8bfd; }
.dtp-weeks, .dtp-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.dtp-weeks span { text-align: center; color: #98a0ab; font-size: 12px; padding: 4px 0; }
.dtp-days { row-gap: 2px; margin-bottom: 6px; }
.dtp-day {
  height: 26px; line-height: 26px; text-align: center; font-size: 12px; color: #333;
  cursor: pointer; border-radius: 4px; position: relative;
}
.dtp-day:hover { background: #f0f6ff; color: #3d8bfd; }
.dtp-day.other { color: #c8ccd4; }
.dtp-day.today { color: #3d8bfd; font-weight: 600; }
.dtp-day.sel { background: #3d8bfd; color: #fff; font-weight: 600; }
.dtp-day.sel:hover { background: #3d8bfd; color: #fff; }
.dtp-time {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  border-top: 1px solid #f0f1f4; padding-top: 7px;
}
.dtp-sel {
  height: 24px; border: 1px solid #dcdfe6; border-radius: 4px; background: #fff;
  font-size: 12px; color: #333; padding: 0 2px; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.dtp-sel:focus { outline: none; border-color: #3d8bfd; }
.dtp-colon { color: #98a0ab; }
.dtp-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.dtp-link {
  border: none; background: transparent; color: #3d8bfd; font-size: 12px;
  cursor: pointer; padding: 0;
}
.dtp-link:hover { text-decoration: underline; }
.dtp-spacer { flex: 1; }
.dtp-ok {
  height: 24px; padding: 0 12px; font-size: 12px; border-radius: 4px; cursor: pointer;
  background: #3d8bfd; color: #fff; border: 1px solid #3d8bfd;
}
.dtp-ok:hover { background: #2f7ced; }
.time-range input { width: 150px; }

/* ---------- 筛选区按钮行 ---------- */
.filter-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

/* [hidden] 属性兜底：作者样式（如 .f-item 的 display:contents、.pager 的 flex）
   会覆盖 UA 样式表里 [hidden]{display:none}，导致 JS 里 node.hidden = true 静默失效
   （表现：代理商账号能看到「服务商编号」筛选框）。HTML 标准语义是 hidden 即不渲染，
   这里全局钉死；真要显式控制显隐用 class，不要依赖 hidden + display 组合 */
[hidden] { display: none !important; }

/* 「门店/商户」选「按商户」时隐藏「门店编号 / 门店名称」两个筛选项
   （交易汇总页的维度切换，原型用 class 开关实现） */
.filter-grid.dim-mch .f-item.f-shoponly { display: none; }

/* 筛选区按钮：与交易四页统一 —— 渐变蓝胶囊主按钮 + 蓝描边次按钮。
   不复用 .btn/.btn-primary：那两个是全站通用按钮，这里的 30px 高度、
   24px 水平内边距是筛选区原型专属的紧凑规格 */
.btn-query, .btn-reset, .btn-download {
  height: 30px;
  padding: 0 24px;
  font-size: 13px;
  font-family: inherit;
  border-radius: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.btn-query {
  background: linear-gradient(135deg, #4d9bff, #2f7bf0);
  color: #fff;
  border: none;
  box-shadow: 0 3px 10px rgba(61,139,253,.30);
}
.btn-query:hover {
  background: linear-gradient(135deg, #3d8bfd, #2569d8);
  box-shadow: 0 5px 14px rgba(61,139,253,.40);
  transform: translateY(-1px);
}
.btn-reset, .btn-download {
  background: #fff;
  color: #3d8bfd;
  border: 1px solid #3d8bfd;
}
.btn-reset:hover, .btn-download:hover { background: #f5f9ff; }
/* 下载按钮旁的说明图标（交易统计页：仅汇总支付成功的交易） */
.dl-info { color: #c0c4cc; font-size: 12px; cursor: help; }

/* ---------- 分页（照原型：左信息右页码） ----------
   .pg-btn 用 .pager .pg-btn 提高优先级，压过上方旧版 .pager button
   （merchant-list / onboard-list 等页面仍用旧版 .total 结构，不能删） */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  font-size: 13px;
}
.pager .pager-info { color: #8a8f99; }
.pager .pager-btns { display: flex; align-items: center; gap: 6px; }
.pager .pg-btn {
  min-width: 28px; height: 28px; padding: 0 8px; font-size: 13px;
  border: 1px solid #dcdfe6; border-radius: 4px; background: #fff;
  color: #333; cursor: pointer; font-family: inherit;
  font-variant-numeric: tabular-nums;
}
.pager .pg-btn:hover:not(:disabled):not(.active) { border-color: #3d8bfd; color: #3d8bfd; }
.pager .pg-btn.active { background: #3d8bfd; border-color: #3d8bfd; color: #fff; }
.pager .pg-btn:disabled { color: #c0c4cc; cursor: not-allowed; }
.pager .pg-ellipsis { color: #98a0ab; padding: 0 2px; }

/* ---------- 商户打款页统计条（原型：card 内、表格上方） ---------- */
.summary-bar {
  display: flex;
  align-items: center;
  gap: 46px;
  padding: 16px 6px;
  border-bottom: 1px solid #f2f4f7;
  margin-bottom: 4px;
}
.sum-label {
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sum-value {
  font-size: 24px;
  font-weight: 700;
  margin-top: 6px;
  font-family: "DIN Alternate", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   通知中心（agent/pages/notification-center.html）
   --------------------------------------------------------------------------
   · 商户端同名页（merchant/pages/notification-center.html）是自包含内联样式；
     这里按服务商端的做法改用 console.css 的变量重画，保证三端视觉一致。
   · 分页复用 WpTrade.renderPager（.pager / .pg-btn），不另起一套。
   ========================================================================== */

.nt-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

/* ---------- 左：消息分类 ---------- */

.nt-nav { padding: 14px 10px 10px; position: sticky; top: 16px; }

.nt-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 10px;
}

.nt-nav-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }

.nt-nav-count {
  font-size: 12px;
  color: var(--ink-3);
  background: #f2f4f8;
  border-radius: 10px;
  padding: 2px 9px;
  min-width: 24px;
  text-align: center;
}

.nt-cat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: background .15s;
}

.nt-cat:hover { background: #f4f8ff; }
.nt-cat.active { background: #eef4ff; }

.nt-cat.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.nt-cat-ico {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.nt-cat-ico svg { display: block; }

.nt-ico-all { background: linear-gradient(135deg, #6fb0ff, #3d8bfd); }
.nt-ico-security { background: linear-gradient(135deg, #ff8a90, #e34d59); }
.nt-ico-system { background: linear-gradient(135deg, #9c8cff, #7b61ff); }
.nt-ico-activity { background: linear-gradient(135deg, #ffc06a, #f59a23); }

.nt-cat-name { font-size: 13px; color: var(--ink-2); flex: 1; }
.nt-cat.active .nt-cat-name { color: var(--ink); font-weight: 600; }

.nt-cat-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff5b5b;
  color: #fff;
  font-size: 11px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nt-nav-tip {
  margin: 12px 4px 0;
  padding: 9px 10px;
  border-radius: 6px;
  background: #f7f9fc;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.7;
}

/* ---------- 右：工具条 ---------- */

.nt-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.nt-search { position: relative; flex: 1; min-width: 0; }

.nt-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-4);
  pointer-events: none;
}

.nt-search input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f7f8fa;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  transition: background .15s, border-color .15s;
}

.nt-search input::placeholder { color: var(--ink-4); }
.nt-search input:hover { background: #f1f5fb; }

.nt-search input:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.nt-select {
  width: 124px;
  flex: none;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
}

.nt-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* ---------- 通知列表 ---------- */

.nt-list { display: flex; flex-direction: column; gap: 10px; }

.nt-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s, background .15s;
}

.nt-item:hover { border-color: #cfe0fb; box-shadow: 0 4px 14px rgba(61, 139, 253, .10); }
.nt-item.unread { background: #f8fbff; border-color: #e3eeff; }
.nt-item.unread:hover { border-color: #b9d6fb; }

.nt-item-ico {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-top: 1px;
}

.nt-item-ico svg { display: block; }

.nt-item-main { flex: 1; min-width: 0; }

.nt-item-top { display: flex; align-items: center; gap: 8px; }

.nt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.nt-item.read .nt-dot { background: transparent; }

.nt-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.nt-item.read .nt-item-title { font-weight: 400; color: var(--ink-2); }

.nt-flag {
  font-size: 11px;
  line-height: 16px;
  padding: 0 6px;
  border-radius: 4px;
  background: #fff1f0;
  color: var(--danger);
  border: 1px solid #ffd9d6;
  flex: none;
}

.nt-item-time { font-size: 11.5px; color: var(--ink-4); flex: none; }
.nt-item.unread .nt-item-time { color: #7f9ed6; }

.nt-item-sum {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 6px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nt-item-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--ink-4);
}

.nt-tag { padding: 1px 7px; border-radius: 4px; font-size: 11px; line-height: 16px; }
.nt-tag.t-security { background: #fff1f0; color: var(--danger); }
.nt-tag.t-system { background: #f2efff; color: #7b61ff; }
.nt-tag.t-activity { background: #fff6e9; color: #d98a1f; }

.nt-item-act {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 2px 0;
  flex: none;
}

.nt-item-act:hover { text-decoration: underline; }

/* ---------- 详情弹窗 ---------- */

.nt-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 45, .42);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: 48px 20px;
  overflow-y: auto;
}

.nt-mask.show { display: flex; }

.nt-dialog {
  width: 600px;
  max-width: 100%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(15, 26, 48, .24);
  overflow: hidden;
}

.nt-dialog-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.nt-dialog-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.nt-dialog-ico svg { display: block; }

.nt-dialog-htext { flex: 1; min-width: 0; }

.nt-dialog-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-4);
}

.nt-dialog-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 6px;
  line-height: 1.5;
}

.nt-dialog-close {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--ink-4);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex: none;
  transition: background .15s, color .15s;
}

.nt-dialog-close:hover { background: #f2f4f8; color: var(--ink-2); }

.nt-dialog-body { padding: 16px 20px 2px; max-height: 50vh; overflow-y: auto; }

.nt-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid #f5f7fa;
}

/* ---------- 富内容（正文分块，块类型由后端 blocks 下发） ---------- */

.nt-p { font-size: 13px; color: var(--ink); line-height: 1.85; margin-bottom: 12px; }

.nt-kv {
  background: #f7f9fc;
  border: 1px solid #edf0f6;
  border-radius: 8px;
  padding: 2px 12px;
  margin-bottom: 13px;
}

.nt-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}

.nt-kv-row:last-child { border-bottom: none; }
.nt-kv-key { color: var(--ink-3); flex: none; }
.nt-kv-val { color: var(--ink); font-weight: 600; text-align: right; word-break: break-all; }

.nt-ul { margin: 0 0 13px; padding-left: 18px; }
.nt-ul li { font-size: 12.5px; color: var(--ink); line-height: 1.95; }
.nt-ul li::marker { color: #b9d6fb; }

.nt-tip {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.7;
  margin-bottom: 13px;
}

.nt-tip.info { background: #f2f7ff; color: #2f6fd0; border: 1px solid #dce8fd; }
.nt-tip.warn { background: #fff8f0; color: #c9761a; border: 1px solid #fbe6cc; }

.nt-pay { margin-bottom: 13px; }
.nt-pay-row { display: flex; align-items: center; gap: 10px; }
.nt-pay-row img { height: 28px; width: auto; border-radius: 5px; }
.nt-pay-note { font-size: 12px; color: var(--ink-3); margin-top: 8px; line-height: 1.65; }

.nt-banner { border-radius: 8px; overflow: hidden; margin-bottom: 13px; }
.nt-banner svg { display: block; width: 100%; height: auto; }

/* ---------- 窄屏 ---------- */

@media (max-width: 1100px) {
  .nt-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 12px; }
}

@media (max-width: 820px) {
  .nt-layout { grid-template-columns: 1fr; }
  .nt-nav { position: static; }
  .nt-toolbar { flex-wrap: wrap; }
  .nt-search { flex-basis: 100%; }
  .nt-select { width: auto; flex: 1 1 44%; }
}
/* ==========================================================================
   商户列表（pages/merchant-list.html）
   --------------------------------------------------------------------------
   弹窗内的表单栅格（fm-*）。原型 service-provider-merchant-list 的「新增 / 修改商户」
   弹窗是「分组标题 + 两列栅格」，这里照它的骨架给样式。
   类名统一带 fm- 前缀，刻意与筛选区的 .filter-grid/.f-item 那套分开 ——
   筛选区是「一行铺开、标签右对齐定宽」，弹窗是「两列成对」，共用一套必然互相牵制。
   ========================================================================== */

/* 弹窗比默认的 460px 宽 —— 里面是两列表单 */
.modal.mch-modal { width: 720px; }

/* ---------- 分组 ---------- */
.fm-sec { margin-bottom: 18px; }
.fm-sec:last-child { margin-bottom: 0; }
.fm-sec > .card-title { margin-bottom: 10px; }

/* ---------- 两列栅格 ---------- */
.fm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}
.fm-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fm-row.wide { grid-column: 1 / -1; }
.fm-label {
  flex: none;
  width: 92px;
  text-align: right;
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
}
.fm-ctl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
/* 省 / 市 / 区三个下拉平摊一行 */
.fm-ctl.region-ctl > .fm-select { flex: 1 1 0; min-width: 0; }

/* ---------- 控件 ---------- */
.fm-input, .fm-select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.fm-input:focus, .fm-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.fm-input:disabled, .fm-select:disabled { background: #f6f7f9; color: var(--ink-3); cursor: not-allowed; }
.fm-input[readonly] { background: #f6f7f9; }

/* 只读展示（商户编号 / 创建时间这类系统字段） */
.fm-static { font-size: 13px; color: var(--ink-2); line-height: 34px; word-break: break-all; }

/* ---------- 弹窗底部说明 ---------- */
.fm-tip { margin-top: 14px; font-size: 12px; color: var(--ink-3); line-height: 1.7; }

/* 弹窗里的小按钮（「修改密码」） */
.btn-pwd {
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  color: var(--accent);
  font-size: 12.5px;
  cursor: pointer;
  transition: background .15s;
}
.btn-pwd:hover { background: #f4f9ff; }

@media (max-width: 860px) {
  .fm-grid { grid-template-columns: 1fr; }
  .modal.mch-modal { width: 96vw; }
}
/* ==========================================================================
   商户支付通道权限
   --------------------------------------------------------------------------
   用在两处：新增 / 支付配置弹窗里的通道勾选（.perm-box 复用已有胶囊复选框定义），
   以及商户详情弹窗里的「商户通道信息」表（照原型 service-provider-merchant-list）。
   ========================================================================== */

.perm-tools {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px; font-size: 12.5px; color: var(--ink-3);
}
.perm-tools .btn-link { font-size: 12.5px; }
.perm-hint { font-size: 12px; color: var(--ink-3); margin-top: 10px; line-height: 1.6; }

/* ---------- 商户通道信息表 ---------- */
.channel-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.channel-table th {
  font-weight: 500; color: var(--ink-2); text-align: left;
  background: #fafbfd; padding: 10px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.channel-table td {
  padding: 12px; border-bottom: 1px solid #f5f6f9;
  color: var(--ink); vertical-align: middle; white-space: nowrap;
}
.channel-table tbody tr:last-child td { border-bottom: none; }
.channel-table tbody tr:hover td { background: #f7fbff; }
.channel-table th.ctr, .channel-table td.ctr { text-align: center; }
.channel-table .code-text { font-family: Consolas, Monaco, monospace; font-size: 12.5px; }
.channel-table .code-text.is-empty { color: var(--ink-4); }

/* 通道名徽标：蓝底白字胶囊（通道服务商名，无 logo） */
.channel-badge {
  display: inline-block; min-width: 68px; text-align: center;
  padding: 5px 12px; border-radius: 4px;
  background: #2e7ce8; color: #fff; font-size: 13px; line-height: 1.2;
}

/* 「未进件」：与 b-draft 同色系，但语义是「这件事还没发生」，不是「草稿」 */
.badge.b-none { background: #f2f3f5; color: var(--ink-3); }

/* 支付配置弹窗顶部的商户信息 */
.paycfg-mch { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 13px; }
.paycfg-mch .k { color: var(--ink-3); margin-right: 6px; }

@media (max-width: 860px) {
  .channel-table { display: block; overflow-x: auto; }
}

/* 进件录入页的「为商户进件」来源横幅（.notice.n-info，见 renderSourceBanner）。
   只覆盖横幅内的提示行颜色 —— 全局 .field-hint 是灰的，压在浅蓝底上偏脏。
   刻意用 #srcBanner 限定，不动其它页面里 .notice 内已有的 hint。 */
#srcBanner .field-hint { color: inherit; opacity: .85; margin-top: 4px; }

