.panel {
  width: 100%;
  height: 100%;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  box-shadow: -1px 0 0 0 var(--border-light);
}

.header {
  height: var(--topbar-height);
  padding: 0 var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.close {
  border: none;
  background: transparent;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.close:hover {
  background: var(--bg-surface-hover);
  color: var(--text-secondary);
}

.content {
  padding: var(--space-lg);
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

.sectionTitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: var(--space-lg) 0 var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
}

.sectionTitle:first-child {
  margin-top: 0;
}

.section {
  margin-bottom: var(--space-lg);
}

.label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-bottom: var(--space-xs);
}

.value {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  word-break: break-word;
  background: var(--bg-surface-hover);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.toolCalls {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toolCall {
  background: var(--bg-node-goal);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
}

.toolName {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
  font-size: 13px;
}

.toolArgs {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.5);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  margin: 0;
  white-space: pre-wrap;
  color: var(--text-secondary);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.messageItem {
  border-left: 2px solid var(--border-medium);
  padding-left: var(--space-md);
}

.knowledgeList {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.knowledgeItem {
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition-fast);
}

.knowledgeItem:hover {
  border-color: var(--color-primary-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.knowledgeHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.knowledgeId {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.knowledgeMetrics {
  display: flex;
  gap: var(--space-md);
  font-size: 13px;
}

.metricScore {
  color: #f59e0b; /* Amber 500 */
  font-weight: 500;
}

.metricQuality {
  color: #8b5cf6; /* Purple 500 */
  font-weight: 500;
}

.metricHelpful {
  color: #10b981; /* Emerald 500 */
  font-weight: 500;
}

.metricHarmful {
  color: #ef4444; /* Red 500 */
  font-weight: 500;
}

.knowledgeTags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.knowledgeScenario {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px dashed var(--border-light);
}

.knowledgeContent {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

.knowledgeContent p {
  margin: 0;
}
