/* ===== 第三屏面板（检索记录 / 工作台）通用样式 ===== */
.third-panel {
  background: #fff;
  border-left: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.third-panel.hidden {
  display: none;
}

.tp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  flex-shrink: 0;
}

.tp-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #1f1f1f;
}

.tp-count {
  font-size: 12px;
  font-weight: normal;
  color: #ff4d4f;
  background: #fff1f0;
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: 4px;
}

.tp-close {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: background 0.2s;
}

.tp-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.tp-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 18px 24px;
}

/* ===== 检索记录列表 ===== */
.tp-ref-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tp-ref-item {
  border-bottom: 1px solid #f5f5f5;
}

.tp-ref-link {
  display: flex;
  gap: 12px;
  padding: 14px 4px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.tp-ref-link:hover {
  background: #fafafa;
  margin: 0 -8px;
  padding: 14px 12px;
  border-radius: 6px;
}

.tp-ref-icon {
  width: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2px;
}

.tp-ref-body {
  flex: 1;
  min-width: 0;
}

.tp-ref-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f1f1f;
  margin-bottom: 4px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-ref-meta {
  font-size: 11px;
  color: #ff4d4f;
  background: #fff1f0;
  padding: 1px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 6px;
}

.tp-ref-snippet {
  font-size: 12px;
  color: #999;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 工作台 ===== */
.tp-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 20px;
  border-bottom: 1px dashed #f0f0f0;
  margin-bottom: 16px;
}

.tp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #999;
  flex-shrink: 0;
}

.tp-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #999;
}

.tp-step.done .tp-step-icon {
  background: #fff1f0;
  color: #ff4d4f;
}

.tp-step.active .tp-step-icon {
  background: #ff4d4f;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.15);
}

.tp-step.active {
  color: #ff4d4f;
  font-weight: 500;
}

.tp-step-line {
  flex: 1;
  height: 1px;
  background: #f0f0f0;
  margin: 0 -4px;
  margin-top: -14px;
}

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

.tp-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1f;
  margin-bottom: 10px;
}

.tp-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tp-section-row .tp-section-title {
  margin-bottom: 0;
}

.tp-section-actions {
  display: flex;
  gap: 6px;
}

.tp-btn {
  padding: 3px 12px;
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  color: #1f1f1f;
}

.tp-btn.primary {
  border-color: #ff4d4f;
  color: #ff4d4f;
}

.tp-btn:hover {
  border-color: #ff4d4f;
  color: #ff4d4f;
}

.tp-scenario-name {
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #1f1f1f;
  font-weight: 500;
}

.tp-scenario-desc {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13px;
  color: #595959;
  line-height: 1.7;
}

.tp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: auto;
}

.tp-table th,
.tp-table td {
  padding: 8px 10px;
  border: 1px solid #f0f0f0;
  text-align: left;
  color: #595959;
}

.tp-table th {
  background: #fafafa;
  font-weight: 500;
  color: #1f1f1f;
}

.tp-table tbody tr:hover {
  background: #fafafa;
}

/* ===== 消息中的"打开第三屏"插件按钮 ===== */
.msg-plugin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  font-size: 13px;
  color: #1f1f1f;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.msg-plugin:hover,
.msg-plugin.active {
  border-color: #ff4d4f;
  color: #ff4d4f;
  background: #fff5f5;
}

.msg-plugin.active {
  box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.12);
}

.msg-plugin .msg-plugin-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff1f0;
  color: #ff4d4f;
  font-size: 13px;
}

.msg-plugin .msg-plugin-count {
  color: #ff4d4f;
  font-weight: 600;
}

.msg-plugin .msg-plugin-arrow {
  color: #bfbfbf;
  font-size: 12px;
  margin-left: 2px;
}
