:root {
  --primary: #007bff;
  --secondary: #6c757d;
  --bg: #f4f4f9;
  --card-bg: #fff;
  --border: #dee2e6;
  --shadow: 0 2px 8px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; }

body {
  font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: #333;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: white;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  flex-shrink: 0;
  position: relative;
}

.brand { display: flex; align-items: center; gap: 15px; }

.company-info { display: flex; gap: 10px; }
.company-info input { padding: 6px; border: 1px solid var(--border); border-radius: 4px; }
.actions { display: flex; align-items: center; gap: 15px; }
.actions .user-info { display: flex; align-items: center; gap: 10px; }
.actions .user-info span { font-size: 14px; color: #333; }
.actions .user-info button { padding: 4px 12px; background: #6c757d; color: white; border: none; border-radius: 4px; font-size: 14px; cursor: pointer; }
.actions .user-info button:hover { background: #5a6268; }
.actions button { padding: 6px 12px; background: var(--primary); color: white; border: none; border-radius: 4px; font-size: 14px; cursor: pointer; }
.actions button:hover { background: #0069d9; }

/* 汉堡菜单样式 - 已禁用 */
.hamburger-btn {
  display: none;
  position: fixed;
  top: 10px;
  left: 15px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.hamburger-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.hamburger-btn.active {
  background: rgba(0, 0, 0, 0.1);
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: #333;
  position: relative;
  transition: all 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: #333;
  transition: all 0.3s ease;
  left: 0;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

/* 汉堡菜单激活状态 - 变为×图标 */
.hamburger-btn.active .hamburger-icon {
  background: transparent;
}

.hamburger-btn.active .hamburger-icon::before {
  transform: rotate(45deg);
  top: 0;
  background: #e63946; /* 关闭图标使用红色 */
}

.hamburger-btn.active .hamburger-icon::after {
  transform: rotate(-45deg);
  top: 0;
  background: #e63946; /* 关闭图标使用红色 */
}

/* 确保菜单项的最小点击区域不小于44×44像素 */
.mobile-nav .nav-item {
  min-width: 44px;
  min-height: 44px;
  padding: 15px 20px; /* 增加内边距，确保点击区域足够大 */
}

/* 优化汉堡按钮的视觉标识 */
.hamburger-btn {
  /* 增加按钮的可点击区域 */
  width: 44px;
  height: 44px;
  padding: 10px;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  /* 加粗汉堡图标线条，增强视觉标识 */
  height: 3px;
  /* 增加图标大小 */
  width: 26px;
}

.hamburger-icon::before {
  top: -10px;
}

.hamburger-icon::after {
  top: 10px;
}

/* 移动导航菜单样式 - 合并重复定义，确保样式一致 */
.mobile-nav {
  position: fixed;
  top: 0;
  left: -250px;
  width: 250px;
  height: 100vh;
  background: white;
  /* 确保菜单在最上层 */
  z-index: 1000;
  /* 添加阴影，增强视觉层次感 */
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  /* 使用left属性和visibility实现完全隐藏，确保不占用空间 */
  transition: left 0.3s ease, box-shadow 0.3s ease, visibility 0.3s ease, opacity 0.3s ease;
  overflow-y: auto;
  /* 初始状态完全隐藏 */
  visibility: hidden;
  opacity: 0;
}

.mobile-nav.open {
  left: 0;
  visibility: visible;
  opacity: 1;
}

.mobile-nav-content {
  padding: 60px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 60px;
}

.mobile-nav .nav-item:hover {
  background: #f8f9fa;
}

.mobile-nav .nav-item .btn-icon {
  font-size: 18px;
  margin-bottom: 4px;
  color: #6c757d;
}

.mobile-nav .nav-item .btn-text {
  font-size: 12px;
  font-weight: 500;
  color: #6c757d;
}

/* 菜单背景遮罩 */
.mobile-nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.no-scroll {
  overflow: hidden;
}

/* 响应式设计 - 当屏幕宽度小于768px时显示汉堡菜单 */
@media (max-width: 768px) {
  .hamburger-btn {
    display: block;
  }
  
  /* 保持底部导航栏显示 */
  .app-footer {
    display: flex;
  }
  
  /* 调整主内容区域底部边距 */
  .main-content {
    padding-bottom: 100px; /* 增加底部边距，确保内容不被回到顶部图标遮挡 */
  }
  
  /* 调整头部样式 - 仅在admin.html中生效 */
  .admin-header {
    padding-left: 60px;
  }
  
  /* 调整admin.html中的顶部导航 */
  .admin-header .tabs {
    display: none;
  }
  
  /* 隐藏所有class为tabs的元素 */
  .tabs {
    display: none;
  }
  
  /* 显示汉堡菜单按钮 */
  .hamburger-btn {
    display: block !important;
    top: 19px;
  }
  
  /* 隐藏原始的欢迎信息和退出按钮区域 */
  .admin-header > div {
    display: none;
  }
  
  /* 调整admin.html中的主标题 */
  .admin-header h1 {
    font-size: 18px;
  }
  
  /* 调整admin.html中的主标题 */
  .admin-header h1 {
    font-size: 18px;
  }
}

/* 桌面端样式 - 确保汉堡菜单和移动导航在桌面端隐藏 */
@media (min-width: 769px) {
  .hamburger-btn {
    display: none !important;
  }
  
  .mobile-nav {
    display: none !important;
  }
  
  .mobile-nav-backdrop {
    display: none !important;
  }

  /* 修复PC端导航栏显示问题 */
  .admin-header .tabs,
  .tabs {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 20px; /* 水平等距分布 - 间距均匀 */
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 0;
    width: 100%;
    overflow-x: auto;
  }

  .tab-btn {
    /* 统一高度和行高，实现垂直居中 */
    height: 56px;
    line-height: 56px;
    padding: 0 24px; /* 左右内边距20-24px */
    
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 4px 4px 0 0;
    
    /* 字体设置 16-18px */
    font-size: 16px;
    font-weight: 500;
    color: #555;
    
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* Flex布局确保内容居中 */
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto; /* 不换行 */
    white-space: nowrap;
    
    /* 移除旧的垂直布局 */
    gap: 8px;
  }

  .tab-btn:hover {
    /* 鼠标悬停视觉反馈 */
    color: #007bff;
    background: rgba(0, 123, 255, 0.05);
    border-bottom-color: rgba(0, 123, 255, 0.3);
  }

  .tab-btn.active {
    /* 活跃状态高亮 */
    color: #007bff;
    border-bottom-color: #007bff;
    background: transparent;
    font-weight: 600;
  }
  
  .tab-icon {
    font-size: 18px;
  }
  
  .tab-text {
    font-size: inherit;
  }
}

/* Main Container Layout */
.container {
  display: flex;
  flex: 1;
  padding: 20px;
  gap: 30px; /* Requirement: min 30px gap */
  overflow: hidden; /* Prevent body scroll, use inner scroll */
}

/* Main Content Layout */
.main-content {
  display: block;
  width: 100%;
  overflow: visible;
}

.main-content section {
  margin-bottom: 20px;
}

/* Left Panel: 40% */
.panel-left {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 320px;
  overflow: hidden;
}

/* Right Panel: 60% */
.panel-right {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 400px;
  overflow: hidden;
}

/* Sections Common */
section {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 15px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

h3 { margin: 0 0 15px 0; font-size: 1.1rem; color: #2c3e50; display: flex; justify-content: space-between; align-items: center; }
.section-header { display: flex; justify-content: space-between; align-items: center; }
.section-header h3 { margin: 0; font-size: 1.1rem; color: #2c3e50; letter-spacing: normal; }
.hint { font-size: 0.8rem; font-weight: normal; color: #999; }

/* Config Section */
.config-section {
  flex-shrink: 0; /* Don't shrink */
}

.control-group { margin-bottom: 15px; }
.control-group label { display: block; font-weight: bold; margin-bottom: 8px; font-size: 0.9em; }

.date-inputs { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.date-inputs input { flex: 1; padding: 8px; border: 1px solid var(--border); border-radius: 4px; }



.people-inputs { background: #f8f9fa; padding: 10px; border-radius: 6px; }
.input-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 0.9em; }
.input-row input {
  width: 80px;
  padding: 8px 12px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s ease;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  /* 隐藏浏览器内置的上下箭头按钮，使用自定义样式 */
  -moz-appearance: textfield;
}

/* 隐藏浏览器内置的上下箭头按钮，使用自定义样式 */
.input-row input::-webkit-inner-spin-button,
.input-row input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 隐藏Firefox浏览器内置的上下箭头按钮，使用自定义样式 */
.input-row input {
  -moz-appearance: textfield;
}

/* 自定义数字输入框容器 - 移动端优化 */
.custom-number-input {
  position: relative;
  display: inline-block;
}

/* 自定义数字输入框 */
.custom-number-input input {
  width: 80px;
  padding: 12px 36px 12px 12px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s ease;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  font-size: 16px;
  line-height: 20px;
  /* 隐藏浏览器内置箭头 */
  -moz-appearance: textfield;
  /* 确保文字垂直居中 */
  display: inline-block;
  height: 44px;
  box-sizing: border-box;
}

/* 隐藏WebKit浏览器内置箭头 */
.custom-number-input input::-webkit-inner-spin-button,
.custom-number-input input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 数字调整按钮容器 */
.number-controls {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* 数字调整按钮 - 上下三角 */
.number-arrow-btn {
  width: 24px;
  height: 22px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  transition: all 0.2s ease;
  border-radius: 4px;
}

/* 上三角按钮 */
.number-arrow-btn.up {
  border-bottom: 1px solid var(--border);
}

/* 下三角按钮 */
.number-arrow-btn.down {
  border-top: 1px solid var(--border);
}

/* 三角符号样式 */
.number-arrow-btn::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  transition: all 0.2s ease;
}

/* 上三角符号 */
.number-arrow-btn.up::before {
  border-width: 0 3px 5px 3px;
  border-color: transparent transparent var(--primary) transparent;
}

/* 下三角符号 */
.number-arrow-btn.down::before {
  border-width: 5px 3px 0 3px;
  border-color: var(--primary) transparent transparent transparent;
}

/* 悬停效果 */
.number-arrow-btn:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

/* 悬停时的三角符号颜色 */
.number-arrow-btn:hover::before {
  border-color: transparent transparent var(--primary) transparent;
}

/* 下三角悬停效果 */
.number-arrow-btn.down:hover::before {
  border-color: var(--primary) transparent transparent transparent;
}

/* 激活状态 */
.number-arrow-btn:active {
  background-color: rgba(0, 123, 255, 0.1);
}

/* 激活状态的三角符号 */
.number-arrow-btn:active::before {
  border-width: 0 4px 6px 4px;
}

/* 下三角激活状态 */
.number-arrow-btn.down:active::before {
  border-width: 6px 4px 0 4px;
}

/* 禁用状态 */
.number-arrow-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 禁用状态的三角符号 */
.number-arrow-btn:disabled::before {
  border-color: transparent transparent #999 transparent;
}

/* 下三角禁用状态 */
.number-arrow-btn.down:disabled::before {
  border-color: #999 transparent transparent transparent;
}

/* 聚焦状态的输入框 */
.custom-number-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  transform: translateY(-1px);
}

/* 数字输入框错误状态 */
.custom-number-input input.error {
  border-color: #dc3545;
  background-color: #fff5f5;
}

/* 数字输入框错误状态聚焦 */
.custom-number-input input.error:focus {
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

/* 边界值视觉反馈 */
.custom-number-input input.at-boundary {
  background-color: #fff8e1;
  border-color: #ffc107;
  box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.2);
}

/* 边界值聚焦状态 */
.custom-number-input input.at-boundary:focus {
  background-color: #fff8e1;
  border-color: #ffc107;
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}

/* 边界值悬停效果 */
.custom-number-input input.at-boundary:hover {
  background-color: #fff3cd;
  border-color: #ffca2c;
}

.input-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  transform: translateY(-1px);
}

/* 数字输入框容器样式 */
.number-input-container {
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  /* 确保在移动端不换行 */
  flex-wrap: nowrap;
}

/* 数字输入框样式 */
.number-input {
  width: 80px;
  padding: 8px 12px;
  text-align: center;
  border: none;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  /* 隐藏浏览器内置的上下箭头按钮（避免悬停出现灰色图标），使用自定义样式 */
  -moz-appearance: textfield;
}

/* 隐藏WebKit浏览器（Chrome, Safari）内置上下箭头 */
.number-input::-webkit-inner-spin-button,
.number-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.number-input:focus {
  outline: none;
  background-color: #f8f9fa;
}

/* 数字调整按钮样式 */
.number-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border: none;
  border-radius: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  line-height: 1;
}

.number-btn:hover {
  background-color: #e9ecef;
  color: var(--primary);
}

.number-btn:active {
  background-color: var(--primary);
  color: white;
  transform: scale(0.95);
}

.number-btn:disabled {
  background-color: #f1f3f5;
  color: #adb5bd;
  cursor: not-allowed;
  transform: none;
}

/* 减少按钮样式 */
.decrease-btn {
  border-right: 1px solid var(--border);
}

/* 增加按钮样式 */
.increase-btn {
  border-left: 1px solid var(--border);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .number-input-container {
    border-radius: 4px;
  }
  
  .number-input {
    width: 70px;
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .number-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  /* 确保在平板设备上输入框和按钮不换行 */
  .number-input-container {
    flex-wrap: nowrap;
  }
  
  /* 自定义数字输入框响应式 */
  .custom-number-input input {
    width: 70px;
    padding: 8px 32px 8px 10px;
    font-size: 14px;
  }
  
  /* 自定义箭头按钮响应式 */
  .number-controls {
    right: 3px;
    gap: 1px;
  }
  
  .number-arrow-btn {
    width: 24px;
    height: 22px;
  }
  
  /* 三角符号响应式 */
  .number-arrow-btn.up::before {
    border-width: 0 3px 5px 3px;
  }
  
  .number-arrow-btn.down::before {
    border-width: 5px 3px 0 3px;
  }
}

@media (max-width: 480px) {
  .number-input-container {
    border-radius: 3px;
  }
  
  .number-input {
    width: 60px;
    padding: 5px 8px;
    font-size: 12px;
  }
  
  .number-btn {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
  
  /* 确保在移动设备上输入框和按钮不换行 */
  .number-input-container {
    flex-wrap: nowrap;
  }
  
  /* 确保在移动设备上年龄和身高输入框也正常显示 */
  .age-input-wrapper .number-input-container {
    flex-wrap: nowrap;
  }
  
  /* 自定义数字输入框响应式 - 移动端 */
  .custom-number-input input {
    width: 70px;
    padding: 7px 28px 7px 8px;
    font-size: 13px;
  }
  
  /* 自定义箭头按钮响应式 - 移动端 */
  .number-controls {
    right: 2px;
    gap: 1px;
  }
  
  .number-arrow-btn {
    width: 20px;
    height: 20px;
  }
  
  /* 三角符号响应式 - 移动端 */
  .number-arrow-btn.up::before {
    border-width: 0 2px 4px 2px;
  }
  
  .number-arrow-btn.down::before {
    border-width: 4px 2px 0 2px;
  }
}

.age-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; padding-left: 0; }
.age-tags input {
  width: 80px;
  font-size: 0.9em;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s ease;
  text-align: center;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  /* 隐藏浏览器内置的上下箭头按钮（避免悬停出现灰色图标），使用自定义样式 */
  -moz-appearance: textfield;
}

.age-tags input::-webkit-inner-spin-button,
.age-tags input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.age-tags input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  transform: translateY(-1px);
}

/* 年龄错误提示样式 */
.age-tags input.error {
  border-color: #dc3545;
  background-color: #fff5f5;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

.age-tags input.error:focus {
  border-color: #bd2130;
  background-color: #fff5f5;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

/* 错误提示文本样式 */
.age-error-message {
  color: #dc3545;
  font-size: 0.8em;
  margin-top: 5px;
  margin-bottom: 10px;
  padding: 5px 8px;
  background-color: #fff5f5;
  border: 1px solid #ffebee;
  border-radius: 4px;
  display: inline-block;
  animation: fadeIn 0.3s ease;
}

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

/* 错误提示容器 */
.age-error-container {
  width: 100%;
  margin-top: 5px;
  margin-bottom: 10px;
}
.height-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; padding-left: 0; }
.height-tags input {
  width: 70px;
  font-size: 0.9em;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s ease;
  text-align: center;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  /* 隐藏浏览器内置的上下箭头按钮（避免悬停出现灰色图标），使用自定义样式 */
  -moz-appearance: textfield;
}

.height-tags input::-webkit-inner-spin-button,
.height-tags input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.height-tags input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  transform: translateY(-1px);
}

/* 年龄标签样式 */
.age-tags::before {
  content: '年龄：';
  font-size: 0.9em;
  color: #666;
  align-self: center;
  margin-right: 5px;
}

/* 年龄输入包装器样式 */
.age-input-wrapper {
  display: inline-block;
  position: relative;
  margin-right: 8px;
  margin-bottom: 8px;
}

.height-tags::before {
  content: '身高：';
  font-size: 0.9em;
  color: #666;
  align-self: center;
  margin-right: 5px;
}

/* Resources Section */
.resources-section {
  display: block;
  height: auto;
  overflow: visible;
  margin-bottom: 20px;
}

.search-bar { display: flex; gap: 10px; margin-bottom: 15px; }
.search-bar input { flex: 2; padding: 8px; border: 1px solid var(--border); border-radius: 4px; }
.search-bar select { flex: 1; padding: 8px; border: 1px solid var(--border); border-radius: 4px; }

.project-list-container {
  max-height: calc(800px - 50px); /* 减去搜索栏高度 */
  overflow-y: auto;
  padding-right: 10px;
}

/* Project Library Toggle */
.library-content {
  max-height: 800px;
  overflow: visible;
  transition: max-height 0.5s ease;
}

.library-content.collapsed {
  max-height: 0;
  overflow: hidden;
}

/* Project Card & Dragging */
.project-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: grab;
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.project-card:active {
  cursor: grabbing;
}

/* Selected State for Project Cards */
.project-card.selected {
  background: #f5f5f5;
  opacity: 0.7;
}

.project-card.selected .title {
  color: #666;
}

.project-card.selected .meta {
  color: #999;
}

.project-card.selected .current-price {
  color: #999;
}

.project-card.selected .add-btn {
  background: #e0e0e0;
  color: #666;
  cursor: not-allowed;
}

.project-card.selected .add-btn:hover {
  background: #e0e0e0;
  color: #666;
}

/* 景点分类选中项目的特定样式 */
.project-card.attraction-selected {
  background: #f5f5f5;
  opacity: 0.7;
}

.project-card.attraction-selected .title {
  color: #888888;
}

.project-card.attraction-selected .meta {
  color: #888888;
}

.project-card.attraction-selected .current-price {
  color: #888888;
}

.project-card.attraction-selected .add-btn {
  background: #e0e0e0;
  color: #666;
  cursor: not-allowed;
}

.project-card.attraction-selected .add-btn:hover {
  background: #e0e0e0;
  color: #666;
}

.project-card.attraction-selected::before {
  color: #bdbdbd;
}

/* Drag Handle */
.project-card::before {
  content: "⋮⋮";
  position: absolute;
  right: 8px;
  top: 8px;
  color: #adb5bd;
  font-size: 14px;
  cursor: grab;
}

.project-card.selected::before {
  color: #bdbdbd;
}

.project-card .title { font-weight: 600; margin-bottom: 4px; padding-right: 20px; }
.project-card .meta { font-size: 0.85em; color: #666; margin-bottom: 8px; }

.price-row { display: flex; justify-content: space-between; align-items: center; }
.action-buttons { display: flex; align-items: center; gap: 8px; }
.price-box { font-family: monospace; }
.original-price { text-decoration: line-through; color: #999; font-size: 0.8em; margin-right: 5px; }
.current-price { color: #e63946; font-weight: bold; font-size: 1.1em; }
.discount-badge { background: #ffe5e5; color: #e63946; font-size: 0.7em; padding: 1px 4px; border-radius: 2px; margin-left: 5px; }
.unit-badge { background: #e3f2fd; color: #1976d2; font-size: 0.7em; padding: 1px 4px; border-radius: 2px; margin-left: 5px; }

.add-btn {
  padding: 4px 12px;
  background: #e9ecef;
  border: none;
  border-radius: 4px;
  color: #495057;
  font-size: 0.85em;
  transition: background 0.2s;
}
.add-btn:hover { background: var(--primary); color: white; }

/* Itinerary Section */
.itinerary-section {
  display: block;
  overflow-y: auto;
  scroll-behavior: smooth;
  margin-bottom: 20px;
}

.itinerary-grid {
  overflow-y: auto;
  padding-right: 5px;
}

.day-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 15px;
  overflow: hidden;
}

.day-card .date {
  background: #f1f3f5;
  padding: 10px 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  color: #495057;
}

.dropzone {
  min-height: 60px;
  padding: 10px;
  transition: all 0.3s ease;
}

.dropzone.drag-over {
  background: rgba(0, 123, 255, 0.05);
  box-shadow: inset 0 0 0 2px var(--primary);
}

.dropzone:empty::after {
  content: "在此处释放添加项目";
  display: block;
  text-align: center;
  color: #adb5bd;
  font-size: 0.9em;
  padding: 10px 0;
  border: 2px dashed #dee2e6;
  border-radius: 4px;
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #f1f1f1;
  background: white;
}
.item:last-child { border-bottom: none; }
.item .remove { color: #dc3545; cursor: pointer; font-size: 0.85em; padding: 2px 6px; }
.item .remove:hover { background: #ffe5e5; border-radius: 4px; }
.item.dragging { opacity: 0.6; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.insert-marker { height: 2px; background: var(--primary); margin: 2px 0; opacity: 0.8; }
.day-card.saving .date { position: relative; }
.day-card.saving .date::after {
  content: "保存中…";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85em;
  color: #6c757d;
}

/* Room Controls */
.room-controls { border: 1px solid #eee; }
.room-row { display:flex; justify-content: space-between; align-items:center; margin:4px 0; }
.room-actions { display:flex; align-items:center; gap:6px; }
.room-actions button { width:28px; height:28px; border:1px solid #ddd; background:#f1f3f5; }
.room-actions input { width:60px; padding:4px; text-align:center; border:1px solid #ddd; border-radius:4px; }
.room-summary { color:#495057; }
.room-error { margin-top:4px; }

/* Itinerary Day Card Collapse/Expand Styles */
.day-card {
  position: relative;
  transition: all 0.3s ease;
}

.day-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f1f3f5;
  padding: 10px 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  color: #495057;
}

.day-card .date {
  margin: 0;
}

.day-collapse-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #666;
}

.day-collapse-btn:hover {
  background: #e0e0e0;
  color: #333;
}

.day-collapse-icon {
  font-size: 12px;
  color: inherit;
  transition: transform 0.3s ease;
  line-height: 1;
}

.day-card.collapsed .day-collapse-icon {
  transform: rotate(-90deg);
}

.day-card-content {
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease;
  max-height: 2000px;
}

.day-card.collapsed .day-card-content {
  max-height: 0;
  padding: 0;
  overflow: hidden;
}

.day-card .dropzone,
.day-card .items {
  transition: opacity 0.3s ease;
}

.day-card.collapsed .dropzone,
.day-card.collapsed .items {
  opacity: 0;
  pointer-events: none;
}

/* Responsive adjustments for day card collapse */
@media (max-width: 768px) {
  .day-collapse-btn {
    padding: 6px;
  }
  
  .day-collapse-icon {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .day-card-header {
    padding: 8px 12px;
  }
  
  .day-collapse-btn {
    padding: 5px;
  }
  
  .day-collapse-icon {
    font-size: 13px;
  }
}

/* Itinerary Input Styles */
.unit-price-input,
.room-input {
  width: 70% !important;
  text-align: center !important;
  transition: all 0.2s ease;
}

/* Ensure input fields maintain good user experience */
.unit-price-input:focus,
.room-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Responsive adjustments for itinerary inputs */
@media (max-width: 768px) {
  .unit-price-input,
  .room-input {
    width: 70% !important;
    font-size: 13px;
    padding: 6px 8px;
  }
}

@media (max-width: 480px) {
  .unit-price-input,
  .room-input {
    width: 70% !important;
    font-size: 12px;
    padding: 5px 6px;
  }
}

/* Quote Section */
.quote-section {
  flex: 1;
  overflow: hidden;
  margin-bottom: 20px;
  min-height: 300px; /* 确保报价明细版块有足够的高度 */
}
.quote-summary {
  flex: 1;
  overflow-y: auto;
  font-size: 0.9em;
  padding-bottom: 100px; /* 增加足够的底部空间，避免被回到顶部图标遮挡 */
  min-height: 250px; /* 确保报价明细内容区域有足够的高度 */
}

/* Introduction Section */
.introduction-section {
  flex: 1;
  overflow: hidden;
}
.introduction-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.text-editor textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}
.image-uploader h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
}
.image-uploader input {
  margin-bottom: 15px;
}
.image-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.image-preview {
  position: relative;
  width: 120px;
  height: 120px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-preview .remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.save-section {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}
.save-status {
  font-size: 14px;
  color: #6c757d;
}

.line { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #eee; }
.total { font-size: 1.2em; font-weight: bold; text-align: right; color: #e63946; margin-top: 10px; letter-spacing: 0.5px; line-height: 1.4; }

/* Buttons */
button { cursor: pointer; border: 1px solid transparent; border-radius: 4px; transition: opacity 0.2s; }
button:hover { opacity: 0.9; }
.btn-primary { background: var(--primary); color: white; padding: 8px 15px; }
.btn-secondary { background: var(--secondary); color: white; padding: 8px 15px; }
.btn-danger { background: #dc3545; color: white; padding: 8px 15px; }
.full-width { width: 100%; }

/* Image Upload Section */
.image-upload-section {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 15px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.image-upload-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.image-preview-container {
  position: relative;
  background: #f8f9fa;
  border: 2px dashed var(--border);
  border-radius: 8px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.3s ease;
}

.image-preview-container:hover {
  border-color: var(--primary);
  background: rgba(0, 123, 255, 0.05);
}

.image-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px;
}

.image-preview img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-placeholder {
  color: #6c757d;
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

.upload-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
  border-radius: 0 0 4px 4px;
}

.upload-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.upload-controls button {
  flex: 1;
  min-width: 120px;
  padding: 10px;
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.upload-controls button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.upload-status {
  padding: 10px;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.upload-status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.upload-status.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.upload-hints {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6c757d;
  flex-wrap: wrap;
  gap: 10px;
}

/* Responsive styles for image upload */
@media (max-width: 768px) {
  .image-upload-section {
    padding: 12px;
  }
  
  .image-preview-container {
    min-height: 150px;
  }
  
  .upload-controls {
    flex-direction: column;
  }
  
  .upload-controls button {
    width: 100%;
    min-width: auto;
  }
  
  .upload-hints {
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .image-preview-container {
    min-height: 120px;
  }
  
  .upload-controls button {
    padding: 8px;
    font-size: 13px;
  }
  
  .image-preview img {
    max-height: 120px;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ced4da; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #adb5bd; }

/* Drag Board Layout */
.drag-board {
  display: flex;
  gap: 20px;
  flex: 1;
  overflow: hidden;
}
.drag-source, .drag-target {
  flex: 1;
  min-width: 320px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.drag-target.highlight, .drag-source.highlight {
  outline: 2px dashed var(--primary);
  outline-offset: 2px;
  transition: outline-color 0.2s ease;
}
.drag-handle {
  display: inline-block;
  margin-left: 6px;
  color: #adb5bd;
  cursor: grab;
  user-select: none;
  display: none;
}
.drag-handle:active { cursor: grabbing; }
.swap-anim { transition: opacity 0.2s ease, transform 0.2s ease; opacity: 0.9; transform: scale(0.99); }

/* Responsive Breakpoint: 1024px */
@media (max-width: 1024px) {
  body { height: auto; display: block; }
  .container {
    flex-direction: column;
    height: auto;
    overflow: visible;
    padding: 15px;
    gap: 20px;
  }
  .panel-left, .panel-right, .drag-board {
    width: 100%;
    flex: none;
    min-width: 0;
    overflow: visible;
  }
  /* Give adaptive heights to scrollable areas on mobile */
  .resources-section {
    height: auto;
    overflow: visible;
  }
  
  .library-content {
    max-height: 500px;
  }
  
  .project-list-container {
    max-height: calc(500px - 50px); /* 减去搜索栏高度 */
  }
  .itinerary-section {
    /* height: 400px; */
    overflow-y: auto;
  }
  /* .quote-section { height: 400px; } */
  .introduction-section {
    height: 600px;
    overflow-y: auto;
  }
  .introduction-content {
    padding: 10px;
  }
  .text-editor textarea {
    font-size: 16px;
    padding: 12px;
  }
  .image-preview {
    width: 100px;
    height: 100px;
  }
  .save-section {
    flex-direction: column;
    align-items: stretch;
  }
  .save-section button {
    width: 100%;
    padding: 10px;
  }
  .app-header { flex-direction: column; height: auto; gap: 10px; padding: 15px; }
  .brand { flex-direction: column; width: 100%; }
  .company-info { width: 100%; flex-direction: column; }
  .company-info input { width: 100%; padding: 8px; font-size: 16px; }
  .actions button { width: 100%; padding: 10px; font-size: 16px; }
  .date-inputs { flex-direction: column; align-items: stretch; }
  .date-inputs input { width: 100%; padding: 10px; font-size: 16px; }
  .people-inputs .input-row input { width: 80px; padding: 8px; font-size: 16px; }
  .add-btn { padding: 8px 16px; font-size: 16px; }
  .project-card { padding: 16px; }
  .project-card .title { font-size: 16px; }
  .project-card .meta { font-size: 14px; }
  .project-card .current-price { font-size: 18px; }
  .item { padding: 12px 15px; }
  .item .remove { padding: 4px 10px; font-size: 14px; }
  .move-up, .move-down { padding: 6px 12px; font-size: 14px; }
  .unit-price-input { width: 100%; padding: 8px; font-size: 16px; }
  .currency-select { width: 100%; padding: 8px; font-size: 16px; }
  .room-controls { padding: 12px; }
  .room-row { margin: 8px 0; }
  .room-actions button { width: 36px; height: 36px; font-size: 16px; }
  .room-actions input { width: 80px; padding: 8px; font-size: 16px; }
  .drag-handle { font-size: 18px; display: none; }
}

/* Responsive Breakpoint: iPhone 12 (390px)/* 移动端适配 */
@media (max-width: 390px) {
  .container {
    padding: 10px;
    gap: 15px;
  }
  
  /* 确保移动端也有足够的底部空间 */
  .main-content {
    padding-bottom: 100px;
  }
  
  .quote-summary {
    padding-bottom: 100px;
  }
  .app-header {
    padding: 10px;
  }
  .brand {
    gap: 10px;
  }
  .logo-upload input {
    width: 100%;
  }
  .company-info input {
    padding: 8px;
    font-size: 14px;
  }
  .actions button {
    padding: 8px;
    font-size: 14px;
  }
  .config-section {
    padding: 12px;
  }
  h3 {
    font-size: 1rem;
  }
  .control-group label {
    font-size: 0.85em;
  }
  .date-inputs input {
    padding: 8px;
    font-size: 14px;
  }
  .btn-primary {
    padding: 10px;
    font-size: 14px;
  }
  .btn-secondary {
    padding: 8px;
    font-size: 14px;
  }
  .people-inputs {
    padding: 8px;
  }
  .people-inputs .input-row {
    font-size: 0.85em;
  }
  .people-inputs .input-row input {
    width: 70px;
    padding: 6px;
    font-size: 14px;
  }
  .age-tags input {
    width: 50px;
    font-size: 14px;
    padding: 4px;
  }
  .height-tags input {
    width: 70px;
    font-size: 14px;
    padding: 4px;
  }
  .search-bar {
    flex-direction: column;
  }
  .search-bar input {
    padding: 10px;
    font-size: 14px;
  }
  .search-bar select {
    padding: 10px;
    font-size: 14px;
  }
  .resources-section {
    height: auto;
    overflow: visible;
  }
  
  .library-content {
    max-height: 400px;
  }
  
  .project-list-container {
    max-height: calc(400px - 50px); /* 减去搜索栏高度 */
  }
  .project-card {
    padding: 12px;
  }
  .project-card .title {
    font-size: 14px;
  }
  .project-card .meta {
    font-size: 12px;
  }
  .project-card .current-price {
    font-size: 16px;
  }
  .price-box {
    font-size: 14px;
  }
  .add-btn {
    padding: 6px 12px;
    font-size: 14px;
  }
  .itinerary-section {
    height: 350px;
    padding: 12px;
  }
  .day-card {
    margin-bottom: 10px;
  }
  .day-card .date {
    padding: 8px 12px;
    font-size: 14px;
  }
  .dropzone {
    min-height: 50px;
    padding: 8px;
  }
  .item {
    padding: 10px 12px;
    font-size: 14px;
  }
  .item .remove {
    padding: 3px 8px;
    font-size: 12px;
  }
  .move-up, .move-down {
    padding: 4px 8px;
    font-size: 12px;
    margin-left: 4px;
  }
  .unit-price-input {
    padding: 6px;
    font-size: 14px;
  }
  .currency-select {
    padding: 6px;
    font-size: 14px;
  }
  .room-controls {
    padding: 10px;
  }
  .room-row {
    margin: 6px 0;
  }
  .room-actions button {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .room-actions input {
    width: 70px;
    padding: 6px;
    font-size: 14px;
  }
  .quote-section {
    height: 350px;
    padding: 12px;
  }
  .introduction-section {
    height: 450px;
    padding: 12px;
  }
  .introduction-content {
    padding: 8px;
  }
  .text-editor textarea {
    font-size: 14px;
    padding: 10px;
  }
  .image-preview {
    width: 90px;
    height: 90px;
  }
  .quote-summary {
    font-size: 14px;
  }
  .line {
    padding: 8px 0;
  }
  .total {
    font-size: 18px;
  }
  .container {
    overflow-x: auto;
  }
  
  .panel-left {
    min-width: auto;
    width: 100%;
  }
  
  .drag-board {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: auto;
    min-height: 700px;
    min-width: auto;
    width: 100%;
  }
  
  .drag-source, .drag-target {
    flex: 1;
    min-width: auto;
    width: 100%;
    height: auto;
    min-height: 350px;
  }
  
  .resources-section {
    height: auto;
    margin-bottom: 20px;
  }
  
  .itinerary-section {
    height: auto;
    max-height: none;
    margin-bottom: 20px;
  }
  
  /* PDF预览容器样式 */
  #pdfPreviewContainer {
    overflow-x: auto;
  }
  
  #pdfPreviewContainer > div {
    min-width: 794px; /* A4纸张宽度 */
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal.active { display: flex; }
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
}
/* ========== PDF 专用修复 ========== */

@page {
  size: A4;
  margin: 20mm 18mm;
}

.pdf {
  padding: 10mm;
  font-size: 13px;
  line-height: 1.6;
}

/* 禁止滚动 / sticky */
.pdf .itinerary-section {
  position: static !important;
  max-height: none !important;
  overflow: visible !important;
}

/* 防止分页切断 */
.pdf .day-card,
.pdf .item,
.pdf p,
.pdf div {
  page-break-inside: avoid;
  break-inside: avoid;
}

/* 总价对齐 */
.pdf .total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e63946;
  font-size: 16px;
  font-weight: bold;
  margin-top: 12px;
}

.pdf .total .label {
  text-align: left;
}

.pdf .total .amount {
  min-width: 120px;
  text-align: right;
  font-family: monospace;
}

/* 底部导航栏样式 */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #f8f9fa;
  padding: 6px 0;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

.footer-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 70px;
}

.footer-btn:hover {
  background: #e9ecef;
}

/* 底部导航栏激活状态 */
.footer-btn.active {
  color: #007BFF;
}

.footer-btn.active .btn-text {
  color: #007BFF;
  font-weight: 600;
}

.footer-btn.active .btn-icon {
  color: #007BFF;
}

.btn-icon {
  font-size: 16px;
  margin-bottom: 2px;
  color: #6c757d;
  transition: color 0.3s ease;
}

.btn-text {
  font-size: 11px;
  font-weight: 500;
  color: #6c757d;
  transition: color 0.3s ease;
}

/* 主内容区域底部边距，避免被固定导航栏和回到顶部图标遮挡 */
.main-content {
  padding-bottom: 120px; /* 增加底部边距，确保内容不被回到顶部图标遮挡 */
}

/* 回到顶部按钮样式 */
.back-to-top {
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #e9ecef;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.arrow-up {
  font-size: 18px;
  font-weight: bold;
  color: #495057;
  line-height: 1;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 65px;
    right: 15px;
    width: 36px;
    height: 36px;
  }
  
  .arrow-up {
    font-size: 16px;
  }
}

/* 项目卡片展开/缩回功能样式 */
.expand-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.expand-btn:hover {
  background: #f0f0f0;
}

.expand-icon {
  font-size: 12px;
  color: #666;
  transition: transform 0.3s ease;
  line-height: 1;
}

.expand-icon.expanded {
  transform: rotate(180deg);
}

.project-details {
  margin-top: 8px;
  border-top: 1px solid #f1f3f5;
  padding-top: 8px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.details-content {
  padding: 8px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
}

.details-content .description {
  margin-bottom: 8px;
}

.details-content .detailed-description {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .expand-btn {
    padding: 6px;
  }
  
  .expand-icon {
    font-size: 14px;
  }
  
  .details-content {
    font-size: 12px;
  }
  
  .details-content .detailed-description {
    font-size: 11px;
  }
}

/* 项目库展开/折叠功能样式 */
.toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  background: #f0f0f0;
}

.toggle-icon {
  font-size: 12px;
  color: #666;
  transition: transform 0.3s ease;
  line-height: 1;
}

.toggle-btn.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.library-content {
  max-height: 800px;
  overflow: visible;
  transition: max-height 0.5s ease;
}

.library-content.collapsed {
  max-height: 0;
}

/* 项目库折叠状态的提示 */
.projects-collapsed-hint {
  padding: 16px;
  text-align: center;
  color: #666;
  font-size: 14px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-top: 8px;
  display: none;
}

.projects-collapsed-hint.visible {
  display: block;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .toggle-btn {
    padding: 8px;
  }
  
  .toggle-icon {
    font-size: 14px;
  }
  
  .library-content {
    max-height: 600px;
  }
  
  .project-list-container {
    max-height: calc(600px - 50px); /* 减去搜索栏高度 */
  }
}

/* 日期选择面板样式 */
.date-item {
  transition: all 0.2s ease;
}

.date-item:hover {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.date-item.has-items {
  border-color: #28a745;
  background-color: #f8fff9;
}

.date-item.has-items:hover {
  border-color: #218838;
  background-color: #e8f5e9;
}

/* 日期列表样式 */
.date-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

/* 日期列表滚动条 */
.date-list::-webkit-scrollbar {
  width: 4px;
}

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

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

.date-list::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}
