/* 人力资源外包运营管理系统 - 简约精致主题 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #eef1f6;
  --main: #1677ff;
  --main-d: #0958d9;
  --main-soft: #eaf2ff;
  --btn-primary: #1677ff;
  --btn-primary-d: #0958d9;
  --btn-danger: #f5564a;
  --btn-danger-d: #d83a2e;
  --text: #1d2129;
  --sub: #8a94a6;
  --red: #f53f3f;
  --yellow: #ff9a2e;
  --green: #21c06b;
  --shadow-sm: 0 1px 3px rgba(20,30,60,.04);
  --shadow: 0 4px 18px rgba(20,30,60,.06);
  --shadow-lg: 0 10px 40px rgba(20,30,60,.10);
  --radius: 14px;
  --radius-sm: 9px;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.65;
}
/* 全局细窄滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
#app { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
  width: 232px; min-width: 232px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh;
  box-shadow: 1px 0 12px rgba(20,30,60,.03);
}
.logo { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.35; margin-bottom: 24px; padding: 0 8px 0 6px; }
.logo span { font-size: 14px; color: var(--sub); font-weight: 500; }
#nav { display: flex; flex-direction: column; gap: 4px; }
#nav a {
  text-decoration: none; color: #4a5568; padding: 10px 14px; border-radius: 10px; font-weight: 500; font-size: 13.5px;
  transition: all .18s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative;
  border-left: 3px solid transparent;
}
#nav a:hover { background: var(--main-soft); color: var(--main); border-left-color: var(--main); }
#nav a.active { background: linear-gradient(135deg, var(--main) 0%, #3b8cff 100%); color: #fff; box-shadow: 0 4px 12px rgba(22,119,255,.28); border-left-color: transparent; }
/* 商务合同管理折叠菜单 */
.nav-group { display: flex; flex-direction: column; }
.nav-group .nav-parent {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: #4a5568; padding: 10px 14px; border-radius: 10px;
  font-weight: 500; font-size: 13.5px; cursor: pointer; transition: all .18s;
  border-left: 3px solid transparent; user-select: none;
}
.nav-group .nav-parent:hover { background: var(--main-soft); color: var(--main); border-left-color: var(--main); }
.nav-group.collapsed .nav-children { display: none; }
.nav-group .nav-caret { margin-left: auto; font-size: 11px; color: var(--sub); transition: transform .18s; }
.nav-group:not(.collapsed) .nav-caret { transform: rotate(90deg); }
.nav-group .nav-children { display: flex; flex-direction: column; gap: 2px; padding-left: 8px; margin-top: 2px; }
.nav-group .nav-children a { padding-left: 22px; font-size: 13px; }
.nav-group .nav-children a.active { box-shadow: none; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; }
.role-label { font-size: 11px; color: var(--sub); margin-bottom: 6px; letter-spacing: 1px; }
.role-tip { font-size: 11px; color: var(--sub); margin-top: 8px; line-height: 1.5; }
.biz-checks { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; flex: 1; }
.biz-checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text); white-space: nowrap; cursor: pointer; }
.biz-checks label input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; margin: 0; cursor: pointer; }

/* 主区 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#app { display: flex; min-height: 100vh; overflow-x: clip; }
body.client-mode .sidebar { display: none; }
body.client-mode .main { min-width: 0; }
.client-title { font-size: 19px; font-weight: 600; margin-bottom: 2px; }
.client-toolbar-right { display: flex; gap: 10px; align-items: center; }
.client-search { width: 220px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; background: #fff; }
.client-search:focus { outline: none; border-color: var(--main); box-shadow: 0 0 0 3px rgba(22,119,255,.10); }
.search-wrap { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.search-wrap .search-icon { padding: 0 6px 0 12px; font-size: 15px; opacity: .45; line-height: 1; flex-shrink: 0; }
.search-wrap input { width: 260px; min-width: 0; padding: 0 12px 0 4px; height: 36px; box-sizing: border-box; border: none; font-size: 14px; background: transparent; }
.search-wrap:focus-within { border-color: var(--main); box-shadow: 0 0 0 3px rgba(22,119,255,.10); }

.pay-search { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.gen-emp .lockzero { color: #b0b8c8; font-size: 12px; }
.gen-emp td .gen-in:disabled { background: #f3f5f9; color: #b0b8c8; }
.gen-emp .gen-five-chk:disabled { opacity: .5; }
.pay-search input { flex: 1; max-width: 320px; min-width: 180px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; }
.pay-search input:focus { outline: none; border-color: var(--main); box-shadow: 0 0 0 3px rgba(22,119,255,.10); }
.pay-items tr.pay-hl td { background: #fff6d6 !important; }
.client-table { table-layout: fixed; width: auto; }
.client-table th, .client-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-table th:nth-child(1), .client-table td:nth-child(1) { width: 48px; text-align: center; }
.client-table th:nth-child(2), .client-table td:nth-child(2) { width: 85px; text-align: left; }
.client-table th:nth-child(3), .client-table td:nth-child(3) { width: 190px; text-align: left; }
.client-table th:nth-child(4), .client-table td:nth-child(4) { width: 145px; text-align: left; }
.client-table th:nth-child(5), .client-table td:nth-child(5),
.client-table th:nth-child(6), .client-table td:nth-child(6) { width: 120px; text-align: center; }
.client-table th:nth-child(7), .client-table td:nth-child(7) { width: 80px; text-align: center; }
.client-table th:nth-child(8), .client-table td:nth-child(8) { width: 110px; text-align: center; }
.topbar {
  height: 58px; background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 5;
}
.crumb { font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.today { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.25; font-variant-numeric: tabular-nums; }
.today-date { color: var(--text, #1d2129); font-size: 14px; font-weight: 700; letter-spacing: .3px; }
.today-time { color: var(--main, #2f54eb); font-size: 14px; font-weight: 700; letter-spacing: .5px; }
.top-right { display: flex; align-items: center; gap: 12px; }
.top-right .btn.ghost.sm { padding: 5px 12px; font-size: 12px; }
/* 顶部待办提醒胶囊条 */
.my-summary { display: inline-flex; align-items: center; gap: 6px; }
.ms-chip { font-size: 12px; line-height: 1; padding: 5px 9px; border-radius: 12px; cursor: pointer; white-space: nowrap; font-weight: 500; transition: .15s; user-select: none; }
.ms-chip:hover { filter: brightness(.97); }
.ms-near { background: #fff7e6; color: #d48806; border: 1px solid #ffe7ba; }
.ms-over { background: #fff1f0; color: #cf1322; border: 1px solid #ffccc7; }
.ms-pending { background: #e6f4ff; color: #1677ff; border: 1px solid #bae0ff; }
.period-bar { flex: 1; display: flex; justify-content: center; align-items: center; }
.period-picker { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); padding: 5px 12px; border-radius: 10px; border: 1px solid var(--line); user-select: none; cursor: default; }
.period-picker b { font-size: 14px; }
.period-month { min-width: 38px; text-align: center; }
.period-goto { margin-left: 6px; }
.period-year, .period-month { border: none; background: transparent; font-weight: 600; font-size: 14px; color: var(--text); cursor: pointer; outline: none; padding: 0 4px; }
.contract-term-row { align-items: center; gap: 10px; }
.contract-term-row label:empty { width: 100px; flex-shrink: 0; }
.term-chk {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  user-select: none;
}
.term-chk input {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.term-chk .chk-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--sub);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  background: #fff;
  flex-shrink: 0;
}
.term-chk:hover .chk-box { border-color: var(--main); }
.term-chk input:checked + .chk-box { background: var(--main); border-color: var(--main); }
.term-chk input:checked + .chk-box::after {
  content: "";
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.view { padding: 24px 26px; }

/* 卡片 */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(238,241,246,.9); padding: 20px 22px; margin-bottom: 18px; }
.card h3 { font-size: 15px; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; font-weight: 650; }
.doc-collapse-h { cursor: pointer; user-select: none; margin-bottom: 15px; transition: color .15s; }
.doc-collapse-h:hover { color: var(--main); }
.doc-arrow { display: inline-block; font-size: 11px; color: var(--sub); opacity: .85; transition: transform .15s; }
.doc-collapse-h:hover .doc-arrow { color: var(--main); }
.doc-count { font-size: 12px; font-weight: 400; color: var(--sub); margin-left: 6px; }
/* 配置后台栏目折叠 */
.card.collapsible .card-head { cursor: pointer; user-select: none; justify-content: space-between; align-items: center; text-align: left; margin-bottom: 15px; transition: margin-bottom .2s ease; }
.card.collapsible .card-head .card-title { flex: 1; text-align: left; }
.card.collapsible .card-head .caret { font-size: 12px; color: var(--muted); transition: transform .2s ease; }
.card.collapsible.collapsed .card-head { margin-bottom: 0; }
.card.collapsible.collapsed .card-head .caret { transform: rotate(-90deg); }
.card.collapsible.collapsed .card-body { display: none; }

/* 项目管理列表行内展开 */
.proj-table .expand-col { text-align: center; vertical-align: middle; width: 40px; }
.proj-table .expand-arrow { display: inline-block; cursor: pointer; color: var(--main); font-size: 12px; transition: transform .2s ease; user-select: none; }
.proj-table .expand-arrow.expanded { transform: rotate(90deg); }
.proj-table tr.detail-row { background: transparent; }
.proj-table tr.detail-row > td { padding: 0 0 12px 0; border: none; }
.detail-inline-wrap { padding: 16px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(238,241,246,.9); }
.detail-inline-wrap .detail-head { margin-top: 0; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
@media (max-width: 860px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
.kpi { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm), var(--shadow); border: 1px solid rgba(238,241,246,.9); padding: 18px 20px; position: relative; overflow: hidden; transition: .2s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--main), #3b8cff); opacity: .85; }
.kpi .num { font-size: 27px; font-weight: 750; line-height: 1.25; letter-spacing: -.3px; }
.kpi .lab { font-size: 12px; color: var(--sub); margin-top: 5px; }
.kpi.red::before { background: linear-gradient(180deg, #f5564a, #ff8a7a); }
.kpi.yellow::before { background: linear-gradient(180deg, #ff9a2e, #ffc069); }
.kpi.blue::before { background: linear-gradient(180deg, #1677ff, #3b8cff); }
.kpi.green::before { background: linear-gradient(180deg, #21c06b, #61d99a); }
.kpi.red .num { color: var(--red); }
.kpi.yellow .num { color: var(--yellow); }
.kpi.blue .num { color: var(--main); }
.kpi.green .num { color: var(--green); }

/* 状态徽章 */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; letter-spacing: .2px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-done { color: #16a34a; background: #eafbef; }
.st-green { color: #389e0d; background: #f2fbe9; }
.st-yellow { color: #ad6800; background: #fff7e6; }
.st-red { color: #d93036; background: #fff0ef; }
.st-blue { color: #1d6ad1; background: #eef6ff; }
.st-pending { color: #5b6472; background: #f3f4f7; }
.st-active { color: #389e0d; background: #f6ffed; }
.st-closed { color: #0e6fd8; background: #e9f4ff; }
.st-plain { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap; color: #5b6472; background: #f3f4f7; }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; margin-left: 4px; box-shadow: 0 2px 6px rgba(245,63,63,.35); }

/* 表格 */
.card:has(table) { overflow-x: auto; }
/* 老旧浏览器（不支持 :has）兜底：让含表格的卡片也能横向滚动，避免宽表格溢出 */
@supports not (selector(:has(*))) {
  .card { overflow-x: auto; }
}
table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto; min-width: max-content; }
th, td { text-align: center; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { color: #4a5568; font-weight: 650; background: #f2f5fa; font-size: 12.5px; letter-spacing: .3px; border-bottom: 1.5px solid #e2e8f0; }
tbody tr:nth-child(even) td { background: #fafbfd; }
tbody tr:hover td { background: #f0f7ff !important; }
tbody tr:last-child td { border-bottom: none; }
.proj-table th, .proj-table td { text-align: center; vertical-align: middle; }
.proj-table .ops { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: nowrap; }
.proj-table .ops.ops-stack { flex-direction: column; flex-wrap: nowrap; }
.proj-table .ops-row { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.emp-table th, .emp-table td { text-align: center; }


/* 按钮：统一主色蓝，悬浮微上浮 */
.btn {
  display: inline-block; padding: 8px 18px; border-radius: var(--radius-sm); border: 1px solid var(--btn-primary);
  background: linear-gradient(135deg, var(--btn-primary) 0%, #2f8bff 100%); color: #fff; cursor: pointer; font-size: 14px;
  transition: .18s; box-shadow: 0 3px 10px rgba(22,119,255,.20); font-weight: 500;
}
.btn:hover { background: linear-gradient(135deg, var(--btn-primary-d) 0%, #1f7af2 100%); border-color: var(--btn-primary-d); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(22,119,255,.30); }
.btn:active { transform: translateY(1px) scale(.98); box-shadow: none; }
.btn.ghost { background: #fff; color: var(--main); border-color: #bcd4ff; box-shadow: none; }
.btn.ghost:hover { background: var(--main-soft); border-color: var(--main); transform: translateY(-1px); box-shadow: none; }
/* 显式定义 primary（此前未定义 = 空类，导致标签页"选中/未选中"看不出差别） */
.btn.primary { background: linear-gradient(135deg, var(--btn-primary) 0%, #2f8bff 100%); color: #fff; border-color: var(--btn-primary); box-shadow: 0 3px 10px rgba(22,119,255,.20); }
.btn.sm { padding: 6px 13px; font-size: 13px; }
.btn.danger { background: #fff; color: var(--btn-danger); border-color: #f3c1bd; box-shadow: none; }
.btn.danger:hover { background: #fff1f0; border-color: var(--btn-danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
td .btn.sm, .ops .btn.sm { margin-right: 4px; }
/* 表格/操作列里的小按钮改用浅底中性色，避免满屏红蓝 */
td .btn, .ops .btn { background: #f6f8fb; color: #4a5568; border-color: #e3e8f0; box-shadow: none; }
td .btn:hover, .ops .btn:hover { background: #ecf1f8; color: #2f3a4a; transform: none; border-color: #d6deea; }
td .btn.danger, .ops .btn.danger { background: #fdf2f1; color: #c0453b; border-color: #f0cdc9; }
td .btn.danger:hover, .ops .btn.danger:hover { background: #fbe5e3; border-color: #e5a8a1; }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 0 14px; height: 40px; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; background: #fff; transition: .15s; }
.toolbar input:focus, .toolbar select:focus,
.filter-bar input:focus, .filter-bar select:focus {
  outline: none; border-color: var(--main); box-shadow: 0 0 0 3px rgba(22,119,255,.10);
}
.toolbar .btn.sm, .filter-bar .btn.sm { padding: 8px 16px; font-size: 14px; }
.toolbar .slim { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 14px; color: #4a5568; }
.toolbar .date-picker-wrap { flex: none; }
.toolbar .date-picker-wrap .date-input { height: 40px; }
.sec-tabs { display: inline-flex; background: #eef2f7; border-radius: var(--radius-sm); padding: 3px; gap: 4px; margin-bottom: 14px; }
.sec-tab { padding: 7px 18px; border-radius: calc(var(--radius-sm) - 2px); font-size: 14px; color: var(--muted); text-decoration: none; transition: .15s; }
.sec-tab:hover { color: var(--text); }
.sec-tab.on { background: #fff; color: var(--main); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* 项目管理 tab 切换（次级，弱于上方操作按钮，选中态用浅蓝区分实心主按钮） */
.proj-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.proj-tabs .tab {
  padding: 5px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--sub);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: .15s; text-decoration: none;
}
.proj-tabs .tab::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #9aa4b2; margin-right: 6px; vertical-align: 1px;
}
.proj-tabs .tab:hover { border-color: var(--main); color: var(--main); }
.proj-tabs .tab:hover::before { background: var(--main); }
.proj-tabs .tab.active { background: #eaf2ff; color: var(--main); border-color: #bcd4ff; box-shadow: none; }
.proj-tabs .tab.active::before { background: var(--main); }

/* 时间轴 */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 8px 0 8px 14px; border-bottom: 1px dashed var(--line); }
.tl-item::before { content: ""; position: absolute; left: -16px; top: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--main); }
.tl-item.red::before { background: var(--red); }
.tl-item.yellow::before { background: var(--yellow); }
.tl-date { font-size: 12px; color: var(--sub); }
/* 已完成分组：默认折叠成一行提示，点击展开历史明细 */
.tl-done { margin-top: 10px; border: 1px dashed var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; }
.tl-done-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 13px; color: var(--sub); background: var(--bg, #f7f8fa); user-select: none; }
.tl-done-head:hover { color: var(--main); }
.tl-done-arrow { font-size: 12px; }
.tl-done-body { padding-left: 18px; background: #fff; cursor: default; }
/* 客户查询中心 */
.card-h { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 10px; }
.staff-chart { margin: 8px 0 14px; }
.staff-table { overflow-x: auto; }
.staff-table table { width: 100%; border-collapse: collapse; }
.staff-table th, .staff-table td { border: 1px solid var(--line); padding: 7px 8px; text-align: center; font-size: 13px; white-space: nowrap; }
.staff-table thead th { background: var(--bg, #f7f8fa); color: var(--sub); font-weight: 600; }
.staff-table .st-proj { text-align: left; font-weight: 600; color: #333; }
.staff-table .st-cell { cursor: default; color: #555; }
.staff-table tr.st-total td { background: #f0f5ff; font-weight: 600; color: #1677ff; }
.staff-table .st-cell:hover { background: #e6f4ff; color: #1677ff; }

/* 项目网格 */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 16px; }
.proj { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 17px 19px; cursor: pointer; transition: .2s; border: 1px solid rgba(238,241,246,.9); }
.proj:hover { border-color: #bcd4ff; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.proj .pname { font-size: 15px; font-weight: 650; margin-bottom: 6px; }
.proj .pmeta { font-size: 12px; color: var(--sub); }
.proj .ptags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

/* 详情 */
.back { color: var(--main); cursor: pointer; font-size: 13px; margin-bottom: 12px; display: inline-block; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.detail-head > div:first-child { flex: 1; text-align: left; }
.detail-head .pname { text-align: left; }
.detail-head .meta-row { font-size: 13px; color: var(--sub); margin-top: 6px; text-align: left; }
.meta-row b { color: var(--text); font-weight: 600; }

/* 进度条 */
.bar { height: 8px; background: #edf0f6; border-radius: 6px; overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--main), #3b8cff); border-radius: 6px; }

/* 权限提示 */
.deny { text-align: center; padding: 60px 20px; color: var(--sub); }
.deny .big { font-size: 40px; margin-bottom: 10px; }

/* 编辑表单 */
.edit input, .edit select { width: 100%; padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; background: #fbfcfe; transition: .15s; }
.edit td { vertical-align: middle; }
.row-done { opacity: .55; }
.row-done a { text-decoration: line-through; color: var(--sub) !important; }

.flash { position: fixed; top: 18px; left: 50%; transform: translateX(-50%) translateY(-6px); background: rgba(29,33,41,.92); -webkit-backdrop-filter: blur( 6px); backdrop-filter: blur(6px); color: #fff; padding: 10px 20px; border-radius: 10px; font-size: 13px; z-index: 99; opacity: 0; transition: .25s; box-shadow: 0 8px 24px rgba(20,30,60,.18); }
.flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.flash.flash-success { background: #16a34a; box-shadow: 0 8px 24px rgba(22,163,74,.35); }
.muted { color: var(--sub); font-size: 12px; }
.empty { text-align: center; color: var(--sub); padding: 48px 20px; font-size: 13.5px; }
.empty::before { content: "📭"; display: block; font-size: 32px; margin-bottom: 10px; opacity: .5; }
.pending-banner { background: linear-gradient(135deg, #fffbe8 0%, #fff8e0 100%); border: 1px solid #ffe58f; color: #8a6100; padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm); }
.pending-banner button { margin-left: 12px; }
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filter-bar select, .filter-bar input { min-width: 180px; padding: 9px 14px; font-size: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: .15s; }

/* 弹窗 */
.modal { display: none; position: fixed; inset: 0; z-index: 50; }
.modal-bg { position: absolute; inset: 0; background: rgba( 15,23,42,.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modal-card { position: relative; background: var(--card); border-radius: 16px; width: 480px; max-width: 90%; max-height: 90vh; overflow-y: auto; margin: 80px auto; padding: 24px 26px; box-shadow: var(--shadow-lg); border: 1px solid rgba(238,241,246,.8); }
.modal-card h3 { margin-bottom: 16px; font-size: 16px; font-weight: 650; padding-bottom: 14px; border-bottom: 1px solid var(--line); }

/* 登录 / 注册 覆盖层 */
#auth-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #1a2a4a 0%, #2d4a7c 50%, #1e3a5f 100%);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  padding: 20px;
}
#auth-overlay::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0%, transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(255,255,255,.06) 0%, transparent 40%);
  pointer-events: none;
}
.auth-card {
  position: relative;
  background: var(--card); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  width: 440px; max-width: 100%;
  overflow: hidden;
}
.auth-brand {
  background: linear-gradient(135deg, var(--main) 0%, #3b82f6 100%);
  color: #fff; text-align: center; padding: 36px 28px 30px;
}
.auth-logo {
  width: 56px; height: 56px; margin: 0 auto 14px;
  background: rgba(255,255,255,.18); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; letter-spacing: 1px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.auth-system { font-size: 22px; font-weight: 700; margin-bottom: 8px; letter-spacing: .5px; }
.auth-subtitle { font-size: 13px; opacity: .9; }
.auth-tabs {
  display: flex;
  margin: 24px 32px 0;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 12px;
  gap: 4px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--sub);
  cursor: pointer;
  border-radius: 10px;
  transition: .15s;
  user-select: none;
}
.auth-tab:hover { color: var(--main); }
.auth-tab.on {
  background: #fff;
  color: var(--main);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.auth-form { padding: 24px 32px 32px; }
.auth-field { margin-bottom: 18px; }
.auth-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--sub); margin-bottom: 6px; letter-spacing: .5px;
}
.auth-field input, .auth-field select {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; transition: .15s; background: #fafbfc;
}
.auth-field input:focus, .auth-field select:focus {
  outline: none; border-color: var(--main); background: #fff;
  box-shadow: 0 0 0 3px rgba(22,119,255,.08);
}
.auth-code { display: flex; gap: 10px; }
.auth-code input { flex: 1; }
.auth-code button {
  white-space: nowrap; padding: 0 16px;
  background: #fff; color: var(--main);
  border: 1px solid var(--main); border-radius: 10px;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: .15s;
}
.auth-code button:hover { background: var(--main); color: #fff; }
.auth-msg {
  min-height: 20px; margin: -6px 0 14px;
  font-size: 12px; color: var(--main); font-weight: 500;
}
.auth-btn.primary {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, var(--main) 0%, #3b82f6 100%);
  color: #fff; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: .15s;
  box-shadow: 0 4px 14px rgba(22,119,255,.28);
}
.auth-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(22,119,255,.35); }
.auth-forgot {
  text-align: right;
  margin-top: 12px;
  font-size: 13px;
  color: var(--sub);
  cursor: pointer;
  transition: .15s;
}
.auth-forgot:hover { color: var(--main); }
.auth-switch {
  text-align: center; margin-top: 16px;
  font-size: 13px; color: var(--sub);
}
.auth-switch a {
  color: var(--main); font-weight: 600; cursor: pointer; margin-left: 4px;
}
.auth-switch a:hover { text-decoration: underline; }
.auth-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,.2); color: #fff;
  border: none; border-radius: 50%;
  font-size: 20px; line-height: 1; cursor: pointer; transition: .15s;
}
.auth-close:hover { background: rgba(255,255,255,.3); }
.form-row { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.form-row label { width: 100px; flex-shrink: 0; font-size: 13px; color: var(--sub); }
.form-row input:not([type="file"]), .form-row select, .form-row textarea {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  background: #fbfcfe;
  transition: .15s;
}
.form-row textarea { height: auto; padding: 8px 11px; }
.file-pick { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcfe; display: flex; align-items: center; gap: 10px; padding: 0 5px; cursor: pointer; transition: .15s; }
.file-pick:hover { border-color: var(--main); background: #fff; }
.file-pick .file-btn { height: 28px; line-height: 28px; padding: 0 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; color: var(--text); flex-shrink: 0; }
.file-pick:hover .file-btn { border-color: var(--main); color: var(--main); }
.file-pick .file-name { font-size: 13px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus,
.edit input:focus, .edit select:focus {
  outline: none; border-color: var(--main); background: #fff;
  box-shadow: 0 0 0 3px rgba(22,119,255,.10);
}
.form-row select { appearance: auto; }
.radio-line { display: flex; gap: 10px; align-items: center; }
.radio-line .box-check { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: #374151; cursor: pointer; user-select: none; }
.radio-line .box-check input { position: relative; flex: 0 0 16px !important; width: 16px !important; height: 16px !important; min-width: 16px !important; min-height: 16px !important; max-width: 16px !important; max-height: 16px !important; margin: 0; padding: 0; appearance: none; -webkit-appearance: none; border: 2px solid #9CA3AF; border-radius: 5px; background-color: #fff; cursor: pointer; transition: background-color .15s, border-color .15s; vertical-align: middle; box-sizing: border-box; }
.radio-line .box-check:hover input { border-color: #6B7280; }
.radio-line .box-check.on input, .radio-line .box-check input:checked { background-color: #1677ff; border-color: #1677ff; background-position: center; background-repeat: no-repeat; background-size: 12px 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 12.5l4 4 8-9' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
/* 自定义日期选择器：替代浏览器原生小日历 */
.date-picker-wrap { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.date-picker-wrap .date-input {
  flex: 1;
  width: 100%;
  padding: 0 38px 0 12px;
  font-size: 13px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}
.date-picker-wrap .date-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.date-picker-popup {
  position: fixed;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  padding: 12px;
  z-index: 200;
  width: 260px;
  font-size: 14px;
}
.dp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 14px;
}
.dp-header .dp-select { font-weight: 600; font-size: 14px; }
.dp-header button { padding: 4px 10px; font-size: 13px; }
.dp-weekdays, .dp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.dp-weekdays span {
  text-align: center;
  color: var(--sub);
  font-size: 12px;
  padding: 5px 0;
  font-weight: 500;
}
.dp-days .dp-day {
  text-align: center;
  padding: 7px 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: .15s;
}
.dp-days .dp-day:hover { background: #f0f7ff; color: var(--main); }
.dp-days .dp-day.today { border: 1px solid var(--main); color: var(--main); }
.dp-days .dp-day.active { background: var(--main); color: #fff; }
.dp-footer { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line, #eceff3); display: flex; justify-content: center; }
.dp-footer .btn { width: 76px; }
.dp-empty { visibility: hidden; }
.dp-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.dp-time-label { color: var(--sub); font-size: 12px; }
.dp-time-sep { color: var(--sub); font-size: 13px; }
/* 月份账期选择器（Y-M 粒度） */
.gen-month-wrap { flex: 1; }
.mp-popup { width: 280px !important; }
.mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 4px; }
.mp-cell { text-align: center; padding: 10px 0; border-radius: 8px; cursor: pointer; font-size: 14px; border: 1px solid var(--line); transition: .15s; background: #fff; }
.mp-cell:hover { background: #f0f7ff; color: var(--main); border-color: var(--main); }
.mp-cell.active { background: var(--main); color: #fff; border-color: var(--main); }
.mp-mon { min-width: 30px; text-align: center; font-weight: 600; font-size: 14px; }
.dp-select {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}
/* 弹窗表单：除多行备注外，所有输入框/下拉统一高度（以离职日期方框为准） */
.modal-card .form-row input, .modal-card .form-row select {
  height: 38px;
  min-height: 38px;
  line-height: normal;
  box-sizing: border-box;
}
/* 员工减少登记：选择员工区域搜索框+下拉框强制统一高度 */
.dc-emp-box input, .dc-emp-box select {
  height: 38px !important;
  min-height: 38px !important;
  box-sizing: border-box;
}
.modal-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* 立项信息网格（紧凑键值对） */
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 12px; margin-top: 8px; font-size: 13px; }
.info-grid > div { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; background: #f8fafd; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.info-grid .lbl { font-size: 12px; color: var(--sub); white-space: nowrap; }
.info-grid b { font-size: 13px; font-weight: 550; }
.info-grid .full { grid-column: 1 / -1; }

/* 预警闪烁标识（逾期红闪烁，强化提示） */
.blink { animation: blink 1.1s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.tl-item.red::before { animation: blink 1.1s ease-in-out infinite; }

/* 操作按钮组 */
.ops { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: flex-start; }
.ops .btn.sm { margin-right: 0; white-space: nowrap; }
th.ops-col, td.ops-col { min-width: 100px; }
.overdue-days { color: var(--red); font-weight: 600; }
.task-node-table { table-layout: fixed; width: auto; min-width: 680px; }
.task-node-table th, .task-node-table td { vertical-align: middle; }
.task-node-table th:nth-child(1), .task-node-table td:nth-child(1) { width: 240px; }
.task-node-table th:nth-child(2), .task-node-table td:nth-child(2) { width: 90px; text-align: center; }
.task-node-table th:nth-child(3), .task-node-table td:nth-child(3) { width: 110px; text-align: center; }
.task-node-table th:nth-child(4), .task-node-table td:nth-child(4),
.task-node-table th:nth-child(5), .task-node-table td:nth-child(5),
.task-node-table th:nth-child(6), .task-node-table td:nth-child(6) { text-align: center; width: 100px; }
.risk-table { table-layout: fixed; width: auto; min-width: 700px; }
.risk-table th, .risk-table td { padding: 10px 12px; }
.risk-table th:nth-child(1), .risk-table td:nth-child(1) { width: 50px; text-align: center; }
.risk-table th:nth-child(2), .risk-table td:nth-child(2) { width: 200px; }
.risk-table th:nth-child(3), .risk-table td:nth-child(3) { width: 90px; text-align: center; }
.risk-table th:nth-child(4), .risk-table td:nth-child(4) { width: 240px; }
.risk-table th:nth-child(5), .risk-table td:nth-child(5) { width: 120px; }
.risk-table th:nth-child(6), .risk-table td:nth-child(6) { width: 120px; }
.task-setting-table { width: 100%; }
.task-setting-table th { text-align: center; background: #f5f6f8; }
.task-setting-table td { vertical-align: middle; text-align: center; }
.task-setting-table input[type="number"] { width: 70px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; text-align: center; }
.task-setting-table input[type="text"] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; box-sizing: border-box; }
.task-setting-table input[type="number"]:disabled { background: #f5f5f5; color: #999; }
.task-setting-table input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.task-node-table .btn.sm { min-width: 60px; }

/* RPO 阶段任务进度——醒目提醒块 */
.rpo-pay-callout { border: 1px solid #f0cfcf; border-radius: 10px; padding: 10px 12px; margin-top: 4px; background: #fdf6f6; }
.rpo-pay-callout .rpo-pay-head { margin-bottom: 8px; }
.rpo-pay-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #fbe3e3; color: #c05656; border: 1px solid #f2c8c8; letter-spacing: .3px; }
.rpo-pay-badge.ok { background: #eef7ea; color: #4c7a3a; border-color: #d2e5c8; }
.rpo-pay-callout .task-node-table { min-width: 900px; }
.rpo-pay-callout .task-node-table th, .rpo-pay-callout .task-node-table td { font-size: 12.5px; }
.rpo-pay-callout .task-node-table th:nth-child(1), .rpo-pay-callout .task-node-table td:nth-child(1) { width: 120px; }
.rpo-pay-callout .task-node-table th:nth-child(2), .rpo-pay-callout .task-node-table td:nth-child(2) { width: 80px; text-align: center; }
.rpo-pay-callout .task-node-table th:nth-child(3), .rpo-pay-callout .task-node-table td:nth-child(3) { width: 90px; text-align: center; }
.rpo-pay-callout .task-node-table th:nth-child(n+4), .rpo-pay-callout .task-node-table td:nth-child(n+4) { text-align: center; width: 80px; }
.rpo-pay-callout .st-pending { background: #fff4e6; color: #b4712a; border: 1px solid #f0d9b0; }
.rpo-pay-callout .st-done { background: #f0f5ff; color: #2f54eb; }

tr[data-tkey="doc_monthly"] { background: #fff; }
tr[data-tkey="doc_monthly"] td:first-child { padding-left: 4px; }
tr[data-tkey="doc_monthly"] td { border-top: 1px solid #eef1f6; }

/* 驾驶舱图表 */
.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.chart-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(238,241,246,.9); padding: 20px 22px; }
.chart-card h3 { font-size: 15px; margin-bottom: 15px; font-weight: 650; }
.pie-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.pie { width: 150px; height: 150px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 4px 14px rgba(20,30,60,.10); }
.legend { display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.lg { display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.bars { display: flex; align-items: flex-end; justify-content: space-around; height: 170px; padding-top: 8px; gap: 10px; }
.bar-col { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; flex: 1; }
.bar-track { width: 46px; height: 130px; background: var(--bg); border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.bar-fill { width: 100%; border-radius: 8px 8px 0 0; min-height: 3px; transition: height .3s; }
.bar-num { font-weight: 700; margin-top: 8px; font-size: 15px; }
.bar-lab { font-size: 12px; color: var(--sub); margin-top: 2px; }

/* 临时任务中心表格 */
.todo-table { table-layout: fixed; width: 100%; min-width: 880px; }
.todo-table th, .todo-table td { vertical-align: middle; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.todo-table th:nth-child(1), .todo-table td:nth-child(1) { width: 50px; text-align: center; }
.todo-table th:nth-child(2), .todo-table td:nth-child(2) { width: 160px; }
.todo-table th:nth-child(3), .todo-table td:nth-child(3) { width: 135px; white-space: nowrap; }
.todo-table th:nth-child(4), .todo-table td:nth-child(4) { width: 95px; }
.todo-table th:nth-child(5), .todo-table td:nth-child(5) { width: 95px; }
.todo-table th:nth-child(6), .todo-table td:nth-child(6) { width: 95px; }
.todo-table th:nth-child(7), .todo-table td:nth-child(7) { width: 70px; text-align: center; }
.todo-table th:nth-child(8), .todo-table td:nth-child(8) { width: 80px; }
.todo-table th:nth-child(9), .todo-table td:nth-child(9) { width: 210px; }
.todo-table tr.row-overdue { background: rgba(220, 38, 38, 0.07); }
.todo-table tr.row-overdue:hover { background: rgba(220, 38, 38, 0.12); }
.todo-table tr.row-due { background: rgba(234, 179, 8, 0.10); }
.todo-table tr.row-due:hover { background: rgba(234, 179, 8, 0.16); }
tr.row-overdue { background: rgba(220, 38, 38, 0.07); }
tr.row-overdue:hover { background: rgba(220, 38, 38, 0.12); }
tr.row-due { background: rgba(234, 179, 8, 0.10); }
tr.row-due:hover { background: rgba(234, 179, 8, 0.16); }
/* 循环任务规则表：7 列，必须覆盖 .todo-table 的 9 列 nth-child 列宽，
   否则第 7 列（操作）只拿到 70px，四个按钮会被截断成「编辑 …」（table-layout:fixed 下 min-width 无效）。 */
.todo-table.task-rule-table { min-width: 970px; }
.todo-table.task-rule-table th:nth-child(1), .todo-table.task-rule-table td:nth-child(1) { width: 160px; }
.todo-table.task-rule-table th:nth-child(2), .todo-table.task-rule-table td:nth-child(2) { width: 130px; }
.todo-table.task-rule-table th:nth-child(3), .todo-table.task-rule-table td:nth-child(3) { width: 140px; white-space: nowrap; }
.todo-table.task-rule-table th:nth-child(4), .todo-table.task-rule-table td:nth-child(4) { width: 85px; }
.todo-table.task-rule-table th:nth-child(5), .todo-table.task-rule-table td:nth-child(5) { width: 85px; }
.todo-table.task-rule-table th:nth-child(6), .todo-table.task-rule-table td:nth-child(6) { width: 70px; }
.todo-table.task-rule-table th:nth-child(7), .todo-table.task-rule-table td:nth-child(7) { width: 300px; }
/* 我的待办：朴素白底，去掉红/黄行底色；悬停该行渐变浅灰；"去处理"用灰黑文字链接 */
.my-todo-card tr,
.my-todo-card tr.row-overdue,
.my-todo-card tr.row-due,
.my-todo-card tr.row-overdue:hover,
.my-todo-card tr.row-due:hover { background: #fff; }
.my-todo-card tbody tr { transition: background .18s ease; }
.my-todo-card tbody tr:hover td,
.my-todo-card tbody tr.row-overdue:hover td,
.my-todo-card tbody tr.row-due:hover td { background: transparent; }
.my-todo-card tbody tr:hover,
.my-todo-card tbody tr.row-overdue:hover,
.my-todo-card tbody tr.row-due:hover { background: linear-gradient(#eceef2, #e8eaf0); }
.my-todo-card .todo-link { color: #555; text-decoration: none; font-size: 13px; }
.my-todo-card .todo-link:hover { color: #111; text-decoration: underline; }
.todo-form { max-width: 560px; }
.todo-form .form-row label { width: 72px; }
/* 循环任务「周几」多选：勾选框与文字贴合、整组左对齐。
   必须写在这里（.form-row 规则之后）并在选择器上覆盖，否则会被 .form-row label{width:100px}
   与 .form-row input:not([type=file]){flex:1} 带偏（勾选框被拉伸、文字被推到右侧）。 */
.wd-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; flex: 1; min-width: 0; }
.wd-checks label { width: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text); white-space: nowrap; cursor: pointer; }
.wd-checks label input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin: 0; padding: 0; cursor: pointer; }

/* ---------- 文件管理库 ---------- */
.st { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.doc-tip { font-size: 12.5px; color: var(--sub); align-self: center; }
.doc-month-wrap { font-size: 13px; font-weight: 400; color: var(--sub); display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; }
.doc-month-wrap input { height: 32px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcfe; padding: 0 8px; font-size: 13px; color: var(--text); }
.doc-due-tip { font-size: 13px; color: var(--sub); margin: 6px 0 10px; }
.doc-tbl-center th, .doc-tbl-center td { text-align: center; }
.doc-chip { display: inline-flex; align-items: center; gap: 6px; background: #f4f6fa; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px 3px 10px; font-size: 12.5px; margin: 2px 6px 2px 0; max-width: 100%; }
.doc-chip a { color: var(--main); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.doc-chip a:hover { text-decoration: underline; }
.doc-chip i { font-style: normal; cursor: pointer; color: #98a2b3; font-size: 14px; line-height: 1; padding: 0 3px; border-radius: 4px; }
.doc-chip i:hover { color: var(--red); background: #fff0ef; }
.doc-chip i.flag-btn { font-size: 13px; color: #b0b7c3; }
.doc-chip i.flag-btn:hover { color: #d97706; background: #fef3e2; }
.doc-chip-wrong { background: #fff0ef; border-color: #f4b6b0; }
.doc-chip-wrong a { color: var(--red); text-decoration: line-through; }
.doc-chip-wrong .wrong-tag { font-size: 11px; color: #fff; background: var(--red); border-radius: 4px; padding: 1px 5px; font-weight: 600; }
.doc-none { color: #b0b7c3; font-size: 12.5px; }
.doc-files-cell { max-width: 320px; }
.doc-switch { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; }
.doc-switch input { opacity: 0; width: 0; height: 0; }
.doc-switch span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 10px; transition: .18s; }
.doc-switch span::before { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .18s; box-shadow: 0 1px 3px rgba(16,24,40,.25); }
.doc-switch input:checked + span { background: var(--main); }
.doc-switch input:checked + span::before { transform: translateX(16px); }
.doc-modal-card { width: 640px; }

/* 客户查询中心 - 员工个人资料弹窗（统一放大字号与间距，便于客户查阅） */
.client-doc-modal { width: 720px; }
.client-doc-modal h3 { font-size: 24px; color: var(--text); }
.cdoc-meta { font-size: 16px; color: #44526b; margin-bottom: 6px; }
.cdoc-meta .st { margin-left: 6px; }
.cdoc-group { margin: 16px 0; }
.cdoc-na { color: var(--sub); font-size: 15px; background: #f7f9fc; border: 1px dashed var(--line); border-radius: 8px; padding: 10px 14px; }
.cdoc-item { padding: 12px 14px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; }
.cdoc-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cdoc-item-head b { font-size: 16px; color: var(--text); }
.cdoc-item-head .st { font-size: 12.5px; }
.st-none { color: #6b7280; background: #f1f3f5; }
.cdoc-item-files { display: flex; flex-wrap: wrap; gap: 8px; }
.cdoc-item-files .doc-chip { font-size: 15px; padding: 5px 8px 5px 12px; margin: 0; border-radius: 8px; }
.cdoc-item-files .doc-chip .link {
  border: none; background: var(--main-soft); color: var(--main); font-weight: 600;
  padding: 4px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; transition: .15s;
}
.cdoc-item-files .doc-chip .link:hover { background: var(--main); color: #fff; }
.cdoc-muted { color: var(--sub); font-size: 15px; }
.doc-emp-meta { font-size: 12.5px; color: var(--sub); margin: -10px 0 14px; }
.doc-group { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: #fbfcfe; }
.doc-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; }
.doc-group-head b { font-size: 13.5px; }
.doc-due { font-size: 12px; color: var(--sub); }
.doc-cat-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); }
.doc-cat-row:first-of-type { border-top: none; }
.doc-cat-name { width: 150px; flex-shrink: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; }
.doc-cat-files { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; }

/* RPO 付款阶段配置行 */
.rpo-stage-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  min-height: 40px;
}
.rpo-stage-row .st-name,
.rpo-stage-row .st-base,
.rpo-stage-row .st-off {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fbfcfe;
  box-sizing: border-box;
}
.rpo-stage-row .st-name { width: 160px; }
.rpo-stage-row .st-base { width: 90px; }
.rpo-stage-row .st-off { width: 72px; }
.rpo-stage-row .muted { color: var(--sub); font-size: 13px; }
.rpo-stage-row .btn.sm {
  height: 38px;
  line-height: 1;
  padding: 0 16px;
}
.rpo-stage-row.ro {
  gap: 18px;
  padding: 0 4px;
}
.rpo-stage-row.ro .ro-name {
  font-size: 14px;
  font-weight: 600;
  min-width: 160px;
}
.rpo-stage-row.ro .muted {
  color: var(--sub);
  font-size: 13px;
}

.rpo-doc-row { padding: 10px 12px; border: 1px solid #eee; border-radius: 8px; margin-bottom: 10px; }
.rpo-doc-sub { margin-top: 6px; font-size: 13px; color: #555; display: flex; align-items: center; gap: 8px; }
.rpo-doc-sub .rd-label { flex: 0 0 84px; color: #6b7280; }
.rpo-doc-sub .rd-files { flex: 0 1 230px; min-width: 0; }
.rpo-doc-sub .rd-files .doc-chip, .rpo-doc-sub .rd-files .doc-none { margin-right: 6px; }
.rpo-doc-sub .btn { flex: 0 0 auto; }

/* ---------- 财务中心（B5） ---------- */
td.px-idx { width: 44px; min-width: 44px; max-width: 44px; text-align: center; color: var(--sub); }
.pay-items-wrap { overflow-x: auto; margin-top: 10px; }
table.pay-items { font-size: 12px; min-width: 1360px; border-collapse: collapse; }
table.pay-items th, table.pay-items td { padding: 4px 6px; border: 1px solid var(--line); text-align: center; white-space: nowrap; }
table.pay-items th:first-child, table.pay-items td:first-child, table.pay-items td.px-idx { width: 44px; min-width: 44px; color: var(--sub); }
table.pay-items th:first-child { color: #444; }
table.pay-items th { background: #f7f9fc; font-weight: 600; color: #444; }
table.pay-items input.pf { width: 76px; height: 28px; padding: 2px 4px; font-size: 12px; text-align: right; }
table.pay-items select.pay-emp { width: 108px; max-width: 108px; }
.pay-items .pf-net { font-weight: 600; color: #1677ff; }
.pay-summary { display: flex; gap: 20px; margin-top: 14px; font-size: 13px; flex-wrap: wrap; color: #444; }
.pay-summary b { color: var(--main); margin-left: 4px; }
.modal-card.wide { width: 1000px; }
.fin-tabs { display:flex; gap:8px; margin-bottom:14px; }
.fin-tab { padding:7px 16px; border-radius:20px; border:1px solid var(--line); background:#fff; font-size:13px; color:var(--text); cursor:pointer; font-weight:500; transition:.15s; }
.fin-tab:hover { border-color:var(--main); color:var(--main); }
.fin-tab.on { background:var(--main); border-color:var(--main); color:#fff; box-shadow:0 2px 8px rgba(22,119,255,.25); }
.kpi-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fin-kpi { flex: 1; min-width: 160px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow-sm); transition:.2s; }
.fin-kpi:hover { border-color: #bcd4ff; box-shadow: var(--shadow); }
.fin-kpi span { display: block; font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.fin-kpi b { font-size: 22px; color: var(--text); font-weight: 700; }
.fin-kpi.hl { background: var(--main-soft); border-color: #bcd4ff; }
.fin-kpi.hl b { color: var(--main); }

/* ---------- 请款单打印（B6） ---------- */
#print-area { display: none; }
.print-doc { font-family: "Songti SC", "SimSun", serif; color: #111; padding: 24px 28px; }
.print-head { text-align: center; margin-bottom: 14px; }
.print-head h1 { font-size: 18px; margin: 0 0 6px; letter-spacing: 2px; }
.print-head h2 { font-size: 15px; margin: 0; font-weight: 600; }
.print-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; margin: 10px 0 12px; padding-bottom: 8px; border-bottom: 2px solid #333; }
.print-tbl { width: 100%; border-collapse: collapse; font-size: 10px; }
.print-tbl th, .print-tbl td { border: 1px solid #444; padding: 3px 4px; text-align: center; white-space: nowrap; }
.print-tbl th { background: #f0f0f0; font-weight: 600; }
.print-tbl td.r, .print-tbl th.r { text-align: right; }
.print-tbl .empty { text-align: center; padding: 16px; }
.print-sum { display: flex; gap: 26px; margin-top: 12px; font-size: 13px; }
.print-sum .big { font-weight: 700; font-size: 15px; }
.print-foot { margin-top: 36px; font-size: 13px; line-height: 2.2; }
.print-foot .sign { margin-top: 20px; }

@media print {
  #app, .sidebar, .topbar, #pay-modal, .modal-bg, .fab, .nav-badge { display: none !important; }
  #print-area { display: block !important; position: static; }
  body { background: #fff; }
}


/* 财务：代扣对账 */
.rec-badge { display:inline-flex; align-items:center; padding:2px 9px; border-radius:20px; font-size:12px; font-weight:500; color:#5b6472; background:#eef0f3; }
.rec-badge.ok { color:#15803d; background:#e9f7ef; }
.rec-badge.bad { color:#b91c1c; background:#fdecec; }
.rec-act { width:110px; padding:5px 8px; border:1px solid #d8dee7; border-radius:6px; font-size:13px; }
.rec-cell.bad { color:#b91c1c; font-weight:600; }

/* 财务 v2：配置与生成布局 */
.fin-tabs { display:flex; gap:8px; margin-bottom:14px; }
.fin-tab { padding:7px 16px; border-radius:20px; border:1px solid var(--line); background:#fff; font-size:13px; color:var(--text); cursor:pointer; font-weight:500; }
.fin-tab.on { background:var(--main); border-color:var(--main); color:#fff; }
.form { display:flex; flex-direction:column; gap:9px; }
.form label { font-size:13px; color:var(--sub); display:flex; flex-direction:column; gap:5px; }
.form input, .form select { padding:7px 10px; border:1px solid #d8dee7; border-radius:7px; font-size:13.5px; }
/* 项目财务配置：控件与表格内员工基数输入框(.edit input)同高 */
#cfg-body .form input, #cfg-body .form select {
  height: 29px; box-sizing: border-box; padding: 4px 9px; font-size: 13px; line-height: 21px;
}
/* 项目财务配置：顶部"项目"下拉框撑满容器宽度、更高更醒目 */
#cfg-proj { width: 100%; height: 38px; box-sizing: border-box; padding: 0 10px; font-size: 13.5px; }
#cfg-proj:focus { outline:none; border-color:var(--main); box-shadow:0 0 0 3px rgba(22,119,255,.10); }
.form input:focus, .form select:focus { outline:none; border-color:var(--main); box-shadow:0 0 0 3px rgba(22,119,255,.10); }
.form input:disabled, .form select:disabled { background:#f3f5f8; color:#9aa3b2; }
.grid2 { display:grid; grid-template-columns:repeat(2, 1fr); gap:12px 16px; }
.grid3 { display:grid; grid-template-columns:repeat(3, 1fr); gap:12px 16px; }
/* 财务中心等只读展示值（如增值税税率），与表单输入区分 */
.ro-val { font-weight:650; color:var(--text); font-size:14px; padding:2px 0; display:inline-block; }
.client-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 10px; }
.client-tab { padding:6px 14px; border:1px solid var(--line); background:#fff; border-radius:8px; cursor:pointer; font-size:13px; color:var(--text); }
.client-tab.on { background:var(--main); color:#fff; border-color:var(--main); }
.chk-list { display:flex; flex-direction:column; gap:6px; max-height:220px; overflow:auto; border:1px solid var(--line); border-radius:8px; padding:8px 10px; }
.chk { display:flex; align-items:center; gap:6px; font-weight:400; font-size:13px; }
/* 勾选框+名称统一为一行垂直居中；nowrap 保证名称永不掉到下一行 */
.chk { display:flex; align-items:center; gap:7px; line-height:1.2; cursor:pointer; white-space:nowrap; }
.chk input[type="checkbox"] {
  flex:0 0 10px !important;
  width:10px !important; min-width:10px !important; max-width:10px !important;
  height:10px !important; min-height:10px !important; max-height:10px !important;
  margin:0; padding:0;
  appearance:none; -webkit-appearance:none;
  border:1px solid #9CA3AF; border-radius:0;
  background:#fff; cursor:pointer; box-sizing:border-box;
  vertical-align:middle;
}
.chk input[type="checkbox"]:checked { background-color:#1677ff; border-color:#1677ff; }
.hint { color:var(--sub); font-size:12.5px; line-height:1.7; }
.box { border:1px solid var(--line); background:#f9fafd; border-radius:9px; padding:10px 12px; }
.gen-in { padding:5px 7px; border:1px solid #d8dee7; border-radius:6px; font-size:13px; }
/* 财务配置：逐员工社保/公积金表——固定列宽对齐；不做 overflow 裁剪，姓名永不截断 */
.fin-emp { table-layout: fixed; width: 100%; min-width: 860px; }
.fin-emp th { white-space: nowrap; }
.fin-emp th:nth-child(1), .fin-emp td:nth-child(1) { width: 110px; }
.fin-emp th:nth-child(2), .fin-emp td:nth-child(2) { width: 170px; }
.fin-emp th:nth-child(3), .fin-emp td:nth-child(3) { width: 170px; }
.fin-emp th:nth-child(4), .fin-emp td:nth-child(4) { width: 180px; }
.fin-emp th:nth-child(5), .fin-emp td:nth-child(5) { width: 180px; }
/* 一键生成六单：员工工资表——auto布局按内容自适应，列间距紧凑 */
.gen-emp { table-layout: auto; width: 100%; min-width: 0; }
.gen-emp th, .gen-emp td { padding: 9px 10px; white-space: nowrap; }
.gen-emp th:nth-child(1), .gen-emp td:nth-child(1) { text-align: left; }
.gen-emp th:nth-child(2), .gen-emp td:nth-child(2) { text-align: left; }
#gen-five-all { width: 14px; height: 14px; margin: 0; flex-shrink: 0; }
.gen-emp .gen-five, .gen-emp .gen-five-all { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.gen-emp .gen-five input[type="checkbox"], .gen-emp .gen-five-all input[type="checkbox"] { width: 14px; height: 14px; margin: 0; flex-shrink: 0; }
.gen-emp .gen-in { width: 82px !important; padding: 4px 6px; box-sizing: border-box; }
.gen-in:focus { outline:none; border-color:var(--main); }
/* 财务中心「生成单据」：同页三卡片分区布局 */
.gen-cards { position: relative; }
.gen-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 12px; }
.gen-seg button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 11px 15px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--text); text-align: left; transition: .18s;
}
.gen-seg button span { font-size: 12px; font-weight: 400; color: var(--sub); line-height: 1.4; }
.gen-seg button:hover { border-color: var(--main); }
.gen-seg button.active { border-color: var(--main); background: var(--main-soft); color: var(--main); }
.gen-seg button.active span { color: var(--main); }
.gen-card { border:1px solid var(--line); border-radius:11px; background:#fff; padding:14px 16px 16px; box-shadow:0 1px 3px rgba(20,40,90,.05); display:flex; flex-direction:column; gap:10px; }
.gen-card-hd { display:flex; align-items:center; gap:8px; }
.gen-card-badge { width:22px; height:22px; border-radius:50%; background:var(--main); color:#fff; font-size:13px; font-weight:600; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.gen-card-hd h3 { font-size:15px; color:var(--text); margin:0; }
.gen-card-sub { font-size:12.5px; color:var(--sub); line-height:1.6; }
.gen-card .form label { font-size:12.5px; }
.gen-card .form label.gen-field-row { flex-direction: row; align-items: center; gap: 8px; white-space: nowrap; justify-content: flex-start; }
.gen-card .gen-field-txt { flex: none; white-space: nowrap; }
.gen-card .gen-field-row .gen-month-wrap { flex: none; width: 170px; }
.gen-card .gen-proj { width:100%; box-sizing:border-box; }
.gen-btn { margin-top:auto; padding:9px 14px; font-size:13.5px; }
.gen-status { font-size:12.5px; color:var(--sub); border-top:1px dashed var(--line); padding-top:9px; margin-top:4px; }
.gen-status b { color:var(--text); }
.gen-emp-scroll { overflow-x:auto; border:1px solid var(--line); border-radius:8px; }
.gen-emp-scroll .gen-emp { min-width:640px; }
.gen-emp-scroll .gen-emp th, .gen-emp-scroll .gen-emp td { padding:7px 8px; }
.gen-emp td.muted-col { color:#9aa3b2; }
.total-dim { display:flex; gap:10px; align-items:center; font-size:13px; color:var(--sub); }
.total-dim label { display:inline-flex; align-items:center; gap:5px; font-size:13px; color:var(--text); cursor:pointer; }
.gen-total-src { border:1px dashed var(--line); border-radius:8px; padding:9px 11px; font-size:12.5px; color:var(--sub); background:#fafbfe; }
.gen-total-src .ok { color:#15803d; font-weight:600; }
.gen-total-src .miss { color:#b91c1c; }
@media (max-width: 760px){ .gen-seg{ grid-template-columns:1fr; } }
/* 财务中心请款单按项目分组 */
.fin-group-head { display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:10px 12px 4px; }
.fin-group-name { font-weight:600; font-size:14px; color:var(--text); }
.fin-group-tag { font-size:12.5px; color:var(--sub); }
.fin-group-tag b.recv { color:#21c06b; font-weight:600; }
.fin-group-tag b.pay { color:#e8574b; font-weight:600; }
/* 弹窗右上角关闭按钮 */
.modal-close { position: absolute; top: 12px; right: 16px; font-size: 22px; line-height: 1; color: #a0a8b5; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.modal-close:hover { color: var(--text); background: #f0f2f6; }

/* ===== 薪资附加字段弹窗（现代卡片式多选） ===== */
.sf-modal { width: 520px; max-width: 94vw; padding: 22px 24px; }
.sf-modal h3 { margin-bottom: 6px; }
.sf-sub { color: #667085; font-size: 13px; line-height: 1.7; margin: 0 0 18px; }
.sf-sub b { color: #1d4ed8; font-weight: 600; }
.sf-section { margin-bottom: 14px; }
.sf-section:last-of-type { margin-bottom: 2px; }
.sf-sec-title { font-size: 12px; color: #98a2b3; font-weight: 600; letter-spacing: 1px; margin-bottom: 8px; }
.sf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.sf-chip { position: relative; display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1.5px solid #e2e6ee; border-radius: 10px; background: #fff; cursor: pointer; user-select: none; transition: border-color .16s, background .16s, box-shadow .16s; }
.sf-chip:hover { border-color: #bfc9da; box-shadow: 0 3px 10px rgba(16,24,40,.06); }
.sf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sf-box { width: 18px; height: 18px; border-radius: 6px; border: 2px solid #ccd3e0; background: #fff; display: grid; place-items: center; flex-shrink: 0; transition: background .15s, border-color .15s; }
.sf-box::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(-1px,-1px); opacity: 0; transition: opacity .12s; }
.sf-chip:has(input:checked) { border-color: #2563eb; background: #f3f7ff; }
.sf-chip input:checked ~ .sf-box { background: #2563eb; border-color: #2563eb; }
.sf-chip input:checked ~ .sf-box::after { opacity: 1; }
.sf-name { font-size: 14px; color: #344054; font-weight: 500; }
.sf-chip input:checked ~ .sf-name { color: #1d4ed8; font-weight: 600; }
.sf-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.sf-count { font-size: 12px; color: #98a2b3; }

/* 当月实际收付总数卡片 */
.fin-month-card { background: var(--card); border:1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.fin-month-title { font-size: 13px; font-weight: 700; color: var(--sub); letter-spacing: .5px; margin-bottom: 12px; }
.fin-month-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.fin-month-cell { flex: 1; min-width: 220px; background: linear-gradient(135deg, #fff 0%, var(--bg) 100%); border:1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.fin-month-num { font-size: 24px; font-weight: 800; }
.fin-month-num.green { color: var(--green); }
.fin-month-num.blue { color: var(--main); }
.fin-month-lab { font-size: 12.5px; color: var(--sub); margin-top: 4px; }

/* 员工档案变更审批（花名册弹窗 + 审批待办 + 生成锁定） */
.form-section-title {
  font-size: 12.5px; font-weight: 700; color: var(--main); letter-spacing: .5px;
  margin: 6px 0 10px; padding: 7px 10px; background: var(--main-soft); border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 6px;
}
.archive-status { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.tag.tag-f { background: var(--main-soft); color: var(--main-d); }
.tag.tag-pending { background: #fff4e6; color: #d56b00; }
.tag.tag-warn { background: #ffeceb; color: var(--btn-danger); }
.arch-app-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.arch-app-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; box-shadow: var(--shadow-sm); }
.arch-app-main { flex: 1; min-width: 0; }
.arch-app-main b { color: var(--text); }
.arch-app-ops { display: flex; gap: 6px; flex-shrink: 0; }
.gen-lock-box { display: flex; align-items: center; gap: 8px; background: #fff5ed; border: 1px solid #ffd9b3; color: #c0550a; border-radius: var(--radius-sm); padding: 8px 11px; font-size: 12.5px; margin: 2px 0 8px; line-height: 1.5; }
.gen-lock-ico { font-size: 14px; flex-shrink: 0; }
/* ===== 全局账期条 + 日期/月份弹窗 导航箭头与月份宫格（v370） ===== */
.period-nav, .nav-chev { border: none; background: transparent; color: var(--sub); width: 26px; height: 26px; padding: 0; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; }
.period-nav:hover, .nav-chev:hover { background: rgba(29,33,41,.07); color: var(--text); }
.period-nav svg, .nav-chev svg { pointer-events: none; }
.dp-header .nav-chev { flex-shrink: 0; }
.period-month-wrap { position: relative; display: inline-flex; }
.period-month-btn { border: 1px solid var(--line); background: transparent; border-radius: 7px; padding: 2px 10px; font-weight: 600; font-size: 14px; color: var(--text); cursor: pointer; }
.period-month-btn:hover { border-color: var(--sub); }
.period-month-grid { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 80; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(20,30,60,.14); padding: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.period-month-grid[hidden] { display: none; }
.pg-cell { min-width: 42px; text-align: center; padding: 5px 0; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--text); }
.pg-cell:hover { background: rgba(29,33,41,.07); }
.pg-cell.active { background: var(--main); color: #fff; font-weight: 600; }

/* 客户资料下载：月份时间轴 */
.cdoc-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  align-items: center;
}
.cdoc-month-btn {
  font-size: 13px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: all .15s ease;
}
.cdoc-month-btn:hover {
  border-color: var(--main);
  color: var(--main);
}
.cdoc-month-btn.on {
  background: var(--main);
  border-color: var(--main);
  color: #fff;
}
