/* ============================================================
   Components · 按钮 / 表单 / 表格 / 卡片 / 徽标 / 弹层 / 步骤条
   方案 B：无边框卡片 + 胶囊控件 + 柔和投影
   ============================================================ */

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--tr-fast), border-color var(--tr-fast),
              color var(--tr-fast), box-shadow var(--tr-fast), transform var(--tr-fast);
  user-select: none;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { flex-shrink: 0; }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(109, 106, 240, .26);
}
.btn-primary:hover:not(:disabled) { background: var(--grad-primary-hover); box-shadow: 0 8px 20px rgba(109, 106, 240, .3); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 4px 10px rgba(109, 106, 240, .22); }

.btn-default {
  background: #EFF1F8;
  color: var(--c-text-2);
  border-color: transparent;
}
.btn-default:hover:not(:disabled) { background: #E6E9F4; color: var(--c-text); }

.btn-ghost { background: transparent; color: var(--c-text-2); }
.btn-ghost:hover:not(:disabled) { background: #EFF1F8; color: var(--c-primary); }

.btn-soft { background: var(--c-primary-soft); color: var(--c-primary); }
.btn-soft:hover:not(:disabled) { background: var(--c-primary-soft2); }

.btn-danger { background: var(--c-danger); color: #fff; box-shadow: 0 6px 14px rgba(240, 68, 56, .22); }
.btn-danger:hover:not(:disabled) { background: #D93A2E; }

.btn-danger-ghost { background: transparent; color: var(--c-danger); border-color: #F8CDC9; }
.btn-danger-ghost:hover:not(:disabled) { background: var(--c-danger-bg); }

.btn-sm { height: 28px; padding: 0 12px; font-size: 12.5px; border-radius: var(--r-pill); }
.btn-lg { height: 40px; padding: 0 22px; font-size: var(--fs-md); border-radius: var(--r-pill); }
.btn-block { width: 100%; }
.btn-icon { width: 34px; padding: 0; }
.btn-sm.btn-icon { width: 28px; }

/* 文字按钮 */
.link-btn {
  color: var(--c-primary);
  font-size: var(--fs-sm);
  cursor: pointer;
  background: none;
  padding: 0;
  font-weight: 600;
  transition: color var(--tr-fast);
}
.link-btn:hover { color: var(--c-primary-hover); text-decoration: underline; }
.link-btn.is-muted { color: var(--c-text-3); font-weight: 500; }

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: var(--fs-sm);
  color: var(--c-text-2);
  font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.field-label .req { color: var(--c-danger); font-size: 13px; line-height: 1; }
.field-hint { font-size: var(--fs-xs); color: var(--c-text-3); }
.field-error { font-size: var(--fs-xs); color: var(--c-danger); }

.input, .select, .textarea {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-md);
  background: #fff;
  font-size: var(--fs-base);
  color: var(--c-text);
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
  width: 100%;
}
.input::placeholder, .textarea::placeholder { color: var(--c-text-4); }
.input:hover, .select:hover, .textarea:hover { border-color: #CBD2E2; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--c-primary);
  box-shadow: var(--sh-ring);
}
.input:disabled, .select:disabled {
  background: var(--c-bg-deep);
  color: var(--c-text-3);
  cursor: not-allowed;
}
.textarea { height: auto; min-height: 78px; padding: 9px 12px; resize: vertical; line-height: 1.65; }
.select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A90A6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
}

/* 搜索框 */
.search {
  position: relative;
  display: flex;
  align-items: center;
}
.search svg {
  position: absolute;
  left: 11px;
  color: var(--c-text-3);
  pointer-events: none;
}
.search .input { padding-left: 34px; }

/* 复选框 */
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: var(--fs-base);
  user-select: none;
}
.checkbox input { display: none; }
.checkbox .box {
  width: 17px; height: 17px;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  transition: all var(--tr-fast);
  flex-shrink: 0;
}
.checkbox input:checked + .box {
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.checkbox .box::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform var(--tr-fast);
  margin-top: -2px;
}
.checkbox input:checked + .box::after { transform: rotate(-45deg) scale(1); }

/* 表单网格 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 700px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: span 1; }
}

/* 筛选栏 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--c-panel);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--sh-xs);
}
.filter-bar .input, .filter-bar .select { height: 34px; width: auto; min-width: 132px; border-radius: var(--r-pill); padding-left: 14px; }
.filter-bar .search .input { width: 230px; padding-left: 34px; border-radius: var(--r-pill); }
.filter-spacer { flex: 1; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--c-panel);
  border: none;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 4px;
  min-height: 44px;
}
.card-title {
  font-size: var(--fs-md);
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  letter-spacing: -.1px;
  color: var(--c-text);
}
.card-title .count {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-primary);
  background: var(--c-primary-soft);
  padding: 2px 9px;
  border-radius: var(--r-pill);
}
.card-sub { font-size: var(--fs-xs); color: var(--c-text-3); margin-top: 2px; }
.card-body { padding: 6px 18px 18px; }
.card-body.is-flush { padding: 0; }
.card-body.is-tight { padding: 4px 14px 14px; }
.card-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--c-border);
  background: transparent;
  font-size: var(--fs-sm);
}
.card-body.is-flush > .tbl-wrap:first-child { margin-top: 6px; }

/* ---------------- KPI 卡 ---------------- */
.kpi {
  background: var(--c-panel);
  border: none;
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--sh-md);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--tr), transform var(--tr);
  cursor: pointer;
}
.kpi:hover { box-shadow: var(--sh-lg); transform: translateY(-2px); }
/* 图标在左、标签在右：DOM 顺序是 label → icon，这里用反向排列 */
.kpi-top { display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-end; gap: 11px; }
.kpi-label { font-size: 12.5px; color: var(--c-text-2); font-weight: 500; }
.kpi-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  flex-shrink: 0;
}
.kpi-icon svg { width: 19px; height: 19px; }
.kpi-value {
  font-size: var(--fs-3xl);
  font-weight: 650;
  letter-spacing: -.8px;
  line-height: 1;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 4px;
  color: #0E1729;
}
.kpi-unit { font-size: 12.5px; font-weight: 500; color: var(--c-text-3); letter-spacing: 0; }
.kpi-foot {
  display: flex; align-items: center; gap: 6px;
  margin-top: 9px;
  font-size: var(--fs-xs);
  color: var(--c-text-3);
  /* 窄卡片下徽标与说明文字必须同排：徽标不压缩不折行，说明文字超长省略 */
  flex-wrap: nowrap;
  min-width: 0;
}
.kpi-foot > span:not(.kpi-delta) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-delta {
  display: inline-flex; align-items: center; gap: 2px;
  height: 19px; padding: 0 7px;
  border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: 600;
  flex: 0 0 auto;
  white-space: nowrap;
}
.kpi-delta.is-up { background: var(--c-success-bg); color: var(--c-success); }
.kpi-delta.is-down { background: var(--c-danger-bg); color: var(--c-danger); }
.kpi-spark { position: absolute; right: 14px; bottom: 14px; opacity: .45; }

/* ---------------- 徽标 / 状态 ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge.is-plain { background: var(--c-bg-deep); color: var(--c-text-2); }

.badge-success { background: var(--c-success-bg); color: var(--c-success); }
.badge-warning { background: var(--c-warning-bg); color: var(--c-warning); }
.badge-danger { background: var(--c-danger-bg); color: var(--c-danger); }
.badge-info { background: var(--c-primary-soft); color: var(--c-primary); }
.badge-muted { background: var(--c-bg-deep); color: var(--c-text-2); }

/* 员工状态（语义化，色 + 点 + 字 三重编码） */
.st { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; line-height: 1; white-space: nowrap; }
.st i { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.st-PENDING_ENTRY { background: var(--s-pending-entry-bg); color: var(--s-pending-entry); }
.st-PENDING_ENTRY i { background: var(--s-pending-entry); }
.st-PROBATION { background: var(--s-probation-bg); color: #B45309; }
.st-PROBATION i { background: var(--s-probation); }
.st-ACTIVE { background: var(--s-active-bg); color: var(--s-active); }
.st-ACTIVE i { background: var(--s-active); }
.st-PENDING_EXIT { background: var(--s-pending-exit-bg); color: var(--s-pending-exit); }
.st-PENDING_EXIT i { background: var(--s-pending-exit); }
.st-LEFT { background: var(--s-left-bg); color: var(--s-left); }
.st-LEFT i { background: var(--s-left); }
.st-ARCHIVED { background: var(--s-archived-bg); color: var(--s-archived); }
.st-ARCHIVED i { background: var(--s-archived); }
.st-CANCELLED { background: var(--s-cancelled-bg); color: var(--s-cancelled); }
.st-CANCELLED i { background: var(--s-cancelled); }

/* 到期倒计时徽章 */
.due { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 9px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.due-urgent { background: var(--c-danger-bg); color: var(--c-danger); }
.due-warn { background: #FFF1E6; color: #C2410C; }
.due-near { background: var(--c-warning-bg); color: #B45309; }
.due-ok { background: var(--c-success-bg); color: var(--c-success); }
.due-over { background: var(--c-danger); color: #fff; }

/* ---------------- 表格 ---------------- */
.tbl-wrap { overflow-x: auto; }
.tbl { font-size: var(--fs-base); }
.tbl thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--c-panel);
  text-align: left;
  font-weight: 600;
  font-size: var(--fs-xs);
  color: var(--c-text-3);
  letter-spacing: .02em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.tbl thead th:first-child { padding-left: 18px; }
.tbl thead th:last-child { padding-right: 18px; }
.tbl thead th.is-sortable { cursor: pointer; user-select: none; }
.tbl thead th.is-sortable:hover { color: var(--c-primary); }
.tbl thead th .sort-ind { display: inline-block; margin-left: 3px; color: var(--c-text-4); font-size: 9px; }
.tbl thead th.is-sorted .sort-ind { color: var(--c-primary); }

.tbl tbody td {
  padding: 12px;
  height: 42px;
  border-bottom: 1px solid #F1F3F9;
  color: var(--c-text);
  font-size: 13px;
  vertical-align: middle;
}
.tbl tbody td:first-child { padding-left: 18px; }
.tbl tbody td:last-child { padding-right: 18px; }
.tbl tbody tr { transition: background var(--tr-fast); }
.tbl tbody tr:hover { background: #FAFBFF; }
.tbl tbody tr.is-clickable { cursor: pointer; }
.tbl tbody tr.is-selected { background: var(--c-primary-soft); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .cell-strong { font-weight: 600; }
.tbl .cell-mono { font-family: var(--font-num); font-size: var(--fs-sm); color: var(--c-text-2); }
.tbl .cell-sub { font-size: var(--fs-xs); color: var(--c-text-3); }

/* 空态 */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 20px;
  text-align: center;
  color: var(--c-text-3);
}
.empty-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--c-primary-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-primary);
}
.empty-title { font-size: var(--fs-base); font-weight: 600; color: var(--c-text-2); }
.empty-desc { font-size: var(--fs-sm); max-width: 320px; }

/* 分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--c-border);
  font-size: var(--fs-sm);
  color: var(--c-text-3);
}
.pager-btns { display: flex; align-items: center; gap: 4px; }
.pager-btn {
  min-width: 30px; height: 30px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  border: none;
  background: transparent;
  font-size: var(--fs-sm);
  color: var(--c-text-2);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--tr-fast), color var(--tr-fast);
}
.pager-btn:hover:not(:disabled):not(.is-active) { background: #EFF1F8; }
.pager-btn.is-active { background: var(--c-primary); color: #fff; font-weight: 600; }
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------------- Tab（胶囊式） ---------------- */
.tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #EFF1F8;
  border-radius: var(--r-pill);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  color: var(--c-text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--tr-fast), background var(--tr-fast);
  font-weight: 500;
}
.tab:hover { color: var(--c-text); }
.tab.is-active {
  color: var(--c-text);
  background: #fff;
  font-weight: 600;
  box-shadow: var(--sh-xs);
}
.tab .tab-count {
  font-size: 10px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: rgba(26, 29, 43, .06);
  color: var(--c-text-3);
  font-weight: 600;
}
.tab.is-active .tab-count { background: var(--c-primary-soft); color: var(--c-primary); }

/* 分段控件 */
.segment {
  display: inline-flex;
  padding: 3px;
  background: #EFF1F8;
  border-radius: var(--r-pill);
  gap: 2px;
}
.segment-item {
  padding: 5px 14px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  color: var(--c-text-2);
  cursor: pointer;
  transition: all var(--tr-fast);
  white-space: nowrap;
}
.segment-item:hover { color: var(--c-text); }
.segment-item.is-active {
  background: #fff;
  color: var(--c-text);
  font-weight: 600;
  box-shadow: var(--sh-xs);
}

/* ---------------- 进度 ---------------- */
.bar {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--c-bg-deep);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: var(--r-pill);
  transition: width var(--tr-slow);
  background: var(--grad-primary);
}
.bar-fill.is-high { background: var(--c-full-high); }
.bar-fill.is-mid { background: var(--c-full-mid); }
.bar-fill.is-low { background: var(--c-full-low); }
/* 构成类（分布占比）用它：不按高低分档，统一品牌渐变 */
.bar-fill.is-brand { background: var(--grad-primary); }

/* ---------------- 时间轴 ---------------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--c-border);
  border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -22px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--c-border-strong);
  z-index: 1;
}
.tl-dot.is-primary { border-color: var(--c-primary); }
.tl-dot.is-success { border-color: var(--c-success); }
.tl-dot.is-warning { border-color: var(--c-warning); }
.tl-dot.is-danger { border-color: var(--c-danger); }
.tl-dot.is-muted { border-color: var(--c-text-4); }
.tl-title { font-size: var(--fs-base); font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-meta { font-size: var(--fs-xs); color: var(--c-text-3); margin-top: 2px; }
.tl-body { font-size: var(--fs-sm); color: var(--c-text-2); margin-top: 5px; }

/* ---------------- 弹层 ---------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 29, 43, .38);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 160ms ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.modal {
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  animation: modalIn 200ms cubic-bezier(.16, 1, .3, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.modal.is-wide { max-width: 780px; }
.modal.is-narrow { max-width: 420px; }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 12px;
}
.modal-title { font-size: var(--fs-lg); font-weight: 650; letter-spacing: -.2px; }
.modal-desc { font-size: var(--fs-sm); color: var(--c-text-3); margin-top: 4px; }
.modal-body { padding: 4px 22px 18px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--c-border);
  background: transparent;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.modal-foot .foot-left { margin-right: auto; }

/* 抽屉 */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(26, 29, 43, .38);
  z-index: 100;
  display: flex; justify-content: flex-end;
  animation: fadeIn 150ms ease;
}
.drawer {
  width: 100%;
  max-width: 560px;
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  animation: drawerIn 240ms cubic-bezier(.16, 1, .3, 1);
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
.drawer.is-wide { max-width: 760px; }
@keyframes drawerIn { from { transform: translateX(40px); opacity: .4 } to { transform: none; opacity: 1 } }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.drawer-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--c-border);
  display: flex; justify-content: flex-end; gap: 8px;
  flex-shrink: 0;
}

/* Toast */
.toast-wrap {
  position: fixed;
  top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: #1A1D2B;
  color: #fff;
  border-radius: var(--r-pill);
  font-size: 13px;
  box-shadow: var(--sh-lg);
  animation: toastIn 220ms cubic-bezier(.16, 1, .3, 1);
  max-width: 420px;
  pointer-events: auto;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) } to { opacity: 1; transform: none } }
.toast.is-out { animation: toastOut 180ms ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) } }
.toast-success svg { color: #4ADE80; }
.toast-error svg { color: #F87171; }
.toast-warn svg { color: #FBBF24; }
.toast-info svg { color: #A5B4FC; }

/* 下拉菜单 */
.menu {
  position: absolute;
  min-width: 200px;
  background: #fff;
  border: none;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 6px;
  z-index: 120;
  animation: modalIn 140ms ease;
}
.menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  color: var(--c-text);
  cursor: pointer;
  transition: background var(--tr-fast);
}
.menu-item:hover { background: #F5F6FC; }
.menu-item.is-active { background: var(--c-primary-soft); color: var(--c-primary); font-weight: 600; }
.menu-item.is-danger { color: var(--c-danger); }
.menu-sep { height: 1px; background: var(--c-border); margin: 6px 6px; }
.menu-label { padding: 8px 10px 5px; font-size: 10.5px; font-weight: 600; color: var(--c-text-4); letter-spacing: .08em; }

/* ---------------- 步骤条 ---------------- */
.stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding: 4px 0 2px;
  scrollbar-width: none;
}
.stepper::-webkit-scrollbar { display: none; }
.step {
  display: flex;
  align-items: flex-start;
  flex: 1;
  min-width: 104px;
  position: relative;
}
.step:last-child { flex: 0 0 auto; min-width: auto; }
.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: default;
  position: relative;
  z-index: 1;
  min-width: 0;
}
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--c-border-strong);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm);
  font-weight: 650;
  color: var(--c-text-3);
  transition: all var(--tr);
  flex-shrink: 0;
}
.step-label {
  font-size: var(--fs-xs);
  color: var(--c-text-3);
  text-align: center;
  line-height: 1.35;
  max-width: 92px;
  font-weight: 500;
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--c-border);
  margin-top: 13px;
  min-width: 12px;
  transition: background var(--tr);
}
.step:last-child .step-line { display: none; }

.step.is-done .step-dot { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.step.is-done .step-label { color: var(--c-text-2); }
.step.is-done .step-line { background: var(--c-primary-line); }
.step.is-current .step-dot {
  border-color: var(--c-primary);
  color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(91, 91, 214, .14);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(91, 91, 214, .14); }
  50% { box-shadow: 0 0 0 7px rgba(91, 91, 214, .07); }
}
.step.is-current .step-label { color: var(--c-primary); font-weight: 650; }
.step.is-blocked .step-dot { border-color: var(--c-danger); color: var(--c-danger); background: var(--c-danger-bg); }
.step.is-blocked .step-label { color: var(--c-danger); }
.step.is-clickable .step-node { cursor: pointer; }
.step.is-clickable:hover .step-dot { border-color: var(--c-primary); }
.step.is-clickable:hover .step-label { color: var(--c-primary); }

/* ---------------- 上传网格 ---------------- */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
}
.up-cell {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 11px;
  background: #fff;
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast), background var(--tr-fast);
  cursor: pointer;
  position: relative;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.up-cell:hover { border-color: var(--c-primary-line); box-shadow: var(--sh-sm); }
.up-cell.is-missing { border-style: dashed; background: var(--c-panel-2); }
.up-cell.is-done { border-color: #C7EBD9; background: #F6FDFA; }
.up-cell.is-expired { border-color: #F8CDC9; background: #FFF8F8; }
.up-cell.is-exempt { opacity: .6; }
.up-name {
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.up-name .req { color: var(--c-danger); }
.up-meta { font-size: 10.5px; color: var(--c-text-3); margin-top: auto; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.up-thumb {
  height: 34px;
  border-radius: var(--r-xs);
  background: var(--c-bg-deep);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-4);
  overflow: hidden;
}
.up-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-check {
  position: absolute; top: 8px; right: 8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--c-success);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
}
.up-cell .up-progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--c-bg-deep);
  border-radius: 0 0 var(--r-md) var(--r-md);
  overflow: hidden;
}
.up-cell .up-progress i { display: block; height: 100%; width: 0; background: var(--c-primary); transition: width 120ms linear; }

/* 拖拽区 */
.dropzone {
  border: 1.5px dashed var(--c-border-strong);
  border-radius: var(--r-md);
  padding: 22px;
  text-align: center;
  color: var(--c-text-3);
  font-size: var(--fs-sm);
  transition: all var(--tr-fast);
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-over {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  color: var(--c-primary);
}

/* ---------------- 描述列表 ---------------- */
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.dl-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #F1F3F9;
  font-size: var(--fs-base);
  align-items: flex-start;
}
.dl-item:nth-last-child(-n+2) { border-bottom: none; }
.dl-item.is-full { grid-column: 1 / -1; }
.dl-k { color: var(--c-text-3); width: 92px; flex-shrink: 0; font-size: var(--fs-sm); padding-top: 1px; }
.dl-v { color: var(--c-text); flex: 1; min-width: 0; word-break: break-all; }
.dl-v.is-masked { font-family: var(--font-num); letter-spacing: .4px; }
@media (max-width: 860px) { .dl { grid-template-columns: minmax(0, 1fr); } .dl-item:nth-last-child(-n+2) { border-bottom: 1px solid #F1F3F9; } .dl-item:last-child { border-bottom: none; } }

/* 敏感字段查看 */
.reveal-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; color: var(--c-primary);
  background: var(--c-primary-soft);
  padding: 1px 7px; border-radius: var(--r-pill);
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 500;
}
.reveal-btn:hover { background: var(--c-primary-soft2); }

/* ---------------- 提示条 ---------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--r-lg);
  font-size: var(--fs-sm);
  line-height: 1.6;
  border: none;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-title { font-weight: 600; margin-bottom: 2px; }
.alert-info { background: var(--c-primary-soft); color: #4545B8; }
.alert-warning { background: var(--c-warning-bg); color: #B45309; }
.alert-danger { background: var(--c-danger-bg); color: #B42318; }
.alert-success { background: var(--c-success-bg); color: #0B7A55; }

/* ---------------- 杂项 ---------------- */
.divider { height: 1px; background: var(--c-border); margin: 14px 0; }
.tag {
  display: inline-flex; align-items: center; gap: 3px;
  height: 20px; padding: 0 8px;
  border-radius: var(--r-pill);
  font-size: 10.5px;
  background: var(--c-bg-deep);
  color: var(--c-text-2);
  white-space: nowrap;
}
.tag-line { background: transparent; border: 1px solid var(--c-border-strong); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.kv-inline { display: inline-flex; gap: 4px; align-items: baseline; }
.skel {
  background: linear-gradient(90deg, #EFF1F7 25%, #F8F9FC 37%, #EFF1F7 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  border-radius: var(--r-xs);
}
@keyframes shimmer { from { background-position: 100% 50% } to { background-position: 0 50% } }

/* 档案树 */
.tree { font-size: var(--fs-base); user-select: none; }
.tree-node {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 9px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--c-text-2);
  transition: background var(--tr-fast), color var(--tr-fast);
  line-height: 1.35;
}
.tree-node:hover { background: #F5F6FC; color: var(--c-text); }
.tree-node.is-active { background: var(--c-primary-soft); color: var(--c-primary); font-weight: 600; }
.tree-node .caret { color: var(--c-text-4); transition: transform var(--tr-fast); flex-shrink: 0; }
.tree-node .caret.is-open { transform: rotate(90deg); }
.tree-node .tree-count {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--c-text-3);
  font-variant-numeric: tabular-nums;
}
.tree-children { padding-left: 16px; }
