/* 
 * 注意：此文件中的 @import 已移至 index.html 中直接使用 <link> 标签引入
 * 这样可以支持并行加载，而不是串行加载
 * 
 * 此文件现在只包含不在单独文件中的样式
 */

.list-item {
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

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

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.schedule-table th,
.schedule-table td {
  border: 1px solid #e5e7eb;
  padding: 10px;
  text-align: left;
}

.primary-btn,
.secondary-btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  margin-right: 0; /* 移除 margin，使用 flex gap 控制間隔 */
}

.primary-btn {
  background: #2563eb;
  color: #fff;
}

.secondary-btn {
  background: #e5e7eb;
  color: #1f2937;
}

.secondary-btn.ghost {
  background: transparent;
  color: #4b5563;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }

  .sidebar.collapsed {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }

  .main-content {
    padding: 8px;
  }
}

/* 常用路径文件夹样式 */
.favorite-paths-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.favorite-paths-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.favorite-paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.favorite-folder-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 48px;
  height: 48px;
}

.favorite-folder-item:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.favorite-folder-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.favorite-folder-name {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

/* 模态对话框样式 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

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

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.add-path-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.add-path-form label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.add-path-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.add-path-input-group button {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.add-path-input-group input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background: #f9fafb;
  cursor: not-allowed;
}

.add-path-hint {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}

.add-path-input-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.paths-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.path-item-clickable {
  cursor: pointer;
  transition: all 0.2s;
}

.path-item-clickable:hover {
  background: #f3f4f6;
  transform: translateX(4px);
}

/* 拖拽样式 */
.path-item-draggable {
  cursor: grab;
  user-select: none;
}

.path-item-draggable:active {
  cursor: grabbing;
}

.path-item-draggable.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.path-item-draggable.drag-over,
.path-item-clickable.drag-over,
.add-to-virtual-folder.drag-over {
  background: #dbeafe !important;
  border-color: #3b82f6 !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: scale(1.02);
}

.path-item-virtual.drag-over {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
}

.add-to-virtual-folder {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.paths-list-container label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.paths-list {
  background: #f9fafb;
  border-radius: 12px;
  padding: 12px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-paths-message {
  text-align: center;
  color: #9ca3af;
  padding: 20px;
  margin: 0;
  font-size: 14px;
}

.path-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
}

.path-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.path-item-text {
  flex: 1;
  font-size: 13px;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 10px;
}

.path-item-delete {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.path-item-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 确认对话框样式 */
.confirm-modal-content {
  max-width: 400px;
}

.confirm-message {
  margin: 0;
  font-size: 15px;
  color: #374151;
  line-height: 1.6;
}

.confirm-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.danger-btn {
  background: #ef4444;
  color: #fff;
}

.danger-btn:hover {
  background: #dc2626;
}

.danger-btn:active {
  background: #b91c1c;
}

/* 标签页样式 */
.add-path-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #374151;
}

.tab-btn.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  font-weight: 500;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 虚拟文件夹样式 */
.path-item-virtual {
  background: #fef3c7;
  border-color: #fcd34d;
}

.path-item-icon {
  font-size: 16px;
  margin-right: 8px;
}

.path-item-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #fbbf24;
  color: #78350f;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  margin-left: 8px;
}

.favorite-folder-item-virtual {
  border-color: #fcd34d;
  background: #fef3c7;
}

.favorite-folder-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #fbbf24;
  color: #78350f;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
  margin-left: auto;
}

.virtual-folder-item {
  background: #fef3c7;
  border-color: #fcd34d;
}

.virtual-folder-item:hover {
  border-color: #f59e0b;
  background: #fde68a;
}



