/* 业务中台 · PC 管理端 · 成品视觉 2026-10-23 · Brief v5-ui-visual */
:root {
  --ink: #0F1C2E;
  --ink-2: #1E2F45;
  --brand: #1B4F8A;
  --brand-soft: #E8F0F8;
  --accent: #0D7A5F;
  --warn: #B45309;
  --danger: #B42318;
  --surface: #F4F6F9;
  --card: #FFFFFF;
  --line: #D8DEE8;
  --muted: #5B6B7C;
  --test-bar: #5C4B1E;
  --test-fg: #F5E6C8;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15,28,46,.06), 0 4px 12px rgba(15,28,46,.04);
  --space: 8px;
  /* 经营看板 KPI / 柔线 token（两端共用命名） */
  --kpi-ink: #0F172A;
  --kpi-amt: #334155;
  --kpi-label: #64748B;
  --kpi-surface: #F4F6F8;
  --kpi-card: #FFFFFF;
  --kpi-rail-apply: #4A6FA5;
  --kpi-rail-reject: #A65D57;
  --kpi-rail-loan: #3D8B74;
  --kpi-rail-pass: #6B7BB5;
  --kpi-rail-pass-n: #5A6FA8;
  --kpi-rail-silent: #B0893E;
  --kpi-rail-pending: #C47A2C;
  --trend-apply: #5B7C99;
  --trend-loan: #5A9A86;
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--surface); color: var(--ink); min-height: 100%; font-size: 14px; line-height: 1.5; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); text-align: center; padding: 28px 12px !important; font-size: 13px; }

/* —— 测试环境条（专业橄榄，勿廉价黄红） —— */
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; vertical-align: middle; }
.badge.env {
  background: var(--test-bar); color: var(--test-fg);
  letter-spacing: .02em; font-weight: 600; border-radius: 4px; padding: 3px 8px;
}
.badge.紧急 { background: #FDE8E6; color: var(--danger); }
.badge.重要 { background: #FEF3E2; color: var(--warn); }
.badge.普通 { background: var(--brand-soft); color: var(--brand); }

/* —— 登录 —— */
.login-wrap {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; background: var(--surface);
}
.env-banner { margin-bottom: 12px; }
.login-card {
  width: min(400px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 28px 24px; box-shadow: var(--shadow);
}
.login-card h1 { margin: 0 0 8px; font-size: 22px; font-weight: 600; color: var(--ink); }
.login-card .hint { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0 0 16px; }
.login-card label, .modal-card label {
  display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; font-weight: 500;
}
.login-card input, .modal-card input, .modal-card select,
.filters input, .filters select, .form-row input, .form-row select,
.export-box select, #import-file, #period-reason, #period-month {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 13px; background: #fff; color: var(--ink);
}
.login-card input:focus, .filters input:focus, .filters select:focus,
.modal-card input:focus, .modal-card select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,79,138,.12);
}
.login-err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 1.2em; }

/* —— 按钮层级 —— */
button, .primary, .ghost {
  font-family: inherit; cursor: pointer; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; padding: 8px 14px; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
button.primary, .primary, .login-card .primary {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
button.primary:hover, .primary:hover { background: #163f6e; }
.login-card .primary { width: 100%; margin-top: 16px; padding: 11px; font-size: 14px; }
button.ghost, .ghost {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
}
button.ghost:hover, .ghost:hover { background: var(--brand-soft); border-color: #b8c9dc; }
button.danger, .danger-btn {
  background: #FDE8E6; color: var(--danger); border: 1px solid #f0c4bf;
}
button:disabled { opacity: .5; cursor: not-allowed; }

/* —— 布局 · 侧栏 —— */
.layout { display: flex; min-height: 100vh; }
.side {
  width: 228px; background: var(--ink); color: #E2E8F0; flex-shrink: 0;
  display: flex; flex-direction: column; padding: 0; overflow-y: auto;
  max-height: 100vh; position: sticky; top: 0;
}
.side .logo {
  padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.side .logo .brand-name { font-weight: 700; font-size: 15px; color: #fff; letter-spacing: .02em; }
.side .logo .brand-sub { display: block; font-size: 11px; font-weight: 400; color: #94A3B8; margin-top: 4px; }
.side .logo .env-slot { margin-top: 10px; }
.nav-group {
  padding: 16px 16px 4px; font-size: 11px; color: #7A8BA0;
  letter-spacing: .06em; font-weight: 600;
}
.nav-btn {
  text-align: left; border: none; background: transparent; color: #CBD5E1;
  padding: 9px 16px 9px 13px; font-size: 13px; cursor: pointer; width: 100%;
  border-left: 3px solid transparent; font-weight: 500;
}
.nav-btn:hover { background: var(--ink-2); color: #fff; }
.nav-btn.active {
  background: rgba(27,79,138,.35); color: #fff;
  border-left-color: #5B9BD5; font-weight: 600;
}
.side-foot { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); margin-top: auto; }
.side-foot .ghost {
  margin-top: 8px; width: 100%; padding: 7px;
  border: 1px solid rgba(255,255,255,.18); background: transparent; color: #CBD5E1;
}
.side-foot .ghost:hover { background: var(--ink-2); }

.main { flex: 1; overflow: auto; padding: 20px 24px 32px; position: relative; min-width: 0; }
.pane { display: none; }
.pane.active { display: block; }

.page-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.page-head h1 { margin: 0 0 4px; font-size: 20px; font-weight: 600; color: var(--ink); }
.head-actions { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
label.inline { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 500; }
label.inline select { min-width: 100px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; border: 1px solid var(--line);
}
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.page-title h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }

/* —— 成品筛选条（F&I SaaS 顶栏） —— */
.filters, .filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  background: var(--card); padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); margin-bottom: 16px; box-shadow: var(--shadow);
}
.filter-bar.sticky {
  position: sticky; top: 0; z-index: 8;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
}
.filters label, .filter-bar label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 11px; color: var(--muted); min-width: 118px; font-weight: 500;
}
.filter-bar .filter-actions { display: flex; gap: 8px; align-items: end; margin-left: auto; }
.filter-hint { flex: 1 1 100%; font-size: 11px; color: var(--muted); margin: 0; padding-top: 2px; }

/* —— KPI 大卡 —— */
.kpi-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand);
}
.kpi.tone-accent::before { background: var(--accent); }
.kpi.tone-brand::before { background: var(--brand); }
.kpi.tone-ink::before { background: var(--ink); }
.kpi.tone-warn::before { background: var(--warn); }
.kpi .kpi-top { display: flex; justify-content: space-between; align-items: flex-start; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi .ico {
  width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--brand); flex-shrink: 0;
}
.kpi.tone-accent .ico { background: #E6F4EF; color: var(--accent); }
.kpi.tone-ink .ico { background: #E8ECF0; color: var(--ink); }
.kpi .value {
  font-size: 28px; font-weight: 700; margin-top: 8px; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.15;
}
.kpi.tone-accent .value { color: var(--accent); }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* —— 表格 —— */
.table-wrap { overflow: auto; max-height: 60vh; border-radius: 6px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table th {
  color: var(--muted); font-weight: 600; font-size: 12px;
  background: #F8FAFC; position: sticky; top: 0; z-index: 1;
}
.table tbody tr:nth-child(even) td { background: #FAFBFC; }
.table tr.demo td { color: #9CA3AF; background: #F9FAFB; }
.table tr:hover td { background: var(--brand-soft) !important; }
.table tr.active td { background: #DCE8F4 !important; }
.table tr.clickable { cursor: pointer; }

.st {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  font-weight: 600; background: var(--brand-soft); color: var(--brand);
}
.st.bad { background: #FDE8E6; color: var(--danger); }
.st.warn { background: #FEF3E2; color: var(--warn); }
.st.ok { background: #E6F4EF; color: var(--accent); }
.st.info { background: var(--brand-soft); color: var(--brand); }

/* —— 图表 —— */
.bar-chart {
  display: flex; align-items: flex-end; gap: 6px; height: 160px; padding: 8px 0 0;
}
.bar-chart .col {
  flex: 1; text-align: center; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; min-width: 0;
}
.bar-chart .bar {
  background: linear-gradient(180deg, #5B9BD5, var(--brand));
  border-radius: 4px 4px 0 0; width: 60%; margin: 0 auto; min-height: 2px;
}
.bar-chart .lab { font-size: 10px; color: var(--muted); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.split { display: flex; gap: 16px; align-items: flex-start; }
.detail-panel { flex: 1; min-width: 280px; max-height: 70vh; overflow: auto; font-size: 13px; }
.detail-panel .section { margin: 14px 0 6px; font-weight: 700; font-size: 13px; color: var(--ink); }
.detail-panel .kv { display: grid; grid-template-columns: 96px 1fr; gap: 4px 8px; margin-bottom: 8px; }
.detail-panel .kv .k { color: var(--muted); }

.form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.form-row label { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
.form-row input, .form-row select { min-width: 120px; width: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.form-grid label { margin: 0; }

.export-box { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.export-box label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 500; }
.export-box select { min-width: 260px; }
.export-result {
  flex: 1 1 100%; margin-top: 4px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: #F8FAFC; border: 1px dashed var(--line); font-size: 13px; line-height: 1.6;
}
.export-result.ok { background: #E6F4EF; border-color: #A7D7C5; color: var(--accent); }
.export-result.err { background: #FDE8E6; border-color: #F0C4BF; color: var(--danger); }

.toast {
  position: fixed; top: 16px; right: 16px; z-index: 40;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px;
  font-size: 13px; box-shadow: var(--shadow); max-width: min(420px, 90vw);
}
.toast.err { background: var(--danger); }
.toast.ok { background: var(--accent); }

.modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(15,28,46,.48);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-card {
  background: #fff; border-radius: 12px; padding: 20px; width: 100%; max-width: 420px;
  max-height: 90vh; overflow: auto; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.modal-card.wide { max-width: 760px; }
.with-suffix { display: flex; align-items: center; gap: 6px; }
.with-suffix input { flex: 1; }
.with-suffix .suffix { color: var(--muted); font-weight: 650; min-width: 2.2em; }
.form-grid .full { grid-column: 1 / -1; }
.modal-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.code-box {
  background: var(--ink); color: #E2E8F0; padding: 12px; border-radius: var(--radius-sm);
  font-size: 12px; overflow: auto; max-height: 240px; white-space: pre-wrap;
}
.placeholder { line-height: 1.65; }
.placeholder code { background: #F1F5F9; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.action-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.action-btns button { font-size: 12px; padding: 6px 10px; }
.timeline { border-left: 2px solid #C5D8EC; margin: 8px 0 8px 6px; padding-left: 12px; }
.timeline .item { margin-bottom: 8px; }
.timeline .t { font-size: 11px; color: var(--muted); }

.app-topstrip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: -20px -24px 16px; padding: 8px 24px;
  background: var(--test-bar); color: var(--test-fg); font-size: 12px; font-weight: 500;
}
.app-topstrip .right { opacity: .9; }

@media (max-width: 1100px) {
  .grid-2, .grid-3, .split { grid-template-columns: 1fr; flex-direction: column; }
}
@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .side { width: 100%; max-height: none; position: static; flex-direction: row; flex-wrap: wrap; }
  .nav-group { display: none; }
  .nav-btn { width: auto; border-left: none; border-bottom: 3px solid transparent; }
  .nav-btn.active { border-bottom-color: #5B9BD5; border-left-color: transparent; }
  .filter-bar.sticky { position: static; }
  .kpi .value { font-size: 22px; }
}


/* —— 页脚备案（低调） —— */
.site-foot {
  margin-top: 16px; text-align: center; font-size: 11px; color: var(--muted);
  line-height: 1.5;
}
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--brand); text-decoration: underline; }
.side-foot .site-foot { margin-top: 10px; text-align: left; opacity: .85; }

/* —— 双系列月趋势 —— */
.chart-legend { display: flex; gap: 14px; margin: 0 0 6px; font-size: 11px; color: var(--muted); }
.chart-legend .lg::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  margin-right: 5px; vertical-align: -1px;
}
.chart-legend .lg.loan::before { background: var(--brand); }
.chart-legend .lg.profit::before { background: var(--accent); }
.bar-chart.dual .pair {
  display: flex; align-items: flex-end; justify-content: center; gap: 3px;
  height: 100%; flex: 1; min-width: 0;
}
.bar-chart.dual .pair .bar { width: 42%; margin: 0; }
.bar-chart.dual .pair .bar.loan { background: linear-gradient(180deg, #5B9BD5, var(--brand)); }
.bar-chart.dual .pair .bar.profit { background: linear-gradient(180deg, #4DB896, var(--accent)); }
.bar-chart.dual .col .lab { margin-top: 6px; }

/* —— 品牌横向条 —— */
.hbar-chart { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.hbar-chart .row { display: grid; grid-template-columns: 72px 1fr 88px; gap: 8px; align-items: center; font-size: 12px; }
.hbar-chart .name { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.hbar-chart .track { height: 10px; background: #EEF2F7; border-radius: 999px; overflow: hidden; }
.hbar-chart .fill { height: 100%; background: linear-gradient(90deg, var(--brand), #5B9BD5); border-radius: 999px; min-width: 2px; }
.hbar-chart .val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* —— 政策影响摘要 —— */
.impact-box { margin: 10px 0 12px; }
.impact-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; margin-bottom: 10px;
}
.impact-card {
  background: #F8FAFC; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
.impact-card .k { font-size: 11px; color: var(--muted); font-weight: 500; }
.impact-card .v { font-size: 20px; font-weight: 700; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.impact-card .v.pos { color: var(--accent); }
.impact-card .v.neg { color: var(--danger); }
.impact-details { margin-top: 6px; }
.impact-details summary {
  cursor: pointer; font-size: 12px; color: var(--brand); font-weight: 500; user-select: none;
}
.impact-details pre.code-box {
  margin-top: 8px; max-height: 220px; overflow: auto; font-size: 11px;
  background: #0F1C2E; color: #E8EEF5; padding: 10px; border-radius: 8px;
}
.export-note {
  flex: 1 1 100%; margin: 0; font-size: 12px; color: var(--warn); line-height: 1.5;
}

/* 驾驶舱 KPI 2026-10-23 */
.rank-controls { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 10px; align-items:flex-end; }
.rank-controls label { font-size:12px; color:var(--muted); display:flex; flex-direction:column; gap:4px; }
.rank-controls select { min-width:120px; }
.crumb { display:flex; flex-wrap:wrap; align-items:center; gap:4px; margin:0 0 8px; font-size:12px; }
.crumb-btn { border:1px solid var(--line); background:#fff; border-radius:999px; padding:2px 10px; cursor:pointer; color:var(--brand); font-size:12px; }
.crumb-btn:hover { background:var(--brand-soft); }
.crumb-sep { color:var(--muted); padding:0 2px; }
tr.row-link:hover td { background:#F0F6FC; }

.kpi.clickable { cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.kpi.clickable:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(27,79,138,.12); }
.kpi.tone-warn .value { color: var(--warn); }

/* —— 客户台账多维表 —— */
.ledger-card { padding: 0; overflow: hidden; }
.ledger-wrap {
  max-height: calc(100vh - 280px); overflow: auto;
  border-radius: 0; position: relative;
}
.ledger-table { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.ledger-table th, .ledger-table td {
  padding: 8px 10px; font-size: 12px; border-bottom: 1px solid var(--line);
  border-right: 1px solid #EEF2F6; background: #fff;
}
.ledger-table th {
  position: sticky; top: 0; z-index: 3;
  background: #F1F5F9; color: var(--muted); font-weight: 600;
  cursor: pointer; user-select: none; white-space: nowrap;
}
.ledger-table th:hover { color: var(--brand); }
.ledger-table th .sort-ind { margin-left: 4px; opacity: .45; font-size: 10px; }
.ledger-table th.sorted .sort-ind { opacity: 1; color: var(--brand); }
.ledger-table tbody tr:nth-child(even) td { background: #FAFBFC; }
.ledger-table tbody tr:hover td { background: var(--brand-soft) !important; }
.ledger-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-table .dash { color: var(--muted); }

/* 左冻结：订单日期｜客户｜门店｜状态 */
.ledger-table th.freeze, .ledger-table td.freeze {
  position: sticky; z-index: 2; background: #fff;
  box-shadow: 2px 0 0 #E2E8F0;
}
.ledger-table th.freeze { z-index: 4; background: #F1F5F9; }
.ledger-table tbody tr:nth-child(even) td.freeze { background: #FAFBFC; }
.ledger-table tbody tr:hover td.freeze { background: var(--brand-soft) !important; }
.ledger-table .freeze-0 { left: 0; min-width: 96px; width: 96px; }
.ledger-table .freeze-1 { left: 96px; min-width: 88px; width: 88px; }
.ledger-table .freeze-2 { left: 184px; min-width: 100px; width: 100px; }
.ledger-table .freeze-3 { left: 284px; min-width: 76px; width: 76px; }

.ledger-foot {
  display: block;
  margin-top: 10px; padding: 10px 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13px; font-weight: 500; color: var(--ink);
}
.ledger-foot .lg-sum-top { margin-bottom: 6px; }
.ledger-foot .lg-sum-line { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 6px; }
.ledger-foot .lg-metric i { font-style: normal; color: var(--muted); font-weight: 500; margin-right: 4px; }
.ledger-foot .lg-metric b { font-variant-numeric: tabular-nums; font-weight: 650; }
.ledger-foot .muted { font-weight: 400; display: block; margin: 2px 0 0; }

.ledger-col-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.ledger-col-checks {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 12px;
  max-height: 220px; overflow: auto; font-size: 12px;
}
.ledger-col-checks label {
  display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 500; color: var(--ink);
  cursor: pointer;
}
.ledger-col-checks input { width: auto; margin: 0; }


/* —— 进件/放款双折线（经营看板） —— */
.trend-controls {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
  margin: 0 0 10px; font-size: 12px;
}
.trend-controls .seg {
  display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: #F8FAFC;
}
.trend-controls .seg button {
  border: 0; background: transparent; padding: 5px 12px; font-size: 12px;
  color: var(--muted); cursor: pointer; margin: 0; border-radius: 0;
}
.trend-controls .seg button.active {
  background: var(--brand); color: #fff; font-weight: 600;
}
.trend-controls .trend-lab {
  display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); font-weight: 500;
}
.trend-controls .trend-lab input,
.trend-controls .trend-lab select {
  min-width: 110px; padding: 5px 8px; font-size: 12px;
}
.chart-legend .lg.apply::before { background: var(--brand); }
.chart-legend .lg.loan-n::before { background: var(--accent); }
.line-chart {
  width: 100%; height: 240px; position: relative;
  background: linear-gradient(180deg, #F8FBFE 0%, #fff 60%);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.line-chart svg {
  width: 100%; height: 240px; display: block;
}
.line-chart .empty-hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px;
}
.line-chart .tip {
  position: absolute; pointer-events: none; z-index: 2;
  background: var(--ink); color: #fff; font-size: 11px; line-height: 1.4;
  padding: 6px 8px; border-radius: 6px; white-space: nowrap;
  transform: translate(-50%, -120%); box-shadow: var(--shadow);
  display: none;
}

/* —— 从月到月点选器（经营看板趋势） —— */
.mrp-wrap { position: relative; }
.mrp-field-lab { font-size: 11px; color: var(--muted); font-weight: 500; display: block; margin-bottom: 2px; }
.mrp { position: relative; display: inline-block; vertical-align: top; }
.mrp-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 176px; padding: 7px 12px; font-size: 12px;
  border: 1px solid var(--brand); border-radius: 8px;
  background: linear-gradient(180deg, #F5F9FD 0%, #EAF2FB 100%);
  color: var(--ink); cursor: pointer; font-weight: 600;
  user-select: none; -webkit-user-select: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  caret-color: transparent;
}
.mrp-trigger:hover { border-color: var(--brand); background: #E8F1FB; }
.mrp-trigger:focus { outline: 2px solid rgba(74,111,165,0.35); outline-offset: 1px; }
.mrp-trigger:active { transform: translateY(1px); }
.mrp-pick-hint {
  display: block; margin-top: 2px; font-size: 10px; color: var(--muted);
  line-height: 1.3; user-select: none;
}
.mrp-trigger-lab { flex: 1; text-align: left; white-space: nowrap; }
.mrp-caret { color: var(--muted); font-size: 10px; }
.mrp-panel {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0;
  width: 260px; padding: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.mrp-panel.hidden { display: none; }
.mrp-year-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.mrp-year-lab { font-size: 14px; font-weight: 600; color: var(--ink); }
.mrp-nav {
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px;
  background: #F8FAFC; cursor: pointer; font-size: 16px; color: var(--ink);
  line-height: 1; padding: 0;
}
.mrp-nav:hover { border-color: var(--brand); color: var(--brand); }
.mrp-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.mrp-cell {
  padding: 8px 0; border: 1px solid transparent; border-radius: 8px;
  background: #F8FAFC; font-size: 12px; color: var(--ink); cursor: pointer;
  font-weight: 500;
}
.mrp-cell:hover { border-color: var(--brand); color: var(--brand); }
.mrp-cell.in-range { background: #E8F1FB; color: var(--brand); }
.mrp-cell.is-start, .mrp-cell.is-end, .mrp-cell.is-single {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.mrp-hint { margin: 8px 0 0; font-size: 11px; color: var(--muted); }
.mrp-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px;
}
.mrp-btn {
  padding: 5px 12px; font-size: 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.mrp-btn.primary {
  background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600;
}
.trend-controls .mrp-wrap { min-width: 168px; }


/* —— 经营看板 KPI 对比度 / 分组（20261025kpiSoft） —— */
#pane-dash { background: var(--kpi-surface); }
.kpi-section { margin-bottom: 14px; }
.kpi-sec-hd {
  font-size: 13px; font-weight: 600; color: var(--kpi-ink);
  margin: 4px 0 10px; letter-spacing: .02em;
}
.kpi-section-extra { margin-top: 6px; opacity: .98; }
.kpi-biz-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.kpi {
  background: var(--kpi-card); border: 1px solid var(--line);
}
.kpi .label { color: var(--kpi-label); }
.kpi .value {
  color: var(--kpi-ink) !important; font-weight: 700;
}
.kpi .sub { color: var(--kpi-label); }
.kpi .sub-amt {
  font-size: 13px; color: var(--kpi-amt); margin-top: 6px;
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.kpi.rail-apply::before { background: var(--kpi-rail-apply); }
.kpi.rail-reject::before { background: var(--kpi-rail-reject); }
.kpi.rail-loan::before { background: var(--kpi-rail-loan); }
.kpi.rail-pass::before { background: var(--kpi-rail-pass); }
.kpi.rail-pass-n::before { background: var(--kpi-rail-pass-n); }
.kpi.rail-silent::before { background: var(--kpi-rail-silent); }
.kpi.rail-silent { background: #FFFBF0; }

.kpi.rail-pending::before { background: var(--kpi-rail-pending); }
.kpi.rail-pending { background: #FFF8F0; border-color: #E8D4B8; }
#kpiSummary, #anKpis { display: block; }
#kpiSummary .kpi-section, #anKpis .kpi-section { display: block; width: 100%; grid-column: 1 / -1; }
.kpi-section-pending { display: block; width: 100%; margin-top: 4px; padding: 12px 12px 14px; background: #FFFCF7; border: 1px dashed #E8D4B8; border-radius: 12px; }
.kpi-section-pending .kpi-sec-hd { color: #8A5A20; }
.pending-top { margin-top: 10px; }
.pending-top table td, .pending-top table th { font-size: 12px; }
#pane-analysis .an-stack-pending { margin: -2px 0 8px 92px; font-size: 11px; color: #8A5A20; }

.kpi.clickable:hover, .kpi.clickable:focus {
  outline: none; box-shadow: 0 0 0 2px rgba(176,137,62,.35);
  cursor: pointer;
}
#dailyTrendCard .page-title h3::before {
  content: "趋势 · "; font-weight: 600; color: var(--kpi-ink);
}
.chart-legend .lg.apply::before { background: var(--trend-apply); }
.chart-legend .lg.loan-n::before { background: var(--trend-loan); }

/* === monthAlign: 主筛点选 + 月趋势可读 + 利润汇总 === */
.filter-mrp { display: inline-flex; flex-direction: column; gap: 2px; min-width: 168px; vertical-align: middle; }
.filter-mrp .mrp-field-lab { font-size: 11px; color: var(--muted); }
.bar-chart.dual .pair { align-items: flex-end; gap: 6px; min-height: 150px; }
.bar-chart.dual .pair .bar-wrap { display: flex; flex-direction: column; align-items: center; width: 46%; }
.bar-chart.dual .pair .bar { width: 100%; margin: 0; border-radius: 4px 4px 2px 2px; min-width: 10px; }
.bar-chart.dual .pair .bar.loan { background: linear-gradient(180deg, #5B9BD5, var(--brand)); }
.bar-chart.dual .pair .bar.profit { background: linear-gradient(180deg, #4DB896, var(--accent)); }
.bar-chart .bar-val { font-size: 9px; font-weight: 600; color: #334155; line-height: 1.1; margin-bottom: 2px; white-space: nowrap; }
.bar-chart .bar-val.accent { color: #0F766E; }
.bar-chart .lab { font-size: 11px; font-weight: 600; color: #475569; margin-top: 6px; }
.profit-sum-bar {
  display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: stretch;
  margin: 0 0 12px; padding: 12px 14px; border-radius: 10px;
  background: linear-gradient(90deg, #ECFDF5, #F0F9FF); border: 1px solid #A7F3D0;
}
.profit-sum-bar .psb-item { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.profit-sum-bar .psb-lab { font-size: 11px; color: #64748B; }
.profit-sum-bar strong { font-size: 16px; font-variant-numeric: tabular-nums; color: #0F172A; }
.profit-sum-bar .psb-item.accent strong { color: #0F766E; font-size: 18px; }
#dashTable th.col-net, #dashTable td.col-net {
  background: #ECFDF5; color: #0F766E; font-weight: 700; white-space: nowrap;
}
.kpi-section-extra { margin-top: 10px; }
.kpi-section-extra .kpi-sec-hd { color: #0F766E; }


/* —— staffRank · 近一周员工进件排名（叠 monthAlign/trendStretch） —— */
#staffIntakeRankBlock .staff-zero-list {
  min-height: 64px; padding: 4px 0 2px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start;
}
#staffIntakeRankBlock .staff-zero-chip {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  background: #FDECEC; color: #9B2C2C;
  border: 1px solid #F5C6C6; font-size: 13px; font-weight: 600;
}
#staffIntakeRankBlock .staff-zero-empty {
  color: var(--muted); font-size: 13px; padding: 8px 0;
}
#staffRankTable th.th-sort {
  cursor: pointer; user-select: none; white-space: nowrap;
  color: var(--accent);
}
#staffRankTable th.th-sort:hover { text-decoration: underline; }
#staffRankTable tr.staff-low td {
  background: #FDF2F2;
}
#staffRankTable tr.staff-low td.staff-count {
  color: #B42318; font-weight: 700;
}
#staffRankTable td.staff-count {
  font-variant-numeric: tabular-nums; font-weight: 600;
}

/* —— profitPie · 管理端五张利润构成饼图 —— */
.profit-pie-hd {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between; gap: 12px;
}
.profit-pie-month-wrap {
  display: flex; align-items: center; gap: 8px;
  flex: 0 0 auto;
}
.profit-pie-month-wrap .trend-lab {
  font-size: 12px; color: var(--muted, #64748B); white-space: nowrap;
}
.profit-pie-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1400px) {
  .profit-pie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .profit-pie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .profit-pie-grid { grid-template-columns: 1fr; }
}
.profit-pie-card {
  background: #F8FAFC;
  border: 1px solid var(--line, #E2E8F0);
  border-radius: 12px;
  padding: 12px 12px 10px;
  min-width: 0;
}
.profit-pie-title {
  font-size: 13px; font-weight: 700; color: #0F172A;
  margin: 0 0 8px;
}
.profit-pie-body { min-height: 120px; }
.profit-pie-wrap {
  display: flex; flex-direction: column; gap: 10px; align-items: stretch;
}
.profit-pie-chart {
  flex: 0 0 auto;
  display: flex; justify-content: center;
}
.profit-pie-svg {
  display: block;
  width: 180px;
  height: 180px;
  max-width: 100%;
}
.profit-pie-legend {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
  max-height: 220px; overflow: auto;
}
.profit-pie-leg-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 6px; row-gap: 1px;
  align-items: center;
  font-size: 11px; color: #0F172A;
}
.profit-pie-swatch {
  width: 8px; height: 8px; border-radius: 2px;
  grid-row: 1 / span 2; align-self: center;
}
.profit-pie-name {
  font-weight: 600; color: #0F172A;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profit-pie-pct {
  font-weight: 700; font-variant-numeric: tabular-nums;
  text-align: right; white-space: nowrap;
}
.profit-pie-amt {
  grid-column: 2 / span 2; font-size: 10px;
  color: #64748B; font-variant-numeric: tabular-nums;
}
.profit-pie-leg-item.is-neg .profit-pie-name,
.profit-pie-leg-item.is-neg .profit-pie-pct,
.profit-pie-leg-item.is-neg .profit-pie-amt {
  color: #B42318;
}
.profit-pie-neg-hd {
  margin: 8px 0 4px; font-size: 11px; font-weight: 700; color: #B42318;
}
.profit-pie-empty { font-size: 12px; color: var(--muted, #64748B); padding: 12px 0; }
.profit-pie-foot {
  margin: 4px 0 0; font-size: 10px; color: #94A3B8;
}


/* === monthRangeFix · 20261026：触发器按钮态 + donut + 明细表 === */
.profit-pie-chart { display: flex; justify-content: center; align-items: center; min-height: 200px; }
.profit-pie-svg { display: block; max-width: 100%; height: auto; }
.profit-donut-pct {
  font-size: 10px; font-weight: 700; fill: #fff;
  paint-order: stroke; stroke: rgba(15,23,42,0.35); stroke-width: 2px;
  pointer-events: none;
}
.profit-donut-center-lab {
  font-size: 9px; fill: #64748B; font-weight: 500;
}
.profit-donut-center-val {
  font-size: 12px; fill: #0F172A; font-weight: 700;
}
.profit-pie-tbl {
  width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 8px;
}
.profit-pie-tbl th, .profit-pie-tbl td {
  padding: 4px 6px; border-bottom: 1px solid var(--line, #E2E8F0);
  text-align: left; vertical-align: top;
}
.profit-pie-tbl th {
  color: var(--muted, #64748B); font-weight: 600; background: #F8FAFC;
  position: sticky; top: 0;
}
.profit-pie-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.profit-pie-tbl td.neg, .profit-pie-tbl tr.is-neg td { color: #B42318; }
.profit-pie-tbl tbody tr:hover td { background: #F8FAFC; }
.profit-pie-wrap { display: flex; flex-direction: column; gap: 4px; }
.profit-pie-body { max-height: 420px; overflow: auto; }
.filter-mrp .mrp-trigger { min-width: 180px; }


/* === monthPickAll · 金看板全部从→到点选：面板挂 body + 容器不裁切 === */
.filter-bar.sticky { z-index: 30; overflow: visible; }
.filter-bar, .filters { overflow: visible; }
.mrp-host, .mrp-wrap, .filter-mrp, .mrp { overflow: visible; position: relative; z-index: 31; }
.trend-controls { overflow: visible; position: relative; z-index: 20; }
#dailyTrendCard.card,
#profitPieCard.card,
.card:has(.mrp-wrap) { overflow: visible; }
.profit-pie-hd, .profit-pie-month-wrap { overflow: visible; position: relative; z-index: 25; }
.mrp-panel {
  z-index: 10000 !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  pointer-events: auto;
}
.mrp-cell.can-end { box-shadow: inset 0 0 0 1px rgba(74, 111, 165, 0.25); }
.mrp-cell { position: relative; z-index: 1; touch-action: manipulation; cursor: pointer; }
.main { /* 滚动仍可，但勿形成裁切点选层 */ }

/* === 20261026bankFeeName · 银行结算表三视图 === */
.bank-fee-card { border: 1px solid #C5D4E8; background: linear-gradient(180deg,#F7FAFE 0%,#fff 48px); }
.bank-fee-card > .page-title h3 { color: #1E3A5F; }
.bf-filters {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end;
  margin: 8px 0 6px; padding: 10px; background: #F8FAFC; border-radius: 8px;
  overflow: visible; position: relative; z-index: 20;
}
.bf-filters label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #475569; }
.bf-filters select, .bf-filters input { min-width: 7.5em; font-size: 13px; }
.bf-hint { margin: 4px 0 8px; font-size: 11px; line-height: 1.45; }
.bf-totals {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0;
}
.bf-chip {
  background: #fff; border: 1px solid #E2E8F0; border-radius: 8px;
  padding: 8px 12px; min-width: 110px;
}
.bf-chip .k { font-size: 11px; color: #64748B; }
.bf-chip .v { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; color: #0F172A; margin-top: 2px; }
.bf-chip.warn .v { color: #B54708; }
.bf-chip.ok .v { color: #027A48; }
.bf-month-bar {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px;
}
.bf-month-chip {
  font-size: 11px; padding: 6px 10px; border-radius: 999px;
  background: #EEF2FF; color: #3730A3; border: 1px solid #C7D2FE;
  font-variant-numeric: tabular-nums;
}
.bf-month-chip.is-empty { background: #F1F5F9; color: #94A3B8; border-color: #E2E8F0; }
.bf-status { margin: 4px 0 8px; font-size: 12px; }
.bf-table-wrap { max-height: 62vh; }
.bf-table th { white-space: nowrap; font-size: 12px; }
.bf-table td { font-size: 12px; vertical-align: middle; }
.bf-table .bf-sec { color: #64748B; }
.bf-group-row td {
  background: #E8EEF7; font-weight: 650; cursor: pointer; user-select: none;
}
.bf-group-row td:first-child::before { content: "▾ "; color: #4A6FA5; }
.bf-group-row.is-collapsed td:first-child::before { content: "▸ "; }
.bf-group-row.is-collapsed + .bf-detail-row,
.bf-group-row.is-collapsed ~ .bf-detail-row[data-gid] { /* handled by JS hide */ }
.bf-sub-row td { background: #F1F5F9; font-weight: 600; cursor: pointer; }
.bf-tag {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; line-height: 1.5; border: 1px solid transparent;
}
.bf-tag.ok { background: #ECFDF3; color: #027A48; border-color: #A6F4C5; }
.bf-tag.warn { background: #FFFAEB; color: #B54708; border-color: #FEDF89; }
.bf-tag.na { background: #F8FAFC; color: #94A3B8; border-color: #E2E8F0; }
.bf-foot td { font-weight: 650; background: #F8FAFC; border-top: 2px solid #CBD5E1; }
.bf-detail-row.hidden-row { display: none; }
@media (max-width: 1100px) {
  .bf-table .bf-sec { display: none; }
}

.bf-filter-soft { pointer-events: none; }
.bf-filter-soft select { cursor: not-allowed; }
label:has(#bf-view) select { min-width: 8.5em; font-weight: 600; }

/* 银行结算表 20261026bankFeeName */
.bf-corp-direct {
  background: #E8F4FF !important;
  box-shadow: inset 3px 0 0 #3B82F6;
  color: #1E3A5F;
}
th.bf-corp-direct { font-weight: 650; }
.bf-internal { background: #F5F3FF; }
th.bf-internal { color: #5B21B6; }
.bf-chip.internal { border-color: #DDD6FE; background: #F5F3FF; }
.bf-chip.internal .k { color: #5B21B6; }
.bf-chip.agency { border-color: #93C5FD; background: #EFF6FF; }
.bf-chip.agency .k { color: #1D4ED8; }
.bf-chip.agency .v { color: #1E40AF; }
.bf-batch-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 6px 0 8px; padding: 8px 10px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 8px;
}
.bf-batch-bar .muted { font-size: 11px; }
.bf-status-sel { font-size: 12px; max-width: 7.5em; }
.bf-chk { width: 2em; text-align: center; }

/* —— 客户台账编辑抽屉 · adminLedgerEdit 20261026 —— */
.ledger-edit-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.35); z-index: 80;
}
.ledger-edit-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 96vw);
  background: #fff; z-index: 90; box-shadow: -8px 0 28px rgba(15,23,42,0.18);
  display: flex; flex-direction: column;
}
.ledger-edit-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.ledger-edit-head h3 { margin: 0 0 4px; font-size: 16px; }
.ledger-edit-body {
  flex: 1; overflow: auto; padding: 12px 16px 20px;
}
.ledger-edit-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; border-top: 1px solid var(--line); background: #F8FAFC;
}
.ledger-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ledger-edit-drawer .form-grid { grid-template-columns: 1fr 1fr; }
.ledger-edit-drawer .form-grid label.full { grid-column: 1 / -1; }
.ledger-edit-drawer .form-sec {
  margin: 12px 0 6px; font-size: 12px; font-weight: 700; color: var(--ink);
  border-left: 3px solid var(--accent, #4A6FA5); padding-left: 8px;
}
.ledger-edit-drawer .ro-box {
  display: grid; grid-template-columns: 96px 1fr; gap: 4px 8px;
  font-size: 12px; color: var(--muted); margin-bottom: 8px;
}
.ledger-edit-drawer #ledgerEditErr { padding: 0 16px 10px; }
.detail-panel .form-sec {
  margin: 12px 0 6px; font-size: 12px; font-weight: 700; color: var(--ink);
}
.detail-panel .form-grid { margin-bottom: 8px; }
.detail-panel .form-grid label.full { grid-column: 1 / -1; }
.detail-panel .od-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }


/* —— 结算批量 + 员工工资/提成 · 20261026settleBatchFix —— */
.bf-batch-tip {
  margin: 0 0 8px; padding: 8px 10px; font-size: 12px; line-height: 1.45;
  color: #334155; background: #F0F9FF; border: 1px dashed #7DD3FC; border-radius: 8px;
}
.bf-batch-bar button.is-disabled,
.bf-batch-bar button:disabled {
  opacity: 0.45; cursor: not-allowed;
}

/* —— 结算批量醒目热修 · 20261026settleBatchFix —— */
.bf-batch-wrap {
  position: sticky;
  top: 0;
  z-index: 7;
  margin: 6px 0 8px;
  background: #fff;
  padding-bottom: 2px;
  box-shadow: 0 1px 0 #E2E8F0;
}
.bf-batch-wrap .bf-batch-tip {
  margin-bottom: 6px;
}
.bf-batch-bar {
  border-color: #38BDF8;
  background: #F0F9FF;
}
.bf-batch-bar.is-empty {
  border-style: dashed;
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.payroll-card .pr-closed-tag,
.payroll-card .pr-lock-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #FEF3C7; color: #92400E; font-size: 12px; font-weight: 600;
}

.payroll-card .pr-lock-tag { background: #DCFCE7; color: #166534; }
.payroll-card .pr-pool {
  margin: 6px 0 8px; padding: 8px 10px; border-radius: 8px;
  background: #EFF6FF; color: #1E3A8A; font-size: 13px;
}
.payroll-card .pr-ack-tag {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  background: #F1F5F9; color: #475569; font-size: 12px;
}
.payroll-card .pr-ack-tag.ok { background: #DCFCE7; color: #166534; }
.payroll-card .pr-ack-tag.wait { background: #DBEAFE; color: #1D4ED8; }
.payroll-card .pr-ack-tag.pend { background: #FEF3C7; color: #92400E; }
.payroll-card .pr-ack-tag.back { background: #FEE2E2; color: #991B1B; }
.payroll-card .pr-ops { white-space: nowrap; }
.payroll-card .pr-ops .sm { padding: 2px 8px; font-size: 12px; }
.payroll-card .pr-note-input {
  font-size: 12px; padding: 2px 6px; border: 1px solid #CBD5E1; border-radius: 6px;
}
.payroll-card .pr-adj-box { margin: 0 0 8px; font-size: 12px; color: #334155; }
.payroll-card .pr-adj-list span { margin-right: 8px; }

.payroll-card .pr-base-input {
  font-size: 13px; padding: 2px 6px; border: 1px solid #CBD5E1; border-radius: 6px;
}
.payroll-card .pr-detail {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid #E2E8F0;
}
.payroll-card .pr-detail.hidden { display: none; }
.payroll-card .pr-detail-kpi { margin: 4px 0 8px; }
.payroll-card .pr-detail-kpi .bf-chip { min-width: 96px; }
.payroll-card .pr-calc-cell { font-size: 12px; line-height: 1.45; min-width: 12em; }
.payroll-card .pr-calc-cell .pr-com-src { margin-top: 2px; font-size: 11px; }
.payroll-card button.linkish,
.payroll-card .pr-name {
  background: none; border: none; color: #1D4ED8; cursor: pointer;
  padding: 0; font: inherit; text-decoration: underline;
}
.payroll-card button.linkish:hover,
.payroll-card .pr-name:hover { color: #1E40AF; }


/* 主数据门店增强 · 20261027storeEdit（叠于 userEdit） */
.master-store-card { grid-column: 1 / -1; }
.master-store-card .page-title { display:flex; align-items:baseline; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.form-grid label.full { grid-column: 1 / -1; }
#storeBody tr.store-inactive td { color: var(--muted, #64748b); }
#store-edit-modal .form-grid { margin-top: 8px; }

/* 主数据字典补齐 20261027masterDict */
#pane-master .grid-3 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
#pane-master .master-store-card { grid-column: 1 / -1; }

/* 分析页 20261027anFull · 全量图（无文字总结）叠 permCfg */
#pane-analysis .an-h { font-size: 16px; margin: 26px 0 10px; font-weight: 650; }
#pane-analysis .an-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
#pane-analysis .an-chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer;
}
#pane-analysis .an-chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
#pane-analysis .an-note { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 8px; }
#pane-analysis .an-legend { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 14px; }
#pane-analysis .an-legend b.in { color: #5d8eb8; }
#pane-analysis .an-legend b.out { color: #1d4e89; }
#pane-analysis .an-legend i.ln { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: 3px; }
#pane-analysis .an-legend i.ln.in { background: #8eb4d6; }
#pane-analysis .an-legend i.ln.loan { background: #1f7a4d; }
#pane-analysis .an-legend i.box { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
#pane-analysis .an-month { display: flex; align-items: flex-end; gap: 14px; height: 180px; padding-top: 8px; overflow-x: auto; }
#pane-analysis .an-mcol { flex: 1; min-width: 56px; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
#pane-analysis .an-mcol .bars { display: flex; gap: 4px; align-items: flex-end; height: 140px; }
#pane-analysis .an-mcol i { display: block; width: 16px; border-radius: 4px 4px 0 0; }
#pane-analysis .an-mcol i.in { background: #8eb4d6; }
#pane-analysis .an-mcol i.out { background: #1d4e89; }
#pane-analysis .an-mcol em { font-style: normal; font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; }
#pane-analysis .an-stack { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
#pane-analysis .an-stack .name { width: 84px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pane-analysis .an-stack .bar { flex: 1; display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: #eef2f6; }
#pane-analysis .an-stack .bar i { display: block; height: 100%; }
#pane-analysis .an-stack .num { width: 36px; text-align: right; color: var(--muted); flex: none; }
#pane-analysis .an-hbars .hbar { display: flex; align-items: center; gap: 8px; margin: 7px 0; font-size: 13px; }
#pane-analysis .an-hbars .name { width: 120px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pane-analysis .an-hbars .track { flex: 1; background: #eef2f6; border-radius: 6px; height: 10px; overflow: hidden; }
#pane-analysis .an-hbars .fill { height: 100%; background: #d89a2b; border-radius: 6px; }
#pane-analysis .an-hbars .num { width: 56px; text-align: right; color: var(--muted); flex: none; }
#pane-analysis .an-chartbox { position: relative; }
#pane-analysis .an-chartbox svg { width: 100%; height: auto; display: block; }
#pane-analysis .an-chartbox .tip {
  display: none; position: absolute; z-index: 2; pointer-events: none;
  background: #14324f; color: #fff; font-size: 12px; line-height: 1.4;
  padding: 5px 8px; border-radius: 6px; white-space: nowrap;
}
#pane-analysis .an-empty { color: var(--muted); font-size: 13px; padding: 18px 0; }
#pane-analysis .an-hbars .fill.g { background: #1f7a4d; }
#pane-analysis .an-donut-wrap { display: flex; align-items: center; gap: 6px; }
#pane-analysis .an-donut-wrap svg { width: 168px; flex: none; }
#pane-analysis .an-donut-legend { flex: 1; min-width: 0; font-size: 12px; }
#pane-analysis .an-donut-legend div { display: flex; justify-content: space-between; gap: 8px; margin: 5px 0; color: var(--ink); }
#pane-analysis .an-donut-legend b { font-weight: 600; color: var(--muted); }
#pane-analysis .an-donut-legend i.box { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
#pane-analysis .an-table-wrap { overflow: auto; }
#pane-analysis .an-table { width: 100%; border-collapse: collapse; font-size: 13px; }
#pane-analysis .an-table th {
  text-align: right; color: var(--muted); font-weight: 500;
  padding: 6px 6px; border-bottom: 1px solid var(--line);
}
#pane-analysis .an-table th:first-child,
#pane-analysis .an-table td:first-child { text-align: left; }
#pane-analysis .an-table td { padding: 7px 6px; border-bottom: 1px solid #f0f3f6; text-align: right; }
#pane-analysis .an-table tr.hot td { background: #fff7f2; }
@media (max-width: 900px) {
  #pane-analysis .an-daily-grid,
  #pane-analysis .an-pie-grid { grid-template-columns: 1fr; }
}

/* 审计日志 20261027auditLog：概览 + 展开 old/new */
#pane-audit .audit-raw { margin-top: 4px; }
#pane-audit .audit-raw summary {
  cursor: pointer; font-size: 12px; color: var(--brand); font-weight: 500; user-select: none;
}
#pane-audit .audit-raw pre.code-box {
  margin-top: 8px; max-height: 220px; overflow: auto; font-size: 11px;
  background: #0F1C2E; color: #E8EEF5; padding: 10px; border-radius: 8px; white-space: pre-wrap;
}

/* 角色权限模板 20261027permCfg */
#pane-master .master-perm-card { grid-column: 1 / -1; }
.perm-role-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.perm-tab {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.perm-tab small { color: var(--muted); margin-left: 4px; font-size: 11px; }
.perm-tab.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.perm-tab.on small { color: rgba(255,255,255,.85); }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.perm-group { border: 1px solid var(--line, #e2e8f0); border-radius: 8px; padding: 8px 10px; background: #fafbfc; }
.perm-group-title { font-size: 12px; font-weight: 650; margin-bottom: 6px; }
.perm-item { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; margin: 4px 0; line-height: 1.4; }
.perm-item code { font-size: 11px; background: #eef2f6; padding: 0 4px; border-radius: 3px; }
#user-role-hint { word-break: break-all; }

/* 日报竖屏预览 20261027dailyFilter 20261027mAdmA · 仅本 pane，不改桌面其他样式 */
#pane-daily .daily-phone-wrap { display: flex; justify-content: flex-start; padding: 8px 0 24px; }
#pane-daily .daily-phone {
  width: 390px; height: 780px; border: 1px solid var(--line);
  border-radius: 16px; background: #F4F6F9; box-shadow: var(--shadow);
}
#pane-daily .daily-filter {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 12px; color: var(--muted);
}
#pane-daily .daily-filter select {
  min-width: 140px; min-height: 34px; border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 8px; background: #fff; color: var(--ink);
}

/* 品牌资料 20261027brandDoc · 不改分析页 anFull / 权限配置 permCfg */
#brand-doc-modal .bd-upload { margin-top: 8px; }
#brand-doc-modal textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.bd-preview { margin-top: 12px; }
.bd-preview img { max-width: 100%; max-height: 280px; border: 1px solid var(--line); border-radius: 8px; display: block; }
.bd-preview pre { max-height: 200px; }

/* 银行结算规则识别稿 · 20261027bankRule */
.sr-badge { display:inline-block; font-size:11px; padding:1px 6px; border-radius:999px; border:1px solid var(--line); }
.sr-badge.sr-ok { background:#E8F6F1; color:var(--accent); border-color:#B7E0D2; }
.sr-badge.sr-wait { background:#FFF6E5; color:var(--warn); border-color:#F0D7A8; }
.sr-badge.sr-none { background:#F4F6F9; color:var(--muted); }
.sr-card textarea { width:100%; min-height:140px; resize:vertical; font:inherit; }
.sr-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; }
.sr-grid label.full { grid-column:1 / -1; }
.sr-dates { padding:6px 0; white-space:pre-wrap; }
.badge.expired { background:#FDECEC; color:#B42318; }
.badge.upcoming { background:#FFF6E5; color:#B54708; }

/* 银行合同归档 UI · 20261027bankDoc（叠 bankRule） */
.badge.upcoming { background: #FEF3E2; color: var(--warn, #B54708); }
.badge.okdoc { background: #E7F6EF; color: var(--accent, #027A48); }
.bank-doc-card .form-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.bank-doc-card .form-row input,
.bank-doc-card .form-row select { min-height: 32px; }


/* 用户级权限勾选 · 20261027permUser（叠于 userEdit / p1perm / permCfg，不改分析页） */
.user-perm-box {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #F8FAFC;
}
.user-perm-box[hidden] { display: none !important; }
.user-perm-head {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.user-perm-head strong { font-size: 13px; }
.user-perm-group { margin: 8px 0 4px; }
.user-perm-group h4 {
  margin: 0 0 4px; font-size: 12px; color: #475569; font-weight: 650;
}
.user-perm-group label {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 2px 10px 2px 0; font-size: 12px; white-space: nowrap;
}
.user-perm-group label.is-custom { color: #1D4ED8; }
.user-perm-group label.is-custom::after { content: " ·已自定义"; font-size: 11px; color: #64748b; }
.user-perm-group label.is-locked { color: #94A3B8; }
.perm-custom-badge {
  display: inline-block; margin-left: 4px; padding: 0 6px;
  border-radius: 999px; background: #DBEAFE; color: #1E40AF;
  font-size: 11px; font-weight: 650;
}

/* 政策费率识别稿 · 20261027policyRate（叠在 bankRule / settleViews / permUser 活文件上） */
.prate-card textarea { width: 100%; min-height: 72px; resize: vertical; font: inherit; }
.prate-ack { display: flex; gap: 8px; align-items: flex-start; color: var(--warn); }
.prate-ack input { width: auto; margin-top: 2px; }
.prate-eff input { border-color: var(--warn); }
.prate-eff-hot input { box-shadow: 0 0 0 3px rgba(180,83,9,.18); }
.prate-ocr {
  max-height: 160px; overflow: auto; white-space: pre-wrap;
  background: #F4F6F9; padding: 8px; border-radius: 8px; font-size: 12px;
}

/* —— 开票单集中化 · 20261028invoiceFlow —— */
.inv-panel {
  margin: 10px 0 8px; padding: 10px 12px;
  border: 1px solid #D6E4F0; border-radius: 10px; background: #F8FBFF;
}
.inv-panel-head {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px;
}
.inv-panel-head strong { display: block; font-size: 14px; }
.inv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.inv-sum-chip {
  min-width: 220px; padding: 8px 10px; border-radius: 8px;
  background: #fff; border: 1px solid #E2E8F0; font-size: 12px; line-height: 1.45;
}
.inv-sum-chip .k { font-weight: 650; color: #1E3A5F; }
.inv-sum-chip.is-diff { border-color: #FCA5A5; background: #FEF2F2; }
.inv-sum-chip.is-diff .k { color: #B91C1C; }
.inv-list { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.inv-list button.linkish, button.linkish.inv-open {
  border: 0; background: none; color: #1D4ED8; cursor: pointer; padding: 0 2px; font: inherit;
  text-decoration: underline;
}
.inv-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 999px; background: #fff; border: 1px solid #CBD5E1; font-size: 12px;
}
.inv-drawer { width: min(720px, 98vw); }
.inv-drawer .inv-items { width: 100%; font-size: 12px; }
.inv-drawer .inv-att-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.inv-drawer .inv-att { font-size: 12px; padding: 6px 8px; border: 1px solid #E2E8F0; border-radius: 8px; background: #fff; }
.inv-payee { font-size: 13px; padding: 6px 8px; background: #EEF2FF; border-radius: 6px; }
.inv-diff-red { color: #B91C1C; font-weight: 650; }

/* —— 开票单批量操作 · 20261028invBatchOps —— */
.inv-select-all {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #334155; user-select: none;
}
.inv-select-all input { margin: 0; }
.inv-pill input.inv-batch-chk { margin: 0; flex: 0 0 auto; }
.inv-pill.is-locked { opacity: .72; }
.inv-batch-result {
  margin-top: 8px; font-size: 12px; line-height: 1.5;
  padding: 8px 10px; border-radius: 8px;
  background: #fff; border: 1px solid #E2E8F0;
}
.inv-batch-result.is-fail { border-color: #FCA5A5; background: #FEF2F2; }
.inv-batch-result ul { margin: 6px 0 0; padding-left: 18px; }
.modal-card.inv-batch-wide { max-width: 820px; }
.inv-batch-edit-tools {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 10px 0;
}
.inv-batch-edit-tools label { margin: 0; font-size: 12px; }
.inv-batch-edit-tools input { width: 120px; }
#inv-batch-edit-modal .table { font-size: 12px; }
#inv-batch-edit-body input.inv-batch-conf { width: 110px; }
