/* records page styles — records-page · 催办记录表 / 转派登记表 */

/* ================= 页头 / 统计小卡 ================= */
.rec-sync { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-4); white-space: nowrap; }
.rec-scope-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px;
  border-radius: var(--r-xs); background: var(--purple-bg); border: 1px solid #D9D6FE;
  color: var(--purple); font-size: 10.5px; font-weight: 500; white-space: nowrap;
}
.rec-scope-chip .icon { color: var(--purple); }
.rec-sync .icon { color: var(--ink-4); }

.rec-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.rec-stat { position: relative; overflow: hidden; padding: 13px 16px 12px; }
.rec-stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--rec-tone, var(--brand)); }
.rec-stat.tone-blue { --rec-tone: var(--brand); }
.rec-stat.tone-green { --rec-tone: var(--green); }
.rec-stat.tone-orange { --rec-tone: var(--orange); }
.rec-stat.tone-purple { --rec-tone: var(--purple); }
.rec-stat.tone-cyan { --rec-tone: var(--cyan); }
.rec-stat.tone-red { --rec-tone: var(--red); }
.rec-stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.rec-stat-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-3); min-width: 0; }
.rec-stat-ico { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tone-blue .rec-stat-ico { color: var(--brand); background: var(--brand-50); }
.tone-green .rec-stat-ico { color: var(--green-600); background: var(--green-bg); }
.tone-orange .rec-stat-ico { color: var(--orange-600); background: var(--orange-bg); }
.tone-purple .rec-stat-ico { color: var(--purple); background: var(--purple-bg); }
.tone-cyan .rec-stat-ico { color: #0E7090; background: var(--cyan-bg); }
.tone-red .rec-stat-ico { color: var(--red-600); background: var(--red-bg); }
.rec-stat-value { display: flex; align-items: baseline; gap: 4px; margin-top: 3px; }
.rec-stat-value .num { font-size: 26px; font-weight: 650; letter-spacing: -.7px; line-height: 1.12; color: var(--ink); }
.rec-stat-unit { font-size: 12px; color: var(--ink-3); }
.rec-stat-foot { margin-top: 3px; font-size: 11px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================= 工具栏 ================= */
.table-toolbar .search-box.rec-search { width: 272px; }
.rec-toolbar-note { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-4); white-space: nowrap; }
.rec-toolbar-note .icon { color: var(--ink-4); }
.tool-btn .rec-filter-badge {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pill);
  background: var(--brand); color: #fff; font-size: 10px; font-weight: 600; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums;
}
.rec-active-filters {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 7px 14px; border-bottom: 1px solid var(--line-2); background: #FBFCFE;
  font-size: 11.5px; color: var(--ink-3);
}
.rec-active-filters .rec-active-label { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-4); }
.rec-filter-tag {
  display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 4px 0 8px;
  border-radius: var(--r-xs); background: var(--brand-50); border: 1px solid var(--brand-100);
  color: var(--brand); font-size: 11.5px; font-weight: 500;
}
.rec-filter-tag button {
  border: 0; background: none; padding: 2px; cursor: pointer; color: var(--brand);
  display: inline-flex; align-items: center; border-radius: 3px; opacity: .65;
}
.rec-filter-tag button:hover { opacity: 1; background: rgba(31, 107, 255, .1); }
.rec-active-filters .link-btn { margin-left: 2px; }

/* 筛选弹层 */
.rec-filter-pop { padding: 2px 2px 0; }
.rec-filter-pop .filter-group { padding: 4px 2px 9px; }
.rec-filter-pop .filter-group + .filter-group { padding-top: 9px; }
.rec-filter-pop .filter-chips { gap: 6px; }
.rec-filter-pop .filter-chip { height: 25px; }

/* ================= 表格单元格 ================= */
.rec-table { min-width: 960px; }
.rec-title {
  font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rec-id {
  display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: -.1px;
  color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rec-no {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rec-name-row { display: flex; align-items: center; gap: 3px; min-width: 0; margin-top: 2px; }
.rec-name-row .icon { color: var(--ink-4); flex: none; }
.rec-name { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-user { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.rec-user-name { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-channel { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.rec-channel .icon { color: var(--ink-4); flex: none; }
.rec-time { line-height: 1.35; }
.rec-time .t-main { display: block; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rec-time .t-sub { display: block; font-size: 10.5px; color: var(--ink-4); white-space: nowrap; }
.rec-reason-clamp { display: block; max-width: 100%; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-col-action { text-align: right; }
.rec-col-action .link-btn { margin-left: auto; }
.rec-transfer-from { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.rec-transfer-from .rec-user-name { color: var(--ink-2); }
.rec-transfer-to .rec-user-name { color: var(--ink); font-weight: 500; }

/* 空态 */
.rec-empty-actions { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.rec-foot-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-foot-extra { font-size: 11.5px; color: var(--ink-4); }

/* ================= 详情抽屉 ================= */
.rec-lock-banner { margin-bottom: 12px; align-items: flex-start; line-height: 1.6; }
.rec-lock-banner b { font-weight: 600; color: #1D4F9C; }
.rec-lock-banner .icon { flex: none; margin-top: 2px; }
.rec-section-note { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-4); white-space: nowrap; }
.rec-section-note .icon { color: var(--ink-4); }
.rec-quote-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.rec-quote-label { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-3); }
.rec-quote-label .icon { color: var(--ink-4); }
.rec-quote-card {
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-md) var(--r-md) 0; background: #F8FAFD; padding: 12px 14px;
}
.rec-quote {
  white-space: pre-wrap; word-break: break-word; font-size: 12.5px;
  line-height: 1.85; color: var(--ink-2);
}
.rec-kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.rec-kv-grid .kv-list { grid-template-columns: 84px minmax(0, 1fr); gap: 10px 10px; }
.rec-kv-grid .kv-list dt { white-space: nowrap; }
.rec-overdue { color: var(--red-600); font-weight: 600; }
.rec-overdue .num { color: var(--red-600); }
.rec-overdue-none { color: var(--green-600); }
.rec-progress-cell { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.rec-progress-cell .progress { flex: 1; min-width: 0; }
.rec-progress-pct { font-size: 11.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; flex: none; }
.rec-lockbox { border: 1px dashed #D5DEEA; border-radius: var(--r-md); padding: 11px 13px; background: #FBFCFE; }
.rec-lockbox-head { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-4); margin-bottom: 9px; }
.rec-lockbox-head .icon { color: var(--ink-4); }
.rec-lockbox .kv-list { grid-template-columns: 74px minmax(0, 1fr); gap: 9px 10px; }
.rec-lockbox .kv-list dd { color: var(--ink-2); }
.rec-lockbox .rec-snapshot-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.rec-task-link { display: inline-flex; align-items: center; gap: 3px; }
.rec-drawer-tip { font-size: 11.5px; color: var(--ink-4); display: inline-flex; align-items: center; gap: 4px; }
.rec-foot-note { margin-right: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-4); }
.rec-foot-note .icon { color: var(--ink-4); }
.rec-open-task[disabled] { opacity: .55; }

/* 转派关系图卡 */
.rec-chain { display: flex; align-items: stretch; gap: 10px; }
.rec-chain-person {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 13px 12px; background: #FBFCFE;
}
.rec-chain-person.is-to { border-color: var(--brand-100); background: var(--brand-gradient-soft); }
.rec-chain-role { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--ink-4); margin-bottom: 8px; }
.rec-chain-role .icon { color: var(--ink-4); }
.rec-chain-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.rec-chain-name { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-chain-dept { font-size: 11px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-chain-arrow { flex: none; width: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--brand); }
.rec-chain-arrow .rec-arrow-circle {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand-50);
  border: 1px solid var(--brand-100); display: flex; align-items: center; justify-content: center;
}
.rec-chain-arrow span { font-size: 10px; color: var(--ink-4); white-space: nowrap; }
.rec-chain-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
.rec-chain-meta .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.rec-chain-meta .meta-item .icon { color: var(--ink-4); }

/* ================= 编辑弹窗 ================= */
.rec-form { display: flex; flex-direction: column; gap: 14px; }
.rec-readonly { border: 1px dashed var(--line); border-radius: var(--r-sm); background: #F8FAFC; padding: 9px 11px; }
.rec-readonly-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); }
.rec-readonly-row + .rec-readonly-row { margin-top: 5px; }
.rec-readonly-row b { font-weight: 600; color: var(--ink-2); }
.rec-readonly-row .mono { font-size: 11px; color: var(--ink-2); }
.rec-form .field { gap: 5px; }
.rec-form .textarea { min-height: 168px; font-size: 12.5px; line-height: 1.75; }
.rec-radio-line { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rec-radio-line label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.rec-radio-line input { accent-color: var(--brand); width: 14px; height: 14px; cursor: pointer; }

/* ================= 响应式 ================= */
@media (max-width: 1180px) {
  .rec-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .rec-stats { grid-template-columns: 1fr; }
  .rec-chain { flex-direction: column; }
  .rec-chain-arrow { width: auto; flex-direction: row; padding: 2px 0; }
  .rec-chain-arrow span { display: none; }
  .rec-kv-grid { grid-template-columns: 1fr; gap: 10px 0; }
  .rec-sync { display: none; }
}
