/* ============================================================
 * styles.css —— 全套样式 V7
 * ============================================================ */
:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface-alt: #f8f9fb;
  --border: #e2e8f0;
  --text: #1a202c;
  --text-muted: #718096;
  --primary: #3b5998;
  --primary-light: #e8edf6;
  --primary-dark: #2d4373;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #2563eb;
  --info-light: #dbeafe;
  --holiday: #fee2e2;
  --weekend: #f3f4f6;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
  --radius: 10px;
  --radius-sm: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
}

/* ===== 登录页 ===== */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #3b5998 100%);
}
.login-card {
  background: var(--surface); border-radius: 20px; padding: 48px 40px;
  width: 400px; max-width: 90vw; box-shadow: var(--shadow-lg); text-align: center;
}
.login-logo { font-size: 56px; margin-bottom: 12px; }
.login-card h1 { font-size: 22px; margin-bottom: 4px; color: var(--text); }
.login-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 28px; }
.login-form { text-align: left; }
.login-hint { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 16px; }

.input-group { position: relative; margin-bottom: 16px; }
.input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 16px; opacity: .5;
}
.input-group input {
  width: 100%; padding: 12px 12px 12px 40px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; transition: border-color .2s;
  background: var(--surface-alt);
}
.input-group input:focus { outline: none; border-color: var(--primary); background: var(--surface); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: 13px;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.select {
  padding: 7px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; background: var(--surface); cursor: pointer;
}
.select:focus { outline: none; border-color: var(--primary); }

.checkbox-label { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-muted); cursor: pointer; }

/* ===== 主应用布局 ===== */
.app-page { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
}
.sidebar-brand { display: flex; align-items: center; gap: 8px; padding: 20px 18px; border-bottom: 1px solid var(--border); }
.sidebar-brand .logo { font-size: 28px; }
.sidebar-brand .brand-text { font-size: 16px; font-weight: 700; }
.sidebar-nav { flex: 1; padding: 12px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer;
  font-size: 14px; margin-bottom: 4px; transition: all .15s; text-decoration: none;
}
.nav-item span { font-size: 18px; }
.nav-item:hover { background: var(--surface-alt); color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
}
.user-name { font-weight: 600; font-size: 13px; }
.user-role { font-size: 11px; color: var(--text-muted); }
.sidebar-footer .btn { width: 100%; justify-content: center; }
.footer-actions { display: flex; gap: 8px; }
.footer-actions .btn { flex: 1; }
.modal-tip { font-size: 12px; color: var(--text-muted); margin: 4px 0 14px; }
.modal-tip b { color: var(--text); }

.main-content { flex: 1; margin-left: 220px; padding: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar h2 { font-size: 18px; font-weight: 600; }
.topbar-actions { display: flex; gap: 8px; }

.page-content { display: none; padding: 24px; }
.page-content.active { display: block; }

/* ===== 卡片 ===== */
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 20px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-head h2 { font-size: 15px; font-weight: 600; }
.badge {
  display: inline-block; min-width: 20px; padding: 2px 8px; border-radius: 10px;
  background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 600; margin-left: 4px;
}
.legend { display: flex; gap: 12px; }

/* ===== 统计卡片 ===== */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; flex-shrink: 0; }
.stat-icon.green { background: var(--success); }
.stat-icon.orange { background: var(--warning); }
.stat-icon.red { background: var(--danger); }
.stat-icon.blue { background: var(--info); }
.stat-num { font-size: 28px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-muted); }

/* ===== 仪表盘 ===== */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.chart-area { padding: 20px; display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.chart-legend { display: flex; flex-direction: column; gap: 8px; }
.chart-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.chart-legend-dot { width: 12px; height: 12px; border-radius: 3px; }

.status-overview { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.status-bar-item { display: flex; align-items: center; gap: 12px; }
.status-bar-label { width: 80px; font-size: 13px; font-weight: 500; }
.status-bar-track { flex: 1; height: 22px; background: var(--surface-alt); border-radius: 11px; overflow: hidden; }
.status-bar-fill { height: 100%; border-radius: 11px; transition: width .5s ease; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; color: #fff; font-size: 11px; font-weight: 600; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
  background: var(--surface-alt); white-space: nowrap; position: sticky; top: 0;
}
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
tbody tr:hover { background: var(--surface-alt); }
.row-actions { white-space: nowrap; display: flex; gap: 4px; }

/* 标签 */
.tag { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 11px; background: var(--surface-alt); border: 1px solid var(--border); margin: 1px; font-weight: 500; }
.tag-ok { background: var(--success-light); color: var(--success); border-color: var(--success); }
.tag-warn { background: var(--warning-light); color: var(--warning); border-color: var(--warning); }
.tag-err { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }

.status-pill { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.s-正常 { background: var(--success-light); color: var(--success); }
.s-请假 { background: var(--danger-light); color: var(--danger); }
.s-禁用 { background: #e5e7eb; color: #6b7280; }
.s-实习 { background: var(--info-light); color: var(--info); }

.lg { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; margin: 1px; font-weight: 500; }
.lg-leader { background: var(--info-light); color: var(--info); }
.lg-member { background: var(--primary-light); color: var(--primary); }
.lg-conflict { background: var(--danger-light); color: var(--danger); }
.lg-expert { background: #f3e8ff; color: #7c3aed; }

.match-bar { display: inline-block; width: 60px; height: 8px; background: var(--surface-alt); border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.match-bar span { display: block; height: 100%; background: var(--primary); border-radius: 4px; }

.text-muted { color: var(--text-muted); }
.text-disabled { color: #9ca3af; text-decoration: line-through; }

/* 筛选栏 */
.filter-bar { display: flex; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; align-items: center; background: var(--surface-alt); }
.filter-bar .input-group { flex: 1; min-width: 180px; margin-bottom: 0; }

/* 负载网格 */
.load-grid { padding: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.load-cell { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; background: var(--surface-alt); }
.load-cell.busy { border-color: var(--warning); background: var(--warning-light); }
.load-cell.conflict { border-color: var(--danger); background: var(--danger-light); }
.load-cell .nm { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.load-cell .meta { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.load-cell .bar { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; margin: 6px 0; }
.load-cell .bar span { display: block; height: 100%; background: var(--primary); border-radius: 3px; transition: width .4s; }

/* 计划一周内未排班人员汇总 */
.weekly-unbooked { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.wu-head { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.wu-list { display: flex; flex-wrap: wrap; gap: 6px; }
.wu-tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--warning-light); color: var(--warning); border: 1px solid var(--warning); }
.wu-empty { font-size: 12px; color: var(--success); }

/* 分页控件 */
.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--border); }
.pg-btn { padding: 5px 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; transition: all .15s; }
.pg-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg-btn:disabled { opacity: .45; cursor: not-allowed; }
.pg-info { margin-left: auto; font-size: 12px; color: var(--text-muted); }

.rules { padding: 16px 20px 20px 36px; font-size: 13px; line-height: 2; }

/* ===== 模态 ===== */
.modal {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(2px);
}
.modal.show { display: flex; }
.modal-card {
  background: var(--surface); border-radius: var(--radius); padding: 28px;
  width: 500px; max-width: 90vw; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-lg { width: 760px; }
.modal-card h3 { font-size: 18px; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; }
.form-grid label input, .form-grid label select, .form-grid label textarea {
  padding: 8px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 13px;
}
.form-grid label input:focus, .form-grid label select:focus, .form-grid label textarea:focus { outline: none; border-color: var(--primary); }
.form-grid label.full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* 手动排班模态（iframe 承载，与项目编辑弹窗一致） */
.ms-modal-card {
  width: 940px; max-width: 96vw; height: 90vh; max-height: 90vh;
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
}
.ms-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.ms-modal-head h3 { margin: 0; font-size: 18px; }
/* 关键：flex:1 配合父容器确定高度撑满；display:block 消除 inline 底部间隙，避免高度塌缩/显示不全 */
.ms-modal-frame { flex: 1; width: 100%; min-height: 0; display: block; border: 0; background: #fff; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  background: #1a202c; color: #fff; box-shadow: var(--shadow-lg);
  opacity: 0; transition: all .3s; z-index: 2000; pointer-events: none;
}
.toast.show { opacity: 1; bottom: 40px; }
.toast.err { background: var(--danger); }

/* ===== 审核员布局 ===== */
.auditor-layout { display: flex; gap: 20px; align-items: flex-start; }
.auditor-main { flex: 1; min-width: 0; }
.auditor-detail { width: 340px; flex-shrink: 0; position: sticky; top: 80px; }
.detail-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.detail-header .dh-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.detail-header .dh-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.detail-section { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.detail-section h5 { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.detail-task-item { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-alt); margin-bottom: 6px; font-size: 13px; }
.detail-task-item .dti-name { font-weight: 600; }
.detail-task-item .dti-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.detail-empty { padding: 30px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* 排名表 */
.rank-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700; background: var(--surface-alt); color: var(--text-muted); }
.rank-num.r1 { background: #fbbf24; color: #fff; }
.rank-num.r2 { background: #9ca3af; color: #fff; }
.rank-num.r3 { background: #d97706; color: #fff; }
.badge-sub { font-size: 12px; color: var(--text-muted); font-weight: 400; }

/* 权限标签 */
.perm-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; background: var(--primary-light); color: var(--primary); margin: 1px; }
.perm-checkbox { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; }
.perm-checkbox input { margin: 0; }
.perm-checkbox.checked { border-color: var(--primary); background: var(--primary-light); }

/* ===== 审核员预排日历 ===== */
.cal-wrap { padding: 16px; overflow-x: auto; }
.cal-scroll { overflow-x: auto; max-width: 100%; }
.cal-table { border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.cal-table th, .cal-table td { border: 1px solid var(--border); padding: 4px 6px; text-align: center; }
.cal-name-th { position: sticky; left: 0; background: var(--surface); z-index: 2; min-width: 80px; text-align: left; }
.cal-day-th { min-width: 28px; color: var(--text-muted); font-weight: 500; }
.cal-day-th.cal-holiday { background: var(--holiday); color: var(--danger); }
.cal-day-th.cal-weekend { background: var(--weekend); color: var(--text-muted); }
.cal-name-td { position: sticky; left: 0; background: var(--surface); z-index: 2; text-align: left; font-weight: 600; }
.cal-cell { color: var(--text-muted); min-width: 28px; }
.cal-cell-busy { background: var(--warning-light); color: var(--warning); font-weight: 700; }
.cal-cell-holiday { background: var(--holiday); }
.cal-cell-weekend { background: var(--weekend); }
.cal-cell-busy.cal-cell-holiday { background: #fecaca; }
.cal-cell-busy.cal-cell-weekend { background: #fef3c7; }
.cal-today { outline: 2px solid var(--primary); outline-offset: -2px; }

/* 日历图例 */
.cal-legend { display: flex; gap: 12px; }
.cal-legend-item { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }
.cal-legend-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ===== 复选框组（体系/代码选择） ===== */
.checkbox-group {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px;
  padding: 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-alt); max-height: 120px; overflow-y: auto;
}
.cb-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border: 1.5px solid var(--border); border-radius: 16px;
  cursor: pointer; font-size: 12px; transition: all .15s; background: var(--surface);
}
.cb-item:hover { border-color: var(--primary); }
.cb-item input { margin: 0; display: none; }
.cb-item.checked { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* ===== 认证类型单选 ===== */
.cert-type-radio {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 20px;
  cursor: pointer; font-size: 13px; transition: all .15s;
}
.cert-type-radio input { margin: 0; display: none; }
.cert-type-radio.checked { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* ===== 排班详情面板 ===== */
.sched-detail { padding: 0; }
.sched-info { padding: 16px 20px; background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.sched-info h3 { font-size: 16px; margin-bottom: 6px; }
.sched-info-meta { font-size: 13px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 12px; }
.sched-info-meta span { display: inline-flex; align-items: center; gap: 4px; }

.sched-stage { padding: 20px; border-bottom: 1px solid var(--border); }
.sched-stage:last-child { border-bottom: none; }
.sched-stage h4 { font-size: 15px; font-weight: 600; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); display: inline-block; }

.sched-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sched-row > label { font-size: 13px; font-weight: 600; min-width: 100px; padding-top: 6px; }
.sched-row input[type="number"] { width: 80px; padding: 6px 8px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.sched-row select { padding: 6px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; min-width: 200px; }

.sched-confirm {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; background: var(--success-light); color: var(--success);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
}

.sched-dates { display: flex; flex-wrap: wrap; gap: 6px; }
.sched-date-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12px; background: var(--surface);
}
.sched-date-item select { padding: 2px 4px; font-size: 11px; border: 1px solid var(--border); border-radius: 3px; }
.sched-date-item .btn-rm { color: var(--danger); cursor: pointer; border: none; background: none; font-size: 14px; padding: 0 2px; }
.sched-date-add { display: inline-flex; align-items: center; gap: 4px; }

.member-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.member-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border: 1.5px solid var(--border); border-radius: 16px;
  cursor: pointer; font-size: 12px; transition: all .15s; background: var(--surface);
}
.member-chip:hover { border-color: var(--primary); }
.member-chip input { margin: 0; display: none; }
.member-chip.checked { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }
.member-chip.disabled { opacity: .4; cursor: not-allowed; }
.member-chip .chip-tag { font-size: 10px; padding: 0 4px; border-radius: 3px; background: var(--surface-alt); }
.member-chip .chip-tag.专职 { background: var(--success-light); color: var(--success); }
.member-chip .chip-tag.兼职 { background: var(--warning-light); color: var(--warning); }
.member-chip .chip-tag.实习 { background: var(--info-light); color: var(--info); }

.sched-empty { text-align: center; color: var(--text-muted); padding: 40px; font-size: 14px; }
.sched-save-bar { padding: 16px 20px; background: var(--surface-alt); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* s-专家 */
.s-专家 { background: #f3e8ff; color: #7c3aed; }

/* ===== 可搜索下拉多选组件 ===== */
.ms-container { position: relative; width: 100%; }
.ms-display {
  min-height: 38px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 28px 4px 8px; background: var(--surface); cursor: pointer;
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center; position: relative;
  transition: border-color .15s;
}
.ms-display:hover { border-color: var(--primary); }
.ms-display.open { border-color: var(--primary); }
.ms-placeholder { color: var(--text-muted); font-size: 13px; }
.ms-tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 12px; font-size: 11px;
  background: var(--primary-light); color: var(--primary); font-weight: 500;
}
.ms-tag .ms-tag-rm { cursor: pointer; font-size: 14px; line-height: 1; opacity: .6; }
.ms-tag .ms-tag-rm:hover { opacity: 1; color: var(--danger); }
.ms-arrow { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 12px; pointer-events: none; }
.ms-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 9999;
  background: var(--surface); border: 1.5px solid var(--primary); border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); box-shadow: var(--shadow-lg);
  max-height: 260px; overflow: hidden; flex-direction: column;
}
.ms-dropdown.show { display: flex; }
.ms-search {
  padding: 8px 10px; border-bottom: 1px solid var(--border); position: relative;
}
.ms-search input {
  width: 100%; padding: 6px 8px 6px 28px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px;
}
.ms-search .ms-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 12px; opacity: .4; }
.ms-options { overflow-y: auto; flex: 1; }
.ms-option {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer;
  font-size: 13px; transition: background .1s;
}
.ms-option:hover { background: var(--surface-alt); }
.ms-option.selected { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.ms-option input { margin: 0; }
.ms-option .ms-opt-code { font-weight: 600; min-width: 60px; }
.ms-option .ms-opt-desc { color: var(--text-muted); font-size: 12px; }
.ms-empty { padding: 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ===== 可搜索单选下拉组件（组长选择） ===== */
.ss-container { position: relative; width: 100%; min-width: 200px; }
.ss-display {
  min-height: 38px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 6px 28px 6px 12px; background: var(--surface); cursor: pointer;
  display: flex; align-items: center; position: relative;
  transition: border-color .15s; font-size: 13px;
}
.ss-display:hover { border-color: var(--primary); }
.ss-display.open { border-color: var(--primary); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.ss-placeholder { color: var(--text-muted); font-size: 13px; }
.ss-value { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.ss-arrow { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 11px; pointer-events: none; transition: transform .2s; }
.ss-display.open .ss-arrow { transform: translateY(-50%) rotate(180deg); }
.ss-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 9999;
  background: var(--surface); border: 1.5px solid var(--primary); border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); box-shadow: var(--shadow-lg);
  max-height: 260px; overflow: hidden; flex-direction: column;
}
.ss-dropdown.show { display: flex; }
.ss-search { padding: 8px 10px; border-bottom: 1px solid var(--border); position: relative; }
.ss-search input {
  width: 100%; padding: 6px 8px 6px 28px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px;
}
.ss-search input:focus { outline: none; border-color: var(--primary); }
.ss-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 12px; opacity: .4; pointer-events: none; }
.ss-options { overflow-y: auto; flex: 1; }
.ss-option {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer;
  font-size: 13px; transition: background .1s;
}
.ss-option:hover { background: var(--surface-alt); }
.ss-option.selected { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.ss-opt-name { flex: 1; font-weight: 500; }
.ss-option .chip-tag { font-size: 10px; padding: 0 6px; border-radius: 3px; background: var(--surface-alt); }
.ss-cancel-hint { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--danger-light); color: var(--danger); font-weight: 600; }
.ss-option.selected { background: var(--primary-light); color: var(--primary); font-weight: 600; border: 1px solid var(--primary); }

/* V20: 手动排班下拉中实习审核员的体系范围状态徽标 */
.scope-status { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.ss-chip { font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.ss-chip.zhengshi { background: var(--success-light); color: var(--success); }
.ss-chip.shixi { background: var(--warning-light); color: var(--warning); }
.ss-chip.compact { margin-left: 4px; }

/* ===== 排班阶段操作按钮 ===== */
.sched-stage-actions {
  display: flex; gap: 8px; margin-bottom: 16px; padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

/* ===== 排班摘要（非手动模式） ===== */
.sched-summary {
  background: var(--surface-alt); border-radius: var(--radius-sm);
  padding: 16px; margin-top: 8px;
}
.sched-summary .ss-row {
  display: flex; align-items: flex-start; gap: 6px; padding: 4px 0;
  font-size: 13px; line-height: 1.8;
}
.sched-summary .ss-row .ss-label {
  color: var(--text-muted); font-weight: 600; min-width: 110px; flex-shrink: 0;
}

/* ===== V10: 初审阶段左右布局 ===== */
.sched-stages-row { display: flex; flex-direction: column; }
.sched-stages-row.multi { flex-direction: row; gap: 0; }
.sched-stages-row.multi .sched-stage-col { flex: 1; border-right: 1px solid var(--border); }
.sched-stages-row.multi .sched-stage-col:last-child { border-right: none; }
.sched-stage-col { padding: 16px 20px; }
.sched-stage-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary);
}
.sched-stage-head h4 { font-size: 15px; font-weight: 600; margin: 0; }
.sched-stage-head .sched-stage-actions { margin-bottom: 0; padding: 0; border-bottom: none; }

/* 审核地址 */
.sched-company-addr {
  font-size: 13px; color: var(--text); margin-top: 8px;
  padding: 6px 12px; background: var(--surface); border-radius: var(--radius-sm);
  display: inline-block;
}

/* ===== 列隐藏/显示控制 ===== */
.col-toggle-bar {
  display: flex; align-items: center; gap: 6px; padding: 8px 16px;
  border-bottom: 1px solid var(--border); background: var(--surface-alt);
  flex-wrap: wrap; font-size: 12px;
}
.col-toggle-bar .col-tgl-label { color: var(--text-muted); font-weight: 600; margin-right: 4px; }
.col-toggle-btn {
  padding: 3px 10px; border: 1px solid var(--border); border-radius: 12px;
  font-size: 11px; cursor: pointer; background: var(--surface); transition: all .15s;
}
.col-toggle-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.col-toggle-btn:hover { border-color: var(--primary); }

/* ===== 排班状态筛选 ===== */
.sched-filter-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 20px;
  border-bottom: 1px solid var(--border); background: var(--surface-alt); flex-wrap: wrap;
}
.sched-filter-btn {
  padding: 5px 14px; border: 1.5px solid var(--border); border-radius: 16px;
  font-size: 12px; cursor: pointer; background: var(--surface); transition: all .15s;
}
.sched-filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.sched-filter-btn:hover { border-color: var(--primary); }

/* ===== 排班详情：公司名称头部 ===== */
.sched-company-header {
  padding: 16px 20px; background: linear-gradient(135deg, var(--primary-light), var(--surface-alt));
  border-bottom: 2px solid var(--primary); margin-bottom: 0;
}
.sched-company-header h3 { font-size: 18px; font-weight: 700; }
.sched-company-meta { font-size: 13px; color: var(--text-muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ===== 排班详情：确认日期 ===== */
.sched-confirm-dates {
  padding: 14px 16px; background: var(--success-light); border: 1.5px solid var(--success);
  border-radius: var(--radius-sm); margin-top: 12px;
}
.sched-confirm-dates .scd-label { font-size: 13px; font-weight: 600; color: var(--success); margin-bottom: 6px; }
.sched-confirm-dates .scd-value { font-size: 15px; font-weight: 700; color: var(--text); }

/* 组长/组员匹配度 */
.match-score {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 1px 6px;
  border-radius: 8px; background: var(--surface-alt); color: var(--text-muted); margin-left: 4px;
}
.match-score.high { background: var(--success-light); color: var(--success); }
.match-score.mid { background: var(--warning-light); color: var(--warning); }
.match-score.low { background: var(--danger-light); color: var(--danger); }

/* 双匹配度（专业匹配度 + 时间匹配度） */
.match-dual { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 4px; }
.match-dual.compact { margin-left: 4px; }
.mm {
  display: inline-flex; align-items: center; font-size: 11px; padding: 1px 6px;
  border-radius: 8px; background: var(--surface-alt); color: var(--text-muted); white-space: nowrap;
}
.mm.prof.high { background: var(--success-light); color: var(--success); }
.mm.prof.mid { background: var(--warning-light); color: var(--warning); }
.mm.prof.low { background: var(--danger-light); color: var(--danger); }
.mm.time.high { background: var(--success-light); color: var(--success); }
.mm.time.mid { background: var(--warning-light); color: var(--warning); }
.mm.time.low { background: var(--danger-light); color: var(--danger); }
.sat-codes {
  flex-basis: 100%; font-size: 11px; color: var(--info); margin-top: 2px; line-height: 1.4;
}
.sat-codes.none { color: var(--text-muted); }
/* 选项行允许换行，使「满足代码」显示在下一行 */
.ss-option, .ms-option { flex-wrap: wrap; }

/* 体系匹配度徽标（手动排班下拉） */
.mm.sys.high { background: var(--success-light); color: var(--success); }
.mm.sys.mid { background: var(--warning-light); color: var(--warning); }
.mm.sys.low { background: var(--danger-light); color: var(--danger); }
.mm.sys { background: var(--info-light); color: var(--info); }

/* 审核员库体系范围标签：code(状态) 组合 */
.tag-sys { font-size: 10px; color: var(--text-muted); margin-left: 3px; opacity: .85; }
.tag-sys.s-sys-zhengshi { color: var(--success); opacity: 1; font-weight: 600; }
.tag-sys.s-sys-shixi { color: var(--warning); opacity: 1; font-weight: 600; }
.tag-sys.s-sys-tongyong { color: var(--info); opacity: 1; font-weight: 600; }

/* 审核员体系范围编辑器：每个范围可单独标记 正式/实习 */
.sys-status-picker { margin-bottom: 6px; }
.sys-status-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sys-status-list .text-muted { font-size: 12px; }
.sys-status-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font-size: 13px; font-weight: 600; }
.sys-status-chip select.sys-status-select { border: none; background: transparent; font-size: 12px; color: var(--text); cursor: pointer; padding: 0 2px; }
.sys-status-chip select.sys-status-select:focus { outline: none; }

/* 体系范围维护状态药丸 */
.status-pill.s-sys-ok { background: var(--success-light); color: var(--success); }
.status-pill.s-sys-info { background: var(--info-light); color: var(--info); }
.status-pill.s-sys-muted { background: var(--surface-alt); color: var(--text-muted); }
/* 体系范围状态下拉/标签（ASCII class，避免中文 class 编码问题） */
.status-pill.s-sys-zhengshi { background: var(--success-light); color: var(--success); }
.status-pill.s-sys-shixi { background: var(--warning-light); color: var(--warning); }
.status-pill.s-sys-tongyong { background: var(--info-light); color: var(--info); }
.ms-opt-status {
  margin-left: auto; padding: 1px 8px; border-radius: 10px; font-size: 10px; font-weight: 600;
}
.ms-opt-status.s-sys-zhengshi { background: var(--success-light); color: var(--success); }
.ms-opt-status.s-sys-shixi { background: var(--warning-light); color: var(--warning); }
.ms-opt-status.s-sys-tongyong { background: var(--info-light); color: var(--info); }
.ms-tag-status {
  margin-left: 4px; padding: 1px 7px; border-radius: 10px; font-size: 10px; font-weight: 600;
}
.ms-tag-status.s-sys-zhengshi { background: var(--success-light); color: var(--success); }
.ms-tag-status.s-sys-shixi { background: var(--warning-light); color: var(--warning); }
.ms-tag-status.s-sys-tongyong { background: var(--info-light); color: var(--info); }

/* 模态关闭按钮（右上角 X） */
.modal-card { position: relative; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px; border: none; border-radius: 50%;
  background: var(--surface-alt); color: var(--text-muted);
  font-size: 15px; line-height: 1; cursor: pointer; transition: all .15s;
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }

/* ===== 维护新增模态 ===== */
.maint-add-modal { width: 420px; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .sidebar { width: 60px; }
  .sidebar-brand .brand-text, .nav-item span:last-child, .sidebar-footer .user-info { display: none; }
  .main-content { margin-left: 60px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .auditor-layout { flex-direction: column; }
  .auditor-detail { width: 100%; position: static; }
  .sched-stages-row.multi { flex-direction: column; }
  .sched-stages-row.multi .sched-stage-col { border-right: none; border-bottom: 1px solid var(--border); }
  .ai-panel { width: 100% !important; right: 0 !important; bottom: 0 !important; border-radius: 0 !important; }
}

/* ===== V10: 浮动AI聊天助手 ===== */
.ai-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 9998;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  user-select: none;
}
.ai-fab:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(0,0,0,0.3); }

.ai-panel {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  width: 380px; max-height: 520px;
  background: var(--surface, #fff); border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  display: none; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border);
}
.ai-panel.show { display: flex; animation: aiPanelIn 0.25s ease; }
@keyframes aiPanelIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.ai-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 600;
}
.ai-panel-close {
  background: none; border: none; color: #fff; font-size: 18px;
  cursor: pointer; padding: 0 4px; line-height: 1; opacity: 0.8;
}
.ai-panel-close:hover { opacity: 1; }

.ai-chat-box {
  flex: 1; overflow-y: auto; padding: 16px;
  background: var(--bg, #f5f7fa); min-height: 240px; max-height: 360px;
}

.ai-msg { margin-bottom: 10px; padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.6; word-break: break-word; max-width: 85%; }
.ai-msg-user { background: var(--primary); color: #fff; margin-left: auto; text-align: right; border-bottom-right-radius: 4px; }
.ai-msg-bot { background: var(--surface-alt, #eef1f6); color: var(--text, #333); margin-right: auto; border-bottom-left-radius: 4px; }

.ai-input-row { display: flex; gap: 8px; padding: 10px 12px; background: var(--surface, #fff); border-top: 1px solid var(--border); }
.ai-input-row input {
  flex: 1; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 13px; outline: none;
}
.ai-input-row input:focus { border-color: var(--primary); }
.ai-input-row .btn { padding: 8px 16px; }

/* ===== Phase 1+2 确认通知弹窗 ===== */
.sched-detail-actions { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--info-light, #f4f8ff); }
.sched-detail-actions-hint { font-size: 12px; color: var(--text-muted, #888); }

.notice-modal-card { width: 760px; max-width: 96vw; max-height: 92vh; padding: 0; display: flex; flex-direction: column; }
.notice-body { padding: 16px 20px 20px; overflow: auto; }
.notice-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.notice-text { width: 100%; height: 320px; resize: vertical; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; line-height: 1.7; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; outline: none; box-sizing: border-box; }
.notice-text:focus { border-color: var(--primary, #2b7de9); }
.notice-qr-row { display: flex; gap: 18px; margin-top: 16px; align-items: flex-start; }
.notice-qr-box { flex-shrink: 0; }
.notice-qr-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text, #333); }
.notice-qr { width: 180px; height: 180px; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; }
.notice-qr img { display: block; max-width: 100%; }
.notice-qr-info { flex: 1; font-size: 12px; line-height: 1.7; color: var(--text-muted, #666); white-space: pre-wrap; }

/* Phase 3 两张在线确认二维码 */
.notice-cloud { margin-top: 16px; }
.notice-cloud-hint { font-size: 13px; color: var(--text, #333); margin-bottom: 12px; line-height: 1.6; }
.notice-cloud-cards { display: flex; flex-wrap: wrap; gap: 16px; }
.notice-conf-card { flex: 1; min-width: 220px; border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: #fafbfc; }
.notice-conf-title { font-size: 14px; font-weight: 600; color: var(--text, #333); }
.notice-qr-sm { width: 160px; height: 160px; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; }
.notice-qr-sm img { display: block; max-width: 100%; }
.notice-conf-url { font-size: 11px; line-height: 1.5; color: var(--text-muted, #666); word-break: break-all; max-height: 48px; overflow: auto; width: 100%; text-align: center; }

/* V27 Phase 3：按阶段分排，每排内部/企业并排 */
.notice-stage-block { margin-bottom: 18px; }
.notice-stage-title { font-size: 14px; font-weight: 700; margin: 6px 0 10px; padding-left: 8px; border-left: 3px solid var(--primary, #2b6cff); color: #333; }
.notice-stage-row { display: flex; gap: 16px; flex-wrap: wrap; }
.notice-conf-btns { display: flex; gap: 8px; margin-top: 2px; width: 100%; }
.notice-conf-btns .btn { flex: 1; }
.notice-tip { display: block; margin-top: 6px; color: #d97706; font-size: 12px; line-height: 1.5; }

/* ===== V23 审核周期状态面板 ===== */
.sched-audit-cycle { margin: 14px 20px; padding: 14px 16px; background: var(--surface-alt, #f6f8fb); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; }
.sac-head { font-size: 14px; font-weight: 700; color: var(--text, #1a202c); margin-bottom: 10px; }
.sac-row { font-size: 13px; line-height: 1.9; color: var(--text, #333); }
.sac-label { display: inline-block; min-width: 150px; color: var(--text-muted, #718096); }
.sac-warn { margin-top: 8px; padding: 8px 12px; background: #fef3c7; color: #92400e; border-radius: 8px; font-size: 13px; font-weight: 600; }
.sac-actions { margin-top: 12px; }

/* V24 确认状态（内部审核人员确认 / 企业项目人员确认，相互独立） */
.sched-confirm-block { border-top: 1px dashed var(--border, #e5e7eb); margin-top: 10px; padding-top: 10px; }
.scb-title { font-size: 13px; font-weight: 700; color: var(--text, #1f2937); margin-bottom: 6px; }
.scb-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.scb-label { flex: 1; color: var(--text-muted, #6b7280); }
.cf-done { color: #16a34a; font-weight: 600; }
.cf-pending { color: #9aa3af; font-weight: 600; }
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: 6px; flex: 0 0 auto; }
.btn-warning { background: #f59e0b; color: #fff; border: 0; }
.btn-warning:hover { background: #d97706; }

/* V24 确认通知弹窗中的阶段确认卡片状态 */
.notice-conf-status { font-size: 12px; font-weight: 600; color: var(--text-muted, #6b7280); margin: 4px 0 8px; }
.col-contact { font-variant-numeric: tabular-nums; }

/* V25 确认状态增强：异议标记 + 已确认人员 */
.scb-obj { color: #dc2626; font-weight: 700; font-size: 12px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 99px; padding: 1px 8px; margin-left: 4px; position: relative; cursor: help; }
.scb-sub { font-size: 12px; color: #2b6cff; margin: 2px 0 6px; padding-left: 2px; }
.scb-chip { display: inline-block; background: #e8f0ff; color: #2b6cff; border-radius: 99px; padding: 1px 9px; font-size: 12px; margin: 2px 4px 2px 0; }

/* V26→V27 确认状态：异议 hover 浮层（默认隐藏，悬停/聚焦显示） */
.scb-obj-pop { display: none; position: absolute; left: 0; top: 145%; z-index: 60; min-width: 220px; max-width: 300px; background: #fff; color: #333; border: 1px solid #fca5a5; border-radius: 8px; padding: 10px 12px; font-size: 12px; font-weight: 400; line-height: 1.6; box-shadow: 0 6px 22px rgba(0,0,0,.18); white-space: normal; cursor: auto; }
.scb-obj:hover .scb-obj-pop, .scb-obj:focus .scb-obj-pop, .scb-obj:focus-within .scb-obj-pop { display: block; }
.scb-obj-by { color: #7f1d1d; font-weight: 600; }

/* V26 前期流程追踪条（排班详情顶部） */
.track-bar { display: flex; align-items: stretch; flex-wrap: wrap; gap: 6px; margin: 12px 20px 4px; padding: 12px 14px; background: var(--surface-alt, #f6f8fb); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; }
.track-node { flex: 1 1 140px; min-width: 130px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; text-align: center; }
.track-node.done { border-color: #bbf7d0; background: #f0fdf4; }
.track-node.undone { border-color: #fecaca; background: #fff5f5; }
.tn-dot { width: 22px; height: 22px; line-height: 22px; border-radius: 50%; margin: 0 auto 4px; font-size: 12px; font-weight: 700; color: #fff; background: #cbd5e1; }
.track-node.done .tn-dot { background: #16a34a; }
.track-node.undone .tn-dot { background: #dc2626; }
.tn-label { font-size: 12px; font-weight: 600; color: var(--text, #334155); }
.tn-assignee { font-size: 12px; color: var(--text-muted, #64748b); margin-top: 2px; }
.track-node.undone .tn-assignee { color: #dc2626; }
.track-arrow { display: flex; align-items: center; color: #94a3b8; font-size: 16px; font-weight: 700; }

/* V26 评审追踪表格状态 */
.tk-done { color: #16a34a; font-weight: 600; font-size: 13px; }
.tk-undone { color: #dc2626; font-weight: 600; font-size: 13px; }
.tk-stuck { color: #dc2626; font-weight: 600; font-size: 13px; }

/* V28 追踪工作流状态（分配→接收→完成） */
.track-node.progress { border-color: #fbbf24; background: #fffbeb; }
.track-node.progress .tn-dot { background: #d97706; }
.tn-status { font-size: 11px; font-weight: 600; margin-top: 2px; color: #6b7280; }
.tn-date { font-size: 11px; margin-top: 2px; color: #475569; font-weight: 600; }
.tk-assigned { color: #2563eb; font-weight: 600; font-size: 13px; }
.tk-accepted { color: #b45309; font-weight: 600; font-size: 13px; }

/* V33 评审追踪搜索栏 + 分页 + 可点击项目名 */
.track-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px 0; }
.track-search { flex: 1; max-width: 320px; border: 1.5px solid var(--border, #e2e8f0); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; }
.track-page-info { font-size: 12px; color: var(--text-muted, #64748b); font-weight: 600; }
.track-pager { display: flex; align-items: center; gap: 6px; padding: 12px 16px; flex-wrap: wrap; }
.pager-btn { border: 1px solid var(--border, #e2e8f0); background: #fff; border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text, #334155); }
.pager-btn:hover:not(:disabled) { background: #f1f5f9; }
.pager-btn.active { background: var(--primary, #2563eb); color: #fff; border-color: var(--primary, #2563eb); }
.pager-btn:disabled { opacity: .45; cursor: not-allowed; }
.pager-ellipsis { color: var(--text-muted, #94a3b8); padding: 0 2px; }
.track-name-link { color: var(--primary, #2563eb); font-weight: 600; text-decoration: none; cursor: pointer; }
.track-name-link:hover { text-decoration: underline; }
.track-name-link.selected { color: #16a34a; }
.tk-completed { color: #16a34a; font-weight: 600; font-size: 13px; }
.tk-sub { font-size: 11px; color: var(--text-muted, #64748b); margin-top: 1px; }
.cr-mini { color: #7c3f00; font-weight: 600; }

/* ===== 合同评审流程追踪（V31） ===== */
.cr-panel { margin: 12px 20px 4px; padding: 16px; background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; }
.cr-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cr-panel-head h3 { font-size: 15px; margin: 0; }
.cr-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cr-step { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; background: #fafafa; }
.cr-step.done { background: #f0fdf4; border-color: #bbf7d0; }
.cr-step.todo { background: #fffbeb; border-color: #fde68a; }
.cr-step-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cr-step-no { width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%; background: #cbd5e1; color: #fff; font-size: 12px; font-weight: 700; }
.cr-step.done .cr-step-no { background: #16a34a; }
.cr-step-label { font-weight: 600; font-size: 13px; flex: 1; }
.cr-step-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.cr-step-badge.ok { background: #dcfce7; color: #166534; }
.cr-step-badge.pending { background: #fef9c3; color: #854d0e; }
.cr-step-body { display: flex; flex-direction: column; gap: 8px; }
.cr-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--text, #334155); }
.cr-field input, .cr-remark-input { border: 1.5px solid var(--border, #e2e8f0); border-radius: 6px; padding: 6px 8px; font-size: 12px; font-family: inherit; }
.cr-remark-input { resize: vertical; }
.cr-decision { display: flex; gap: 14px; font-size: 13px; }
.cr-radio { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.cr-progress { flex-direction: row; align-items: center; gap: 8px; }
.cr-progress-input { width: 80px; }
.cr-step-actions { display: flex; gap: 8px; margin-top: 2px; }
.cr-summary { margin-top: 12px; font-size: 13px; color: var(--text, #334155); }
/* V34 保存记录历史 */
.cr-log { margin-top: 10px; border-top: 1px dashed var(--border, #e2e8f0); padding-top: 8px; }
.cr-log-title { font-size: 12px; font-weight: 700; color: var(--text-muted, #64748b); margin-bottom: 6px; }
.cr-log-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cr-log-item { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 7px; padding: 7px 10px; font-size: 12px; line-height: 1.5; }
.cr-log-savedat { color: #1d4ed8; font-weight: 600; margin-right: 10px; }
.cr-log-op { color: var(--text-muted, #64748b); }
.cr-log-detail { color: #334155; margin-top: 3px; word-break: break-all; }
.cr-done-flag { color: #16a34a; font-weight: 700; }
.cr-datetime { display: flex; align-items: flex-end; }
.cr-date-sel, .cr-time-sel, .cr-date-input, .cr-time-input { border: 1.5px solid var(--border, #e2e8f0); border-radius: 6px; padding: 6px 8px; font-size: 12px; font-family: inherit; background: #fff; }
.cr-date-sel { flex: 1; }
.cr-date-input { flex: 1; }


