
: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;
}


* { 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; }


.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 1080px;
}

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


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

.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 {
  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: 200px;
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(30, 40, 60, .16);
  padding: 6px;
  z-index: 60;
}
.sp-chip.is-open .chip-menu { display: block; }

.chip-menu .cm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid #f0f1f4;
  margin-bottom: 4px;
}
.chip-menu .cm-name {
  font-size: 13px;
  font-weight: 600;
  color: #22303f;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-menu .cm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  background: none;
  color: #444;
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.chip-menu .cm-item:hover { background: #f0f5ff; color: #2f7bff; }
.chip-menu .cm-item svg { flex: none; }
.chip-menu .cm-head .role-tag { flex: none; white-space: nowrap; }
.chip-menu .menu-sep { height: 1px; background: #f0f1f4; margin: 4px 8px; }


.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; }

.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; }


.page { padding: 16px; }

.page-centered { max-width: 1120px; margin: 0 auto; padding: 32px 20px 64px; }
@media (max-width: 1024px) { .page-centered { padding: 24px 16px 56px; } }
@media (max-width: 640px) { .page-centered { padding: 16px 12px 32px; } }

.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: 1000px;
}

.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); }

/* ---------- 操作列按钮：描边小按钮，与门店 / 收银员 / 服务商列表保持一致 ---------- */
.op-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #3d8bfd;
  border-radius: 4px;
  background: #fff;
  color: #3d8bfd;
  font-size: 12px;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.op-btn:hover:not(:disabled) { background: #f0f6ff; text-decoration: none; }
.op-btn.danger { border-color: #e88; color: #d94a4a; }
.op-btn.danger:hover:not(:disabled) { border-color: #d94a4a; color: #c0342f; background: #fdeeee; }
.op-btn[disabled] { opacity: .55; cursor: not-allowed; }
/* 操作列里并排多个按钮时的容器 */
.op-wrap { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
table.data .row-actions { gap: 6px; }
/* 操作按钮不折行：折行会让表格一直把操作列压窄，反而更难看 */
table.data .row-actions.op-nowrap { flex-wrap: nowrap; }

.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; }

.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-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; }

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; }

.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);
}



.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;
}

.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); }

/* 修改密码弹窗：.field 平时靠栅格 gap 留白，弹窗里要自己给 */
.modal-pwd { width: 420px; }
.modal-pwd .modal-body { padding: 18px 20px 6px; }
.modal-pwd .modal-body .field { margin-bottom: 14px; }
.modal-pwd .modal-body .field-hint { margin-bottom: 12px; }


.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.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; }


.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); }

.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; }

.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));
}
.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; }

.perm-name { color: var(--ink); font-weight: 500; }

/* 进件渠道：一个通道一行，左边通道名、右边该通道下的机构单选 */
.inst-box { display: flex; flex-direction: column; gap: 8px; }
.inst-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inst-ch {
  flex: none; min-width: 64px;
  font-size: 13px; font-weight: 500; color: var(--ink);
}
.inst-opts { gap: 8px; }
.inst-opts .radio-item { padding: 6px 12px 6px 9px; font-size: 13px; }
.inst-tip { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
/* 通道下没有可用机构：进件无法继续，用错误色提醒 */
.inst-tip.is-bad { color: var(--danger); }

.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;
}

.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; }

.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-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; }


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

.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; }
}

.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;
  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 {
  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-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; }
.rate-line {
  display: flex; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-2);
}
.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 {
  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 {
  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;
}

.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; }

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;
}

.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; }

.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;
}

.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;
}

.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;
}

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; }

.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 {
  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;
}
.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; }

.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;
}

/* 筛选卡片：内容直接放在 .card 里（没有 .card-body 包裹），必须自带内边距，否则标题和输入框顶着边框 */
.card.filter-card { padding: 14px 16px 16px; }

/* ---------- 导出任务弹窗（异步导出：提交 → 进度 → 下载 CSV） ---------- */
.xp-mask { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(17, 24, 39, .38); }
.xp-box { width: 420px; max-width: 94vw; border-radius: 10px; background: #fff; overflow: hidden; font-size: 13px; box-shadow: 0 16px 48px rgba(15, 23, 42, .22); }
.xp-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #eef0f4; }
.xp-title { font-size: 15px; font-weight: 600; color: #1a1d24; }
.xp-close { width: 26px; height: 26px; border: none; border-radius: 6px; background: transparent; color: #9aa0ab; font-size: 19px; line-height: 1; cursor: pointer; }
.xp-close:hover { background: #f2f4f7; color: #5a6270; }
.xp-body { padding: 16px 18px 6px; }
.xp-sub { font-size: 13px; color: #2b2f36; margin-bottom: 10px; }
.xp-row { display: flex; align-items: center; gap: 7px; }
.xp-dot { width: 7px; height: 7px; border-radius: 50%; background: #1667dc; }
.xp-dot.ok { background: #12a15a; }
.xp-dot.fail { background: #d64545; }
.xp-state { font-size: 13px; color: #4a5058; }
.xp-bar { margin-top: 10px; height: 6px; border-radius: 3px; background: #eef1f6; overflow: hidden; }
.xp-bar i { display: block; width: 0; height: 100%; background: #1667dc; transition: width .3s; }
/* 分母未知时的不确定态：条纹滑动，明确表示「在跑但还算不出百分比」 */
.xp-bar.is-idle i { background: repeating-linear-gradient(90deg, #cfe0fb 0 12px, #1667dc 12px 24px); background-size: 24px 100%; animation: xp-stripe .9s linear infinite; }
@keyframes xp-stripe { from { background-position: 0 0; } to { background-position: 24px 0; } }
.xp-meta { margin-top: 6px; min-height: 16px; font-size: 12px; color: #9aa0ab; }
.xp-pct { margin-right: 8px; color: #1667dc; font-weight: 600; font-variant-numeric: tabular-nums; }
.xp-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px 16px; }
.xp-btn { height: 34px; padding: 0 18px; border: 1px solid #dfe3ea; border-radius: 8px; background: #fff; color: #4a5058; font-size: 13px; font-family: inherit; cursor: pointer; }
.xp-btn:hover { border-color: #1667dc; color: #1667dc; }
.xp-btn.primary { border-color: #1667dc; background: #1667dc; color: #fff; }
.xp-btn.primary:hover { filter: brightness(1.08); }
.xp-btn[disabled] { opacity: .6; cursor: default; }
.xp-recent { padding: 10px 18px 14px; border-top: 1px dashed #eef0f4; }
.xp-recent-title { margin-bottom: 6px; font-size: 12px; color: #98a0ab; }
.xp-recent-item { display: flex; align-items: center; gap: 8px; height: 26px; font-size: 12.5px; }
.xp-recent-name { flex: 1; min-width: 0; color: #4a5058; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-recent-time { color: #a8aeb8; font-variant-numeric: tabular-nums; }
.xp-recent-state { color: #98a0ab; }
.xp-link { padding: 0; border: none; background: none; color: #1667dc; font-size: 12.5px; font-family: inherit; cursor: pointer; }
.xp-link:hover { text-decoration: underline; }

[hidden] { display: none !important; }

.filter-grid.dim-mch .f-item.f-shoponly { display: none; }

.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; }
/* 导出在取齐所有页的期间按钮置灰，避免连点重复生成文件 */
.btn-download:disabled { cursor: not-allowed; opacity: .55; background: #fff; }
.dl-info { color: #c0c4cc; font-size: 12px; cursor: help; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  font-size: 13px;
}
.pager .pager-info { color: #8a8f99; margin-right: auto; }
.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; opacity: 1; }
.pager .pg-ellipsis { color: #98a0ab; padding: 0 2px; }

.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;
}


.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-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; }

/* 商户弹窗的支付通道：原样搬原型「商户列表.html」的胶囊芯片，
   即 .perm-item / .perm-dot / .perm-name 三段（含选中态 #eff6ff 底、
   inset 阴影补第二像素边框、14px 圆点内 7px 的 L 形白勾）。
   只加 .perm-chip 作用域，进件页那套方角卡片不受影响 */
.perm-box.perm-chip { gap: 8px; width: 100%; flex: 1 1 100%; }
.perm-box.perm-chip .perm-item {
  flex: 0 0 auto; max-width: 100%;
  height: 30px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid #dcdfe6; border-radius: 15px;
  background: #fff; color: #333;
  font-size: 13px; line-height: 1;
  cursor: pointer; user-select: none; box-shadow: none;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
/* 圆点改成 .perm-dot 元素（原型结构），停掉基础样式的 ::before 伪元素圆 */
.perm-box.perm-chip .perm-item::before { display: none; }
.perm-box.perm-chip .perm-item:active { transform: none; }
.perm-box.perm-chip .perm-item input[type="checkbox"] {
  position: absolute; width: 1px; height: 1px; margin: 0;
  opacity: 0; pointer-events: none;
}
.perm-box.perm-chip .perm-dot {
  flex: none; width: 13px; height: 13px; border-radius: 50%;
  border: 1px solid #a4afbe; background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s;
}
/* 勾：两条边框旋转 45° 画出来，不用字体里的 \2713，也不会撑大圆点 */
.perm-box.perm-chip .perm-dot::after {
  content: ''; width: 6.5px; height: 3.2px; margin-top: -2px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg); opacity: 0;
  transition: opacity .15s;
}
.perm-box.perm-chip .perm-name {
  flex: 0 0 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: inherit; font-weight: 400;
}
.perm-box.perm-chip .perm-item:hover { border-color: #a9c9f7; background: #fafcff; }
.perm-box.perm-chip .perm-item:has(input:checked) {
  border-color: #3d8bfd; background: #eff6ff;
  box-shadow: inset 0 0 0 1px #3d8bfd;
  color: #2c66c9;
}
.perm-box.perm-chip .perm-item:has(input:checked) .perm-dot {
  border-color: #3d8bfd; background: #3d8bfd;
}
.perm-box.perm-chip .perm-item:has(input:checked) .perm-dot::after { opacity: 1; }
.perm-box.perm-chip .perm-item:has(input:checked):hover { background: #e7f1ff; }
.perm-box.perm-chip .perm-item:has(input:focus-visible) {
  outline: 2px solid #3d8bfd; outline-offset: 2px;
  box-shadow: none;
}
/* 键盘聚焦且已选中：外圈之外仍要保留选中态的 inset 边框 */
.perm-box.perm-chip .perm-item:has(input:checked):has(input:focus-visible) {
  box-shadow: inset 0 0 0 1px #3d8bfd;
}

.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); }

.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;
}

/* 通道表格里的「查看」：数据列内的纯文字链接，不套按钮框 */
.channel-table a.link { color: var(--accent); text-decoration: none; cursor: pointer; }
.channel-table a.link:hover { color: var(--accent-hover); text-decoration: underline; }

/* 商户详情弹窗：通道表 7 列必须塞进弹窗宽度，不允许出现横向滚动条
   —— 列宽由 colgroup 百分比定死（table-layout: fixed），长单号换行不撑宽表格 */
.modal.mch-detail { width: 880px; }
.mch-detail .modal-body { overflow-x: hidden; }
.mch-detail .channel-table { table-layout: fixed; }
.mch-detail .channel-table th,
.mch-detail .channel-table td { padding: 10px 8px; white-space: normal; }
.mch-detail .channel-table th.ctr,
.mch-detail .channel-table td.ctr { white-space: nowrap; }
.mch-detail .channel-table .code-text { word-break: break-all; }
.mch-detail .channel-badge { padding: 5px 8px; min-width: 0; }

/* 通道详情弹窗：两列「标签：值」 */
.modal.ch-modal { width: 660px; }
.ch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px;
  font-size: 13px;
}
.ch-item { display: flex; align-items: baseline; min-width: 0; }
.ch-item .k { color: var(--ink-3); white-space: nowrap; }
.ch-item .v { color: var(--ink); word-break: break-all; }
.ch-item .v .code-text { font-family: Consolas, Monaco, monospace; font-size: 12.5px; }
.ch-item .v .code-text.is-empty { color: var(--ink-4); }

.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; }
  /* 详情弹窗例外：固定列宽本来就放得下，不需要也不允许横向滚动 */
  .modal.mch-detail { width: 96vw; }
  .mch-detail .channel-table { display: table; overflow-x: visible; font-size: 12px; }
  .mch-detail .channel-table th,
  .mch-detail .channel-table td { padding: 8px 5px; }
  .modal.ch-modal { width: 96vw; }
  .ch-grid { grid-template-columns: 1fr; }
}

#srcBanner .field-hint { color: inherit; opacity: .85; margin-top: 4px; }

/* ===== 进件列表：原型 6 列筛选网格（独立类名，避免与商户/交易页的 .filter-grid 冲突） ===== */
.apply-filter-card { padding: 14px 18px 16px; }

.apply-filter-grid {
  --fg-colgap: 14px;
  --fg-label: 104px;
  --fg-itemgap: 6px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--fg-colgap);
  row-gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.apply-filter-grid .f-item {
  display: grid;
  grid-template-columns: var(--fg-label) minmax(0, 1fr);
  column-gap: var(--fg-itemgap);
  align-items: center;
  min-width: 0;
}
.apply-filter-grid .f-item.f-time {
  grid-column: span 2;
  display: block;
}
.apply-filter-grid .f-label {
  width: var(--fg-label);
  text-align: right;
  padding-right: 0;
}
.apply-filter-grid .f-input,
.apply-filter-grid .f-select {
  width: 100%;
}
.apply-filter-grid .time-range {
  display: grid;
  grid-template-columns: calc(var(--fg-label) + var(--fg-itemgap))
                         minmax(0, 1fr)
                         calc(var(--fg-colgap) + var(--fg-label) + var(--fg-itemgap))
                         minmax(0, 1fr);
  column-gap: 0;
  align-items: center;
  min-width: 0;
}
.apply-filter-grid .time-range .dtp { width: 100%; }
.apply-filter-grid .time-range .dtp .dtp-input { width: 100%; }

@media (max-width: 1339px) {
  .apply-filter-grid { --fg-colgap: 18px; --fg-label: 108px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .apply-filter-grid .f-item.f-time { grid-column: span 2; }
}

/* ---------- 支付配置：内嵌整页浮层（原型 1:1：1360 宽 / 92vh / body 无内边距） ---------- */
#payCfgFrameOv { padding: 16px; z-index: 1100; }
#payCfgFrameOv .modal-frame { width: min(1360px, 100%); height: 92vh; max-height: 92vh; }
#payCfgFrameOv .modal-frame .modal-body-flush { padding: 0; flex: 1; min-height: 0; overflow: hidden; }
#payCfgFrameOv iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
#payCfgFrameOv .modal-foot-split { align-items: center; }
.paycfg-bar { margin-right: auto; font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; }
.paycfg-bar a { margin-left: 12px; color: var(--accent); text-decoration: none; }
.paycfg-bar a:hover { text-decoration: underline; }

/* ===== 导出记录弹窗（账号菜单入口，两端同一套） ===== */
.xr-mask { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center; background: rgba(17, 24, 39, .38); }
/* display:flex 会压过 UA 的 [hidden]{display:none}，不补这条弹窗关不掉 */
.xr-mask[hidden] { display: none !important; }
.xr-empty[hidden] { display: none !important; }
.xr-box { width: 660px; max-width: 94vw; max-height: 82vh; display: flex; flex-direction: column; border-radius: 10px; background: #fff; overflow: hidden; font-size: 13px; box-shadow: 0 16px 48px rgba(15, 23, 42, .22); }
.xr-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #eef0f4; }
.xr-title { font-size: 15px; font-weight: 600; color: #1a1d24; }
.xr-close { width: 26px; height: 26px; border: none; border-radius: 6px; background: transparent; color: #9aa0ab; font-size: 19px; line-height: 1; cursor: pointer; }
.xr-close:hover { background: #f2f4f7; color: #5a6270; }
.xr-body { flex: 1; min-height: 0; overflow: auto; padding: 0 18px; }
.xr-table { width: 100%; border-collapse: collapse; }
.xr-table th { position: sticky; top: 0; z-index: 1; padding: 11px 6px; background: #fff; border-bottom: 1px solid #eef0f4; font-size: 12px; font-weight: 500; color: #8a919c; text-align: left; white-space: nowrap; }
.xr-table td { padding: 11px 6px; border-bottom: 1px solid #f4f6f9; color: #333; vertical-align: middle; }
.xr-table .xr-c-s { width: 96px; }
.xr-table .xr-c-n { width: 76px; }
.xr-table .xr-c-t { width: 104px; }
.xr-table .xr-c-a { width: 56px; }
.xr-name { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xr-state { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 11.5px; line-height: 17px; white-space: nowrap; }
.xr-state.doing { background: #eef5ff; color: #1667dc; }
.xr-state.ok { background: #eafaf1; color: #12a15a; }
.xr-state.fail { background: #fdeeee; color: #d64545; }
.xr-num, .xr-time { font-variant-numeric: tabular-nums; }
.xr-num { color: #4a5058; }
.xr-time { color: #6b7280; }
.xr-link { padding: 0; border: none; background: none; color: #1667dc; font-size: 12.5px; font-family: inherit; cursor: pointer; }
.xr-link:hover { text-decoration: underline; }
.xr-muted { color: #c0c5cd; }
.xr-empty { padding: 46px 0; text-align: center; color: #98a0ad; }
.xr-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 14px; border-top: 1px solid #eef0f4; }
.xr-tip { font-size: 12px; color: #98a0ab; }
.xr-pager { display: inline-flex; align-items: center; gap: 8px; }
.xr-pg { height: 26px; padding: 0 10px; border: 1px solid #dfe3ea; border-radius: 6px; background: #fff; color: #4a5058; font-size: 12px; font-family: inherit; cursor: pointer; }
.xr-pg:hover:not([disabled]) { border-color: #1667dc; color: #1667dc; }
.xr-pg[disabled] { opacity: .5; cursor: default; }
.xr-pgno { font-size: 12px; color: #4a5058; font-variant-numeric: tabular-nums; }
