:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #111827;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
}

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 20px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.token-input {
  width: 180px;
}

.auth-status {
  color: #4b5563;
  font-size: 13px;
  white-space: nowrap;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 40px;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  margin-bottom: 18px;
}

p {
  color: #4b5563;
  margin-top: 8px;
}

.panel-note {
  margin: -8px 0 16px;
  font-size: 13px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #f8fafc;
}

.mode-tabs button {
  border-color: transparent;
  background: transparent;
  color: #344054;
}

.mode-tabs button.active {
  border-color: #1f2937;
  background: #111827;
  color: #fff;
}

.panel {
  background: #fff;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.login-panel {
  margin-bottom: 16px;
}

.login-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 10px;
}

.token-fallback {
  margin-top: 12px;
}

.token-fallback summary {
  cursor: pointer;
  color: #4b5563;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 10px;
}

#loginStatus {
  display: block;
  color: #4b5563;
  font-size: 13px;
  margin-top: 10px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin-bottom: 0;
}

.site-filters {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(130px, 170px) minmax(120px, 150px);
  gap: 10px;
}

.new-site {
  margin-bottom: 20px;
}

.create-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 16px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  font: inherit;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 180px;
  resize: vertical;
  padding: 10px 12px;
  line-height: 1.45;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.inline-check input {
  width: 18px;
  height: 18px;
}

.upload-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.dropzone {
  min-height: 160px;
  border: 1px dashed #8b98a8;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 24px;
  background: #f9fafb;
  cursor: pointer;
}

.dropzone.drag-over {
  border-color: #111827;
  background: #eef2ff;
}

.upload-any {
  gap: 7px;
}

.dropzone span {
  font-size: 16px;
}

.dropzone strong {
  font-size: 17px;
}

.dropzone small {
  max-width: 280px;
  color: #5b6472;
  font-weight: 450;
  line-height: 1.45;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

button {
  height: 38px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  padding: 0 14px;
  background: #111827;
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

#refresh {
  background: #fff;
  color: #111827;
}

button.secondary {
  background: #fff;
  color: #111827;
  border-color: #c9d2dc;
}

#status {
  color: #4b5563;
  font-size: 13px;
}

#createStatus,
#settingsStatus {
  color: #4b5563;
  font-size: 13px;
}

.code-textarea {
  min-height: 150px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.capability-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.capability-validation {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #f8fafc;
}

.capability-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #e5e7eb;
}

.check.verified {
  color: #05603a;
  background: #d1fadf;
}

.check.plausible {
  color: #7a2e0e;
  background: #ffead5;
}

.check.invalid {
  color: #b42318;
  background: #fee4e2;
}

.capability-validation ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.capability-validation li {
  display: grid;
  gap: 2px;
  padding-left: 8px;
  border-left: 3px solid #d7dee8;
}

.capability-validation li.verified {
  border-color: #12b76a;
}

.capability-validation li.plausible {
  border-color: #f79009;
}

.capability-validation li.invalid {
  border-color: #f04438;
}

.danger-zone {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

button.danger {
  background: #fff;
  color: #b42318;
  border-color: #f3b4ad;
}

.sites {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  overflow-anchor: none;
}

.load-more {
  margin: 16px auto 0;
  min-width: 128px;
}

.site {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 10px;
  align-content: start;
  background: #fff;
  overflow-anchor: none;
}

.site strong {
  display: block;
}

.site small {
  display: block;
  color: #64748b;
  margin-top: 4px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border: 1px solid #d8dee6;
  border-radius: 999px;
  padding: 2px 8px;
  margin-top: 8px;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
}

.auth-required {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.auth-open {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #027a48;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  height: 24px;
  border-color: #d8dee6;
  border-radius: 999px;
  padding: 0 8px;
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
}

.site a {
  color: #155eef;
  text-decoration: none;
  font-weight: 650;
}

.site-preview {
  position: relative;
  display: block;
  height: 168px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  overflow-anchor: none;
}

.site-preview iframe {
  width: 400%;
  height: 400%;
  border: 0;
  transform: scale(0.25);
  transform-origin: top left;
  pointer-events: none;
  background: #fff;
}

.site-meta {
  min-width: 0;
}

.external-link-symbol {
  display: inline-block;
  margin-right: 6px;
  color: #155eef;
  font-weight: 750;
}

.external-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-actions button,
.button-link {
  min-width: 56px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
}

.top-link {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.ai-page {
  margin-bottom: 16px;
}

.ai-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.ai-recent-title {
  margin: 22px 0 12px;
  font-size: 16px;
}

.ai-project-list {
  display: grid;
  gap: 10px;
}

.ai-project-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.ai-project-row strong,
.ai-project-side h3 {
  display: block;
  margin: 0;
}

.ai-project-row small,
.ai-project-side p,
.ai-status {
  color: #667085;
  font-size: 13px;
}

.ai-project-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 16px;
  align-items: stretch;
  height: calc(100vh - 220px);
  min-height: 520px;
  overflow: hidden;
}

.ai-project-side {
  align-self: start;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  max-height: 100%;
  overflow: auto;
  padding: 14px;
  position: sticky;
  top: 16px;
  background: #fbfcfd;
}

.ai-project-actions {
  align-items: stretch;
  flex-direction: column;
  margin: 14px 0;
}

.ai-project-actions .button-link,
.ai-project-actions button {
  width: 100%;
}

.ai-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.ai-messages {
  align-content: start;
  display: grid;
  flex: 1 1 auto;
  gap: 10px;
  margin-bottom: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
}

.ai-messages.empty {
  align-content: center;
}

.ai-message {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.ai-message strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.ai-message pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  color: #344054;
}

.agent-feedback,
.agent-handoff-status,
.agent-message-actions,
.agent-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  color: #475467;
  font-size: 12px;
}

.agent-message-actions button,
.agent-feedback-actions button {
  padding: 6px 10px;
}

.agent-message-actions button.copied {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #067647;
}

.agent-message-actions button.resolved {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #067647;
}

.agent-handoff-status {
  color: #175cd3;
}

.agent-handoff-status.resolved {
  color: #067647;
}

.agent-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: #475467;
}

.agent-evidence strong {
  margin: 0;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef8f2;
  color: #166534;
}

.agent-evidence.partial strong {
  background: #fff8e6;
  color: #92400e;
}

.agent-evidence.fallback strong,
.agent-evidence.none strong {
  background: #f4f4f5;
  color: #52525b;
}

.agent-evidence em {
  color: #667085;
  font-style: normal;
}

.agent-citations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.agent-citations span {
  border: 1px solid #d8dee6;
  border-radius: 999px;
  padding: 3px 8px;
  color: #344054;
  background: #f8fafc;
  font-size: 12px;
}

.agent-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.agent-attachments span {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  max-width: 220px;
  border: 1px solid #d8dee6;
  border-radius: 6px;
  padding: 7px 9px;
  background: #f8fafc;
}

.agent-attachments strong,
.agent-attachments small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-attachments small {
  color: #667085;
  font-size: 12px;
}

.agent-citations.detailed {
  display: grid;
}

.agent-citations.detailed span {
  border-radius: 6px;
  display: grid;
  gap: 3px;
  line-height: 1.35;
}

.agent-citations.detailed strong,
.agent-citations.detailed small,
.agent-citations.detailed em {
  display: block;
}

.agent-citations.detailed small {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.agent-citations.detailed b {
  border-radius: 999px;
  padding: 2px 7px;
  background: #eef2f7;
  color: #344054;
  font-size: 11px;
}

.agent-citations.detailed em {
  color: #667085;
  font-style: normal;
}

#aiMessageStatus,
#aiCreateStatus,
#agentCreateStatus,
#agentSaveStatus,
#agentMessageStatus,
#agentModelStatus {
  color: #4b5563;
  font-size: 13px;
}

.agents-page {
  margin-bottom: 16px;
}

.agent-create-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.agent-create-head {
  display: grid;
  gap: 2px;
}

.agent-create-head strong,
.agent-create-head small {
  display: block;
}

.agent-create-head strong {
  color: #111827;
  font-size: 15px;
}

.agent-create-head small {
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.agent-create-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 240px) auto auto;
  gap: 10px;
}

.agent-template-info {
  display: grid;
  gap: 3px;
  max-width: 760px;
  color: #475467;
  font-size: 13px;
}

.agent-template-info small {
  color: #667085;
}

.agent-template-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.agent-template-starters span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #dde3ea;
  border-radius: 999px;
  padding: 2px 8px;
  background: #ffffff;
  color: #344054;
  font-size: 12px;
}

.agent-create-status {
  display: block;
  min-height: 0;
  color: #667085;
  font-size: 13px;
}

.agent-create-status:not(:empty) {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
}

.agent-create-status.loading {
  border-color: #b2ddff;
  background: #eff8ff;
  color: #175cd3;
}

.agent-create-status.error {
  border-color: #fecdca;
  background: #fffbfa;
  color: #b42318;
}

.agent-create-status.success {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #067647;
}

.agents-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.agents-summary span {
  display: grid;
  gap: 2px;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.agents-summary strong {
  color: #111827;
  font-size: 18px;
  line-height: 1.1;
}

.agents-summary small {
  color: #667085;
  font-size: 12px;
}

.agent-review-queue {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
}

.agent-review-queue-head,
.agent-review-queue-empty {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #f3c56b;
  border-radius: 8px;
  padding: 12px;
  background: #fff8e6;
}

.agent-review-queue strong,
.agent-review-item strong {
  display: block;
  color: #101828;
}

.agent-review-queue small,
.agent-review-item small {
  display: block;
  color: #667085;
  font-size: 13px;
  margin-top: 4px;
}

.agent-review-list {
  display: grid;
  gap: 8px;
}

.agent-review-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #ead6a2;
  border-radius: 8px;
  padding: 12px;
  background: #fffdf7;
}

.agent-acceptance-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  background: #ecfdf3;
  color: #027a48;
}

.agent-acceptance-evidence.warning,
.agent-acceptance-evidence.fallback,
.agent-acceptance-evidence.none {
  background: #fffaeb;
  color: #b54708;
}

.agent-acceptance-evidence strong,
.agent-acceptance-evidence span {
  display: inline;
  color: inherit;
  font-size: 12px;
  margin: 0;
}

.agent-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.agent-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.agent-row strong,
.agent-chat-heading h3 {
  display: block;
  margin: 0;
}

.agent-row small,
.agent-chat-heading p {
  display: block;
  color: #667085;
  font-size: 13px;
  margin-top: 4px;
}

.agent-studio-shell {
  display: grid;
  gap: 14px;
}

.agent-studio-layout {
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(520px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.agent-studio-layout-test {
  grid-template-columns: minmax(520px, 1fr) minmax(320px, 420px);
  min-height: calc(100vh - 300px);
}

.agent-studio-layout-settings {
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.15fr);
}

.agent-tab-panel {
  display: grid;
  gap: 14px;
}

.agent-tab-panel[hidden] {
  display: none;
}

.agent-config {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.agent-definition-card {
  display: grid;
  gap: 12px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.agent-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f6;
}

.agent-section-head div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.agent-section-head span {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.agent-section-head strong {
  color: #111827;
  font-size: 15px;
}

.agent-section-head small {
  max-width: 220px;
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.agent-studio-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  background: #ffffff;
}

.agent-studio-summary div:first-child {
  min-width: 0;
}

.agent-studio-summary small,
.agent-studio-summary span {
  display: block;
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.agent-studio-summary strong {
  display: block;
  margin: 2px 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.agent-studio-summary-state {
  display: block;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid #fedf89;
  border-radius: 8px;
  background: #fffaeb;
  color: #93370d;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.agent-studio-summary-state.ready {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #05603a;
}

.agent-studio-summary-action {
  display: grid;
  justify-items: end;
  gap: 6px;
  flex: 0 0 auto;
}

.agent-studio-summary-action > span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid #fedf89;
  border-radius: 999px;
  background: #fffaeb;
  color: #b54708;
  font-weight: 800;
}

.agent-studio-summary-action > span.ready {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #067647;
}

.agent-studio-summary-action button {
  max-width: 168px;
  height: auto;
  min-height: 34px;
  white-space: normal;
}

.agent-studio-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.agent-studio-path button {
  display: grid;
  gap: 2px;
  justify-items: center;
  height: auto;
  min-height: 52px;
  padding: 9px 12px;
  border-color: #d8dee6;
  background: #ffffff;
  color: #344054;
  text-align: center;
  white-space: normal;
}

.agent-studio-path button.active {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.agent-studio-path span,
.agent-studio-path strong,
.agent-studio-path small {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.agent-studio-path span {
  font-size: 12px;
  font-weight: 800;
}

.agent-studio-path strong {
  color: inherit;
  font-size: 14px;
}

.agent-studio-path small {
  color: inherit;
  opacity: 0.76;
  font-size: 11px;
  line-height: 1.25;
}

.agent-config #agentInstructions {
  min-height: 118px;
}

.agent-model-native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.agent-model-picker {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.agent-model-picker > span,
.agent-model-picker > small {
  color: #667085;
  font-size: 12px;
}

.agent-model-current {
  display: block;
  width: 100%;
  height: auto;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  font-size: 14px;
  font-weight: 750;
  text-align: left;
  overflow-wrap: anywhere;
  white-space: normal;
}

.agent-model-current::after {
  content: "点击切换";
  float: right;
  color: #667085;
  font-size: 12px;
  font-weight: 650;
}

.agent-model-chooser {
  display: grid;
  gap: 10px;
}

.agent-model-chooser[hidden] {
  display: none;
}

.agent-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.model-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 14px;
}

.agent-model-search {
  margin-top: -4px;
}

.agent-model-results {
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow: auto;
  margin: 8px 0 14px;
  padding: 8px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #fbfcfd;
}

.agent-model-results button {
  display: grid;
  gap: 2px;
  justify-items: start;
  height: auto;
  min-height: 44px;
  padding: 8px 10px;
  border-color: #d8dee6;
  background: #ffffff;
  color: #344054;
  text-align: left;
  white-space: normal;
}

.agent-model-results button.active {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.agent-model-results strong,
.agent-model-results small {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.agent-model-results strong {
  font-size: 12px;
}

.agent-model-results small {
  color: inherit;
  opacity: 0.72;
  font-size: 11px;
  line-height: 1.25;
}

.agent-model-results > small {
  color: #667085;
  font-size: 12px;
}

.agent-model-recommendations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 8px 0 14px;
}

.agent-model-recommendations button {
  display: grid;
  gap: 2px;
  justify-items: start;
  min-height: 58px;
  height: auto;
  padding: 8px 10px;
  text-align: left;
  white-space: normal;
}

.agent-model-recommendations strong {
  color: #111827;
  font-size: 12px;
}

.agent-model-recommendations small {
  max-width: 100%;
  color: #667085;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.agent-primary-actions,
.agent-secondary-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.agent-primary-actions button,
.agent-secondary-actions button,
.agent-secondary-actions .button-link {
  min-width: 0;
  white-space: nowrap;
}

.agent-primary-actions {
  justify-content: flex-start;
  margin-top: 0;
  padding: 10px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #ffffff;
}

.agent-primary-actions #agentSaveStatus {
  min-width: min(100%, 160px);
  color: #475467;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.agent-more-actions {
  margin-top: 8px;
}

.agent-more-actions summary {
  width: fit-content;
  cursor: pointer;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.agent-share-status {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
}

.agent-share-status strong,
.agent-share-status small {
  display: block;
  overflow-wrap: anywhere;
}

.agent-share-status strong {
  color: #344054;
  font-size: 13px;
}

.agent-share-status small {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.agent-share-status.ready {
  border-color: #abefc6;
  background: #ecfdf3;
}

.agent-share-status.ready strong {
  color: #067647;
}

.agent-share-status.blocked {
  border-color: #fedf89;
  background: #fffaeb;
}

.agent-share-status.blocked strong {
  color: #b54708;
}

.agent-compact-details {
  margin-top: 8px;
}

.agent-compact-details summary {
  width: fit-content;
  cursor: pointer;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.agent-compact-details label {
  margin-top: 8px;
}

.agent-model-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  margin: -6px 0 14px;
}

.agent-model-info span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #d5dae1;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.agent-model-info small {
  color: #667085;
  font-size: 12px;
}

.agent-disclosure {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.agent-disclosure summary {
  cursor: pointer;
  color: #111827;
  font-weight: 750;
}

.agent-disclosure[open] {
  gap: 10px;
}

.agent-disclosure h3 {
  margin: 0;
  font-size: 14px;
}

.agent-basis-card,
.agent-test-toolbar {
  display: grid;
  gap: 12px;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.agent-basis-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.agent-basis-summary button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  height: auto;
  min-height: 42px;
  padding: 8px 10px;
}

.agent-basis-summary strong {
  color: inherit;
}

.agent-test-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.agent-test-toolbar strong,
.agent-test-toolbar small {
  display: block;
}

.agent-test-toolbar strong {
  color: #111827;
}

.agent-test-toolbar small {
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
}

.agent-assignments {
  min-width: 0;
}

.agent-operations {
  background: #ffffff;
}

.agent-assignments p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

#agentAssignments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-group-list {
  display: grid;
  gap: 8px;
}

.customer-group-list article {
  display: grid;
  gap: 4px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.customer-group-list small {
  color: #667085;
  font-size: 12px;
}

.customer-group-list button {
  justify-self: start;
  margin-right: 6px;
}

.agent-assignments span {
  border: 1px solid #d8dee6;
  border-radius: 999px;
  padding: 3px 8px;
  background: #fff;
  color: #344054;
  font-size: 12px;
}

.agent-assignment-group {
  display: grid;
  gap: 3px;
  min-width: min(100%, 220px);
  border: 1px solid #d8dee6;
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
}

.agent-assignment-group strong {
  font-size: 12px;
  color: #111827;
}

.agent-assignment-group small {
  color: #667085;
  font-size: 12px;
}

.agent-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-launch-radar {
  display: grid;
  gap: 10px;
  margin-top: 0;
  padding: 12px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #ffffff;
}

.agent-launch-radar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.agent-launch-radar-head strong {
  color: #111827;
  font-size: 15px;
}

.agent-launch-radar-head span {
  border: 1px solid #d8dee6;
  border-radius: 999px;
  padding: 2px 7px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

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

.agent-launch-steps button {
  display: grid;
  gap: 2px;
  width: 100%;
  height: auto;
  min-height: 58px;
  padding: 8px 9px;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  background: #fbfcfd;
  color: #344054;
  text-align: left;
  white-space: normal;
}

.agent-launch-steps button.current {
  border-color: #84caff;
  background: #eff8ff;
  color: #175cd3;
}

.agent-launch-steps button.done {
  border-color: #a7f3d0;
  background: #ecfdf3;
  color: #027a48;
}

.agent-launch-steps strong,
.agent-launch-steps small {
  display: block;
}

.agent-launch-steps strong {
  font-size: 13px;
  line-height: 1.25;
}

.agent-launch-steps small {
  color: inherit;
  font-size: 11px;
  line-height: 1.3;
}

.readiness-meter {
  width: fit-content;
  border: 1px solid #d8dee6;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

.customer-status-badge {
  width: fit-content;
  border: 1px solid #d8dee6;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

.customer-status-badge.ready {
  border-color: #a7f3d0;
  background: #ecfdf3;
  color: #027a48;
}

.customer-status-badge.pending {
  border-color: #fedf89;
  background: #fffaeb;
  color: #b54708;
}

.customer-status-badge.blocked {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b42318;
}

.agent-test-status {
  width: fit-content;
  border: 1px solid #fedf89;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fffaeb;
  color: #b54708;
}

.agent-test-status.tested {
  border-color: #a7f3d0;
  background: #ecfdf3;
  color: #027a48;
}

.agent-test-status.partial {
  border-color: #fedf89;
  background: #fffaeb;
  color: #b54708;
}

.agent-test-status.warning {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b42318;
}

.agent-test-status strong,
.agent-test-status small {
  display: block;
}

.agent-test-status small {
  margin-top: 3px;
  color: inherit;
  font-size: 12px;
}

.agent-publish-checks ul,
.agent-customer-status ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-publish-checks li,
.agent-customer-status li {
  color: #667085;
  font-size: 13px;
}

.agent-publish-checks li.ok,
.agent-customer-status li.ok {
  color: #05603a;
}

.agent-publish-checks li.missing,
.agent-customer-status li.missing {
  color: #b42318;
}

.agent-files-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.agent-files-tree {
  display: grid;
  gap: 8px;
}

.agent-file-root {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #475467;
}

.agent-file-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
}

.agent-file-list {
  display: grid;
  align-content: start;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
}

.agent-file-row {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  background: #fff;
  color: #344054;
  text-align: left;
}

.agent-file-row.active {
  border-color: #111827;
  background: #f9fafb;
}

.agent-file-row span {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.agent-file-row small {
  color: #667085;
}

.agent-file-preview {
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: #111827;
  color: #f9fafb;
  font-size: 12px;
  line-height: 1.45;
  min-height: 180px;
  max-height: 320px;
}

.agent-version {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.agent-version strong,
.agent-version small {
  display: block;
}

.agent-version button {
  height: 30px;
  margin-top: 8px;
}

.agent-version-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  border: 1px solid #d8dee6;
  border-radius: 6px;
  padding: 6px 8px;
  background: #fbfcfd;
}

.agent-version-status span {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.agent-version-status small {
  margin: 0;
  color: #667085;
  line-height: 1.35;
  text-align: right;
}

.agent-version-status.active,
.agent-version-status.approved {
  border-color: #abefc6;
  background: #ecfdf3;
}

.agent-version-status.active span,
.agent-version-status.approved span {
  color: #067647;
}

.agent-version-status.pending {
  border-color: #fedf89;
  background: #fffaeb;
}

.agent-version-status.pending span {
  color: #b54708;
}

.agent-version-status.rejected {
  border-color: #fecaca;
  background: #fef2f2;
}

.agent-version-status.rejected span {
  color: #991b1b;
}

.agent-version-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.agent-version-actions button {
  margin-top: 0;
}

.agent-version small {
  color: #667085;
  font-size: 12px;
  margin-top: 4px;
}

.agent-version-review {
  margin: 6px 0 0;
  color: #475467;
  font-size: 12px;
}

.agent-version-diff {
  margin-top: 8px;
  padding: 8px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.agent-version-diff span {
  display: block;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.agent-version-diff ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: #344054;
  font-size: 12px;
}

.agent-version-diff li + li {
  margin-top: 3px;
}

.agent-asset-list {
  display: grid;
  gap: 8px;
}

.agent-asset {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.agent-asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-asset-head span {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.agent-asset-head button {
  padding: 4px 8px;
}

.agent-asset pre {
  max-height: 140px;
  overflow: auto;
  margin: 6px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #344054;
  font: inherit;
  font-size: 13px;
}

.agent-chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
}

.agent-chat .ai-messages {
  min-height: 360px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.agent-test-composer,
.agent-use-composer {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.agent-test-composer textarea {
  min-height: 92px;
}

.agent-test-composer-head {
  display: grid;
  gap: 2px;
}

.agent-test-composer-head strong,
.agent-test-composer-head small {
  display: block;
}

.agent-test-composer-head strong {
  color: #111827;
  font-size: 14px;
}

.agent-test-composer-head small {
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.agent-use-composer textarea {
  min-height: 104px;
}

.agent-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-composer-actions span {
  color: #667085;
  font-size: 13px;
}

.agent-chat-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.agent-chat-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.agent-chat-heading-actions button {
  min-width: max-content;
}

.agent-thread-list {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 2px;
}

.agent-thread {
  display: grid;
  gap: 2px;
  min-width: 160px;
  height: auto;
  justify-items: start;
  border-color: #d8dee6;
  background: #fff;
  color: #344054;
  padding: 8px 10px;
  text-align: left;
}

.agent-thread.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.agent-thread span {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-thread small {
  color: inherit;
  font-size: 11px;
  opacity: 0.75;
}

.agent-chat-files {
  display: grid;
  gap: 6px;
}

.agent-chat-files input {
  min-height: 40px;
  padding: 8px;
}

.agent-chat-files small {
  color: #667085;
  font-size: 12px;
}

.agent-use-page,
.agent-portal-page {
  max-width: 880px;
  margin: 0 auto;
}

.agent-use-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 160px);
}

.agent-use-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.agent-use-header h2 {
  margin-bottom: 0;
}

.agent-portal-tools {
  display: grid;
  grid-template-columns: minmax(180px, 320px);
  gap: 8px;
  margin-bottom: 12px;
}

.agent-portal-summary {
  display: grid;
  gap: 3px;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #fbfcfd;
}

.agent-portal-summary strong,
.agent-portal-summary small {
  display: block;
}

.agent-portal-summary strong {
  color: #111827;
  font-size: 14px;
}

.agent-portal-summary small {
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.agent-portal-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.agent-portal-card-main {
  min-width: 0;
}

.agent-portal-card strong,
.agent-portal-card small {
  display: block;
}

.agent-portal-card strong {
  color: #111827;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.agent-portal-card small {
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 4px;
}

.agent-portal-card .button-link {
  flex: 0 0 auto;
}

.agent-portal-empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  border: 1px dashed #c9d2dc;
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfd;
}

.agent-portal-empty strong,
.agent-portal-empty small {
  display: block;
}

.agent-portal-empty strong {
  color: #111827;
  font-size: 15px;
}

.agent-portal-empty small {
  max-width: 520px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.agent-use-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.agent-use-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
}

.agent-use-capabilities {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.agent-use-capabilities article {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.agent-use-capabilities strong,
.agent-use-capabilities small {
  display: block;
}

.agent-use-capabilities small {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 4px;
}

.agent-use-status-panel {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #f0fdf4;
}

.agent-use-status-panel.warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.agent-use-status-panel.blocked {
  border-color: #fecaca;
  background: #fef2f2;
}

.agent-use-status-panel.unavailable span {
  background: #fee2e2;
  color: #991b1b;
}

.agent-use-status-panel strong,
.agent-use-status-panel small {
  display: block;
}

.agent-use-status-panel small {
  color: #667085;
  font-size: 12px;
  margin-top: 3px;
}

.agent-use-status-panel span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.agent-use-context {
  margin-bottom: 10px;
}

.agent-use-context summary {
  width: fit-content;
  cursor: pointer;
  color: #475467;
  font-size: 13px;
  font-weight: 750;
}

.agent-portal-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.agent-portal-capabilities span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.agent-thread-strip,
.agent-use-thread-strip {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.agent-thread-strip summary,
.agent-use-thread-strip summary {
  width: fit-content;
  cursor: pointer;
  color: #475467;
  font-size: 13px;
  font-weight: 750;
}

.agent-thread-strip:not([open]),
.agent-use-thread-strip:not([open]) {
  margin-bottom: 8px;
}

.agent-thread-strip .agent-thread-list,
.agent-use-thread-strip .agent-thread-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.agent-use-thread-strip .agent-thread {
  min-width: 180px;
}

body.agent-embed-mode {
  background: #ffffff;
}

body.agent-embed-mode .topbar,
body.agent-embed-mode #loginPanel,
body.agent-embed-mode .agent-use-context,
body.agent-embed-mode .agent-chat-heading-actions #exportAgentUseTranscript {
  display: none !important;
}

body.agent-embed-mode .shell {
  max-width: none;
  min-height: 100vh;
  padding: 0;
}

body.agent-embed-mode .panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.agent-embed-mode .agent-use-page {
  max-width: none;
}

body.agent-embed-mode .agent-use-shell {
  min-height: 100vh;
  padding: 16px;
}

body.agent-embed-mode .agent-use-header {
  margin-bottom: 10px;
}

body.agent-embed-mode .agent-use-thread-strip {
  margin-bottom: 8px;
}

.agent-starters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  align-content: start;
}

.ai-messages.empty .agent-starters {
  align-self: center;
  width: min(100%, 720px);
}

.agent-use-guide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.agent-use-guide article {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfd;
}

.agent-unavailable-state {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(100%, 520px);
  border: 1px dashed #fecaca;
  border-radius: 8px;
  padding: 20px;
  background: #fef2f2;
  text-align: center;
}

.agent-unavailable-state strong,
.agent-unavailable-state small {
  display: block;
}

.agent-unavailable-state strong {
  color: #991b1b;
  font-size: 15px;
}

.agent-unavailable-state small {
  color: #7f1d1d;
  line-height: 1.45;
}

.agent-use-guide strong,
.agent-use-guide small {
  display: block;
  overflow-wrap: anywhere;
}

.agent-use-guide small {
  color: #667085;
  margin-top: 4px;
}

.agent-use-file-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f9fafb;
  padding: 10px 12px;
}

.agent-use-file-summary strong,
.agent-use-file-summary small {
  display: block;
  overflow-wrap: anywhere;
}

.agent-use-file-summary small {
  color: #667085;
  margin-top: 4px;
}

.agent-use-file-summary button {
  flex: 0 0 auto;
}

.agent-use-draft-advice {
  border: 1px solid #f4c56a;
  border-radius: 8px;
  background: #fff9e8;
  color: #5c4300;
  padding: 10px 12px;
}

.agent-use-draft-advice strong {
  display: block;
  margin-bottom: 6px;
}

.agent-use-draft-advice ul {
  margin: 0;
  padding-left: 18px;
}

.agent-use-draft-advice li {
  margin: 3px 0;
}

.agent-starters button {
  height: auto;
  min-height: 42px;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
}

.agent-usage-summary,
.agent-usage-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.agent-usage-summary span,
.agent-usage-days span {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fbfcfd;
  font-size: 12px;
}

.agent-usage-summary span.warning {
  border-color: #f2b8a0;
  background: #fff5f0;
  color: #9a3412;
}

.agent-usage-scopes {
  display: grid;
  gap: 8px;
}

.agent-usage-scopes article {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.agent-usage-scopes strong,
.agent-usage-scopes small {
  display: block;
  overflow-wrap: anywhere;
}

.agent-feedback-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.agent-feedback-summary span {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fbfcfd;
  font-size: 12px;
}

.agent-feedback-summary span.feedback-health.attention {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b42318;
}

.agent-feedback-summary span.feedback-health.watch {
  border-color: #fedf89;
  background: #fffaeb;
  color: #b54708;
}

.agent-feedback-summary span.feedback-health.healthy {
  border-color: #a7f3d0;
  background: #ecfdf3;
  color: #027a48;
}

.agent-feedback-trend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.agent-feedback-trend span {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}

.agent-feedback-trend strong,
.agent-feedback-trend small {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.agent-feedback-trend small {
  color: #667085;
  margin-top: 2px;
}

.agent-feedback-recommendations {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.agent-feedback-recommendations article {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.agent-feedback-recommendations article.high {
  border-color: #fecaca;
  background: #fff7f7;
}

.agent-feedback-recommendations article.medium {
  border-color: #fedf89;
  background: #fffcf5;
}

.agent-feedback-recommendations strong,
.agent-feedback-recommendations small {
  display: block;
  overflow-wrap: anywhere;
}

.agent-feedback-recommendations small {
  color: #475467;
  margin-top: 4px;
}

.agent-feedback-recommendations button {
  height: 32px;
  margin-top: 8px;
  padding: 0 10px;
}

.agent-feedback-list,
.agent-notification-list {
  display: grid;
  gap: 8px;
}

.agent-feedback-list article,
.agent-notification-list article {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.agent-feedback-list strong,
.agent-feedback-list small,
.agent-notification-list strong,
.agent-notification-list small {
  display: block;
  overflow-wrap: anywhere;
}

.agent-feedback-list p,
.agent-notification-list p {
  margin: 6px 0 0;
  color: #475467;
  font-size: 12px;
}

.agent-feedback-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}

.agent-feedback-evidence span {
  border: 1px solid #abefc6;
  border-radius: 999px;
  padding: 2px 7px;
  background: #ecfdf3;
  color: #067647;
  font-size: 12px;
  font-weight: 800;
}

.agent-feedback-evidence small {
  color: #667085;
  font-size: 12px;
}

.agent-feedback-evidence.fallback span,
.agent-feedback-evidence.none span {
  border-color: #fedf89;
  background: #fffaeb;
  color: #b54708;
}

.agent-feedback-card-actions,
.agent-notification-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.agent-feedback-card-actions button,
.agent-notification-actions button {
  height: 32px;
  padding: 0 10px;
}

.agent-activity-list {
  display: grid;
  gap: 8px;
}

.agent-activity-list article {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.agent-activity-list strong,
.agent-activity-list small {
  display: block;
  overflow-wrap: anywhere;
}

.agent-activity-list p {
  margin: 6px 0 0;
  color: #475467;
  font-size: 12px;
}

.data-panel {
  grid-column: 1 / -1;
}

.data-controls {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.data-items {
  display: grid;
  gap: 10px;
}

.data-item {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.data-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.data-item code {
  font-size: 13px;
  word-break: break-all;
}

.data-item pre {
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: #111827;
  color: #f9fafb;
  font-size: 12px;
  line-height: 1.45;
}

.data-item button {
  background: #fff;
  color: #111827;
  border-color: #c9d2dc;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(15, 23, 42, 0.38);
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 30;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
}

.modal-wide {
  width: min(920px, calc(100vw - 32px));
}

.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal header h2 {
  margin-bottom: 0;
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border-color: #c9d2dc;
  background: #fff;
  color: #111827;
  font-size: 22px;
  line-height: 1;
}

@media (max-width: 1180px) {
  .agent-studio-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .top-actions button {
    flex: 1;
  }

  .create-grid {
    grid-template-columns: 1fr;
  }

  .login-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .site-filters {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .data-controls {
    grid-template-columns: 1fr;
  }

  .ai-create-grid,
  .ai-project-layout,
  .agent-studio-layout,
  .agent-studio-layout-test,
  .agent-studio-layout-settings,
  .agent-config-grid,
  .agent-create-row,
  .agent-use-capabilities,
  .agent-basis-summary {
    grid-template-columns: 1fr;
  }

  .agents-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-studio-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-section-head small {
    max-width: none;
    text-align: left;
  }

  .agent-studio-summary-action {
    justify-items: stretch;
  }

  .agent-studio-summary-action button {
    max-width: none;
  }

  .agent-studio-path {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .agent-launch-steps {
    grid-template-columns: 1fr;
  }

  .agent-primary-actions button {
    flex: 1 1 120px;
  }

  .agent-version-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .agent-version-status small {
    text-align: left;
  }

  .agent-portal-card {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-portal-card .button-link {
    width: fit-content;
  }

  .agent-composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-composer-actions button {
    width: fit-content;
  }

  .ai-project-layout {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .ai-project-side {
    max-height: none;
    position: static;
  }

  .ai-messages {
    max-height: 58vh;
  }

  .agent-row {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-primary-actions,
  .agent-secondary-actions,
  .agent-chat-heading,
  .agent-chat-heading-actions,
  .agent-test-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .token-input {
    width: 100%;
  }
}
