.knowledge-base-workspace {
  --kb-surface: #fff;
  --kb-edge: #dce5e1;
  --kb-text: #263c35;
  --kb-muted: #697b74;
  --kb-active: #edf8f2;
  --kb-accent: #13795b;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dark .knowledge-base-workspace {
  --kb-surface: #182630;
  --kb-edge: #37515b;
  --kb-text: #e5f2ef;
  --kb-muted: #adc4c0;
  --kb-active: #23453e;
  --kb-accent: #9bdfc7;
}
html.crm-glass:root .knowledge-base-workspace {
  --kb-surface: var(--slate-card);
  --kb-edge: var(--slate-edge);
  --kb-text: var(--slate-ink);
  --kb-muted: var(--slate-muted);
  --kb-active: var(--crm-glass-active);
  --kb-accent: var(--slate-positive);
}
.knowledge-base-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--kb-edge);
  border-radius: 16px;
  background: var(--kb-surface);
  width: fit-content;
  max-width: 100%;
}
.knowledge-base-tabs > button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  text-align: left;
  color: var(--kb-muted);
  transition: background-color .15s, color .15s, border-color .15s;
}
.knowledge-base-tabs > button:hover { background: var(--kb-active); color: var(--kb-text); }
.knowledge-base-tabs > button[aria-selected='true'] {
  background: var(--kb-active);
  border-color: var(--kb-edge);
  color: var(--kb-accent);
}
.knowledge-base-tab-icon { width: 21px; height: 21px; flex-shrink: 0; }
.knowledge-base-tab-label { display: block; font-size: 15px; font-weight: 600; line-height: 1.4; }
.knowledge-base-tab-description { display: block; margin-top: 3px; color: var(--kb-muted); font-size: 12px; line-height: 1.4; }
.knowledge-base-tabs > button:focus-visible, .knowledge-base-panel:focus-visible {
  outline: 2px solid var(--kb-accent);
  outline-offset: 3px;
}
.knowledge-base-panel[hidden] { display: none !important; }
.knowledge-base-panel > .knowledge-audit { margin-bottom: 0; }
@media (max-width: 640px) {
  .knowledge-base-tabs { width: 100%; gap: 4px; padding: 4px; border-radius: 13px; }
  .knowledge-base-tabs > button { flex: 1; min-width: 0; padding: 11px 8px; gap: 7px; }
  .knowledge-base-tab-label { font-size: 13px; }
  .knowledge-base-tab-icon { width: 18px; height: 18px; }
  .knowledge-base-tab-description { display: none; }
  .knowledge-base-workspace { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .knowledge-base-tabs > button { transition: none; }
}
