/* ========== 基础样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  /* 设计系统：主色靛蓝 #4F46E5 */
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eff6ff;
  --success: #10b981;
  --success-dark: #059669;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --purple: #8b5cf6;
  --teal: #14b8a6;
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --primary-rgb: 79, 70, 229;
}
body {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ========== 顶部导航栏（56px 白色） ========== */
.topbar {
  background: #fff;
  color: var(--text);
  height: 56px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.logo-icon { font-size: 24px; line-height: 1; }
.page-title { font-size: 16px; font-weight: 600; color: #1f2937; white-space: nowrap; }
.topbar-center { flex: 1; display: flex; justify-content: center; }
.topbar-right { display: flex; gap: 12px; align-items: center; min-width: 220px; justify-content: flex-end; }

/* 全局搜索框（胶囊形） */
.global-search {
  width: 320px; height: 36px;
  background: #f3f4f6;
  border-radius: 20px;
  display: flex; align-items: center;
  padding: 0 14px;
  gap: 8px;
  transition: all 150ms ease;
}
.global-search:focus-within { background: #fff; box-shadow: 0 0 0 2px rgba(79,70,229,0.25); }
.global-search .search-ico { font-size: 13px; opacity: 0.55; }
.global-search input {
  border: none; outline: none; background: transparent;
  font-size: 13px; width: 100%; color: var(--text);
}

/* 通知铃铛 */
.notif-btn {
  background: none; border: none; cursor: pointer;
  font-size: 17px; position: relative; padding: 6px;
  border-radius: 8px; transition: all 150ms ease; line-height: 1;
}
.notif-btn:hover { background: #f3f4f6; }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; border: 2px solid #fff;
}

/* 用户菜单 */
.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: 8px; transition: all 150ms ease;
}
.user-menu-btn:hover { background: #f3f4f6; }
.user-menu-btn .caret { font-size: 10px; color: #9ca3af; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  flex-shrink: 0;
}
.user-avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.user-name { font-weight: 500; font-size: 14px; color: #1f2937; }
.user-role {
  background: #eff6ff; color: #3b82f6;
  padding: 2px 8px; border-radius: 12px; font-size: 12px;
}
.user-dropdown {
  display: none;
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; min-width: 180px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 6px; z-index: 200;
  animation: fadeIn 0.15s ease;
}
.user-dropdown.show { display: block; }
.ud-info { padding: 10px 12px; border-bottom: 1px solid var(--border-light); margin-bottom: 6px; }
.ud-name { font-weight: 600; font-size: 14px; color: #1f2937; }
.ud-role { font-size: 12px; color: #6b7280; margin-top: 2px; }
.ud-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer;
  padding: 9px 12px; border-radius: 6px;
  font-size: 13px; color: #374151; transition: all 150ms ease;
}
.ud-item:hover { background: #f3f4f6; }
.ud-logout { color: #dc2626; }

/* ========== 按钮 ========== */
.btn {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.btn:hover { background: #f8fafc; border-color: #cbd5e1; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 6px rgba(79,70,229,0.2); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 2px 6px rgba(79,70,229,0.25); }
.btn-secondary { background: #fff; color: #374151; border: 1px solid var(--border); border-radius: 6px; padding: 8px 16px; font-size: 13px; cursor: pointer; transition: all 150ms ease; }
.btn-secondary:hover { background: #f3f4f6; border-color: #d1d5db; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); box-shadow: 0 2px 6px rgba(16,185,129,0.3); }
.btn-success:hover { background: var(--success-dark); border-color: var(--success-dark); box-shadow: 0 4px 10px rgba(16,185,129,0.35); }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; border-color: #fca5a5; transform: translateY(-1px); }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ========== KPI 卡片 ========== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 14px 20px;
}
.kpi-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--primary);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.kpi-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  background: radial-gradient(circle, rgba(37,99,235,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-card.kpi-total { border-left-color: var(--primary); }
.kpi-card.kpi-normal { border-left-color: var(--success); }
.kpi-card.kpi-suspend { border-left-color: var(--warning); }
.kpi-card.kpi-stop { border-left-color: var(--danger); }
.kpi-card.kpi-value { border-left-color: var(--purple); }
.kpi-card.kpi-receivable { border-left-color: var(--teal); }
.kpi-label { font-size: 11px; color: var(--text-light); margin-bottom: 5px; font-weight: 500; }
.kpi-value { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.2; }
.kpi-unit { font-size: 11px; color: var(--text-light); font-weight: normal; margin-left: 2px; }
.kpi-sub { font-size: 10px; color: var(--text-lighter); margin-top: 4px; }

/* ========== 筛选结果汇总栏 ========== */
.summary-bar {
  margin: 0 20px 12px;
  background: linear-gradient(135deg, #f0f7ff 0%, #f5f3ff 100%);
  border: 1px solid #dbeafe;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  overflow: hidden;
}
.summary-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.summary-scroll::-webkit-scrollbar { height: 4px; }
.summary-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
.summary-item {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  flex-shrink: 0;
}
.summary-label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 2px;
  font-weight: 500;
}
.summary-value {
  font-size: 16px;
  font-weight: 700;
  color: #1e40af;
}
.summary-value.unit { font-size: 11px; font-weight: 400; color: #64748b; margin-left: 2px; }
.summary-value.warn { color: #b45309; }
.summary-value.danger { color: #b91c1c; }
.summary-item.divider {
  width: 1px;
  background: #e2e8f0;
  margin: 2px 0;
}

/* ========== 数据可视化图表 ========== */
.chart-panel {
  margin: 0 20px 14px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}
.chart-panel.collapsed .chart-grid { display: none; }
.chart-panel.collapsed { padding-bottom: 12px; }
.chart-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.chart-panel.collapsed .chart-panel-header { margin-bottom: 0; }
.chart-panel-header h2 { font-size: 16px; font-weight: 600; }
.chart-filter-tip {
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 500;
}
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.chart-card {
  background: #fafbfc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
}
.chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.chart-card canvas {
  flex: 1;
  max-height: 200px;
}

@media (max-width: 900px) {
  .chart-grid { grid-template-columns: 1fr; }
}

/* ========== 主次工作区切换 ========== */
.focus-panel {
  background: var(--card-bg);
  margin: 0 20px 12px;
  border-radius: var(--radius);
  padding: 12px 18px;
  box-shadow: var(--shadow);
}
.focus-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.focus-header h2 { font-size: 14px; font-weight: 600; }
.focus-header .hint { font-size: 11px; color: var(--text-light); }
.focus-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.focus-tab {
  padding: 5px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  font-weight: 500;
}
.focus-tab:hover { background: #f1f5f9; border-color: #cbd5e1; }
.focus-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}

/* ========== 筛选条 ========== */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding: 12px 20px;
  flex-wrap: wrap;
}
.filter-item { display: flex; flex-direction: column; gap: 4px; }
.filter-item label { font-size: 11px; color: var(--text-light); font-weight: 500; }
.filter-item select, .filter-item input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  min-width: 120px;
  background: #fff;
  transition: all 0.2s;
}
.filter-item select:focus, .filter-item input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.search-item input { min-width: 200px; }
.filter-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.count-info { font-size: 13px; color: var(--primary); font-weight: 600; }

/* ========== 表格 ========== */
.table-wrap {
  margin: 0 20px 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
  max-height: calc(100vh - 340px);
}
.proj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.proj-table thead {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 10;
}
.proj-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.2px;
}
.proj-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  transition: background 0.15s;
}
.proj-table tbody tr { transition: background 0.15s; }
.proj-table tbody tr:hover { background: #f0f7ff; }
.proj-table .col-idx { width: 50px; text-align: center; color: var(--text-lighter); }
.proj-table .col-name { min-width: 220px; max-width: 320px; }
.proj-table .col-name .proj-name { font-weight: 500; color: var(--text); }
.proj-table .col-name .proj-client { font-size: 11px; color: var(--text-lighter); margin-top: 2px; }
.proj-table .col-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.proj-table .col-act { width: 70px; text-align: center; }
.proj-table .col-status { width: 90px; }

/* 状态标签 */
.status-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.status-normal { background: #d1fae5; color: #065f46; }
.status-suspend { background: #fef3c7; color: #92400e; }
.status-stop { background: #fee2e2; color: #991b1b; }
.status-done { background: #e0e7ff; color: #3730a3; }

/* 卡点标签 */
.block-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  white-space: nowrap;
}
.block-tag.none { background: #f1f5f9; color: var(--text-lighter); border-color: #e2e8f0; }

/* 优先级圆点 */
.priority-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}
.priority-A { background: var(--danger); box-shadow: 0 0 0 2px rgba(239,68,68,0.2); }
.priority-B { background: var(--warning); box-shadow: 0 0 0 2px rgba(245,158,11,0.2); }
.priority-C { background: var(--success); box-shadow: 0 0 0 2px rgba(16,185,129,0.2); }

/* 到期预警 */
.duedate-overdue { color: var(--danger); font-weight: 600; }
.duedate-soon { color: var(--warning); font-weight: 500; }

/* 空状态 */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-light);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.6; }
.empty-hint { font-size: 12px; margin-top: 6px; color: var(--text-lighter); }

/* 编辑按钮 */
.edit-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-weight: 500;
}
.edit-btn:hover { background: var(--primary-light); }

/* ========== 弹窗 ========== */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal.show { display: flex; }
.modal-content {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-large { max-width: 820px; }
.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}
.section-title:first-child { margin-top: 0; }
.highlight-field label { color: var(--success); font-weight: 600; }
.highlight-field input { border-color: #bbf7d0; background: #f0fdf4; }
.required { color: var(--danger); }
.form-group input.readonly { background: #f8fafc; color: var(--text-light); }
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-light);
  width: 28px; height: 28px;
  border-radius: 50%;
  transition: all 0.2s;
}
.modal-close:hover { background: #f1f5f9; color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-group { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.form-group.full { flex: 1 1 100%; }
.form-group label { font-size: 12px; color: var(--text-light); font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-group input.readonly { background: #f8fafc; color: var(--text-light); }
.form-group textarea { resize: vertical; min-height: 50px; }

/* ========== Toast ========== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
  .filter-bar { padding: 12px; }
  .table-wrap { margin: 0 12px 12px; }
  .kpi-grid { padding: 12px; }
  .focus-panel { margin: 0 12px; }
}

/* ========== 侧边栏 + 面板切换 ========== */
.panel { display: none; }
.panel.active { display: block; animation: pageIn 0.2s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ========== 工作任务模块 ========== */
.task-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.task-toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.task-toolbar-left h2 { font-size: 17px; color: var(--text); }
.task-toolbar-hint { font-size: 12px; color: var(--text-light); }
.task-toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; }

.task-view-switch {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.view-btn {
  padding: 8px 18px;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
}
.view-btn:hover { background: #e2e8f0; transform: translateY(-1px); }
.view-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}

/* 进度条 */
.progress-cell { min-width: 90px; }
.progress-bar-wrap {
  background: #e2e8f0;
  border-radius: 8px;
  height: 18px;
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transition: width 0.4s ease;
  border-radius: 8px;
}
.progress-bar-fill.low { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.progress-bar-fill.mid { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress-bar-text {
  position: absolute;
  top: 0; left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  line-height: 18px;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0,0,0,0.25);
}

/* 状态徽章 */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.status-未开始 { background: #f1f5f9; color: #64748b; }
.status-进行中 { background: #dbeafe; color: #1e40af; }
.status-已完成 { background: #dcfce7; color: #15803d; }
.status-延期 { background: #fee2e2; color: #b91c1c; }
.status-暂缓 { background: #fef3c7; color: #92400e; }
.status-取消 { background: #e5e7eb; color: #4b5563; }

/* 任务表格特殊列宽 */
.data-table th:nth-child(1),
.data-table td:nth-child(1) { min-width: 80px; }

/* 按组统计 */
.group-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 16px 20px;
}
.group-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.group-card h3 {
  font-size: 15px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.group-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}
.group-stat-row .label { color: var(--text-light); }
.group-stat-row .value { font-weight: 600; }
.group-progress-overall {
  margin-top: 10px;
  background: #e2e8f0;
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}
.group-progress-overall-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
}

/* 文本省略 */
.text-ellipsis {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

/* 超期日期 */
.overdue {
  color: #dc2626;
  font-weight: 600;
}

/* ========== 登录页 ========== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 50%, #6366f1 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  top: -200px; right: -100px;
}
.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  bottom: -150px; left: -100px;
}
.login-card {
  background: #fff;
  border-radius: 18px;
  padding: 44px 40px;
  width: 400px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  text-align: center;
  position: relative;
  z-index: 1;
  animation: cardIn 0.5s ease;
}
@keyframes cardIn { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.login-logo {
  font-size: 52px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 8px rgba(37,99,235,0.3));
}
.login-card h1 { font-size: 22px; color: var(--text); margin-bottom: 4px; font-weight: 700; }
.login-subtitle { color: var(--text-light); font-size: 13px; margin-bottom: 28px; }
.login-form .form-group { text-align: left; margin-bottom: 18px; }
.login-form .form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 13px; }
.login-form .form-group input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px;
  transition: all 0.2s;
}
.login-form .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.btn-block { width: 100%; padding: 12px; font-size: 15px; margin-top: 8px; font-weight: 600; }
.login-tip { color: var(--danger); font-size: 13px; margin-top: 14px; min-height: 18px; }

/* ========== 面板操作栏 ========== */
.panel-actions {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px 0;
}
.panel-actions .btn { margin-left: 6px; }

/* 只读标签 */
.readonly-tag {
  display: inline-block; padding: 3px 10px; font-size: 12px;
  background: #f1f5f9; color: var(--text-light); border-radius: 4px;
}

/* 禁用的输入框 */
input:disabled, select:disabled {
  background: #f1f5f9; color: var(--text-light); cursor: not-allowed;
}
.readonly { background: #f8fafc; color: var(--text-light); }

/* 用户管理表格 */
#userTable th, #userTable td { padding: 10px 12px; }

/* ========== 考勤模块（在线表格版） ========== */
.att-month-input { padding: 6px 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 13px; }
.att-view-switch { display: inline-flex; border: 1px solid #e2e8f0; border-radius: 6px; overflow: hidden; }
.att-view-btn { border: none; border-radius: 0; }
.att-view-btn.active { background: #2563eb; color: #fff; }

.att-legend-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 10px 20px; border-bottom: 1px solid #f1f5f9;
}
/* 补助标准表（替代图例） */
.att-std-wrap { width: 100%; }
.att-std-wrap summary {
  cursor: pointer; font-size: 13px; font-weight: 600;
  color: #2563eb; user-select: none;
}
.att-std-flex { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; margin-top: 10px; }
.att-std-table { border-collapse: collapse; font-size: 12px; }
.att-std-table th, .att-std-table td { border: 1px solid #5b9bd5; padding: 3px 12px; }
.att-std-table th { background: #5b9bd5; color: #fff; font-weight: 600; line-height: 1.3; }
.att-std-table td:first-child { text-align: left; }
.att-std-table td:nth-child(2), .att-std-table td:nth-child(3) { text-align: center; min-width: 88px; }
.att-key-hint {
  font-size: 12px; color: #475569; line-height: 2;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 16px;
}
.att-key-hint p { margin: 0; }
.att-key-hint code {
  background: #e2e8f0; border-radius: 4px; padding: 1px 6px;
  font-weight: 700; color: #1d4ed8;
}
/* 键盘直填隐藏输入框（不可 display:none，否则无法聚焦） */
.att-key-input { position: absolute; top: 0; left: 0; width: 2px; height: 2px; opacity: 0; border: 0; padding: 0; pointer-events: none; }

.att-grid-wrap { overflow: auto; max-height: calc(100vh - 290px); position: relative; }
.att-grid { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.att-grid th, .att-grid td { border: 1px solid #e2e8f0; padding: 0; text-align: center; }
.att-grid thead th {
  background: #f8fafc; font-weight: 600; color: #334155;
  position: sticky; top: 0; z-index: 3; padding: 4px 3px; line-height: 1.3;
}
.att-grid thead th.weekend { background: #fef9c3; }
.att-grid .att-name {
  min-width: 76px; max-width: 96px; position: sticky; left: 0;
  background: #f8fafc; z-index: 2; font-weight: 600; padding: 6px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.att-grid thead .att-name { z-index: 4; }
.att-wd { font-size: 10px; color: #94a3b8; font-weight: normal; }

.att-sym-row td, .att-loc-row td { border-top: 0; border-bottom: 0; }
.att-sym-row td:first-child { border-top: 1px solid #e2e8f0; }
.att-loc-row td:first-child { border-bottom: 1px solid #e2e8f0; }

.att-sym-cell { min-width: 36px; max-width: 40px; cursor: pointer; padding: 2px 0; height: 32px; }
.att-loc-cell { min-width: 36px; max-width: 40px; cursor: pointer; padding: 1px 2px; font-size: 10px; color: #475569; overflow: hidden; }
.att-loc-cell.weekend { background: #fefce8; }
.att-loc-cell.empty-cell { color: #cbd5e1; }
.att-loc-cell:hover { outline: 1px dashed #2563eb; outline-offset: -1px; }
.att-loc-input {
  width: 100%; border: 1px solid #2563eb; border-radius: 3px;
  font-size: 11px; padding: 1px 3px; outline: none; min-width: 60px;
}
.att-sym-cell.weekend { background: #fefce8; }
.att-sym-cell.empty-cell { color: #cbd5e1; }
.att-sym-cell:hover { outline: 2px solid #2563eb; outline-offset: -2px; }
.att-sym-cell.att-selected { outline: 2px solid #2563eb; outline-offset: -2px; background: #eff6ff; box-shadow: inset 0 0 0 1px #2563eb; }
.att-sym-cell .sym { display: block; padding: 4px 2px; font-weight: 700; }
.att-loc-row .loc-only {
  display: block; font-size: 10px; color: #334155; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 符号配色：ok绿=公司出勤 / rest紫=工休 / bad红=缺勤 / warn橙=迟到早退 / field蓝=外勤补助 / na灰=不适用 */
.sym-c-ok    { background: #dcfce7; color: #15803d; }
.sym-c-rest  { background: #ede9fe; color: #6d28d9; }
.sym-c-bad   { background: #fecaca; color: #b91c1c; box-shadow: inset 0 0 0 1px #ef4444; }
.sym-c-warn  { background: #ffedd5; color: #c2410c; }
.sym-c-field { background: #dbeafe; color: #1d4ed8; }
.sym-c-na    { background: #f1f5f9; color: #64748b; }
.sym[data-att-abnormal] { text-decoration: underline wavy #ef4444 1px; text-underline-offset: 2px; }

.att-stat-col { min-width: 46px; background: #f8fafc; font-size: 11px; color: #334155; padding: 4px 2px; }
.att-grid td.att-stat-col { background: #fbfcfe; }
.att-num { color: #1d4ed8; }
.att-bad { color: #b91c1c; font-weight: 700; }
.att-warn { color: #c2410c; font-weight: 700; }
.att-remark-cell { min-width: 110px; max-width: 160px; text-align: left; padding: 4px 6px; font-size: 11px; color: #64748b; }
.att-remark-editable { cursor: pointer; }
.att-remark-editable:hover { background: #eff6ff; }
.att-remark-input {
  width: 100%; border: 1px solid #2563eb; border-radius: 4px;
  font-size: 11px; padding: 2px 4px; outline: none;
}
.att-stat-summary { padding: 10px 20px; font-size: 12px; color: #475569; line-height: 1.8; }

.att-cell-modal { max-width: 560px; width: 92%; }
.att-cell-modal .sym-group { margin-bottom: 12px; }
.att-cell-modal .sym-group-title { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.att-cell-modal .sym-options { display: flex; flex-wrap: wrap; gap: 6px; }
.att-cell-modal .sym-opt {
  border: 1px solid #e2e8f0; border-radius: 6px; padding: 5px 12px;
  font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; user-select: none;
}
.att-cell-modal .sym-opt:hover { border-color: #2563eb; }
.att-cell-modal .sym-opt.selected { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ========== 全员须知 ========== */
.notice-cats {
  display: flex; gap: 8px; padding: 12px 20px; flex-wrap: wrap;
  border-bottom: 1px solid #f1f5f9;
}
.notice-cat {
  padding: 6px 16px; border-radius: 16px; border: 1px solid #e2e8f0;
  background: #fff; cursor: pointer; font-size: 13px; transition: all 0.2s;
}
.notice-cat:hover { background: #f1f5f9; }
.notice-cat.active { background: #2563eb; color: #fff; border-color: #2563eb; }

.notice-list { padding: 16px 20px; }
.notice-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 16px 20px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.notice-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.notice-card-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.notice-cat-tag {
  padding: 2px 10px; border-radius: 10px; font-size: 12px; color: #fff; font-weight: 500;
}
.notice-title { font-size: 16px; font-weight: 600; color: #1e293b; }
.notice-meta { font-size: 12px; color: #94a3b8; margin-left: auto; }
.notice-content { font-size: 14px; color: #475569; line-height: 1.7; white-space: pre-wrap; }

/* ========== 管理员看板 ========== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.dash-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.03);
  border-top: 4px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.dash-card.dash-red { border-top-color: #ef4444; }
.dash-card.dash-orange { border-top-color: #f59e0b; }
.dash-card.dash-blue { border-top-color: #3b82f6; }
.dash-card.dash-green { border-top-color: #10b981; }
.dash-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
}
.dash-header h3 { font-size: 15px; font-weight: 600; color: #1e293b; }
.dash-sub { font-size: 11px; color: #94a3b8; }
.dash-list { flex: 1; overflow-y: auto; max-height: 360px; }
.dash-item {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.dash-item:hover { background: #f1f5f9; transform: translateX(2px); }
.dash-item.sev-high { border-left-color: #ef4444; background: #fef2f2; }
.dash-item.sev-mid { border-left-color: #f59e0b; background: #fffbeb; }
.dash-item.sev-low { border-left-color: #3b82f6; background: #eff6ff; }
.dash-item-title {
  font-size: 13px; font-weight: 500; color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-item-meta {
  font-size: 11px; color: #64748b; margin-top: 4px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.dash-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.dash-badge.sev-high { background: #fecaca; color: #dc2626; }
.dash-badge.sev-mid { background: #fed7aa; color: #c2410c; }
.dash-badge.sev-low { background: #bfdbfe; color: #1d4ed8; }
.dash-empty { text-align: center; color: #94a3b8; font-size: 13px; padding: 40px 0; }

/* 归属人风险排行 */
.dash-owner-row {
  display: grid;
  grid-template-columns: 70px 1fr 140px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.dash-owner-name { font-size: 13px; font-weight: 500; color: #1e293b; }
.dash-owner-bar-bg {
  height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden;
}
.dash-owner-bar {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 4px;
  transition: width 0.3s;
}
.dash-owner-nums {
  font-size: 11px; color: #64748b;
  display: flex; gap: 6px; justify-content: flex-end;
}
.dash-owner-nums .num-delayed { color: #ef4444; font-weight: 600; }
.dash-owner-nums .num-warn { color: #f59e0b; font-weight: 600; }
.dash-owner-nums .num-pending { color: #64748b; }
.dash-owner-nums .num-total { color: #94a3b8; }

/* 状态分布 */
.dash-status-dist {
  display: flex; gap: 20px; align-items: center; flex: 1;
}
.dash-done-ring {
  position: relative; width: 130px; height: 130px; flex-shrink: 0;
}
.dash-done-ring svg { width: 100%; height: 100%; }
.dash-done-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.dash-done-pct { font-size: 22px; font-weight: 700; color: #10b981; }
.dash-done-label { font-size: 11px; color: #94a3b8; }
.dash-status-bars { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.dash-status-bar-row {
  display: grid;
  grid-template-columns: 50px 1fr 90px;
  gap: 8px; align-items: center;
}
.dsb-label { font-size: 12px; color: #475569; }
.dsb-bg { height: 10px; background: #f1f5f9; border-radius: 5px; overflow: hidden; }
.dsb-fill { height: 100%; border-radius: 5px; transition: width 0.3s; }
.dsb-num { font-size: 11px; color: #64748b; text-align: right; }

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}
.notice-atts { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2e8f0; }
.notice-att {
  display: inline-block; margin-right: 12px; color: #2563eb; font-size: 13px;
  text-decoration: none;
}
.notice-att:hover { text-decoration: underline; }
.notice-actions { margin-top: 10px; display: flex; gap: 8px; justify-content: flex-end; }

/* ========== 工资条 ========== */
.sal-upload-area { padding: 12px 20px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.sal-upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sal-empty-tip { padding: 30px; text-align: center; color: #94a3b8; font-size: 14px; }

/* 管理员全员工资表格 */
.sal-admin-table-wrap { overflow-x: auto; padding: 12px 20px; }
.sal-admin-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 1400px; }
.sal-admin-table th, .sal-admin-table td {
  border: 1px solid #e2e8f0; padding: 5px 6px; text-align: right; white-space: nowrap;
}
.sal-admin-table th:first-child, .sal-admin-table td:first-child,
.sal-admin-table th:nth-child(2), .sal-admin-table td:nth-child(2),
.sal-admin-table .sal-name { text-align: left; }
.sal-admin-table th { background: #f8fafc; font-weight: 600; color: #475569; }
.sal-admin-table .sal-gross { background: #dcfce7; font-weight: 600; color: #166534; }
.sal-admin-table .sal-net { background: #fef3c7; font-weight: 700; color: #b45309; }
.sal-unmatched { background: #fef2f2 !important; }
.sal-unmatched td { color: #dc2626; }

/* 冻结表头 + 左侧姓名/部门列（垂直和水平滚动时保持可见） */
.sal-admin-table-wrap, .sal-review-table-wrap {
  overflow: auto; max-height: calc(100vh - 280px);
}
.sal-admin-table th { position: sticky; top: 0; z-index: 3; box-shadow: 0 1px 0 #cbd5e1; }
.sal-admin-table th:nth-child(1), .sal-admin-table td:nth-child(1) {
  position: sticky; left: 0; width: 82px; min-width: 82px; max-width: 82px;
  background: #fff; z-index: 2; border-right: 2px solid #cbd5e1;
}
.sal-admin-table th:nth-child(2), .sal-admin-table td:nth-child(2) {
  position: sticky; left: 82px; width: 76px; min-width: 76px; max-width: 76px;
  background: #fff; z-index: 1; border-right: 2px solid #cbd5e1;
}
.sal-admin-table th:nth-child(1) { z-index: 6; background: #f8fafc; }
.sal-admin-table th:nth-child(2) { z-index: 5; background: #f8fafc; }
.sal-unmatched td:nth-child(1), .sal-unmatched td:nth-child(2) { background: #fef2f2; }

/* 排序表头 */
.sal-admin-table th[data-skey] { cursor: pointer; user-select: none; }
.sal-admin-table th[data-skey]:hover { background: #e2e8f0; }
.sal-admin-table th.sal-sort-active { background: #dbeafe !important; color: #1d4ed8; }

/* 双模型交叉验证：差异格红框 / 勾稽不平行黄底 */
.sal-cell-diff {
  border: 2px solid #dc2626 !important; background: #fff !important;
  box-shadow: inset 0 0 0 1px #fecaca;
}
.sal-row-imbalance td { background: #fffbeb !important; }
.sal-row-imbalance td:nth-child(1), .sal-row-imbalance td:nth-child(2) { background: #fffbeb !important; }
.sal-rv-match span { cursor: help; }
.sal-review-foot {
  padding: 8px 20px; font-size: 12px; color: #475569;
  background: #f8fafc; border-top: 1px solid #e2e8f0;
}
.sal-rv-input {
  width: 100%; min-width: 70px; padding: 3px 5px; border: 1px solid transparent;
  background: transparent; font-size: 12px; text-align: right; outline: none;
}
.sal-rv-input[data-key="name"], .sal-rv-input[data-key="dept"] { text-align: left; }
.sal-rv-input:focus { border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 2px rgba(59,130,246,.2); }
.sal-rv-num { font-variant-numeric: tabular-nums; }
.sal-rv-match { font-size: 11px; }
.sal-review-head {
  padding: 10px 20px; background: #eff6ff; border-bottom: 1px solid #bfdbfe;
  display: flex; justify-content: space-between; font-size: 13px; color: #1e40af;
}

/* 员工个人工资条卡片 */
.sal-card {
  max-width: 600px; margin: 20px auto; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06);
  overflow: hidden;
}
.sal-card-head {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff;
  padding: 16px 20px; font-size: 16px; font-weight: 600;
}
.sal-card-section { padding: 12px 20px; border-bottom: 1px solid #f1f5f9; }
.sal-card-section h4 {
  font-size: 13px; color: #64748b; margin: 0 0 8px; font-weight: 600; text-transform: none;
}
.sal-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
.sal-card-item {
  display: flex; justify-content: space-between; padding: 4px 0;
  font-size: 13px; border-bottom: 1px dashed #f1f5f9;
}
.sal-card-label { color: #64748b; }
.sal-card-val { color: #1e293b; font-weight: 500; font-variant-numeric: tabular-nums; }
.sal-card-total {
  background: #fafbfc; padding: 14px 20px; text-align: right;
  border-top: 2px solid #e2e8f0;
}
.sal-gross-row { font-size: 13px; color: #475569; margin-bottom: 6px; }
.sal-net-row { font-size: 18px; color: #b45309; font-weight: 700; }
.sal-net-row b { color: #b45309; }
.sal-remark { font-size: 12px; color: #94a3b8; margin-top: 6px; }

/* ========== 任务模块新样式 ========== */
.task-table-wide th, .task-table-wide td { white-space: normal; vertical-align: top; }

/* 会议预警标签 */
.warning-tag { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.warn-normal { background: #f1f5f9; color: #64748b; }
.warn-warning { background: #fef3c7; color: #92400e; }
.warn-danger  { background: #fee2e2; color: #991b1b; }

/* 样表新状态徽章 */
.status-完成 { background: #dcfce7; color: #15803d; }
.status-进行中 { background: #dbeafe; color: #1e40af; }
.status-转办 { background: #ede9fe; color: #5b21b6; }
.status-延期 { background: #fee2e2; color: #b91c1c; }
.status-未启动 { background: #f1f5f9; color: #64748b; }

/* 逾期日期高亮 */
.duedate-overdue { color: var(--danger); font-weight: 600; }

/* 只读标签 */
.readonly-tag { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 10px; background: #e2e8f0; color: #64748b; margin-right: 4px; }

/* ============================================================
   设计系统覆盖层（2026-09 UI 全面改造 · Linear/飞书/Notion 风格）
   追加在文件末尾，同名选择器按级联顺序覆盖上方旧规则
   ============================================================ */

/* ---------- 全局布局骨架：顶栏(固定56px) + 侧边栏(240px) + 主内容区 ---------- */
.app-shell { display: flex; align-items: stretch; padding-top: 56px; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  position: sticky; top: 56px;
  height: calc(100vh - 56px);
  display: flex; flex-direction: column;
  padding: 16px 12px;
  overflow-y: auto;
  box-sizing: border-box;
}
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-nav-item {
  display: flex; align-items: center; gap: 8px;
  height: 40px; flex-shrink: 0;
  padding: 0 12px;
  border: none; background: transparent; cursor: pointer;
  border-radius: 8px;
  font-size: 14px; color: #4b5563; text-align: left;
  font-family: inherit;
  transition: all 150ms ease;
  white-space: nowrap;
}
.side-nav-item .nav-ico { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.side-nav-item:hover { background: #f3f4f6; color: #1f2937; }
.side-nav-item.active { background: #eff6ff; color: #4f46e5; font-weight: 500; }
.side-nav-divider { height: 1px; background: var(--border); margin: 8px 4px; flex-shrink: 0; }
.sidebar-user {
  margin-top: 12px; flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  background: #f3f4f6; border-radius: 8px; padding: 12px;
}
.sidebar-user-info { min-width: 0; }
.su-name { font-size: 13px; font-weight: 600; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-role { font-size: 11px; color: #6b7280; margin-top: 1px; }
.main-content { flex: 1; min-width: 0; padding: 24px; box-sizing: border-box; }

/* ---------- 通用卡片 / 页头 ---------- */
.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); padding: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; font-weight: 600; color: #1f2937; }
.card-link { font-size: 14px; color: var(--primary); text-decoration: none; transition: all 150ms ease; }
.card-link:hover { color: var(--primary-dark); }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; font-weight: 600; color: #1f2937; }
.page-head-sub { font-size: 14px; color: #6b7280; margin-top: 2px; font-weight: 400; }
.page-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- 首页 Dashboard ---------- */
.home-welcome { margin-bottom: 20px; }
.home-welcome h1 { font-size: 24px; font-weight: 600; color: #1f2937; }
.home-welcome p { font-size: 14px; color: #6b7280; margin-top: 4px; }
.home-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.home-stat-card {
  background: #fff; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border-left: 4px solid var(--primary);
  padding: 16px 18px;
  transition: all 150ms ease;
}
.home-stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.home-stat-card .kpi-label { font-size: 14px; color: #6b7280; margin-bottom: 2px; }
.home-stat-card .kpi-value { font-size: 32px; font-weight: 700; color: #1f2937; line-height: 1.2; }
.home-stat-card .kpi-sub { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.home-stat-card.kpi-green { border-left-color: #10b981; }
.home-stat-card.kpi-blue { border-left-color: #3b82f6; }
.home-stat-card.kpi-purple { border-left-color: #8b5cf6; }
.home-stat-card.kpi-orange { border-left-color: #f59e0b; }
.home-columns { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.home-todo-item { display: flex; align-items: center; gap: 12px; height: 48px; border-bottom: 1px solid #f3f4f6; }
.home-todo-item:last-child { border-bottom: none; }
.todo-check { width: 18px; height: 18px; border: 2px solid #d1d5db; border-radius: 50%; flex-shrink: 0; cursor: pointer; transition: all 150ms ease; padding: 0; background: #fff; }
.todo-check:hover { border-color: var(--primary); }
.todo-check.done { background: var(--primary); border-color: var(--primary); }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-size: 14px; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-proj { font-size: 12px; color: #9ca3af; }
.todo-due { font-size: 12px; color: #6b7280; flex-shrink: 0; }
.todo-due.overdue { color: #ef4444; font-weight: 600; }
.home-empty { text-align: center; color: #9ca3af; font-size: 14px; padding: 40px 0; }
.act-item { display: flex; align-items: center; gap: 10px; height: 56px; border-bottom: 1px solid #f3f4f6; }
.act-item:last-child { border-bottom: none; }
.act-ico { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.act-ico.upload { background: #ecfdf5; }
.act-ico.comment { background: #eff6ff; }
.act-ico.update { background: #f5f3ff; }
.act-text { font-size: 14px; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.act-time { font-size: 12px; color: #9ca3af; flex-shrink: 0; }

/* ---------- KPI 统计卡片（全局统一新样式） ---------- */
.kpi-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; margin: 0 0 20px; }
.kpi-card { border-left-width: 4px; border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.kpi-card .kpi-label { font-size: 14px; color: #6b7280; }
.kpi-card .kpi-value { font-size: 32px; font-weight: 700; }
.kpi-card .kpi-unit { font-size: 13px; color: #6b7280; }
.kpi-card .kpi-sub { font-size: 12px; color: #9ca3af; }
.kpi-card.kpi-green { border-left-color: #10b981; }
.kpi-card.kpi-blue { border-left-color: #3b82f6; }
.kpi-card.kpi-purple { border-left-color: #8b5cf6; }
.kpi-card.kpi-orange { border-left-color: #f59e0b; }

/* ---------- 面板内区块：白卡化 + 统一间距 ---------- */
.summary-bar { margin: 0 0 16px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.chart-panel { margin: 0 0 16px; }
.chart-grid { gap: 16px; }
.focus-panel { margin: 0 0 16px; }
.filter-bar { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 16px; }
.filter-item select, .filter-item input { height: 36px; border-radius: 6px; }
.table-wrap { margin: 0 0 20px; max-height: calc(100vh - 240px); border-radius: 8px; }
.task-view-switch { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 16px; padding: 12px 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.view-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.table-section { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); padding: 20px; margin-bottom: 16px; overflow: hidden; }
.group-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* ---------- 项目表格（新样式） ---------- */
.proj-table thead th { background: #f3f4f6; color: #374151; font-weight: 600; height: 44px; }
.proj-table tbody td { height: 56px; vertical-align: middle; }
.proj-table tbody tr:hover { background: #f9fafb; }
.status-tag { border-radius: 12px; padding: 2px 10px; font-size: 11px; font-weight: 500; }
.status-normal { background: #ecfdf5; color: #059669; }
.status-suspend { background: #fffbeb; color: #d97706; }
.status-stop { background: #fef2f2; color: #dc2626; }
.status-done { background: #eef2ff; color: #4f46e5; }

/* ---------- 通用数据表格（任务/用户管理） ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead th { background: #f3f4f6; color: #374151; font-weight: 600; height: 44px; padding: 10px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border); font-size: 12px; }
.data-table tbody td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; height: 56px; vertical-align: middle; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: #f9fafb; }
.role-tag { border-radius: 12px; padding: 2px 10px; font-size: 11px; font-weight: 500; display: inline-block; white-space: nowrap; }

/* ---------- 员工考勤（行高统一 56px 重点修复） ---------- */
.att-legend-bar { padding: 0; margin-bottom: 16px; background: transparent; border: none; }
.att-std-wrap { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); overflow: hidden; }
.att-std-wrap summary {
  padding: 12px 16px; font-size: 13px; font-weight: 600; color: #1f2937;
  cursor: pointer; list-style: none; user-select: none;
}
.att-std-wrap summary::-webkit-details-marker { display: none; }
.att-std-wrap summary::after { content: '▾'; float: right; color: #9ca3af; transition: transform 150ms ease; }
.att-std-wrap:not([open]) summary::after { transform: rotate(-90deg); }
.att-std-wrap[open] summary { border-bottom: 1px solid #f3f4f6; }
.att-std-flex { display: flex; gap: 16px; padding: 16px; flex-wrap: wrap; align-items: flex-start; }
.att-std-table { border-collapse: collapse; font-size: 12px; background: #fff; }
.att-std-table th { background: #f3f4f6; color: #374151; padding: 6px 12px; font-weight: 600; border: 1px solid var(--border); }
.att-std-table td { border: 1px solid var(--border-light); padding: 5px 12px; color: #4b5563; }
.att-key-hint { background: #f9fafb; border-radius: 8px; padding: 12px 16px; font-size: 12px; color: #4b5563; flex: 1; min-width: 300px; }
.att-key-hint b { color: #1f2937; }
.att-key-hint code { background: #eff6ff; color: #4f46e5; border-radius: 4px; padding: 1px 6px; font-weight: 600; margin: 0 1px; }
.att-grid { font-size: 12px; }
.att-grid thead th { height: 44px; padding: 0 2px; background: #f9fafb; color: #374151; font-weight: 600; }
.att-grid .att-sym-cell { height: 28px !important; padding: 0 !important; overflow: hidden; }
.att-grid .att-loc-cell { min-height: 28px; padding: 1px 2px !important; overflow: hidden; white-space: normal; word-break: break-all; line-height: 1.25; vertical-align: middle; }
.att-sym-cell .sym { height: 28px; line-height: 28px; padding: 0; }
.att-grid thead th.weekend { background: #fef3c6; }
.att-grid td.weekend { background: #fef3c6; }
.att-grid .att-name { min-width: 100px; width: 100px; vertical-align: middle; }
.att-sym-cell:hover { outline-color: #4f46e5; }
.att-sym-cell.att-selected { outline-color: #4f46e5; }
.att-loc-cell:hover { outline-color: #4f46e5; }
.att-view-btn.active { background: var(--primary); color: #fff; }
.att-grid-wrap { max-height: calc(100vh - 220px); }
.att-stat-summary {
  background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  padding: 12px 20px; font-size: 13px; color: #374151;
}
.att-stat-summary b { font-weight: 700; }
.att-bad { color: #ef4444; font-weight: 700; }
.att-warn { color: #f59e0b; font-weight: 700; }

/* ---------- 标签筛选条（问答/专栏/须知通用） ---------- */
.tag-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tag-pill {
  border: 1px solid var(--border); background: #fff; color: #6b7280;
  border-radius: 16px; padding: 4px 12px; font-size: 13px;
  cursor: pointer; transition: all 150ms ease; font-family: inherit; line-height: 1.5;
}
.tag-pill:hover { background: #f9fafb; color: #1f2937; }
.tag-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tag-select { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-select .tag-pill.active { background: #eff6ff; border-color: var(--primary); color: var(--primary); }

/* ---------- 专业问答 ---------- */
.qa-list { display: flex; flex-direction: column; gap: 12px; }
.qa-card {
  background: #fff; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  padding: 16px 20px; cursor: pointer;
  transition: all 150ms ease;
}
.qa-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-1px); }
.qa-card-title { font-size: 16px; font-weight: 600; color: #1f2937; margin-bottom: 6px; line-height: 1.5; }
.qa-card-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #6b7280; flex-wrap: wrap; }
.qa-status { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.qa-status.solved { color: #059669; }
.qa-status.pending { color: #f59e0b; }
.qa-status.solved::before { content: '✓'; font-weight: 700; }
.qa-status.pending::before { content: '●'; font-size: 10px; }
.qa-tag { background: #f3f4f6; color: #4b5563; border-radius: 12px; padding: 1px 8px; font-size: 12px; white-space: nowrap; }
.qa-ava {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.qa-empty { text-align: center; color: #9ca3af; padding: 60px 20px; font-size: 14px; }
.qa-detail-meta { font-size: 13px; color: #6b7280; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qa-detail-content { font-size: 14px; color: #1f2937; line-height: 1.8; white-space: pre-wrap; background: #f9fafb; border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; }
.qa-answer-item { border: 1px solid #f3f4f6; border-radius: 8px; padding: 12px 16px; margin-bottom: 10px; }
.qa-answer-item.best { border-color: #a7f3d0; background: #f0fdf4; }
.qa-answer-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6b7280; margin-bottom: 6px; flex-wrap: wrap; }
.qa-best-badge { background: #10b981; color: #fff; border-radius: 10px; padding: 1px 8px; font-size: 11px; font-weight: 600; }
.qa-answer-content { font-size: 14px; line-height: 1.7; white-space: pre-wrap; color: #1f2937; }
.qa-adopt-btn {
  background: none; border: 1px solid #10b981; color: #059669;
  border-radius: 6px; padding: 3px 10px; font-size: 12px;
  cursor: pointer; margin-top: 6px; transition: all 150ms ease; font-family: inherit;
}
.qa-adopt-btn:hover { background: #10b981; color: #fff; }

/* ---------- 知识专栏 ---------- */
.kb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.kb-card {
  background: #fff; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  padding: 20px; cursor: pointer;
  transition: all 150ms ease;
  height: fit-content;
}
.kb-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-1px); }
.kb-card-title {
  font-size: 18px; font-weight: 600; color: #1f2937; margin-bottom: 8px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kb-card-summary {
  font-size: 14px; color: #6b7280; margin-bottom: 12px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.kb-card-foot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; flex-wrap: wrap; }
.kb-empty { text-align: center; color: #9ca3af; padding: 60px 20px; font-size: 14px; grid-column: 1 / -1; }
.kb-empty .empty-icon { font-size: 48px; margin-bottom: 12px; }
.kb-detail-meta { font-size: 13px; color: #6b7280; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kb-detail-content { font-size: 15px; line-height: 1.9; white-space: pre-wrap; color: #1f2937; }
.kb-detail-content img { max-width: 100%; border-radius: 8px; }

/* ---------- 全员须知 / 工资条 ---------- */
.notice-cats { gap: 8px; padding: 0 0 16px; background: transparent; border: none; display: flex; flex-wrap: wrap; }
.notice-cat { border: 1px solid var(--border); background: #fff; color: #6b7280; border-radius: 16px; padding: 4px 12px; font-size: 13px; }
.notice-cat:hover { background: #f9fafb; }
.notice-cat.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.notice-list { padding: 0; background: transparent; display: flex; flex-direction: column; gap: 12px; }
.notice-card {
  background: #fff; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  padding: 16px 20px;
}
.notice-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.sal-upload-area { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); padding: 12px 20px; margin-bottom: 16px; border-bottom: none; }

/* ---------- 全局过渡动画 ---------- */
.btn, .side-nav-item, .tag-pill, .view-btn, .focus-tab, .notice-cat, .qa-card, .kb-card {
  transition: all 150ms ease;
}

/* ---------- 用户管理角色胶囊 ---------- */
.role-admin { background: #eef2ff; color: #4f46e5; }
.role-editor { background: #eff6ff; color: #3b82f6; }
.role-leader { background: #f5f3ff; color: #8b5cf6; }
.role-member { background: #f3f4f6; color: #4b5563; }
.edit-btn.del-btn { background: #fff; border: 1px solid #fecaca; color: var(--danger); }
.edit-btn.del-btn:hover { background: #fef2f2; border-color: #fca5a5; }

/* ========== 站内通知面板 ========== */
.notif-wrap { position: relative; }
.notif-panel {
  display: none;
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 380px; max-height: 520px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  z-index: 200;
  overflow: hidden;
  flex-direction: column;
}
.notif-panel.show { display: flex; animation: fadeIn 0.15s ease; }
.notif-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.notif-head-title { font-weight: 600; font-size: 15px; color: var(--text); }
.notif-readall {
  background: none; border: none; cursor: pointer;
  color: var(--primary); font-size: 13px;
  padding: 4px 10px; border-radius: 6px;
  transition: all 150ms ease;
}
.notif-readall:hover { background: var(--primary-light); }
.notif-list { overflow-y: auto; flex: 1; }
.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer; position: relative;
  transition: background 150ms ease;
}
.notif-item:hover { background: #f9fafb; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: #f8faff; }
.notif-item.unread:hover { background: #eef2ff; }
.notif-item-ico { font-size: 18px; line-height: 1.3; flex-shrink: 0; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.4; }
.notif-item:not(.unread) .notif-item-title { font-weight: 500; color: #4b5563; }
.notif-item-content { font-size: 12.5px; color: var(--text-light); margin-top: 2px; line-height: 1.5; word-break: break-all; }
.notif-item-time { font-size: 11.5px; color: var(--text-lighter); margin-top: 4px; }
.notif-unread-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0; margin-top: 6px;
}
.notif-empty { padding: 48px 0; text-align: center; color: var(--text-light); font-size: 13px; }

/* ========== 员工工作台首页 ========== */
.wb-left-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.wb-proj-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-light);
  transition: background 150ms ease;
}
.wb-proj-item:hover { background: #f9fafb; }
.wb-proj-item:last-child { border-bottom: none; }
.wb-proj-main { min-width: 0; flex: 1; }
.wb-proj-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wb-proj-meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.wb-st {
  flex-shrink: 0;
  font-size: 12px; padding: 2px 10px; border-radius: 12px; font-weight: 500;
}
.st-ok { background: #ecfdf5; color: #059669; }
.st-warn { background: #fffbeb; color: #d97706; }
.st-stop { background: #fef2f2; color: #dc2626; }
.wb-att-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border-light);
}
.wb-att-row:last-of-type { border-bottom: none; }
.wb-att-ico { font-size: 15px; flex-shrink: 0; }
.wb-att-label { flex: 1; font-size: 13.5px; color: var(--text-light); }
.wb-att-val { font-size: 14px; font-weight: 700; color: var(--text); }
.wb-att-val.wb-bad { color: var(--danger); }
.wb-att-val.wb-warn { color: var(--warning); }
.wb-att-remark {
  margin-top: 10px; padding: 8px 12px;
  background: var(--border-light); border-radius: 8px;
  font-size: 12px; color: var(--text-light); line-height: 1.5;
}

/* ========== 项目 ↔ 任务联动 ========== */
.proj-expand-btn {
  background: none; border: none; cursor: pointer;
  width: 20px; height: 20px; line-height: 1;
  font-size: 9px; color: var(--text-lighter);
  border-radius: 4px; padding: 0; margin-right: 4px;
  transition: all 150ms ease; vertical-align: middle;
}
.proj-expand-btn:hover { background: var(--primary-light); color: var(--primary); }
.proj-expand-btn.open { color: var(--primary); }
.proj-task-badge {
  display: inline-block; margin-left: 6px;
  background: #eff6ff; color: #3b82f6;
  font-size: 11px; font-weight: 600;
  padding: 1px 7px; border-radius: 10px; vertical-align: middle;
}
.proj-tasks-row > td {
  background: #f8faff;
  padding: 12px 16px 14px 38px;
  border-bottom: 1px solid var(--border);
}
.pt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pt-pct { font-size: 13px; color: var(--text); }
.pt-pct b { color: var(--primary); }
.pt-bar {
  flex: 1; max-width: 260px; height: 8px;
  background: var(--border-light); border-radius: 4px; overflow: hidden;
}
.pt-bar-fill { height: 100%; background: linear-gradient(90deg, #6366f1, #4f46e5); border-radius: 4px; transition: width 0.3s ease; }
.pt-list { display: flex; flex-direction: column; }
.pt-item {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 4px; font-size: 13px;
  border-bottom: 1px dashed var(--border-light);
}
.pt-item:last-child { border-bottom: none; }
.pt-name {
  flex: 1; min-width: 0; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-owner { flex-shrink: 0; font-size: 12.5px; color: var(--text-light); }
.pt-end { flex-shrink: 0; font-size: 12px; color: var(--text-lighter); width: 76px; text-align: right; }
.pt-empty { font-size: 12.5px; color: var(--text-lighter); padding: 4px 0; }
.st-run { background: #eff6ff; color: #3b82f6; }
/* 任务弹窗：项目自动带出提示行 */
.t-proj-hint {
  margin-top: 6px; padding: 6px 10px;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px;
  font-size: 12px; color: #15803d; line-height: 1.5;
}

/* ========== 数据备份与恢复 ========== */
.backup-tip {
  font-size: 12.5px; color: var(--text-light);
  background: var(--border-light); border-radius: 8px;
  padding: 8px 12px; margin-bottom: 12px; line-height: 1.6;
}
.backup-table-head, .backup-row {
  display: grid; grid-template-columns: 1fr 110px 90px 150px 90px;
  gap: 10px; align-items: center;
  padding: 9px 12px;
}
.backup-table-head {
  font-size: 12px; color: var(--text-lighter); font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: #f9fafb; border-radius: 6px 6px 0 0;
}
.backup-row {
  font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--border-light);
  transition: background 150ms ease;
}
.backup-row:hover { background: #f9fafb; }
.backup-row:last-child { border-bottom: none; }
.backup-name { font-family: Consolas, monospace; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backup-type { font-size: 12px; }
.backup-size, .backup-time { font-size: 12px; color: var(--text-light); }
.backup-act { text-align: right; }
.backup-restore-btn {
  background: #fff; border: 1px solid var(--border); color: #374151;
  border-radius: 6px; padding: 4px 12px; font-size: 12px; cursor: pointer;
  transition: all 150ms ease;
}
.backup-restore-btn:hover { border-color: var(--primary); color: var(--primary); }
.backup-restore-btn.armed {
  background: #fef2f2; border-color: var(--danger); color: var(--danger); font-weight: 600;
}
.backup-empty, .backup-loading { padding: 16px 0; text-align: center; font-size: 12.5px; color: var(--text-lighter); }

/* ========== 批量操作 ========== */
.col-check { width: 40px; text-align: center; padding: 10px 6px !important; }
.col-check input[type="checkbox"] { cursor: pointer; width: 15px; height: 15px; }
.row-selected { background: #eff6ff !important; }
.row-selected:hover { background: #dbeafe !important; }
.batch-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; margin-top: 12px;
  background: #fff; border: 1px solid var(--primary); border-radius: 10px;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.15s ease;
  flex-wrap: wrap;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.batch-info { font-size: 13px; color: var(--text); }
.batch-info b { color: var(--primary); font-size: 15px; }
.batch-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-light);
}
.batch-label select, .batch-label input {
  height: 32px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; color: var(--text);
  background: #fff; outline: none;
  transition: border-color 150ms ease;
}
.batch-label select:focus, .batch-label input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79,70,229,0.15); }

/* ===== 工资条核对：勾稽校验红/绿行 + 可疑字段高亮（1 元阈值）===== */
.sal-row-verify-pass td { background: #f0fdf4 !important; }
.sal-row-verify-pass td:nth-child(1), .sal-row-verify-pass td:nth-child(2) { background: #f0fdf4 !important; }
.sal-row-verify-fail td { background: #fef2f2 !important; }
.sal-row-verify-fail td:nth-child(1), .sal-row-verify-fail td:nth-child(2) { background: #fef2f2 !important; }
.sal-row-verify-fail td:nth-child(3) { color: #dc2626; }
/* 已确认的可信行：淡化显示，让红色行更突出 */
.sal-row-verify-pass.sal-row-confirmed td { background: #f8fafc !important; opacity: .72; }
.sal-row-verify-pass.sal-row-confirmed td:nth-child(1), .sal-row-verify-pass.sal-row-confirmed td:nth-child(2) { background: #f8fafc !important; }
/* 可疑分项格（浅红底虚线框）；双模型分歧格（白底红框）优先级更高 */
.sal-rv-input.sal-cell-suspect { background: #fee2e2 !important; border: 1px dashed #f87171 !important; }
.sal-rv-input.sal-cell-diff { background: #fff !important; border: 2px solid #dc2626 !important; }
/* 应发/实发可疑格：深红强调 */
.sal-admin-table td.sal-cell-suspect-total { background: #fecaca !important; box-shadow: inset 0 0 0 2px #dc2626; }

/* ===== 项目当前阶段：表格进度条列（前期灰/中期蓝/后期绿/完成深绿）===== */
.col-stage { min-width: 150px; }
.stage-cell { display: flex; flex-direction: column; gap: 3px; }
.stage-name { font-size: 12px; color: #374151; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.stage-bar { height: 6px; border-radius: 3px; background: #e5e7eb; overflow: hidden; }
.stage-fill { height: 100%; border-radius: 3px; transition: width 300ms ease; }
.stage-fill.stage-early { background: #94a3b8; }
.stage-fill.stage-mid { background: #3b82f6; }
.stage-fill.stage-late { background: #10b981; }
.stage-fill.stage-done { background: #047857; }

/* ===== 到期提醒：严重逾期深红加粗 + 警示图标 ===== */
.duedate-severe { color: #991b1b !important; font-weight: 700 !important; }
.due-icon { margin-right: 3px; }

/* ===== 首页"需推进项目"卡片 ===== */
.home-push-card { border-left: 3px solid #dc2626; }
.push-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid #f3f4f6; }
.push-item:last-child { border-bottom: none; }
.push-item:hover { background: #fef2f2; border-radius: 8px; }
.push-ico { font-size: 18px; flex-shrink: 0; }
.push-main { flex: 1; min-width: 0; }
.push-name { font-size: 13.5px; font-weight: 600; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.push-meta { font-size: 12px; color: #6b7280; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.push-due { font-size: 12px; font-weight: 600; flex-shrink: 0; color: #ef4444; }
.push-due.severe { color: #991b1b; background: #fee2e2; padding: 2px 8px; border-radius: 999px; }

/* ===== 人员负载看板（数据统计页）===== */
.workload-card { margin-bottom: 16px; }
.workload-summary { display: flex; gap: 28px; flex-wrap: wrap; padding: 12px 4px 16px; border-bottom: 1px solid #f3f4f6; margin-bottom: 16px; }
.ws-item { display: flex; flex-direction: column; gap: 2px; }
.ws-num { font-size: 22px; font-weight: 700; color: #1f2937; }
.ws-num.ws-c-overload { color: #dc2626; }
.ws-num.ws-c-normal { color: #d97706; }
.ws-num.ws-c-low { color: #059669; }
.ws-label { font-size: 12px; color: #6b7280; }
.workload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.wl-card { border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: box-shadow 150ms ease, transform 150ms ease; background: #fff; }
.wl-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.wl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.wl-name { font-size: 14px; font-weight: 600; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; font-weight: 500; }
.wl-card.low .wl-tag { background: #ecfdf5; color: #059669; }
.wl-card.normal .wl-tag { background: #fefce8; color: #d97706; }
.wl-card.overload .wl-tag { background: #fef2f2; color: #dc2626; }
.wl-card.overload { border-color: #fecaca; }
.wl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.wl-stat { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.wl-num { font-size: 16px; font-weight: 700; color: #374151; }
.wl-num.wl-danger { color: #dc2626; }
.wl-k { font-size: 10.5px; color: #9ca3af; white-space: nowrap; }
.wl-bar { height: 6px; border-radius: 3px; background: #f1f5f9; overflow: hidden; }
.wl-fill { height: 100%; border-radius: 3px; }
.wl-card.low .wl-fill { background: #10b981; }
.wl-card.normal .wl-fill { background: #f59e0b; }
.wl-card.overload .wl-fill { background: #ef4444; }
.wl-rate { font-size: 11.5px; color: #6b7280; margin-top: 6px; text-align: right; }

/* ========== 工资截图（原件图片模式）2026-09-22 ========== */
.sal-img-list-box { margin: 10px 0 4px; padding: 10px 14px; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 10px; }
.sal-img-list-title { font-size: 13px; font-weight: 600; color: #5b21b6; margin-bottom: 8px; }
.sal-img-chips { display: flex; flex-direction: column; gap: 8px; }
.sal-img-chip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.sal-img-chip.is-pending { border-left: 4px solid #f59e0b; }
.sal-img-chip.is-ok { border-left: 4px solid #16a34a; }
.sal-chip-name { font-weight: 600; color: #1f2937; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sal-chip-meta { color: #6b7280; font-size: 12px; }
.sal-chip-badge { font-size: 12px; font-weight: 600; }
.is-pending .sal-chip-badge { color: #b45309; }
.is-ok .sal-chip-badge { color: #15803d; }

/* 管理员原图预览区 */
.sal-img-originals-title { font-size: 13px; font-weight: 600; color: #5b21b6; margin: 14px 0 8px; padding-top: 10px; border-top: 1px dashed #c4b5fd; }
.sal-img-originals { display: flex; flex-direction: column; gap: 16px; }
.sal-img-orig-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.sal-img-orig { width: 100%; max-width: 100%; height: auto; cursor: zoom-in; border-radius: 6px; transition: opacity .15s; }
.sal-img-orig:hover { opacity: .9; }
.sal-img-orig-name { font-size: 12px; color: #6b7280; text-align: center; word-break: break-all; }
.sal-chip-del { color: #dc2626 !important; border-color: #fca5a5 !important; }

/* 行映射核对弹窗（v2：可缩放图片 + 拖拽调整边界） */
.sim-map-content { max-width: 1280px !important; width: 96%; height: 92vh; display: flex; flex-direction: column; }
.sim-map-content.fullscreen { max-width: 100% !important; width: 100%; height: 100vh; }
.sim-map-body { display: flex; gap: 14px; flex: 1; min-height: 0; padding: 14px !important; }
.sim-map-left { flex: 1.5; overflow: hidden; background: #1e293b; border-radius: 8px; padding: 4px; min-width: 0; display: flex; flex-direction: column; }
/* 缩放工具栏 */
.sim-zoom-bar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #334155; border-radius: 6px; color: #e2e8f0; font-size: 12.5px; flex-shrink: 0; margin: 2px; }
.sim-zoom-bar button { background: #475569; border: none; color: #f1f5f9; padding: 3px 10px; border-radius: 4px; cursor: pointer; font-size: 14px; line-height: 1; }
.sim-zoom-bar button:hover { background: #64748b; }
.sim-zoom-bar .pct { min-width: 46px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.sim-zoom-bar .tip { margin-left: auto; color: #94a3b8; font-size: 11.5px; }
/* 图片滚动容器 */
.sim-img-scroll { flex: 1; overflow: auto; position: relative; background: #0f172a; border-radius: 4px; margin: 2px; }
.sim-img-stage { position: relative; display: inline-block; transform-origin: top left; transition: transform .08s; }
.sim-img-stage img { display: block; max-width: none; }
#simMapOverlay { position: absolute; inset: 0; pointer-events: none; }
/* 行框 */
.sim-box { position: absolute; left: 0; right: 0; pointer-events: auto; cursor: pointer; box-sizing: border-box; font-size: 13px; font-weight: 700; line-height: 1.4; overflow: hidden; white-space: nowrap; padding-left: 6px; }
.sim-box-hdr { background: rgba(59,130,246,.22); border: 2px solid #3b82f6; color: #bfdbfe; }
.sim-box-ok { background: rgba(34,197,94,.18); border: 2px solid #22c55e; color: #86efac; }
.sim-box-bad { background: rgba(239,68,68,.18); border: 2px dashed #ef4444; color: #fca5a5; }
.sim-box.on { border-width: 3px; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }
/* 拖拽手柄：行框上下边缘 */
.sim-box .sim-handle { position: absolute; left: 0; right: 0; height: 7px; cursor: ns-resize; background: linear-gradient(to bottom, rgba(255,255,255,.5), transparent); z-index: 2; }
.sim-box .sim-handle.top { top: -4px; }
.sim-box .sim-handle.bot { bottom: -4px; }
.sim-box .sim-handle:hover { background: linear-gradient(to bottom, #fbbf24, #f59e0b); }
.sim-box.on .sim-handle { background: linear-gradient(to bottom, #a78bfa, #7c3aed); }
/* 选中行框在拖拽时的视觉提示 */
.sim-box.sim-dragging { opacity: .85; cursor: ns-resize !important; }
.sim-map-right { flex: 0.9; min-width: 320px; display: flex; flex-direction: column; gap: 10px; }
.sim-hdr-box { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; color: #1e40af; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sim-hdr-title { width: 100%; font-weight: 700; }
.sim-hdr-box input { width: 70px; padding: 3px 6px; border: 1px solid #cbd5e1; border-radius: 5px; font-size: 12.5px; }
.sim-rows-title { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: #374151; }
.sim-rows-list { flex: 1; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.sim-row { border: 1px solid #e5e7eb; border-left-width: 4px; border-radius: 6px; padding: 6px 8px; background: #fff; cursor: pointer; transition: box-shadow .1s; }
.sim-row.matched { border-left-color: #16a34a; }
.sim-row:not(.matched) { border-left-color: #dc2626; }
.sim-row.on { outline: 2px solid #4f46e5; background: #eef2ff; }
.sim-row-main { display: flex; gap: 6px; }
.sim-row-main select { flex: 1; min-width: 0; padding: 4px 6px; border: 1px solid #d1d5db; border-radius: 5px; font-size: 12.5px; }
.sim-name-input { width: 110px; padding: 4px 6px; border: 1px solid #d1d5db; border-radius: 5px; font-size: 12.5px; }
.sim-row-bound { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12px; color: #6b7280; }
.sim-row-bound input { width: 64px; padding: 3px 6px; border: 1px solid #d1d5db; border-radius: 5px; font-size: 12px; }
.sim-row-del { margin-left: auto; border: none; background: none; color: #dc2626; cursor: pointer; font-size: 13px; padding: 2px 6px; }
.sim-row-up, .sim-row-dn { width: 24px; height: 24px; border: 1px solid #d1d5db; background: #f9fafb; color: #6b7280; cursor: pointer; font-size: 10px; line-height: 1; border-radius: 4px; padding: 0; display: flex; align-items: center; justify-content: center; transition: all .15s; flex-shrink: 0; }
.sim-row-up:hover:not(:disabled), .sim-row-dn:hover:not(:disabled) { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.sim-row-up:disabled, .sim-row-dn:disabled { opacity: .3; cursor: not-allowed; }
.sim-empty { color: #9ca3af; font-size: 13px; text-align: center; padding: 20px 0; }

/* 员工端：本人裁剪图卡片 */
.sal-myimg-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; max-width: 1100px; margin: 0 auto; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.sal-myimg-head { font-size: 15px; font-weight: 700; color: #1f2937; margin-bottom: 12px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sal-myimg-head span { font-size: 12px; font-weight: 400; color: #94a3b8; }
.sal-myimg { display: block; width: 100%; border: 1px solid #e5e7eb; border-radius: 8px; cursor: zoom-in; }
.sal-myimg-num { margin-top: 12px; border-top: 1px dashed #e5e7eb; padding-top: 10px; }
.sal-myimg-num summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #4f46e5; }

/* 放大灯箱 */
.sal-viewer { position: fixed; inset: 0; z-index: 9999; background: rgba(15,23,42,.92); display: none; flex-direction: column; }
.sal-viewer.show { display: flex; }
.sal-viewer-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; color: #e2e8f0; font-size: 13px; background: rgba(0,0,0,.35); }
.sal-vbtn { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 5px 12px; margin-left: 6px; cursor: pointer; font-size: 13px; }
.sal-vbtn:hover { background: rgba(255,255,255,.25); }
.sal-vbtn-close { background: rgba(220,38,38,.6); }
.sal-viewer-stage { flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.sal-viewer-stage img { max-width: 92vw; max-height: 86vh; user-select: none; transform-origin: center center; }

/* ========== 全屏个人水印 + 防下载（protect.js）2026-09-22 ========== */
#wmLayer {
  position: fixed; inset: 0; z-index: 999999; pointer-events: none;
  background-repeat: repeat; background-position: 0 0;
  _display: none; /* 登录页不显示（JS 控制 display） */
}
/* 防打印：打印时整页空白 */
@media print {
  body { visibility: hidden; }
  body::after { content: '⛔ 本页面禁止打印'; visibility: visible; position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #dc2626; }
  #wmLayer { display: none; }
}
/* 图片统一禁拖拽（兜底，JS 也处理） */
img { -webkit-user-drag: none; user-select: none; }

