.agent-runtime-launcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  white-space: nowrap;
}
.agent-runtime-launcher img,
.agent-runtime-agent img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.agent-runtime-count {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: #e0f6f7;
  color: #087f8f;
  font-size: 0.75rem;
  font-weight: 700;
}
.agent-runtime-shell {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.agent-runtime-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(7, 52, 93, 0.24);
  cursor: default;
}
.agent-runtime-drawer {
  position: absolute;
  top: var(--global-header-height, 64px);
  right: 0;
  bottom: 0;
  width: min(760px, 100vw);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-left: 1px solid #d8e6ec;
  box-shadow: -12px 0 34px rgba(7, 52, 93, 0.14);
}
.agent-runtime-header,
.agent-runtime-chat-header,
.agent-runtime-form-actions,
.agent-runtime-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.agent-runtime-header {
  min-height: 70px;
  padding: 12px 16px;
  border-bottom: 1px solid #d8e6ec;
}
.agent-runtime-header h2,
.agent-runtime-chat-header p,
.agent-runtime-navigation h3 {
  margin: 0;
}
.agent-runtime-eyebrow {
  color: #087f8f;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.agent-runtime-body {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}
.agent-runtime-navigation {
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  border-right: 1px solid #d8e6ec;
  background: #f5f9fb;
}
.agent-runtime-navigation section + section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #d8e6ec;
}
.agent-runtime-navigation h3 {
  color: #5d6b78;
  font-size: 0.75rem;
  text-transform: uppercase;
}
.agent-runtime-section-heading .icon-button {
  width: 28px;
  height: 28px;
  min-height: 28px;
}
.agent-runtime-agent-list,
.agent-runtime-conversation-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.agent-runtime-agent {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #142033;
  text-align: left;
}
.agent-runtime-agent:hover,
.agent-runtime-agent.active {
  border-color: #9fdde1;
  background: #eaf8f9;
}
.agent-runtime-agent span,
.agent-runtime-agent strong,
.agent-runtime-agent small {
  min-width: 0;
  display: block;
}
.agent-runtime-agent small {
  margin-top: 3px;
  overflow: hidden;
  color: #5d6b78;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-runtime-navigation-state {
  margin: 8px 0 0;
  padding: 10px;
  color: #5d6b78;
  font-size: 0.78rem;
}
.agent-runtime-conversation {
  overflow: hidden;
  border: 1px solid #d8e6ec;
  border-radius: 6px;
  background: #fff;
}
.agent-runtime-conversation.active {
  border-color: #10aeb8;
  box-shadow: inset 3px 0 #10aeb8;
}
.agent-runtime-conversation.archived {
  background: #f2f5f6;
}
.agent-runtime-conversation-open {
  width: 100%;
  display: block;
  padding: 9px 10px 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #142033;
  text-align: left;
}
.agent-runtime-conversation-open:hover {
  background: #eaf8f9;
}
.agent-runtime-conversation-title,
.agent-runtime-conversation-meta,
.agent-runtime-conversation-preview {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-runtime-conversation-title {
  font-size: 0.82rem;
  font-weight: 700;
}
.agent-runtime-conversation-meta,
.agent-runtime-conversation-preview {
  margin-top: 3px;
  color: #5d6b78;
  font-size: 0.7rem;
}
.agent-runtime-conversation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0 7px 7px;
}
.agent-runtime-conversation-actions button {
  min-height: 24px;
  padding: 2px 5px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #087f8f;
  font-size: 0.68rem;
}
.agent-runtime-conversation-actions button:hover {
  background: #e0f6f7;
}
.agent-runtime-conversation-actions button.danger {
  color: #a54727;
}
.agent-runtime-conversation-actions button.danger:hover {
  background: #fff0e9;
}
.agent-runtime-chat {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.agent-runtime-chat-header {
  padding: 12px 14px;
  border-bottom: 1px solid #d8e6ec;
}
.agent-runtime-chat-header p {
  margin-top: 3px;
  color: #5d6b78;
  font-size: 0.82rem;
}
.agent-runtime-conversation-notice {
  margin: 10px 14px 0;
  padding: 8px 10px;
  border: 1px solid #c8dce5;
  border-radius: 5px;
  background: #f2f5f6;
  color: #5d6b78;
  font-size: 0.78rem;
}
.agent-runtime-messages {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f9fcfd;
}
.agent-runtime-empty {
  padding: 18px;
  border: 1px dashed #c8dce5;
  border-radius: 6px;
  color: #5d6b78;
  text-align: center;
}
.agent-runtime-message {
  max-width: 94%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #d8e6ec;
  border-radius: 6px;
  background: #fff;
}
.agent-runtime-message.user {
  margin-left: auto;
  border-color: #9fdde1;
  background: #eaf8f9;
}
.agent-runtime-message .markdown > :first-child { margin-top: 0; }
.agent-runtime-message .markdown > :last-child { margin-bottom: 0; }
.agent-runtime-citations {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #e5eef2;
}
.agent-runtime-citations button,
.agent-runtime-citations span {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  border: 1px solid #cde7c2;
  border-radius: 4px;
  background: #eef7e8;
  color: #347522;
  cursor: pointer;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-runtime-citations span {
  cursor: default;
  opacity: 0.8;
}
.agent-runtime-citations button:hover,
.agent-runtime-citations button:focus-visible {
  border-color: #79bf43;
  background: #e2f2d9;
  outline: none;
}
.agent-runtime-source-state {
  margin-top: 8px;
  padding: 7px 8px;
  border-left: 3px solid #d59a22;
  background: #fff8e8;
  color: #6c541e;
  font-size: 0.75rem;
}
.agent-runtime-form {
  padding: 12px 14px;
  border-top: 1px solid #d8e6ec;
  background: #fff;
}
.agent-runtime-form textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
}
.agent-runtime-form textarea:disabled {
  background: #f2f5f6;
  color: #5d6b78;
}
.agent-runtime-form-actions {
  margin-top: 8px;
}
body.agent-runtime-open { overflow: hidden; }
.agent-runtime-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #c8dce5;
  border-radius: 6px;
  background: #fff;
  color: #142033;
  box-shadow: 0 18px 48px rgba(7, 52, 93, 0.22);
}
.agent-runtime-dialog::backdrop {
  background: rgba(7, 52, 93, 0.42);
}
.agent-runtime-dialog form {
  display: grid;
  gap: 12px;
  padding: 18px;
}
.agent-runtime-dialog header,
.agent-runtime-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.agent-runtime-dialog h3 {
  margin: 0;
  font-size: 1rem;
}
.agent-runtime-dialog label {
  color: #445464;
  font-size: 0.8rem;
  font-weight: 700;
}
.agent-runtime-dialog input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #c8dce5;
  border-radius: 5px;
  font: inherit;
}
.agent-runtime-dialog input:focus {
  border-color: #10aeb8;
  outline: 2px solid rgba(16, 174, 184, 0.18);
  outline-offset: 1px;
}
.agent-runtime-dialog-actions {
  justify-content: flex-end;
  margin-top: 4px;
}
@media (max-width: 720px) {
  .agent-runtime-drawer { top: var(--global-header-height, 56px); }
  .agent-runtime-body { grid-template-columns: 1fr; }
  .agent-runtime-navigation {
    max-height: 230px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid #d8e6ec;
  }
  .agent-runtime-navigation section + section {
    margin-top: 0;
    padding-top: 0;
    padding-left: 10px;
    border-top: 0;
    border-left: 1px solid #d8e6ec;
  }
}
@media (max-width: 480px) {
  .agent-runtime-navigation {
    grid-template-columns: 1fr;
  }
  .agent-runtime-navigation section + section {
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid #d8e6ec;
    border-left: 0;
  }
}
