.agent-page-shell {
  background: transparent;
}

.agent-page-chat-main {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  background: inherit;
}

.agent-page-chat-actions {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 30;
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.agent-page-chat-actions__trigger {
  pointer-events: auto;
  background: color-mix(in srgb, var(--ms-color-background) 88%, transparent);
  box-shadow: 0 4px 18px color-mix(in srgb, var(--ms-color-foreground) 8%, transparent);
}

.agent-page-chat-status-menu {
  min-width: 160px;
}

.project-agent-chat-shell .agent-page-chat-main {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  background: inherit;
}

.project-agent-chat-shell.ai-agent-panel-shell {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: inherit;
  background: transparent;
}

.agent-page-chat-empty {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vh, 40px) 0 18px;
}

.agent-page-chat-empty-title {
  margin: 0 0 18px;
  color: var(--ms-color-foreground);
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.agent-page-chat-empty-accessory {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

.agent-page-project-select-card {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--ms-color-border);
  border-radius: 0;
  background: var(--ms-color-background);
  color: var(--ms-color-foreground);
  padding: 9px 12px;
  box-shadow: 0 8px 26px color-mix(in srgb, var(--ms-color-foreground) 6%, transparent);
  font-size: var(--ms-text-caption);
  line-height: 18px;
  transition:
    border-color var(--ms-duration-fast) var(--ms-easing-standard),
    box-shadow var(--ms-duration-fast) var(--ms-easing-standard),
    background-color var(--ms-duration-fast) var(--ms-easing-standard);
}

.agent-page-project-select-card:hover {
  border-color: color-mix(in srgb, var(--ms-color-primary) 42%, transparent);
  background: color-mix(in srgb, var(--ms-color-muted) 28%, transparent);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--ms-color-foreground) 8%, transparent);
}

.agent-page-chat-thread-shell {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
}

.agent-page-chat-thread-shell--empty {
  justify-content: stretch;
}

.agent-page-chat-thread {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.agent-page-chat-thread > .ms-agent-body {
  min-height: 0;
  flex: 1 1 auto;
}

.agent-page-chat-composer {
  width: 100%;
  flex: 0 0 auto;
  padding: 8px 0 12px;
}

.agent-page-chat-empty-composer {
  width: 100%;
  padding: 0;
}

.agent-page-chat-composer .ai-agent-panel-input-card[data-chrome="card"] {
  width: 100%;
  margin: 0;
  border-radius: var(--ms-radius-md);
}

.agent-page-chat-composer .ai-agent-panel-input-card[data-chrome="bottom-bar"] {
  width: 100%;
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
}

.agent-page-chat-composer .ai-agent-panel-input-card[data-chrome="flush"] {
  width: 100%;
  margin: 0;
}

.agent-page-chat-thread-shell--empty .agent-page-chat-composer .ai-agent-panel-input-card {
  overflow: visible;
  box-shadow: none;
}

.agent-page-chat-thread-shell--empty .agent-page-chat-composer .ai-agent-panel-composer {
  border-radius: 24px;
  padding: 0;
}

.agent-page-chat-thread-shell--empty .agent-page-chat-composer .ai-agent-panel-mention-editor {
  min-height: 92px;
  font-size: var(--ms-text-label);
  font-weight: 400;
  line-height: var(--ms-leading-label);
}

.project-agent-chat-shell .ai-agent-panel-input-card[data-chrome="card"] {
  border-radius: 0;
}

.project-agent-chat-shell .ai-agent-panel-main {
  gap: 0;
  padding: 0;
}

.project-agent-chat-shell .ai-agent-panel-chat-header {
  min-height: 38px;
}

.project-agent-chat-shell .agent-pinned-status-root {
  border-bottom: 1px solid var(--ms-color-border);
}

.project-agent-chat-shell .ai-agent-panel-chat-header .ai-agent-panel-title-row {
  padding-right: 56px;
}

.project-agent-chat-shell .ms-agent-thread {
  --ai-agent-panel-message-inline-margin: 5%;
  --ai-agent-panel-user-message-max-width: min(78%, 680px);

  padding: 10px var(--ai-agent-panel-message-inline-margin) 14px;
}

.project-agent-chat-shell.ms-agent-shell--compact .ms-agent-thread {
  padding: 10px var(--ai-agent-panel-message-inline-margin) 14px;
}

.project-agent-chat-shell .agent-page-chat-composer {
  width: 90%;
  margin-inline: auto;
}

.project-agent-chat-shell .ms-agent-message {
  contain: none;
  content-visibility: visible;
  contain-intrinsic-size: none;
  gap: 0;
}

.project-agent-chat-shell.ms-agent-shell--compact .ms-agent-message {
  gap: 0;
}

.project-agent-chat-shell .ms-agent-message__body {
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
}

.project-agent-chat-shell.ms-agent-shell--compact .ms-agent-message__body {
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
}

.project-agent-chat-shell .ms-agent-message--user .ms-agent-message__body {
  width: fit-content;
  max-width: var(--ai-agent-panel-user-message-max-width);
  flex: 0 1 auto;
  align-items: flex-end;
  margin-left: auto;
}

.project-agent-chat-shell.ms-agent-shell--compact .ms-agent-message--user .ms-agent-message__body {
  width: fit-content;
  max-width: var(--ai-agent-panel-user-message-max-width);
  flex: 0 1 auto;
  align-items: flex-end;
  margin-left: auto;
}

.project-agent-chat-shell .ms-agent-message__content {
  width: 100%;
  max-width: 100%;
  padding-right: 0;
  padding-left: 0;
}

.project-agent-chat-shell.ms-agent-shell--compact .ms-agent-message__content {
  width: 100%;
  max-width: 100%;
  padding-right: 0;
  padding-left: 0;
}

.project-agent-chat-shell .ms-agent-message--user .ms-agent-message__content {
  width: auto;
  padding: 7px 10px;
}

.project-agent-chat-shell .ai-agent-panel-input-card[data-chrome="flush"] .ai-agent-panel-composer {
  width: 100%;
}

.project-agent-chat-shell .ai-agent-panel-mention-editor {
  min-height: 92px;
  border-radius: 0;
  padding: 18px 16px 12px;
  font-size: var(--ms-text-label);
  font-weight: 400;
  line-height: var(--ms-leading-label);
}

.ms-agent-run-card__meta,
.ms-agent-instruction__meta {
  font-size: var(--ms-text-caption);
  line-height: 16px;
}

.mention-editor {
  min-width: 0;
}

.mention-editor:empty::before {
  color: color-mix(in srgb, var(--ms-color-muted-foreground) 40%, transparent);
  content: attr(data-placeholder);
  pointer-events: none;
}

.agent-run-page-header {
  display: flex;
  min-height: 72px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ms-space-3);
}

.agent-run-page-header__copy {
  min-width: 0;
}

.agent-run-page-header__title-row {
  display: flex;
  align-items: center;
  gap: var(--ms-space-2);
}

.agent-run-page-header__title {
  margin: 0;
  color: var(--ms-color-foreground);
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.agent-run-page-header__identifier {
  margin: var(--ms-space-1) 0 0;
  overflow-wrap: anywhere;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-page-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ms-space-2);
}

.agent-run-page-action {
  min-width: 0;
}

.agent-run-page-badge {
  min-width: 0;
}

.agent-run-trace-status-badge {
  min-width: 0;
}

.agent-run-page-body {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .agent-run-page-body {
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  }
}

.agent-run-page-sidebar {
  min-height: 0;
  border-bottom: 1px solid var(--ms-color-border);
  padding: var(--ms-space-4);
}

@media (min-width: 1024px) {
  .agent-run-page-sidebar {
    overflow-y: auto;
    border-right: 1px solid var(--ms-color-border);
    border-bottom: 0;
  }
}

.agent-run-page-main {
  min-height: 0;
  padding: var(--ms-space-4);
}

@media (min-width: 1024px) {
  .agent-run-page-main {
    overflow-y: auto;
  }
}

.agent-workspaces-page-body {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .agent-workspaces-page-body {
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  }
}

.agent-workspaces-page-sidebar {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border-bottom: 1px solid var(--ms-color-border);
}

@media (min-width: 1024px) {
  .agent-workspaces-page-sidebar {
    border-right: 1px solid var(--ms-color-border);
    border-bottom: 0;
  }
}

.agent-workspaces-page-sidebar__controls {
  display: grid;
  flex-shrink: 0;
  gap: var(--ms-space-2);
  border-bottom: 1px solid var(--ms-color-border);
  padding: var(--ms-space-3);
}

.agent-workspace-sidebar-path-row {
  display: flex;
  align-items: center;
  gap: var(--ms-space-2);
}

.agent-workspace-sidebar-path-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-label);
  font-weight: 500;
  line-height: var(--ms-leading-label);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-workspaces-page-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: var(--ms-space-2);
}

.agent-workspace-list-stack {
  display: grid;
  gap: var(--ms-space-1);
}

.agent-workspaces-page-main {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: var(--ms-space-4);
}

.agent-workspaces-page-main--full {
  grid-column: 1 / -1;
}

.agent-workspace-editor-layout {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--ms-space-3);
}

.agent-workspace-editor-header,
.agent-workspace-editor-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ms-space-2);
}

.agent-workspace-editor-actions {
  display: flex;
  gap: var(--ms-space-2);
}

.agent-workspace-editor-title-block {
  min-width: 0;
}

.agent-workspace-editor-title,
.agent-workspace-editor-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-workspace-editor-title {
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-item);
  font-weight: 500;
  line-height: var(--ms-leading-item);
}

.agent-workspace-editor-subtitle {
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  line-height: var(--ms-leading-caption);
}

.agent-workspace-editor-body {
  min-height: 0;
  flex: 1 1 auto;
}

.agent-workspace-editor-footer {
  border-top: 1px solid var(--ms-color-border);
  padding-top: var(--ms-space-3);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  line-height: var(--ms-leading-caption);
}

.agent-workspace-editor-textarea {
  width: 100%;
  height: 100%;
  min-height: 360px;
  resize: none;
  border: 1px solid var(--ms-color-border);
  border-radius: var(--ms-radius-sm);
  background: var(--ms-color-background);
  color: var(--ms-color-foreground);
  padding: var(--ms-space-3);
  font-family: var(--ms-font-mono);
  font-size: var(--ms-text-caption);
  line-height: 20px;
  outline: none;
}

.agent-workspace-editor-textarea:focus {
  border-color: var(--ms-color-primary);
}

.agent-workspace-review-summary-pane,
.agent-workspace-review-raw-pane {
  gap: var(--ms-space-3);
}

.agent-workspace-review-summary-pane {
  overflow: auto;
  padding: var(--ms-space-4);
}

.agent-workspace-review-raw-pane {
  display: flex;
  flex-direction: column;
}

.agent-workspace-review-pane-title,
.agent-workspace-review-json-block__title {
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-item);
  font-weight: 500;
  line-height: var(--ms-leading-item);
}

.agent-workspace-review-json-block__title {
  margin-bottom: var(--ms-space-2);
}

.agent-workspace-review-json-block {
  min-width: 0;
}

.agent-workspace-review-textarea {
  min-height: 0;
  flex: 1 1 auto;
  resize: none;
  border: 0;
  background: var(--ms-color-background);
  color: var(--ms-color-foreground);
  padding: var(--ms-space-3);
  font-family: var(--ms-font-mono);
  font-size: var(--ms-text-caption);
  line-height: 20px;
  outline: none;
}

.agent-workspace-review-json-pre {
  overflow: auto;
  margin: 0;
  border: 1px solid var(--ms-color-border);
  border-radius: var(--ms-radius-sm);
  background: var(--ms-color-background);
  color: var(--ms-color-foreground);
  padding: var(--ms-space-3);
  font-size: var(--ms-text-caption);
  line-height: 20px;
}

.agent-workspace-review-json-pre[data-max-height="true"] {
  max-height: 16rem;
}

.agent-workspace-review-section {
  min-width: 0;
}

.agent-workspace-review-section__title {
  margin-bottom: var(--ms-space-2);
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-label);
  font-weight: 500;
  line-height: var(--ms-leading-label);
}

.agent-workspace-review-effects-list {
  display: grid;
  gap: var(--ms-space-2);
}

.agent-workspace-review-empty-block {
  border: 1px solid var(--ms-color-border);
  border-radius: var(--ms-radius-sm);
  background: var(--ms-color-background);
  color: var(--ms-color-muted-foreground);
  padding: var(--ms-space-3);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-workspace-summary-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: var(--ms-space-3);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-workspace-summary-row__label {
  color: var(--ms-color-muted-foreground);
}

.agent-workspace-summary-row__value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ms-color-foreground);
}

.agent-three-pane-page-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  grid-auto-rows: minmax(360px, 1fr);
  align-content: start;
  gap: var(--ms-space-3);
  overflow: auto;
  padding: var(--ms-space-3);
}

@media (min-width: 1024px) {
  .agent-three-pane-page-body {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  }
}

@media (min-width: 1280px) {
  .agent-three-pane-page-body {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  }
}

.agent-three-pane-page-pane {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ms-color-border);
  border-radius: var(--ms-radius-md);
  background: color-mix(in srgb, var(--ms-color-card) 80%, transparent);
}

.agent-three-pane-page-pane[data-tone="raw"] {
  background: color-mix(in srgb, var(--ms-color-background) 88%, transparent);
}

.agent-three-pane-page-pane__header {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ms-space-3);
  border-bottom: 1px solid var(--ms-color-border);
  padding: var(--ms-space-3);
}

.agent-three-pane-page-pane__header-copy {
  min-width: 0;
}

.agent-three-pane-page-pane__title {
  margin: 0;
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-label);
  font-weight: 600;
  line-height: var(--ms-leading-label);
}

.agent-three-pane-page-pane__description {
  margin: var(--ms-space-1) 0 0;
  overflow-wrap: anywhere;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  line-height: var(--ms-leading-caption);
}

.agent-three-pane-page-pane__scroller {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: var(--ms-space-3);
}

.agent-three-pane-page-pane__scroller[data-padding="none"] {
  padding: 0;
}

.agent-three-pane-page-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ms-space-2);
  margin-bottom: var(--ms-space-2);
}

.agent-three-pane-page-list-header__title {
  margin: 0;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: var(--ms-leading-caption);
  text-transform: uppercase;
}

.agent-three-pane-page-list-header__meta {
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  line-height: var(--ms-leading-caption);
}

.agent-three-pane-page-list-stack {
  display: grid;
  gap: var(--ms-space-2);
}

.agent-three-pane-page-empty-text {
  margin: 0;
  border: 1px dashed var(--ms-color-border);
  border-radius: var(--ms-radius-sm);
  color: var(--ms-color-muted-foreground);
  padding: var(--ms-space-3);
  font-size: var(--ms-text-caption);
  line-height: var(--ms-leading-caption);
}

.agent-three-pane-page-item {
  display: block;
  width: 100%;
  border: 1px solid var(--ms-color-border);
  border-radius: var(--ms-radius-sm);
  background: var(--ms-color-background);
  color: var(--ms-color-muted-foreground);
  padding: var(--ms-space-3);
  text-align: left;
}

.agent-three-pane-page-item:hover {
  border-color: color-mix(in srgb, var(--ms-color-primary) 50%, transparent);
  background: color-mix(in srgb, var(--ms-color-muted) 60%, transparent);
}

.agent-three-pane-page-item[data-active="true"] {
  border-color: var(--ms-color-primary);
  background: color-mix(in srgb, var(--ms-color-primary) 10%, transparent);
}

.agent-three-pane-page-item[data-variant="row"] {
  border-width: 0 0 1px;
  border-radius: 0;
}

.agent-three-pane-page-item[data-variant="row"]:hover {
  border-color: var(--ms-color-border);
}

.agent-three-pane-page-item__header,
.agent-three-pane-page-item__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ms-space-2);
}

.agent-three-pane-page-item__title {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-label);
  font-weight: 500;
  line-height: var(--ms-leading-label);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-three-pane-page-item__badge {
  flex: 0 0 auto;
  border-radius: var(--ms-radius-sm);
  background: var(--ms-color-muted);
  color: var(--ms-color-muted-foreground);
  padding: 2px 6px;
  font-size: var(--ms-text-caption);
  font-weight: 500;
  line-height: 16px;
}

.agent-three-pane-page-item__badge[data-tone="info"] {
  background: color-mix(in srgb, var(--ms-color-info) 10%, transparent);
  color: var(--ms-color-info);
}

.agent-three-pane-page-item__badge[data-tone="success"] {
  background: color-mix(in srgb, var(--ms-color-success) 10%, transparent);
  color: var(--ms-color-success);
}

.agent-three-pane-page-item__detail {
  margin: var(--ms-space-1) 0 0;
  overflow: hidden;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  line-height: var(--ms-leading-caption);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-three-pane-page-item__time {
  flex: 0 0 auto;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  line-height: var(--ms-leading-caption);
}

.agent-three-pane-page-item__meta-row {
  margin-top: var(--ms-space-2);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  line-height: var(--ms-leading-caption);
}

.agent-three-pane-page-pane__raw {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: var(--ms-space-4);
  color: var(--ms-color-foreground);
  font-family: var(--ms-font-mono);
  font-size: var(--ms-text-caption);
  line-height: 20px;
}

.agent-three-pane-page-segmented-control {
  display: flex;
  flex: 0 0 auto;
  border: 1px solid var(--ms-color-border);
  border-radius: var(--ms-radius-sm);
  padding: 2px;
}

.agent-three-pane-page-segment-button[data-active="true"] {
  background: var(--ms-color-primary);
  color: var(--ms-color-primary-foreground);
}

@media (max-width: 1023px) {
  .agent-three-pane-page-pane {
    min-height: 360px;
  }
}

.agent-page-header-content {
  display: flex;
  min-height: 72px;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ms-space-3);
}

.agent-page-header-copy {
  min-width: 0;
}

.agent-page-title-row,
.agent-page-eyebrow-row {
  display: flex;
  align-items: center;
  gap: var(--ms-space-2);
}

.agent-page-eyebrow-row {
  margin-bottom: var(--ms-space-1);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  font-weight: 500;
  line-height: var(--ms-leading-caption);
}

.agent-page-description {
  margin: var(--ms-space-1) 0 0;
  max-width: 48rem;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  line-height: 20px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.agent-workspaces-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.agent-workspace-list-state {
  display: flex;
  align-items: center;
  gap: var(--ms-space-2);
  padding: var(--ms-space-3);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-workspace-state-row {
  display: flex;
  min-height: 8rem;
  align-items: center;
  justify-content: center;
  gap: var(--ms-space-2);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-workspace-state-row[data-tone="danger"] {
  color: var(--ms-color-destructive);
}

.agent-workspace-state-spinner {
  animation: ms-spin 1s linear infinite;
}

.agent-workspace-list-item {
  width: 100%;
  height: auto;
  justify-content: flex-start;
  padding: var(--ms-space-2) 10px;
  text-align: left;
  transition: background-color var(--ms-duration-fast) var(--ms-easing-standard), border-color var(--ms-duration-fast) var(--ms-easing-standard);
}

.agent-workspace-list-item > .ms-button__content {
  display: block;
  width: 100%;
}

.agent-workspace-list-item__content {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--ms-space-2);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-workspace-list-item__content > svg {
  flex-shrink: 0;
}

.agent-workspace-list-item[data-active="true"] {
  border-color: var(--ms-color-ring);
  background: color-mix(in srgb, var(--ms-color-muted) 50%, transparent);
}

.agent-workspace-list-item[data-active="true"] .agent-workspace-list-item__content {
  color: var(--ms-color-foreground);
}

.agent-workspace-list-item:not([data-active="true"]):hover {
  background: color-mix(in srgb, var(--ms-color-muted) 30%, transparent);
}

.agent-workspace-list-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ms-space-2);
}

.agent-workspace-list-item__title {
  display: -webkit-box;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-label);
  font-weight: 500;
  line-height: var(--ms-leading-label);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.agent-workspace-list-item__meta {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: var(--ms-space-1);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
}

.agent-workspace-detail-stack {
  display: grid;
  gap: var(--ms-space-3);
}

.agent-workspace-detail-card {
  padding: var(--ms-space-3);
}

.agent-workspace-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ms-space-3);
}

.agent-workspace-detail-copy {
  min-width: 0;
}

.agent-workspace-detail-title {
  margin: 0;
  overflow: hidden;
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-title);
  font-weight: 600;
  line-height: var(--ms-leading-title);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-workspace-badge-row,
.agent-workspace-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-workspace-badge-row {
  margin-top: var(--ms-space-2);
}

.agent-workspace-action-row {
  flex: 0 0 auto;
}

.agent-workspace-meta-grid {
  display: grid;
  gap: var(--ms-space-2);
  margin-top: var(--ms-space-3);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

@media (min-width: 768px) {
  .agent-workspace-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.agent-workspace-code-panel {
  min-width: 0;
}

.agent-workspace-code-panel__header {
  border-bottom: 1px solid var(--ms-color-border);
  padding: var(--ms-space-2) var(--ms-space-3);
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-label);
  font-weight: 500;
  line-height: var(--ms-leading-label);
}

.agent-workspace-json-grid {
  display: grid;
  gap: var(--ms-space-3);
}

@media (min-width: 768px) {
  .agent-workspace-json-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.agent-workspace-meta-item {
  min-width: 0;
  padding: 6px var(--ms-space-2);
}

.agent-workspace-meta-item__label {
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
}

.agent-workspace-meta-item__value {
  overflow: hidden;
  color: var(--ms-color-foreground);
  font-family: var(--ms-font-mono);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-canvas-page-layout {
  display: grid;
  gap: var(--ms-space-4);
}

@media (min-width: 1280px) {
  .agent-canvas-page-layout {
    grid-template-columns: 340px minmax(0, 1fr);
  }
}

.agent-canvas-create-panel {
  height: fit-content;
  padding: var(--ms-space-4);
}

.agent-canvas-list-panel {
  min-width: 0;
}

.agent-canvas-loading-state {
  display: flex;
  align-items: center;
  gap: var(--ms-space-2);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-page-loading {
  display: flex;
  align-items: center;
  gap: var(--ms-space-2);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-page-info-stack {
  display: grid;
  gap: var(--ms-space-3);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-summary-card {
  display: grid;
  gap: var(--ms-space-1);
  padding: var(--ms-space-2);
}

.agent-run-section-eyebrow {
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-run-summary-card__badges,
.agent-run-summary-card__latest {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ms-space-1);
}

.agent-run-summary-card__latest {
  align-items: center;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
}

.agent-run-summary-card__latest-label {
  color: var(--ms-color-foreground);
  font-weight: 500;
}

.agent-run-summary-card__overview {
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-caption);
  line-height: 1.625;
}

.agent-run-summary-card__bullets {
  display: grid;
  gap: var(--ms-space-1);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
}

.agent-run-info-item {
  min-width: 0;
}

.agent-run-info-item__label {
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-run-info-item__value {
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: var(--ms-color-foreground);
}

.agent-run-sidebar-surface {
  display: grid;
  gap: var(--ms-space-2);
  padding: var(--ms-space-2);
}

.agent-run-sidebar-loading {
  display: flex;
  align-items: center;
  gap: var(--ms-space-2);
  padding: var(--ms-space-1) var(--ms-space-2);
  color: var(--ms-color-muted-foreground);
}

.agent-run-pending-list {
  display: grid;
  gap: var(--ms-space-1);
}

.agent-run-pending-item {
  display: grid;
  gap: 2px;
}

.agent-run-pending-item__title {
  color: var(--ms-color-foreground);
  font-weight: 500;
}

.agent-run-pending-item__reason {
  margin: 0;
  color: var(--ms-color-muted-foreground);
}

.agent-run-pending-item__badges,
.agent-run-inline-actions,
.agent-run-task-artifact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ms-space-1);
}

.agent-run-pending-item__impact {
  border-radius: var(--ms-radius-sm);
  background: color-mix(in srgb, var(--ms-color-warning) 10%, transparent);
  color: var(--ms-color-warning-foreground);
  padding: var(--ms-space-1) var(--ms-space-2);
  font-size: var(--ms-text-tiny);
  line-height: 1.55;
}

.agent-run-inline-actions {
  padding-top: var(--ms-space-1);
}

.agent-run-inline-action {
  padding-inline: var(--ms-space-2);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
}

.agent-run-task-artifacts {
  display: grid;
  gap: var(--ms-space-1);
}

.agent-run-task-artifact {
  display: grid;
  gap: 2px;
  padding: var(--ms-space-1) var(--ms-space-2);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: 1.55;
}

.agent-run-task-artifact__header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--ms-space-2);
}

.agent-run-task-artifact__title {
  min-width: 0;
  overflow: hidden;
  color: var(--ms-color-foreground);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-run-task-artifact__actions {
  flex-shrink: 0;
  align-items: center;
}

.agent-run-task-artifact__meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: 6px;
  row-gap: 2px;
}

.agent-run-task-artifact__meta-item {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-run-child-run {
  display: block;
  width: 100%;
  height: auto;
  justify-content: flex-start;
  padding: var(--ms-space-1) var(--ms-space-2);
  text-align: left;
}

.agent-run-child-run:hover {
  background: color-mix(in srgb, var(--ms-color-muted) 30%, transparent);
}

.agent-run-child-run__title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--ms-space-2);
}

.agent-run-child-run__title {
  min-width: 0;
  overflow: hidden;
  color: var(--ms-color-foreground);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-run-child-run__status {
  flex-shrink: 0;
  color: var(--ms-color-muted-foreground);
}

.agent-run-child-run__meta {
  margin-top: 2px;
  overflow: hidden;
  color: var(--ms-color-muted-foreground);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-run-icon--spinning {
  animation: ms-spin 1s linear infinite;
}

.agent-run-trace-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ms-space-2);
  margin-bottom: var(--ms-space-3);
}

.agent-run-trace-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ms-space-1);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-trace-summary__title {
  color: var(--ms-color-foreground);
  font-weight: 500;
}

.agent-run-trace-summary__meta {
  color: var(--ms-color-muted-foreground);
}

.agent-run-trace-category-button {
  height: auto;
  padding: 0;
}

.agent-run-trace-filter-summary {
  width: 100%;
}

.agent-run-trace-controls {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ms-space-2);
}

@media (min-width: 1024px) {
  .agent-run-trace-controls {
    width: auto;
  }
}

.agent-run-trace-view-mode {
  display: flex;
  height: 32px;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-trace-view-mode__button {
  position: relative;
  display: inline-flex;
  height: 100%;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  padding-inline: var(--ms-space-2);
  color: var(--ms-color-muted-foreground);
  line-height: var(--ms-leading-label);
}

.agent-run-trace-view-mode__button > .ms-button__content {
  height: 100%;
  align-items: center;
  line-height: inherit;
}

.agent-run-trace-view-mode__button:focus-visible {
  z-index: 1;
  outline-offset: -2px;
}

.agent-run-trace-view-mode__button + .agent-run-trace-view-mode__button {
  border-left: 1px solid var(--ms-color-border);
}

.agent-run-trace-view-mode__button[aria-pressed="true"] {
  color: var(--ms-color-foreground);
}

.agent-run-trace-search {
  height: 32px;
  min-width: 0;
  flex: 1;
  padding-inline: var(--ms-space-2);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-trace-select-trigger {
  height: 32px;
  min-width: 8rem;
  flex: 1;
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

@media (min-width: 640px) {
  .agent-run-trace-search {
    width: 11rem;
    flex: none;
  }

  .agent-run-trace-select-trigger {
    width: 9rem;
    flex: none;
  }
}

.agent-run-trace-stack {
  display: grid;
  gap: var(--ms-space-2);
}

.agent-run-trace-state-message {
  margin: 0;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-trace-callout {
  padding: var(--ms-space-2) var(--ms-space-3);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-trace-empty-state {
  padding: var(--ms-space-2) var(--ms-space-3);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-trace-feedback__title {
  color: var(--ms-color-foreground);
  font-weight: 500;
}

.agent-run-trace-feedback__description {
  margin: var(--ms-space-1) 0 0;
  color: var(--ms-color-muted-foreground);
}

.agent-run-trace-feedback__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ms-space-2);
  margin-top: var(--ms-space-2);
}

.agent-run-trace-event {
  scroll-margin-top: var(--ms-space-4);
  padding: var(--ms-space-2) var(--ms-space-3);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-trace-event[data-linked="true"] {
  border-color: color-mix(in srgb, var(--ms-color-primary) 70%, var(--ms-color-border));
  background: color-mix(in srgb, var(--ms-color-primary) 5%, var(--ms-color-background));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ms-color-primary) 30%, transparent);
}

.agent-run-trace-event__header {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ms-space-2);
}

.agent-run-trace-event__title {
  min-width: 10rem;
  flex: 1;
  color: var(--ms-color-foreground);
  font-weight: 500;
}

.agent-run-trace-event__actions {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--ms-space-1);
}

.agent-run-trace-event__action {
  padding-inline: var(--ms-space-1);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
}

.agent-run-trace-event__body {
  display: grid;
  gap: var(--ms-space-1);
  margin-top: var(--ms-space-1);
}

.agent-run-trace-event__meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--ms-space-2);
  row-gap: var(--ms-space-1);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
}

.agent-run-trace-event__meta-item {
  min-width: 0;
}

.agent-run-trace-disclosure-frame {
  padding: var(--ms-space-1) var(--ms-space-2);
}

.agent-run-trace-disclosure__summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  align-items: center;
  gap: var(--ms-space-1);
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-tiny);
  font-weight: 500;
  line-height: var(--ms-leading-tiny);
}

.agent-run-trace-disclosure__summary::-webkit-details-marker {
  display: none;
}

.agent-run-trace-disclosure__icon {
  flex-shrink: 0;
}

.agent-run-trace-disclosure__icon--open,
.agent-run-trace-disclosure[open] .agent-run-trace-disclosure__icon--closed {
  display: none;
}

.agent-run-trace-disclosure[open] .agent-run-trace-disclosure__icon--open {
  display: inline-block;
}

.agent-run-trace-disclosure__body,
.agent-run-trace-context-groups {
  display: grid;
  gap: var(--ms-space-1);
  margin-top: var(--ms-space-1);
}

.agent-run-trace-context-group {
  padding: var(--ms-space-1) var(--ms-space-2);
}

.agent-run-trace-context-group__label {
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-run-trace-context-group__items {
  display: grid;
  gap: 2px;
  margin-top: 2px;
}

.agent-run-trace-context-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ms-space-2);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
}

.agent-run-trace-context-row__key {
  flex-shrink: 0;
  color: var(--ms-color-muted-foreground);
}

.agent-run-trace-context-row__value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ms-color-foreground);
  text-align: right;
}

.agent-run-trace-detail-line {
  padding: var(--ms-space-1) var(--ms-space-2);
}

.agent-run-trace-detail-line__label {
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-run-trace-detail-line__value {
  margin-top: 2px;
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-tiny);
  line-height: 1.55;
}

.agent-run-debug-section,
.agent-run-debug-stack {
  display: grid;
  gap: var(--ms-space-2);
}

.agent-run-debug-panel {
  padding: var(--ms-space-2) var(--ms-space-3);
}

.agent-run-debug-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ms-space-2);
}

.agent-run-debug-header__copy {
  min-width: 0;
}

.agent-run-debug-title {
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-label);
  font-weight: 500;
  line-height: var(--ms-leading-label);
}

.agent-run-debug-description {
  margin-top: 2px;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
}

.agent-run-debug-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ms-space-1);
}

.agent-run-debug-metric-grid {
  display: grid;
  gap: var(--ms-space-1);
  margin-top: var(--ms-space-2);
}

@media (min-width: 640px) {
  .agent-run-debug-metric-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.agent-run-debug-metric {
  padding: var(--ms-space-1) var(--ms-space-2);
}

.agent-run-debug-metric__label {
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-run-debug-metric__value {
  margin-top: 2px;
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-label);
  font-weight: 500;
  line-height: var(--ms-leading-label);
}

.agent-run-debug-split {
  display: grid;
  gap: var(--ms-space-2);
}

@media (min-width: 1280px) {
  .agent-run-debug-split {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  }
}

.agent-run-debug-list {
  display: grid;
  gap: 6px;
  margin-top: var(--ms-space-2);
}

.agent-run-debug-muted-note,
.agent-run-debug-status-note {
  padding: var(--ms-space-1) var(--ms-space-2);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: 1.55;
}

.agent-run-debug-code {
  max-height: 14rem;
  padding: var(--ms-space-2);
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-tiny);
  line-height: 1.55;
}

.agent-run-debug-muted-note {
  margin-top: var(--ms-space-2);
  font-size: var(--ms-text-label);
}

.agent-run-debug-action-list,
.agent-run-debug-readiness-list {
  display: grid;
  gap: var(--ms-space-1);
  margin-top: var(--ms-space-2);
}

.agent-run-debug-action {
  justify-content: flex-start;
  padding-inline: var(--ms-space-2);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
}

.agent-run-debug-row-button {
  display: block;
  width: 100%;
  height: auto;
  justify-content: flex-start;
  padding: var(--ms-space-2) var(--ms-space-3);
  text-align: left;
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-debug-row-button:hover {
  background: color-mix(in srgb, var(--ms-color-muted) 30%, transparent);
}

.agent-run-debug-hotspot {
  padding: 6px var(--ms-space-2);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.agent-run-debug-hotspot__layout {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ms-space-2);
}

.agent-run-debug-hotspot__body {
  min-width: 0;
}

.agent-run-debug-hotspot__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ms-space-1);
}

.agent-run-debug-hotspot__title {
  color: var(--ms-color-foreground);
  font-weight: 500;
}

.agent-run-debug-hotspot__summary {
  margin-top: var(--ms-space-1);
  overflow-wrap: anywhere;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
}

.agent-run-debug-hotspot__meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--ms-space-2);
  row-gap: 2px;
  margin-top: var(--ms-space-1);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
}

.agent-run-debug-tag-group {
  margin-top: var(--ms-space-2);
}

.agent-run-debug-tag-group__label {
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  line-height: var(--ms-leading-tiny);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-run-debug-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ms-space-1);
  margin-top: var(--ms-space-1);
}
