.agent-architecture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
  padding: 18px;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  background: #fafbfc;
}
.agent-architecture-grid label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 700; }
.agent-architecture-grid small { color: #8a909d; font-size: 10px; font-weight: 500; }
.agent-architecture-grid input, .agent-architecture-grid select {
  height: 42px; padding: 0 12px; border: 1px solid #dde0e7; border-radius: 10px;
  background: #fff; color: #171923; font: 600 13px system-ui, sans-serif; outline: none;
}
.agent-architecture-grid input:focus, .agent-architecture-grid select:focus { border-color: #7f61eb; box-shadow: 0 0 0 3px #8061eb17; }
.architecture-subheading { margin-top: 6px; }
.agent-tools { margin-top: 18px; padding-top: 18px; border-top: 1px solid #eceef2; }
.agent-tools > div h3 { margin: 0; font-size: 15px; }
.agent-tools > div p { margin: 4px 0 13px; color: #8a909d; font-size: 11px; }
.agent-tools > label { display: flex; align-items: center; gap: 10px; margin-top: 9px; padding: 13px; border: 1px solid #e3e5eb; border-radius: 12px; background: #fff; cursor: pointer; }
.agent-tools > label:has(input:checked) { border-color: #8a6bea; background: #f8f5ff; }
.agent-tools input { width: 16px; height: 16px; accent-color: #7656dc; }
.agent-tools label span { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 9px; flex: 1; }
.agent-tools label svg { grid-row: 1 / 3; color: #7656dc; }
.agent-tools label b { font-size: 12px; }
.agent-tools label small { color: #8b909b; font-size: 10px; }
@media (max-width: 720px) { .agent-architecture-grid { grid-template-columns: 1fr; } }
.knowledge-ingest-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 16px; margin-top: 18px; }
.knowledge-drop, .knowledge-paste { padding: 18px; border: 1px solid #e2e5eb; border-radius: 14px; background: #fafbfc; }
.knowledge-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; border-style: dashed; }
.knowledge-drop { cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.knowledge-drop:focus-visible { outline: 3px solid #8061eb2e; outline-offset: 2px; }
.knowledge-drop.dragging { transform: translateY(-2px); border-color: #7656dc; background: #f4f0ff; box-shadow: 0 12px 28px #7656dc18; }
.knowledge-drop.has-file { border-color: #54ad7b; background: #f2fbf6; }
.knowledge-drop.invalid { border-color: #df6974; background: #fff5f6; }
.knowledge-drop input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.knowledge-drop #knowledge-choose-file { border-color: #dcd6ee; color: #6847d5; }
.knowledge-drop #knowledge-upload { background: #171923; color: #fff; }
.knowledge-drop #knowledge-upload:disabled { cursor: not-allowed; opacity: .4; }
.knowledge-drop span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #eee8ff; color: #7656dc; }
.knowledge-drop small, .knowledge-list small { color: #8a909d; font-size: 10px; }
.knowledge-drop input { max-width: 100%; font-size: 11px; }
.knowledge-paste { display: flex; flex-direction: column; gap: 11px; }
.knowledge-paste label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 700; }
.knowledge-paste input, .knowledge-paste textarea { padding: 10px; border: 1px solid #dde0e7; border-radius: 9px; background: #fff; font: 12px system-ui; }
.knowledge-paste textarea { min-height: 110px; resize: vertical; }
.knowledge-status { min-height: 18px; color: #6847d5; font-size: 11px; font-weight: 650; }
.knowledge-list { display: grid; gap: 9px; margin-top: 12px; }
.knowledge-list > p { padding: 20px; border: 1px dashed #dfe2e8; border-radius: 12px; color: #8a909d; text-align: center; }
.knowledge-list article { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid #e4e6eb; border-radius: 11px; background: #fff; }
.knowledge-list article > span { color: #7656dc; }.knowledge-list article div { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.knowledge-list article button { border: 0; background: transparent; color: #d14855; cursor: pointer; font-size: 11px; }
.knowledge-actions { display: flex !important; flex: 0 0 auto !important; flex-direction: row !important; gap: 6px !important; }
.knowledge-actions button:first-child { padding: 7px 10px; border: 1px solid #ded9f2; border-radius: 8px; background: #f7f4ff; color: #6847d5; font-weight: 650; }
.knowledge-chunks { display: none; overflow: hidden; margin: -3px 0 8px; border: 1px solid #dedfe6; border-radius: 0 0 13px 13px; background: #f8f9fb; }
.knowledge-chunks.open { display: block; }
.knowledge-chunks > header, .knowledge-chunks > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; background: #f0f1f5; }
.knowledge-chunks > header div { display: flex; flex-direction: column; gap: 2px; }
.knowledge-chunks > header small, .knowledge-chunks > footer { color: #7f8591; font-size: 10px; }
.knowledge-chunks > header button { border: 0; background: transparent; color: #626773; cursor: pointer; font-size: 20px; }
.chunk-list { display: grid; gap: 8px; max-height: 460px; overflow: auto; padding: 10px; }
.chunk-list article { display: block; padding: 12px; border: 1px solid #e1e3e8; border-radius: 10px; background: #fff; }
.chunk-list article > div { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.chunk-list article b { color: #6847d5; font-size: 11px; }.chunk-list article p { margin: 0; color: #343843; font: 11px/1.55 system-ui; white-space: pre-wrap; }
.knowledge-chunks > footer div { display: flex; gap: 6px; }.knowledge-chunks > footer button { padding: 6px 9px; border: 1px solid #d9dce3; border-radius: 7px; background: #fff; color: #555b68; cursor: pointer; font-size: 10px; }
.knowledge-chunks > footer button:disabled { cursor: not-allowed; opacity: .45; }
@media (max-width: 720px) { .knowledge-ingest-grid { grid-template-columns: 1fr; } }
.preview-rag-trace { align-self: stretch; width: calc(100% - 4px); min-width: 0; margin: -8px 2px 14px; overflow: hidden; box-sizing: border-box; border: 1px solid #ded8f1; border-radius: 12px; background: #faf8ff; }
.preview-rag-trace summary { display: flex; align-items: center; gap: 10px; padding: 11px 12px; cursor: pointer; list-style: none; }
.preview-rag-trace summary::-webkit-details-marker { display: none; }
.preview-rag-trace summary > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #eae3ff; color: #6847d5; }
.preview-rag-trace summary > div { display: flex; flex: 1; flex-direction: column; gap: 2px; }
.preview-rag-trace summary strong { color: #33264f; font-size: 11px; }.preview-rag-trace summary small { color: #878090; font-size: 9px; }
.preview-rag-trace summary em { color: #6847d5; font-size: 9px; font-style: normal; font-weight: 700; }
.preview-rag-items { display: grid; gap: 8px; max-height: 380px; overflow: auto; padding: 0 10px 10px; }
.preview-rag-items article { padding: 10px; border: 1px solid #e4dfef; border-radius: 9px; background: #fff; }
.preview-rag-items header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.preview-rag-items header b { color: #5c3ebd; font-size: 10px; }.preview-rag-items header span { color: #8b8694; font-size: 8px; white-space: nowrap; }
.preview-rag-items p { margin: 8px 0; color: #3d3f48; font: 10px/1.55 system-ui; white-space: pre-wrap; }
.preview-rag-items article > small { color: #aaa6b0; font: 8px ui-monospace, monospace; }
.preview-rag-table-wrap { width: 100%; max-height: 390px; overflow: auto; padding: 0 10px 10px; box-sizing: border-box; }
.preview-rag-table { width: 100%; table-layout: fixed; border-spacing: 0; border-collapse: separate; border: 1px solid #e3dfed; border-radius: 9px; background: #fff; font-size: 11px; }
.preview-rag-table th { position: sticky; top: 0; z-index: 1; padding: 9px 8px; border-bottom: 1px solid #ddd8e8; background: #f1eef8; color: #5e5869; text-align: left; white-space: normal; }
.preview-rag-table th:nth-child(1) { width: 10%; }
.preview-rag-table th:nth-child(2) { width: 18%; }
.preview-rag-table th:nth-child(3) { width: 12%; }
.preview-rag-table th:nth-child(4) { width: 12%; }
.preview-rag-table th:nth-child(5) { width: 48%; }
.preview-rag-table td { min-width: 0; padding: 10px 8px; border-bottom: 1px solid #eeebf3; color: #41434b; vertical-align: top; overflow-wrap: anywhere; }
.preview-rag-table tr:last-child td { border-bottom: 0; }.preview-rag-table td b { color: #6847d5; }
.preview-rag-table td strong, .preview-rag-table td span, .preview-rag-table td small { display: block; }
.preview-rag-table td small { max-width: 100%; overflow: hidden; margin-top: 4px; color: #918b99; font: 9px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.preview-rag-table td em { display: inline-block; padding: 3px 6px; border-radius: 999px; background: #e9f8ef; color: #278250; font-style: normal; font-weight: 750; white-space: nowrap; }
.preview-rag-table td p { max-height: 180px; overflow: auto; margin: 0; padding: 0; border: 0; background: transparent; color: #30323a; font: 11px/1.55 system-ui; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 620px) {
  .preview-rag-table { min-width: 560px; table-layout: auto; }
  .preview-rag-table-wrap { overflow-x: auto; }
}

/* Voice Lab dark workspace surfaces */
.design-layout .agent-architecture-grid,
.design-layout .knowledge-drop,
.design-layout .knowledge-paste,
.design-layout .knowledge-list article,
.design-layout .knowledge-chunks,
.design-layout .chunk-list article,
.design-layout .agent-tools > label,
.design-layout .integration-key-card,
.design-layout .integration-test,
.design-layout .integration-empty {
  border-color: #2e3136;
  background: #191b1f;
  color: #eef0f2;
}
.design-layout .agent-architecture-grid label,
.design-layout .knowledge-paste label,
.design-layout .integration-fields label,
.design-layout .integration-test-grid label { color: #c7cacf; }
.design-layout .agent-architecture-grid small,
.design-layout .agent-tools > div p,
.design-layout .agent-tools label small,
.design-layout .knowledge-drop small,
.design-layout .knowledge-list small,
.design-layout .integration-key-card p,
.design-layout .integration-test p,
.design-layout .integration-token-result,
.design-layout .integration-empty p { color: #8e939a; }
.design-layout .agent-architecture-grid input,
.design-layout .agent-architecture-grid select,
.design-layout .knowledge-paste input,
.design-layout .knowledge-paste textarea,
.design-layout .integration-test input {
  border-color: #363a40;
  background: #0b0c0e;
  color: #f2f3f4;
}
.design-layout .agent-architecture-grid input:focus,
.design-layout .agent-architecture-grid select:focus,
.design-layout .knowledge-paste input:focus,
.design-layout .knowledge-paste textarea:focus,
.design-layout .integration-test input:focus {
  border-color: var(--platform-primary);
  box-shadow: 0 0 0 3px var(--platform-focus-ring);
  outline: none;
}
.design-layout .agent-tools { border-top-color: #2e3136; }
.design-layout .agent-tools > div h3,
.design-layout .agent-tools label b,
.design-layout .knowledge-drop strong,
.design-layout .knowledge-list strong,
.design-layout .knowledge-chunks strong,
.design-layout .integration-key-card strong,
.design-layout .integration-test h3,
.design-layout .integration-empty strong { color: #f3f4f5; }
.design-layout .agent-tools > label:has(input:checked) {
  border-color: var(--platform-primary-border);
  background: var(--platform-primary-soft);
}
.design-layout .agent-tools input { accent-color: var(--platform-primary); }
.design-layout .agent-tools label svg,
.design-layout .knowledge-list article > span { color: var(--platform-primary-hover); }
.design-layout .knowledge-drop:focus-visible { outline-color: var(--platform-focus-ring); }
.design-layout .knowledge-drop.dragging {
  border-color: var(--platform-primary);
  background: var(--platform-primary-soft);
  box-shadow: 0 12px 28px var(--platform-focus-ring);
}
.design-layout .knowledge-drop.has-file { border-color: #3a9d68; background: #14251c; }
.design-layout .knowledge-drop.invalid { border-color: #cf5965; background: #291619; }
.design-layout .knowledge-drop span { background: var(--platform-primary-soft); color: var(--platform-primary-hover); }
.design-layout .knowledge-drop #knowledge-choose-file { border-color: var(--platform-primary-border); color: var(--platform-primary-hover); }
.design-layout .knowledge-drop #knowledge-upload { border-color: var(--platform-primary-strong); background: var(--platform-primary); color: var(--platform-on-primary); }
.design-layout .knowledge-status { color: var(--platform-primary-hover); }
.design-layout .knowledge-list > p { border-color: #34383e; color: #8e939a; }
.design-layout .knowledge-actions button:first-child,
.design-layout .knowledge-chunks > footer button {
  border-color: var(--platform-primary-border);
  background: var(--platform-primary-soft);
  color: var(--platform-primary-hover);
}
.design-layout .knowledge-chunks { border-color: #34383e; background: #111316; }
.design-layout .knowledge-chunks > header,
.design-layout .knowledge-chunks > footer { background: #1d2024; }
.design-layout .knowledge-chunks > header button { color: #b8bcc1; }
.design-layout .chunk-list article { border-color: #30343a; background: #15171a; }
.design-layout .chunk-list article b { color: var(--platform-primary-hover); }
.design-layout .chunk-list article p { color: #d8dade; }
.design-layout .integration-warning { border-color: var(--platform-primary-border); background: var(--platform-primary-soft); color: var(--platform-primary-hover); }
.design-layout .integration-warning p { color: #bda18f; }
.design-layout .integration-copy-row code {
  border-color: #363a40;
  background: #0b0c0e;
  color: #e9ebed;
}
.design-layout .integration-copy-row button {
  border-color: var(--platform-primary-border);
  background: var(--platform-primary-soft);
  color: var(--platform-primary-hover);
}
.design-layout .integration-secret { border-color: var(--platform-primary-border); background: var(--platform-primary-soft); }
.design-layout .integration-secret > strong { color: var(--platform-primary-hover); }
