/* ==========================================================================
   fracdc · 商户平台
   设计语言：Untitled UI 的骨架，色板收敛为黑白灰 + 单一强调色 #09c370
   规则：全站单一字体（系统非衬线）；正文 ≤ 13px，仅标题与 KPI 数值可放大。
   ========================================================================== */

:root {
  /* 字体：只用系统非衬线，不引任何 web font，不与等宽字体混用 */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue",
    Arial, sans-serif;

  /* Gray（Untitled UI Gray scale） */
  --gray-25: #fcfcfd;
  --gray-50: #f9fafb;
  --gray-100: #f2f4f7;
  --gray-200: #eaecf0;
  --gray-300: #d0d5dd;
  --gray-400: #98a2b3;
  --gray-500: #667085;
  --gray-600: #475467;
  --gray-700: #344054;
  --gray-800: #1d2939;
  --gray-900: #101828;

  /* 强调色：单一品牌蓝，其余全部黑白灰 */
  --accent: #09c370;
  --accent-dark: #07a75f;
  --accent-soft: #e7f9ef;
  --accent-line: #b7e9cd;

  /* 语义色统一收敛到灰阶（状态靠对比度与圆点区分） */
  --ok-bg: #e7f9ef;
  --ok-fg: #067647;
  --ok-line: #b7e9cd;
  --off-bg: #f9fafb;
  --off-fg: #667085;
  --off-line: #eaecf0;
  --ink-bg: #f2f4f7;
  --ink-fg: #101828;
  --ink-line: #d0d5dd;

  /* 尺寸 */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 8px;
  --r-full: 9999px;

  --shadow-xs: none;
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);

  --ring-accent: 0 0 0 4px rgba(9, 195, 112, 0.18);
  
  --sidebar-w: 248px;
}

/* ---------------- 基础 ---------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--gray-50);
  color: var(--gray-700);
  font-family: var(--font);
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--accent-dark); }

:focus-visible {
  outline: none;
  box-shadow: var(--ring-accent);
  border-radius: var(--r-sm);
}

/* 数字统一用等宽数字对齐，但字体仍是同一套系统字体 */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------------- 壳层 ---------------- */

.app { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 16px;
}
.brand__mark {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.3; }
.brand__text strong { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.brand__text small { font-size: 11px; color: var(--gray-500); }

.nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.nav__label {
  padding: 14px 8px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: 0.04em;
}
.nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--r-md);
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}
.nav__item svg { width: 18px; height: 18px; flex: none; color: var(--gray-400); }
.nav__item:hover { background: var(--gray-50); color: var(--gray-800); }
.nav__item:hover svg { color: var(--gray-500); }
.nav__item { position: relative; }
.nav__item.on { background: var(--gray-50); color: var(--gray-900); }
.nav__item.on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: var(--r-full);
  background: var(--accent);
}
.nav__item.on svg { color: var(--accent); }
.nav__count {
  margin-left: auto;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--gray-200);
}
.avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}
.sidebar__user-meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sidebar__user-meta strong { font-size: 12px; font-weight: 600; color: var(--gray-800); }
.sidebar__user-meta small { font-size: 11px; color: var(--gray-500); }
.sidebar__user form { margin-left: auto; }

/* 主区 */
.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar { padding: 0; position: sticky; top: 0; z-index: 20; background: #fff; }
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 28px;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h1 { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--gray-900); }
.topbar__sub { font-size: 12px; line-height: 18px; color: var(--gray-500); }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar .topbar__menu { display: none; }

.content {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 28px 56px;
}

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

.card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xs);
  margin-bottom: 20px;
}
.card__head {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 18px 20px 14px;
}
.card__head > div:first-child { min-width: 0; flex: 1 1 200px; }
.card__head h2 { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--gray-900); }
.card__desc { margin-top: 2px; font-size: 12px; line-height: 18px; color: var(--gray-500); }
.card__head-side { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.card__body { padding: 0 20px 20px; }
.card__body--flush { padding: 0 0 4px; }
.card + .card { margin-top: 0; }

.section-note {
  padding: 12px 20px 16px;
  font-size: 12px;
  line-height: 18px;
  color: var(--gray-500);
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--gray-50); color: var(--gray-800); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.btn--ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--gray-600);
}
.btn--ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn--danger { color: var(--gray-900); border-color: var(--gray-300); }
.btn--danger:hover { background: var(--gray-100); border-color: var(--gray-400); color: var(--gray-900); }

.btn--sm { height: 32px; padding: 0 10px; font-size: 12px; }
.btn--sm svg { width: 14px; height: 14px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--gray-500);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--gray-100); color: var(--gray-700); }

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

/* 筛选条：4 列栅格，操作组独占末行并贴右 */
.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}
.filters .field--actions { grid-column: -2 / -1; justify-self: end; align-self: end; margin-left: auto; }
/* 字段多于一行时，操作组落到末行并贴右，避免被挤在中间 */
.filters:has(> .field:nth-child(5)) .field--actions { grid-column: 1 / -1; }
.field--actions > .actions { justify-content: flex-end; }
.field--span-2 { grid-column: span 2; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.form-grid--wide { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.form-grid > .actions { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field__label-row > label {
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  color: var(--gray-700);
}
.field > label .req { color: var(--accent); margin-left: 2px; }
.field__hint { font-size: 11px; line-height: 16px; min-height: 16px; color: var(--gray-500); }
.field__label-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.field__download { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12px; line-height: 18px; font-weight: 500; }
.field__download:hover { text-decoration: underline; }
.field__download svg { width: 14px; height: 14px; }
.csv-help { color: var(--gray-500); font-size: 12px; line-height: 20px; }
.csv-help p { margin: 0; }
.csv-help code { color: var(--gray-700); font-size: inherit; overflow-wrap: anywhere; }

.input,
.select {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  color: var(--gray-900);
  font-size: 13px;
  line-height: 20px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.12s, box-shadow 0.12s;
  appearance: none;
}
.input::placeholder { color: var(--gray-400); }
.input:hover, .select:hover { border-color: var(--gray-400); }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring-accent);
}
.select {
  padding-right: 32px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23667085' stroke-width='1.667' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.input--num { text-align: right; font-variant-numeric: tabular-nums; }

/* 成对输入：min ~ max */
.pair { display: flex; align-items: center; gap: 6px; }
.pair .input { min-width: 0; }
.pair span { color: var(--gray-400); font-size: 12px; flex: none; }

.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions--end { justify-content: flex-end; }

/* 卡选择器 */
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.pick:hover { border-color: var(--gray-400); background: var(--gray-25); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick__box {
  width: 16px;
  height: 16px;
  flex: none;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  background: #fff;
  display: grid;
  place-items: center;
}
.pick__box svg { width: 11px; height: 11px; color: #fff; opacity: 0; }
.pick__body { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.pick__body strong { font-size: 12px; font-weight: 600; color: var(--gray-800); }
.pick__body small { font-size: 11px; color: var(--gray-500); }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--ring-accent); }
.pick:has(input:checked) .pick__box { background: var(--accent); border-color: var(--accent); }
.pick:has(input:checked) .pick__box svg { opacity: 1; }

.picker-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.picker-head .link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.picker-head .link:hover { color: var(--accent-dark); text-decoration: underline; }

/* 卡选择器（输入搜索 + 已选标签） */
.combo { position: relative; }
.combo__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  max-height: 260px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}
.combo__opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}
.combo__opt:hover { background: var(--gray-50); }
.combo__opt strong { font-weight: 500; color: var(--gray-900); }
.combo__opt span { color: var(--gray-500); }
.combo__opt .flag { margin-left: auto; font-size: 11px; color: var(--gray-500); }
.combo__empty { padding: 10px; font-size: 12px; color: var(--gray-500); }
.combo__chosen { display: flex; flex-wrap: wrap; gap: 6px; }
.combo__chosen:not(:empty) { margin-top: 8px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 6px 0 9px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  font-size: 11px;
}
.tag button {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  color: inherit;
  cursor: pointer;
  line-height: 1;
}
.tag button:hover { background: rgba(9, 195, 112, 0.14); }

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  height: auto;
  font-size: 12px;
  color: var(--gray-700);
  cursor: pointer;
}
.check input { width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.settings-options { display: grid; gap: 8px; margin-top: 16px; }
.settings-options .check { align-items: flex-start; }
.settings-options .check input { margin: 2px 0 0; }
.input[type="file"] { padding: 5px 8px; height: auto; min-height: 36px; }

.textarea {
  height: auto;
  min-height: 120px;
  padding: 10px 11px;
  line-height: 20px;
  resize: vertical;
  font-family: inherit;
}
.bulk { margin-top: 16px; }
.bulk summary { font-size: 12px; color: var(--accent); cursor: pointer; }
.bulk summary:hover { color: var(--accent-dark); }

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

.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table thead th {
  padding: 10px 12px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.table tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
  vertical-align: middle;
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--gray-25); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .strong { color: var(--gray-900); font-weight: 500; }
.table .muted { color: var(--gray-500); }
.table .cell-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
/* 所有业务表格末列统一右对齐；跨列空状态保留原有排版。 */
.table thead th:last-child,
.table tbody td:last-child:not([colspan]) { padding-right: 18px; text-align: right; }
.table--fixed { table-layout: fixed; min-width: var(--table-min, 720px); }
.table--fixed .meter { min-width: 0; }
.table--fixed .meter__value { flex: none; }
.table--queue td:nth-child(3), .table--queue td:nth-child(5),
.table--orders td:nth-child(2), .table--orders td:nth-child(3), .table--orders td:nth-child(4), .table--orders td:nth-child(5),
.table--cards td:nth-child(1), .table--cards td:nth-child(5),
.table--accounts td:nth-child(1), .table--accounts td:nth-child(2), .table--accounts td:nth-child(3), .table--accounts td:nth-child(5),
.table--stats td:first-child, .table--funnel td:first-child, .table--buckets td:first-child,
.table--issues td:not(:last-child), .table--logs td:nth-child(4) {
  white-space: normal; overflow-wrap: anywhere;
}
.table--fixed td.wrap { min-width: 0; }

.table td .icon-btn { width: 24px; height: 24px; vertical-align: middle; }
.table td .icon-btn svg { width: 14px; height: 14px; }
.table .sub { display: block; font-size: 11px; line-height: 15px; color: var(--gray-500); }
.table td.wrap { white-space: normal; word-break: break-word; min-width: 260px; }
.table-wrap { scrollbar-width: thin; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 20px;
  text-align: center;
}
.empty__icon {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--gray-100);
  color: var(--gray-400);
  place-items: center;
}
.empty__icon svg { width: 20px; height: 20px; }
.empty strong { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.empty p { font-size: 12px; line-height: 18px; color: var(--gray-500); max-width: 380px; }

/* ---------------- 徽标 / 标签 ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 22px;
  white-space: nowrap;
}
.badge::before { display: none; }
.badge--success, .badge--brand { background: var(--ok-bg); color: var(--ok-fg); box-shadow: inset 0 0 0 1px var(--ok-line); }
.badge--error { background: var(--ink-bg); color: var(--ink-fg); box-shadow: inset 0 0 0 1px var(--ink-line); }
.badge--warning, .badge--info { background: #fff; color: var(--gray-700); box-shadow: inset 0 0 0 1px var(--gray-300); }
.badge--gray { background: var(--off-bg); color: var(--off-fg); box-shadow: inset 0 0 0 1px var(--off-line); }

.chip {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gray-500);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.chip strong { color: var(--gray-900); font-weight: 600; }

/* 区间快捷切换 */
.presets {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--gray-100);
  border-radius: var(--r-md);
}
.preset {
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  color: var(--gray-600);
}
.preset:hover { color: var(--gray-900); }
.preset.is-on { background: #fff; color: var(--gray-900); box-shadow: var(--shadow-xs); }

/* 进度条 */
.meter {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 200px;
}
.meter__track {
  flex: 1;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--gray-100);
  overflow: hidden;
}
.meter__fill { height: 100%; border-radius: var(--r-full); background: var(--accent); }
.meter__fill--success { background: var(--accent); }
.meter__fill--warning { background: var(--gray-400); }
.meter__fill--error { background: var(--gray-500); }
.meter__value { font-size: 12px; color: var(--gray-600); font-variant-numeric: tabular-nums; }

/* ---------------- KPI ---------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xs);
  padding: 18px 20px;
}
.stat__top { display: flex; align-items: center; gap: 8px; }
.stat__label { font-size: 12px; font-weight: 500; color: var(--gray-500); }
.stat__icon {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  background: var(--gray-50);
  color: var(--gray-500);
  display: grid;
  place-items: center;
}
.stat__icon svg { width: 16px; height: 16px; }
.stat__value {
  margin-top: 10px;
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  color: var(--gray-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.stat__hint { margin-top: 2px; font-size: 12px; color: var(--gray-500); }

/* ---------------- 提示条 ---------------- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  font-size: 13px;
  line-height: 20px;
  margin-bottom: 16px;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert--success { background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent-line); }
.alert--error { background: var(--ink-bg); color: var(--ink-fg); box-shadow: inset 0 0 0 1px var(--ink-line); }

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

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--gray-200);
  font-size: 12px;
  color: var(--gray-500);
}
.pager__pages { margin-left: auto; display: flex; gap: 6px; }
.pager__pages .btn[aria-disabled="true"] { color: var(--gray-400); pointer-events: none; box-shadow: none; background: var(--gray-50); }

/* ---------------- 定义列表 ---------------- */

.defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 28px; }
.defs dt { font-size: 12px; line-height: 18px; color: var(--gray-500); }
.defs dd {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--gray-900);
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.defs__wide { grid-column: 1 / -1; }

/* ---------------- 登录 ---------------- */

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background: var(--gray-50);
}
.auth__card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 32px;
}
.auth__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth__brand .brand__mark { width: 36px; height: 36px; font-size: 13px; }
.auth__brand strong { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.auth__brand small { display: block; font-size: 11px; color: var(--gray-500); }
.auth h1 { margin-bottom: 24px; font-size: 20px; line-height: 28px; font-weight: 600; color: var(--gray-900); }
.auth__sub { margin-top: 4px; margin-bottom: 24px; font-size: 12px; color: var(--gray-500); }
.auth .field { margin-bottom: 16px; }
.auth .input { height: 40px; }
.auth .btn { width: 100%; height: 40px; margin-top: 8px; }
.auth__foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--gray-200); font-size: 11px; line-height: 16px; color: var(--gray-500); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1240px) {
  .filters, .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .filters, .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar {
    position: fixed;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .topbar__inner { padding: 14px 18px; }
  .topbar .topbar__menu { display: inline-grid; }
  .content { padding: 18px 16px 48px; }
  .topbar h1 { font-size: 18px; line-height: 26px; }
}

@media (max-width: 560px) {
  .filters, .form-grid, .form-grid--wide { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* 复制成功时的瞬时反馈 */
.icon-btn.is-copied { color: var(--accent); background: var(--accent-soft); }

/* ---------------- U1 就地表单校验 ---------------- */
.field__error {
  font-size: 12px;
  line-height: 16px;
  color: var(--gray-900);
  font-weight: 500;
}
.input[aria-invalid="true"],
.select[aria-invalid="true"] {
  border-color: var(--gray-800);
  background: var(--gray-50);
}

/* ---------------- U3 队列批量操作浮条 ---------------- */
.bulkbar {
  position: sticky;
  bottom: 16px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 16px 16px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--gray-900);
}
.bulkbar[hidden] { display: none; }
.bulkbar__actions { display: flex; align-items: center; gap: 8px; }

/* ---------------- 宽操作表的固定列 ---------------- */
.table--actions thead th:first-child,
.table--actions tbody td:first-child:not([colspan]) {
  position: sticky;
  left: 0;
  z-index: 2;
}
.table--actions thead th:first-child { z-index: 3; background: var(--gray-50); }
.table--actions tbody td:first-child:not([colspan]) { background: #fff; }
.table--actions tbody tr:hover td:first-child { background: var(--gray-25); }

.table--actions thead th:last-child,
.table--actions tbody td:last-child:not([colspan]) {
  position: sticky;
  right: 0;
  z-index: 2;
}
.table--actions thead th:last-child { z-index: 3; background: var(--gray-50); }
.table--actions tbody td:last-child:not([colspan]) { background: #fff; }
.table--actions tbody tr:hover td:last-child { background: var(--gray-25); }

/* ---------------- U6 可点击 KPI 卡片 ---------------- */
a.stat--link {
  display: block;
  transition: border-color 0.12s, box-shadow 0.12s;
}
a.stat--link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* ---------------- U7 订单详情抽屉 ---------------- */
.table tbody tr[data-order-row] { cursor: pointer; }
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(16, 24, 40, 0.32);
  display: flex;
  justify-content: flex-end;
}
.drawer-backdrop[hidden] { display: none; }
.drawer {
  width: 100%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  background: #fff;
  border-left: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.drawer__head h2 { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 24px;
}
.drawer-open { overflow: hidden; }
.drawer__defs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.drawer__body h3 { margin-top: 18px; font-size: 12px; font-weight: 600; color: var(--gray-700); }
.table .detail-btn { box-shadow: none; }
.timeline {
  margin-top: 14px;
  border-left: 2px solid var(--gray-200);
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.timeline__item { position: relative; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--accent);
}
.timeline__step { font-size: 12px; font-weight: 600; color: var(--gray-900); }
.timeline__time { font-size: 11px; color: var(--gray-500); }
.timeline__detail { font-size: 12px; color: var(--gray-600); margin-top: 2px; word-break: break-word; }

/* ---------------- U8 Skip Link ---------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 600;
}
.skip-link:focus { left: 12px; }

/* ---------------- U12 每页条数 ---------------- */
.pager__sizes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.pager__size {
  padding: 2px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--gray-200);
  font-size: 11px;
  color: var(--gray-600);
}
.pager__size.is-on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
}

/* ---------------- U9 移动端底部主操作 ---------------- */
.mobile-bar { display: none; }
@media (max-width: 560px) {
  body:has(.mobile-bar) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    display: flex;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
  }
  .mobile-bar .btn { width: 100%; }
  .field--span-2 { grid-column: auto; }
  .check { align-items: flex-start; padding-block: 8px; }
  .check input { margin: 2px 0 0; }
  .card__head { padding: 16px; }
  .card__body { padding: 0 16px 16px; }
  .card__head-side { max-width: 100%; margin-left: 0; }
  .presets { flex-wrap: wrap; }
  .preset { padding: 6px 8px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { min-width: 0; padding: 14px; }
  .stat__value { font-size: 21px; overflow-wrap: anywhere; }
  .stat__icon { width: 24px; height: 24px; flex: none; }
  .pager { flex-wrap: wrap; gap: 10px; }
  .pager__sizes { margin-left: 0; }
  .pager__size { padding: 5px 9px; }
  .pager__pages { flex: 1 0 100%; justify-content: space-between; }
  .bulkbar { flex-wrap: wrap; bottom: calc(74px + env(safe-area-inset-bottom)); margin-inline: 8px; padding: 12px; }
  .bulkbar__actions { flex-wrap: wrap; gap: 6px; }
  .table thead th:first-child, .table tbody td:first-child:not([colspan]),
  .table--actions thead th:last-child, .table--actions tbody td:last-child:not([colspan]) { position: static; }
  .table-wrap { overscroll-behavior-x: contain; }
  .defs { grid-template-columns: minmax(0, 1fr); }
  .drawer__defs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar__inner { gap: 10px; }
}

.nav-shade { display: none; }
@media (max-width: 960px) {
  .sidebar { left: 0; top: 0; height: 100dvh; visibility: hidden; }
  body.nav-open { overflow: hidden; }
  body.nav-open .sidebar { visibility: visible; }
  body.nav-open .nav-shade { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(16,24,40,.32); }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.table-scroll-hint { padding: 6px 16px; border-top: 1px solid var(--gray-200); font-size: 11px; color: var(--gray-500); background: var(--gray-50); }

.drawer__actions { margin-top: 18px; }

.run-control { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.run-control__hint { font-size: 11px; line-height: 15px; color: var(--gray-500); white-space: nowrap; }

/* ---------------- 使用帮助 ---------------- */
.help-document { max-width: 900px; margin: 0 auto; padding: 4px 0 24px; }
.help-intro { padding-bottom: 20px; border-bottom: 1px solid var(--gray-200); }
.help-document p { margin: 8px 0; line-height: 1.8; }
.help-intro .actions { margin-top: 14px; }
.help-steps { margin: 0; padding-left: 26px; }
.help-steps > li { padding: 20px 0 20px 5px; border-bottom: 1px solid var(--gray-200); scroll-margin-top: 110px; }
.help-steps > li::marker { font-weight: 600; color: var(--gray-900); }
.help-steps h2, .help-faq h2 { margin: 0 0 8px; font-size: 15px; line-height: 24px; color: var(--gray-900); }
.help-document strong { font-weight: 600; color: var(--gray-900); }
.help-document code { font-family: inherit; font-variant-numeric: tabular-nums; }
.help-example, .help-extra { margin-top: 12px; }
.help-example > summary, .help-extra > summary { cursor: pointer; color: var(--accent); font-size: 12px; list-style-position: inside; }
.help-figure { margin: 12px 0 0; }
.help-figure > a { display: block; border: 1px solid var(--gray-200); border-radius: var(--r-sm); overflow: hidden; }
.help-figure img { width: 100%; height: auto; }
.help-figure figcaption { margin-top: 6px; font-size: 12px; line-height: 1.7; color: var(--gray-500); }
.help-faq { padding: 24px 0 12px; }
.help-faq dl > div { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--gray-200); }
.help-faq dt { font-weight: 500; color: var(--gray-900); }
.help-faq dd { line-height: 1.8; }
.help-limits { padding-top: 12px; }
.help-limits ul { list-style: disc; margin-top: 12px; padding-left: 20px; }
.help-limits li { margin-bottom: 8px; line-height: 1.8; }
@media (max-width: 560px) { .help-steps { padding-left: 20px; } .help-faq dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }


/* ---------------- 工作区与分析区 ---------------- */
.card { box-shadow: none; }
.pager { padding-left: 20px; }
.btn { font-weight: 500; }
.chip + .chip { margin-left: 10px; }
.card > .table-wrap:last-child,
.card > .analysis__body > .table-wrap:last-child { border-radius: 0 0 var(--r-xl) var(--r-xl); }
.card > .table-wrap .table tr > :first-child,
.analysis__body .table tr > :first-child { padding-left: 20px; }
.card__summary { padding: 18px 20px; cursor: pointer; font-weight: 600; color: var(--gray-900); list-style-position: inside; }
.analysis__tabs { display: flex; gap: 20px; padding: 0 20px; border-bottom: 1px solid var(--gray-200); overflow-x: auto; }
.analysis__tab { padding: 2px 0 12px; font-size: 12px; white-space: nowrap; color: var(--gray-500); border-bottom: 2px solid transparent; }
.analysis__tab:hover { color: var(--gray-900); }
.analysis__tab.is-on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.analysis__heading { margin: 0; padding: 22px 20px 12px; font-size: 13px; font-weight: 600; color: var(--gray-900); }
.stats { gap: 0; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--r-xl); overflow: hidden; }
.stat { border: 0; border-right: 1px solid var(--gray-200); border-radius: 0; box-shadow: none; }
.stat:last-child { border-right: 0; }
.stat__icon { display: none; }
a.stat--link:hover { box-shadow: none; background: var(--gray-50); }
.presets { background: transparent; border: 1px solid var(--gray-200); padding: 0; gap: 0; }
.preset { padding: 6px 10px; border-radius: 0; }
.preset + .preset { border-left: 1px solid var(--gray-200); }
.preset.is-on { color: var(--accent); background: var(--accent-soft); box-shadow: none; }
@media (max-width: 560px) {
  .stats { gap: 0; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--gray-200); }
  .analysis__tabs { gap: 18px; }
}


/* ==========================================================================
   Untitled UI 组件补全：Toast / Modal / 队列卡片 / 状态点
   ========================================================================== */

.toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 240px;
  max-width: 380px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  line-height: 20px;
  color: var(--gray-800);
  pointer-events: auto;
  animation: toast-in 0.18s ease-out;
}
.toast.is-leaving { animation: toast-out 0.18s ease-in forwards; }
.toast__icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--accent-dark); }
.toast--error .toast__icon { color: var(--gray-900); }
.toast__title { font-weight: 600; color: var(--gray-900); }
.toast__msg { color: var(--gray-600); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-4px); } }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 24, 40, 0.45);
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 22px 22px 18px;
}
.modal h2 { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--gray-900); }
.modal p { margin-top: 6px; font-size: 13px; line-height: 20px; color: var(--gray-600); }
.modal__actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }

.queue-card {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.queue-card:last-child { border-bottom: 0; }
.queue-card:hover { background: var(--gray-25); }
.queue-card__name strong { display: block; font-size: 13px; font-weight: 600; color: var(--gray-900); }
.queue-card__name span { font-size: 11px; color: var(--gray-500); }
.queue-card__metric span { display: block; font-size: 11px; color: var(--gray-500); }
.queue-card__metric strong { font-size: 13px; font-weight: 600; color: var(--gray-900); font-variant-numeric: tabular-nums; }
.queue-card__actions { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 1100px) {
  .queue-card { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, 1fr)); }
  .queue-card__actions { grid-column: 1 / -1; justify-self: end; }
}

.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-700); white-space: nowrap; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: var(--r-full); background: var(--gray-300); }
.state--running::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.state--done::before { background: var(--accent-dark); }
.state--failed::before { background: var(--gray-900); }
.state--paused::before { background: var(--gray-400); }

.table--compact thead th { padding: 9px 12px; }
.table--compact tbody td { padding: 10px 12px; }
.table--compact .cell-main { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.35; min-width: 0; }
.table--compact .cell-main strong { font-weight: 500; color: var(--gray-900); }
.table--compact .cell-main small { font-size: 11px; color: var(--gray-500); }

.brand__mark { padding: 0; overflow: hidden; background: var(--accent); }
.brand__mark img { width: 100%; height: 100%; display: block; }

/* ---------------- 原有规范下的新功能组件 ---------------- */
:root {
  --ink: var(--gray-900); --muted: var(--gray-500); --line: var(--gray-200);
  --surface: var(--gray-50); --paper: #fff; --good: #067647; --bad: #b42318; --warn: #b54708;
}
.scheduler-status { font-size: 12px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.toolbar__title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; min-width: 0; }
.toolbar__title h2 { font-size: 14px; line-height: 20px; color: var(--gray-900); font-weight: 600; }
.toolbar__actions, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.section-caption { color: var(--gray-500); font-size: 12px; line-height: 18px; }
.back-link { display: inline-flex; margin-bottom: 18px; font-size: 12px; color: var(--gray-600); }
.back-link:hover, .row-link:hover { color: var(--accent-dark); }
.content > .table-wrap { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--r-xl); }
.content > .table-wrap:has(+ .pager) { border-radius: var(--r-xl) var(--r-xl) 0 0; }
.content > .pager { background: #fff; border: 1px solid var(--gray-200); border-top: 0; border-radius: 0 0 var(--r-xl) var(--r-xl); margin-bottom: 12px; }
.table-wrap { max-width: 100%; position: relative; }
.table tbody td { overflow-wrap: anywhere; }
.table .row-link { display: block; font-weight: 600; color: var(--gray-900); white-space: normal; }
.table .sub { margin-top: 3px; white-space: normal; }
.table__scroll-hint { margin: 6px 0 12px; font-size: 11px; line-height: 16px; color: var(--gray-500); }
.table[data-order-row], .table tr[data-queue-row] { cursor: pointer; }
.queue-result-counts { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.queue-view-link { display: block; margin-top: 6px; color: var(--accent-dark); font-size: 12px; font-weight: 500; }
.progress-stack { display: flex; flex-direction: column; gap: 6px; }
.progress-stack small { font-size: 11px; color: var(--gray-500); }
.progress-stack .meter { max-width: none; }
.meter__fill { display: block; }
.table--queues .meter__fill { background: var(--gray-400); }
.state-button { min-width: 88px; }
.state-button:disabled { opacity: 1; cursor: default; }
.state-button--done { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.state-button--running { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-dark); }
.state-button--failed { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.state-button--warning { background: #fffaeb; border-color: #fedf89; color: #b54708; }
.state--failed { color: #b42318; }.state--failed::before { background: #d92d20; }
.state--warning { color: #b54708; }.state--warning::before { background: #f79009; }
.state--done { color: #067647; }.state--done::before { background: #17b26a; }
.btn--danger { color: #b42318; border-color: #fecdca; }.btn--danger:hover { background: #fef3f2; border-color: #fda29b; color: #b42318; }
.btn--primary.btn--danger { background: #d92d20; border-color: #d92d20; color: #fff; }
.field--span-2 { grid-column: span 2; }
.field--check { padding-top: 24px; }
.filter-actions { display: flex; align-self: end; align-items: center; justify-content: flex-end; gap: 8px; }
.content > form.filters { background: #fff; padding: 16px; border: 1px solid var(--gray-200); border-radius: var(--r-xl); margin-bottom: 16px; }
.filters--orders { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.filters--orders .filter-extra { grid-column: 1 / 4; }
.filter-extra > summary { cursor: pointer; font-size: 12px; min-height: 32px; line-height: 32px; color: var(--gray-600); }
.filter-extra > .form-grid { padding-top: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filters--orders > .filter-actions { min-height: 32px; }.filter-extra[open] + .filter-actions { align-self: start; }
.editor { margin-bottom: 16px; }
.editor > summary { display: inline-flex; align-items: center; padding: 8px 12px; cursor: pointer; font-weight: 600; border: 1px solid var(--gray-300); border-radius: var(--r-md); background: #fff; color: var(--gray-700); box-shadow: var(--shadow-xs); }
.editor > summary::marker, .editor > summary::-webkit-details-marker { display: none; }
.editor > .card > .card__head { display: none; }.editor[open] > .card { margin-top: 12px; padding-top: 20px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--gray-200); padding-top: 20px; }
.form-actions .section-caption { max-width: 70%; }
.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: start; }
.plan-form { min-width: 0; padding: 24px; border: 1px solid var(--gray-200); border-radius: var(--r-xl); background: #fff; }
.plan-section { margin-bottom: 24px; }.plan-section + .plan-section { border-top: 1px solid var(--gray-200); padding-top: 24px; }
.plan-section h2 { font-size: 14px; line-height: 20px; color: var(--gray-900); margin-bottom: 18px; }
.plan-section .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-section summary { cursor: pointer; font-size: 12px; color: var(--gray-500); }
.plan-aside { position: sticky; top: 90px; border: 1px solid var(--gray-200); border-radius: var(--r-xl); padding: 20px; background: #fff; }
.plan-aside h2 { font-size: 14px; margin-bottom: 16px; color: var(--gray-900); }.plan-aside dl { display: grid; gap: 16px; }
.plan-aside dt, .plan-aside p { font-size: 12px; line-height: 18px; color: var(--gray-500); }.plan-aside dd { margin: 4px 0 0; font-size: 20px; line-height: 28px; font-weight: 600; color: var(--gray-900); }
.plan-preview-title { margin: 20px 0 12px; font-size: 14px; color: var(--gray-900); }

/* 新建付款计划：按填写顺序组织，摘要与表单使用同一组参数。 */
.plan-intro { margin: -4px 0 20px; color: var(--gray-600); font-size: 13px; line-height: 22px; }
.plan-layout--clear { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
.plan-layout--clear [hidden] { display: none !important; }
.plan-layout--clear .plan-form { padding: 24px; }
.plan-layout--clear .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.plan-layout--clear .plan-section { margin-bottom: 24px; }
.plan-section__head { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.plan-section__head h2 { margin: 0; font-size: 15px; line-height: 22px; }
.plan-step { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--gray-100); color: var(--gray-600); font-size: 12px; font-weight: 600; }
.plan-section__meta { margin-left: auto; color: var(--gray-500); font-size: 12px; }
.plan-layout--clear .field > label, .plan-layout--clear .plan-field-label { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--gray-700); }
.plan-layout--clear .field__hint { font-size: 12px; line-height: 19px; }
.plan-layout--clear .input, .plan-layout--clear .select { height: 40px; font-size: 13px; scroll-margin-top: 100px; }
.plan-layout--clear .input[readonly] { background: var(--gray-50); color: var(--gray-600); }
.plan-field--full { grid-column: 1 / -1; }
.plan-optional { margin-left: 6px; color: var(--gray-500); font-size: 12px; font-weight: 400; }
.plan-layout--clear .plan-check { font-size: 13px; font-weight: 400; }
.plan-mode-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.plan-mode-fields > .field__hint { margin-top: 8px; }
.plan-mode-fields legend { padding: 0; margin-bottom: 8px; }
.plan-products { max-height: 200px; overflow: auto; border: 1px solid var(--gray-200); border-radius: var(--r-md); padding: 4px 12px; }
.plan-products .check { display: flex; gap: 8px; padding: 10px 0; font-size: 13px; }
.plan-products .check + .check { border-top: 1px solid var(--gray-100); }
.plan-product-price { margin-left: auto; flex-shrink: 0; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.plan-input-unit { position: relative; }
.plan-input-unit .input { padding-right: 58px; }
.plan-input-unit > span { position: absolute; right: 12px; top: 0; height: 40px; display: flex; align-items: center; color: var(--gray-500); font-size: 12px; pointer-events: none; }
.plan-advanced { border-top: 1px solid var(--gray-200); padding-top: 20px; }
.plan-advanced > summary { cursor: pointer; color: var(--gray-700); font-size: 13px; font-weight: 500; line-height: 22px; }
.plan-advanced > summary > span { margin-left: 8px; color: var(--gray-500); font-size: 12px; font-weight: 400; }
.plan-advanced > .form-grid { margin-top: 20px; }
.plan-summary { top: 88px; padding: 20px; }
.plan-summary h2 { font-size: 14px; margin-bottom: 20px; }
.plan-summary__amount { display: grid; gap: 5px; padding-bottom: 20px; border-bottom: 1px solid var(--gray-200); color: var(--gray-600); font-size: 12px; line-height: 20px; }
.plan-summary__amount > strong { font-size: 26px; line-height: 36px; color: var(--gray-900); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.plan-summary .plan-summary__details { display: grid; gap: 14px; margin: 20px 0; }
.plan-summary__details > div { display: grid; gap: 4px; }
.plan-summary .plan-summary__details dt { font-size: 12px; line-height: 18px; color: var(--gray-500); }
.plan-summary .plan-summary__details dd { margin: 0; font-size: 13px; line-height: 21px; font-weight: 500; color: var(--gray-700); overflow-wrap: anywhere; }
.plan-summary .plan-summary__resources { border-top: 1px solid var(--gray-200); padding-top: 16px; font-size: 12px; line-height: 20px; }
.plan-summary__resources strong { font-weight: 500; color: var(--gray-700); }
.plan-summary .plan-summary__validation { padding: 10px 12px; margin-top: 14px; background: #fffaeb; border-radius: var(--r-md); color: #93370d; font-size: 12px; line-height: 20px; }
.plan-summary__validation a { text-decoration: underline; }
.plan-summary .plan-submit { width: 100%; min-height: 40px; margin-top: 20px; }
.plan-summary .plan-summary__footnote { margin-top: 10px; font-size: 12px; line-height: 19px; }
.plan-errors { padding: 14px 16px; margin-bottom: 24px; border: 1px solid #fecdca; border-radius: var(--r-md); background: #fef3f2; color: #b42318; font-size: 13px; line-height: 22px; scroll-margin-top: 90px; }
.plan-errors ul { padding-left: 18px; margin-top: 4px; }.plan-errors a { text-decoration: underline; }
.plan-card-check { margin-top: 16px; color: var(--gray-600); font-size: 13px; line-height: 22px; }.plan-card-check summary { cursor: pointer; color: var(--gray-700); font-weight: 500; }.plan-card-check p { margin-top: 8px; overflow-wrap: anywhere; }
@media (max-width: 1150px) {
  .plan-layout--clear { grid-template-columns: minmax(0, 1fr); }
  .plan-summary { position: static; }
  .plan-summary .plan-summary__details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .plan-layout--clear { gap: 16px; }
  .plan-layout--clear .plan-form, .plan-summary { padding: 20px 16px; }
  .plan-layout--clear .form-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .plan-section__head { gap: 8px; flex-wrap: wrap; }.plan-section__meta { font-size: 11px; }
  .plan-advanced > summary > span { display: block; margin-left: 17px; }
  .plan-summary .plan-summary__details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-summary__amount { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
  .plan-summary__amount > span:first-child { grid-column: 1 / -1; }
  .plan-summary__amount > span:last-child { align-self: end; padding-bottom: 5px; }
}
.scheduler-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 20px 20px; }.scheduler-panel .section-caption { margin-top: 6px; }
.settings-options { display: grid; gap: 14px; }.settings-options .check { align-items: start; }

/* 共用反馈保留原来的浅底、细边与圆角规范。 */
.modal-backdrop { z-index: 1000; display: flex; justify-content: center; align-items: center; }
.modal { display: flex; flex-direction: column; width: min(560px, 100%); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border-radius: 12px; }
.modal--wide { width: min(960px, 100%); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-bottom: 1px solid var(--gray-200); }
.modal__head h2 { margin: 0; font-size: 16px; line-height: 24px; }.modal__head .icon-btn { flex-shrink: 0; }
.modal__body { padding: 20px; overflow: auto; overscroll-behavior: contain; min-height: 0; }.modal__body p + p { margin-top: 10px; }
.modal__actions { margin: 0; padding: 16px 20px; border-top: 1px solid var(--gray-200); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }.modal__actions:empty { display: none; }
.modal .card__body { padding: 0; }.modal .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.modal-open { overflow: hidden; }
.modal__summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--r-lg); padding: 16px; margin-bottom: 20px; }
.modal__summary dt { font-size: 12px; color: var(--gray-500); }.modal__summary dd { margin-top: 4px; font-size: 18px; line-height: 26px; font-weight: 600; color: var(--gray-900); }
.modal p.modal__notice { margin-top: 14px; font-size: 12px; color: var(--gray-500); }
.drawer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }.drawer__field dt { font-size: 12px; color: var(--gray-500); margin-bottom: 4px; }.drawer__field dd { overflow-wrap: anywhere; color: var(--gray-900); }.drawer__field--wide { grid-column: 1 / -1; }
.toast-host { top: 20px; right: 20px; z-index: 1100; max-width: min(420px, calc(100vw - 32px)); }
.toast { width: 100%; min-width: 0; max-width: 420px; border-radius: var(--r-lg); padding: 14px 16px; }
.toast::before { content: '✓'; width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; border-radius: 50%; background: #ecfdf3; color: #067647; font-weight: 600; }
.toast--error::before { content: '!'; background: #fef3f2; color: #b42318; }.toast--warning::before { content: '!'; background: #fffaeb; color: #b54708; }
.toast__body { flex: 1; min-width: 0; overflow-wrap: anywhere; }.toast__body a { display: inline-block; margin-left: 8px; color: var(--accent-dark); text-decoration: underline; }
.toast__close { width: 20px; height: 20px; padding: 0; border: 0; background: transparent; color: var(--gray-500); cursor: pointer; font-size: 18px; line-height: 20px; }
.password-field { position: relative; }.password-field .input { padding-right: 58px; }.password-toggle { position: absolute; right: 12px; top: 0; bottom: 0; border: 0; background: transparent; color: var(--gray-500); cursor: pointer; font-size: 12px; }
.auth__card { border-radius: 12px; box-shadow: var(--shadow-sm); }.auth__error { padding: 10px 12px; margin-bottom: 18px; border: 1px solid #fecdca; border-radius: var(--r-md); background: #fef3f2; color: #b42318; font-size: 12px; }
.help-document { max-width: 1040px; margin: auto; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--r-xl); padding: 24px; }
.help-intro { border-bottom: 1px solid var(--gray-200); padding-bottom: 20px; margin-bottom: 24px; }.help-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin-top: 18px; }.help-index a { color: var(--accent-dark); font-size: 13px; }.help-index a:hover { text-decoration: underline; }
.help-question { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--gray-200); scroll-margin-top: 88px; }.help-question:last-child { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
.help-question h2 { font-size: 16px; line-height: 24px; margin-bottom: 14px; color: var(--gray-900); }.help-question ol { padding-left: 22px; margin: 0; display: grid; gap: 10px; }.help-question li, .help-question p { font-size: 13px; line-height: 22px; }.help-question p { margin: 12px 0; }
.help-note { padding: 12px 14px; border: 1px solid var(--gray-200); border-radius: var(--r-md); background: var(--gray-50); color: var(--gray-600); }.help-document code { font-family: inherit; overflow-wrap: anywhere; }
.help-figure { margin: 20px 0 0; }.help-figure > a { display: block; overflow: hidden; border: 1px solid var(--gray-200); border-radius: var(--r-lg); }.help-figure img { width: 100%; height: auto; }.help-figure figcaption { margin-top: 8px; font-size: 11px; line-height: 18px; color: var(--gray-500); }
.mobile-bar { display: none; }
@media (max-width: 1240px) { .plan-layout { grid-template-columns: minmax(0, 1fr); }.plan-aside { position: static; }.plan-aside dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) { .plan-section .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.topbar__actions { max-width: 50%; }.scheduler-status { font-size: 11px; } }
@media (max-width: 600px) {
  .content { padding-bottom: 32px; }.toolbar__actions { width: 100%; justify-content: space-between; }.toolbar__title { gap: 6px; }.toolbar__title h2 { font-size: 14px; }
  .plan-form, .help-document { padding: 18px 16px; }.plan-section .form-grid, .modal .form-grid, .drawer__grid { grid-template-columns: minmax(0, 1fr); }.field--span-2, .form-grid > [style*='span 2'] { grid-column: 1 !important; }.field--check { padding-top: 0; }.plan-aside dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-actions { align-items: stretch; flex-direction: column; }.form-actions .section-caption { max-width: none; }.form-actions .btn { width: 100%; }
  .scheduler-panel { flex-direction: column; align-items: stretch; }.scheduler-panel .btn { width: 100%; }
  .modal-backdrop { padding: 16px; }.modal { max-height: calc(100dvh - 32px); }.modal__head, .modal__body { padding: 16px; }.modal__actions { padding: 12px 16px; }.drawer__field--wide { grid-column: 1; }
  .toast-host { top: 72px; left: 16px; right: 16px; max-width: none; }.toast { max-width: none; }.help-index { grid-template-columns: minmax(0, 1fr); }
  .pager { flex-wrap: wrap; gap: 10px; }.pager__pages { width: 100%; justify-content: space-between; }
}

/* 手机保留完整记录与原位操作，不恢复已修复的遮挡问题。 */
@media(max-width:600px){
 .filters--orders{grid-template-columns:repeat(2,minmax(0,1fr))}.filters--orders .filter-extra,.filters--orders .filter-actions{grid-column:1/-1}.filter-extra>.form-grid{grid-template-columns:minmax(0,1fr)}
 .table--flow{display:block;min-width:0!important;table-layout:auto}.table--flow colgroup{display:none}.table--flow thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.table--flow tbody{display:block}.table--flow tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 16px;padding:20px 0;border-bottom:1px solid var(--line)}.table--flow tbody td,.table--flow tbody td:last-child:not([colspan]){display:block;position:static!important;border:0;padding:0!important;background:transparent!important;min-width:0;overflow-wrap:anywhere}.table--flow td[colspan]{grid-column:1/-1}.table--flow .empty{border:0;padding:24px 0}.table--flow tbody tr:first-child{border-top:1px solid var(--line)}.table--flow td::before{font-size:12px;color:var(--muted);margin-right:8px}.table--flow .sub{margin-top:4px}.table--flow .btn--sm{min-height:36px}.table--flow tbody tr:has(td[colspan]){display:block}
 .table--queues td:nth-child(1){grid-column:1/-1}.table--queues td:nth-child(2){text-align:left}.table--queues td:nth-child(2)::before{content:'付款数据'}.table--queues td:nth-child(3){text-align:right}.table--queues td:nth-child(3)::before{content:'已收／计划'}.table--queues td:nth-child(4){grid-column:1/-1;text-align:left}.table--queues td:nth-child(5){text-align:left}.table--queues td:nth-child(6){text-align:right}.table--queues .queue-view-link{display:inline-block;margin-top:8px}.table--queues .progress-stack{gap:6px}.table--queues td:nth-child(3) .sub{display:inline;margin-left:4px}
 .table--queue_detail td:nth-child(1){grid-column:1/-1}.table--queue_detail td:nth-child(2){grid-column:2;grid-row:2;text-align:right}.table--queue_detail td:nth-child(2)::before{content:'收款账号'}.table--queue_detail td:nth-child(3){grid-column:1;grid-row:2;text-align:left}.table--queue_detail td:nth-child(3)::before{content:'分配金额'}.table--queue_detail td:nth-child(4){grid-column:1/-1;grid-row:3;text-align:left}.table--queue_detail td:nth-child(4)::before{content:'计划时间'}.table--queue_detail td:nth-child(5){grid-column:1;grid-row:4}.table--queue_detail td:nth-child(6){grid-column:2;grid-row:4}
 .table--orders td:nth-child(1){grid-column:1/-1}.table--orders td:nth-child(2){text-align:left}.table--orders td:nth-child(2)::before{content:'付款数据'}.table--orders td:nth-child(3){text-align:right}.table--orders td:nth-child(3)::before{content:'收款账号'}.table--orders td:nth-child(4){text-align:left;font-size:16px}.table--orders td:nth-child(4)::before{content:'金额'}.table--orders td:nth-child(5){text-align:right}.table--orders td:nth-child(6){grid-column:1/-1;text-align:right}
 .table--cards td:nth-child(1){grid-column:1;grid-row:1}.table--cards td:nth-child(2){grid-column:2;grid-row:1;text-align:right}.table--cards td:nth-child(3)::before{content:'分层'}.table--cards td:nth-child(4)::before{content:'账单国家'}.table--cards td:nth-child(5){text-align:left}.table--cards td:nth-child(5)::before{content:'日上限'}.table--cards td:nth-child(6){text-align:right}.table--cards td:nth-child(7){grid-column:1/-1;text-align:right}
 .table--accounts td:nth-child(1){grid-column:1/-1}.table--accounts td:nth-child(2){text-align:left}.table--accounts td:nth-child(2)::before{content:'环境'}.table--accounts td:nth-child(3){text-align:right}.table--accounts td:nth-child(3)::before{content:'调用间隔'}.table--accounts td:nth-child(4){text-align:left}.table--accounts td:nth-child(4)::before{content:'权重'}.table--accounts td:nth-child(5){text-align:right}.table--accounts td:nth-child(6){grid-column:1/-1;text-align:right}
}

@media (max-width:600px) {
  .table--flow tbody tr { padding:16px; }
  .table--queues .queue-view-link { margin-left:8px; }
}
