/* ========== 侧边栏视觉升级 ========== */
.sidebar-section {
  background: #ffffff !important;
  border-radius: 12px;
  padding: 20px;
  padding-right: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.sidebar-section:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}
.sidebar-section .btn-success {
  padding: 14px 20px !important;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}
.sidebar-section .btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}
.sidebar-section .guest-auth-btn {
  width: 100%;
  min-height: 40px;
  padding: 9px 14px !important;
  border-radius: 10px;
  font-weight: 600;
}

/* ========== 历史记录样式 ========== */
.chat-history-item {
  background: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
  border: 1px solid #edf1f4;
  position: relative;
  padding: 12px 14px !important;
  margin-bottom: 10px;
}
.chat-history-item:hover {
  background: #eaf7ef !important;
  border-color: #82c99a !important;
  box-shadow: 0 4px 12px rgba(34, 160, 70, 0.16);
  transform: translateX(2px);
}
.chat-history-item.active {
  background: #deefe4 !important;
  border-color: #4fb675 !important;
  border-width: 1px;
  box-shadow: 0 6px 14px rgba(34, 160, 70, 0.18);
}
.chat-history-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: #1d9440;
  border-radius: 3px;
}
.chat-history-item .history-icon {
  color: #2ea55f;
  font-size: 15px;
  flex-shrink: 0;
}
.chat-history-item .history-title {
  font-size: 13px;
  color: #111111;
  line-height: 1.45;
  font-weight: 450;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
  white-space: nowrap !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  word-break: normal !important;
}
.chat-history-item .history-title.fw-semibold {
  font-weight: 450 !important;
}
.chat-history-item .history-time {
  font-size: 11px;
  color: #7a8792;
  margin-top: 6px;
}

/* 删除按钮：默认隐藏，悬停卡片时显示 */
.chat-history-item .history-delete-btn {
  position: absolute;
  top: auto;
  right: 8px;
  bottom: 9px;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease;
  margin: 0 !important;
  padding: 2px !important;
  line-height: 1;
}
.chat-history-item:hover .history-delete-btn,
.chat-history-item.active .history-delete-btn {
  opacity: 0.75;
  visibility: visible;
  pointer-events: auto;
}
.chat-history-item .history-delete-btn:hover {
  opacity: 1;
}

/* 历史记录列表容器 */
.chat-history-list {
  padding-right: 10px;
}

/* 历史记录列表滚动条 */
.chat-history-list::-webkit-scrollbar {
  width: 6px;
}
.chat-history-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.chat-history-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}
.chat-history-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

