/* 登录页面样式 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.5s ease-out;
}

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

.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-title {
  font-size: 28px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: #666;
}

.login-form {
  margin-top: 32px;
}

.login-form .ant-form-item {
  margin-bottom: 24px;
}

.login-form .ant-input-affix-wrapper {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #e8e8e8;
  font-size: 15px;
  transition: all 0.3s ease;
}

.login-form .ant-input-affix-wrapper:hover {
  border-color: var(--primary-color-start);
}

.login-form .ant-input-affix-wrapper-focused,
.login-form .ant-input-affix-wrapper:focus {
  border-color: var(--primary-color-start);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.login-form .ant-input-prefix {
  margin-right: 12px;
  color: #999;
}

.login-form .ant-input {
  font-size: 15px;
}

.login-button {
  width: 100%;
  height: 50px;
  background: var(--primary-gradient);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--primary-shadow);
}

.login-button:active {
  transform: translateY(0);
}

.login-button:disabled {
  background: #d9d9d9;
  transform: none;
  box-shadow: none;
}

.login-footer {
  margin-top: 32px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-footer-text {
  font-size: 14px;
  color: #999; 
}

.login-footer-logo {
  max-width: 75px;
  height: auto;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.login-footer-logo:hover {
  opacity: 0.8;
}

.login-error {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  color: #ff4d4f;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* 响应式 */
@media (max-width: 480px) {
  .login-box {
    padding: 36px 24px;
  }

  .login-title {
    font-size: 24px;
  }

  .login-logo {
    width: 60px;
    height: 60px;
    font-size: 30px;
  }
}/* 首页/AI 问答页面样式 */
.home-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f5f7fa;
  position: relative;
  height: 100%;
}

/* 聊天对话区域 - 占据所有可用空间，内容可滚动 */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.chat-container.has-messages {
  /* 有消息时保持正常布局 */
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px;
  /* 自定义滚动条 */
  scrollbar-width: thin;
  scrollbar-color: #d9d9d9 transparent;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #d9d9d9;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #bfbfbf;
}

/* 空状态欢迎内容 */
.chat-messages-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* 首页输入框区域 - 固定在底部 */
.home-input-section {
  flex-shrink: 0;
  padding: 16px 20px;
  /* background: #ffffff; */
  /* border-top: 1px solid #e8e8e8; */
  /* box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05); */
}

.welcome-input-header {
  text-align: center;
  margin-bottom: 24px;
  animation: fadeIn 0.5s ease-out;
}

.welcome-input-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  object-fit: contain;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.welcome-input-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 12px;
}

.welcome-input-subtitle {
  font-size: 15px;
  color: #666;
  max-width: 500px;
  margin: 0 auto;
}

.home-input-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.home-input-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f5f7fa;
  border: 2px solid #e8e8e8;
  border-radius: 16px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.home-input-box.focused {
  border: none;
  background: #ffffff;
  position: relative;
  background-clip: padding-box;
}

/* 使用伪元素实现渐变边框 */
.home-input-wrapper .home-input-box.focused::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: var(--primary-gradient);
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.home-input-wrapper .home-input-box.focused {
  box-shadow: 0 4px 20px var(--primary-shadow-light);
}

.home-textarea {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  resize: none;
  min-height: 24px;
  max-height: 200px;
  font-family: inherit;
}

.home-textarea::placeholder {
  color: #999;
}

.home-input-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.home-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

.home-action-btn:hover {
  background: #e8e8e8;
  color: var(--primary-color-start);
}

.home-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: var(--primary-gradient);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
}

.home-send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 8px 24px var(--primary-shadow);
}

.home-send-btn:disabled {
  background: #d9d9d9;
  cursor: not-allowed;
}

.home-input-hint {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-top: 12px;
}

.home-input-hint-text {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

.home-input-hint.disabled {
  color: #ff9800;
}

.home-input-box.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.home-textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.home-action-btn:disabled,
.home-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 未登录提示 */
.not-logged-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  border-radius: 10px;
  margin-bottom: 16px;
  color: #d46b08;
  font-size: 14px;
  animation: fadeIn 0.3s ease-out;
}

.not-logged-notice-icon {
  font-size: 18px;
}

/* 消息气泡 */
.chat-message {
  display: flex;
  gap: 16px;
  animation: fadeIn 0.3s ease-out;
  /* 确保消息容器宽度固定 */
  width: 100%;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
  /* 固定头像位置 */
  flex: 0 0 40px;
  overflow: hidden;
}

.chat-message.ai .chat-message-avatar {
  /* background: var(--primary-gradient); */
  color: #ffffff;
  padding: 0;
  overflow: hidden;
}

.ai-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-message.user .chat-message-avatar {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: #ffffff;
}

.chat-message-content {
  /* 固定宽度为 70% */
  width: 900px;
  min-width: 70%;
  max-width: 70%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-message.user .chat-message-content {
  align-items: flex-end;
}

.chat-message-bubble {
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.6;
  word-break: break-word;
  /* 气泡宽度自适应内容 */
  width: fit-content;
  max-width: 100%;
}

.chat-message.ai .chat-message-bubble {
  background: #ffffff;
  color: #333;
  border: 1px solid #e8e8e8;
  border-top-left-radius: 4px;
}

.chat-message.user .chat-message-bubble {
  background: var(--primary-gradient);
  color: #ffffff;
  border-top-right-radius: 4px;
}

.chat-message-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: #999;
}

.chat-message-tokens {
  background: #f5f5f5;
  padding: 4px 8px;
  border-radius: 4px;
}

/* 引用来源 */
.chat-message-references {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.reference-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f5f7fa;
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.reference-tag:hover {
  background: var(--primary-color-start);
  color: #ffffff;
  border-color: var(--primary-color-start);
}

/* 加载更多消息提示 */
.load-more-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  color: #999;
  font-size: 14px;
}

.no-more-messages {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #bbb;
  font-size: 13px;
  text-align: center;
}

/* 打字机效果 */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999;
  animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* AI 响应等待中的 loading 状态 */
.loading-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid var(--primary-light-2);
  border-top-color: var(--primary-color-start);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-indicator span {
  color: #666;
  font-size: 14px;
}

/* 文件附件 */
.message-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.message-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--primary-light);
  border-radius: 8px;
  font-size: 13px;
  color: var(--primary-color-start);
  cursor: pointer;
  transition: all 0.3s ease;
}

.message-file:hover {
  background: var(--primary-light-2);
}

.message-file-icon {
  font-size: 16px;
}

/* 聊天消息中的文件展示区域 */
.chat-message-files {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.chat-message-bubble.user .chat-message-files {
  border-top-color: rgba(255, 255, 255, 0.2);
}

/* 文件图片展示 */
.message-file-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* 固定宽高，防止内容跳动 */
  width: 300px;
  height: 200px;
  background: #f0f0f0;
}

.message-file-image:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.message-file-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* 文件卡片展示 */
.message-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f5f7fa;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.message-file-card:hover {
  background: #e8e8e8;
  border-color: var(--primary-color-start);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-shadow-light);
}

.message-file-card .message-file-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.message-file-card .message-file-name {
  font-size: 13px;
  color: #333;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 响应式 */
@media (max-width: 768px) {
  .home-input-section.centered {
    width: 95%;
    padding: 30px 15px;
  }

  .welcome-input-title {
    font-size: 24px;
  }

  .chat-message-content {
    max-width: 85%;
  }

  .home-input-box {
    padding: 10px 12px;
  }
}/* 个人中心页面样式 */
.profile-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: #f5f7fa;
}

.profile-content {
  max-width: 900px;
  margin: 0 auto;
}

.profile-header {
  margin-bottom: 24px;
}

.profile-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.profile-subtitle {
  font-size: 14px;
  color: #666;
}

/* 个人信息卡片 */
.profile-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e8e8;
}

.profile-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-card-icon {
  font-size: 22px;
}

.edit-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--primary-color-start);
  background: transparent;
  color: var(--primary-color-start);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.edit-btn:hover {
  background: var(--primary-color-start);
  color: #ffffff;
}

/* 用户信息展示 */
.profile-info {
  display: flex;
  gap: 32px;
  align-items: center;
}

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 5px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 40px;
  font-weight: 600;
  box-shadow: 0 8px 24px var(--primary-shadow);
  overflow: hidden;
}

.avatar-upload-btn {
  font-size: 13px;
  color: var(--primary-color-start);
  cursor: pointer;
  transition: color 0.3s ease;
}

.avatar-upload-btn:hover {
  color: var(--primary-color-end);
}

.profile-details {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.profile-detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-detail-label {
  font-size: 13px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-detail-value {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.profile-detail-value.highlight {
  color: var(--primary-color-start);
}

/* 表单样式 */
.profile-form {
  display: grid;
  gap: 20px;
}

.profile-form-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-item-label {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.form-item-input {
  padding: 12px 16px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.form-item-input:focus {
  outline: none;
  border-color: var(--primary-color-start);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-item-input::placeholder {
  color: #999;
}

/* 修改密码 */
.password-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e8e8e8;
}

.password-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 20px;
}

/* 使用统计 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.stat-card {
  background: var(--primary-gradient);
  border-radius: 14px;
  padding: 24px;
  color: #ffffff;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-card.secondary {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card.tertiary {
  background: linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%);
}

.stat-card.quaternary {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #333;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  opacity: 0.9;
}

/* 保存按钮 */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e8e8e8;
}

.save-btn {
  padding: 12px 32px;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-shadow);
}

.cancel-btn {
  padding: 12px 32px;
  background: #f5f5f5;
  color: #666;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-btn:hover {
  background: #e8e8e8;
}

/* 响应式 */
@media (max-width: 768px) {
  .profile-container {
    padding: 16px;
  }

  .profile-card {
    padding: 20px;
  }

  .profile-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-details {
    grid-template-columns: 1fr;
  }

  .profile-form-group {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}/* 文件管理页面样式 */
.files-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: #f5f7fa;
}

.files-content {
  max-width: 1200px;
  margin: 0 auto;
}


 
.files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.files-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
}

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

.upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-shadow);
}

.upload-btn.batch {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* 上传区域 */
.upload-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.upload-area {
  border: 2px dashed #d9d9d9;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: var(--primary-color-start);
  background: var(--primary-light);
}

.upload-area.dragover {
  border-color: var(--primary-color-start);
  background: var(--primary-light-2);
}

.upload-icon {
  font-size: 48px;
  color: var(--primary-color-start);
  margin-bottom: 16px;
}

.upload-text {
  font-size: 16px;
  color: #333;
  margin-bottom: 8px;
}

.upload-hint {
  font-size: 13px;
  color: #999;
}

.upload-progress {
  margin-top: 20px;
}

.progress-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f5f7fa;
  border-radius: 8px;
  margin-bottom: 8px;
}

.progress-info {
  flex: 1;
}

.progress-filename {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.progress-bar {
  height: 6px;
  background: #e8e8e8;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

.progress-status {
  font-size: 12px;
  color: #999;
  width: 50px;
  text-align: right;
}

.progress-status.success {
  color: #52c41a;
}

.progress-status.error {
  color: #ff4d4f;
}

/* 文件列表 */
.files-section {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.files-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e8e8e8;
}

.files-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
}

.files-filter {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  background: #ffffff;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.filter-btn.active {
  background: var(--primary-color-start);
  border-color: var(--primary-color-start);
  color: #ffffff;
}

/* 文件表格 */
.files-table {
  width: 100%;
  border-collapse: collapse;
}

.files-table th,
.files-table td {
  padding: 16px 24px;
  text-align: left;
}

.files-table th {
  background: #fafafa;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e8e8e8;
}

.files-table td {
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
  color: #333;
}

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

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.file-icon.pdf {
  background: #fff2f0;
  color: #ff4d4f;
}

.file-icon.doc {
  background: #f0f5ff;
  color: #1890ff;
}

.file-icon.xls {
  background: #f6ffed;
  color: #52c41a;
}

.file-icon.img {
  background: #fff7e6;
  color: #fa8c16;
}

.file-icon.file {
  background: #f5f5f5;
  color: #666;
}

.file-name {
  font-weight: 500;
  color: #333;
}

.file-size {
  color: #999;
  font-size: 13px;
}

.file-date {
  color: #999;
  font-size: 13px;
}

.file-actions {
  display: flex;
  gap: 8px;
}

.file-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.3s ease;
}

.file-action-btn:hover {
  background: #f5f5f5;
}

.file-action-btn.preview {
  color: #1890ff;
}

.file-action-btn.preview:hover {
  background: #e6f7ff;
}

.file-action-btn.download {
  color: #52c41a;
}

.file-action-btn.download:hover {
  background: #f6ffed;
}

.file-action-btn.delete {
  color: #ff4d4f;
}

.file-action-btn.delete:hover {
  background: #fff2f0;
}

/* 空状态 */
.empty-state {
  padding: 80px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 64px;
  color: #d9d9d9;
  margin-bottom: 20px;
}

.empty-text {
  font-size: 16px;
  color: #999;
  margin-bottom: 24px;
}

/* 文件预览模态框 */
.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
}

.preview-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.preview-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f5f5f5;
  color: #666;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.preview-close:hover {
  background: #ff4d4f;
  color: #ffffff;
}

.preview-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
}

.preview-content iframe,
.preview-content embed,
.preview-content object {
  width: 100%;
  height: 100%;
  border: none;
}

.preview-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* 响应式 */
@media (max-width: 768px) {
  .files-container {
    padding: 16px;
  }

  .files-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .files-actions {
    width: 100%;
  }

  .upload-btn {
    flex: 1;
    justify-content: center;
  }

  .files-table {
    font-size: 13px;
  }

  .files-table th,
  .files-table td {
    padding: 12px 16px;
  }

  .file-actions {
    flex-direction: column;
    gap: 4px;
  }
}/* QE Form 样式 */

/* 子模块样式 */
.qe-form-subsection {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: #f9fafb;
  border-radius: 8px;
  border: 1px solid #ebeef5;
}

.qe-form-subsection-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #409eff;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e4e7ed;
}

/* 动态表格样式 */
.qe-form-dynamic-table {
  margin-top: 0.5rem;
}

.qe-form-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  border: 1px solid #ebeef5;
  border-radius: 6px;
  overflow: hidden;
}

.qe-form-table th,
.qe-form-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid #ebeef5;
}

.qe-form-table th {
  background-color: #f5f7fa;
  color: #606266;
  font-weight: 600;
  font-size: 0.8125rem;
}

.qe-form-table td:last-child {
  text-align: center;
}

.qe-form-table-select,
.qe-form-table-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-size: 0.8125rem;
  background-color: #ffffff;
}

.qe-form-table-select:focus,
.qe-form-table-input:focus {
  outline: none;
  border-color: #409eff;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

.qe-form-btn-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

.qe-form-btn-danger {
  background-color: #f56c6c;
  color: #ffffff;
  border: none;
}

.qe-form-btn-danger:hover:not(:disabled) {
  background-color: #f78989;
}

.qe-form-btn-secondary {
  background-color: #909399;
  color: #ffffff;
  border: none;
}

.qe-form-btn-secondary:hover:not(:disabled) {
  background-color: #a6a9b0;
}

.qe-form-input-readonly {
  padding: 0.625rem 0.875rem;
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #909399;
  background-color: #f5f7fa;
}

/* QE Form 样式 */

.qe-form-page {
  min-height: 100vh;
  background-color: #f5f7fa;
  padding: 2rem;
  overflow-y: auto;
}

.qe-form-container {
  max-width: 900px;
  margin: 0 auto;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.qe-form-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e4e7ed;
}

.qe-form-page-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #303133;
  margin: 0 0 0.5rem 0;
}

.qe-form-sign-info {
  color: #909399;
  font-size: 0.875rem;
  margin: 0;
}

/* Section 容器 */
.qe-form-section {
  padding: 1rem 0;
}

.qe-form-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #409eff;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #ebeef5;
}

.qe-form-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: #606266;
  margin: 1.5rem 0 1rem 0;
}

/* 表单样式 */
.qe-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.qe-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.qe-form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #606266;
}

.qe-form-group input[type="text"],
.qe-form-group input[type="email"],
.qe-form-group input[type="date"],
.qe-form-group input[type="month"],
.qe-form-group textarea,
.qe-form-group select {
  padding: 0.625rem 0.875rem;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #606266;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #ffffff;
}

.qe-form-group input:focus,
.qe-form-group textarea:focus,
.qe-form-group select:focus {
  outline: none;
  border-color: #409eff;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.qe-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.qe-form-group select {
  cursor: pointer;
}

/* 行布局 */
.qe-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .qe-form-row {
    grid-template-columns: 1fr;
  }
}

/* 单选框和复选框 */
.qe-form-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.qe-form-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: normal;
}

.qe-form-radio input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.qe-form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.qe-form-checkbox-label:hover {
  background-color: #f0f2f5;
}

.qe-form-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
}

.qe-form-checkbox-text {
  font-size: 0.875rem;
  color: #606266;
  line-height: 1.5;
}

/* 预览区域 */
.qe-form-preview {
  background-color: #f8f9fa;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.qe-form-preview-title {
  font-size: 1rem;
  font-weight: 600;
  color: #909399;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #dcdfe6;
}

.qe-form-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.qe-form-preview-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.qe-form-preview-item-full {
  grid-column: 1 / -1;
}

.qe-form-preview-label {
  font-size: 0.75rem;
  color: #909399;
  font-weight: 500;
}

.qe-form-preview-value {
  font-size: 0.875rem;
  color: #303133;
}

/* 按钮 */
.qe-form-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ebeef5;
}

.qe-form-btn {
  padding: 0.75rem 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.qe-form-btn-primary {
  background-color: #409eff;
  color: #ffffff;
}

.qe-form-btn-primary:hover {
  background-color: #66b1ff;
}

.qe-form-btn-primary:active {
  background-color: #3a8ee6;
}

.qe-form-btn:disabled {
  background-color: #a0cfff;
  cursor: not-allowed;
}

/* 消息提示 */
.qe-form-message {
  padding: 0.875rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.qe-form-message-success {
  background-color: #f0f9eb;
  color: #67c23a;
  border: 1px solid #e1f3d8;
}

.qe-form-message-error {
  background-color: #fef0f0;
  color: #f56c6c;
  border: 1px solid #fde2e2;
}

/* 加载状态 */
.qe-form-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  font-size: 1rem;
  color: #909399;
}

/* 错误状态 */
.qe-form-error {
  text-align: center;
  padding: 3rem 2rem;
  color: #f56c6c;
}

.qe-form-error h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.qe-form-error p {
  font-size: 0.875rem;
  color: #909399;
  margin: 0.5rem 0;
}

/* 信息提示 */
.qe-form-info-tip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background-color: #e6f7ff;
  border: 1px solid #91d5ff;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #0050b3;
}

.qe-form-info-tip-icon {
  font-size: 1rem;
}

.qe-form-info-tip-text {
  color: #0050b3;
}

/* 未填写字段的黄色背景标识 */
.qe-form-input-empty {
  background-color: #fffbe6 !important;
  border-color: #ffe58f !important;
}

.qe-form-input-empty:focus {
  background-color: #fff !important;
}

/* 高亮字段样式 */
.qe-form-highlight-field {
  background-color: #fffbe6;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-weight: 500;
}

/* 语言切换按钮 */
.qe-form-header-with-lang {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #ebeef5;
}

.qe-form-header-with-lang .qe-form-title {
  margin: 0;
  padding: 0;
  border: none;
}

.qe-form-lang-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #409eff;
  background-color: #ffffff;
  border: 1px solid #409eff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.qe-form-lang-btn:hover {
  background-color: #409eff;
  color: #ffffff;
}

.qe-form-lang-btn:active {
  background-color: #3a8ee6;
  border-color: #3a8ee6;
}

/* 成功状态 */
.qe-form-success {
  text-align: center;
  padding: 3rem 2rem;
  background-color: #f0f9eb;
  border: 1px solid #e1f3d8;
  border-radius: 8px;
}

.qe-form-success h2 {
  font-size: 1.5rem;
  color: #67c23a;
  margin-bottom: 1rem;
}

.qe-form-success p {
  font-size: 1rem;
  color: #606266;
  margin: 0.5rem 0;
}

.qe-form-success-thanks {
  font-size: 1.125rem !important;
  font-weight: 500;
  color: #409eff !important;
  margin-top: 1.5rem !important;
  padding-top: 1rem !important;
  border-top: 1px dashed #dcdfe6 !important;
}

/* 签名图片预览 */
.qe-form-signature-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  background-color: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  margin-top: 0.5rem;
}

.qe-form-signature-image {
  max-width: 200px;
  max-height: 100px;
  object-fit: contain;
  border: 1px dashed #dcdfe6;
  border-radius: 4px;
  padding: 0.25rem;
}

/* 紧凑预览区域样式 */
.qe-form-preview-compact {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.qe-form-preview-title-compact {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Time Slots 样式 */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.time-slot-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #ebeef5;
  transition: all 0.2s;
}

.time-slot-item:hover {
  background-color: #f0f2f5;
  border-color: #409eff;
}

.time-slot-date {
  font-size: 0.875rem;
  font-weight: 600;
  color: #303133;
  text-align: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #dcdfe6;
}

.time-slot-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.time-slot-options-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.time-slot-options-row-none {
  padding-top: 0.5rem;
  border-top: 1px dashed #e4e7ed;
}

.time-slot-option {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  font-size: 0.75rem;
  color: #606266;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
}

.time-slot-option:hover {
  background-color: #e6f7ff;
}

.time-slot-option input[type="radio"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  margin: 0;
}

.time-slot-option span {
  font-weight: 500;
}

/* 不空闲选项样式 */
.time-slot-option-none {
  background-color: #fef0f0;
  border: 1px solid #fde2e2;
  width: 100%;
  justify-content: center;
}

.time-slot-option-none:hover {
  background-color: #fde2e2;
}

.time-slot-option-none input[type="radio"]:checked + span {
  color: #f56c6c;
  font-weight: 600;
}

.qe-form-no-data {
  text-align: center;
  padding: 2rem;
  color: #909399;
  font-size: 0.875rem;
}

.qe-form-date-input {
  padding: 0.625rem 0.875rem;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #606266;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #ffffff;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.qe-form-date-input:focus {
  outline: none;
  border-color: #409eff;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.qe-form-btn-secondary {
  background-color: #909399;
  color: #ffffff;
}

.qe-form-btn-secondary:hover {
  background-color: #a6a9ad;
}

.qe-form-btn-secondary:active {
  background-color: #82848a;
}

.qe-form-btn-secondary:disabled {
  background-color: #c0c4cc;
  cursor: not-allowed;
}

/* 时间段卡片头部 */
.time-slot-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #dcdfe6;
}

.time-slot-remove-btn {
  width: 20px;
  height: 20px;
  border: none;
  background-color: transparent;
  color: #f56c6c;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.time-slot-remove-btn:hover {
  background-color: #fef0f0;
}

.time-slot-remove-btn:disabled {
  color: #c0c4cc;
  cursor: not-allowed;
}

/* 添加日期按钮样式 */
.time-slot-add-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: #f0f9eb;
  border: 2px dashed #67c23a;
  cursor: pointer;
  transition: all 0.2s;
}

.time-slot-add-item:hover {
  background-color: #e6f7ff;
  border-color: #409eff;
}

.time-slot-add-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #67c23a;
  font-weight: 500;
  transition: all 0.2s;
}

.time-slot-add-btn:hover {
  color: #409eff;
}

.time-slot-add-btn:disabled {
  color: #c0c4cc;
  cursor: not-allowed;
}

.time-slot-add-icon {
  font-size: 1.25rem;
  font-weight: bold;
}

/* 模态框样式 */
.time-slot-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.time-slot-modal {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  min-width: 300px;
  max-width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.time-slot-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: #303133;
  margin: 0 0 1rem 0;
}

.time-slot-modal-date {
  margin-bottom: 1rem;
}

.time-slot-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Time Slots Panel 特殊样式 */

/* 锁定状态的卡片 */
.time-slot-item-locked {
  background-color: #f5f7fa;
  border-color: #e4e7ed;
  opacity: 0.85;
}

/* 锁定徽章 */
.time-slot-locked-badge {
  font-size: 1rem;
  cursor: help;
}

/* 只读提示 */
.time-slot-readonly-hint {
  font-size: 0.7rem;
  color: #909399;
  text-align: center;
  padding-top: 0.25rem;
  margin-top: 0.25rem;
  border-top: 1px dashed #e4e7ed;
}

/* 只读选项样式 */
.time-slot-option-readonly {
  opacity: 0.6;
  cursor: not-allowed;
}

.time-slot-option-readonly:hover {
  background-color: transparent;
}

/* 复选框容器 */
.qe-form-checkbox-container {
  padding: 0.75rem 1rem;
  background-color: #fef0f0;
  border: 1px solid #fde2e2;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.qe-form-checkbox-label-all {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 500;
  color: #f56c6c;
}

.qe-form-checkbox-label-all input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.qe-form-checkbox-text-all {
  font-size: 0.875rem;
  color: #f56c6c;
}
/* 主布局样式 - 固定布局，页面整体不滚动 */
.main-layout {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #f5f7fa;
  overflow: hidden; /* 防止页面整体滚动 */
}

/* 顶部导航栏 */
.main-header {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  font-size: 20px;
  color: #666;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle:hover {
  background: #f5f5f5;
  color: var(--primary-color-start);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.header-logo-text {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
}

.header-user-name {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-action-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.header-action-btn:hover {
  background: #f5f5f5;
  color: var(--primary-color-start);
}

.header-action-btn.logout {
  color: #ff4d4f;
}

.header-action-btn.logout:hover {
  background: #fff2f0;
}

.header-login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: var(--primary-gradient);
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.header-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-shadow);
}

/* 主体内容区 */
.main-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* 左侧边栏 */
.main-sidebar {
  width: 280px;
  background: #ffffff;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  overflow: hidden;
  height: 100%;
}

.main-sidebar.collapsed {
  width: 0;
  border-right: none;
}

.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.new-chat-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--primary-gradient);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

.new-chat-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px var(--primary-shadow);
}

/* 会话列表 */
.chat-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  /* 隐藏滚动条但保留功能 */
  scrollbar-width: thin;
  scrollbar-color: #e8e8e8 transparent;
}

.chat-list::-webkit-scrollbar {
  width: 4px;
}

.chat-list::-webkit-scrollbar-track {
  background: transparent;
}

.chat-list::-webkit-scrollbar-thumb {
  background: #e8e8e8;
  border-radius: 2px;
}

.chat-list::-webkit-scrollbar-thumb:hover {
  background: #d8d8d8;
}

.chat-list-item {
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-list-item:hover {
  background: #f5f5f5;
}

.chat-list-item.active {
  background: var(--primary-light);
  border: 1px solid var(--primary-light-2);
}

.chat-list-item-icon {
  font-size: 18px;
  color: #999;
}

.chat-list-item.active .chat-list-item-icon {
  color: var(--primary-color-start);
}

.chat-list-item-content {
  flex: 1;
  min-width: 0;
}

.chat-list-item-title {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-item-date {
  font-size: 12px;
  color: #999;
}

.chat-list-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chat-list-item:hover .chat-list-item-actions {
  opacity: 1;
}

.chat-list-item-action {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
}

.chat-list-item-action:hover {
  background: #fff2f0;
  color: #ff4d4f;
}

/* 暂未登录状态 */
.sidebar-not-logged-in {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.not-logged-in-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.not-logged-in-text {
  font-size: 16px;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
}

.not-logged-in-hint {
  font-size: 13px;
  color: #999;
}

/* 侧边栏底部 */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #e8e8e8;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #f5f5f5;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-profile:hover {
  background: #e8e8e8;
}

.sidebar-profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
}

.sidebar-profile-info {
  flex: 1;
  min-width: 0;
}

.sidebar-profile-name {
  font-size: 14px;
  color: #333;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-email {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 主内容区 */
.main-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 响应式 */
@media (max-width: 768px) {
  .main-sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    z-index: 99;
    width: 280px;
    transform: translateX(-100%);
  }

  .main-sidebar.show {
    transform: translateX(0);
  }

  .main-sidebar.collapsed {
    width: 280px;
    transform: translateX(-100%);
  }

  .header-logo-text {
    display: none;
  }

  .header-user-name {
    display: none;
  }
}* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #root {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  min-height: 100vh;
}/* 全局样式重置与基础样式 */

/* 主题颜色变量 - 修改这里即可改变整体主题色 */
:root {
  /* 主渐变色 - 左紫右蓝 */
  --primary-gradient: linear-gradient(135deg, #5e2ce8 0%, #0066ff 100%);
  --primary-color-start: #5e2ce8;  /* 紫色起点 */
  --primary-color-end: #0066ff;    /* 蓝色终点 */
  
  /* 派生颜色 */
  --primary-light: rgba(94, 44, 232, 0.1);
  --primary-light-2: rgba(94, 44, 232, 0.2);
  --primary-shadow: rgba(94, 44, 232, 0.4);
  --primary-shadow-light: rgba(94, 44, 232, 0.15);
}

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

html, body, #root {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden; /* 防止页面整体滚动 */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 通用工具类 */
.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.slide-in-left {
  animation: slideInLeft 0.3s ease-out;
}