: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;
}

.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; }

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

/* 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; }

.extra-date-row { display: flex; gap: 10px; margin-top: 10px; }
.extra-date-row input { flex: 1; }

.people-inputs { background: #f8f9fa; padding: 10px; border-radius: 6px; }
.input-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 0.9em; }
.input-row input { width: 60px; padding: 4px; text-align: center; }

.age-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; padding-left: 10px; }
.age-tags input { width: 40px; font-size: 0.8em; padding: 2px; border: 1px solid #ddd; border-radius: 3px; }
.height-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; padding-left: 10px; }
.height-tags input { width: 60px; font-size: 0.8em; padding: 2px; border: 1px solid #ddd; border-radius: 3px; }

/* Resources Section */
.resources-section {
  flex: 1; /* Grow to fill space */
  overflow: hidden;
}

.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 {
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
}

/* 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 {
  flex: 2; /* Grow more */
  overflow-y: auto;
  scroll-behavior: smooth;
}

.itinerary-grid {
  flex: 1;
  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; }

/* Quote Section */
.quote-section {
  flex: 1;
  overflow: hidden;
}
.quote-summary {
  flex: 1;
  overflow-y: auto;
  font-size: 0.9em;
}

/* 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; }
.full-width { width: 100%; }

/* 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;
}
.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 fixed heights to scrollable areas on mobile so they don't expand infinitely */
  .resources-section { height: 400px; }
  .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; }
}

/* Responsive Breakpoint: iPhone 12 (390px) */
@media (max-width: 390px) {
  .container {
    padding: 10px;
    gap: 15px;
  }
  .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: 350px;
  }
  .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: 600px;
  }
  
  .drag-board {
    display: flex;
    flex-direction: row;
    gap: 10px;
    height: 700px;
    min-width: 600px;
  }
  
  .drag-source, .drag-target {
    flex: 1;
    min-width: 300px;
    height: 100%;
  }
  
  .resources-section {
    height: 100%;
  }
  
  .itinerary-section {
    height: 100%;
    max-height: 100%;
  }
  
  /* 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: 60px;
}

/* 回到顶部按钮样式 */
.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: hidden;
  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;
  }
}

/* 日期选择面板样式 */
.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;
}
