/* ============================================================
   HR 管理系统 · 数据看板
   设计令牌（还原 Ardot 设计稿）
   ============================================================ */
:root {
  /* 表面 */
  --bg: #F7F8FC;
  --sidebar-bg: #EEF1F8;
  --card-bg: #FFFFFF;
  /* 主色 / 语义色 */
  --primary: #1A73E8;
  --primary-soft: #E8F0FE;
  --success: #34A853;
  --danger: #EA4335;
  --warning: #FBBC04;
  --purple: #A142F4;
  --cyan: #12B5CB;
  --orange: #FA7B17;
  --ring-base: #E8EAED;
  /* 文字（已加深以提升对比度，文字更清晰） */
  --text-strong: #16181A;
  --text: #2B2F33;
  --text-muted: #4A4E52;
  --text-faint: #80868B;
  /* 线 / 阴影 */
  --border: #C7CFDB;
  --shadow: 0 1px 2px rgba(60, 64, 67, 0.06), 0 1px 3px rgba(60, 64, 67, 0.10);
  --shadow-hover: 0 2px 6px rgba(60, 64, 67, 0.12);
  /* 形 */
  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  /* 布局 */
  --sidebar-w: 200px;
  --sidebar-w-collapsed: 72px;
  --topbar-h: 48px;
  --gap: 16px;
  --pad: 16px;
  /* 全站工具栏控件统一高度（搜索框/日期框/下拉/按钮），紧凑不占空间 */
  --ctrl-h: 30px;
  /* 工作台 sticky 吸顶偏移：顶栏高 + .content padding - .workbench 上移量 */
  --wb-sticky-top: calc(var(--topbar-h) + var(--pad) - 12px);
}

/* ============================================================
   日间 / 夜间模式（data-theme 驱动 CSS 变量重定义）
   ============================================================ */
[data-theme="dark"] {
  --bg: #151823;
  --sidebar-bg: #1B1F2E;
  --card-bg: #20253A;
  --primary: #5B95FF;
  --primary-soft: #233049;
  --success: #3DD68C;
  --danger: #FF6F61;
  --warning: #FFCB47;
  --purple: #BD8BFF;
  --cyan: #36D6E7;
  --orange: #FF9D4D;
  --ring-base: #2B3245;
  --text-strong: #F3F5FA;
  --text: #D8DCE6;
  --text-muted: #9AA3B5;
  --text-faint: #5A6172;
  --border: #2E3548;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.45);
  --shadow-hover: 0 2px 8px rgba(0,0,0,.55);
}

/* 主题切换按钮：日/月图标随主题切换 */
.theme-toggle { position: relative; }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { transition: transform .35s ease, opacity .25s ease; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* 切换瞬间的平滑过渡（仅切换时短暂启用，不影响日常性能） */
.theme-anim, .theme-anim * {
  transition: background-color .28s ease, border-color .28s ease, color .2s ease, box-shadow .28s ease !important;
}

/* 暗色下局部硬编码色修正 */
[data-theme="dark"] .nav-item.active,
[data-theme="dark"] .sub-item.active { color: var(--text-strong); }
[data-theme="dark"] .tab .close:hover { background: rgba(255,255,255,.10); }
[data-theme="dark"] .tab.active .close:hover { background: rgba(91,149,255,.22); }
[data-theme="dark"] .topbar, [data-theme="dark"] .sidebar { color-scheme: dark; }

/* ── 全局美化滚动条（细圆角半透明）── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  transition: background .2s ease;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.55); }
::-webkit-scrollbar-thumb:active { background: rgba(100, 116, 139, 0.55); }

/* Firefox */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,.35) transparent;
}

/* ── 全站输入控件聚焦：只保留蓝色边框，统一去掉外发光光圈 ──
   作用：input / select / textarea 聚焦时不再出现 0 0 0 Npx 的浅蓝/浅灰外环，
   让焦点反馈只落在边框色上。具体组件如需保留 border-color 变蓝，仍可独立设置。 */
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: none !important;
}

/* ── 全站日期 / 时间 / 月份选择器统一外观 ──
   作用：所有原生日期控件统一为白底卡片样式，重置 Chrome 内置丑字重与日历按钮，
   数字改为细体 + 字距，聚焦态与全站主色一致。局部特殊容器（.search-dark / .sub-input /
   .filter-input-date / .input-sm / .dept-asof-input 等）通过更高特异性覆盖尺寸细节。 */
input[type="date"],
input[type="datetime-local"],
input[type="month"] {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") no-repeat right 8px center;
  color: var(--text);
  font: 400 13px/1 var(--font, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif);
  letter-spacing: .3px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus {
  /* 点击编辑：干净的蓝色边框，不再叠加任何半透明卡片/外发光。
     全局规则已统一去掉 input/select/textarea 的聚焦光圈，这里保留 border-color 即可。 */
  border-color: var(--primary);
  outline: none;
}
/* 重置 webkit 内部文字（避免默认粗体 + 丑字距 + 透明灰底） */
input[type="date"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="month"]::-webkit-datetime-edit {
  padding: 0;
  background: transparent;
  display: inline-block;
  vertical-align: middle;
}
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper,
input[type="month"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
  background: transparent !important;
  display: flex;
  align-items: center;
}
input[type="date"]::-webkit-datetime-edit-text,
input[type="datetime-local"]::-webkit-datetime-edit-text,
input[type="month"]::-webkit-datetime-edit-text {
  color: var(--text-faint);
  padding: 0 2px;
  background: transparent;
}
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field,
input[type="datetime-local"]::-webkit-datetime-edit-month-field,
input[type="datetime-local"]::-webkit-datetime-edit-day-field,
input[type="datetime-local"]::-webkit-datetime-edit-year-field,
input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
input[type="datetime-local"]::-webkit-datetime-edit-minute-field,
input[type="datetime-local"]::-webkit-datetime-edit-ampm-field,
input[type="month"]::-webkit-datetime-edit-month-field,
input[type="month"]::-webkit-datetime-edit-year-field {
  color: var(--text);
  font: inherit;
  padding: 0 2px;
  background: transparent;       /* 关键：去 webkit 默认浅灰底 */
  border: 0;                     /* 关键：去 webkit 默认透明边框框 */
  border-radius: 3px;
  display: inline-block;
  vertical-align: baseline;
  line-height: 1.2;
  min-width: 0;
}
/* 年份字段限制宽度，防止输入超过4位数字 */
input[type="date"]::-webkit-datetime-edit-year-field,
input[type="datetime-local"]::-webkit-datetime-edit-year-field,
input[type="month"]::-webkit-datetime-edit-year-field {
  max-width: 4.5ch;
}
/* 聚焦时彻底清除原生日期框内部的浅灰/浅蓝高亮卡片：
   整个编辑区、字段包装器、文字段、以及单个字段段都要置透明，
   并用 !important + :focus 限定确保压过 Chrome 默认的聚焦灰底。 */
input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-month-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-day-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-year-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-hour-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-minute-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-ampm-field:focus,
input[type="month"]::-webkit-datetime-edit-month-field:focus,
input[type="month"]::-webkit-datetime-edit-year-field:focus,
input[type="date"]:focus::-webkit-datetime-edit,
input[type="datetime-local"]:focus::-webkit-datetime-edit,
input[type="month"]:focus::-webkit-datetime-edit,
input[type="date"]:focus::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]:focus::-webkit-datetime-edit-fields-wrapper,
input[type="month"]:focus::-webkit-datetime-edit-fields-wrapper,
input[type="date"]:focus::-webkit-datetime-edit-text,
input[type="datetime-local"]:focus::-webkit-datetime-edit-text,
input[type="month"]:focus::-webkit-datetime-edit-text {
  background: transparent !important;
  color: var(--text);
  outline: none !important;
  box-shadow: none !important;
  border-radius: 3px;
}
/* 原生日历指示器：扩展到整个输入框，点击任意位置弹日历；仍可手动键入 */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  cursor: pointer;
  opacity: 0;                /* 透明覆盖整框，点击任意位置触发 */
  background: transparent;
}
input[type="date"]::placeholder,
input[type="datetime-local"]::placeholder,
input[type="month"]::placeholder { color: var(--text-faint); }

html, body {
  height: 100%;
  /* 系统字体栈：与公告栏 tab 标签（<button> 默认系统字体）一致，不再强制 Noto Sans SC */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  font-weight: 400;        /* 全局正文使用 400 字重，与公告栏 tab 标签一致 */
  line-height: 1.6;
  /* 关键：移除强制的 antialiased。在 Windows 下该值会让字重变细、边缘发虚；
     移除后由系统使用 ClearType 次像素渲染，小字更锐利清晰 */
  text-rendering: optimizeLegibility;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   侧边栏
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  position: sticky;
  z-index: 120; /* 高于弹窗遮罩(z-index:110)，弹窗打开时左侧导航子标签保持可点、可切换页面 */
  top: 0;
  height: 100vh;
  transition: width .22s ease, flex-basis .22s ease;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.app.collapsed .sidebar {
  width: var(--sidebar-w-collapsed);
  flex-basis: var(--sidebar-w-collapsed);
}

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px 18px;
  white-space: nowrap;
}
.brand .logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px;
  flex: 0 0 36px;
}
.brand .name { font-weight: 600; font-size: 16px; color: var(--text-strong); -webkit-font-smoothing: subpixel-antialiased; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav-search {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; margin-bottom: 4px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); transition: border-color .2s;
}
.nav-search:focus-within { border-color: var(--primary); }
.nav-search svg { flex-shrink: 0; color: var(--text-faint); }
.nav-search input {
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent;
  font-size: 12.5px; color: var(--text); line-height: 1.4;
}
.nav-search input::placeholder { color: var(--text-faint); }
/* 搜索隐藏不匹配的导航项 */
.nav .nav-item.nav-hidden,
.nav .sub-nav.nav-hidden { display: none !important; }
.app.collapsed .nav-search { display: none; }
.nav-group-label {
  font-size: 11px; color: var(--text-faint);
  padding: 14px 12px 6px; white-space: nowrap;
  letter-spacing: .04em;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #000000;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: .02em;
  font-weight: 400;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  transition: background .15s, color .15s;
}
.nav-item .ico {
  display: none;
}
.nav-item .label { flex: 1; }
.nav-item .chev { width: 16px; height: 16px; color: var(--text-muted); opacity: .8; transition: transform .2s; }
.nav-item:hover { background: rgba(26,115,232,.08); color: #000000; }
.nav-item.active { background: rgba(26,115,232,.16); color: #000000; font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
.nav-item.active:hover { background: rgba(26,115,232,.22); color: #000000; }
.nav-item.expanded .chev { transform: rotate(90deg); }

/* 二级导航 */
.sub-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 4px 44px;
}
.nav-item.expanded + .sub-nav { display: flex; }
.sub-nav .sub-item {
  font-size: 14px; color: #000000;
  padding: 7px 12px; border-radius: 6px; cursor: pointer;
  white-space: nowrap;
  -webkit-font-smoothing: subpixel-antialiased;
}
.sub-nav .sub-item:hover { background: rgba(26,115,232,.08); color: #000000; }
.sub-nav .sub-item.active { background: rgba(26,115,232,.16); color: #000000; font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
.sub-nav .sub-group { font-size: 12px; color: var(--text-muted, #888); padding: 9px 12px 2px; font-weight: 600; letter-spacing: .5px; }

/* 导航悬停二级菜单弹窗 */
.sub-nav { display: none !important; }
.nav-item .chev { display: none; }
.nav-hover-popup {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  min-width: 190px;
  max-width: 260px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
  padding: 8px;
  display: none;
}
.nav-hover-popup.show { display: block; }
.nav-hover-popup-head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  font-weight: 600; color: var(--text-strong); font-size: 14px;
}
.nav-hover-popup-head .ico { width: 20px; height: 20px; display: grid; place-items: center; }
.nav-hover-popup-body { display: flex; flex-direction: column; gap: 2px; }
.nav-hover-popup-body .sub-item {
  font-size: 14px; color: #000000;
  padding: 8px 12px; border-radius: 6px; cursor: pointer;
  white-space: nowrap; transition: background .15s, color .15s;
}
.nav-hover-popup-body .sub-item:hover { background: rgba(26,115,232,.08); color: #000000; }
.nav-hover-popup-body .sub-item.active { color: #000000; font-weight: 600; }

/* 收起态：只留图标 */
.app.collapsed .brand .name,
.app.collapsed .nav-item .label,
.app.collapsed .nav-item .chev,
.app.collapsed .sub-nav,
.app.collapsed .nav-group-label,
.app.collapsed .user .meta { display: none; }
.app.collapsed .nav-item { justify-content: center; padding: 12px 0; }
.app.collapsed .nav-item .ico { display: grid; }
.app.collapsed .brand { justify-content: center; padding: 8px 0 18px; }

.user {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px; margin-top: 8px;
  border-top: 1px solid rgba(0,0,0,.06);
  white-space: nowrap;
}
.user .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #1A73E8, #A142F4);
  color: #fff; display: grid; place-items: center; font-weight: 600;
  flex: 0 0 30px;
}
.user .meta .uname { font-size: 13px; color: var(--text-strong); font-weight: 400; }
.user .meta .urole { font-size: 11px; color: var(--text-faint); }

/* ============================================================
   主区
   ============================================================ */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius);
  border: none; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--text-muted);
  transition: background .15s;
}
.icon-btn:hover { background: var(--bg); }

/* 标签栏（并入顶栏） */
.tabs { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 120px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
/* 顶栏标签页单独启用细滚动条 + 鼠标滚轮横向滚动（其他内容区标签保持隐藏滚动条） */
#tabs { overflow-y: hidden; padding-bottom: 2px; }
#tabs::-webkit-scrollbar { display: block; height: 5px; }
#tabs::-webkit-scrollbar-track { background: transparent; }
#tabs::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 3px; }
#tabs:hover::-webkit-scrollbar-thumb { background: rgba(0,0,0,.35); }
#tabs { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.15) transparent; }
#tabs:hover { scrollbar-color: rgba(0,0,0,.35) transparent; }
/* 员工关怀等内容区标签，不应撑满父容器高度 */
.care-tabs { flex: 0 0 auto; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: 14px; color: var(--text-muted); cursor: pointer;
  white-space: nowrap; border: 1px solid transparent;
  transition: all .15s; flex: 0 0 auto;
}
.tab:hover { background: var(--bg); }
.tab.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.tab .close {
  width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center;
  margin-left: 2px; opacity: .55; font-size: 14px; line-height: 1;
  transition: background .15s, opacity .15s;
}
.tab .close:hover { background: rgba(0,0,0,.08); opacity: 1; }
.tab.active .close:hover { background: rgba(26,115,232,.18); }
.tab.add { color: var(--text-faint); padding: 7px 10px; }
.tab-title { display: inline-block; min-width: 1.5em; white-space: nowrap; }
.tab-title, .tab .close { position: static; }
.tab-title::before, .tab-title::after { display: none !important; }

/* 顶栏标签：竖线分隔 + 去胶囊 + 紧凑间距（仅作用于顶栏 #tabs，不影响内容区 .tab） */
#tabs { gap: 0; }
#tabs .tab {
  padding: 7px 0; border-radius: 0; background: transparent; border: none;
}
#tabs .tab:hover { background: transparent; color: var(--text); }
#tabs .tab.active { background: transparent; color: var(--primary); font-weight: 600; }
#tabs .tab + .tab::before {
  content: '|'; color: var(--text-faint); font-weight: 400;
  margin: 0 10px; flex: 0 0 auto; user-select: none;
}

.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
/* 顶栏右侧所有图标/按钮/控件统一 36px 高（与头像一致），视觉对齐 */
.topbar .icon-btn { width: 30px; height: 30px; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: var(--radius-pill);
  padding: 8px 14px; width: 220px; max-width: 30vw;
}
.search input { border: none; background: transparent; outline: none; font-size: 13px; color: var(--text); width: 100%; }
.search svg { color: var(--text-faint); flex: 0 0 16px; }

/* 顶部铃铛待办 badge */
.notif-badge {
  position: absolute;
  top: -2px; right: -4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  font-size: 10px; font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: #EA4335;
  border-radius: 8px;
  z-index: 2;
  pointer-events: none;
}
/* 待办事项下拉面板 */
#topbarNotifPanel {
  position: fixed;
  z-index: 9999;
  width: 360px;
  max-height: 480px;
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.08);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, #E5E7EB);
  background: #F8FAFC;
}
.notif-panel-title { font-size: 14px; font-weight: 600; color: var(--text-strong, #1F2937); }
.notif-panel-head button {
  background: none; border: none; font-size: 18px; color: var(--text-muted, #6B7280);
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.notif-panel-head button:hover { color: var(--text, #111827); }
.notif-panel-body {
  overflow-y: auto; padding: 8px 0;
  max-height: 380px;
  flex: 1;
}
.notif-panel-foot {
  padding: 8px 14px;
  border-top: 1px solid var(--border, #E5E7EB);
  text-align: right;
}
.notif-panel-foot a {
  font-size: 12px; color: var(--primary); text-decoration: none; font-weight: 600;
}
.notif-panel-foot a:hover { text-decoration: underline; }
.notif-summary {
  padding: 8px 14px; font-size: 12px; color: var(--text-muted, #6B7280);
  border-bottom: 1px dashed var(--border, #E5E7EB);
}
.notif-summary b { color: #EA4335; margin: 0 2px; }
.notif-groups { display: flex; flex-direction: column; }
.notif-group {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border, #E5E7EB);
}
.notif-group:last-child { border-bottom: none; }
.ng-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.ng-icon { font-size: 15px; flex-shrink: 0; }
.ng-title { font-size: 13px; font-weight: 600; color: var(--text-strong, #1F2937); flex: 1; }
.ng-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: var(--primary); border-radius: 10px;
}
.ng-summary { font-size: 12px; color: var(--text-muted, #6B7280); margin-bottom: 4px; }
.ng-items { list-style: none; margin: 4px 0 6px; padding: 0; }
.ng-items li {
  font-size: 12px; color: var(--text, #374151); padding: 3px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ng-dept { color: var(--text-muted, #9CA3AF); }
.ng-name { font-weight: 400; }
.ng-desc { color: var(--primary); margin-left: 4px; }
.ng-desc.overdue { color: #EA4335; }
.ng-more { color: var(--text-faint, #9CA3AF) !important; font-style: italic; }
.ng-go {
  display: inline-block; font-size: 12px; color: var(--primary);
  text-decoration: none; font-weight: 600; cursor: pointer; margin-top: 4px;
}
.ng-go:hover { text-decoration: underline; }
.notif-loading { text-align: center; padding: 24px 0; color: var(--text-faint, #9CA3AF); font-size: 13px; }
.notif-empty { text-align: center; padding: 28px 0; color: var(--text-muted, #6B7280); font-size: 13px; }
.notif-empty-icon { font-size: 32px; margin-bottom: 6px; }

/* ============================================================
   内容区
   ============================================================ */
.content { padding: var(--pad); flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
/* OA 表单与审批流内嵌模块：抵消外层 .content 的 padding，让 iframe 真正铺满右侧内容区 */
#view-oa-admin { flex: 1; min-height: 0; padding: 0; margin: calc(-1 * var(--pad)); }
#view-oa-admin iframe { width: 100%; height: 100%; border: 0; flex: 1; min-height: 0; display: block; }
.dashboard, .report-page { display: flex; flex-direction: column; gap: var(--gap); width: 100%; min-width: 0; }
.report-page .page-title { font-size: 18px; font-weight: 600; color: var(--text-strong); }
.report-placeholder {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; color: var(--text-muted);
  background: var(--card-bg); border: 1px dashed var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 80px 24px; min-height: 420px;
}
.report-placeholder .rp-icon { font-size: 56px; line-height: 1; }
.report-placeholder .rp-title { font-size: 18px; font-weight: 600; color: var(--text-strong); }
.report-placeholder .rp-desc { font-size: 14px; line-height: 1.7; max-width: 520px; color: var(--text-muted); }
.card-row.two-col { grid-template-columns: repeat(2, 1fr); }

.dash-header {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 16px; flex-wrap: wrap;
}
.dash-header .tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.date-range {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 14px;
  font-size: 13px; color: var(--text);
}
.dash-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-filter .date-range { padding: 4px 10px; gap: 6px; }
.dash-filter .date-range input[type="date"] {
  width: 128px; height: 30px; padding: 0 26px 0 8px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; color: var(--text); font-size: 13px; outline: none;
}
.dash-filter .date-range input[type="date"]:focus { border-color: var(--primary); box-shadow: none; outline: none; }
.dash-filter .date-range .sep { color: var(--text-muted); font-size: 13px; }
.dash-filter select.search-dark { min-width: 140px; height: var(--ctrl-h); }
.dash-filter #dashRefresh { height: 34px; padding: 0 14px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius); padding: 9px 16px;
  font-size: 13px; font-weight: 400; cursor: pointer;
  transition: filter .15s, box-shadow .15s;
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 2px 8px rgba(26,115,232,.35); }

/* KPI */
.kpi-grid {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(4, 1fr);
}
.kpi {
  background: var(--card-bg); border-radius: var(--radius-lg);
  padding: 18px 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
}
.kpi .kico {
  width: 46px; height: 46px; border-radius: 12px; flex: 0 0 46px;
  display: grid; place-items: center;
}
.kpi .kico.b { background: var(--primary-soft); color: var(--primary); }
.kpi .kico.g { background: rgba(52,168,83,.12); color: var(--success); }
.kpi .kico.r { background: rgba(234,67,53,.12); color: var(--danger); }
.kpi .kico.y { background: rgba(251,188,4,.16); color: #B8860B; }
.kpi .kval { font-size: 24px; font-weight: 600; color: var(--text-strong); line-height: 1.1; }
.kpi .klabel { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.kpi .kdelta { font-size: 12px; margin-top: 6px; font-weight: 400; }
.kdelta.up { color: var(--success); }
.kdelta.down { color: var(--danger); }

/* 卡片通用 */
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
/* ===== 全系统数据列表：直角 / 无边框 / 内容区透明 / 白表头白翻页（2026-09-01） =====
   列表卡均为 .card 直接子级 .table-wrap；
   详情子卡多带 .card-title（非直接子级，天然不命中此规则）。
   表头 .data-table thead 与翻页器 .pagination 默认 var(--card-bg)=#fff，保持白色。 */
.card:has(> .table-wrap) {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.card:has(> .table-wrap) .pagination {
  border-top: none;
}
/* 例外：工资抽屉、弹窗内的详情子卡保持白底卡片（非数据列表） */
#payrollDrawerBody .card:has(> .table-wrap),
.modal .card:has(> .table-wrap) {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.card-head .title { font-size: 16px; font-weight: 400; color: var(--text-strong); }
.card-head .note { font-size: 11px; color: var(--text-faint); }

.card-row {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(2, 1fr);
}
.card-row.three-col {
  grid-template-columns: repeat(3, 1fr);
}

/* 图表网格：饼图 + 图例 */
.donut-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.donut { width: 160px; height: 160px; flex: 0 0 160px; }
.legend { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 180px; }
.legend .li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); }
.legend .dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.legend .li .lv { margin-left: auto; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* 部门进度条 */
.bars { display: flex; flex-direction: column; gap: 16px; }
.bar-row .bl { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.bar-row .bl .bn { color: var(--text); }
.bar-row .bl .bv { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.track { height: 8px; background: var(--bg); border-radius: var(--radius-pill); overflow: hidden; }
.track .fill { height: 100%; border-radius: var(--radius-pill); }

/* 折线图 */
.line-wrap { width: 100%; }
.line-wrap svg { width: 100%; height: auto; display: block; }
.line-legend { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.line-legend .li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.line-legend .sw { width: 14px; height: 4px; border-radius: 2px; }

/* 占位页（其他标签） */
.placeholder {
  background: var(--card-bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 80px 24px; text-align: center; color: var(--text-faint);
}
.placeholder .big { font-size: 40px; margin-bottom: 12px; }

/* 响应式 */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .card-row { grid-template-columns: 1fr; }
  .content { padding: 16px; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 40; transform: translateX(-100%); box-shadow: var(--shadow-hover); }
  .app.collapsed .sidebar { transform: translateX(0); width: var(--sidebar-w); flex-basis: var(--sidebar-w); }
  .app.mobile-open .sidebar { transform: translateX(0); }
  .topbar-right .search { display: none; }
  .content { padding: 12px; }
  .project-page, .attendance-page, .employee-page, .org-page { height: calc(100vh - var(--topbar-h) - 24px); }
  .data-table { font-size: 13px; }

  .toolbar { gap: 10px; padding: 10px 12px; }
  .toolbar-left, .toolbar-right { gap: 8px; }
  .btn-primary, .btn-secondary { padding: 7px 12px; font-size: 12px; }
}
@media (max-width: 640px) {

  .org-column { min-width: 240px; }
}
/* 项目管理页 */
.project-page { display: flex; flex-direction: column; width: 100%; height: calc(100vh - var(--topbar-h) - 2 * var(--pad)); min-height: 0; overflow: hidden; min-width: 0; }
.project-page .toolbar, .attendance-page .toolbar, .employee-page .toolbar { margin-bottom: 4px; flex: 0 0 auto; min-width: 0; }
.project-page .card, .attendance-page .card, .employee-page .card { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.project-page .table-wrap, .attendance-page .table-wrap, .employee-page .table-wrap { flex: 1; overflow: auto; min-width: 0; }

/* 考勤管理页 / 员工管理页 */
.attendance-page, .employee-page { display: flex; flex-direction: column; width: 100%; height: calc(100vh - var(--topbar-h) - 2 * var(--pad)); min-height: 0; overflow: hidden; min-width: 0; }

/* 所有功能板块顶部留白统一缩小（抵消 .content 顶部 padding 的一半，与成本页一致） */
.employee-page, .project-page, .attendance-page, .org-page, .workbench, .recruit-view { margin-top: -12px; }


/* ===== 全系统数据列表统一列宽策略（2026-11-19）=====
   目标：一屏放得下→表格撑满容器、列宽随屏幕自适应；列多放不下→按内容宽度撑开+容器横向滚动；
        长文本列例外（保持换行、宽度受控），不参与内容撑宽。
   实现：width:100%（撑满） + min-width:max-content（内容宽度下限，超出即横滚） + table-layout:auto（列宽由内容/可用宽度决定）。
   ⚠️ 表格容器 .table-wrap 必须 overflow:auto 才有横滚；除非刻意，模块不要覆盖 table-layout:fixed / 固定 min-width / 百分比列宽。
   ⚠️ 换行列必须同时设 width+min-width+max-width 三件套（只设 max-width 在 auto 布局下无效，会被 max-content 撑爆），见下方 .td-remark。 */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: max-content; table-layout: auto; }
.data-table thead { background: var(--card-bg, #fff); position: sticky; top: 0; z-index: 10; }
.data-table th {
  text-align: center; font-weight: 600; color: var(--text-strong);
  border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; z-index: 11; background: var(--card-bg, #fff);
}
.data-table td { border-bottom: 1px solid var(--border);
  color: var(--text); white-space: nowrap; text-align: center;
}
.data-table tbody tr:hover { background: rgba(26,115,232,.03); }
.data-table td .empty, .data-table td.empty { color: var(--text-faint); }
.data-table .td-remark {
  white-space: pre-wrap;
  word-break: break-word;
  width: 300px; min-width: 300px; max-width: 360px;
  line-height: 1.5;
  text-align: left;
}
.data-table .status { display: inline-block; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 400; }
.data-table .status.active { background: rgba(52,168,83,.12); color: var(--success); }
.data-table .status.inactive { background: rgba(234,67,53,.12); color: var(--danger); }

/* 转正管理表格增强 */
.data-table th { overflow: visible; }
.data-table th .col-hint {
  display: inline-block; margin-left: 3px; font-size: 12px; cursor: help;
  opacity: .5; vertical-align: middle; transition: opacity .15s;
  position: relative; color: var(--primary);
}
.data-table th .col-hint:hover { opacity: 1; }
/* Tooltip 由 JS 悬浮层接管（突破 table overflow 裁剪），此处仅保留基础样式 */
.data-table th .col-hint::after,
.data-table th .col-hint::before { display: none !important; }
.data-table td.action-col { white-space: nowrap; text-align: center; min-width: 120px; }
.data-table td.action-col .btn { padding: 2px 8px; font-size: 12px; margin: 0 2px; }

/* 聚合页子标签（招聘/异动/培训/公告统一）：与 script.js 注入的 .recruit-view .rpt 完全一致的全局版，供公告页等无 .recruit-view 容器复用 */
.recruit-pagetabs { display: flex; gap: 4px; margin-bottom: 4px; border-bottom: 1px solid var(--border, #eee); flex-wrap: wrap; }
.rpt { padding: 13px 18px 6px; cursor: pointer; font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; font-weight: 400; color: var(--text-faint); background: none; border: none; border-bottom: 2px solid transparent; user-select: none; }
.rpt:hover { color: var(--primary); }
.rpt.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }



/* 异动管理聚合页：5 个 tab 子页面数据表行高统一对齐「招聘管理」详情表（10px 14px）。
   覆盖默认 12px 16px（异动记录）与上方入职/转正/离职/退休的 7px 14px，保证全部 tab 一致。
   放在原 7px 规则之后，特异性相同靠源码顺序胜出。 */

.pagination {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 6px; padding: 8px 12px; border-top: 1px solid var(--border);
  flex: 0 0 auto; background: var(--card-bg);
}
.pagination .info { font-size: 12px; color: var(--text-muted); margin-right: 8px; }
.pagination button {
  padding: 4px 10px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--card-bg); color: var(--text); cursor: pointer; font-size: 13px;
  transition: all .15s;
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }
.pagination .page-num { min-width: 34px; }
.pagination .page-num.current { background: var(--primary); color: #fff; border-color: var(--primary); }

.pagination .jump-wrap {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 6px;
}
.pagination .jump-label {
  font-size: 12px; color: var(--text-muted); white-space: nowrap;
}
.pagination .jump-input {
  width: 44px; height: 24px; padding: 0 4px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
  font-size: 13px; color: var(--text); outline: none;
}
.pagination .jump-input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft);
}
.pagination .jump-btn {
  padding: 4px 10px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--card-bg); color: var(--text); cursor: pointer; font-size: 13px;
  transition: all .15s;
}
.pagination .jump-btn:hover { border-color: var(--primary); color: var(--primary); }

.pagination .page-size-wrap {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 6px; margin-right: 2px;
}
.pagination .page-size-label {
  font-size: 12px; color: var(--text-muted); white-space: nowrap;
}
.pagination .page-size-select {
  width: 52px; height: 24px; padding: 0 4px;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
  font-size: 13px; color: var(--text); outline: none; cursor: pointer;
}
.pagination .page-size-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft);
}

/* 候选人简历上传组件 —— 撑满 label 右侧 1fr 单元格，内部换行不溢出 */
.resume-uploader {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  width: 100%;
  padding: 4px 0;
  min-width: 0;
}
.resume-uploader input[type="file"] {
  font-size: 13px; color: var(--text);
  max-width: 100%;
}
.resume-uploader::before {
  content: attr(data-hint);
  font-size: 12px; color: var(--text-muted);
  margin-right: 4px;
}
.resume-uploader:not([data-hint])::before { content: none; }
.resume-uploader .resume-status { flex: 1 1 auto; min-width: 120px; }
.resume-status {
  font-size: 12px; color: var(--text-muted);
}
.resume-list {
  display: flex; flex-direction: column; gap: 6px;
  width: 100%; margin-top: 4px;
}
.resume-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card-bg); font-size: 13px;
}
.resume-item-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text);
}
.resume-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.resume-item-actions .btn-secondary { padding: 3px 10px; font-size: 12px; }
/* 让上传区"工作经历"紧随其后，不再被挤到奇怪位置 */
.cand-form .form-grid label.full { align-items: flex-start; }
.cand-form .form-grid label.full .resume-uploader { padding-top: 6px; }

/* 通用按钮基础高度，与工具栏控件统一（更小尺寸 .btn-sm/.btn-xs/.btn-icon 各自覆盖） */
.btn { height: var(--ctrl-h); box-sizing: border-box; }

/* 快捷工具栏 */
.toolbar {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 16px; flex-wrap: nowrap; margin-bottom: 4px;
  padding: 4px 0;
}
/* 工具栏内按钮更紧凑、高度更小，并与搜索框等统一高度、背景白 */
.toolbar .btn-primary, .toolbar .btn-secondary { padding: 0 12px; height: var(--ctrl-h); box-sizing: border-box; }
/* 工具栏内所有控件（搜索框/日期/下拉/按钮）统一高度 var(--ctrl-h)、背景白色 */
.toolbar input[type="text"],
.toolbar input[type="date"],
.toolbar input[type="month"],
.toolbar input[type="datetime-local"],
.toolbar select,
.toolbar .search-dark,
.toolbar .search,
.toolbar .filter-search,
.toolbar .filter-select,
.toolbar .btn,
.toolbar .btn-primary,
.toolbar .btn-secondary {
  height: var(--ctrl-h) !important;
  box-sizing: border-box;
}
/* 日期/月份/时间框在 Chrome 有 UA 内部尺寸，appearance:none 才能让 height 精确生效（点击仍可弹出选择器） */
.toolbar input[type="date"],
.toolbar input[type="month"],
.toolbar input[type="datetime-local"] {
  -webkit-appearance: none;
  appearance: none;
}
.toolbar .search-dark,
.toolbar .search { background: #fff; }
.toolbar .filter-select { height: var(--ctrl-h); padding: 0 28px 0 10px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: nowrap; position: relative; }
.toolbar-left { flex: 0 1 auto; min-width: 0; }
/* 工具栏右侧操作组整体靠右，确保「列设置」等按钮位于工具栏最右 */
.toolbar-right { margin-left: auto; }
/* 兜底：无 .toolbar-right 时（自动注入按钮直接挂到 .toolbar）也靠右 */
.toolbar > .col-settings-btn { margin-left: auto; }

.col-setting { position: relative; }

/* 列设置按钮：与培训管理 .tr-btn 一致的浅色样式，作为所有板块的统一基准 */
.col-settings-btn {
  height: 32px; padding: 0 12px; border-radius: 6px;
  border: 1px solid var(--border, #ddd);
  background: var(--card, #fff);
  color: var(--text, inherit);
  cursor: pointer; font-size: 13px;
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; line-height: 1;
}
.col-settings-btn:hover { border-color: var(--primary, #1677ff); color: var(--primary, #1677ff); }
.col-settings-btn .col-set-gear { font-size: 14px; line-height: 1; }

.col-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 8px 0;
}
.col-dropdown-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 6px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-strong);
}
.col-dropdown-header button { font-size: 12px; color: var(--primary); padding: 0; border: none; background: none; cursor: pointer; }
.col-dropdown-body { max-height: 320px; overflow-y: auto; padding: 4px 0; }
.col-dropdown-body label {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; font-size: 13px; color: var(--text);
  cursor: pointer; user-select: none;
}
.col-dropdown-body label:hover { background: rgba(26,115,232,.06); }
.col-dropdown-body input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--primary); }
.col-dropdown-body .col-disabled { color: var(--text-faint); cursor: not-allowed; }
.col-dropdown-body label.col-drag-item { cursor: move; }
.col-dropdown-body label.col-drag-item .col-drag-handle {
  font-size: 11px;
  letter-spacing: -1px;
  color: var(--text-faint);
  cursor: grab;
  user-select: none;
  padding: 0 2px;
}
.col-dropdown-body label.col-drag-item:active .col-drag-handle { cursor: grabbing; }
.col-dropdown-body label.col-drag-item.dragging { opacity: 0.5; background: rgba(26,115,232,.08); }
.col-dropdown-body label.col-drag-item.drag-over { background: rgba(26,115,232,.16); border-top: 2px solid var(--primary); }

/* 表头拖拽排序 */
th[data-col] { user-select: none; }
.col-drag-handle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; margin-right: 6px;
  color: var(--text-faint); opacity: .35; transition: opacity .15s, color .15s;
  vertical-align: middle; cursor: grab;
}
th[data-col].col-draggable:hover .col-drag-handle { opacity: 1; color: var(--primary); }
th[data-col].col-dragging .col-drag-handle { cursor: grabbing; }
th[data-col].col-dragging { opacity: .65; background: var(--bg); }
th[data-col].col-drag-over { background: rgba(26,115,232,.12); box-shadow: inset 0 0 0 2px var(--primary); }
th[data-fixed="true"] { cursor: default; }
th[data-fixed="true"] .col-drag-handle { display: none; }

.search-dark {
  background: #fff; border: 1px solid var(--border);
  width: 240px; max-width: 30vw;
}
.search-dark:focus-within { border-color: var(--primary); }

/* 工具栏筛选输入（直接用在 input / select 上） */
input.search-dark,
select.search-dark {
  height: var(--ctrl-h); padding: 0 12px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; color: var(--text); outline: none; line-height: 1;
  transition: border-color .15s, box-shadow .15s;
  min-width: 120px;
}
input.search-dark:focus,
select.search-dark:focus {
  border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft);
}
input.search-dark::placeholder { color: var(--text-faint); }
/* 工具栏内日期/月份/日期时间输入框强制与搜索框同高，避免浏览器默认 min-height 或样式平局导致高度不一致 */
.toolbar .search-dark[type="date"],
.toolbar .search-dark[type="month"],
.toolbar .search-dark[type="datetime-local"] {
  height: var(--ctrl-h) !important;
  min-height: var(--ctrl-h) !important;
  box-sizing: border-box;
  padding: 0 8px;
  line-height: calc(var(--ctrl-h) - 2px);
  -webkit-appearance: none;
  appearance: none;
  /* appearance:none 会隐藏原生日历图标，这里补一个日历图标保持可识别（点击仍弹出选择器） */
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235F6368' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 30px;
}
/* 下拉框统一加箭头，明确可点击（此前无箭头易被误认为不可下拉） */
select.search-dark {
  cursor: pointer;
  appearance: none; -webkit-appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F6368' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

.filter-search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 12px; height: var(--ctrl-h); width: 220px; max-width: 30vw;
  transition: border-color .15s, box-shadow .15s;
}
.filter-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.filter-search svg { color: var(--text-faint); flex: 0 0 16px; }
.filter-search input {
  border: none; background: transparent; outline: none; height: 100%; width: 100%;
  font-size: 13px; color: var(--text);
}
.filter-search input::placeholder { color: var(--text-faint); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 14px;
  font-size: 13px; font-weight: 400; cursor: pointer;
  transition: all .15s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: var(--bg); }


/* 职位弹窗编制调整按钮始终可见 */
#posAdjustFromModal {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
#posAdjustFromModal:hover {
  background: var(--primary);
  color: #fff;
}

/* 字段下拉选择 */
.field-select { position: relative; }
.field-select select {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--border); background: var(--card-bg);
  border-radius: var(--radius); padding: 8px 28px 8px 12px;
  font-size: 13px; color: var(--text); cursor: pointer; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F6368' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  min-width: 120px; max-width: 200px;
}
.field-select select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }

/* 员工列表：字段下拉 + 搜索输入 合并成一个框 */
.search-combined {
  display: inline-flex;
  align-items: stretch;
  background: transparent;
  border: none;
  border-radius: 0;
  height: 30px;
  transition: none;
  overflow: visible;
}
.search-combined:focus-within {
  border-color: transparent;
  box-shadow: none;
}
.search-combined .field-select {
  position: relative;
  display: none;
  align-items: center;
}
.search-combined .field-select::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 16px;
  background: var(--border);
}
.search-combined .field-select select {
  border: none;
  background: transparent;
  min-width: 90px;
  max-width: none;
  height: 100%;
  padding: 0 24px 0 12px;
}
.search-combined .field-select select:focus {
  border: none;
  box-shadow: none;
}
.search-combined .search.search-dark.combo {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  padding: 0 12px 0 8px;
  width: 360px;
  max-width: 60vw;
}
.search-combined .search svg { color: var(--text-faint); flex: 0 0 16px; }
.search-combined .search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}
.search-combined .search input::placeholder { color: var(--text-faint); }

/* 部门管理 · "生效日期" 区：只做定位 + 标签容器，外观全部继承 V3 .date-picker 全站默认
   （全站默认已是极简卡片：32px / 8px 圆角 / 单 📅 图标 / 无状态点） */
.dept-asof-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
  height: 36px;
  flex: 0 0 auto;
}
.dept-asof-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: .2px;
}
/* 仅留一个宽度让"生效日期"和左侧搜索框观感协调，其余继承全站默认 */
.dept-asof-wrap .date-picker { min-width: 170px; }

@media (max-width: 720px) {
  .dept-asof-wrap {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 8px;
    width: 100%;
  }
  .dept-asof-wrap .date-picker { flex: 1; width: 100%; }
}

/* 可输入下拉搜索框 */
.search-dark.combo { position: relative; }
.suggest-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-hover);
  max-height: 260px; overflow-y: auto; z-index: 40;
  list-style: none; padding: 6px 0; margin: 0;
  display: none;
}
.suggest-list.open { display: block; }
.suggest-list li {
  padding: 8px 12px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.suggest-list li:hover, .suggest-list li.active {
  background: var(--primary-soft); color: var(--primary);
}
.suggest-list li .meta { color: var(--text-faint); font-size: 12px; white-space: nowrap; }
.suggest-list li:hover .meta, .suggest-list li.active .meta { color: var(--primary); opacity: .8; }
.suggest-list .empty, .suggest-list .combo-empty {
  padding: 10px 12px; color: var(--text-muted); font-size: 13px; cursor: default;
}

/* 站点可输入下拉 */
.combo-box { position: relative; width: 240px; }
.combo-box input {
  width: 100%; height: 36px; box-sizing: border-box;
  border: 1px solid var(--border); background: var(--card-bg);
  border-radius: var(--radius); padding: 8px 28px 8px 12px;
  font-size: 13px; color: var(--text); outline: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F6368' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.combo-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.combo-box .combo-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-hover);
  max-height: 260px; overflow-y: auto; z-index: 40;
  list-style: none; padding: 0; margin: 0;
  display: none;
}
.combo-box .combo-list.open { display: block; }
.combo-box .combo-list li {
  padding: 8px 12px; font-size: 13px; cursor: pointer;
  color: var(--text); line-height: 1.2;
  display: flex; align-items: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.combo-box .combo-list li .cname { color: var(--text-strong); font-weight: 400; }
.combo-box .combo-list li .meta { color: var(--text-muted); font-size: 12px; margin-left: 8px; }
.combo-box .combo-list li:hover, .combo-box .combo-list li.active {
  background: var(--primary); color: #fff;
}
.combo-box .combo-list li:hover .cname,
.combo-box .combo-list li.active .cname { color: #fff; }
.combo-box .combo-list li:hover .meta,
.combo-box .combo-list li.active .meta { color: rgba(255,255,255,.85); }
.combo-box .combo-list .combo-empty {
  padding: 8px 12px; color: var(--text-muted); font-size: 13px; cursor: default;
}

/* 招聘需求 · 部门树下拉（任意层级缩进 + 类型标签 + 展开箭头） */
.combo-box .combo-list li.dept-tree-node .dtn-indent { flex: 0 0 auto; display: inline-block; }
.combo-box .combo-list li.dept-tree-node .dtn-name {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.combo-box .combo-list li.dept-tree-node .dept-type-tag {
  flex: 0 0 auto; margin-left: 6px; padding: 1px 7px; font-size: 11px; line-height: 1.7;
  color: var(--primary); background: var(--primary-soft); border-radius: 10px; white-space: nowrap;
}
.combo-box .combo-list li.dept-tree-node .dtn-caret {
  flex: 0 0 auto; margin-left: 8px; color: var(--text-muted); font-size: 11px;
  transition: transform .12s ease;
}
.combo-box .combo-list li.dept-tree-node.is-selected,
.combo-box .combo-list li.dept-tree-node:hover {
  background: var(--primary); color: #fff;
}
.combo-box .combo-list li.dept-tree-node.is-selected .dept-type-tag,
.combo-box .combo-list li.dept-tree-node:hover .dept-type-tag {
  color: #fff; background: rgba(255, 255, 255, .25);
}
.combo-box .combo-list li.dept-tree-node.is-selected .dtn-caret,
.combo-box .combo-list li.dept-tree-node:hover .dtn-caret {
  color: rgba(255, 255, 255, .85);
}
/* 岗位下拉 · 编制缺口副文本 */
.combo-box .combo-list li .combo-sub {
  margin-left: 8px; font-size: 12px; color: var(--text-muted); white-space: nowrap; flex: 0 0 auto;
}
.combo-box .combo-list li:hover .combo-sub,
.combo-box .combo-list li.active .combo-sub { color: rgba(255, 255, 255, .85); }

/* 业务类型「关联筛选弹出」面板（部门弹窗） */
.biz-type-anchor {
  width: 100%; box-sizing: border-box; height: 36px; padding: 0 28px 0 12px;
  border: 1px solid var(--border); background: var(--card-bg); border-radius: var(--radius);
  font-size: 13px; color: var(--text); outline: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F6368' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.biz-type-anchor:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.biz-type-anchor::placeholder { color: var(--text-muted); }
.biz-type-pop {
  position: fixed; z-index: 9999; display: none; flex-direction: column;
  width: 260px; max-height: 300px; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-hover);
}
.biz-type-pop__search { padding: 6px; border-bottom: 1px solid var(--border); }
.biz-type-pop__search input {
  width: 100%; box-sizing: border-box; height: 30px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text); outline: none; font-size: 13px;
}
.biz-type-pop__search input:focus { border-color: var(--primary); }
.biz-type-pop__list { list-style: none; margin: 0; padding: 4px; overflow-y: auto; }
.biz-type-pop__list li {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  font-size: 13px; border-radius: 6px; cursor: pointer; color: var(--text);
}
.biz-type-pop__list li:hover { background: var(--primary); color: #fff; }
.biz-type-pop__list li.is-current { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.biz-type-pop__list li.is-current:hover { background: var(--primary); color: #fff; }
.biz-type-pop__list li.is-parent { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.biz-type-pop__list li.is-parent:hover { background: var(--primary); color: #fff; }
.biz-type-pop__list .bz-tag {
  font-size: 11px; padding: 1px 6px; border-radius: 8px; margin-left: auto;
  background: var(--primary-soft); color: var(--primary);
}
.biz-type-pop__list li:hover .bz-tag { background: rgba(255,255,255,.25); color: #fff; }
.biz-type-pop__list .bz-rec { font-size: 11px; color: var(--primary); opacity: .85; }
.biz-type-pop__list li:hover .bz-rec { color: #fff; }
.biz-type-pop__grp { padding: 6px 10px 2px; font-size: 11px; color: var(--text-muted); cursor: default; }
.biz-type-pop__empty { padding: 10px; color: var(--text-muted); font-size: 12px; cursor: default; }
/* 部门类型弹出面板：子类型缩进展示（主类型/子类型两层） */
.biz-type-pop li.is-sub { padding-left: 30px; }
.biz-type-pop li.is-sub .bz-name::before { content: '└'; margin-right: 6px; opacity: .55; }
.biz-type-anchor.is-locked { background: #F1F3F5; color: #9AA0A6; cursor: not-allowed; }
/* 类型设置右侧表单：只读类别展示（根类型固定） */
.dts2-cat { padding: 7px 10px; background: var(--bg-hover, #F2F4F7); border: 1px solid var(--border, #E4E7EC); border-radius: 6px; color: var(--text-secondary, #475467); font-size: 13px; }
/* 类型设置左侧列表：子类型缩进 */
.dts2-item.is-sub { padding-left: 28px; }
.dts2-item.is-sub .dts2-item-name::before { content: '└'; margin-right: 6px; opacity: .55; }

/* 表单内可检索下拉：撑满 label 并与 30px 字段对齐（统一各弹窗员工筛选下拉高度） */
.form-grid label > div { flex: 1 1 auto; min-width: 0; box-sizing: border-box; }
.form-grid .combo-box { flex: 1 1 auto; width: 100%; min-width: 0; box-sizing: border-box; }
.form-grid .combo-box .combo-display {
  width: 100%; box-sizing: border-box; height: 32px; padding: 0 28px 0 8px;
  border: 1px solid var(--border); background: var(--card-bg); border-radius: 6px;
  font-size: 13px; color: var(--text); font-family: inherit;
}

/* 离职/退休申请弹窗：仅把「员工筛选(combo-box)」压到系统标准 30px，与其余表单字段对齐
   （combo 基础样式是 36px，而 .form-grid 输入框标准是 30px，同屏高低不一）。
   其余输入框/下拉/只读/聚焦样式全部走 css_modals_emp.css 的 .form-grid 全局标准，不单独定制。2026-10-22 */
:is(#rtForm, #rsForm) .form-grid .combo-box .combo-display {
  height: 32px; box-sizing: border-box; padding: 0 28px 0 8px;
}

/* 表格操作列 */
.data-table td.actions { white-space: nowrap; }
.data-table .actions .icon-btn {
  width: 28px; height: 28px; padding: 0; margin: 0 2px;
  border-radius: 6px; border: none; background: transparent;
  cursor: pointer; color: var(--primary);
  display: inline-grid; place-items: center;
  transition: background .15s;
  vertical-align: middle;
}
.data-table .actions .icon-btn:hover { background: var(--primary-soft); }
.data-table .actions .icon-btn.danger { color: var(--danger); }
.data-table .actions .icon-btn.danger:hover { background: rgba(234,67,53,.1); }
.link-btn {
  border: none; background: none; cursor: pointer;
  color: var(--primary); font-size: 13px; padding: 4px 8px; border-radius: 6px;
  transition: background .15s;
}
.link-btn:hover { background: var(--primary-soft); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: rgba(234,67,53,.1); }

/* 弹窗 */
.modal-overlay {
  position: fixed; inset: 0; z-index: 110;
  background: transparent;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  /* 弹窗遮罩从顶栏下方开始：保证顶部聚合 tab 标签栏不被遮挡、可点击切换（与培训弹窗一致） */
  top: var(--topbar-h);
}
/* 与 .modal-mask 统一：默认隐藏，靠 .show 类显隐（与合同管理一致） */
.modal-overlay.show { display: flex; }
/* 培训管理弹窗：避开顶栏，避免遮挡 topbar 操作按钮 */
.modal-overlay.train-modal-overlay { top: var(--topbar-h); align-items: flex-start; padding-top: 24px; }
.modal-overlay.train-modal-overlay .modal { max-height: calc(100vh - var(--topbar-h) - 48px); }
.modal {
  background: var(--card-bg); border-radius: 14px;
  width: min(720px, 100%); max-height: calc(100vh - var(--topbar-h) - 48px);
  min-width: 320px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  animation: modalIn .18s ease;
}
@keyframes modalIn { from { transform: translateY(12px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 18px; border-bottom: 1px solid var(--border);
}
.modal-head .title { font-size: 16px; font-weight: 600; }
/* 浮窗注入的 最小化/最大化/关闭 三图标分组：靠右、紧贴、统一间距，不被 space-between 拉开 */
.modal-head__btns { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; flex: 0 0 auto; }
.modal-close {
  border: none; background: none; font-size: 24px; line-height: 1;
  color: var(--text-muted); cursor: pointer; width: 32px; height: 32px; border-radius: 8px;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 20px; overflow: auto; }

/* 浮窗承载的模态弹窗：卡片填满浮窗、内部滚动，保留系统原样式（与部门管理浮窗一致） */
.float-win__body > .modal {
  width: 100%; max-width: none; height: 100%; max-height: none;
  border-radius: 14px;
}
.float-win__body > .modal.is-floated { animation: none; } /* 禁用 modalIn 位移，避免影响内部 fixed 日期选择器定位 */
.float-win__body > .modal .modal-body { flex: 1 1 auto; max-height: none; }

