/* =============================================================
 * C+ 增值服务管理系统 —— 样式表（视觉美化版 v43）
 * 设计基调：现代企业级管理后台 · 深海军蓝 + 电光蓝主色 · 克制的渐变与层次
 * 说明：保留全部既有类名与功能选择器（app.js 依赖），仅升级视觉表达。
 * ============================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2f6bff;          /* 电光蓝主色 */
  --primary-dark: #1d4fd7;
  --primary-deep: #173d9e;
  --primary-light: #eef3ff;
  --accent: #00c2ff;           /* 青色高光 */
  --accent-2: #7c3aed;         /* 辅助紫蓝 */
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #152238;
  --text-muted: #64748b;
  --border: #e4eaf6;
  --border-strong: #d3dcee;
  --bg: #f2f5fb;
  --sidebar-bg: #0b1b38;       /* 深邃海军蓝 */
  --sidebar-bg2: #0e2350;
  --sidebar-text: #9db4dd;
  --sidebar-active: #2f6bff;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16,34,74,.05), 0 1px 3px rgba(16,34,74,.06);
  --shadow: 0 2px 8px rgba(16,34,74,.06), 0 1px 3px rgba(16,34,74,.05);
  --shadow-lg: 0 16px 40px rgba(16,34,74,.14);
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }
::selection { background: rgba(47,107,255,.16); color: var(--primary-deep); }
.text-red { color: var(--danger); font-weight: 500; }
.text-green { color: var(--success); font-weight: 500; }
.empty-text { color: var(--text-muted); text-align: center; padding: 24px; }
.empty-cell { text-align: center; color: var(--text-muted); padding: 24px !important; }

/* ============ 登录页 ============ */
#loginPage {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #041230 0%, #0a2458 42%, #123f8c 70%, #0e7fb8 100%);
  position: relative;
  overflow: hidden;
}
#loginPage::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(0,212,255,.16), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(124,58,237,.14), transparent 42%),
    radial-gradient(circle at 70% 20%, rgba(47,107,255,.22), transparent 40%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: auto, auto, auto, 44px 44px, 44px 44px;
  animation: loginGrid 22s linear infinite;
}
@keyframes loginGrid {
  0% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 0 0, 0 0, 0 0, 0 44px, 44px 0; }
}
.login-shell { position: relative; z-index: 2; width: 100%; display: flex; justify-content: center; padding: 24px; }
.login-card {
  width: 408px; max-width: 100%;
  background: rgba(255,255,255,.98); border-radius: 18px; box-shadow: var(--shadow-lg);
  padding: 42px 38px 32px;
  animation: loginCardIn .5s cubic-bezier(.22,.8,.36,1);
}
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-brand { text-align: center; margin-bottom: 30px; }
.login-brand .logo {
  width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 15px;
  background: linear-gradient(135deg, #2f6bff, #00c2ff);
  box-shadow: 0 8px 24px rgba(0,194,255,.35), inset 0 1px 0 rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 27px; font-weight: 700; letter-spacing: -.5px;
}
.login-brand h1 { font-size: 22px; color: var(--text); letter-spacing: .2px; }
.login-brand p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
/* 登录页“测试”标识 */
.login-brand .login-badge {
  display: inline-block; margin-top: 10px; padding: 3px 16px;
  border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 3px;
  color: #fff; background: linear-gradient(135deg, #ff8a00, #ff5f2e);
  box-shadow: 0 4px 12px rgba(255,120,40,.35);
}
.login-field { margin-bottom: 17px; }
.login-field label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 7px; font-weight: 500; }
.login-field input {
  width: 100%; padding: 11.5px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-size: 14px; background: #fbfcfe; transition: border-color .2s, box-shadow .2s, background .2s;
  font-family: inherit;
}
.login-field input:hover { border-color: #b9c8e6; }
.login-field input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3.5px rgba(47,107,255,.14); }
.btn-login {
  width: 100%; padding: 12.5px; border: none; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #2f8bff);
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
  box-shadow: 0 6px 18px rgba(47,107,255,.32);
  transition: background .2s, transform .15s, box-shadow .2s;
  letter-spacing: 4px;
}
.btn-login:hover { background: linear-gradient(135deg, var(--primary-dark), #1d6be0); box-shadow: 0 8px 22px rgba(47,107,255,.4); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(47,107,255,.3); }
/* 企微登录按钮与分隔线 */
.login-divider { display: flex; align-items: center; margin: 14px 0; color: #7f96c4; font-size: 12px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-divider span { padding: 0 12px; }
.btn-login.btn-wecom {
  margin-top: 0; letter-spacing: 1px;
  background: linear-gradient(135deg, #07c160, #06ad56);
  box-shadow: 0 6px 18px rgba(7,193,96,.3);
}
.btn-login.btn-wecom:hover { background: linear-gradient(135deg, #06ad56, #059a4c); box-shadow: 0 8px 22px rgba(7,193,96,.38); transform: translateY(-1px); }
/* 版权标注 */
.login-copyright { margin-top: 18px; text-align: center; font-size: 12px; color: #7f96c4; }
.app-footer {
  flex-shrink: 0; padding: 12px 24px; text-align: center; font-size: 12px; color: var(--text-muted);
  border-top: 1px solid var(--border); background: rgba(255,255,255,.6);
}
.login-tip {
  margin-top: 18px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--primary-light); border: 1px solid #cfe2ff; font-size: 12px; color: #1d4fd7;
}
.login-tip strong { display: block; margin-bottom: 4px; }
.login-tip code {
  background: #fff; padding: 1px 5px; border-radius: 4px; border: 1px solid #cfe2ff; font-size: 11px;
}

/* ============ 主界面布局 ============ */
#mainPage { display: none; min-height: 100vh; }
.main-layout { display: flex; width: 100%; height: 100vh; overflow: hidden; }
.sidebar {
  width: 228px; background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg2) 100%);
  color: var(--sidebar-text);
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(255,255,255,.04);
}
.sidebar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 60% at 50% 0%, rgba(47,107,255,.16), transparent 60%);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 11px; padding: 20px 18px;
  color: #fff; border-bottom: 1px solid rgba(255,255,255,.07);
  position: relative;
}
.sidebar-brand .logo {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #2f6bff, #00c2ff);
  box-shadow: 0 0 16px rgba(0,194,255,.35), inset 0 1px 0 rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; letter-spacing: -.5px;
}
.sidebar-brand .brand-name { font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: .3px; }
.sidebar-brand .brand-sub { font-size: 11px; color: #7f96c4; margin-top: 1px; }
#sidebarMenu { list-style: none; padding: 12px 10px; flex: 1; overflow-y: auto; position: relative; }
#sidebarMenu li {
  display: flex; align-items: center; gap: 11px; padding: 10.5px 12px; margin: 2.5px 0;
  border-radius: 9px; cursor: pointer; font-size: 14px; transition: background .18s, color .18s;
  position: relative; color: var(--sidebar-text);
}
#sidebarMenu li:hover { background: rgba(255,255,255,.055); color: #d6e4ff; }
#sidebarMenu li.active {
  background: linear-gradient(90deg, rgba(47,107,255,.32), rgba(47,107,255,.12));
  color: #fff; box-shadow: inset 0 0 0 1px rgba(99,148,255,.28);
}
#sidebarMenu li.active::before {
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px;
  border-radius: 3px; background: linear-gradient(180deg, #5b9bff, #00c2ff);
  box-shadow: 0 0 8px rgba(0,194,255,.6);
}
#sidebarMenu li .icon {
  width: 22px; height: 22px; text-align: center; font-size: 15px; line-height: 22px;
  border-radius: 6px; flex-shrink: 0;
}
#sidebarMenu li.active .icon { background: rgba(47,107,255,.35); }
#sidebarMenu li:hover .icon { transform: scale(1.06); }
#sidebarMenu li .icon { transition: transform .18s; }
.sidebar-user {
  padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 10px; position: relative;
}
.sidebar-user .user-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #00c2ff, #2f6bff); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.sidebar-user .user-info { min-width: 0; }
.sidebar-user .user-name { display: block; color: #fff; font-size: 13px; font-weight: 500; }
.sidebar-user .user-role { display: block; color: #7f96c4; font-size: 11px; margin-top: 1px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100vh; min-height: 0; }
.topbar {
  height: 62px; flex-shrink: 0; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 1px 4px rgba(16,34,74,.04);
}
.topbar .page-title {
  font-size: 18px; font-weight: 700; letter-spacing: .2px;
  background: linear-gradient(90deg, var(--primary), #00a8e8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
/* 顶栏右上角：欢迎语 + 角色名称 */
.topbar-user { display: flex; align-items: center; gap: 8px; margin-right: 8px; }
.topbar-user .welcome-text { font-size: 14px; color: var(--text); }
.topbar-user .welcome-text strong { font-weight: 600; color: var(--primary-dark); }
.main-content { padding: 24px; flex: 1; min-width: 0; min-height: 0; overflow: scroll; overscroll-behavior: contain; }

/* ============ 首页年份选择 ============ */
.year-selector { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.year-selector label { font-size: 14px; font-weight: 600; color: var(--text); }
.year-selector select { padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); font-size: 14px; background: #fff; min-width: 130px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.year-selector select:hover { border-color: #b9c8e6; }
.year-selector select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }

/* ============ 卡片 ============ */
.card {
  background: #fff; border-radius: 12px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); margin-bottom: 20px;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-header {
  padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, #fbfcff, #fff);
  border-radius: 12px 12px 0 0;
}
.card-body { padding: 16px 18px; }

/* ============ 统计卡片 ============ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: #fff; border-radius: 12px; padding: 20px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); border-left: 4px solid var(--primary);
  position: relative; overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-card.bg-blue { border-left-color: var(--primary); }
.stat-card.bg-green { border-left-color: var(--success); }
.stat-card.bg-orange { border-left-color: var(--warning); }
.stat-card.bg-red { border-left-color: var(--danger); }
/* 5卡布局（激励查询汇总：记录数/回款笔数/回款金额/毛利/奖金包） */
.stats-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.stat-card.bg-purple { border-left-color: #7c3aed; }
.stat-card::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 68px; height: 68px; border-radius: 50%;
  background: currentColor; opacity: .06;
}
.stat-card.bg-blue::after { color: var(--primary); }
.stat-card.bg-green::after { color: var(--success); }
.stat-card.bg-orange::after { color: var(--warning); }
.stat-card.bg-red::after { color: var(--danger); }
.stat-card.bg-purple::after { color: #7c3aed; }
.stat-title { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 700; margin: 6px 0 2px; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.stat-sub { font-size: 12px; color: var(--text-muted); }
/* 首页顶部统计卡（3 列）与多指标卡内指标名 */
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 20px; }
.dash-metric-label { margin-top: 12px; font-size: 12px; color: var(--text-muted); }

.row { display: flex; gap: 20px; margin-bottom: 20px; }
.row .col-md-8 { flex: 1 1 66%; min-width: 0; }
.row .col-md-4 { flex: 1 1 34%; min-width: 0; }

/* ============ 表格 ============ */
.data-table, .simple-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td, .simple-table th, .simple-table td {
  padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef1f8; white-space: nowrap;
}
.data-table thead th, .simple-table thead th {
  background: #f6f8fc; font-weight: 600; font-size: 12.5px; color: var(--text-muted);
  letter-spacing: .15px;
  /* 表头吸顶：滚动时标题栏固定显示 */
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 0 #e6ebf6;
}
.data-table tbody tr, .simple-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover, .simple-table tbody tr:hover { background: #f2f6ff; }
.data-table tbody tr:nth-child(even) td, .simple-table tbody tr:nth-child(even) td { background: #fbfcff; }
.data-table tbody tr:nth-child(even):hover td, .simple-table tbody tr:nth-child(even):hover td { background: #f2f6ff; }
.simple-table td.num, .simple-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* 金额/数字列右对齐（渲染处给金额单元格加 class="num"） */
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.simple-table tr.total-row td { background: #f1f5f9 !important; font-weight: 600; }
.simple-table tr.total-row td strong { font-weight: 700; }
.data-table tr.total-row td, .data-table tr.search-total-row td { background: #eef3ff !important; font-weight: 600; border-top: 2px solid var(--primary); }
/* 收款-业务勾稽不合规（未关联/关联多条业务记录）整行标红提醒 */
.data-table tr.linkage-warn td { background: #fff1f0 !important; }
.data-table tr.linkage-warn:hover td { background: #ffe4e1 !important; }
.data-table tr.linkage-warn .status-danger { background: #fecaca; color: #b91c1c; font-weight: 600; }

/* 状态徽章 */
.status-badge {
  display: inline-block; padding: 2.5px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
  border: 1px solid transparent; line-height: 1.5;
}
.status-ok { background: #e7f8ee; color: #128a4a; border-color: #c8ebd6; }
.status-warning { background: #fef6e7; color: #b45309; border-color: #f8e2b8; }
.status-danger { background: #fdeaea; color: #c02626; border-color: #f8cccc; }
.status-disabled { background: #eef1f5; color: #6b7280; border-color: #dde3ea; }
/* C 类为正常业务类别，用中性浅紫徽章以示区分（不与“禁用”混淆） */
.status-neutral { background: #eef0ff; color: #4f46e5; border-color: #d5d9f8; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 7px 14px; border: 1px solid transparent; border-radius: 8px;
  font-size: 13px; cursor: pointer; transition: all .15s; font-family: inherit;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2f8bff);
  color: #fff; box-shadow: 0 3px 10px rgba(47,107,255,.28);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), #1d6be0); box-shadow: 0 5px 14px rgba(47,107,255,.36); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-success { background: var(--success); color: #fff; box-shadow: 0 3px 10px rgba(22,163,74,.24); }
.btn-success:hover { background: #128a3c; transform: translateY(-1px); }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c02626; transform: translateY(-1px); }
.btn-default { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn-default:hover { background: #f5f7fb; border-color: #b9c8e6; }
.btn-sm { padding: 4px 10px; font-size: 12px; margin-right: 4px; border-radius: 7px; }

/* ============ 工具栏 ============ */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 16px; }

/* ============ Tab切换 ============ */
.tab-bar { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 2px solid var(--border); }
.tab-btn {
  padding: 10px 24px; border: none; background: none; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s;
  font-family: inherit;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-group label { font-size: 13px; color: var(--text-muted); }
.filter-group select, .filter-group input {
  padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 13px;
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
.filter-group select:hover, .filter-group input:hover { border-color: #b9c8e6; }
.filter-group input { width: 200px; }
.filter-group select:focus, .filter-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }

/* ============ 表单 ============ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-item { display: flex; flex-direction: column; }
.form-item label { font-size: 13px; color: var(--text-muted); margin-bottom: 5px; font-weight: 500; }
.form-item input, .form-item select, .form-item textarea {
  padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 13px; font-family: inherit;
  background: #fbfcfe; transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-item input:hover, .form-item select:hover, .form-item textarea:hover { border-color: #b9c8e6; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(47,107,255,.12);
}
.form-item textarea { resize: vertical; min-height: 64px; }
.form-item.form-full { grid-column: 1 / -1; }
.form-full { grid-column: 1 / -1; }

/* ============ 组织架构树 ============ */
.org-card .card-header { display: flex; align-items: center; gap: 14px; }
.org-legend { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.org-tree { padding: 6px 0; }
.org-tree ul { list-style: none; margin-top: 6px; }
.org-tree ul ul { margin-left: 26px; border-left: 1px dashed var(--border-strong); padding-left: 18px; }
.org-tree li { position: relative; margin: 4px 0; }
.org-node {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: var(--radius);
  background: #f5f8ff; border: 1px solid var(--border); font-size: 13px;
  transition: border-color .15s, box-shadow .15s;
}
.org-node:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(47,107,255,.1); }
.org-caret { color: var(--primary); font-size: 11px; }
.org-hq { background: linear-gradient(135deg, var(--primary), #2f8bff); color: #fff; border: none; font-weight: 600; box-shadow: 0 4px 12px rgba(47,107,255,.3); }
.org-group { background: var(--primary-light); border-color: #cfe2ff; color: var(--primary-dark); font-weight: 600; }
.org-company { background: #fff; border-color: var(--border); font-weight: 600; }
.org-role { background: #f9fafb; border-style: dashed; color: var(--text-muted); }
.org-count { font-size: 11px; color: var(--primary); background: var(--primary-light); border-radius: 20px; padding: 1px 8px; }
/* 组织结构调整弹窗：行 = 序号 + 名称输入 + 删除 */
.org-adjust-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.org-adjust-idx { width: 24px; color: var(--text-muted); font-size: 12px; text-align: right; flex-shrink: 0; }
.org-adjust-name { flex: 1; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 13px; background: #fbfcfe; }
.org-adjust-name:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(47,107,255,.12); }

/* ============ 角色管理 ============ */
.role-badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--primary-light); color: var(--primary-dark); border: 1px solid transparent; }
.role-badge.role-superadmin { background: linear-gradient(135deg, var(--primary), #2f8bff); color: #fff; box-shadow: 0 3px 10px rgba(47,107,255,.26); }
.role-badge.role-hq_finance { background: #eef2ff; color: #4338ca; border-color: #d5dcf8; }
.role-badge.role-hq_svc { background: #f5f3ff; color: #6d28d9; border-color: #e3dcfb; }
.role-badge.role-ambassador { background: #e0f2fe; color: #0369a1; border-color: #c6e8fb; }
.role-badge.role-finance { background: #dcfce7; color: #15803d; border-color: #c0eed0; }
.role-badge.role-leader { background: #fef3c7; color: #b45309; border-color: #fae7ab; }
.role-scope { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; background: #f3f4f6; color: var(--text-muted); }
/* 角色权限设置表「权限范围」列：角色徽章后的（使用范围）文字 */
.role-scope-inline { margin-left: 8px; font-size: 12px; color: var(--text-muted); }
.perm-matrix th, .perm-matrix td { text-align: center; }
.perm-matrix td:first-child, .perm-matrix th:first-child { text-align: left; }
.perm-matrix th { font-size: 12px; }
.perm-yes { color: var(--success); font-weight: 700; }
.perm-no { color: #94a3b8; }
.perm-matrix tr.matrix-scope-row td { background: #f8fafc; font-size: 12px; }
.perm-matrix td.perm-scope { font-weight: 600; color: var(--primary-dark); text-align: center; }
.form-hr { grid-column: 1 / -1; border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.form-section-title { grid-column: 1 / -1; font-weight: 700; font-size: 14px; color: var(--primary); margin-top: 4px; }
.form-info { grid-column: 1 / -1; background: var(--primary-light); border: 1px solid #dbeafe; border-radius: var(--radius); padding: 10px 12px; font-size: 13px; margin-bottom: 4px; }
.system-info-item { display: flex; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.system-info-item .label { width: 140px; color: var(--text-muted); flex-shrink: 0; }
.system-info-item .value { color: var(--text); }

/* ============ 弹窗 ============ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(13,24,52,.55); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity .22s;
}
.modal-backdrop.show { opacity: 1; }
.modal {
  background: #fff; border-radius: 16px; width: 640px; max-width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(.985); transition: transform .22s cubic-bezier(.22,.8,.36,1);
}
.modal-backdrop.show .modal { transform: translateY(0) scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 22px;
  border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #fbfcff, #fff);
  border-radius: 16px 16px 0 0;
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close {
  border: none; background: none; font-size: 22px; color: var(--text-muted); cursor: pointer; line-height: 1;
  width: 30px; height: 30px; border-radius: 8px; transition: background .15s, color .15s; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--text); background: #f1f5f9; }
.modal-body { padding: 18px 22px; overflow: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); background: #fbfcff; border-radius: 0 0 16px 16px; }
.confirm-msg { font-size: 14px; color: var(--text); }

/* ============ 台账导入：重复数据确认弹窗 ============ */
.dup-list {
  margin-top: 10px; max-height: 190px; overflow-y: auto;
  border: 1px solid #fde2e2; border-radius: 8px; background: #fff8f8; padding: 4px 12px;
}
.dup-item { padding: 5px 0; border-bottom: 1px solid #fde8e8; font-size: 12.5px; color: #7f1d1d; }
.dup-item:last-child { border-bottom: none; }
.dup-more { padding: 5px 0; font-size: 12px; color: #b91c1c; }

/* ============ 顶栏微信分享按钮 ============ */
.btn-wechat { background: #07c160; color: #fff; box-shadow: 0 3px 10px rgba(7,193,96,.26); }
.btn-wechat:hover { background: #06ad56; color: #fff; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(7,193,96,.34); }
.btn-wechat svg { display: inline-block; vertical-align: -2.5px; margin-right: 5px; flex-shrink: 0; }

/* ============ 分享弹窗 ============ */
.share-modal { width: 640px; }
.share-warn {
  margin-bottom: 14px; padding: 10px 12px; border-radius: var(--radius);
  background: #fff7e6; border: 1px solid #ffe1a8; color: #92510e;
  font-size: 12.5px; line-height: 1.7;
}
.share-warn code { background: #fff; padding: 1px 5px; border-radius: 4px; border: 1px solid #ffe1a8; font-size: 11.5px; }
.share-body { display: flex; gap: 22px; align-items: flex-start; }
.share-qr-wrap {
  flex-shrink: 0; text-align: center; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff;
  box-shadow: var(--shadow-sm);
}
.share-qr { display: block; width: 190px; height: 190px; max-width: 100%; image-rendering: pixelated; }
.share-qr-tip { margin-top: 9px; font-size: 12px; color: var(--text-muted); }
.share-info { flex: 1; min-width: 0; }
.share-section-title { font-size: 13px; font-weight: 600; color: var(--text); margin: 2px 0 8px; }
.share-steps { margin: 0 0 14px 18px; padding: 0; font-size: 13px; line-height: 1.9; color: #334155; }
.share-url-row { display: flex; gap: 8px; margin-bottom: 12px; }
.share-url-input {
  flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 12.5px; font-family: inherit; color: var(--text); background: #fbfcfe;
  transition: border-color .15s, box-shadow .15s;
}
.share-url-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,107,255,.12); background: #fff; }
.share-native-btn { margin-bottom: 16px; }
.share-accts { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 2px 12px; }
.share-acct-row {
  display: flex; gap: 12px; align-items: baseline; padding: 7px 0;
  border-bottom: 1px solid #f1f5f9; font-size: 12.5px;
}
.share-acct-row:last-child { border-bottom: none; }
.share-acct-u { font-weight: 600; color: var(--primary-dark); min-width: 52px; }
.share-acct-p { color: var(--text-muted); min-width: 52px; }
.share-acct-label { color: var(--text-muted); font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 680px) {
  .share-body { flex-direction: column; align-items: center; }
  .share-info { width: 100%; }
  .share-modal { width: auto; }
}

/* ============ toast ============ */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translate(-50%, -20px);
  padding: 11px 20px; border-radius: 10px; color: #fff; font-size: 14px;
  z-index: 200; opacity: 0; transition: all .3s; box-shadow: var(--shadow-lg);
  pointer-events: none; max-width: min(80vw, 420px);
  white-space: normal; word-break: break-word; text-align: center; line-height: 1.5;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warn { background: var(--warning); }
.toast.info { background: var(--primary); }

/* ============ 账务汇总条 ============ */
.account-summary { display: flex; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.summary-item {
  background: #fff; border-radius: 12px; padding: 12px 18px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); display: flex; align-items: baseline; gap: 10px;
  transition: box-shadow .15s;
}
.summary-item:hover { box-shadow: var(--shadow); }
.summary-item .label { font-size: 13px; color: var(--text-muted); }
.summary-item .value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary-item .value.green { color: var(--success); }
.summary-item .value.red { color: var(--danger); }

/* ============ 查询 ============ */
.filter-panel .filter-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-item { display: flex; flex-direction: column; }
.filter-item label { font-size: 12px; color: var(--text-muted); margin-bottom: 5px; font-weight: 500; }
.filter-item select, .filter-item input { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 13px; min-width: 150px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.filter-item select:focus, .filter-item input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.filter-item.filter-keyword input { min-width: 280px; }
.filter-actions { display: flex; gap: 10px; margin-top: 4px; }

/* ============ 通用公司选择（可输入 + 下拉） ============ */
.cs-wrap { position: relative; display: inline-flex; align-items: center; min-width: 180px; }
.cs-wrap .cs-input {
  width: 100%; min-width: 180px; padding: 7px 30px 7px 10px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 13px; background: #fff; transition: border-color .2s, box-shadow .15s;
}
.cs-wrap .cs-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.cs-arrow {
  position: absolute; right: 9px; top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 0; height: 0; border-left: 5px solid transparent;
  border-right: 5px solid transparent; border-top: 6px solid var(--text-muted);
  cursor: pointer; transition: transform .2s;
}
.cs-arrow.open { transform: translateY(-50%) rotate(180deg); }
.cs-dropdown {
  position: fixed; z-index: 99999;
  display: none; width: 220px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.cs-item { padding: 8px 12px; cursor: pointer; font-size: 13px; white-space: nowrap; transition: background .12s, color .12s; }
.cs-item:hover { background: var(--primary-light); color: var(--primary); }
.cs-item.cs-empty { color: var(--text-muted); cursor: default; }

/* ============ 表格宽度与横向滚动（由页面滚动条统一横向拉动） ============ */
/* 所有表格按内容撑开宽度，超宽时页面级出现横向滚动条（即“页面的移动条”） */
#mainContent table { min-width: max-content; }
/* 预算管理表格：指标名较长，表头/单元格允许换行，整表保持在页面内不横向溢出 */
#mainContent .simple-table.budget-table { min-width: 0; width: 100%; }
#mainContent .simple-table.budget-table th,
#mainContent .simple-table.budget-table td { white-space: normal; word-break: break-word; }
#mainContent .simple-table.budget-table td.num { white-space: nowrap; }
/* 预算管理表格：指标列居中，表头可点击升/降序 */
#mainContent .simple-table.budget-table th,
#mainContent .simple-table.budget-table td { text-align: center; }
#mainContent .simple-table.budget-table th.budget-name,
#mainContent .simple-table.budget-table td.budget-name { text-align: left; }
#mainContent .simple-table.budget-table th.bsortable { cursor: pointer; user-select: none; }
#mainContent .simple-table.budget-table th.bsortable:hover,
#mainContent .simple-table.budget-table th.bsortable.active { color: var(--primary); }
/* 预算管理：年度挑战目标合计条 */
.budget-challenge { padding: 10px 14px; margin-bottom: 14px; background: var(--primary-light); border-radius: 8px; font-size: 13px; color: var(--primary); font-weight: 600; }
.result-count { font-size: 13px; color: var(--text-muted); font-weight: 400; }
.search-table td { white-space: normal; }
/* 查询结果合计行 */
.search-total-row td { background: var(--primary-light) !important; font-weight: 700; border-top: 2px solid var(--primary); }
.search-total-label { color: var(--primary); }
.search-total-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============ 欠收列表 ============ */
.unpaid-list { display: flex; flex-direction: column; gap: 8px; }
.unpaid-item {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px;
  cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
}
.unpaid-item:hover { background: #f9fafb; border-color: var(--primary); box-shadow: 0 2px 8px rgba(47,107,255,.08); }
.unpaid-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.unpaid-head .due-amt { color: var(--danger); font-weight: 700; font-variant-numeric: tabular-nums; }
.unpaid-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ============ 自定义滚动条 ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c6d2e8; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #a9bce0; }
::-webkit-scrollbar-track { background: transparent; }
#sidebarMenu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); }
#sidebarMenu::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); }

/* ============ 键盘可访问性 ============ */
.btn:focus-visible, .btn-login:focus-visible, .form-item input:focus-visible,
.filter-group input:focus-visible, .filter-item input:focus-visible,
#sidebarMenu li:focus-visible, .tab-btn:focus-visible,
th[class*="sortable"]:focus-visible, .cs-item:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}

/* ============ 打印样式（便于报表打印） ============ */
@media print {
  .sidebar, .topbar, .toolbar, .filter-actions, .btn, .modal-backdrop, .toast, .app-footer { display: none !important; }
  .main-layout { display: block; height: auto; overflow: visible; }
  .main { height: auto; }
  .main-content { padding: 0; overflow: visible; }
  .card { box-shadow: none; border: 1px solid var(--border); }
  body { background: #fff; }
  #mainContent table { width: 100% !important; min-width: 0 !important; }
  #mainContent th, #mainContent td { white-space: normal !important; font-size: 11px; padding: 6px 8px; }
  #mainContent .simple-table.budget-table th,
  #mainContent .simple-table.budget-table td { white-space: normal; }
}

/* ============ 管理视窗优化 ============ */
/* 顶部筛选面板（年份/月份/项目） */
.dash-filter {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(135deg, #ffffff, #f5f8ff);
  border: 1px solid #e2ebfd; border-radius: 14px;
  padding: 14px 18px; margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.dash-filter label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.dash-filter select {
  border: 1px solid #d7e3f8; border-radius: 8px; padding: 8px 12px; font-size: 13px;
  background: #fff; min-width: 122px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.dash-filter select:hover { border-color: #b9c8e6; }
.dash-filter select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }

/* 顶部统计卡：彩色渐变边条 + 图标角标 + 主数值 + 指标行 + 迷你进度条 */
.dash-grid { gap: 18px; }
.dash-stat {
  position: relative; overflow: hidden; border-radius: 16px; padding: 18px 20px;
  background: linear-gradient(165deg, #ffffff, #f6f9ff);
  border: 1px solid #e7eefc; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.dash-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.dash-stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--primary);
}
.dash-stat.bg-orange::before { background: linear-gradient(180deg, #fbbf24, #f97316); }
.dash-stat.bg-red::before { background: linear-gradient(180deg, #f87171, #ef4444); }
.dash-stat.bg-blue::before { background: linear-gradient(180deg, #60a5fa, #2f6bff); }
.dash-stat::after {
  content: ""; position: absolute; right: -22px; top: -22px; width: 96px; height: 96px; border-radius: 50%;
  background: currentColor; opacity: .05;
}
.dash-stat.bg-orange::after { color: var(--warning); }
.dash-stat.bg-red::after { color: var(--danger); }
.dash-stat.bg-blue::after { color: var(--primary); }
.dash-stat-head { display: flex; align-items: center; justify-content: space-between; }
.dash-stat-title { font-size: 14px; font-weight: 700; color: var(--text); }
.dash-stat-icon {
  width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff; box-shadow: 0 4px 12px rgba(16,34,74,.16);
}
.bg-orange .dash-stat-icon { background: linear-gradient(135deg, #fbbf24, #f97316); }
.bg-red .dash-stat-icon { background: linear-gradient(135deg, #f87171, #ef4444); }
.bg-blue .dash-stat-icon { background: linear-gradient(135deg, #60a5fa, #2f6bff); }
.dash-stat-label { margin-top: 14px; font-size: 12px; color: var(--text-muted); font-weight: 500; }
.dash-stat-num { margin-top: 2px; font-size: 32px; font-weight: 800; letter-spacing: -.6px; color: var(--text); font-variant-numeric: tabular-nums; }
.dash-stat-sub { margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.dash-stat-row {
  display: flex; align-items: baseline; gap: 8px; margin-top: 12px;
  padding-top: 12px; border-top: 1px dashed #e7eefc;
}
.dash-row-lbl { font-size: 12px; color: var(--text-muted); flex: none; }
.dash-row-val { font-size: 16px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.dash-row-sub { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.dash-progress { height: 6px; border-radius: 3px; background: #edf2fa; margin-top: 12px; overflow: hidden; }
.dash-progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--primary), #38bdf8); transition: width .4s ease; }
.bg-orange .dash-progress-fill { background: linear-gradient(90deg, #f59e0b, #fb923c); }
.bg-red .dash-progress-fill { background: linear-gradient(90deg, #ef4444, #f87171); }
.bg-blue .dash-progress-fill { background: linear-gradient(90deg, #2f6bff, #60a5fa); }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .stats-grid, .stats-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .row { flex-direction: column; }
  .sidebar { width: 64px; }
  .sidebar-brand .brand-name, .sidebar-brand .brand-sub, .sidebar-user .user-info, #sidebarMenu li span.txt { display: none; }
  .sidebar-brand { justify-content: center; padding: 18px 0; }
  .sidebar-user { justify-content: center; padding: 14px 0; }
  #sidebarMenu li { justify-content: center; }
  #sidebarMenu li.active::before { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stats-grid, .stats-grid.cols-5 { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .main-content { padding: 14px; }
  /* 窄屏顶栏收敛：隐藏欢迎语，只保留头像/徽章与退出，避免溢出 */
  .topbar { padding: 0 12px; }
  .topbar-user .welcome-text { display: none; }
}

/* ============ 激励计算 ============ */
.incentive-badge {
  font-size: 12px; font-weight: 400; color: var(--warning);
  background: #fef3c7; padding: 2px 10px; border-radius: 20px; margin-left: 10px;
}
.incentive-calc-grid {
  display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start;
}
.incentive-form-panel { min-width: 0; }
.incentive-form-actions {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.incentive-edit-hint { font-size: 12px; color: var(--warning); }
.form-hint { font-size: 11px; color: var(--text-muted); margin-left: 6px; }

.incentive-preview-panel {
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; position: sticky; top: 80px;
  box-shadow: var(--shadow-sm);
}
.inc-preview-card { display: flex; flex-direction: column; gap: 8px; }
.inc-preview-title { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.inc-bonus-pool {
  display: flex; align-items: baseline; gap: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius); padding: 14px 16px; color: #fff;
  box-shadow: 0 6px 18px rgba(47,107,255,.28);
}
.inc-bp-label { font-size: 13px; opacity: .9; }
.inc-bp-value { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.inc-accrual-desc { font-size: 13px; color: var(--primary); font-weight: 500; }
.inc-base-info { font-size: 12px; color: var(--text-muted); }
.inc-dist-table { margin-top: 8px; }
.inc-dist-table th { font-size: 12px; }
.inc-dist-table td { font-size: 13px; white-space: nowrap; }
.inc-dist-table td:last-child { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.inc-warn { font-size: 12px; color: var(--danger); background: #fee2e2; padding: 6px 10px; border-radius: 6px; margin-top: 4px; }

.inc-rules-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; }
.inc-rules-block h4 { font-size: 14px; color: var(--primary); margin-bottom: 6px; }
.inc-rules-note { font-size: 12px; color: var(--warning); margin-bottom: 8px; }
.inc-rules-block .simple-table { font-size: 12px; }
.inc-rules-block .simple-table td { white-space: normal; line-height: 1.6; }

.inc-detail { display: flex; flex-direction: column; gap: 4px; }
.inc-detail-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.inc-detail-row span { color: var(--text-muted); }
.inc-detail-row strong { color: var(--text); }
.inc-bonus-highlight {
  display: flex; justify-content: space-between; align-items: baseline;
  background: var(--primary-light); border-radius: var(--radius); padding: 10px 14px; margin: 8px 0;
}
.inc-bonus-highlight span { font-size: 13px; color: var(--text-muted); }
.inc-bonus-highlight strong { font-size: 20px; color: var(--primary); }

/* 激励查询面板 */
.inc-query-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
}
.inc-query-row .filter-group select { min-width: 120px; }
.inc-query-row .btn { height: 34px; padding: 0 16px; }

/* 角色分配汇总 */
.inc-role-summary .simple-table { font-size: 13px; }
.inc-role-summary .simple-table th { background: var(--primary-light); }
.inc-role-summary .simple-table td { padding: 8px 12px; }
.inc-role-summary .simple-table td:nth-child(2),
.inc-role-summary .simple-table td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }

/* 激励明细表 */
.inc-detail-table { font-size: 13px; }
.inc-detail-table th { white-space: nowrap; }
.inc-detail-table td { white-space: nowrap; }
.inc-detail-table td:nth-child(6),
.inc-detail-table td:nth-child(7),
.inc-detail-table td:nth-child(8),
.inc-detail-table td:nth-child(9),
.inc-detail-table td:nth-child(11) { text-align: right; font-variant-numeric: tabular-nums; }

/* 计算追溯公式 */
.inc-trace-formula {
  font-size: 14px; font-weight: 500; color: var(--text);
  background: var(--primary-light); border-radius: var(--radius);
  padding: 10px 14px; margin: 6px 0;
  font-variant-numeric: tabular-nums;
  border: 1px solid #dbeafe;
}
.inc-trace-formula strong { color: var(--primary); font-size: 16px; }

/* ============ 分页 ============ */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0 2px; gap: 10px; flex-wrap: wrap;
}
.pagination .page-info { font-size: 12px; color: var(--text-muted); }
.pagination .page-btns { display: flex; gap: 4px; }
.pagination .btn-sm { min-width: 32px; padding: 4px 8px; font-size: 12px; border-radius: 7px; }
.pagination .btn-sm:not(.disabled):hover { border-color: var(--primary); color: var(--primary); }
.pagination .btn-sm.disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ 表头固定（页面纵向滚动时，表格“标题栏”锁定在顶部） ============ */
#mainContent table thead th {
  position: sticky; top: 0; z-index: 10;
  background: #f6f8fc !important;
  box-shadow: inset 0 -1px 0 var(--border), inset 0 1px 0 rgba(255,255,255,.8);
}

/* ============ 数字右对齐 ============ */
.data-table td { font-variant-numeric: tabular-nums; }

/* ============ 动效降级（尊重系统减弱动态效果设置） ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
