/** 互动记录专属样式 */
.engagement-filters {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  align-items: flex-end;
}

.engagement-filters select {
  min-width: 140px;
}

.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-dot {
  position: absolute;
  left: -21px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--bg-page);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: background var(--transition);
}

.timeline-card:hover {
  background: var(--bg-hover);
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.timeline-time {
  font-size: 11px;
  color: var(--text-secondary);
}

.timeline-channel-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}

.timeline-type {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

.timeline-summary {
  font-size: 13px;
  color: var(--text-secondary);
}

.timeline-expand {
  font-size: 11px;
  color: var(--color-primary);
  margin-top: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.timeline-expand:hover { text-decoration: underline; }

/* 聊天输入框 */
.chat-input-area {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: var(--space-lg);
}

.chat-messages {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-message.customer {
  flex-direction: row-reverse;
  flex-direction: row;
  align-items: flex-start;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.chat-message.customer .chat-avatar {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.chat-message.agent .chat-avatar {
  background: #1f6feb;
  color: #fff;
}

.chat-bubble {
  max-width: 65%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  position: relative;
}

.chat-message.agent .chat-bubble {
  background: #1f6feb;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-message.customer .chat-bubble {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 40px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input-row textarea {
  flex: 1;
  resize: none;
  height: 60px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-size: 13px;
  font-family: inherit;
}
