* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f5f6f8;
  color: #222;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: #1f2937;
  color: #fff;
}

.topbar .brand { font-weight: 700; font-size: 18px; }

/* 顶栏标语：跟旁边的金色 logo 呼应（深蓝底 + 金色渐变字 + 细金分隔线）。
   先给一个金色实心兜底，再用 @supports 上渐变字，避免老浏览器出现"透明字"看不见 */
.topbar .brand-box { display: inline-flex; align-items: center; min-width: 0; }
.topbar .brand-slogan {
  margin-left: 13px;
  padding-left: 13px;
  border-left: 1px solid rgba(214, 178, 96, .38);
  font-size: 12.5px;
  letter-spacing: 1.6px;
  white-space: nowrap;
  color: #d8bd7e;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .topbar .brand-slogan {
    background-image: linear-gradient(92deg, #d9b45f 0%, #f7e6b4 42%, #e3c47c 72%, #c9a351 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

/* 宽屏：把品牌组（logo + 标语）摆在顶栏正中，导航靠右。
   用等宽三列（1fr auto 1fr）才能真正落在正中；窄屏不套用，手机上仍是原来的样子。
   :has 只挑"有品牌组"的顶栏（后台顶栏是纯文字 .brand，不受影响）；
   老浏览器不支持 :has 就自动退回原来的 space-between 布局，不会坏。 */
@media (min-width: 900px) {
  .topbar:has(.brand-box) {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .topbar:has(.brand-box) .brand-box { grid-column: 2; justify-self: center; }
  .topbar:has(.brand-box) nav { grid-column: 3; justify-self: end; }
}

.topbar nav { display: flex; align-items: center; gap: 20px; }

.topbar a { color: #d1d5db; text-decoration: none; }
.topbar a:hover { color: #fff; }

.topbar .who { color: #9ca3af; font-size: 14px; }

/* 页面内容收成一列居中：标签页 / 按钮行 / 统计条 / 表格 同一条左右边缘。
   原来 1500px 时，统计条宽 1468 而表格按内容只有 1040~1130（居中后左边缘差 200+），
   两块盒子宽度不一致，看着就是"没对齐"。收成 1200 之后宽表几乎填满、窄表居中，
   整体是一列居中的内容区。
   顶部间距按用户要求收紧（原来 24px，内容离顶栏太远）。 */
.container { max-width: 1200px; margin: 8px auto; padding: 0 16px; overflow-x: auto; }
/* 1040 是"别挤变形"的底线，不是目标宽度：表格本身按内容收紧（见文末「列宽与对齐修正」）。
   原来写 1300，会把 100~260px 的多余宽度硬摊到各列上，中间就空出一大片。 */
table.hall { min-width: 1040px; }

h1 { font-size: 22px; }

.hint { color: #6b7280; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; }
.flash.success { background: #dcfce7; color: #166534; }
.flash.danger { background: #fee2e2; color: #991b1b; }

table.hall { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

table.hall th, table.hall td { padding: 8px 10px; border-bottom: 1px solid #eee; text-align: center; vertical-align: middle; white-space: nowrap; }

table.hall th { background: #f9fafb; color: #374151; font-size: 13px; }

table.hall td.num {
  color: #2563eb;
  font-variant-numeric: tabular-nums;
}

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

.empty { text-align: center; color: #9ca3af; padding: 30px 0 !important; }

.btn {
  padding: 6px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}
.btn:hover { background: #f3f4f6; }
.btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn.primary:hover { background: #1d4ed8; }
.btn.warn { color: #b45309; border-color: #f59e0b; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* 二维码列的「查看」按钮：蓝色链接样式（带边框） */
.col-qr .btn {
  color: #2563eb;
  background: none;
  border-color: #2563eb;
}
.col-qr .btn:hover {
  background: #eff6ff;
  border-color: #1d4ed8;
  text-decoration: underline;
}

/* 订单详情列的链接：去掉 a 的蓝色下划线，变普通颜色 */
.col-view .btn {
  color: inherit;
  text-decoration: none;
}
.col-view .btn:hover { background: #f3f4f6; }

.badge { font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.badge.mine { background: #ef4444; color: #000; }
.badge.locked { background: #ef4444; color: #000; }

input[type="number"] { width: 96px; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; }
input[type="number"]:disabled { background: #f3f4f6; }

.error-box { background: #fff; border-radius: 8px; padding: 40px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.error-box h1 { color: #991b1b; }

/* 管理员后台 */
.login-box { max-width: 360px; margin: 80px auto; background: #fff; padding: 32px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.login-box h1 { margin-top: 0; font-size: 20px; }
.login-box label { display: block; margin: 14px 0 6px; color: #374151; }
.login-box input[type="text"], .login-box input[type="password"] { width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; }
.login-box button { width: 100%; margin-top: 20px; }

.admin-actions { margin-bottom: 16px; }
.admin-actions a { margin-right: 8px; }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; margin-bottom: 6px; color: #374151; }
.form-row input { width: 100%; max-width: 400px; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; }

.batch-example { background: #f9fafb; border: 1px solid #eee; border-radius: 6px; padding: 12px; max-width: 560px; }

.rank-filter { display: flex; gap: 16px; align-items: flex-end; margin-bottom: 8px; flex-wrap: wrap; }
.rank-filter label { display: flex; flex-direction: column; gap: 4px; color: #374151; }
.rank-filter input[type="date"] { padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; }

.check-col { width: 36px; text-align: center; display: none; }
.batch-mode .check-col { display: table-cell; }
.batch-actions { margin-top: 12px; display: flex; gap: 8px; }

.tabs { display: flex; margin: 12px 0 16px; border-bottom: 2px solid #e5e7eb; }
.tab { padding: 8px 20px; color: #6b7280; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab:hover { color: #111827; }
.tab.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }

.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover { color: #2563eb; }
.sort-neutral { color: #cbd5e1; font-size: 12px; }

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: #2563eb; }
.sort-arrow { color: #cbd5e1; font-size: 12px; }

/* 当前余额列：下拉 + 保存 */
.current-balance-cell { text-align: center; min-width: 110px; }
.balance-set-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.balance-select {
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
}
.balance-select:disabled { background: #f3f4f6; color: #9ca3af; }
.btn-tiny {
  padding: 3px 8px;
  font-size: 12px;
}

/* 上次查询余额列：确保有最小宽度避免被挤压 */
.last-balance-actions {
  font-size: 12px;
  margin-top: 4px;
}

/* 查询余额反馈 toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.toast-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.toast-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* 账号区号表头搜索框 */
.col-search {
  display: block;
  width: 72px;
  margin: 4px auto 0;
  padding: 3px 6px;
  font-size: 12px;
  font-weight: normal;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
}
/* 账户号码下面那个「搜索号码」框：列本来就窄，再收一点 */
.col-search-acc { width: 84px; font-size: 11.5px; }
.col-search:focus { outline: none; border-color: #2563eb; }

/* 模态框（查询余额、历史查询共用）*/
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
}
.modal-content {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 24px 20px 20px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.modal-content h2 { margin: 0 0 12px; font-size: 18px; }
.modal-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 4px 10px;
}
.modal-close:hover { color: #111827; }

/* 二维码列 + 模态框 */
.col-qr { text-align: center; }
.qr-modal { max-width: 360px; }
.qr-info { font-size: 14px; color: #374151; margin-bottom: 12px; text-align: center; }
.qr-box { text-align: center; }
.qr-box img {
  display: inline-block;
  max-width: 260px;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
.qr-error { color: #991b1b; text-align: center; }

/* 历史查询列表 */
.history-account {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 10px;
}
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 50vh;
  overflow-y: auto;
}
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 6px;
  border-bottom: 1px dashed #eee;
  gap: 10px;
}
.history-item:last-child { border-bottom: none; }
.history-balance {
  color: #2563eb;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 60px;
}
.history-time {
  color: #6b7280;
  font-size: 12px;
  flex: 1;
  text-align: center;
}
.history-src {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 36px;
  text-align: center;
}
.history-src.src-api { background: #dbeafe; color: #1d4ed8; }
.history-src.src-manual { background: #f3f4f6; color: #6b7280; }
.history-loading, .history-empty {
  color: #9ca3af;
  padding: 24px 0;
  text-align: center;
  list-style: none;
}

/* 户号列：查询按钮 + 上次余额 */
.account-text { line-height: 1.4; font-family: ui-monospace, Menlo, Consolas, monospace; }
.account-actions {
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-link {
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.disabled {
  color: #cbd5e1;
  cursor: not-allowed;
  text-decoration: none;
}
.btn-link.disabled:hover { text-decoration: none; }
.last-balance {
  color: #2563eb;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.last-balance-time {
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
  margin-top: 2px;
}
.last-balance-cell {
  text-align: center;
  min-width: 110px;
}
.last-balance-actions {
  font-size: 12px;
}
.text-muted { color: #9ca3af; }

/* 当前余额列：下拉 + 保存 + 查询链接 */
/* ⚠ 不能把 td 设成 display:flex：
   td 一旦不是 table-cell，就不再撑满整行高度，行底部会露出一块空白
   （2026-11-02 用户反馈「每一行底下都有一块小空白」就是这个）。
   需要纵向排列时，让里面的 .v / .cell-stack 做 flex，td 保持 table-cell。 */
.current-balance-cell {
  text-align: center;
  vertical-align: top;
}
.balance-set-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.balance-select {
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
}
.balance-select:disabled { background: #f3f4f6; color: #9ca3af; }
.btn-tiny {
  padding: 3px 8px;
  font-size: 12px;
}

/* 分类 Tab 与「锁定中的」同一行：Tab 在左，锁定中的紧挨着它，「一键解锁」在最后 */
.hall-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 12px;
}
.unlock-all { padding: 6px 13px; font-size: 12.5px; }

/* 任务大厅：标题栏。
   大标题按用户要求删掉了；「锁定中的」也移到 Tab 那一行了，这里保留规则以防别处引用。 */
.hall-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 8px;
}
.hall-head h1 { margin: 0; }
.hall-logo img {
  width: 60px;
  height: 60px;
  display: block;
  border-radius: 50%;
}

/* 查询余额表单 */
.balance-form {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  max-width: 520px;
}


/* ========== 任务分类 Tab ========== */
.hall-tabs {
  display: inline-flex;
  gap: 2px;
  margin: 0 0 20px;
  padding: 4px;
  background: #f1f3f5;
  border-radius: 10px;
}
.hall-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 7px;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  user-select: none;
}
.hall-tab:hover {
  color: #111827;
}
.hall-tab.active {
  background: #fff;
  color: #1f2937;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  background: #e5e7eb;
  color: #4b5563;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hall-tab.active .tab-count {
  background: #1f2937;
  color: #fff;
}

/* ========== 已完成列表的日期分组标题行 ========== */
.date-separator td {
  background: #eef2f7;
  color: #334155;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
}
.date-separator .date-label { font-size: 15px; }
.date-separator .date-count {
  margin-left: 10px;
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
  background: #dbe3ec;
  border-radius: 999px;
  padding: 2px 10px;
}
.dots { display: inline-block; margin-left: 2px; }
.dots span { animation: dotBlink 1.2s infinite both; }
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dotBlink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

.net-status { position: fixed; right: 12px; bottom: 12px; z-index: 9999; display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6b7280; background: rgba(255,255,255,.92); border: 1px solid #e5e7eb; border-radius: 999px; padding: 4px 10px; }
.net-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.net-dot.green { background: #22c55e; }
.net-dot.yellow { background: #f59e0b; }
.net-dot.red { background: #ef4444; }


/* ===== 订单异常标记 ===== */
.abn-badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px;
  font-size: 11px; font-weight: 600; color: #b45309; background: #fef3c7;
  border: 1px solid #fcd34d; white-space: nowrap;
}
.abn-reason { margin-top: 3px; font-size: 11px; line-height: 1.4; color: #b45309; max-width: 220px; white-space: normal; }
.abn-time { color: #9a7b4f; }


/* ===== 锁定订单高亮：户号红色 + 行左侧红条，一眼看出哪些已被领走 ===== */
tr[data-locked="1"] .account-text {
  color: #dc2626 !important;
  font-weight: 700;
}
tr[data-locked="1"] > td:first-child {
  box-shadow: inset 3px 0 0 #dc2626;
}
tr[data-locked="1"] {
  background: #fff7f7;
}
tr[data-locked="1"]:hover {
  background: #fdecec;
}
/* 已锁定徽章加强 */
.badge.locked {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  white-space: nowrap;
}
.badge.mine {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #b91c1c;
  background: #fecaca;
  border: 1px solid #f87171;
  white-space: nowrap;
}


/* ===== 订单详情列：按钮同行排列（订单详情 / 异常 / 重试同步）===== */
.view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.view-actions .btn {
  margin: 0;
  white-space: nowrap;
}


/* ==========================================================================
   任务大厅 · 表格可读性（2026-10-11）
   --------------------------------------------------------------------------
   只作用于任务大厅：用 c-pending / c-init / c-cur / c-arrive / num-h 这些
   只在 _hall_tbody.html、hall.html 里出现的类做钩子，后台的表格不受影响。
   ========================================================================== */

/* 圆角裁剪原来用 overflow:hidden，但那会让表格变成"滚动容器"，
   里面的 sticky 表头就永远不生效（实测 th.top 跟着页面滚走，列名全丢）。
   overflow:clip 同样能裁圆角，却不会创建滚动容器——吸顶才有救。
   旧浏览器不认 clip 时会退回上一行的 hidden（只是没有吸顶，其它照旧）。 */
table.hall { overflow: hidden; overflow: clip; }

/* ---- 金额列右对齐：跨行比大小才看得动（等宽数字避免跳动） ---- */
table.hall th.num-h,
table.hall td.c-pending,
table.hall td.c-init,
table.hall td.c-cur,
table.hall td.c-arrive {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.hall td.c-cur .account-actions,
table.hall td.c-arrive .last-balance-actions { justify-content: flex-end; }

/* ---- 待充值金额：不再一律通红（每行都红 = 没有重点），改成深色加粗 ---- */
table.hall td.c-pending { color: #0f172a; font-weight: 700; font-size: 15px; }

/* ---- 初始金额 = 下单时的参考值：常态用灰，跟"当前余额"的蓝一眼区分开 ----
   （两个数字在多数行里长得一样，只靠表头认列，滑下去就分不清了） */
table.hall td.c-init .last-balance { color: #6b7280; font-weight: 600; }
table.hall td.c-init .last-balance.neg { color: #dc2626; }

/* ---- 到账金额：正数绿色（钱到了）、负数红色 ---- */
.last-balance.pos { color: #16a34a; font-weight: 700; }
.last-balance.neg { color: #dc2626; font-weight: 700; }

/* ---- 欠费小标签（余额为负说明是欠费，不是"余额"） ---- */
.tag-debt {
  display: inline-block;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  vertical-align: 1px;
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

/* ---- 行内小链接：保留可点，去掉"每行两个蓝链接"的视觉噪音 ---- */
.btn-link-quiet { color: #94a3b8; font-size: 12px; }
.btn-link-quiet:hover { color: #2563eb; }

/* ---- 表头吸顶：往下滚也知道哪列是哪列 ----
   坑：祖先节点只要有 overflow（.container 原本是 overflow-x:auto）就会成为滚动容器，
   里面的 sticky 就永远不生效。实测在 1280px 宽的窗口下，1366px 的阈值会让吸顶失效，
   所以宽屏下直接放开 .container 的 overflow——代价是窗口窄于表格时整页横向滚动，
   这比"滑下去丢失列名"好接受得多。 */
@media (min-width: 821px) {
  .container { overflow: visible; }
  table.hall thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    /* 分隔线 + 一点投影：滑到中间时能看出表头是"浮"在行上面的 */
    box-shadow: inset 0 -1px 0 #e5e7eb, 0 2px 6px rgba(15, 23, 42, .06);
  }
}

/* ---- 表格底部合计行 ---- */
table.hall tr.hall-total td {
  text-align: right;
  padding: 10px 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  border-top: 2px solid #e2e8f0;
}
table.hall tr.hall-total .t-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}
table.hall tr.hall-total .t-paid { color: #16a34a; }
table.hall tr.hall-total .t-sep { color: #cbd5e1; margin: 0 6px; }


/* ==========================================================================
   任务大厅 · 扫行辅助 + 对比度（2026-10-11）
   ========================================================================== */

/* ---- 斑马纹 + 鼠标所在行高亮：10 列宽表横着扫不容易串行 ----
   只做桌面（手机上是一单一卡，没有"扫行"这回事）；
   锁定行有自己的粉底，不参与斑马纹，hover 也用它的专色。 */
@media (min-width: 821px) {
  table.hall tbody tr[data-id]:not([data-locked="1"]):nth-child(even) > td { background: #f7f9fc; }
  table.hall tbody tr[data-id]:hover > td { background: #eef4fd; }
  table.hall tbody tr[data-locked="1"]:hover > td { background: #fdecec; }
}

/* ---- 小字对比度：11px #9ca3af 在白底上只有 2.5:1（WCAG 要 4.5:1）---- */
.last-balance-time { font-size: 12px; color: #6b7280; }
.text-muted { color: #6b7280; }
.empty { color: #6b7280; }
.history-loading, .history-empty { color: #6b7280; }

/* ---- 「只看我锁定的」开关 ---- */
.mine-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.mine-toggle:hover { background: #f3f4f6; color: #111827; }
.mine-toggle.active {
  background: #1f2937;
  border-color: #1f2937;
  color: #fff;
}
.mine-toggle .mine-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #4b5563;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mine-toggle.active .mine-count { background: #fff; color: #1f2937; }


/* ==========================================================================
   视觉规范统一（2026-10-11）
   --------------------------------------------------------------------------
   目标：从「十年前的表格后台」变成「安静的数据表」。三条纪律：
     ① 颜色收敛——中性灰阶为主，只留一个品牌蓝 + 两个语义色（红=需注意，绿=已完成）。
        黄（warn）不再作为按钮色，避免"一屏五六种颜色"。
     ② 按钮只有三级：主按钮(实心蓝) / 次按钮(白底描边) / 危险(描边，悬停才变红)。
     ③ 一套圆角与阴影；表头更轻、分隔线更淡、行高略松、数字用等宽。
   全部用 CSS 变量，深色模式在 dark.css 里只换变量值，两边不会漂。
   ========================================================================== */

:root {
  --c-bg: #f5f7fa;
  --c-surface: #ffffff;
  --c-surface-2: #fafbfd;      /* 表头 / 次级面 */
  --c-line: #eef1f6;           /* 行分隔线 */
  --c-line-2: #e3e8f0;         /* 卡片描边、表头下边 */
  --c-ink: #0f172a;            /* 主文字 */
  --c-ink-2: #475569;          /* 次要文字 */
  --c-ink-3: #7b8798;          /* 表头、时间、弱化 */
  --c-brand: #2563eb;
  --c-brand-weak: #eef4ff;
  --c-ok: #15803d;
  --c-danger: #dc2626;
  --c-danger-weak: #fef2f2;
  --c-bar: #141c2b;            /* 顶栏 */
  --r-card: 12px;
  --r-ctl: 8px;
  --sh-card: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
}

body { background: var(--c-bg); color: var(--c-ink); font-size: 14px; line-height: 1.5; }

/* ---------- 顶栏：更沉，按钮从"实心白药丸"降为幽灵按钮 ---------- */
.topbar {
  background: var(--c-bar);
  height: 58px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.topbar .brand { font-size: 17px; letter-spacing: .3px; }
.topbar nav { gap: 18px; }
.topbar a { color: #aab4c4; font-size: 13.5px; }
.topbar a:hover { color: #fff; }
.topbar .who { color: #8b95a6; font-size: 13px; }
.theme-toggle {
  padding: 5px 13px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: transparent;
  color: #cfd6e2;
  font-size: 12.5px;
}
.theme-toggle:hover { background: rgba(255, 255, 255, .10); color: #fff; }

/* 顶栏「接口余额」小胶囊（只有后台页面有）：点一下强制刷新。
   顶栏在深浅两种主题下都是深色，所以这里用固定色，不做 dark 覆盖。 */
.acct-bal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: transparent;
  color: #cfd6e2;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.acct-bal:hover { background: rgba(255, 255, 255, .10); color: #fff; }
.acct-bal .acct-bal-k { color: #8b95a6; }
.acct-bal:hover .acct-bal-k { color: #cfd6e2; }
.acct-bal .acct-bal-v { font-weight: 600; color: #eaf2ff; }
.acct-bal.is-loading { opacity: .65; cursor: progress; }
.acct-bal.is-low {
  border-color: rgba(255, 176, 74, .55);
  background: rgba(255, 158, 40, .14);
  color: #ffd9a3;
}
.acct-bal.is-low .acct-bal-k { color: #e0a966; }
.acct-bal.is-low .acct-bal-v { color: #ffcf8a; }

/* ---------- 导入进度条（后台：批量上传/发布订单时逐个查余额） ---------- */
.import-bar {
  margin-bottom: 14px;
  padding: 12px 15px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-brand);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
}
.imp-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--c-ink); }
.imp-dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-brand); animation: imp-pulse 1.1s ease-in-out infinite;
}
@keyframes imp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.imp-count { color: var(--c-ink-3); font-size: 12.5px; white-space: nowrap; }
.imp-close {
  margin-left: auto; border: none; background: transparent; cursor: pointer;
  color: var(--c-ink-3); font-size: 18px; line-height: 1; padding: 0 2px;
}
.imp-close:hover { color: var(--c-ink); }
.imp-track {
  height: 4px; margin-top: 9px; border-radius: 999px;
  background: var(--c-line); overflow: hidden;
}
.imp-fill { height: 100%; width: 0; background: var(--c-brand); transition: width .3s ease; }
.imp-fails { margin: 9px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--c-ink-2); }
.imp-fails li { margin: 2px 0; }
.import-bar.is-done { border-left-color: var(--c-ok); }
.import-bar.is-done .imp-dot { background: var(--c-ok); animation: none; }
.import-bar.is-done .imp-fill { background: var(--c-ok); }
.import-bar.is-abort { border-left-color: var(--c-danger); }
.import-bar.is-abort .imp-dot { background: var(--c-danger); animation: none; }
.import-bar.is-abort .imp-text { color: var(--c-danger); }
.import-bar.is-abort .imp-fill { background: var(--c-danger); }
html[data-theme="dark"] .import-bar { background: var(--c-surface); border-color: var(--c-line); }

/* ---------- 查询余额：页面中间的"正在查询"提示 ----------
   改按钮文字会让人以为按钮坏了/被锁；改成中间弹一个轻量提示，
   遮罩顺便挡住重复点击（同一户号查询中不再受理）。 */
.query-busy {
  /* 工具栏里的一枚小胶囊：不遮罩、不占位跳动 */
  position: static;
  inset: auto;
  transform: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, .25);
  background: rgba(37, 99, 235, .08);
  color: #1d4ed8;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: nowrap;
  pointer-events: none;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.query-busy[hidden] { display: none; }   /* 别忘了：上面的 display:flex 会盖掉 hidden */
.query-busy-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qb-spin {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--c-line-2);
  border-top-color: var(--c-brand);
  animation: qb-spin .7s linear infinite;
}
@keyframes qb-spin { to { transform: rotate(360deg); } }
html[data-theme="dark"] .query-busy { background: transparent; }

/* ---------- 右上角消息通知（到账金额有变化） ---------- */
.notice-box {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 75;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  pointer-events: none;                 /* 只有通知本身可点，别挡住下面的操作 */
}
.notice-item {
  pointer-events: none;                 /* 通知只提示、不拦点击（只有 × 能点），不挡下面的操作 */
  position: relative;
  padding: 11px 34px 11px 14px;
  border-radius: 12px;
  border: 1px solid #c9dcff;
  border-left: 3px solid var(--c-brand);
  background: var(--c-surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .16);
  font-size: 13px;
  color: var(--c-ink);
  line-height: 1.55;
  animation: notice-in .22s ease-out;
}
@keyframes notice-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.notice-title { font-weight: 600; color: var(--c-brand); margin-bottom: 2px; }
.notice-body { color: var(--c-ink-2); }
.notice-body b { color: var(--c-ok); }
.notice-close {
  pointer-events: auto;                 /* 只有关闭按钮可点 */
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: transparent;
  color: var(--c-ink-3);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}
.notice-close:hover { color: var(--c-ink); }
html[data-theme="dark"] .notice-item { border-color: #2c5c8f; background: var(--c-surface); }
html[data-theme="dark"] .notice-box { box-shadow: none; }

/* ---------- 🔔 通知中心（就在任务大厅那一行；未读角标 + 下拉列表） ---------- */
.notice-bell {
  position: relative;
  padding: 6px 12px;
  border: 1px solid var(--c-line-2);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-ink-2);
  font-size: 13px;
  cursor: pointer;
}
.notice-bell:hover { border-color: var(--c-brand); color: var(--c-brand); }
.notice-bell.has-unread { border-color: var(--c-brand); color: var(--c-brand); }
.notice-badge {
  display: inline-block;
  min-width: 17px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--c-danger);
  color: #fff;
  font-size: 11px;
  line-height: 17px;
  text-align: center;
  vertical-align: 1px;
}
/* 注意：上面的 display 会盖掉 hidden 属性，必须显式关掉（踩过一次） */
.notice-badge[hidden] { display: none; }
.notice-list {
  position: fixed;
  top: 66px;
  right: 16px;
  z-index: 76;
  width: 340px;
  max-height: 62vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-line);
  border-radius: 14px;
  background: var(--c-surface);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
  overflow: hidden;
}
.notice-list[hidden] { display: none; }
.notice-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-ink);
}
.notice-clear {
  border: none;
  background: transparent;
  color: var(--c-ink-3);
  font-size: 12.5px;
  cursor: pointer;
}
.notice-clear:hover { color: var(--c-danger); }
.notice-list-body { overflow-y: auto; }
.notice-row {
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-line);
  font-size: 13px;
  color: var(--c-ink-2);
  line-height: 1.55;
}
.notice-row:last-child { border-bottom: none; }
.notice-row.unread { background: var(--c-brand-weak); }
.notice-row b { color: var(--c-ok); }
.notice-warn { color: #b45309; }
html[data-theme="dark"] .notice-warn { color: #fbbf24; }
.notice-row-title { font-weight: 600; color: var(--c-ink); margin-bottom: 2px; }
.notice-row.unread .notice-row-title { color: var(--c-brand); }
.notice-row-time { display: block; margin-top: 3px; color: var(--c-ink-3); font-size: 11.5px; }
.notice-empty { padding: 18px 14px; text-align: center; color: var(--c-ink-3); font-size: 13px; }
html[data-theme="dark"] .notice-list { border-color: #2c5c8f; }

/* ---------- 分类 Tab：轨道更淡、选中更轻 ---------- */
.hall-tabs { background: #eef1f6; padding: 3px; border-radius: 999px; margin-bottom: 0; }
.hall-tab { padding: 7px 18px; font-size: 13.5px; border-radius: 999px; }
.hall-tab.active { box-shadow: 0 1px 2px rgba(16, 24, 40, .07); }
.hall-tab.active .tab-count { background: var(--c-bar); }
.tab-count { background: #e3e8f0; color: #64748b; height: 19px; font-size: 11.5px; }

/* ---------- 标题与说明 ---------- */
h1 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; }
.hall-head { margin-bottom: 4px; }
.hint { color: var(--c-ink-3); font-size: 12.5px; line-height: 1.7; margin: 4px 0 14px; }

/* ---------- 卡片类容器：一套圆角 + 一层阴影 ---------- */
.login-box, .error-box, .balance-form, .batch-example {
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
}

/* ---------- 表格：安静、清晰、有节奏 ---------- */
table.hall { border-radius: var(--r-card); box-shadow: var(--sh-card); }
table.hall thead th {
  background: var(--c-surface-2);
  color: var(--c-ink-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 11px 12px;
  border-bottom: 1px solid var(--c-line-2);
}
table.hall tbody td {
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--c-ink-2);
  border-bottom: 1px solid var(--c-line);
}
/* 斑马纹 / 悬停 / 锁定行底色都是桌面"扫行"用的，手机是一单一卡，别掺和 */
@media (min-width: 821px) {
  table.hall tbody tr[data-id]:not([data-locked="1"]):nth-child(even) > td { background: #fcfdfe; }
  table.hall tbody tr[data-id]:hover > td { background: #f4f8ff; }
  table.hall tbody tr[data-locked="1"] { background: #fffafa; }
  table.hall tbody tr[data-locked="1"] > td:first-child { box-shadow: inset 3px 0 0 #e5484d; }
}

/* 关键单元格的字重与色阶：账号最深、待充值次之、初始最轻、当前蓝、到账绿 */
.account-text { font-size: 14.5px; font-weight: 600; color: var(--c-ink); letter-spacing: .2px; }
table.hall td.c-pending { font-size: 15px; font-weight: 700; color: var(--c-ink); }
/* 数量类单元格统一中性色：蓝色只留给「当前余额」这个活数据，别再到处都是蓝的 */
table.hall td.num { color: var(--c-ink-2); }
table.hall td.c-init .last-balance:not(.neg):not(.pos) { color: var(--c-ink-3); font-weight: 500; font-size: 13px; }
table.hall td.c-cur .last-balance:not(.neg):not(.pos) { color: var(--c-brand); font-weight: 700; font-size: 14px; }
.last-balance.pos { color: var(--c-ok); font-weight: 700; }
.last-balance.neg { color: var(--c-danger); font-weight: 700; }
.last-balance-time { font-size: 11.5px; color: var(--c-ink-3); }
.btn-link-quiet { font-size: 11.5px; color: #9aa5b4; }
.btn-link-quiet:hover { color: var(--c-brand); }

/* 时间与行内链接并排一行：余额格从 3 行压回 2 行，整表节奏更稳（仅桌面） */
@media (min-width: 821px) {
  table.hall td.last-balance-cell .v,
  table.hall td.current-balance-cell .v {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: baseline;
    gap: 2px 8px;
  }
  table.hall td .v > .last-balance { flex: 1 1 100%; }
  table.hall td .v > .last-balance-time,
  table.hall td .v > .account-actions,
  table.hall td .v > .last-balance-actions { flex: 0 0 auto; margin-top: 0; }
}

/* ---------- 按钮只有三级 ---------- */
.btn {
  border-radius: var(--r-ctl);
  padding: 7px 14px;
  font-size: 13px;
  border: 1px solid var(--c-line-2);
  background: #fff;
  color: var(--c-ink-2);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: #f7f9fc; border-color: #cfd8e6; color: var(--c-ink); }
.btn.primary { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.btn.primary:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
/* 危险动作（下架 / 异常标记）：**平时完全安静**，悬停才变红。
   原来 23 行表格里 23 个红色按钮，红到没有意义——红色要留给"欠费/锁定"这些状态。 */
.btn.warn { color: var(--c-ink-2); border-color: var(--c-line-2); background: #fff; }
.btn.warn:hover { background: var(--c-danger-weak); border-color: #f0a9a2; color: #b42318; }
.col-qr .btn { color: var(--c-brand); border-color: #c9dcff; background: #fff; }
.col-qr .btn:hover { background: var(--c-brand-weak); border-color: var(--c-brand); text-decoration: none; }

/* 「查询余额」是充值员点得最多的动作，从"当前余额"下面的一行小灰字提到操作列的按钮位 */
.view-actions .btn.qb { color: var(--c-brand); border-color: #c9dcff; background: #fff; }
.view-actions .btn.qb:hover { background: var(--c-brand-weak); border-color: var(--c-brand); color: var(--c-brand); }
.btn.disabled, .btn-link.disabled { opacity: .5; pointer-events: none; }

/* 「复制 / 查看」两个按钮包成一组：桌面上居中成对出现，
   手机上整组被推到卡片右侧（td 是 space-between 的两栏），不会再一个飘中间一个贴边 */
.cell-btns { display: inline-flex; align-items: center; gap: 8px; }

/* 蓝色按钮由 .qb 自己决定，不再依赖"在哪个格子里"：
   这样四个操作按钮怎么挪位置，配色都不会跟着乱（复制/查询/查看 = 蓝，异常 = 安静灰） */
.btn.qb { color: var(--c-brand); border-color: #c9dcff; background: #fff; }
.btn.qb:hover { background: var(--c-brand-weak); border-color: var(--c-brand); color: var(--c-brand); }

/* 户号点一下复制：只加"可点"和反馈，字号/字重/颜色一律不动（基准量过：
   桌面 14.5px/700/ui-monospace、手机 19px/700，改完必须一模一样） */
.account-copy { cursor: pointer; }
.account-copy:hover, .account-copy:active { background: var(--c-brand-weak); border-radius: 4px; }
.account-copy:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; border-radius: 4px; }
/* 锁定行的户号是 `color:#dc2626 !important`，所以这里也得用 !important 才盖得住；
   只盖 0.9 秒，锁状态还有左侧红条在，不会看不出来 */
div.account-text.is-copied { background: rgba(16, 163, 74, .16); color: var(--c-ok) !important; border-radius: 4px; }
html[data-theme="dark"] .account-copy:hover,
html[data-theme="dark"] .account-copy:active { background: rgba(90, 162, 255, .16); }
html[data-theme="dark"] div.account-text.is-copied { background: rgba(16, 163, 74, .22); }

/* ---------- 徽章与标签 ---------- */
.badge, .badge.locked, .badge.mine {
  background: var(--c-danger-weak);
  color: #b42318;
  border: 1px solid #f6cdc9;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
}
.tag-debt { border-radius: 5px; font-size: 10.5px; }
.abn-badge { border-radius: 5px; }
.abn-reason { font-size: 11px; }

/* ---------- 合计行 ---------- */
table.hall tr.hall-total td {
  background: var(--c-surface-2);
  border-top: 1px solid var(--c-line-2);
  color: var(--c-ink-2);
  font-size: 13px;
}

/* ---------- 开关与状态 ---------- */
.mine-toggle { border-color: var(--c-line-2); color: var(--c-ink-2); font-size: 12.5px; padding: 6px 13px; }
.mine-toggle.active { background: var(--c-bar); border-color: var(--c-bar); color: #fff; }
.net-status { border-color: var(--c-line-2); color: var(--c-ink-3); font-size: 11.5px; }


/* ==========================================================================
   列宽与对齐修正（2026-10-11 深夜）
   --------------------------------------------------------------------------
   问题（量出来的，不是猜的）：
     · 表格 1468px 宽、内容只占 ~1200px，多出来的宽度被"平均吸收"到每一列：
       「当前余额」列被撑到 223px（内容仅 92px，131px 全空）、「待充值」空 99px、「锁定」空 95px
       —— 视觉上就是"中间一大片空的"。
     · 「待充值金额」被 A 组设成了右对齐，而表头是居中 → 文字偏离中轴 38px。
   改法：① 表格按内容收紧并居中（多余的宽度不再摊给各列）
        ② 数字列全部回到居中，表头与内容同一条中轴
   ⚠️ 整段必须只在桌面生效：手机上表格是"一单一卡"，td 被当成一行来排版，
      给 td 定宽会把整行压窄（2026-10-11 23:39 那版就踩了这个坑，手机端卡片被压歪）。
   ========================================================================== */
@media (min-width: 821px) {

  /* ① 贴合内容 + 居中；min-width: 1040px 仍然保留，窗口窄了照旧横向滚动 */
  table.hall { width: auto; margin-left: auto; margin-right: auto; }

  /* ② 数字列：表头与数字都居中（覆盖 A 组的右对齐） */
  table.hall th.num-h,
  table.hall td.c-pending,
  table.hall td.c-init,
  table.hall td.c-cur,
  table.hall td.c-arrive { text-align: center; }

  /* 余额格里的三行（数字 / 时间 / 链接）也一起居中，别一格一个样 */
  table.hall td.last-balance-cell .v,
  table.hall td.current-balance-cell .v { justify-content: center; }
  table.hall td .v > .last-balance { text-align: center; }
  table.hall td.c-cur .account-actions,
  table.hall td.c-arrive .last-balance-actions { justify-content: center; }

  /* ③ 把两列多余的空白收掉：它们的宽度不是内容决定的，
        「当前余额」被 flex 基准值撑到 178px（内容只有 92px）、「锁定」被"已锁定（某某）"徽章撑开 */
  table.hall td.c-cur { width: 132px; }
  table.hall td.c-lock { width: 118px; }
}

/* 订单归属：淡淡的小标签，名字长了省略号 */
.owner-tag {
  display: inline-block; max-width: 120px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 8px; border-radius: 999px;
  font-size: 12px; line-height: 1.5;
  background: #eef4ff; color: #2563eb; border: 1px solid #c9dcff;
}
.owner-h { white-space: nowrap; }
body.dark .owner-tag { background: rgba(37,99,235,.18); color: #93c5fd; border-color: rgba(147,197,253,.35); }

/* 余额三列：任何窗口宽度都居中（之前窄窗口会变成右对齐，一格一个样） */
table.hall td.c-init,
table.hall td.c-cur,
table.hall td.c-arrive,
table.hall td.c-init .v,
table.hall td.c-cur .v,
table.hall td.c-arrive .v,
table.hall td .v > .last-balance,
table.hall td .last-balance-time { text-align: center; }
table.hall td.c-init .v,
table.hall td.c-cur .v,
table.hall td.c-arrive .v { justify-content: center; align-items: center; }
/* 导航上的待审核红点 */
.nav-badge {
  display: inline-block; min-width: 17px; margin-left: 4px; padding: 0 5px;
  border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px;
  line-height: 17px; text-align: center; vertical-align: 1px;
}
/* 查询失败原因：留在行上，别只闪一下 toast */
.query-error {
  max-width: 160px; margin: 3px auto 0;
  font-size: 11px; line-height: 1.45; color: #dc2626;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.dark .query-error { color: #fca5a5; }


/* ==================== 管理端整理（admin-app） ==================== */
body.admin-app {
  background: #f4f6fa;
}
body.admin-app .container {
  max-width: 1360px;
  padding: 0 18px 40px;
}

/* —— 顶部标签：做成胶囊卡片 —— */
body.admin-app .hall-tabs {
  display: inline-flex;
  gap: 4px;
  background: #fff;
  padding: 5px;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
  margin: 14px 0 12px;
}
body.admin-app .hall-tab {
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 14px;
  color: #475569;
}
body.admin-app .hall-tab:hover { background: #f1f5f9; }
body.admin-app .hall-tab.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, .28);
}
body.admin-app .hall-tab.active .tab-count {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}
body.admin-app .tab-count {
  background: #eef2f7; color: #475569;
  border-radius: 999px; padding: 1px 8px; font-size: 12px; margin-left: 6px;
}

/* —— 标题行 —— */
body.admin-app .hall-head { margin: 2px 0 10px; }
body.admin-app .hall-head h1 { font-size: 24px; letter-spacing: .3px; }

/* —— 工具栏：一张卡片，按钮统一 —— */
body.admin-app .admin-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: #fff; padding: 10px 12px; border-radius: 14px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
  margin: 0 0 12px;
}
body.admin-app .admin-actions a { margin-right: 0; }
body.admin-app .btn {
  padding: 8px 13px; font-size: 13.5px; border-radius: 9px;
  border: 1px solid #e2e8f0; background: #fff; color: #334155;
  line-height: 1.2;
}
body.admin-app .btn.primary {
  background: #2563eb; border-color: #2563eb; color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .25);
}
body.admin-app .btn.ghost {
  background: #fff; border-color: #e2e8f0; color: #475569; box-shadow: none;
}
body.admin-app .btn.ghost:hover { background: #f8fafc; border-color: #cbd5e1; color: #0f172a; }
body.admin-app .btn.warn { background: #fff; border-color: #e2e8f0; color: #b42318; }
body.admin-app .btn.warn:hover { background: #fef2f2; border-color: #fecaca; }

/* 搜索框靠右 */
body.admin-app .admin-search { margin-left: auto; display: flex; }
body.admin-app .admin-search input[type="text"] {
  width: 240px; padding: 8px 12px; font-size: 13.5px;
  border: 1px solid #e2e8f0; border-right: 0; border-radius: 9px 0 0 9px;
  outline: none; background: #fbfcfe;
}
body.admin-app .admin-search input[type="text"]:focus { border-color: #93b4fb; background: #fff; }
body.admin-app .admin-search .btn { border-radius: 0 9px 9px 0; }

/* —— 统计：四张小卡 —— */
body.admin-app .stats-bar {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; background: transparent; border: 0; padding: 0; margin: 0 0 12px;
  box-shadow: none;
}
body.admin-app .stat-item {
  background: #fff; border-radius: 13px; padding: 11px 14px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
  display: flex; flex-direction: column; gap: 1px;
}
body.admin-app .stat-label { font-size: 12px; color: #6b7280; }
body.admin-app .stat-value { font-size: 22px; font-weight: 700; color: #0f172a; letter-spacing: -.2px; }
body.admin-app .stat-unit { font-size: 12px; color: #94a3b8; }
body.admin-app .stat-item:first-child .stat-value { color: #dc2626; }

/* —— 批量操作面板 —— */
body.admin-app .batch-actions {
  background: #eff6ff; border: 1px solid #dbeafe; border-radius: 12px;
  padding: 10px 12px; margin: 0 0 12px;
}

/* —— 表格：更紧凑、表头固定、斑马纹 —— */
body.admin-app table.hall {
  border-radius: 14px; box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
  border-collapse: separate; border-spacing: 0; overflow: visible;
}
body.admin-app table.hall thead th {
  position: sticky; top: 0; z-index: 3;
  background: #f8fafc; color: #475569; font-size: 12.5px; font-weight: 700;
  padding: 10px 12px; border-bottom: 1px solid #e8edf5; white-space: nowrap;
}
body.admin-app table.hall tbody td {
  padding: 9px 12px; font-size: 13.5px; color: #1f2937;
  border-bottom: 1px solid #f1f5f9;
}
body.admin-app table.hall tbody tr:nth-child(even) { background: #fbfcfe; }
body.admin-app table.hall tbody tr:hover { background: #f4f8ff; }
body.admin-app table.hall td.num, body.admin-app table.hall th.num-h { text-align: right; }
body.admin-app table.hall .btn-link-quiet { font-size: 11.5px; }
body.admin-app table.hall td.c-pending { font-size: 14.5px; font-weight: 700; }

/* 行内小按钮更紧凑 */
body.admin-app table.hall .btn {
  padding: 5px 10px; font-size: 12.5px; border-radius: 8px;
}
body.admin-app table.hall .col-view .btn { margin-left: 4px; }

/* —— 上传审核页：分区块更像卡片 —— */
body.admin-app .up-hint { color: #6b7280; font-size: 12.5px; line-height: 1.7; }
body.admin-app h2 {
  font-size: 17px; color: #0f172a; margin: 22px 0 8px; padding-left: 10px;
  border-left: 4px solid #2563eb; line-height: 1.3;
}
body.admin-app .admin-table {
  background: #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
  border-collapse: separate; border-spacing: 0; overflow: hidden;
}
body.admin-app .admin-table th {
  background: #f8fafc; color: #475569; font-size: 12.5px; padding: 10px 12px;
  border-bottom: 1px solid #e8edf5; text-align: left;
}
body.admin-app .admin-table td {
  padding: 9px 12px; font-size: 13.5px; border-bottom: 1px solid #f1f5f9;
}
body.admin-app .admin-table tr:hover td { background: #f8fbff; }
body.admin-app .up-status {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
body.admin-app .up-status.approved { background: #ecfdf5; color: #047857; }
body.admin-app .up-status.rejected { background: #fef2f2; color: #b42318; }
body.admin-app .up-who { font-size: 11.5px; color: #94a3b8; }
body.admin-app .up-empty {
  background: #fff; border-radius: 14px; padding: 26px; text-align: center;
  color: #94a3b8; font-size: 13.5px; box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}
body.admin-app .batch-bar {
  background: #fff; border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

/* —— 手机 —— */
@media (max-width: 900px) {
  body.admin-app .stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.admin-app .admin-search { margin-left: 0; width: 100%; }
  body.admin-app .admin-search input[type="text"] { flex: 1; width: auto; }
  body.admin-app .container { padding: 0 10px 30px; }
  body.admin-app table.hall { min-width: 900px; }
}


/* 权限小标签 / 文字按钮（上传审核页） */
body.admin-app .up-perm { white-space: normal; min-width: 190px; }
body.admin-app .perm-chip {
  display: inline-block; padding: 1px 8px; margin-right: 4px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; background: #eef2ff; color: #1e3a8a;
}
body.admin-app .perm-form { display: inline; }
body.admin-app .perm-link {
  border: 0; background: none; padding: 0 2px; margin-right: 6px;
  font-size: 12px; color: #6b7280; cursor: pointer; text-decoration: underline;
}
body.admin-app .perm-link:hover { color: #2563eb; }


/* ---- 管理端第二遍：再降噪 ---- */
/* 标题左对齐、更小 */
body.admin-app .hall-head { text-align: left; margin: 2px 0 8px; }
body.admin-app .hall-head h1 { font-size: 20px; color: #0f172a; }

/* 行内的小链接默认淡出，鼠标移到行上才显示（手机端始终显示） */
body.admin-app table.hall tbody .btn-link-quiet {
  opacity: 0; transition: opacity .12s ease; font-size: 11px;
}
body.admin-app table.hall tbody tr:hover .btn-link-quiet { opacity: 1; }
@media (hover: none) {
  body.admin-app table.hall tbody .btn-link-quiet { opacity: .85; }
}

/* 行更紧凑 */
body.admin-app table.hall tbody td { padding: 7px 10px; }
body.admin-app table.hall thead th { padding: 9px 10px; }
body.admin-app table.hall .last-balance-time { font-size: 11px; color: #9aa5b4; }

/* 操作列按钮：只突出「下架」，其余走 ghost */
body.admin-app table.hall .col-view .btn { padding: 4px 9px; font-size: 12px; }


/* 标题强制左对齐（覆盖老规则） */
body.admin-app .hall-head,
body.admin-app .hall-head h1 {
  text-align: left !important;
  float: none !important;
  margin-left: 0 !important;
}
body.admin-app .hall-head h1 { font-size: 18px; font-weight: 700; color: #334155; }


/* 管理端：去掉重复的右上大标题（导航里已经有「订单列表」） */
body.admin-app .hall-head { display: none !important; }


/* 订单归属可点击筛选 */
body.admin-app .owner-link {
  color: #2563eb; text-decoration: none; border-bottom: 1px dashed #bcd0fb;
}
body.admin-app .owner-link:hover { color: #1d4ed8; border-bottom-style: solid; }
body.admin-app .owner-filter {
  display: flex; align-items: center; gap: 10px;
  background: #eff6ff; border: 1px solid #dbeafe; border-radius: 12px;
  padding: 9px 14px; margin: 0 0 10px; font-size: 13.5px; color: #1e3a8a;
}
body.admin-app .owner-filter a { color: #2563eb; margin-left: auto; text-decoration: none; }

/* 手工矫正到账金额 */
.tag-manual {
  display: inline-block; margin-left: 5px; padding: 0 5px;
  border-radius: 6px; font-size: 11px; line-height: 16px;
  background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa;
  vertical-align: middle;
}
.arrive-form { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 16px; }
.arrive-form label { font-size: 13px; color: #374151; }
.arrive-form input[type=number] {
  width: 100%; padding: 9px 11px; font-size: 15px;
  border: 1px solid #d1d5db; border-radius: 8px; box-sizing: border-box;
}
.arrive-form input[type=number]:focus {
  outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.arrive-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #374151; }
.arrive-hint { font-size: 12px; color: #6b7280; line-height: 1.5; }
.arrive-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* 手工矫正到账金额：深色主题 */
html[data-theme="dark"] .arrive-form label,
html[data-theme="dark"] .arrive-check { color: #d1d5db; }
html[data-theme="dark"] .arrive-hint { color: #9ca3af; }
html[data-theme="dark"] .arrive-form input[type=number] {
  background: #1f2937; border-color: #374151; color: #e5e7eb; }
html[data-theme="dark"] .tag-manual {
  background: rgba(251,146,60,.16); color: #fdba74; border-color: rgba(251,146,60,.45); }

/* 操作列：表头居中，按钮也要居中，否则看起来像整列往左偏 */
table.hall .view-actions {
  justify-content: center;
  align-items: center;
}

/* 燃气行：已充值小字，跟在登记按钮后面 */
.gas-fill { display: flex; align-items: center; gap: 6px; }
.gas-applied { font-size: 11.5px; color: #64748b; white-space: nowrap; }

/* 进度条上的「停止」按钮 */
.imp-stop {
  margin-left: 8px; padding: 3px 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid #fca5a5; background: #fff1f2; color: #dc2626;
  font-size: 12.5px; line-height: 1.4;
}
.imp-stop:hover { background: #ffe4e6; }
.imp-stop:disabled { opacity: .6; cursor: default; }
