/* Task Queue Panel */
.panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.header h3 {
  margin: 0;
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--fg-primary);
}

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

.clearBtn {
  padding: 4px 10px;
  background: var(--bg-highlight);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--fg-secondary);
  font-size: var(--font-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.clearBtn:hover {
  background: var(--border);
  color: var(--fg-primary);
}

.closeBtn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--fg-secondary);
  font-size: var(--font-2xl);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background 0.15s, color 0.15s;
}

.closeBtn:hover {
  background: var(--bg-highlight);
  color: var(--fg-primary);
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.section {
  margin-bottom: 16px;
}

.sectionTitle {
  font-size: var(--font-sm);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--fg-muted);
}

.empty p {
  margin: 0;
}

.empty p:first-child {
  font-size: var(--font-lg);
  color: var(--fg-secondary);
  margin-bottom: 8px;
}

.hint {
  font-size: var(--font-md);
  color: var(--fg-muted);
}

/* Task Item */
.itemWrapper {
  margin-bottom: 4px;
  transition: opacity 0.15s;
}

.itemWrapper.dragging {
  opacity: 0.5;
}

.item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.item:hover {
  border-color: var(--accent);
  background: var(--bg-highlight);
}

.item.compact {
  padding: 8px 10px;
}

.item.running {
  border-color: var(--accent);
  background: var(--bg-highlight);
}

.item.completed {
  opacity: 0.7;
}

.item.failed {
  border-color: var(--error);
}

.item.cancelled {
  opacity: 0.5;
}

.itemStatus {
  font-size: var(--font-lg);
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.itemContent {
  flex: 1;
  min-width: 0;
}

.itemName {
  font-size: var(--font-base);
  font-weight: 500;
  color: var(--fg-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.itemDescription {
  font-size: var(--font-sm);
  color: var(--fg-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.itemMeta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.itemDuration {
  font-size: var(--font-sm);
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.itemDrag {
  color: var(--fg-secondary);
  font-size: var(--font-md);
  cursor: grab;
  user-select: none;
}

.itemDrag:active {
  cursor: grabbing;
}

.itemCancel {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--fg-secondary);
  font-size: var(--font-md);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background 0.15s, color 0.15s;
}

.itemCancel:hover {
  background: var(--error);
  color: var(--text-on-error);
}
