.agent-workspace {
  display: grid;
  grid-template-columns: minmax(164px, 220px) minmax(0, 1fr);
  height: clamp(460px, 76vh, 980px);
  min-height: 0;
  border: 1px solid #dce5df;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.agent-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  border-right: 1px solid #dce5df;
  background: #f7faf8;
}
.agent-sidebar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px 8px;
  gap: 6px;
}
.studio .agent-sidebar-tools label {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 3px;
  font-size: 11px;
  color: #62786c;
}
.studio .agent-sidebar-tools input {
  width: auto;
  margin: 0;
}
.studio .agent-add {
  font-size: 12px;
  padding: 6px 8px;
  color: #214c3f;
  background: #e8f1ec;
  border-color: #d4e5db;
}
.agent-sessions {
  min-height: 0;
  overflow: auto;
  padding: 0 7px 8px;
}
.agent-sidebar > select {
  display: none;
}
.studio .agent-session {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #344d41;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  padding: 9px 10px;
}
.studio .agent-session:hover,
.studio .agent-session.active {
  background: #e6efe9;
  color: #133b2f;
}
.agent-room {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.agent-room-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  flex: none;
  padding: 10px 17px;
  border-bottom: 1px solid #edf1ee;
  gap: 8px;
}
.agent-room-title > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.agent-room-actions {
  display: flex;
  flex: none;
}
.studio .agent-room-actions button {
  min-height: 26px;
  font-size: 11px;
  padding: 3px 5px;
}
.agent-transcript {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px clamp(14px, 4vw, 48px);
}
.agent-empty {
  height: 100%;
  min-height: 90px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
  color: #496758;
  font-size: 13px;
}
.agent-empty strong {
  color: #153d31;
  font-size: 18px;
}
.agent-message {
  margin-bottom: 15px;
  overflow-wrap: anywhere;
  padding: 8px 0;
  font-size: 14px;
}
.agent-user {
  width: fit-content;
  max-width: 94%;
  margin-left: auto;
  padding: 10px 14px;
  border-radius: 12px 12px 4px 12px;
  background: #ecf4ef;
}
.agent-author {
  color: #62786c;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}
.agent-message-text {
  white-space: pre-wrap;
  line-height: 1.6;
}
.agent-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agent-media {
  width: fit-content;
  min-width: 84px;
  max-width: min(100%, 360px);
  margin: 8px 0 0;
}
.agent-media img,
.agent-media video {
  display: block;
  border-radius: 8px;
  max-width: 100%;
  max-height: 350px;
  background: #f2f6f3;
}
.agent-media figcaption {
  margin-top: 4px;
  font-size: 12px;
}
.agent-media a {
  color: #215947;
}
.agent-pulse,
.agent-status,
.agent-muted {
  color: #62796d;
  font-size: 12px;
}
.agent-status,
.agent-room > .agent-error {
  padding: 0 15px 4px;
}
.agent-status:empty {
  display: none;
}
.agent-error {
  margin-top: 6px;
  color: #992c37;
  font-size: 12px;
}
.agent-draft-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 7px;
  background: #f2f7f4;
  color: #315d4d;
  font-size: 12px;
}
.agent-compose {
  border: 1px solid #d6e3db;
  border-radius: 12px;
  background: #fff;
  margin: 6px 13px 12px;
  padding: 8px;
}
.studio .agent-compose textarea {
  width: 100%;
  min-height: 62px;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  resize: vertical;
  max-height: min(220px, 25vh);
}
.agent-compose-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.studio .agent-compose-tools select,
.studio .agent-compose-tools input {
  max-width: 185px;
  min-width: 0;
  padding: 5px 7px;
  min-height: 28px;
  font-size: 11px;
}
.agent-send-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.studio .agent-send-actions button,
.studio .agent-apply {
  padding: 5px 9px;
  min-height: 29px;
  font-size: 12px;
}
.agent-advanced {
  color: #406353;
  font-size: 11px;
}
.agent-advanced summary {
  cursor: pointer;
  padding: 5px;
}
.agent-advanced[open] {
  min-width: min(280px, 100%);
}
.agent-parameters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 5px;
}
.studio .agent-parameters input,
.studio .agent-parameters select {
  width: 100%;
}
.agent-files {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.agent-file {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid #dae7de;
  border-radius: 7px;
  color: #385d4c;
  background: #f4f8f5;
  font-size: 11px;
  padding-left: 7px;
  overflow-wrap: anywhere;
}
.studio .agent-file button {
  padding: 3px 7px;
}
.agent-embedded {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 330px;
  border-width: 0 0 0 1px;
  border-radius: 0;
}
.agent-embedded .agent-sidebar {
  display: flex;
  flex: none;
  flex-direction: row;
  align-items: center;
  padding: 5px 7px;
  gap: 6px;
  border-right: 0;
}
.agent-embedded .agent-sidebar-tools {
  padding: 0;
}
.agent-embedded .agent-sidebar > select {
  display: block;
  min-width: 56px;
  max-width: 140px;
  width: 100%;
}
.agent-embedded .agent-sessions {
  display: none;
}
.agent-embedded .agent-room {
  flex: 1;
}
.agent-embedded .agent-room-title {
  padding: 7px;
}
.agent-embedded .agent-transcript {
  padding: 8px;
}
.agent-embedded .agent-compose {
  margin: 5px;
}
@media (max-width: 700px) {
  .agent-workspace:not(.agent-embedded) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .agent-sidebar {
    border-right: 0;
  }
  .agent-sidebar > select {
    display: block;
    margin: 0 8px 7px;
  }
  .agent-sessions {
    display: none;
  }
  .agent-room-title {
    padding: 6px;
  }
  .agent-compose {
    margin-left: 6px;
    margin-right: 6px;
  }
}
