/* app.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f5f7fa;
  color: #1f2937;
  font-size: 14px;
  height: 100%;
}

#app {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Login */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #BF381F 0%, #A8321C 100%);
}

.login-box {
  width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.login-box h1 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 24px;
  color: #1f2937;
}

.login-box .subtitle {
  text-align: center;
  color: #6b7280;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #BF381F;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #BF381F;
  color: #fff;
}

.btn-primary:hover {
  background: #D94A2F;
}

.btn-secondary {
  background: #fff;
  color: #BF381F;
  border: 1px solid #BF381F;
}

.btn-secondary:hover {
  background: #FFF5F3;
}

.btn-danger {
  background: #fee2e2;
  color: #dc2626;
}

.btn-danger:hover {
  background: #fecaca;
}

.btn-block {
  width: 100%;
}

.error-msg {
  color: #dc2626;
  font-size: 13px;
  margin-top: 8px;
  text-align: center;
}

/* Layout */
.app-layout {
  display: flex;
  width: 100%;
  height: 100%;
}

.sidebar {
  width: 220px;
  background: #BF381F;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid #D94A2F;
}

.sidebar-header h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.sidebar-header .version {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}

.user-info {
  padding: 16px 24px;
  border-bottom: 1px solid #D94A2F;
}

.user-info .name {
  font-weight: 600;
}

.user-info .role {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
}

.btn-change-password {
  margin-top: 10px;
  padding: 4px 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-change-password:hover {
  background: rgba(255,255,255,0.25);
}

.nav-menu {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.nav-item:hover,
.nav-item.active {
  background: #A8321C;
  color: #fff;
}

.nav-item.active {
  border-left: 3px solid #fff;
}

.nav-item .icon {
  width: 20px;
  margin-right: 12px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #D94A2F;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-bar {
  height: 60px;
  background: #BF381F;
  border-bottom: 1px solid #D94A2F;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  color: #fff;
}

.top-bar h3 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

/* Cards */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  padding: 24px;
  margin-bottom: 24px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #1f2937;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-card .value {
  font-size: 32px;
  font-weight: 700;
  color: #BF381F;
  margin-bottom: 8px;
}

.stat-card .label {
  color: #6b7280;
  font-size: 14px;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.data-table th {
  background: #f9fafb;
  font-weight: 600;
  color: #6b7280;
  font-size: 13px;
}

.data-table tr:hover {
  background: #f9fafb;
}

/* Grade tags */
.grade-tag,
.grade-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.grade-S { background: #DBEAFE; color: #1E40AF; }
.grade-A { background: #D1FAE5; color: #065F46; }
.grade-B { background: #FEF3C7; color: #92400E; }
.grade-C { background: #FFEDD5; color: #9A3412; }
.grade-D { background: #FEE2E2; color: #991B1B; }
.grade-empty { background: #f3f4f6; color: #6b7280; }

/* Status tags */
.status-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #f3f4f6;
  color: #374151;
}
.status-观察期 { background: #FEF3C7; color: #92400E; }
.status-已启动PIP { background: #FEE2E2; color: #991B1B; }
.status-PIP未通过进入汰换 { background: #FEE2E2; color: #991B1B; }
.status-协商解除 { background: #E0E7FF; color: #4338CA; }
.status-已离职 { background: #E5E7EB; color: #4B5563; }
.status-进行中 { background: #DBEAFE; color: #1E40AF; }
.status-已完成 { background: #D1FAE5; color: #065F46; }
.status-已终止 { background: #E5E7EB; color: #4B5563; }

/* Filters */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
}

/* Buttons */
.actions-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

/* Grid form */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-grid .full-width {
  grid-column: span 2;
}

/* Evaluation detail */
.dimension-card {
  background: #f9fafb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.dimension-card h4 {
  margin-bottom: 12px;
  font-size: 16px;
}

.score-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.score-item-row:last-child {
  border-bottom: none;
}

.score-select {
  width: 400px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.score-summary {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  padding: 20px;
  background: #eff6ff;
  border-radius: 8px;
}

.score-summary-item {
  text-align: center;
}

.score-summary-item .value {
  font-size: 24px;
  font-weight: 700;
  color: #BF381F;
}

.score-summary-item .label {
  font-size: 12px;
  color: #6b7280;
}

/* Status */
.status-pending { color: #f59e0b; }
.status-scored { color: #BF381F; }
.status-calibrated { color: #10b981; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

/* Textarea */
textarea {
  resize: vertical;
  min-height: 80px;
}

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 24px;
  border-radius: 8px;
  color: #fff;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast-success { background: #10b981; }
.toast-error { background: #dc2626; }

/* Grade bars */
.grade-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grade-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grade-bar .label {
  width: 80px;
  font-weight: 600;
}

.grade-bar .track {
  flex: 1;
  height: 20px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.grade-bar .fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

.grade-bar .count {
  width: 40px;
  text-align: right;
  font-weight: 600;
}

/* 半年度人才评估表单 */
.eval-subject-info {
  font-size: 15px;
  color: #374151;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.eval-notice {
  background: #eff6ff;
  border-left: 4px solid #BF381F;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #1e40af;
  font-size: 13px;
  border-radius: 0 8px 8px 0;
}

.eval-focus-banner {
  background: #FFF5F3;
  border-left: 4px solid #BF381F;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #BF381F;
  font-size: 14px;
  border-radius: 0 8px 8px 0;
}

.eval-not-required {
  background: #f3f4f6;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  margin-bottom: 20px;
  color: #6b7280;
}

.eval-not-required strong {
  display: block;
  color: #374151;
  font-size: 16px;
  margin-bottom: 8px;
}

.performance-summary {
  display: flex;
  gap: 16px;
  padding: 16px;
  margin-top: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.perf-summary-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.perf-summary-label {
  font-size: 13px;
  color: #6b7280;
}

.perf-summary-value {
  font-size: 20px;
  font-weight: 700;
  color: #BF381F;
}

.eval-section {
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.eval-section .section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #f3f4f6;
  font-weight: 600;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
}

.eval-section .section-weight {
  color: #BF381F;
  font-weight: 500;
  font-size: 13px;
}

.eval-section .section-body {
  padding: 8px 16px;
}

.score-item-label .required {
  color: #dc2626;
  margin-left: 4px;
}

.score-item-desc {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.5;
}

.score-criteria {
  margin-top: 8px;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.6;
}

.score-criteria-title {
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

.score-criteria-item {
  margin-left: 0;
}

/* 年度汇总维度明细 */
.dim-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.dim-block {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
}

.dim-title {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.dim-score {
  color: #BF381F;
  font-weight: 700;
}

.dim-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #4b5563;
}

.dim-items span {
  background: #f3f4f6;
  padding: 3px 8px;
  border-radius: 4px;
}

.dim-items.risk-items {
  color: #991b1b;
}

.dim-summary {
  display: flex;
  gap: 20px;
  font-size: 13px;
  margin-bottom: 10px;
}

.radar-chart-wrap {
  display: inline-block;
  margin-top: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px;
}

/* 跟进记录 / 谈话记录 */
.follow-records,
.talk-records {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.follow-record-row,
.talk-record-row {
  display: grid;
  grid-template-columns: 130px 100px 1fr 1fr 80px auto;
  gap: 8px;
  align-items: center;
  background: #f9fafb;
  padding: 8px;
  border-radius: 6px;
}

.follow-record-row input,
.talk-record-row input {
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 13px;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

@media (max-width: 768px) {
  .dim-detail-grid {
    grid-template-columns: 1fr;
  }
  .follow-record-row,
  .talk-record-row {
    grid-template-columns: 1fr;
  }
}

.score-item-row .score-number {
  width: 120px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.score-item-row .score-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  resize: vertical;
}

.score-item-row.textarea-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.score-item-row.textarea-row .score-item-label,
.score-item-row.textarea-row .score-textarea {
  width: 100%;
}

.score-select {
  width: 100%;
  max-width: 520px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.risk-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.risk-option-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.2s;
}

.risk-option-wrap.selected {
  border-color: #BF381F;
}

.risk-option-wrap.selected .risk-option {
  background: #eff6ff;
}

.risk-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.risk-option:hover,
.risk-option-wrap:hover .risk-option {
  background: #f9fafb;
}

.risk-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.risk-option .risk-label {
  flex: 1;
  font-size: 14px;
}

.risk-description {
  padding: 8px 12px 12px 40px;
  border-top: 1px dashed #e5e7eb;
  background: #fafafa;
}

.risk-description label {
  display: block;
  font-size: 12px;
  color: #374151;
  margin-bottom: 4px;
}

.risk-description-input {
  width: 100%;
  max-width: 600px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
}

.risk-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.risk-tag.danger {
  background: #fee2e2;
  color: #991b1b;
}

.risk-tag.warning {
  background: #fef3c7;
  color: #92400e;
}

.risk-manual-score {
  width: 70px;
  padding: 4px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.score-summary {
  flex-wrap: wrap;
  justify-content: space-around;
}

.dotted-review-section .score-textarea {
  background: #fff;
}

.status-reviewed { color: #8b5cf6; }

/* ==================== 九宫格人才地图 ==================== */
.nine-box-matrix {
  display: grid;
  grid-template-columns: 80px repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.matrix-col-header {
  display: contents;
}

.matrix-corner {
  grid-column: 1;
}

.matrix-col-label {
  text-align: center;
  font-weight: 600;
  color: #6b7280;
  padding: 8px 0;
  font-size: 13px;
}

.matrix-row {
  display: contents;
}

.matrix-row-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #6b7280;
  font-size: 13px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 4px;
}

.matrix-cell {
  border: 2px solid;
  border-radius: 12px;
  padding: 16px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.matrix-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.matrix-cell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.matrix-cell-header strong {
  font-size: 16px;
}

.matrix-count {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

.matrix-cell-desc {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
}

.matrix-people {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 180px;
}

.matrix-person {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  background: rgba(255,255,255,0.7);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 13px;
  gap: 4px;
}

.matrix-person:hover {
  background: rgba(255,255,255,0.95);
}

.matrix-person .person-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.matrix-person .person-name {
  font-weight: 500;
  color: #1f2937;
}

.matrix-person .person-grade {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.matrix-person .person-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #6b7280;
}

.matrix-more {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  padding: 4px 0;
}

.matrix-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
  padding: 12px 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== 六宫格人才地图 ==================== */
.six-box-matrix {
  margin-top: 20px;
}

.six-box-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.six-box-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.six-box-cell {
  border: 2px solid;
  border-radius: 14px;
  padding: 18px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.six-box-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.six-box-cell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 8px;
}

.six-box-cell-header strong {
  font-size: 18px;
}

.six-box-grade {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.7);
  color: #374151;
  margin-right: auto;
}

.six-box-count {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.six-box-cell-desc {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 2px;
}

.six-box-cell-meaning {
  font-size: 12px;
  color: #374151;
  font-weight: 500;
  margin-bottom: 12px;
}

.six-box-people {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 180px;
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
}
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
}

.matrix-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #374151;
}

.matrix-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

/* Admin module */
.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
  padding-bottom: 8px;
}

.admin-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 14px;
  border-radius: 6px;
}

.admin-tab.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.admin-panel {
  animation: fadeIn 0.2s ease;
}

.admin-panel h3 {
  margin-bottom: 12px;
  font-size: 16px;
  color: #1f2937;
}

.admin-panel h4 {
  margin: 20px 0 10px;
  font-size: 14px;
  color: #374151;
}

.admin-hint {
  color: #6b7280;
  font-size: 12px;
  margin-bottom: 16px;
}

.admin-subpanel {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-row label {
  font-weight: 500;
  color: #374151;
}

.admin-row input,
.admin-row select {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}

.admin-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.admin-item-row {
  display: flex;
  gap: 8px;
}

.admin-item-row input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}

.btn-save-settings {
  margin-top: 12px;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.dim-block {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.dim-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.dim-header input {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}

.admin-items .admin-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.admin-item-row input,
.admin-item-row select {
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
}

.admin-item-row input[type="number"] {
  width: 70px;
}

.admin-item-row .item-key,
.admin-item-row .item-label {
  min-width: 100px;
  flex: 1;
}

.item-criteria-row {
  margin-left: 24px;
  margin-bottom: 12px;
  color: #6b7280;
  font-size: 12px;
}

.item-criteria-row textarea {
  width: 100%;
  max-width: 600px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  resize: vertical;
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.btn-danger:hover {
  background: #fecaca;
}

#btnAddDim {
  margin-bottom: 12px;
}

/* ==================== 仪表盘可视化增强 ==================== */
.stats-grid.has-my-tasks {
  grid-template-columns: repeat(5, 1fr);
}

.stat-card.stat-warning .value {
  color: #f59e0b;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard-chart-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dashboard-chart-card .card-title {
  align-self: flex-start;
  margin-bottom: 16px;
}

.chart-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 230px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
  font-size: 12px;
  color: #4b5563;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* 仪表盘九宫格 mini */
.dashboard-matrix {
  margin-top: 8px;
}

.dashboard-matrix-grid {
  display: grid;
  grid-template-columns: 60px repeat(3, 1fr);
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
}

.dm-corner {
  grid-column: 1;
}

.dm-header-col,
.dm-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #6b7280;
  font-size: 12px;
}

.dm-header-row {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 3px;
}

.dm-cell {
  border: 2px solid;
  border-radius: 8px;
  padding: 10px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.dm-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.dm-cell-title {
  font-size: 14px;
  font-weight: 700;
}

.dm-cell-count {
  font-size: 12px;
  color: #374151;
  font-weight: 500;
}

.dm-person {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.8);
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-more {
  font-size: 11px;
  color: #6b7280;
  text-align: center;
}

/* 风险概览 */
.dashboard-alert-card .risk-overview {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.risk-stat {
  flex: 1;
  background: #f9fafb;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.risk-stat .value {
  font-size: 28px;
  font-weight: 700;
  color: #BF381F;
  margin-bottom: 4px;
}

.risk-stat .label {
  font-size: 13px;
  color: #6b7280;
}

.dashboard-alert-card .quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==================== 人员档案测评资格标识 ==================== */
.eligibility-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: default;
}

.eligibility-badge.eligible {
  background: #d1fae5;
  color: #065f46;
}

.eligibility-badge.ineligible {
  background: #fee2e2;
  color: #991b1b;
}

.eligibility-info {
  background: #f9fafb;
  border-radius: 8px;
  padding: 16px;
  margin-top: 8px;
}

.eligibility-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.eligibility-hint {
  color: #4b5563;
  font-size: 13px;
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid,
  .stats-grid.has-my-tasks {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-matrix-grid {
    grid-template-columns: 40px repeat(3, 1fr);
  }
}

/* ==================== 账号管理 ==================== */
.account-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-actions .btn {
  padding: 4px 10px;
  font-size: 12px;
}

/* ==================== 盘点类型切换 ==================== */
.inventory-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.inventory-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s;
}

.inventory-card.active {
  border-color: #BF381F;
  background: #FFF5F3;
}

.inventory-title {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.inventory-months,
.inventory-focus {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 4px;
}

/* ==================== 匹配预览与导入 ==================== */
.match-table-wrap {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.match-table-wrap .data-table {
  margin-bottom: 0;
}

.match-table-wrap .data-table th,
.match-table-wrap .data-table td {
  padding: 8px 12px;
  font-size: 13px;
}

.match-table-wrap select {
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  min-width: 140px;
}

#importPreview .data-table {
  margin-top: 8px;
}

#importPreview .data-table th,
#importPreview .data-table td {
  padding: 8px 12px;
  font-size: 13px;
}


/* Desktop admin section */
.admin-section {
  margin-bottom: 20px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.admin-section h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

/* ==================== 测评管理下拉多选筛选 ==================== */
.eval-filter-bar {
  align-items: flex-start;
}

.filter-dropdown-wrap {
  position: relative;
}

.filter-dropdown-toggle .caret {
  font-size: 10px;
  margin-left: 4px;
}

.filter-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 260px;
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  z-index: 100;
  padding: 12px;
}

.filter-dropdown-panel.show {
  display: block;
}

.filter-panel-header {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}

.filter-panel-divider {
  font-size: 12px;
  color: #9ca3af;
  margin: 10px 0 6px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  cursor: pointer;
  color: #374151;
}

.filter-option:hover {
  color: #BF381F;
}

.filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.filter-empty {
  padding: 8px 0;
  font-size: 12px;
  color: #9ca3af;
}

.filter-panel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

.selected-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #FFF5F3;
  color: #BF381F;
  border: 1px solid #BF381F;
  border-radius: 16px;
  font-size: 12px;
}

.filter-tag i {
  cursor: pointer;
  font-style: normal;
  font-weight: 700;
  padding: 0 2px;
}

.filter-tag i:hover {
  color: #A8321C;
}

.btn-link {
  background: transparent;
  color: #6b7280;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link:hover {
  color: #BF381F;
}

/* ==================== 仪表盘测评进度 ==================== */
.progress-stack-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-stack-row {
  display: grid;
  grid-template-columns: 80px 1fr 180px;
  gap: 16px;
  align-items: center;
}

.progress-stack-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.progress-stack-bar {
  display: flex;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
}

.progress-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.progress-segment.pending { background: #f59e0b; }
.progress-segment.scored { background: #BF381F; }
.progress-segment.calibrating { background: #8b5cf6; }
.progress-segment.calibrated { background: #10b981; }
.progress-segment.empty { background: #e5e7eb; }

.progress-stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #6b7280;
}

.progress-stack-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.progress-stack-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* 仪表盘九宫格 mini 已存在，补充卡片标题间距 */
.dashboard-alert-card .quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ==================== 员工档案资格标签 ==================== */
.eligibility-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.eligibility-badge.eligible {
  background: #D1FAE5;
  color: #065F46;
}

.eligibility-badge.ineligible {
  background: #F3F4F6;
  color: #6B7280;
}

/* ==================== 账号权限配置面板 ==================== */
.perm-config {
  margin-top: 20px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.perm-config-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.perm-config-desc {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
}

.perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.perm-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.perm-panel-title {
  padding: 10px 12px;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.perm-panel-body {
  max-height: 220px;
  overflow-y: auto;
  padding: 8px 12px;
}

.perm-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
}

.perm-option:hover {
  color: #BF381F;
}

.perm-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.perm-empty {
  padding: 12px 0;
  font-size: 12px;
  color: #9ca3af;
}

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

/* ==================== 新文档整体美化 ==================== */

/* 按钮统一规范 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  gap: 6px;
}

.btn-primary {
  background: #BF381F;
  color: #fff;
  border-color: #BF381F;
}

.btn-primary:hover {
  background: #D94A2F;
  border-color: #D94A2F;
}

.btn-primary:active {
  background: #A8321C;
  border-color: #A8321C;
}

.btn-secondary {
  background: #fff;
  color: #BF381F;
  border-color: #BF381F;
}

.btn-secondary:hover {
  background: #FFF5F3;
}

.btn-danger {
  background: #FF4D4F;
  color: #fff;
  border-color: #FF4D4F;
}

.btn-danger:hover {
  background: #ff7875;
  border-color: #ff7875;
}

.btn-default {
  background: #f5f5f5;
  color: #666;
  border-color: #d9d9d9;
}

.btn-default:hover {
  background: #e8e8e8;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.btn-icon {
  padding: 0 10px;
  font-size: 13px;
}

.btn-icon span {
  margin-left: 4px;
}

.btn-block {
  width: 100%;
}

/* 输入框统一规范 */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="tel"],
select,
textarea {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #D9D9D9;
  border-radius: 4px;
  font-size: 14px;
  color: #1f2937;
  background: #fff;
  transition: all 0.2s;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #BF381F;
  box-shadow: 0 0 0 2px rgba(191, 56, 31, 0.1);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23BF381F' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* 卡片统一 */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 20px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
}

/* 导航栏强化 */
.sidebar {
  background: #BF381F;
}

.nav-item {
  color: rgba(255, 255, 255, 0.85);
  border-radius: 0;
  margin: 0;
  padding: 14px 20px;
  font-size: 14px;
  transition: all 0.2s;
  position: relative;
}

.nav-item:hover {
  background: #A8321C;
  color: #fff;
}

.nav-item.active {
  background: #D94A2F;
  color: #fff;
  border-left: 4px solid #fff;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #fff;
}

/* 列表页美化 */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.data-table thead {
  background: #f9fafb;
}

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  font-size: 13px;
  border-bottom: 1px solid #e5e7eb;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  color: #4b5563;
  font-size: 14px;
}

.data-table tbody tr {
  height: 56px;
}

.data-table tbody tr:nth-child(even) {
  background: #FAFAFA;
}

.data-table tbody tr:hover {
  background: #f3f4f6;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* 状态标签 */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-tag.active {
  background: #D1FAE5;
  color: #065F46;
}

.status-tag.inactive {
  background: #F3F4F6;
  color: #6B7280;
}

.grade-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  min-width: 36px;
}

/* 测评表单弹窗 */
.eval-modal {
  max-width: 960px;
  width: 92vw;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
}

.eval-header {
  background: #fff;
  border-bottom: 1px solid #f3f4f6;
  padding: 20px 24px;
}

.eval-header-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: #BF381F;
  margin: 0 0 6px 0;
}

.eval-header-meta {
  font-size: 13px;
  color: #6b7280;
}

.eval-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: #f5f5f5;
}

.eval-focus-banner {
  background: #FFF5F3;
  border: 1px solid #BF381F;
  border-radius: 8px;
  padding: 12px 16px;
  color: #BF381F;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
}

.score-criteria-box {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.score-criteria-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 14px;
}

.score-criteria-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.score-criteria-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  background: #f9fafb;
}

.score-criteria-item.criteria-5 { background: #DBEAFE; color: #1E40AF; }
.score-criteria-item.criteria-4 { background: #D1FAE5; color: #065F46; }
.score-criteria-item.criteria-3 { background: #FEF3C7; color: #92400E; }
.score-criteria-item.criteria-2 { background: #FFEDD5; color: #9A3412; }
.score-criteria-item.criteria-1 { background: #FEE2E2; color: #991B1B; }

.criteria-score {
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.criteria-section {
  margin-bottom: 18px;
}

.criteria-section:last-child {
  margin-bottom: 0;
}

.criteria-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid #9b1c1c;
}

.criteria-section-body {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.7;
  background: #f9fafb;
  border-radius: 6px;
  padding: 14px 16px;
}

.criteria-section-body p {
  margin: 0 0 6px 0;
}

.criteria-section-body p:last-child {
  margin-bottom: 0;
}

.criteria-section-body.formula {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  text-align: center;
  background: #fef2f2;
  border: 1px dashed #fecaca;
}

.criteria-grade-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.criteria-grade-item {
  background: #f9fafb;
  border-radius: 6px;
  padding: 12px 14px;
  border-left: 3px solid #d1d5db;
}

.criteria-grade-item.grade-S { border-left-color: #1e40af; background: #eff6ff; }
.criteria-grade-item.grade-A { border-left-color: #065f46; background: #ecfdf5; }
.criteria-grade-item.grade-B { border-left-color: #92400e; background: #fffbeb; }
.criteria-grade-item.grade-C { border-left-color: #4b5563; background: #f9fafb; }
.criteria-grade-item.grade-D { border-left-color: #9a3412; background: #fff7ed; }
.criteria-grade-item.grade-E { border-left-color: #991b1b; background: #fef2f2; }

.criteria-grade-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.criteria-grade-letter {
  font-size: 16px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #fff;
}

.grade-S .criteria-grade-letter { background: #1e40af; }
.grade-A .criteria-grade-letter { background: #065f46; }
.grade-B .criteria-grade-letter { background: #92400e; }
.grade-C .criteria-grade-letter { background: #4b5563; }
.grade-D .criteria-grade-letter { background: #9a3412; }
.grade-E .criteria-grade-letter { background: #991b1b; }

.criteria-grade-range {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.criteria-grade-desc {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 6px;
}

.criteria-grade-rule {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

.eval-section {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.eval-section-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f3f4f6;
}

.eval-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.eval-section-question {
  font-size: 13px;
  color: #6b7280;
}

.eval-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #f3f4f6;
}

.eval-item:last-child {
  border-bottom: none;
}

.eval-item-info {
  flex: 1;
}

.eval-item-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

.eval-item-label.required::after {
  content: ' *';
  color: #BF381F;
}

.eval-item-desc {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  line-height: 1.5;
}

.eval-item-criteria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px;
  font-size: 12px;
  color: #4b5563;
  padding: 10px;
  background: #f9fafb;
  border-radius: 6px;
  margin-top: 8px;
}

.eval-item-input {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.score-input {
  width: 120px;
  text-align: right;
  font-weight: 600;
  font-size: 15px;
}

.input-unit {
  color: #6b7280;
  font-size: 14px;
  white-space: nowrap;
}

.eval-item-textarea {
  flex-direction: column;
  gap: 12px;
}

.score-textarea {
  width: 100%;
}

.performance-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  background: #FFF5F3;
  border-radius: 8px;
}

.perf-result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.perf-result-item span {
  font-size: 12px;
  color: #6b7280;
}

.perf-result-item strong {
  font-size: 22px;
  color: #BF381F;
  font-weight: 700;
}

/* 风险指数 */
.risk-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.risk-group-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}

.risk-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.risk-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.risk-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.risk-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #BF381F;
}

.risk-applicable {
  margin-left: 6px;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
}

.dotted-return-notice {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.dotted-return-label {
  font-size: 13px;
  font-weight: 600;
  color: #991b1b;
  margin-bottom: 6px;
}

.dotted-return-reason {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.6;
}

.risk-tag {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.risk-tag.tag-cap,
.risk-tag.tag-downgrade {
  background: #FEE2E2;
  color: #991B1B;
}

.risk-tag.tag-deduct {
  background: #FFEDD5;
  color: #9A3412;
}

.risk-desc-box {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
}

.risk-desc-box.show {
  display: block;
}

.risk-desc-label {
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
  font-weight: 500;
}

.risk-desc-input {
  width: 100%;
}

.risk-range-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: #374151;
}

.risk-range-input input {
  width: 100px;
}

/* 综合评分结果 */
.eval-summary-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #f3f4f6;
}

.eval-summary-title {
  font-size: 16px;
  font-weight: 700;
  color: #BF381F;
  margin-bottom: 16px;
  text-align: center;
}

.eval-summary-body {
  max-width: 400px;
  margin: 0 auto;
}

.eval-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  color: #4b5563;
}

.eval-summary-row.highlight {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.eval-summary-row strong {
  font-size: 18px;
  color: #1f2937;
  font-weight: 700;
}

.eval-summary-row .text-danger {
  color: #BF381F;
}

.eval-summary-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 8px 0;
}

.summary-weight {
  font-size: 12px;
  color: #9ca3af;
  margin-left: 4px;
}

.summary-weakness {
  max-width: 220px;
  text-align: right;
  color: #6b7280;
  font-size: 13px;
  word-break: break-all;
}

.risk-cap-note {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 8px 0;
  font-size: 12px;
  color: #BF381F;
  line-height: 1.5;
}

.risk-cap-note span {
  text-align: left;
  word-break: break-all;
}

/* 分数等级对照 */
.grade-reference {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.grade-reference-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 14px;
}

.grade-reference-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.grade-reference-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 13px;
}

.grade-ref-grade {
  font-weight: 700;
  color: #BF381F;
  min-width: 20px;
}

.grade-ref-range {
  color: #6b7280;
  min-width: 70px;
}

.grade-ref-label {
  color: #374151;
  font-weight: 500;
}

.grade-ref-meaning {
  color: #9ca3af;
  font-size: 12px;
}

.eval-footer {
  border-top: 1px solid #f3f4f6;
  padding: 16px 24px;
  background: #fff;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 员工档案表格 */
#staffTable {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
}

.staff-table {
  width: 100%;
  min-width: 960px;
  table-layout: fixed;
}

.staff-table th,
.staff-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-table th:nth-child(1), .staff-table td:nth-child(1) { width: 10%; text-align: left; }
.staff-table th:nth-child(2), .staff-table td:nth-child(2) { width: 11%; text-align: left; }
.staff-table th:nth-child(3), .staff-table td:nth-child(3) { width: 18%; }
.staff-table th:nth-child(4), .staff-table td:nth-child(4) { width: 10%; }
.staff-table th:nth-child(5), .staff-table td:nth-child(5) { width: 12%; }
.staff-table th:nth-child(6), .staff-table td:nth-child(6) { width: 11%; }
.staff-table th:nth-child(7), .staff-table td:nth-child(7) { width: 10%; }
.staff-table th:nth-child(8), .staff-table td:nth-child(8) { width: 9%; }
.staff-table th:nth-child(9), .staff-table td:nth-child(9) { width: 160px; text-align: center; }

.staff-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.staff-table td:nth-child(1),
.staff-table td:nth-child(2) {
  font-weight: 500;
}

.staff-table td:nth-child(6) .eligibility-badge,
.staff-table td:nth-child(8) .status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
}

/* 响应式 */
@media (max-width: 768px) {
  .performance-result {
    grid-template-columns: 1fr;
  }
  .eval-summary-body {
    max-width: 100%;
  }
  .score-criteria-list {
    grid-template-columns: 1fr;
  }
  .eval-item {
    flex-direction: column;
    gap: 12px;
  }
  .eval-item-input {
    width: 100%;
  }
  .score-input {
    flex: 1;
  }
}

/* 校准确认弹窗 - 详细评分 */
.calibration-modal {
  max-width: 640px;
}

.calibration-detail {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
  margin-bottom: 16px;
}

.calibration-detail .eval-summary-card {
  padding: 16px;
  margin-bottom: 16px;
}

.cal-section {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #f3f4f6;
}

.cal-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}

.cal-section-body {
  font-size: 14px;
  color: #4b5563;
}

.cal-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.cal-row strong {
  color: #1f2937;
  font-weight: 600;
}

.cal-item {
  padding: 8px 0;
}

.cal-item > span {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.cal-text {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.cal-risk-item {
  padding: 6px 0;
  color: #BF381F;
  font-size: 13px;
  line-height: 1.5;
}

