/* TaskList 组件样式 */

.task-list {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-container);
}

.task-list-header {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.task-list-new-btn {
  border-radius: 8px;
  font-weight: 500;
}

.task-list-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.task-list-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.task-list-empty {
  padding: 40px 16px;
}

/* 任务项样式 */
.task-item {
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  margin-bottom: 4px;
  padding: 8px 12px !important;
  background: var(--bg-sidebar);
}

.task-item:hover {
  background: var(--color-primary-opacity-10);
  border-color: var(--color-primary-opacity-20);
}

.task-item.active {
  background: var(--color-primary-opacity-15);
  border-color: var(--color-primary);
}

.task-item-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-item-icon {
  color: var(--text-secondary);
  font-size: 14px;
}

.task-item.active .task-item-icon {
  color: var(--color-primary);
}

.task-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.task-item-time {
  font-size: 11px;
  color: var(--text-secondary);
}

.task-item-status {
  flex-shrink: 0;
}

/* ========== 深色主题适配 ========== */

[data-theme='dark'] .task-list {
  background: var(--bg-container);
}

[data-theme='dark'] .task-list-header {
  border-bottom-color: var(--border-color);
}

[data-theme='dark'] .task-item {
  background: var(--bg-elevated);
}

[data-theme='dark'] .task-item:hover {
  background: var(--color-primary-opacity-10);
  border-color: var(--color-primary-opacity-30);
}

[data-theme='dark'] .task-item.active {
  background: var(--color-primary-opacity-15);
  border-color: var(--color-primary);
}

[data-theme='dark'] .task-item-icon {
  color: var(--text-secondary);
}

[data-theme='dark'] .task-item.active .task-item-icon {
  color: var(--color-primary);
}

[data-theme='dark'] .task-item-name {
  color: var(--text-primary);
}

[data-theme='dark'] .task-item-time {
  color: var(--text-secondary);
}