/* 售后管理-售后流转（2026-08-27） */
.repair-row { cursor: pointer; }
.repair-row:hover td { background: rgba(59, 130, 246, 0.06); }

.repair-chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.repair-chip.pending_assign, .repair-chip.diag { background: #fef3c7; color: #92400e; }
.repair-chip.pending_initiator_confirm, .repair-chip.pending_supervisor_audit, .repair-chip.pending_close_audit { background: #e0e7ff; color: #3730a3; }
.repair-chip.repairing { background: #dbeafe; color: #1d4ed8; }
.repair-chip.ended, .repair-chip.closed { background: #dcfce7; color: #166534; }
.repair-chip.simple { background: #f1f5f9; color: #475569; }

.repair-dialog { max-width: 680px; width: 92vw; max-height: 88vh; display: flex; flex-direction: column; }
.repair-dialog .mz-dialog-body { overflow-y: auto; }
/* 弹窗标题：与系统其他弹窗（header h3）保持一致 */
.repair-dialog .mz-dialog-title { font-size: 17px; font-weight: 700; color: #101828; margin: 0 0 12px; }
/* 弹窗底部操作条：取消在左、主操作在右，两个按钮等宽等高（与 .mz-dialog footer 同规格 96×38） */
.repair-dialog .mz-dialog-actions {
  display: flex; justify-content: flex-end; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef2f7; flex-shrink: 0;
}
.repair-dialog .mz-dialog-actions button {
  width: 96px; min-width: 96px; max-width: 96px; height: 38px; flex: 0 0 96px;
  padding: 0 16px; box-sizing: border-box;
  border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; color: #344054;
  font-family: inherit; font-size: 14px; line-height: 1; cursor: pointer; transition: background .15s, border-color .15s;
}
.repair-dialog .mz-dialog-actions button:hover { background: #f9fafb; border-color: #98a2b3; }
.repair-dialog .mz-dialog-actions button.primary { background: #347ff0; border-color: #347ff0; color: #fff; }
.repair-dialog .mz-dialog-actions button.primary:hover { background: #2b6ad4; border-color: #2b6ad4; }
/* 详情弹窗操作按钮：不占用整行（.primary 全局 width:100%） */
.repair-dialog .repair-actions .primary, .repair-dialog .upload-row button.primary { width: auto; font-size: 14px; padding: 9px 16px; }
/* 只读字段（如锁定本部门的处理部门） */
.repair-dialog .repair-form .rf-readonly { background: #f2f4f7; color: #475569; cursor: not-allowed; }
.repair-dialog .repair-form .rf-field-row { display: flex; gap: 10px; }
.repair-dialog .repair-form .rf-field-row label { flex: 1; min-width: 0; }
.repair-dialog .repair-form label { display: block; margin-bottom: 10px; font-size: 13px; color: #475569; }
.repair-dialog .repair-form input, .repair-dialog .repair-form select, .repair-dialog .repair-form textarea {
  width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; box-sizing: border-box; font-family: inherit;
}
.repair-dialog .repair-form textarea { resize: vertical; }

/* ===== 售后流转提示（2026-08-30）：待我处理 / 流转提醒 / 操作回执 ===== */
.rf-remind { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.rf-remind-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff;
  font-family: inherit; font-size: 14px; color: #344054; cursor: pointer; transition: border-color .15s, background .15s;
}
.rf-remind-item:hover { border-color: #98a2b3; background: #f9fafb; }
.rf-remind-item b { font-size: 15px; color: #101828; }
.rf-remind-item.has-unread { border-color: #fdb022; background: #fffaeb; }
.rf-remind-item.has-unread b { color: #b54708; }
.rf-remind-item.active { border-color: #347ff0; background: #eff6ff; }
.rf-remind-item.active b { color: #1d4ed8; }
.rf-remind-tip { font-size: 12px; color: #94a3b8; }

.rf-notice-panel { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.rf-notice-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.rf-notice-head h4 { margin: 0; font-size: 14px; color: #0f172a; }
.rf-notice-head span { font-size: 13px; color: #64748b; }
.rf-notice-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.rf-notice-row { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 8px; cursor: pointer; background: #fff; border: 1px solid #e2e8f0; margin-bottom: 6px; }
.rf-notice-row:hover { border-color: #98a2b3; background: #f9fafb; }
.rf-notice-row.unread { border-color: #bfdbfe; background: #f5f9ff; }
.rf-notice-dot { width: 8px; height: 8px; border-radius: 50%; background: #d0d5dd; margin-top: 6px; flex-shrink: 0; }
.rf-notice-row.unread .rf-notice-dot { background: #347ff0; }
.rf-notice-body { flex: 1; min-width: 0; }
.rf-notice-body b { font-size: 13px; color: #0f172a; margin-right: 8px; }
.rf-notice-body .muted { font-size: 12px; color: #94a3b8; }
.rf-notice-body p { margin: 4px 0 0; font-size: 13px; color: #475569; white-space: pre-wrap; word-break: break-word; }

/* 轻提示（操作回执）：右下角堆叠，不阻断操作 */
.rf-toast-box { position: fixed; right: 22px; bottom: 22px; z-index: 20000; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.rf-toast {
  max-width: 360px; padding: 10px 14px; border-radius: 8px;
  background: #101828; color: #fff; font-size: 13px; line-height: 1.5;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .18); opacity: 1; transform: translateY(0);
  transition: opacity .25s ease, transform .25s ease;
}
.rf-toast.warn { background: #b54708; }
.rf-toast.out { opacity: 0; transform: translateY(6px); }

/* ===== 发起售后单：关联产品档案 ===== */
.repair-dialog .rf-archive { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.repair-dialog .rf-archive-query { display: flex; gap: 8px; }
.repair-dialog .rf-archive-query input { flex: 1; min-width: 0; width: auto; margin-top: 0; padding: 7px 10px; font-size: 13px; }
.repair-dialog .rf-archive-query button { width: auto; min-width: 0; max-width: none; height: auto; flex: none; padding: 7px 16px; font-size: 13px; }
.repair-dialog .rf-archive-results { margin-top: 8px; max-height: 190px; overflow-y: auto; }
.repair-dialog .rf-archive-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 6px; background: #fff; }
.repair-dialog .rf-archive-info { flex: 1; min-width: 0; }
.repair-dialog .rf-archive-info b { font-size: 13px; color: #0f172a; }
.repair-dialog .rf-archive-info .muted { display: block; font-size: 12px; color: #94a3b8; }
.repair-dialog .rf-archive-linked:not(:empty) { margin-top: 8px; }
.repair-dialog .rf-archive-card { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; }
.repair-dialog .rf-archive-card-info { flex: 1; min-width: 0; }
.repair-dialog .rf-archive-card-info b { font-size: 13px; color: #1d4ed8; }
.repair-dialog .rf-archive-card-info .muted { display: block; font-size: 12px; color: #64748b; }

.repair-actions { margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.repair-info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; margin-bottom: 12px; }
.repair-info-grid div span { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 2px; }
.repair-info-grid div strong { font-size: 14px; color: #0f172a; font-weight: 600; word-break: break-all; }

.repair-block { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.repair-block .repair-block-label { font-size: 12px; color: #94a3b8; display: block; margin-bottom: 4px; }
.repair-block p { margin: 0; font-size: 14px; color: #0f172a; white-space: pre-wrap; word-break: break-word; }
.repair-block.warn { background: #fef2f2; border-color: #fecaca; }
.repair-block.warn .repair-block-label { color: #dc2626; }

.repair-dialog .upload-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.repair-dialog .upload-row input[type="file"] { flex: 1; font-size: 13px; }

/* ===== 售后配件库 / 配件清单（2026-08-27）===== */
.part-picker { border-top: 1px dashed #e2e8f0; padding-top: 10px; margin-top: 4px; }
.part-picker-query { display: flex; gap: 8px; }
.part-picker-query input { flex: 1; padding: 7px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; box-sizing: border-box; font-family: inherit; }
.part-picker-results { max-height: 190px; overflow-y: auto; margin-top: 6px; }
.part-picker-manual { margin-top: 8px; font-size: 13px; color: #475569; }
.part-picker-manual summary { cursor: pointer; color: #2563eb; user-select: none; }
.part-picker-manual-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 4px; }
.part-picker-manual-form input { flex: 1 1 130px; padding: 7px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; box-sizing: border-box; font-family: inherit; }
.part-picker-manual-form .pp-save { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #475569; width: 100%; }
.part-picker-selected { margin-top: 10px; font-size: 13px; }
.part-picker-selected > b { display: block; margin-bottom: 4px; color: #0f172a; }
.pp-selected-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; flex-wrap: wrap; }
.pp-selected-row > span { flex: none; }
.pp-selected-row .pp-selected-info { flex: 1; min-width: 0; color: #334155; }
.pp-selected-field { display: flex; align-items: center; gap: 4px; color: #475569; font-size: 12px; white-space: nowrap; }
.pp-selected-field input { width: 64px; padding: 4px 6px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 13px; font-family: inherit; box-sizing: border-box; }
.pp-selected-field input[data-pp-price-i] { width: 80px; }
.pp-subtotal { font-size: 12px; white-space: nowrap; color: #334155; }
.part-list-table tfoot td { font-weight: 600; background: #f8fafc; color: #0f172a; }
.part-list-table tfoot td:first-child { text-align: right; }
.pp-result-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 6px; background: #fff; }
.pp-result-info { flex: 1; min-width: 0; }
.pp-result-info b { font-size: 13px; color: #0f172a; }
.pp-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: #f1f5f9; flex-shrink: 0; }
.pp-thumb.empty { display: inline-block; background: #f1f5f9; }

.part-list-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13px; }
.part-list-table th, .part-list-table td { border: 1px solid #e2e8f0; padding: 6px 8px; text-align: left; color: #334155; }
.part-list-table th { background: #f8fafc; color: #475569; font-weight: 600; white-space: nowrap; }
.part-list-table .part-actions { white-space: nowrap; }
.part-used { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #f1f5f9; color: #64748b; }
.part-used.yes { background: #dcfce7; color: #166534; }
.link-button { background: none; border: none; color: #2563eb; cursor: pointer; font-size: 13px; padding: 0 2px; }
.link-button.danger { color: #dc2626; }

/* ===== 售后管理子Tab：售后工单 / 配件库（2026-08-27；2026-08-28 起统一为全局 .tabs 标准样式）===== */
.pp-upload-btn { display: inline-block; border: 1px solid #cbd5e1; border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; color: #334155; background: #f8fafc; margin-right: 4px; }
.pp-upload-btn:hover { border-color: #2563eb; color: #2563eb; }
.pp-upload-btn input { display: none; }

/* ===== 客户回访 / 客户评价（2026-08-28）===== */
.customer-record-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.customer-record-row { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 12px; }
.customer-record-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.customer-record-head strong { color: #0f172a; }
.customer-record-head .rating-stars { color: #f59e0b; letter-spacing: 1px; }
.customer-record-head .muted { margin-left: auto; }
.customer-record-row p { margin: 6px 0 0; font-size: 14px; color: #334155; white-space: pre-wrap; word-break: break-word; }
