:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff4ff;
  --bg: #f4f6fa;
  --panel: #ffffff;
  --border: #e5e9f0;
  --text: #1f2937;
  --text-sub: #6b7280;
  --text-mute: #9ca3af;
  --danger: #d92d20;
  --danger-soft: #fef3f2;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --ok: #047857;
  --ok-soft: #ecfdf3;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

button, input, select, textarea { font-family: inherit; font-size: 14px; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
.hidden { display: none !important; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 45%, #ecfeff 100%);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--border);
}
.login-brand-img { width: 246px; max-width: 100%; height: auto; display: block; }
.login-brand h1 { font-size: 17px; }
.login-brand p { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.login-body { padding: 20px 24px 24px; }

.seg {
  display: flex;
  background: #f1f3f8;
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 18px;
}
.seg-item {
  flex: 1;
  border: none;
  background: transparent;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-sub);
}
.seg-item.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.08); }

.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: 12px; color: var(--text-sub); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.field textarea { min-height: 72px; resize: vertical; }
.field-error { display: none; color: var(--danger); font-size: 12px; font-style: normal; margin-top: 4px; }
.field-error.show { display: block; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }

/* 模糊搜索下拉（企业名称联想） */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 4px);
  z-index: 60;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
  padding: 4px;
}
.ac-item {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-item:hover { background: #eff6ff; }
.ac-item b { color: var(--primary); font-weight: 700; }
.ac-list.hidden { display: none; }

.hint { font-size: 12px; color: var(--text-mute); margin-top: 10px; }
.login-error {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { background: #f7f9fc; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: #fff; border-color: #fecdca; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-outline { background: #fff; color: var(--primary); border-color: #bfd0f5; }
.btn-ghost { background: transparent; color: var(--text-sub); border-color: transparent; }
.btn-ghost:hover { background: #f1f3f8; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 4px 10px; font-size: 13px; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 216px;
  flex: none;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 18px 14px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
img.brand-logo {
  background: transparent; box-shadow: none;
  object-fit: contain; border-radius: 8px; flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 14px; }
.brand-text span { font-size: 11px; color: var(--text-mute); }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; flex: 1; overflow: auto; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  border: none; background: transparent;
  padding: 9px 12px; border-radius: 8px;
  cursor: pointer; color: var(--text-sub); text-align: left;
}
.nav-item i { font-style: normal; width: 16px; text-align: center; opacity: .8; }
.nav-item:hover { background: #f4f6fb; color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.user-chip { display: flex; gap: 9px; align-items: center; margin-bottom: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px; flex: none;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.3; overflow: hidden; }
.user-meta strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 11px; color: var(--text-mute); }
.build-tag {
  margin-top: 8px; text-align: center;
  font-size: 10px; letter-spacing: .3px;
  color: var(--text-mute); opacity: .65;
  font-variant-numeric: tabular-nums;
  user-select: text;
}

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 26px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.topbar h2 { font-size: 17px; }
.topbar p { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.page { padding: 22px 26px 40px; flex: 1; }

/* ---------- 卡片 / 统计 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat-card .stat-label { font-size: 12px; color: var(--text-sub); }
.stat-card .stat-value { font-size: 24px; font-weight: 700; margin-top: 6px; letter-spacing: .3px; }
.stat-card .stat-extra { font-size: 12px; color: var(--text-mute); margin-top: 4px; }
.stat-card.accent-blue { border-left: 3px solid var(--primary); }
.stat-card.accent-ok { border-left: 3px solid var(--ok); }
.stat-card.accent-warn { border-left: 3px solid var(--warn); }
.stat-card.accent-danger { border-left: 3px solid var(--danger); }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 18px;
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.panel-head h3 { font-size: 15px; }
.panel-head .sub { font-size: 12px; color: var(--text-mute); }
.panel-body { padding: 16px 18px; }
.panel-body.no-pad { padding: 0; }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=text], .toolbar input[type=search], .toolbar select {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  outline: none;
}
.toolbar input:focus, .toolbar select:focus { border-color: var(--primary); }
.toolbar .grow { flex: 1; min-width: 180px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data th { background: #fafbfd; font-size: 12px; color: var(--text-sub); font-weight: 600; }
table.data th.num { text-align: right; }
table.data th.ops { text-align: right; }
table.data tbody tr:hover { background: #fafbfe; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.ops { text-align: right; }
table.data td.wrap { white-space: normal; min-width: 160px; }
.cell-sub { display: block; font-size: 11px; color: var(--text-mute); }

/* 成员与权限：操作按钮多，允许换行，避免整张表横向滚动 */
table.data.members-table td.ops { white-space: normal; min-width: 210px; }
table.data.members-table td.ops .btn { margin: 0 4px 4px 0; }
table.data.members-table td { vertical-align: middle; }

/* ---------- 分页条 ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: #fcfdff;
  font-size: 12px;
  color: var(--text-sub);
}
.pager-info b { color: var(--text); font-weight: 600; }
.pager-btns { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text-sub);
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.pager-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.pager-btn:disabled { opacity: .45; cursor: not-allowed; }
.pager-gap { padding: 0 2px; color: var(--text-mute); }
.pager-size { display: inline-flex; align-items: center; gap: 6px; color: var(--text-sub); white-space: nowrap; }
.pager-size select {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}
.pager-size select:focus { border-color: var(--primary); }

.empty { padding: 44px 20px; text-align: center; color: var(--text-mute); }
.empty strong { display: block; color: var(--text-sub); font-weight: 600; margin-bottom: 4px; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid transparent;
}
.badge-blue { background: var(--primary-soft); color: var(--primary); border-color: #d5e2ff; }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: #abefc6; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: #fedf89; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.badge-gray { background: #f3f4f6; color: var(--text-sub); border-color: #e5e7eb; }

.money { font-variant-numeric: tabular-nums; }
.money-ok { color: var(--ok); }
.money-warn { color: var(--warn); }
.money-danger { color: var(--danger); }
.mask { color: var(--text-mute); letter-spacing: 2px; }

/* ---------- 提醒列表 ---------- */
.alert-list { display: flex; flex-direction: column; }
.alert-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}
.alert-row:last-child { border-bottom: none; }
.alert-row .who { min-width: 0; }
.alert-row .who strong { font-weight: 600; }
.alert-row .who span { display: block; font-size: 12px; color: var(--text-mute); }
.alert-row .when { font-size: 13px; }

/* ---------- 排名柱状图 ---------- */
.chart { padding: 10px 20px 14px; }
.chart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f3f8;
}
.chart-row:last-child { border-bottom: none; }
.chart-row.is-me { background: #f5f8ff; margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 10px; }
.chart-rank {
  width: 26px; height: 26px; flex: none;
  border-radius: 8px;
  background: #eef2f7; color: #6b7280;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.chart-rank.rank-1 { background: #2563eb; color: #fff; }
.chart-rank.rank-2 { background: #60a5fa; color: #fff; }
.chart-rank.rank-3 { background: #93c5fd; color: #fff; }
.chart-name { width: 92px; flex: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-bar { flex: 1; min-width: 150px; display: flex; align-items: center; gap: 10px; }
.bar-track {
  position: relative;
  flex: 1;
  min-width: 90px;
  height: 20px;
  background: #eef2f8;
  border-radius: 7px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  border-radius: 7px;
  transition: width .35s ease;
}
.bar-fill.bar-done { background: linear-gradient(90deg, #34d399, #059669); }
/* 柱子上的数字 */
.bar-num {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: var(--primary-dark);
  z-index: 3;
  pointer-events: none;
}
.bar-num.in { right: 9px; color: #fff; }
.bar-num.in.done { color: #fff; }
.bar-num.zero { color: var(--text-mute); font-weight: 600; }
.bar-target {
  position: absolute;
  top: -3px; bottom: -3px;
  width: 2px;
  background: #d92d20;
  z-index: 2;
}
.bar-target::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -1px;
  width: 4px;
  background: rgba(217, 45, 32, .25);
}
.chart-gap {
  flex: none;
  width: 86px;
  text-align: right;
  font-size: 12px;
  color: var(--text-mute);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chart-gap.is-bad { color: var(--danger); font-weight: 700; }
.chart-gap.is-ok { color: var(--ok); font-weight: 700; }
.chart-legend { padding: 10px 20px 12px; font-size: 12px; color: var(--text-mute); border-top: 1px solid var(--border); background: #fcfdff; }
.chart-legend b { font-weight: 600; }

.kv-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px 18px; }
.kv-list span { display: block; font-size: 12px; color: var(--text-mute); }
.kv-list b { font-weight: 600; word-break: break-all; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(16, 24, 40, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(16, 24, 40, .18);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 16px; }
.modal-close { border: none; background: transparent; font-size: 18px; cursor: pointer; color: var(--text-mute); }
.modal-body { padding: 18px 20px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border);
  background: #fafbfd;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .field.full { grid-column: 1 / -1; }
.modal-error {
  margin-bottom: 12px; padding: 8px 12px; border-radius: 8px;
  background: var(--danger-soft); color: var(--danger); font-size: 13px;
}
.modal-error.hidden { display: none; }

/* ---------- 管理员订单下钻弹窗 ---------- */
.modal.modal-wide { max-width: 1040px; }
.modal-body.no-pad { padding: 0; }
.modal-head h3 .modal-count {
  font-size: 12px; font-weight: 400; color: var(--text-mute);
  margin-left: 10px;
}
.drill-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 1px solid var(--border); background: #fafbfd;
}
.drill-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-sub); }
.drill-field select {
  font: inherit; padding: 5px 9px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
}
.drill-bar .hint { font-size: 12px; }

/* 可点的数字 / 统计卡片 */
.link-num {
  border: none; background: transparent; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
  border-bottom: 1px dashed transparent;
}
.link-num:hover { color: var(--primary); border-bottom-color: currentColor; }
.stat-card.is-clickable { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.stat-card.is-clickable:hover { box-shadow: 0 6px 18px rgba(16, 24, 40, .10); transform: translateY(-1px); }

/* ---------- Toast ---------- */
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 9px 16px; border-radius: 8px;
  background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: toast-in .18s ease-out;
}
.toast.ok { border-color: #abefc6; background: var(--ok-soft); color: var(--ok); }
.toast.err { border-color: #fecdca; background: var(--danger-soft); color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.role-tag { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); }
.role-tag.staff { background: #f3f4f6; color: var(--text-sub); }

@media (max-width: 900px) {
  .sidebar { width: 68px; }
  .brand-text, .nav-item span, .sidebar-foot .user-meta { display: none; }
  .nav-item { justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- 表格合计行 ---------- */
.data tbody tr.total-row { background: #f7f9fc; }
.data tbody tr.total-row td { border-top: 2px solid var(--border); color: var(--text); }

/* ---------- 首页两栏并排（新签订单 / 岗位录入排名） ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
  margin-top: 18px;
}
.grid-2 > .panel { margin-top: 0; min-width: 0; display: flex; flex-direction: column; }
.grid-2 > .panel > .panel-body { flex: 1; }
/* 半栏宽度下压缩图表列宽，避免文字被挤掉 */
.grid-2 .chart { padding: 8px 16px 12px; }
.grid-2 .chart-row { gap: 10px; }
.grid-2 .chart-name { width: 78px; font-size: 13px; }
.grid-2 .chart-gap { width: 76px; }
.grid-2 .chart-legend { padding: 10px 16px 12px; }
.grid-2 table.data th, .grid-2 table.data td { padding: 10px 10px; }
@media (max-width: 1180px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 > .panel { margin-top: 0; }
}

/* ---------- 本月未签：单独黄标 ---------- */
.data th.month-unsigned { color: #b54708; }
.data td.month-unsigned { background: #fffbf0; }
.data td.month-unsigned .badge { font-weight: 700; }

/* ---------- 值班销售排名（含半月统计） ---------- */
/* 与标题同一行：标题 · 胶囊紧跟其后（auto 吸收剩余空间）· 右侧口径说明 */
.panel-head.has-duty { gap: 8px 14px; }
.panel-head.has-duty .duty-badge { margin-right: auto; }

.duty-badge {
  display: inline-flex; align-items: center; gap: 10px;
  flex-wrap: wrap; justify-content: center;
  padding: 4px 13px; border-radius: 999px;
  background: linear-gradient(180deg, #fffdf8, #fffaeb);
  border: 1px solid #f3d79f;
  font-size: 12px; font-weight: 600; color: var(--warn);
  box-shadow: 0 1px 2px rgba(181, 71, 8, .07);
  max-width: 100%;
}
.dr-title { font-size: 11px; letter-spacing: .3px; color: var(--warn); opacity: .9; white-space: nowrap; }
.dr-item { display: inline-flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.dr-item + .dr-item { padding-left: 9px; border-left: 1px solid #e9d2a4; }
.dr-item i {
  font-style: normal; font-size: 9px; font-weight: 700; color: #b54708;
  background: #fff3d6; border-radius: 3px; padding: 0 3px; line-height: 1.6;
}
/* 名字统一小一号，第一名只靠颜色加粗区分，不再放大 */
.dr-item strong { font-size: 12px; font-weight: 600; color: var(--text); }
.dr-item em { font-style: normal; font-size: 10.5px; font-weight: 400; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.dr-item.is-first strong { font-size: 12px; font-weight: 700; color: #b54708; }
/* 半月统计：与排名同处一个标签栏，竖线分隔 */
.dr-stat {
  margin-left: 1px; padding-left: 10px; border-left: 1px solid #d9bf8d;
  font-size: 11px; font-weight: 400; color: var(--text-sub);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dr-none { font-size: 12px; font-weight: 600; color: var(--text-mute); }
.duty-badge.is-none {
  color: var(--text-mute); border-color: var(--border);
  background: #fafafa; font-weight: 400;
}
.duty-badge.is-none .dr-title { color: var(--text-mute); }
.duty-badge.is-none .dr-stat { border-left-color: var(--border); }
@media (max-width: 560px) {
  .duty-badge { flex-wrap: wrap; justify-content: center; gap: 5px 9px; border-radius: 14px; }
  .dr-stat { border-left: 0; padding-left: 0; }
}
/* 表内：该半月笔数最多者加深 */
.data td.is-top { background: #fffaeb; font-weight: 700; color: var(--warn); }

/* ---------- 定金企业名"疑似没对上"提示 ---------- */
.hint-list { padding: 2px 18px 12px; }
.hint-item { padding: 11px 0; border-bottom: 1px dashed #eef2f7; }
.hint-item:last-child { border-bottom: none; }
.hint-item .hint-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hint-item .hint-name { font-weight: 600; }
.hint-item .hint-note { font-size: 12px; color: var(--text-mute); }
.hint-cands { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hint-cand {
  display: inline-flex; align-items: center; gap: 8px;
  background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 6px 4px 10px; font-size: 12px;
}
.hint-cand b { font-weight: 600; }

/* ================= 视觉统一 · 协调性微调 ================= */
:root { --radius: 12px; --border: #e6eaf2; }
body { -webkit-font-smoothing: antialiased; }

/* 数据居中表格（本月新签订单等） */
table.data.center th,
table.data.center td { text-align: center; }
table.data.center th.num,
table.data.center td.num { text-align: center; }

/* 面板：统一圆角 / 标题栏浅渐变 / 内边距 */
.panel { border-radius: var(--radius); }
.panel-head { padding: 15px 20px; background: linear-gradient(180deg, #fdfefe, #f8fafd); }
.panel-head h3 { font-size: 15px; letter-spacing: .2px; }
.panel-body { padding: 16px 20px; }

/* 表格：表头更轻、数字等宽对齐、最后一行去掉多余分隔线 */
table.data th { background: #f8fafc; letter-spacing: .3px; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td.num,
table.data th.num { font-variant-numeric: tabular-nums; }

/* 统计卡片 */
.stat-grid { gap: 16px; }
.stat-card { border-radius: var(--radius); transition: box-shadow .15s, transform .15s; }
.stat-card .stat-value { font-variant-numeric: tabular-nums; }

/* 按钮过渡 */
.btn { transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.btn-primary { box-shadow: 0 1px 2px rgba(37, 99, 235, .22); }
.btn-primary:hover { box-shadow: 0 4px 12px rgba(37, 99, 235, .26); }

/* 侧边栏 / 顶栏：轻量精致化 */
.brand-logo { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 4px 10px rgba(37, 99, 235, .25); }
.nav-item { transition: background .15s, color .15s; }
.nav-item.active { box-shadow: inset 0 0 0 1px #dbe6ff; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 rgba(16, 24, 40, .04);
}
.topbar h2 { letter-spacing: .2px; }

/* ---------- 自动同步状态条 ---------- */
.sync-bar {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; padding: 12px 18px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
}
.sync-dot {
  width: 9px; height: 9px; flex: none; border-radius: 50%;
  background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}
.sync-dot.warn { background: #d97706; box-shadow: 0 0 0 4px rgba(217, 119, 6, .14); }
.sync-dot.bad { background: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .14); }
.sync-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sync-txt strong { font-size: 13.5px; }
.sync-sub { font-size: 12.5px; color: var(--text-mute); }
.sync-fail { font-size: 12.5px; color: var(--danger); margin-top: 2px; }
.sync-bar.sync-warn { border-color: #fde68a; background: #fffdf5; }
.sync-bar.sync-bad { border-color: #fecdca; background: #fffbfa; }
.sync-bar.sync-idle .sync-dot { background: #cbd5e1; box-shadow: none; }
.sync-bar.sync-idle .sync-txt strong { color: var(--text-sub); }
@media (max-width: 720px) {
  .sync-bar { flex-wrap: wrap; }
  .sync-bar .btn { width: 100%; }
}

/* ---------- 岗位录入：客户池在招企业结构（会员 / 普通） ---------- */
.job-struct .th-sub {
  display: block; font-size: 10px; font-weight: 400;
  color: var(--text-mute); margin-top: 2px; white-space: nowrap;
}
.job-struct .is-member { color: #067647; font-weight: 700; }
.job-struct .is-normal { color: #b54708; font-weight: 700; }
.job-struct .slash { color: var(--text-mute); font-weight: 400; margin: 0 4px; }
.job-struct td.tiny { font-size: 12px; color: var(--text-sub); }

/* 会员占比：细条 + 百分比 */
.ratio-cell { display: flex; align-items: center; justify-content: center; gap: 7px; }
.ratio-bar {
  display: block; width: 54px; height: 6px; border-radius: 3px;
  background: #fde3c4; overflow: hidden; flex: 0 0 auto;
}
.ratio-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #12b76a, #067647); }
.ratio-pct {
  font-size: 12px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; min-width: 30px; text-align: right;
}

.job-struct .advice-col { min-width: 320px; max-width: 520px; white-space: normal; }
.job-struct table.data.center th.advice-col,
.job-struct table.data.center td.advice-col { text-align: left; }
.job-struct .adv-grow {
  font-size: 12px; font-weight: 600; color: var(--warn);
  margin-bottom: 3px; line-height: 1.6;
}
.job-struct .adv-grow i {
  font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .3px;
  background: #fff3d6; border: 1px solid #f3d79f; color: #b54708;
  border-radius: 4px; padding: 0 5px; margin-right: 6px; white-space: nowrap;
}
.job-struct .adv-grow b { color: var(--text); font-weight: 700; }
.job-struct .adv-tip { font-size: 12px; color: var(--text-sub); line-height: 1.6; }
.job-struct .adv-tip + .adv-tip { margin-top: 2px; }
.job-struct .total-row .advice-col { color: var(--text-mute); }
.advice-box {
  margin: 14px 18px 16px; padding: 12px 14px;
  border-radius: 10px; border: 1px solid #dbe7ff;
  background: linear-gradient(180deg, #f9fbff, #f3f7ff);
  font-size: 12.5px; line-height: 1.75; color: var(--text-sub);
}
.advice-box b { color: var(--text); font-weight: 700; }

/* 列宽收紧：数字列定宽，建议列吃掉剩余空间 */
.job-struct .data th:nth-child(1) { width: 108px; }
.job-struct .data th.num { width: 82px; }
.job-struct .data th.ratio { width: 118px; }
.job-struct .data th.advice-col { width: auto; }

/* ---------- 会员预警 ---------- */
.w-meta {
  display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 12px; color: var(--text-sub);
}
.w-meta-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.w-meta-actions .btn { text-decoration: none; }
.w-alert {
  margin: 0 0 16px; padding: 14px 16px;
  border: 1px solid #fecdca; border-left: 3px solid var(--danger);
  border-radius: var(--radius); background: var(--danger-soft);
}
.wa-head { font-size: 13.5px; font-weight: 700; color: var(--danger); margin-bottom: 10px; }
.wa-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px; }
.wa-item {
  display: flex; align-items: center; gap: 6px 9px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid #fda29b; border-radius: 8px;
  background: #fff; cursor: pointer; text-align: left; font-size: 12px; color: var(--text-sub);
}
.wa-item:hover { border-color: var(--danger); box-shadow: 0 2px 8px rgba(217,45,32,.12); }
.wa-item strong { color: var(--text); font-size: 12.5px; }
.wa-item i { font-style: normal; margin-left: auto; color: var(--primary); font-weight: 600; }
.wa-foot { margin-top: 10px; font-size: 12px; color: var(--text-sub); line-height: 1.7; }

.w-status, .w-prio {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 700; white-space: nowrap; line-height: 1.5;
}
.ws-overdue { background: var(--danger-soft); color: var(--danger); }
.ws-pending { background: var(--warn-soft); color: var(--warn); }
.ws-done { background: var(--ok-soft); color: var(--ok); }
.wp-urgent { background: var(--danger-soft); color: var(--danger); }
.wp-priority { background: var(--warn-soft); color: var(--warn); }
.wp-normal { background: #f2f4f7; color: var(--text-sub); }
.w-red { color: var(--danger) !important; font-weight: 700; }
.w-list-head {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-sub);
}
.w-list-head strong { color: var(--text); }
.w-table { font-size: 12.5px; }
.w-table td.wrap { min-width: 210px; }
.w-table .cell-sub { font-size: 10.5px; }
.w-table .ops { white-space: nowrap; }
.w-table .ops .btn + .btn { margin-left: 4px; }
.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--primary); font: inherit; font-weight: 700;
}
.link-btn:hover { text-decoration: underline; }

/* 详情弹窗 */
.w-modal-box { max-width: 720px; }
.wd-body { padding: 16px 20px; }
.wd-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.wd-days { margin-left: auto; font-size: 12.5px; color: var(--text-sub); }
.wd-days b { color: var(--danger); font-size: 16px; }
.wd-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px; padding: 12px; margin-bottom: 14px;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 8px;
}
.wd-grid i { display: block; font-style: normal; font-size: 11px; color: var(--text-mute); margin-bottom: 3px; }
.wd-grid strong { font-size: 13px; font-weight: 600; }
.wd-sec { margin-bottom: 14px; }
.wd-sec h4 {
  margin: 0 0 7px; font-size: 12.5px; font-weight: 700; color: var(--text);
  border-left: 3px solid var(--primary); padding-left: 8px;
}
.w-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.w-chip {
  padding: 3px 9px; border-radius: 5px; font-size: 11.5px;
  background: var(--primary-soft); color: var(--primary-dark);
}
.wd-list { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.8; color: var(--text-sub); }
.wd-p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.8; color: var(--text-sub); }
.wd-dim { color: var(--text-mute); font-size: 12px; }
.wd-sug { background: var(--ok-soft); border-radius: 6px; padding: 8px 10px; color: #065f46; }
.wd-quote {
  background: #f8fafc; border-left: 3px solid var(--border);
  padding: 9px 11px; max-height: 130px; overflow: auto;
}
#w-note {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border);
  border-radius: 8px; font: inherit; font-size: 12.5px; resize: vertical;
}
#w-note:focus { outline: none; border-color: var(--primary); }
@media (max-width: 720px) {
  .w-meta-actions { margin-left: 0; }
  .wa-list { grid-template-columns: 1fr; }
  .wd-days { margin-left: 0; width: 100%; }
}

/* 会员预警：6 张卡固定 3 列 2 行，避免 auto-fit 落单 */
.w-stats.stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wa-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) {
  .w-stats.stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .w-stats.stat-grid { grid-template-columns: 1fr; }
  .wa-list { grid-template-columns: 1fr; }
}
.w-empty-tip {
  padding: 12px 14px; margin-bottom: 14px; font-size: 12.5px; line-height: 1.7;
  border: 1px solid #fedf89; border-radius: var(--radius);
  background: var(--warn-soft); color: var(--warn);
}

/* 会员预警同步状态 */
.w-sync-line { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.w-sync { font-size: 11.5px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.w-sync.ok { background: var(--ok-soft); color: var(--ok); }
.w-sync.stale { background: var(--warn-soft); color: var(--warn); }
.w-sync.off { background: #f2f4f7; color: var(--text-sub); }

/* 会员预警：完整大屏 iframe 视图 */
.w-views { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.w-view {
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel); color: var(--text-sub);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.w-view:hover { border-color: var(--primary); color: var(--primary); }
.w-view.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(37,99,235,.22); }
.w-view-tip { margin-left: auto; font-size: 11.5px; color: var(--text-mute); }
.w-frame-panel { overflow: hidden; }
.w-frame-bar {
  display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-sub);
}
.w-frame-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.w-frame-actions .btn { text-decoration: none; }
.w-frame {
  display: block; width: 100%; height: calc(100vh - 210px); min-height: 720px;
  border: 0; background: #04060f;
}
@media (max-width: 900px) {
  .w-view-tip { margin-left: 0; width: 100%; }
  .w-frame-actions { margin-left: 0; }
}

/* 服务器独立版：账号密码登录表单 */
#login-pane-phone .btn-block { padding: 11px 14px; font-size: 14px; }

/* ---------- 商机客户：成交概率排名 ---------- */
.opp-table td.rank { color: var(--text-mute); font-variant-numeric: tabular-nums; }
.opp-table td.opp-p { min-width: 116px; }
.opp-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.opp-score.opp-lv-a { color: #d92d20; }
.opp-score.opp-lv-b { color: #b54708; }
.opp-score.opp-lv-c { color: var(--primary); }
.opp-score.opp-lv-d { color: var(--text-sub); }
.opp-bar {
  display: block; height: 5px; border-radius: 3px; background: var(--border);
  margin: 5px 0 3px; overflow: hidden;
}
.opp-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--primary); }
.opp-lv-a + .opp-bar > i { background: linear-gradient(90deg, #f97066, #d92d20); }
.opp-lv-b + .opp-bar > i { background: linear-gradient(90deg, #fdb022, #b54708); }
.opp-lv-c + .opp-bar > i { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.opp-lv-d + .opp-bar > i { background: #cbd5e1; }
.opp-tags { max-width: 260px; }
.opp-tag {
  display: inline-block; margin: 2px 4px 2px 0; padding: 1px 7px;
  border-radius: 999px; font-size: 11px; line-height: 1.6;
  background: #f2f4f7; color: var(--text-sub); white-space: nowrap;
}
.opp-tag.hot { background: var(--danger-soft); color: #b42318; }
.opp-tag.warn { background: var(--warn-soft); color: var(--warn); }
.opp-tag.ok { background: var(--ok-soft); color: var(--ok); }
.opp-table td.opp-act { font-size: 12.5px; color: var(--text-sub); max-width: 220px; }
.opp-advice { display: block; }
.opp-adv-item { display: block; margin-top: 4px; font-size: 13px; }
.opp-adv-note { display: block; margin-top: 8px; font-size: 11.5px; color: var(--text-mute); }

/* 商机：计分规则折叠 + 列宽 */
.opp-rule { margin-top: 6px; }
.opp-rule summary { cursor: pointer; color: var(--primary); font-size: 12px; }
.opp-rule-body { display: block; margin-top: 6px; line-height: 1.9; color: var(--text-sub); }
.opp-table { min-width: 1120px; }
.opp-table td.opp-tags { min-width: 210px; max-width: 280px; white-space: normal; }
.opp-table th:nth-child(6), .opp-table td:nth-child(6) { white-space: nowrap; min-width: 86px; }
.opp-table th:nth-child(7), .opp-table td:nth-child(7) { white-space: nowrap; min-width: 72px; }

/* ---------- 面板头：标题 + 说明左对齐，操作按钮靠右 ---------- */
.panel-head .ph-left { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.panel-head .ph-left .sub { font-size: 12px; color: var(--text-mute); }
.panel-head .ph-left .sub b { color: var(--text); font-weight: 600; }
/* 定金记录：意向套餐列 */
table.data td .cell-sub { display: block; }

/* 商机：最近跟进列显示沟通摘要，限宽避免撑破表格 */
.opp-table td.opp-follow { min-width: 132px; max-width: 190px; white-space: normal; }
.opp-table td.opp-follow .cell-sub {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}

/* ---------- 系统管理：页签 + 显示设置 ---------- */
.sys-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; width: fit-content;
  padding: 6px; margin-bottom: 14px;
  background: #f1f4f9; border: 1px solid var(--border); border-radius: 12px;
}
.sys-tab {
  border: none; background: transparent; cursor: pointer;
  padding: 7px 18px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--text-sub);
}
.sys-tab:hover { background: #e7ecf4; color: var(--text); }
.sys-tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }

.preview-brand {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 16px; border-radius: 10px;
  background: #f8fafc; border: 1px dashed var(--border);
  font-size: 13px; color: var(--text-sub);
}
.preview-brand b { font-size: 15px; color: var(--text); }
.preview-brand span { font-size: 12px; color: var(--text-mute); }
.field-hint { display: block; margin-top: 4px; font-size: 11.5px; color: var(--text-mute); font-style: normal; }

table.data tr.row-hidden td { background: #fbfbfc; color: var(--text-mute); }

/* ---------- 商机页：数据时效状态条 ---------- */
.opp-sync {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-sub);
}
.opp-sync-item {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: #f4f7fb; border: 1px solid var(--border);
  white-space: nowrap;
}
.opp-sync-item .opp-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #12b76a; flex: none;
}
.opp-sync-item.warn { background: var(--warn-soft); border-color: #fde3b8; color: var(--warn); }
.opp-sync-item.warn .opp-dot { background: #f79009; }
.opp-sync-when { font-size: 11.5px; color: var(--text-mute); white-space: nowrap; }
@media (max-width: 900px) {
  .opp-sync { gap: 6px; }
  .opp-sync-when { display: none; }
}

/* =========================================================
   视觉主题：浅色蓝灰 · 卡片化工作台
   （侧栏 / 面包屑 / 统计卡 / 筛选条 / 表格，统一成同一套风格）
   ========================================================= */
:root {
  --bg: #f6f8fc;
  --border: #e9eef6;
  --text: #17233c;
  --text-sub: #6b7a93;
  --text-mute: #98a5b9;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 4px 14px rgba(16, 24, 40, .045);
}
html, body, .layout { background: var(--bg); }

/* 左侧导航：更窄、选中项为浅蓝色胶囊 */
.sidebar { width: 204px; border-right: 1px solid #edf1f7; }
.brand { padding: 17px 14px 13px; gap: 9px; }
.brand-text strong { font-size: 14px; color: var(--text); }
.brand-text span { font-size: 10.5px; }
.nav { padding: 4px 10px; gap: 3px; }
.nav-item { padding: 9px 12px; border-radius: 9px; font-size: 13px; color: #5d6c85; }
.nav-item i { font-size: 14px; opacity: 1; color: #8492a8; }
.nav-item:hover { background: #f2f6fc; color: var(--text); }
.nav-item.active { background: #eaf1ff; color: #1d4ed8; font-weight: 600; box-shadow: none; }
.nav-item.active i { color: #2563eb; }
.sidebar-foot { border-top-color: #edf1f7; }

/* 顶部：面包屑 + 大标题 */
.topbar { padding: 13px 26px 15px; border-bottom-color: #edf1f7; box-shadow: none; }
.topbar > div:first-child::before {
  content: "工作台 /";
  display: block;
  font-size: 11.5px;
  color: #9aa8bd;
  margin-bottom: 1px;
}
.topbar h2 { font-size: 21px; font-weight: 700; color: var(--text); }
.topbar p { font-size: 12px; color: #8b9ab0; }
.page { padding: 18px 26px 40px; }

/* 统计卡：左侧浅色图标块 + 标签 + 大数字 */
.stat-grid { gap: 14px; }
.stat-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px; border-radius: 12px;
  border-color: #edf1f7; box-shadow: var(--shadow);
}
.stat-card.accent-blue, .stat-card.accent-ok,
.stat-card.accent-warn, .stat-card.accent-danger { border-left-width: 1px; border-left-color: #edf1f7; }
.stat-card .stat-body { flex: 1; min-width: 0; }
.stat-card .stat-icon {
  width: 34px; height: 34px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 16px; font-weight: 700;
}
.stat-card.accent-blue .stat-icon { background: #eaf1ff; color: #2563eb; }
.stat-card.accent-ok .stat-icon { background: #e8f8f1; color: #12a06a; }
.stat-card.accent-warn .stat-icon { background: #fff3e3; color: #e08700; }
.stat-card.accent-danger .stat-icon { background: #fdecec; color: #e5484d; }
.stat-card .stat-label { font-size: 12px; color: #7c8ba5; }
.stat-card .stat-value { font-size: 22px; margin-top: 2px; color: var(--text); }
.stat-card .stat-extra { font-size: 11.5px; }

/* 面板 / 筛选条 / 表格 */
.panel { border-color: #edf1f7; border-radius: 12px; box-shadow: var(--shadow); margin-top: 14px; }
.panel-head { padding: 14px 18px; background: #fff; border-bottom-color: #f0f3f9; }
.panel-head h3 { color: var(--text); font-weight: 700; }
.toolbar {
  background: #f7f9ff; border: 1px solid #eaf0fc;
  padding: 10px 12px; border-radius: 10px;
}
table.data th { background: #f4f7fe; color: #5c7397; letter-spacing: .2px; }
table.data th, table.data td { padding: 10px 14px; border-bottom-color: #f0f3f8; }
table.data tbody tr:hover td { background: #fbfcff; }
.btn { border-color: #dfe6f1; border-radius: 8px; }


/* =========================================================
   第二轮细化：线性导航图标 / 动态面包屑 / 更整齐的卡片与表格
   ========================================================= */
.topbar > div:first-child::before { content: none; }
.page-crumb {
  display: block; font-size: 11.5px; color: #9aa8bd;
  margin-bottom: 1px; letter-spacing: .2px;
}

/* 侧栏图标：统一改成 18px 线性图标（用 mask 让颜色跟随文字） */
.nav-item i {
  width: 18px; height: 18px; flex: none;
  font-size: 0; line-height: 0; text-align: center;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.nav-item[data-page="overview"] i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
}
.nav-item[data-page="opps"] i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h6l-1 8 9-12h-6l1-8Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h6l-1 8 9-12h-6l1-8Z'/%3E%3C/svg%3E");
}
.nav-item[data-page="warnings"] i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E");
}
.nav-item[data-page="orders"] i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E");
}
.nav-item[data-page="deposits"] i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M7 5l5 7 5-7M7 14h10M7 18h10'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M7 5l5 7 5-7M7 14h10M7 18h10'/%3E%3C/svg%3E");
}
.nav-item[data-page="jobs"] i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E");
}
.nav-item[data-page="upload"] i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4m0 0L7 9m5-5 5 5M4 16v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4m0 0L7 9m5-5 5 5M4 16v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
}
.nav-item[data-page="members"] i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3m0 14v3M2 12h3m14 0h3M5 5l2 2m10 10 2 2M19 5l-2 2M7 17l-2 2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3m0 14v3M2 12h3m14 0h3M5 5l2 2m10 10 2 2M19 5l-2 2M7 17l-2 2'/%3E%3C/svg%3E");
}

/* 统计卡：补说明单行省略，宽度略放宽，避免 6 张卡挤成一行 */
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(198px, 1fr)); }
.stat-card .stat-extra {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-card .stat-value { color: var(--text); }

/* 表格与筛选框：更统一的间距与聚焦反馈 */
.panel-head { padding: 15px 20px; }
table.data th, table.data td { padding: 11px 15px; }
table.data tbody tr { transition: background .12s; }
.toolbar input[type=text], .toolbar input[type=search], .toolbar select { padding: 8px 12px; }
.toolbar input:focus, .toolbar select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.btn:focus-visible { outline: 2px solid #93b4ff; outline-offset: 1px; }
.chart-rank { border-radius: 9px; }
.bar-track, .bar-fill { border-radius: 999px; }

/* ---------- 朋友圈文案工具（iframe 嵌入） ---------- */
.copy-panel .panel-head { align-items: center; }
.copy-frame {
  display: block; width: 100%;
  height: calc(100vh - 240px); min-height: 720px;
  border: none; background: #f6f8fc;
}
.nav-item[data-page="copy"] i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z'/%3E%3C/svg%3E");
}
