/* 蓝色加粗文本样式 */
.bold-blue {
  color: #1890ff;
  font-weight: bold;
}

/* 通话记录样式 */
.call-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.call-item {
  background-color: var(--bg-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.call-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.call-date, .call-duration {
  font-size: 13px;
  color: var(--text-lighter);
}

.transcript {
  margin-top: 16px;
  max-height: 120px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.transcript.expanded {
  max-height: 1000px;
}

.message {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.message .time {
  font-size: 12px;
  color: var(--text-lighter);
  min-width: 40px;
}

.message .content {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.message.ai .content {
  background-color: #f0f7ff;
  color: var(--text-color);
}

.message.customer .content {
  background-color: #f5f5f5;
  color: var(--text-color);
}

.expand-btn {
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.expand-btn:hover {
  color: #40a9ff;
}

/* 基础样式 */
:root {
  --primary-color: #1890ff;
  --secondary-color: #722ed1;
  --text-color: #333;
  --text-light: #666;
  --text-lighter: #999;
  --bg-color: #fff;
  --bg-light: #f8f9fa;
  --border-color: #e8e8e8;
  --success-color: #52c41a;
  --warning-color: #faad14;
  --error-color: #f5222d;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* 处理记录时间轴样式 */
.timeline-item {
  position: relative;
  padding-left: 24px;
  margin-bottom: 16px;
}

.timeline-item:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-color);
}

.timeline-item:after {
  content: '';
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: -16px;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item:last-child:after {
  display: none;
}

.timeline-date {
  font-size: 13px;
  color: var(--text-lighter);
  margin-bottom: 4px;
}

.timeline-content {
  font-size: 14px;
  color: var(--text-color);
}

/* 弹窗样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none; /* 初始隐藏 */
  justify-content: center;
  align-items: center;
}

.modal-container {
  background-color: var(--bg-color);
  border-radius: var(--radius-md);
  width: 80%;
  max-width: 900px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--text-color);
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  padding: 12px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-light);
  position: relative;
  transition: var(--transition);
}

.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary-color);
}

.modal-content {
  padding: 24px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.info-section {
  margin-bottom: 24px;
}

.info-section h4 {
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--primary-color);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.info-item {
  display: flex;
  gap: 8px;
}

.info-item span:first-child {
  font-weight: 500;
  color: var(--text-light);
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.image-gallery img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-light);
  line-height: 1.5;
}

/* 页面容器 */
.cases-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-header p {
  color: var(--text-light);
  font-size: 16px;
}

/* 筛选区域 */
.filters-section {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.filter-group label {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
  background-color: var(--bg-color);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.search-btn {
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-btn:hover {
  background-color: #40a9ff;
}

/* 客诉卡片 */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.badge {
  background-color: var(--primary-color);
  color: white;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}

.cases-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.case-card {
  background-color: var(--bg-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.case-card:hover {
  box-shadow: var(--shadow-md);
}

.case-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.case-date {
  font-size: 13px;
  color: var(--text-lighter);
}

.case-status {
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 10px;
}

.case-status.pending {
  background-color: #fff7e6;
  color: #fa8c16;
}

.case-status.processing {
  background-color: #e6f7ff;
  color: #1890ff;
}

.case-status.resolved {
  background-color: #f6ffed;
  color: #52c41a;
}

.case-summary h3 {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 500;
}

.case-summary p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}

.case-summary p.expanded {
  -webkit-line-clamp: unset;
}

.case-actions {
  display: flex;
  gap: 12px;
}

.btn-primary, .btn-secondary {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

.btn-primary:hover {
  background-color: #40a9ff;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-light);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* 历史记录 */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history-item {
  background-color: var(--bg-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.history-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.history-date, .history-duration {
  font-size: 13px;
  color: var(--text-lighter);
}

.history-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.audio-player {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.play-btn:hover {
  background-color: #40a9ff;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background-color: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 3px;
}

.time {
  font-size: 12px;
  color: var(--text-lighter);
  min-width: 80px;
  text-align: right;
}

.transcript h3 {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 500;
}

.transcript p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.btn-text:hover {
  color: #40a9ff;
}

.btn-icon {
  padding: 6px 12px;
  background-color: transparent;
  color: var(--text-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .cases-container {
    padding: 16px;
  }
  
  .filters-section {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .search-btn {
    width: 100%;
    justify-content: center;
  }
  
  .case-actions {
    flex-direction: column;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}