.task-workspace {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 32px clamp(16px, 4vw, 54px);
}
.task-workspace h1 {
  font-size: clamp(28px, 4vw, 46px);
  margin: 12px 0;
}
.task-workspace .page-heading p,
.task-workspace small {
  color: var(--muted);
  line-height: 1.7;
}
.task-queue-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-size: 12px;
}
.task-create {
  margin: 24px 0;
  background: #111621;
  border: 1px solid #31575e;
  border-radius: 16px;
  padding: 20px;
}
.task-create label {
  display: block;
  font-size: 15px;
  margin-bottom: 12px;
}
.task-create textarea {
  width: 100%;
  min-height: 92px;
  max-height: 240px;
  resize: vertical;
  border: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.7;
  color: var(--white);
}
.task-create > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}
.task-create .primary {
  white-space: nowrap;
  min-height: 44px;
}
.task-columns {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.5fr);
  gap: 24px;
  align-items: start;
}
.task-list h2 {
  font-size: 17px;
  margin: 0 0 14px;
}
.task-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  gap: 10px;
  border: 1px solid var(--line);
  background: #10141e;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.task-card b {
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.task-card.selected {
  border-color: var(--cyan);
  box-shadow: inset 3px 0 var(--cyan);
  background: #112027;
}
.task-card small {
  font-size: 11px;
}
.task-state {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  padding: 4px 9px;
  border: 1px solid #34464f;
  border-radius: 5px;
  color: #a4bac4;
  background: #101a24;
}
.task-state.running {
  color: var(--cyan);
  border-color: #316b69;
}
.task-state.completed {
  color: #9ce4c7;
}
.task-state.failed,
.task-state.needs_attention {
  color: #efacbd;
  border-color: #745366;
}
.task-detail {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  background: #10141dc9;
  border-radius: 16px;
}
.task-detail-heading h2 {
  font-size: 20px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.task-detail-heading p {
  color: var(--muted);
  font-size: 12px;
}
.task-back {
  display: none;
  font-size: 12px;
  margin-bottom: 12px;
  min-height: 44px;
}
.task-detail details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.task-detail summary {
  cursor: pointer;
  font-size: 13px;
  line-height: 1.8;
}
.task-prompt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.8;
}
.task-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.task-actions button {
  font-size: 12px;
  min-height: 44px;
}
.task-error {
  border: 1px solid #754654;
  background: #221623;
  color: #f3bbc9;
  padding: 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.8;
}
.task-traces {
  list-style: none;
  padding: 0;
}
.task-traces li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 1.8;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.task-traces li .ui-icon {
  flex-shrink: 0;
  color: var(--cyan);
}
.task-traces li.failed .ui-icon {
  color: #efacbd;
}
.task-traces li small {
  margin-left: auto;
  white-space: nowrap;
}
.task-result {
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.task-result pre,
.task-result table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}
.task-empty {
  padding: 32px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.task-empty h3 {
  color: var(--white);
  font-size: 16px;
}
.task-empty .ui-icon {
  color: #7f91a7;
}
.task-note {
  display: block;
  font-size: 11px;
  margin-top: 16px;
}
.task-more {
  width: 100%;
  margin: 12px 0;
}
.background-chat-button {
  font-size: 12px;
  min-height: 44px;
  white-space: nowrap;
}
@container workspace (max-width:50rem) {
  .task-columns {
    grid-template-columns: 1fr;
  }
  .task-create > div {
    align-items: flex-start;
    flex-direction: column;
  }
  .task-create .primary {
    align-self: flex-end;
  }
  .task-detail {
    padding: 18px;
  }
}
@media (max-width: 1023px) {
  .task-back {
    display: inline-flex;
  }
  .composer-actions {
    flex-wrap: wrap;
  }
  .task-workspace {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}
