/* ==========================================================================
   人员资质 · 能力档案 02
   仅作用于 .staff- 命名空间；基础设计变量与公共组件来自 app.css。
   ========================================================================== */

.staff-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.staff-page [hidden],
.staff-modal [hidden] {
  display: none !important;
}

.staff-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.staff-readonly-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f9fa;
  color: var(--text-muted);
  font-size: 9.5px;
  white-space: nowrap;
}

.staff-readonly-chip .icon {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   统计卡片
   -------------------------------------------------------------------------- */

.staff-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.staff-stats[data-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.staff-stat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 88px;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-xs);
  transition:
    border-color var(--speed),
    box-shadow var(--speed),
    transform var(--speed);
}

.staff-stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(11, 31, 51, 0.12), rgba(11, 31, 51, 0) 62%);
}

.staff-stat:hover {
  border-color: var(--gold-200);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.staff-stat.is-feature {
  border-color: var(--gold-200);
  background: linear-gradient(150deg, #fffdf9 0%, #fbf5e9 100%);
}

.staff-stat.is-feature::before {
  background: linear-gradient(90deg, var(--gold-400), rgba(201, 166, 107, 0) 72%);
}

.staff-stat.is-feature::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 166, 107, 0.18), rgba(201, 166, 107, 0) 70%);
  pointer-events: none;
}

.staff-stat--warning {
  border-color: var(--warning-line);
  background: linear-gradient(150deg, #fffdf9 0%, #fdf6ec 100%);
}

.staff-stat--warning::before {
  background: linear-gradient(90deg, var(--warning), rgba(169, 109, 31, 0) 70%);
}

.staff-stat--success::before {
  background: linear-gradient(90deg, var(--success), rgba(47, 125, 93, 0) 70%);
}

.staff-stat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #f1f5f7;
  color: var(--ink-700);
}

.staff-stat-icon .icon {
  width: 18px;
  height: 18px;
}

.staff-stat--gold .staff-stat-icon {
  background: linear-gradient(150deg, var(--gold-050), #f4e8d3);
  color: var(--gold-600);
}

.staff-stat--warning .staff-stat-icon {
  background: var(--warning-bg);
  color: var(--warning);
}

.staff-stat--success .staff-stat-icon {
  background: var(--success-bg);
  color: var(--success);
}

.staff-stat-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.staff-stat-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 9.5px;
  letter-spacing: 0.5px;
}

.staff-stat-value {
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.3px;
}

.staff-stat-value small {
  margin-left: 3px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 400;
}

.staff-stat-note {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 8.5px;
  line-height: 1.5;
}

.staff-stat-note span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-stat-note .icon {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  color: var(--gold-600);
}

.staff-stat--warning .staff-stat-note .icon {
  color: var(--warning);
}

.staff-stat--success .staff-stat-note .icon {
  color: var(--success);
}

.staff-stat--skeleton {
  pointer-events: none;
}

.staff-stat--skeleton:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

.staff-skeleton-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
}

.staff-skeleton-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.staff-skeleton-filter .skeleton-line {
  height: 34px;
  border-radius: 7px;
}

.staff-error-card {
  padding: 6px;
}

/* --------------------------------------------------------------------------
   筛选
   -------------------------------------------------------------------------- */

.staff-filters {
  padding: 14px 16px;
}

.staff-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.staff-filter-field {
  flex: 1 1 150px;
  min-width: 132px;
  gap: 4px;
}

.staff-filter-field--search {
  flex: 1.6 1 235px;
}

.staff-filter-field .field-label {
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.staff-filter-field .input {
  height: 36px;
  font-size: 11.5px;
}

.staff-search {
  width: 100%;
  min-width: 0;
}

.staff-search .input {
  height: 36px;
}

.staff-search input::-webkit-search-cancel-button,
.staff-search input::-webkit-search-decoration {
  display: none;
}

.staff-filter-divider {
  width: 1px;
  align-self: stretch;
  margin: 4px 2px 3px;
  background: var(--line-soft);
}

.staff-filter-checks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 36px;
  padding: 0 2px;
}

.staff-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 10.5px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.staff-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.staff-check-box {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: transparent;
  transition: all var(--speed);
}

.staff-check-box .icon {
  width: 10px;
  height: 10px;
  stroke-width: 2.6;
}

.staff-check input:checked + .staff-check-box {
  border-color: var(--ink-900);
  background: var(--ink-900);
  color: #fff;
}

.staff-check input:focus-visible + .staff-check-box {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

.staff-check b {
  margin-left: 3px;
  color: var(--text-faint);
  font-family: var(--font-number);
  font-size: 9.5px;
  font-weight: 500;
}

.staff-check.is-on {
  color: var(--ink-900);
}

.staff-check.is-on b {
  color: var(--gold-600);
}

.staff-check-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-faint);
  font-size: 9.5px;
  white-space: nowrap;
}

.staff-check-note .icon {
  width: 12px;
  height: 12px;
}

.staff-filter-end {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  margin-left: auto;
  padding-left: 2px;
}

.staff-result {
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
}

.staff-result b {
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 13px;
  font-weight: 500;
}

.staff-filter-end .btn {
  height: 31px;
  padding: 0 10px;
  font-size: 10px;
}

.staff-active-filters {
  margin-top: 10px;
}

.staff-active-filters:empty {
  display: none;
}

.staff-active-filters .filter-chip {
  font-size: 9px;
}

.staff-active-filters .filter-chip b {
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   预警横幅
   -------------------------------------------------------------------------- */

.staff-warning-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border: 1px solid var(--warning-line);
  border-radius: 10px;
  background: linear-gradient(100deg, #fdf6ea, #fffaf3 62%, #fff);
  box-shadow: var(--shadow-xs);
}

.staff-warning-banner > .icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--warning);
}

.staff-warning-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.staff-warning-copy strong {
  color: #7c5017;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.staff-warning-copy span {
  color: #98682b;
  font-size: 9.5px;
}

.staff-warning-copy b {
  font-family: var(--font-number);
  font-weight: 600;
}

.staff-warning-banner .btn {
  flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   表格外壳
   -------------------------------------------------------------------------- */

.staff-table-card {
  overflow: hidden;
}

.staff-table-head {
  align-items: flex-start;
}

.staff-table-head-copy {
  min-width: 0;
}

.staff-eyebrow {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  color: var(--gold-700);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-table-title {
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.staff-table-desc {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.staff-table-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  padding-top: 4px;
  color: var(--text-muted);
  font-size: 9px;
  text-align: right;
}

.staff-table-meta b {
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 10px;
  font-weight: 500;
}

.staff-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.staff-legend i {
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: var(--gold-400);
}

.staff-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.staff-table.data-table {
  min-width: 1040px;
  table-layout: fixed;
  font-size: 11px;
}

.staff-table.data-table thead th {
  padding: 10px 9px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.4px;
  background: #f8fafb;
}

.staff-table.data-table thead th:first-child,
.staff-table.data-table tbody td:first-child {
  padding-left: 12px;
}

.staff-table.data-table thead th:last-child,
.staff-table.data-table tbody td:last-child {
  padding-right: 12px;
}

.staff-table.data-table tbody td {
  padding: 11px 9px;
  vertical-align: middle;
}

.staff-table.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.staff-head-toggle {
  width: 42px;
}

.staff-head-person {
  width: 17%;
}

.staff-head-dept {
  width: 12%;
}

.staff-head-edu {
  width: 13%;
}

.staff-head-social {
  width: 19%;
}

.staff-head-cert {
  width: 14%;
}

.staff-head-expiry {
  width: 11%;
}

.staff-head-actions {
  width: 10%;
  text-align: right;
}

.staff-head-toggle {
  text-align: center;
}

.staff-table-footer {
  padding: 11px 16px;
}

.staff-table-footer .pagination-simple {
  font-size: 9.5px;
}

/* --------------------------------------------------------------------------
   人员行
   -------------------------------------------------------------------------- */

.staff-row {
  cursor: pointer;
}

.staff-row.is-multi {
  background: linear-gradient(
    90deg,
    rgba(201, 166, 107, 0.08) 0,
    rgba(201, 166, 107, 0.025) 14%,
    rgba(255, 255, 255, 0) 32%
  );
}

.staff-row.is-multi > td:first-child {
  box-shadow: inset 3px 0 0 0 var(--gold-400);
}

.staff-row.is-expanded > td {
  background: #fbfaf6;
}

.staff-row.is-expanded:not(.is-multi) > td:first-child {
  box-shadow: inset 3px 0 0 0 var(--ink-700);
}

.staff-cell-toggle {
  text-align: center;
}

.staff-toggle {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text-muted);
  transition: all var(--speed);
}

.staff-toggle:hover {
  border-color: var(--gold-300);
  background: var(--gold-050);
  color: var(--gold-600);
}

.staff-toggle .icon {
  width: 13px;
  height: 13px;
  transition: transform var(--speed) var(--ease);
}

.staff-toggle[aria-expanded="true"] {
  border-color: var(--gold-300);
  background: var(--gold-050);
  color: var(--gold-600);
}

.staff-toggle[aria-expanded="true"] .icon {
  transform: rotate(90deg);
}

.staff-clip {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-social {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.staff-social-payer {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 500;
}

.staff-social-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--text-faint);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text-faint);
}

.staff-dot.is-success {
  background: var(--success);
}

.staff-dot.is-danger {
  background: var(--danger);
}

.staff-dot.is-warning {
  background: var(--warning);
}

.staff-locked-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-faint);
  font-size: 9px;
  white-space: nowrap;
}

.staff-locked-inline .icon {
  width: 11px;
  height: 11px;
}

.staff-empty-text {
  color: var(--text-faint);
  font-size: 9.5px;
}

.staff-cert-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.staff-cert-count {
  color: var(--text-secondary);
  font-size: 9.5px;
  white-space: nowrap;
}

.staff-cert-count b {
  margin-right: 1px;
  color: var(--ink-900);
  font-family: var(--font-number);
  font-size: 13px;
  font-weight: 500;
}

.staff-multi {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border: 1px solid var(--gold-200);
  border-radius: 4px;
  background: linear-gradient(135deg, var(--gold-050), #f6ecd9);
  color: #8a6530;
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.staff-multi .icon {
  width: 10px;
  height: 10px;
}

.staff-multi.is-lg {
  padding: 2px 8px;
  font-size: 9px;
}

.staff-cert-warn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--warning);
  font-size: 8px;
  white-space: nowrap;
}

.staff-cert-warn .icon {
  width: 9px;
  height: 9px;
}

.staff-expiry-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.staff-expiry-date {
  color: var(--text-secondary);
  font-family: var(--font-number);
  font-size: 10px;
  letter-spacing: 0.2px;
}

.staff-expiry-badge {
  min-height: 18px;
  padding: 1px 5px;
  font-size: 8px;
}

.staff-expiry-badge .badge-dot {
  width: 3px;
  height: 3px;
}

.staff-actions {
  gap: 4px;
}

.staff-actions .icon-btn {
  width: 26px;
  height: 26px;
}

.staff-actions .icon-btn .icon {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   展开详情
   -------------------------------------------------------------------------- */

.staff-detail {
  padding: 18px 20px 20px;
  background: linear-gradient(180deg, #fcfaf5 0%, #fff 52%);
}

.staff-detail-row .expand-panel {
  border-top: 0;
}

.staff-detail-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line-soft);
}

.staff-detail-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.staff-detail-title strong {
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.staff-detail-title span {
  color: var(--text-muted);
  font-size: 9px;
  letter-spacing: 0.2px;
}

.staff-detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-left: auto;
}

.staff-detail-fact {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.staff-detail-fact span {
  color: var(--text-faint);
  font-size: 8.5px;
}

.staff-detail-fact strong {
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}

.staff-detail-edit {
  flex: 0 0 auto;
}

.staff-detail-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 13px;
  padding: 8px 11px;
  border-left: 2px solid var(--gold-300);
  border-radius: 0 6px 6px 0;
  background: #faf7f0;
  color: var(--text-muted);
  font-size: 9.5px;
  line-height: 1.65;
}

.staff-detail-note .icon {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--gold-600);
}

.staff-expand-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 16px 20px;
}

.staff-detail-block {
  min-width: 0;
  animation: staffDetailIn 240ms var(--ease);
}

.staff-detail-block--wide {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.staff-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 20px;
  margin-bottom: 8px;
}

.staff-block-head .expand-block-title {
  margin-bottom: 0;
}

.staff-block-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: #fff;
  color: var(--text-muted);
  font-size: 8.5px;
  white-space: nowrap;
}

.staff-block-tag.is-locked {
  background: #f7f9fa;
  color: var(--text-faint);
}

.staff-block-tag .icon {
  width: 10px;
  height: 10px;
}

@keyframes staffDetailIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 社保 */

.staff-social-card {
  padding: 11px 12px;
}

.staff-social-card .social-head {
  align-items: flex-start;
}

.staff-social-unit {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.staff-social-unit span {
  color: var(--text-faint);
  font-size: 8px;
}

.staff-social-unit strong {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 500;
  word-break: break-all;
}

.staff-social-card .social-months {
  font-size: 19px;
  white-space: nowrap;
}

.staff-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 14px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-soft);
}

.staff-social-grid div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.staff-social-grid span {
  color: var(--text-faint);
  font-size: 8px;
}

.staff-social-grid strong {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
}

.staff-privacy {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line-soft);
  color: var(--text-faint);
  font-size: 8.5px;
  line-height: 1.55;
}

.staff-privacy .icon {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--gold-600);
}

/* 证书 */

.staff-cert-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.staff-cert-total {
  color: var(--text-muted);
  font-size: 9px;
  white-space: nowrap;
}

.staff-cert-total b {
  color: var(--ink-900);
  font-family: var(--font-number);
  font-weight: 500;
}

.staff-cert-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.staff-cert-table {
  min-width: 820px;
  table-layout: fixed;
}

.staff-cert-table.cert-mini-table {
  font-size: 9px;
}

.staff-cert-table.cert-mini-table th {
  padding: 7px 9px;
  background: #f8fafb;
  font-size: 8.5px;
}

.staff-cert-table.cert-mini-table td {
  padding: 8px 9px;
  color: var(--text-secondary);
  font-size: 9.5px;
}

.staff-cert-table .cell-title {
  font-size: 10px;
}

.staff-cert-col-name {
  width: 23%;
}

.staff-cert-col-level {
  width: 8%;
}

.staff-cert-col-no {
  width: 16%;
}

.staff-cert-col-issuer {
  width: 17%;
}

.staff-cert-col-date {
  width: 13%;
}

.staff-cert-col-status {
  width: 12%;
}

.staff-cert-col-files {
  width: 11%;
}

.staff-cert-no {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  word-break: break-all;
}

.staff-cert-date {
  display: block;
  color: var(--text-muted);
  font-size: 8.5px;
  line-height: 1.6;
  white-space: nowrap;
}

.staff-cert-files-cell {
  white-space: nowrap;
}

.staff-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 23px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text-secondary);
  font-family: var(--font-number);
  font-size: 9px;
  vertical-align: middle;
  transition: all var(--speed);
}

.staff-file-btn:hover,
.staff-file-btn[aria-expanded="true"] {
  border-color: var(--gold-300);
  background: var(--gold-050);
  color: var(--gold-600);
}

.staff-file-btn .icon {
  width: 11px;
  height: 11px;
}

.staff-cert-files-cell .staff-upload-btn {
  width: 24px;
  height: 24px;
  margin-left: 2px;
  vertical-align: middle;
}

.staff-cert-files-cell .staff-upload-btn .icon {
  width: 12px;
  height: 12px;
}

.staff-files-row > td {
  padding: 0;
  background: #fbfaf6;
}

.staff-files-panel {
  padding: 10px 13px 12px;
}

.staff-files-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--text-faint);
  font-size: 8.5px;
  letter-spacing: 0.3px;
}

.staff-files-panel-head span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.staff-files-panel-head .icon {
  width: 11px;
  height: 11px;
}

.staff-files-panel .attachment-row {
  background: #fff;
}

.staff-files-panel .attachment-empty {
  padding: 10px 12px;
  background: #fff;
}

.staff-files-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
}

.staff-files-actions .btn {
  height: 29px;
  padding: 0 10px;
  font-size: 9.5px;
}

.staff-files-hint {
  color: var(--text-faint);
  font-size: 8.5px;
}

.staff-cert-tip {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 7px 0 0;
  color: var(--text-faint);
  font-size: 8.5px;
}

.staff-cert-tip .icon {
  width: 10px;
  height: 10px;
  color: var(--gold-600);
}

/* --------------------------------------------------------------------------
   空状态 / 权限提示
   -------------------------------------------------------------------------- */

.staff-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 44px 20px;
  text-align: center;
}

.staff-empty-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(145deg, #fafbfb, #f2f5f6);
  color: #a4b0b9;
}

.staff-empty-icon .icon {
  width: 21px;
  height: 21px;
}

.staff-empty strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.staff-empty p {
  margin: 0;
  color: var(--text-muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.staff-empty .btn {
  margin-top: 7px;
}

.staff-locked-panel {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fafcfc;
}

.staff-locked-panel > .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--text-faint);
}

.staff-locked-panel div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.staff-locked-panel strong {
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 600;
}

.staff-locked-panel span {
  color: var(--text-faint);
  font-size: 9px;
  line-height: 1.6;
}

.staff-inline-empty {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--text-faint);
  font-size: 9.5px;
}

.staff-inline-empty .icon {
  width: 14px;
  height: 14px;
}

.staff-page-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0 2px;
  color: var(--text-faint);
  font-size: 8.5px;
  line-height: 1.6;
}

.staff-page-note .icon {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   新增 / 编辑弹窗
   -------------------------------------------------------------------------- */

.staff-modal .modal-body {
  background: var(--paper-warm);
}

.staff-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.staff-form-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.staff-form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fbfaf7, #fff);
}

.staff-form-step {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: var(--ink-900);
  color: var(--gold-200);
  font-family: var(--font-number);
  font-size: 9.5px;
  letter-spacing: 0.5px;
}

.staff-form-section-head > div {
  min-width: 0;
  flex: 1;
}

.staff-form-section-head h3 {
  color: var(--ink-900);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.staff-form-section-head p {
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1.55;
}

.staff-form-flag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--text-muted);
  font-size: 8px;
  white-space: nowrap;
}

.staff-form-flag.is-gold {
  border-color: var(--gold-200);
  background: var(--gold-050);
  color: var(--gold-600);
}

.staff-form-flag.is-locked {
  background: #f7f9fa;
  color: var(--text-faint);
}

.staff-form-flag .icon {
  width: 10px;
  height: 10px;
}

.staff-form-grid {
  padding: 14px 15px;
}

.staff-form-grid .field-label {
  font-size: 10px;
}

.staff-form-grid .input {
  height: 36px;
  font-size: 11.5px;
}

.staff-form-grid .textarea {
  height: auto;
  min-height: 60px;
}

.staff-field-wrap {
  min-width: 0;
}

.staff-form-note {
  margin: 0 15px 14px;
}

.staff-form-locked {
  padding: 0 15px 15px;
}

.staff-cert-editor {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px 15px 0;
}

.staff-cert-row {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfc;
}

.staff-cert-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 6px 5px 11px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 9px 9px 0 0;
  background: #fff;
}

.staff-cert-row-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 9.5px;
}

.staff-cert-row-title b {
  font-family: var(--font-number);
  font-weight: 500;
  letter-spacing: 0.4px;
}

.staff-cert-row-title em {
  padding: 1px 5px;
  border-radius: 3px;
  background: #eef2f4;
  color: var(--text-muted);
  font-size: 7.5px;
  font-style: normal;
}

.staff-cert-row-title em.is-new {
  background: var(--gold-050);
  color: var(--gold-600);
}

.staff-cert-remove {
  width: 26px;
  height: 26px;
}

.staff-cert-remove .icon {
  width: 13px;
  height: 13px;
}

.staff-cert-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px 10px;
  padding: 11px;
}

.staff-cert-fields .form-field {
  gap: 4px;
}

.staff-cert-fields .field-label {
  font-size: 9.5px;
}

.staff-cert-fields .input {
  height: 34px;
  font-size: 11px;
}

.staff-cert-field-wide {
  grid-column: span 2;
}

.staff-cert-editor-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 13px 15px 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--text-faint);
  font-size: 9.5px;
}

.staff-cert-editor-empty .icon {
  width: 15px;
  height: 15px;
}

.staff-cert-editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 15px 14px;
}

.staff-cert-editor-hint {
  color: var(--text-faint);
  font-size: 8.5px;
}

.staff-cert-editor-hint b {
  color: var(--text-secondary);
  font-family: var(--font-number);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  .staff-filter-end {
    margin-left: 0;
  }
}

@media (max-width: 960px) {
  .staff-stats,
  .staff-stats[data-count="3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-expand-grid {
    grid-template-columns: 1fr;
  }

  .staff-detail-block--wide {
    grid-column: auto;
  }

  .staff-detail-facts {
    width: 100%;
    margin-left: 0;
    gap: 14px 20px;
  }

  .staff-filter-divider {
    display: none;
  }

  .staff-filter-checks {
    width: 100%;
    min-height: 30px;
  }

  .staff-filter-end {
    width: 100%;
    min-height: 30px;
    justify-content: space-between;
    padding-top: 2px;
  }

  .staff-table-head {
    flex-direction: column;
    gap: 8px;
  }

  .staff-table-meta {
    justify-content: flex-start;
    padding-top: 0;
    text-align: left;
  }

  .staff-table.data-table {
    min-width: 760px;
  }

  .staff-head-edu,
  .staff-head-expiry {
    display: none;
  }

  .staff-table > tbody > tr > td:nth-child(4),
  .staff-table > tbody > tr > td:nth-child(7) {
    display: none;
  }

  .staff-head-toggle {
    width: 40px;
  }

  .staff-head-person {
    width: 21%;
  }

  .staff-head-dept {
    width: 15%;
  }

  .staff-head-social {
    width: 27%;
  }

  .staff-head-cert {
    width: 19%;
  }

  .staff-head-actions {
    width: 13%;
  }

  .staff-actions {
    gap: 2px;
  }

  .staff-actions .icon-btn {
    width: 24px;
    height: 24px;
  }

  .staff-actions .icon-btn .icon {
    width: 13px;
    height: 13px;
  }

  .staff-table.data-table thead th:last-child,
  .staff-table.data-table tbody td:last-child {
    padding-left: 4px;
  }
}

@media (max-width: 720px) {
  .staff-page {
    gap: 11px;
  }

  .staff-stats {
    gap: 8px;
  }

  .staff-stat {
    min-height: 78px;
    gap: 10px;
    padding: 11px 12px;
  }

  .staff-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .staff-stat-icon .icon {
    width: 16px;
    height: 16px;
  }

  .staff-stat-value {
    font-size: 21px;
  }

  .staff-stat-label {
    font-size: 9px;
  }

  .staff-stat-note {
    font-size: 8px;
  }

  .staff-filter-field,
  .staff-filter-field--search {
    flex-basis: 100%;
    min-width: 0;
  }

  .staff-filter-row {
    gap: 9px;
  }

  .staff-filter-checks {
    gap: 12px;
  }

  .staff-warning-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .staff-warning-banner .btn {
    margin-left: 28px;
  }

  .staff-table-meta {
    gap: 5px;
    font-size: 8.5px;
  }

  .staff-table-head {
    padding: 14px;
  }

  .staff-table-title {
    font-size: 16px;
  }

  .staff-table.data-table {
    min-width: 100%;
  }

  .staff-head-dept,
  .staff-head-social {
    display: none;
  }

  .staff-table > tbody > tr > td:nth-child(3),
  .staff-table > tbody > tr > td:nth-child(5) {
    display: none;
  }

  .staff-head-toggle {
    width: 34px;
  }

  .staff-head-person {
    width: auto;
  }

  .staff-head-cert {
    width: 32%;
  }

  .staff-head-actions {
    width: 96px;
  }

  .staff-table.data-table thead th {
    padding: 9px 6px;
    font-size: 8.5px;
  }

  .staff-table.data-table tbody td {
    padding: 10px 6px;
  }

  .staff-table.data-table thead th:first-child,
  .staff-table.data-table tbody td:first-child {
    padding-left: 10px;
  }

  .staff-table.data-table thead th:last-child,
  .staff-table.data-table tbody td:last-child {
    padding-right: 10px;
  }

  .staff-actions {
    gap: 2px;
  }

  .staff-actions .icon-btn {
    width: 24px;
    height: 24px;
  }

  .staff-actions .icon-btn .icon {
    width: 13px;
    height: 13px;
  }

  .staff-multi {
    font-size: 8px;
    padding: 0 4px;
  }

  .staff-multi .icon {
    width: 9px;
    height: 9px;
  }

  .staff-detail {
    padding: 13px;
  }

  .staff-detail-head {
    gap: 9px;
  }

  .staff-detail-title strong {
    font-size: 14px;
  }

  .staff-detail-facts {
    gap: 8px 14px;
  }

  .staff-detail-fact strong {
    font-size: 10px;
  }

  .staff-detail-edit {
    margin-left: 0;
  }

  .staff-social-card {
    padding: 10px;
  }

  .staff-cert-fields {
    grid-template-columns: 1fr;
  }

  .staff-cert-field-wide {
    grid-column: span 1;
  }

  .staff-cert-editor-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .staff-form-section-head {
    flex-wrap: wrap;
  }

  .staff-form-flag {
    margin-left: 36px;
  }

  .staff-modal .modal-body {
    padding: 14px;
  }

  .staff-form-grid {
    padding: 12px;
  }

  .staff-cert-editor {
    padding: 12px 12px 0;
  }

  .staff-cert-editor-empty {
    margin: 12px 12px 0;
  }

  .staff-cert-editor-foot {
    padding: 10px 12px 13px;
  }

  .staff-page-note {
    align-items: flex-start;
  }

  .staff-files-panel {
    padding: 9px 10px 10px;
  }
}

@media (max-width: 380px) {
  .staff-stat {
    padding: 10px;
  }

  .staff-stat-note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .staff-detail-block {
    animation: none;
  }

  .staff-stat:hover {
    transform: none;
  }
}

/* ==========================================================================
   可读性保底（2026-10 视觉优化）
   --------------------------------------------------------------------------
   表格内承载信息价值的元文字统一提到 10.5px：原 8~9px 在高分屏或 100% 缩放下
   几乎无法阅读。纯装饰性元素（分割线、角标底纹）不在此列。
   ========================================================================== */
.staff-social-meta,
.staff-cert-count,
.staff-cert-warn,
.staff-expiry-badge,
.staff-social-unit span,
.staff-social-grid span {
  font-size: 10.5px;
  line-height: 1.5;
}

.staff-cert-warn {
  padding: 1px 5px;
}
