/* 现代设计风格 */
:root {
  --primary-color: #4361ee;
  --primary-light: #5e7cff;
  --primary-dark: #3a56d4;
  --success-color: #2ecc71;
  --success-light: #3ee483;
  --danger-color: #ff6b6b;
  --danger-light: #ff8e8e;
  --warning-color: #f39c12;
  --secondary-color: #6c5ce7;
  --secondary-light: #8075e7;
  --text-color: #2d3436;
  --text-light: #636e72;
  --text-lighter: #b2bec3;
  --border-color: #dfe6e9;
  --border-light: #f1f3f5;
  --bg-color: #f8fafc;
  --bg-light: #ffffff;
  --bg-dark: #2c3e50;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --gradient-primary: linear-gradient(135deg, #4361ee 0%, #3b5bdb 100%);
  --gradient-success: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  --gradient-danger: linear-gradient(135deg, #ff6b6b 0%, #f05454 100%);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

/* 登录页面样式 */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.login-form {
  width: 400px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h2 {
  color: #333;
  font-weight: 600;
  margin: 10px 0;
}

.login-header .app-logo {
  font-size: 2.5em;
  color: var(--primary-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid #ddd;
  font-size: 1em;
  transition: all 0.3s ease;
}

.form-group input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(57, 108, 240, 0.2);
  outline: none;
}

.login-button {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.login-button:hover {
  background-color: #2c5cc5;
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  color: #777;
  font-size: 0.9em;
}

.change-password-link {
  color: var(--primary-color);
  cursor: pointer;
  text-decoration: underline;
}

/* 基础重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 主容器 */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  display: grid;
  grid-template-columns: minmax(250px, 280px) 1fr;
  grid-template-areas: 
    "sidebar main";
  gap: 20px;
  width: 100%;
  padding: 20px;
  height: 100vh;
}

/* 侧边栏 */
.sidebar {
  grid-area: sidebar;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  padding: 0;
}

.sidebar-header {
  padding: 15px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0; /* 防止头部被压缩 */
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.app-logo i {
  font-size: 1.5rem;
}

/* 导航菜单样式 */
.nav-menu-container {
  padding: 0 15px;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  flex-shrink: 0; /* 防止导航菜单被压缩 */
}

.nav-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
}

.nav-menu-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-menu-toggle {
  color: var(--text-light);
  transition: transform 0.3s ease;
}

.nav-menu-toggle.rotated {
  transform: rotate(180deg);
}

.nav-menu-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  padding-top: 0;
}

.nav-menu-content.expanded {
  max-height: 200px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* 紧凑导航按钮样式 */
.compact-nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: space-between;
}

.compact-nav-button {
  flex: 1 0 calc(50% - 5px);
  min-width: 0;
  text-decoration: none;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 0.8rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.compact-nav-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

.compact-nav-button i {
  font-size: 0.9rem;
}

.nav-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.nav-buttons-row:last-child {
  margin-bottom: 0;
}

/* 主内容区 */
.main-content {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

/* 标题样式 */
h2, h3, h4 {
  color: var(--text-color);
  margin-bottom: 16px;
  font-weight: 600;
}

h2 {
  font-size: 24px;
  padding-bottom: 12px;
  position: relative;
}

h2:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
}

h3 {
  font-size: 20px;
}

h4 {
  font-size: 18px;
}

/* 配置面板 */
.config-panel {
  background: var(--bg-light);
  padding: 15px;
  border-radius: 0;
  box-shadow: none;
  border-top: 1px solid var(--border-light);
  transition: var(--transition);
  flex: 1; /* 占用剩余空间 */
  overflow-y: auto; /* 允许垂直滚动 */
  display: flex;
  flex-direction: column;
}

.config-panel h3 {
  font-size: 0.9rem;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--text-color);
}

.config-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 12px 0;
}

/* 表单元素 */
.el-form-item {
  margin-bottom: 12px;
}

.el-form-item label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-color);
}

/* 性能指标面板 */
.performance-panel {
  background: var(--bg-light);
  border-radius: var(--radius-md); /* 减小圆角 */
  box-shadow: var(--shadow-sm); /* 更轻的阴影 */
  margin-bottom: 6px; /* 缩小为原来的一半 */
  overflow: hidden;
  transition: margin 0.3s ease, max-height 0.3s ease; /* 添加高度过渡效果 */
  max-height: 300px; /* 限制最大高度 */
}

/* 折叠时的样式 */
.performance-panel.collapsed {
  margin-bottom: 4px; /* 折叠时的底部边距，缩小为原来的一半 */
  max-height: 34px; /* 仅保留标题栏高度 */
}

/* 性能面板标题栏 */
.performance-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px; /* 进一步减小内边距 */
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.2s ease;
}

.performance-panel-header:hover {
  background-color: rgba(67, 97, 238, 0.05); /* 添加悬停效果 */
}

.performance-panel-header h3 {
  margin: 0;
  font-size: 0.85rem; /* 进一步减小字体大小 */
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 4px; /* 减小图标与文字间距 */
}

.panel-toggle {
  color: var(--text-light);
  transition: transform 0.3s ease;
}

.panel-toggle.rotated {
  transform: rotate(180deg);
}

/* 性能面板内容区域 - 可折叠 */
.performance-panel-body {
  display: flex;
  flex-wrap: wrap;
  padding: 8px 6px; /* 进一步减小内边距 */
  gap: 5px; /* 更小的间距 */
  transition: max-height 0.25s ease, padding 0.25s ease, opacity 0.25s ease;
  opacity: 1;
  max-height: 300px; /* 减少最大高度 */
}

.performance-panel-body.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  opacity: 0; /* 隐藏时透明 */
}

/* 性能指标项样式 */
.performance-metric {
  background: var(--bg-color);
  padding: 6px 5px; /* 大幅减小内边距 */
  border-radius: calc(var(--radius-md) - 2px); /* 减小圆角 */
  flex: 1;
  min-width: 90px; /* 进一步减小最小宽度 */
  text-align: center;
  transition: all 0.2s ease;
  border: 1px solid var(--border-light);
}

.performance-metric:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.metric-value {
  font-size: 1.1rem; /* 进一步减小字体大小 */
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 2px; /* 进一步减小底部边距 */
  line-height: 1.2; /* 减小行高 */
}

.metric-label {
  font-size: 0.75rem; /* 进一步减小字体大小 */
  color: var(--text-light);
  line-height: 1; /* 减小行高 */
}

/* 客户列表 */
.client-list {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px); /* 设置固定高度 */
  overflow-x: auto; /* 允许水平滚动 */
}

.client-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
}

.client-list-header h3 {
  margin-bottom: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-list-header .client-count {
  background: var(--primary-light);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

/* 客户列表操作按钮区域 */
.client-list-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.client-list-actions .button {
  padding: 6px 12px;
  font-size: 14px;
  min-width: auto;
}

.client-search-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 15px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0; /* 防止搜索区域被压缩 */
}

/* 表格式布局 */
.client-table {
  flex: 1;
  overflow-y: auto;
  width: 100%;
  border-collapse: collapse;
}

.client-table-header {
  display: flex;
  background-color: #f8f9fa;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1;
}

.client-table-row {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  padding: 0;
  min-height: 50px;
  align-items: center;
  transition: var(--transition);
}

.client-table-row:hover {
  background-color: #f8f9ff;
}

.client-table-row.today {
  background-color: rgba(245, 148, 148, 0.2);
  border-left: 4px solid var(--primary-color);
}

.client-table-cell {
  padding: 0 10px;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000000;
}

.client-index {
  width: 5%;
  min-width: 40px;
  justify-content: center;
  font-weight: 1000;
  color: #000000; /* 黑色 */
  font-size: 16px;
}

.client-name-cell {
  width: 10%;
  min-width: 80px;
  color: #000000; /* 黑色 */
  font-weight: 1000;
  font-size: 16px;
}

.client-name-cell i.fa-user {
  margin-right: 5px;
}

.client-phone-cell {
  width: 15%;
  min-width: 130px;
  font-family: monospace;
  font-weight: 1000;
  color: #000000; /* 黑色 */
  font-size: 16px;
}

.client-phone-cell i {
  margin-right: 5px;
  color: var(--success-color);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
}

.client-phone-cell i:hover {
  background-color: var(--success-light);
  color: white;
  transform: scale(1.2);
}

.client-phone-cell span {
  text-decoration: underline; /* 添加下划线 */
  color: #0066cc; /* 链接蓝色 */
  cursor: pointer; /* 鼠标指针变为手型 */
  transition: all 0.2s;
}

.client-phone-cell span:hover {
  color: #0056b3; /* 鼠标悬停时变色 */
}

.client-major-cell {
  width: 25%;
  min-width: 300px;
  color: #000000; /* 黑色 */
  font-weight: 1000;
  font-size: 16px;
}

.client-intent-cell {
  width: 12%;
  min-width: 100px;
}

.client-remark-cell {
  width: 15%;
  min-width: 150px;
  color: #000000; /* 黑色 */
  font-weight: 1000;
  font-size: 16px;
}

.client-time-cell {
  width: 12%;
  min-width: 100px;
  justify-content: flex-end;
  color: #000000; /* 黑色 */
  text-align: right;
  font-weight: 1000;
  font-size: 16px;
}

.intent-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  color: white;
  background: var(--secondary-color);
}

/* 复制按钮样式 */
.copy-btn {
  cursor: pointer;
  margin-left: 5px;
  color: #666;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
}

.copy-btn:hover {
  background-color: #e0e0e0;
  color: #333;
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .client-table-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    min-height: auto;
  }
  
  .client-table-cell {
    width: 100% !important;
    min-width: 0 !important;
    padding: 4px 0;
  }
}

@media (max-width: 992px) {
  .client-cards {
    padding-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .client-card {
    padding: 8px 10px;
    height: auto;
    min-height: 40px;
    flex-wrap: wrap;
  }
  
  .client-name, .client-phone, .client-major, .client-intent, .client-remark, .client-follow-time {
    width: 100%;
    min-width: 0;
    margin-bottom: 4px;
  }
}

/* 按钮系统 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background-color: var(--bg-light);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  min-width: 80px;
  outline: none;
  position: relative;
  overflow: hidden;
}

.button:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.button:focus:not(:active)::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

.button-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.button-primary:hover {
  background: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.button-success {
  background: var(--success-color);
  color: white;
}

.button-success:hover {
  background: var(--success-light);
}

.button-danger {
  background: var(--danger-color);
  color: white;
}

.button-danger:hover {
  background: var(--danger-light);
}

.dial-button {
  background: var(--success-color);
  color: white;
  min-width: 100px;
}

.dial-button:hover {
  background: var(--success-light);
}

.detail-button {
  background: var(--primary-color);
  color: white;
  min-width: 100px;
}

.detail-button:hover {
  background: var(--primary-light);
}

/* 表单元素 */
input, textarea, select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: var(--bg-light);
  color: var(--text-color);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* 筛选控件 */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  background: #f8f9ff;
  padding: 16px;
  border-radius: var(--radius-md);
}

.radio-item, .checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

/* 功能按钮组 */
.function-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.function-btns .button {
  flex: 1;
}

/* 模态框 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  backdrop-filter: blur(4px);
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 24px;
  width: 90%;
  height: 90vh; /* 固定高度为视窗高度的90% */
  max-width: 1200px;
  animation: modalEnter 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-lg);
  overflow-x: hidden;
  overflow-y: hidden; /* 禁止整个模态框滚动 */
  display: flex;
  flex-direction: column;
}

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

.modal-header {
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 15px;
  position: relative;
  flex-shrink: 0; /* 防止头部被压缩 */
}

.modal-header h3 {
  font-size: 24px;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.modal-header h4 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 0;
}

.modal-body {
  flex: 1;
  overflow: hidden; /* 防止溢出 */
  display: flex;
  flex-direction: column;
}

.client-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  height: 100%; /* 使用全部可用高度 */
  overflow: hidden; /* 防止溢出 */
}

.client-info-section {
  padding: 15px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  overflow-y: auto; /* 如果信息太多，允许滚动 */
}

.client-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.client-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.client-info p i {
  color: var(--primary-color);
}

.client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.client-actions button {
  flex: 1;
  min-width: 110px;
}

.input-section {
  background: #f8fafc;
  padding: 15px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.input-section-header {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.intent-select {
  width: 100%;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.input-section textarea {
  flex: 1;
  min-height: 80px;
  resize: none;
}

.input-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-shrink: 0;
}

.followup-section {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  height: calc(100% - 20px);
  max-height: 50vh; /* 增加最大高度 */
  overflow: hidden;
}

.followup-records {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.followup-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.followup-header-row h4 {
  margin-bottom: 0;
}

.followup-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
  margin-top: 5px;
}

.followup-item {
  background: #f8f9ff;
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative; /* 用于相对定位内部元素 */
}

.followup-item:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}

/* 正在播放时的高亮效果 */
.followup-item.playing {
  background: rgba(67, 97, 238, 0.05);
  border-left: 3px solid var(--primary-color);
  box-shadow: 0 2px 12px rgba(67, 97, 238, 0.1);
}

.followup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-light);
  gap: 10px; /* 增加元素间距 */
}

.followup-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.followup-record {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto; /* 推到右侧 */
}

.followup-index {
  font-weight: bold;
  color: var(--primary-color);
  min-width: 30px;
}

.followup-time {
  font-family: monospace;
  background: rgba(0,0,0,0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.followup-person {
  background: var(--primary-color);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.followup-content {
  line-height: 1.6;
  white-space: pre-wrap;
  background: white;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  font-size: 14px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-height: none; /* 移除最大高度限制，显示全部内容 */
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0; /* 防止底部操作区被压缩 */
}

.modal-inner-content {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 状态日志 */
.status-log {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background-color: var(--bg-color);
  margin-top: 12px;
  max-height: 300px; /* 减小最大高度 */
  overflow-y: auto;
  margin-bottom: 10px; /* 添加底部边距，防止贴近底部 */
}

.status-log h4 {
  padding: 6px 10px;
  margin-bottom: 0;
  background-color: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
  font-weight: 600;
}

.log-item {
  padding: 5px 10px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-color);
  word-break: break-word;
}

.log-item:last-child {
  border-bottom: none;
}

/* 加载状态 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.loading-content {
  background: white;
  padding: 30px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 500;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 15px;
  color: var(--text-lighter);
  font-size: 0.85rem;
}

.empty-state i {
  font-size: 1.5rem;
  margin-bottom: 8px;
  opacity: 0.5;
}

.empty-state p {
  margin: 0;
}

/* 状态日志自定义滚动条 */
.status-log::-webkit-scrollbar {
  width: 6px;
}

.status-log::-webkit-scrollbar-track {
  background: var(--bg-light);
}

.status-log::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 3px;
}

.status-log::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-lighter);
}

/* 响应式设计 */
@media (max-width: 992px) {
  .container {
    grid-template-columns: 1fr;
    grid-template-areas: 
      "sidebar"
      "main";
  }
  
  .sidebar {
    position: relative;
    top: 0;
    max-height: initial;
  }

  .client-detail-layout {
    grid-template-columns: 1fr;
    gap: 15px;
    height: auto;
    max-height: calc(90vh - 140px); /* 减去头部和底部的高度 */
    overflow-y: auto;
  }
  
  .followup-section {
    max-height: none;
    height: auto;
  }
  
  .modal-content {
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    padding: 15px;
  }
  
  .followup-content {
    padding: 10px 8px;
    max-height: 200px;
  }

  .client-list {
    height: auto;
    max-height: calc(100vh - 100px);
  }
  
  .client-cards {
    grid-template-columns: repeat(2, 1fr);
    padding-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .config-panel {
    padding: 16px;
  }
  
  .performance-panel {
    margin-bottom: 4px; /* 减小为原来的一半 */
  }
  
  .performance-panel.collapsed {
    margin-bottom: 2px; /* 减小为原来的一半 */
    max-height: 30px; /* 更小的折叠高度 */
  }

  .client-card {
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .client-name, .client-phone, .client-major, .client-intent {
    width: 100%;
  }

  .performance-metric {
    padding: 4px;
    min-width: 70px;
    margin: 2px;
  }
  
  .metric-value {
    font-size: 1rem;
    margin-bottom: 1px;
  }
  
  .metric-label {
    font-size: 0.7rem;
  }
  
  .performance-panel-body {
    padding: 5px 3px;
    gap: 3px;
  }
  
  .performance-panel-header {
    padding: 4px 8px;
  }
  
  .performance-panel-header h3 {
    font-size: 0.8rem;
  }

  .button {
    width: 100%;
  }

  .function-btns {
    flex-direction: column;
  }

  .modal-content {
    max-width: 95%;
    padding: 20px 15px;
  }

  .modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .modal-actions > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .client-detail-layout {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .followup-content {
    padding: 10px;
  }

  .client-cards {
    grid-template-columns: 1fr; /* 在移动设备上更改为单列显示 */
  }

  .inline-audio-player {
    width: 100%;
    max-width: 100%;
  }
  
  .followup-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .followup-info {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .followup-record {
    margin-left: 0;
    width: 100%;
  }
}

/* 添加客户列表的搜索和筛选栏 */
.client-search {
  flex: 1;
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-search input {
  height: 40px;
  padding: 8px 12px;
}

.tag-filter {
  flex: 1;
  min-width: 200px;
}

.tag-filter select {
  height: 40px;
  padding: 8px 12px;
}

.followup-record {
  margin-left: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.audio-play-btn {
  background: var(--warning-color);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.audio-play-btn:hover {
  background: #f5b041;
  transform: scale(1.05);
}

.inline-audio-player {
  height: 30px;
  /* width: 220px; 减小宽度以适应一行 */
  vertical-align: middle;
}

.audio-status {
  font-size: 11px; /* 减小字体 */
  background-color: var(--primary-color);
  color: white;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

/* 增强音频播放器样式 */
audio::-webkit-media-controls-panel {
  background-color: #f0f5ff;
}

audio::-webkit-media-controls-play-button {
  transform: scale(1.2);
}

audio::-webkit-media-controls-timeline {
  margin-left: 5px;
  margin-right: 5px;
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
  font-size: 13px;
  font-weight: bold;
  color: var(--primary-color);
}

/* 额外的音频控件兼容性样式 */
audio {
  border-radius: 20px;
  outline: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

audio:hover, audio:focus {
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.15);
}

/* Cookie输入区域样式优化 */
.cookie-input-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px;
  background-color: var(--bg-color);
  transition: all 0.2s;
}

.cookie-input-container:hover {
  box-shadow: var(--shadow-md);
}

.name-input-group {
  display: flex;
  gap: 8px;
  width: 100%;
}

.name-input-field {
  position: relative;
  flex: 1;
}

.name-input-field i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.name-input-field input {
  padding-left: 30px;
}

.name-input-group button {
  white-space: nowrap;
  padding: 8px 10px;
  font-size: 0.8rem;
}

/* 快捷标记按钮 */
.quick-tag-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.button-tag {
  flex: 1;
  color: white;
}

.button-tag-green {
  background-color: #4caf50;
}

.button-tag-red {
  background-color: #f44336;
}

.button-tag-blue {
  background-color: #2196f3;
}

.button-tag-purple {
  background-color: #9c27b0;
}

.button-tag-orange {
  background-color: #ff9800;
}

.button-tag-teal {
  background-color: #009688;
}

/* 弹窗底部按钮区域 */
.modal-buttons {
  margin-top: 16px;
  text-align: right;
}

.modal-buttons .button {
  margin-left: 8px;
}

/* 复选框样式 */
.client-checkbox-cell {
  width: 40px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-checkbox-cell input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.selected-actions {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  align-items: center;
}

.selected-count {
  font-weight: 600;
  color: var(--primary-color);
  margin-right: auto;
}

/* 按钮组 */
.button-group {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.button-group .button {
  flex: 1;
  white-space: nowrap;
}

/* 过滤选项组 */
.filter-group .radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.radio-item, .checkbox-item {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  gap: 5px;
  cursor: pointer;
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;
  margin-right: 0;
}

/* 自动外呼控制面板样式 */
.ZiDongWaiHu-KongZhiMianBan {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.ZiDongWaiHu-KongZhiMianBan h4 {
  color: var(--text-color);
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ZiDongWaiHu-KongZhiMianBan h4 i {
  color: var(--primary-color);
}

/* 自动外呼进度条 */
.ZiDongWaiHu-JinDu {
  margin-top: 15px;
}

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

.JinDu-HangYi {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.JinDu-HangEr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.JinDu-BaiFenBi {
  font-weight: 600;
  color: var(--primary-color);
}

.DangQian-WenBen {
  color: var(--success-color);
  font-weight: 500;
}

.JinDu-Tiao {
  width: 100%;
  height: 8px;
  background-color: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.JinDu-TiaoNeiRong {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* 自动外呼状态 */
.ZiDongWaiHu-ZhuangTai {
  margin-top: 15px;
}

.ZhuangTai-XinXi {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.ShengYu-ShiJian {
  font-size: 12px;
  color: var(--text-muted);
  background-color: var(--bg-light);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.ZhuangTai-AnNiu {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.ZhuangTai-WenBen {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.ZhuangTai-WenBen.waiting {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.ZhuangTai-WenBen.running {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #74c0fc;
  animation: pulse 2s infinite;
}

.ZhuangTai-WenBen.paused {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.ZhuangTai-WenBen.completed {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* 小按钮样式 */
.button-small {
  padding: 4px 8px;
  font-size: 12px;
  min-width: auto;
  height: auto;
}

.button-small i {
  font-size: 10px;
  margin-right: 4px;
}

/* 自动外呼控制面板内的表单项样式调整 */
.ZiDongWaiHu-KongZhiMianBan .el-form-item {
  margin-bottom: 12px;
}

.ZiDongWaiHu-KongZhiMianBan .filter-label {
  font-size: 14px;
  margin-bottom: 8px;
}

.ZiDongWaiHu-KongZhiMianBan .radio-group {
  gap: 15px;
}

.ZiDongWaiHu-KongZhiMianBan .radio-item {
  font-size: 14px;
}

.ZiDongWaiHu-KongZhiMianBan .checkbox-item {
  font-size: 14px;
}

.ZiDongWaiHu-KongZhiMianBan input[type="number"] {
  padding: 8px 10px;
  font-size: 14px;
}

/* 手机输入框 */
.phone-input {
  padding-left: 30px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="16" height="16"><path fill="%236c757d" d="M493.4 24.6l-104-24c-11.3-2.6-22.9 3.3-27.5 13.9l-48 112c-4.2 9.8-1.4 21.3 6.9 28l60.6 49.6c-36 76.7-98.9 140.5-177.2 177.2l-49.6-60.6c-6.8-8.3-18.2-11.1-28-6.9l-112 48C3.9 366.5-2 378.1.6 389.4l24 104C27.1 504.2 36.7 512 48 512c256.1 0 464-207.5 464-464 0-11.2-7.7-20.9-18.6-23.4z"/></svg>');
  background-repeat: no-repeat;
  background-position: 8px center;
}