.assistant-panel {
  display: flex;
  flex-direction: column;
  position: relative;
  gap: 10px;
  min-width: 0;
  height: 100%;
  padding: 12px 14px;
  color: var(--text-muted);
  background: var(--chrome);
  border-right: 0;
  border-left: 1px solid var(--border);
  transform: translateX(0);
  transition:
    opacity 120ms ease-out,
    transform 180ms cubic-bezier(0.2, 0, 0, 1);
  will-change: opacity, transform;
}

.assistant-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-height: 28px;
  color: var(--text-muted);
}

.assistant-topbar h2 {
  margin: 0 auto 0 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.assistant-toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  color: var(--text-muted);
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
}

.assistant-toolbar-button:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.assistant-toolbar-button:disabled {
  color: var(--text-faint);
  cursor: not-allowed;
}

.assistant-toolbar-button:disabled:hover {
  background: transparent;
}

.assistant-tasks {
  display: grid;
  gap: 8px;
  min-height: 0;
  color: var(--text-muted);
}

.assistant-tasks header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assistant-tasks header span {
  font-size: 14px;
}

.assistant-tasks header small,
.assistant-tasks p {
  margin: 0;
  color: var(--text-faint);
  font-size: 12px;
}

.assistant-view-all-button {
  min-width: 0;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.assistant-view-all-button:not(:disabled):hover {
  color: var(--text);
  text-decoration: underline;
}

.assistant-view-all-button:disabled {
  color: var(--text-faint);
  cursor: not-allowed;
}

.assistant-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 26px;
  padding: 0 4px;
  color: var(--text-muted);
  text-align: left;
  background: transparent;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
}

.assistant-task-row:hover {
  background: var(--surface-muted);
}

.assistant-task-row span,
.assistant-task-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-task-row small {
  color: var(--text-faint);
}

.assistant-chat-history-panel {
  grid-template-rows: auto minmax(0, 1fr);
  flex: 1 1 auto;
}

.assistant-context {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px;
  color: var(--text-muted);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.active-session-hint {
  align-items: center;
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--text) 10%, transparent);
}

.active-session-hint > .connection-icon-shell {
  flex: 0 0 auto;
}

.assistant-extension-context {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--green);
}

.assistant-dashboard-tools-context {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: var(--amber);
}

.assistant-setup-hint {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid var(--amber);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.assistant-setup-hint span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.assistant-setup-hint strong,
.assistant-setup-hint small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-chat-log {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px 2px 10px;
}

.assistant-chat-log-condensed {
  flex: 0 0 auto;
  padding: 0;
}

.assistant-message {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.assistant-message-content {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.assistant-message-bubble {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.assistant-message-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 16px;
  color: var(--text-faint);
  opacity: 0;
  pointer-events: none;
  font-size: 9px;
  font-weight: 700;
  visibility: hidden;
}

.assistant-message:hover .assistant-message-actions,
.assistant-message:focus-within .assistant-message-actions {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.assistant-message-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  color: var(--text-muted);
  background: var(--surface-muted);
  border-radius: 4px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.assistant-message-actions button:hover {
  color: var(--text);
  background: var(--border);
}

.assistant-message.user {
  display: grid;
  justify-items: end;
  align-self: stretch;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: left;
}

.assistant-message.user .assistant-message-content {
  justify-items: end;
  width: 100%;
}

.assistant-message.user .assistant-message-bubble {
  display: inline-grid;
  justify-items: start;
  justify-self: end;
  box-sizing: border-box;
  min-width: 0;
  width: fit-content;
  max-width: 70%;
  vertical-align: top;
  padding: 8px 10px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.assistant-message.user .markdown-content {
  justify-items: start;
  min-width: 0;
  width: auto;
  max-width: 100%;
}

.assistant-message.user .markdown-content > :not(.markdown-code-block) {
  justify-self: start;
  max-width: 100%;
  text-align: left;
  overflow-wrap: anywhere;
}

.assistant-message.user .assistant-message-actions {
  justify-self: end;
  justify-content: flex-end;
}

.assistant-message-text-attachments {
  display: grid;
  gap: 7px;
  width: min(100%, 360px);
  margin-left: auto;
  margin-bottom: 7px;
  text-align: left;
}

.assistant-message-text-attachment {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.assistant-message-text-attachment figcaption {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-message-text-attachment pre {
  max-height: 132px;
  padding: 8px;
  color: #dce7f5;
  background: var(--terminal);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.assistant-message-attachments {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  width: auto;
  max-width: 100%;
  margin-left: auto;
  margin-bottom: 7px;
}

.assistant-message-attachment {
  display: grid;
  gap: 4px;
  flex: 0 0 64px;
  min-width: 0;
  width: 64px;
  margin: 0;
}

.assistant-message-attachment-button {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.assistant-message-attachment-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.assistant-message-attachment img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--terminal);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.assistant-message-attachment figcaption {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-image-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(15, 23, 42, 0.62);
}

.assistant-image-preview-dialog {
  display: grid;
  gap: 12px;
  width: min(100%, 420px);
  max-height: calc(100vh - 52px);
  padding: 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.assistant-image-preview-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.assistant-image-preview-dialog header > div {
  display: grid;
  min-width: 0;
}

.assistant-image-preview-dialog strong,
.assistant-image-preview-dialog small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-image-preview-dialog small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.assistant-image-preview-dialog img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  background: var(--terminal);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.assistant-message-bubble-truncated {
  max-height: calc(10 * 1.5em);
  overflow: hidden;
}

.assistant-message-expand {
  justify-self: end;
  padding: 0;
  color: var(--accent);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.assistant-message-expand:hover {
  text-decoration: underline;
}

.assistant-waiting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  width: fit-content;
  max-width: 92%;
  padding: 8px 10px;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 700;
}

.assistant-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: assistant-spinner-spin 0.78s linear infinite;
}

.assistant-waiting-dots {
  display: inline-block;
  min-width: 0.95em;
}

.assistant-chat-history-list {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
}

.assistant-chat-history-row-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 4px;
  align-items: start;
  min-width: 0;
}

.assistant-chat-history-row {
  display: grid;
  gap: 3px;
  min-width: 0;
  width: 100%;
  padding: 8px;
  color: var(--text);
  text-align: left;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
}

.assistant-chat-history-row:hover {
  background: var(--surface-muted);
}

.assistant-chat-history-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: 3px;
  color: var(--red);
  background: transparent;
  border-radius: 5px;
  cursor: pointer;
}

.assistant-chat-history-delete:hover {
  color: var(--red);
  background: var(--surface-muted);
}

.assistant-chat-history-row strong,
.assistant-chat-history-row span,
.assistant-chat-history-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-chat-history-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.assistant-chat-history-row span,
.assistant-chat-history-row small {
  color: var(--text-muted);
  font-size: 12px;
}

.markdown-content {
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.markdown-content > * {
  min-width: 0;
  max-width: 100%;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6,
.markdown-content p,
.markdown-content ul,
.markdown-content ol,
.markdown-content blockquote,
.markdown-content table {
  margin: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  color: var(--text);
  line-height: 1.35;
}

.markdown-content h1 { font-size: 17px; }
.markdown-content h2 { font-size: 15px; }
.markdown-content h3 { font-size: 14px; }
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 { font-size: 13px; }

.markdown-content ul,
.markdown-content ol {
  padding-left: 18px;
}

.markdown-content blockquote {
  padding-left: 10px;
  color: var(--text-muted);
  border-left: 3px solid var(--border);
}

.markdown-content :not(pre) > code {
  padding: 1px 4px;
  color: var(--text);
  background: var(--surface-muted);
  border-radius: 4px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
}

.markdown-content a {
  color: var(--accent);
}

.markdown-content hr {
  border: 0;
  border-top: 1px solid var(--border);
}

.markdown-content table {
  border-collapse: collapse;
  font-size: 12px;
}

.markdown-content th,
.markdown-content td {
  padding: 3px 8px;
  border: 1px solid var(--border);
  text-align: left;
}

.markdown-content th {
  background: var(--surface-muted);
  font-weight: 700;
}

.markdown-content img {
  max-width: 100%;
  border-radius: 6px;
}

.assistant-secret-card-stack {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.assistant-secret-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.assistant-secret-card header {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.assistant-secret-card header svg {
  margin-top: 2px;
  color: var(--accent);
}

.assistant-secret-card header div,
.assistant-secret-card label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.assistant-secret-card strong,
.assistant-secret-card small,
.assistant-secret-card p,
.assistant-secret-card label span,
.assistant-secret-card footer span {
  overflow-wrap: anywhere;
}

.assistant-secret-card strong {
  font-size: 13px;
  line-height: 1.35;
}

.assistant-secret-card small,
.assistant-secret-card p,
.assistant-secret-card label span,
.assistant-secret-card footer span {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.assistant-secret-card p {
  margin: 0;
}

.assistant-secret-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: center;
}

.assistant-secret-input-row input {
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
}

.assistant-secret-input-row input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.assistant-secret-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.assistant-secret-icon-button:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.assistant-secret-card footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.assistant-secret-card footer .toolbar-button {
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  white-space: nowrap;
}

.assistant-work-panel {
  display: grid;
  gap: 0;
  width: 100%;
  color: var(--text-muted);
}

.assistant-work-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 4px 0 7px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

.assistant-work-toggle:hover {
  color: var(--text);
}

.assistant-work-tool-label {
  color: var(--accent);
}

.assistant-work-skill-label {
  color: #15803d;
}

.assistant-work-toggle svg {
  flex: 0 0 auto;
}

.assistant-work-timeline {
  display: grid;
  gap: 7px;
  padding: 8px 0 10px;
}

.assistant-work-step {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  min-width: 0;
}

.assistant-work-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--text-faint);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

.assistant-work-step[data-state="completed"] .assistant-work-step-icon::after {
  width: 6px;
  height: 6px;
  content: "";
  background: var(--text-faint);
  border-radius: 50%;
}

.assistant-work-step[data-state="skill"] .assistant-work-step-icon {
  color: #15803d;
  border-color: rgba(21, 128, 61, 0.38);
}

.assistant-work-step[data-state="skill"] .assistant-work-step-icon::after {
  width: 6px;
  height: 6px;
  content: "";
  background: #15803d;
  border-radius: 50%;
}

.assistant-work-step[data-state="skill"] strong {
  color: #15803d;
}

.assistant-work-step[data-state="running"] .assistant-work-step-icon svg {
  animation: assistant-tool-call-spin 0.8s linear infinite;
}

.assistant-work-plan-steps {
  display: grid;
  gap: 3px;
  margin: 3px 0 0;
  padding: 0 0 0 14px;
  list-style: none;
}

.assistant-work-plan-steps li {
  position: relative;
  display: grid;
  gap: 1px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.assistant-work-plan-steps li::before {
  position: absolute;
  left: -13px;
  top: 5px;
  width: 7px;
  height: 7px;
  content: "";
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

.assistant-work-plan-steps li[data-state="completed"]::before {
  background: var(--text-faint);
}

.assistant-work-plan-steps li[data-state="running"]::before {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.55);
}

.assistant-work-plan-steps li[data-state="blocked"]::before {
  border-color: #b91c1c;
  background: rgba(185, 28, 28, 0.55);
}

.assistant-work-plan-steps li[data-state="completed"] span {
  color: var(--text-faint);
}

.assistant-work-plan-steps li small {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 600;
}

.assistant-work-step > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.assistant-work-step strong {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.assistant-work-step small {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 700;
}

.assistant-work-reasoning {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.assistant-work-reasoning .markdown-content {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.assistant-work-reasoning .markdown-content > div,
.assistant-work-reasoning .markdown-content p,
.assistant-work-reasoning .markdown-content ul,
.assistant-work-reasoning .markdown-content ol,
.assistant-work-reasoning .markdown-content blockquote {
  margin-bottom: 6px;
}

.assistant-work-reasoning .markdown-content > :last-child,
.assistant-work-reasoning .markdown-content > div:last-child > :last-child {
  margin-bottom: 0;
}

.assistant-work-reasoning .markdown-content h1,
.assistant-work-reasoning .markdown-content h2,
.assistant-work-reasoning .markdown-content h3,
.assistant-work-reasoning .markdown-content h4,
.assistant-work-reasoning .markdown-content h5,
.assistant-work-reasoning .markdown-content h6 {
  color: var(--text-muted);
  font-size: 12px;
}

.assistant-work-reasoning .markdown-code-block {
  margin: 4px 0;
}

@keyframes assistant-tool-call-spin {
  to {
    transform: rotate(360deg);
  }
}

.markdown-code-block {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #202124;
  border: 1px solid #32343a;
  border-radius: 8px;
}

.markdown-code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  padding: 0 8px;
  color: #bdc1c6;
  background: #2b2c31;
  border-bottom: 1px solid #3a3c42;
  font-size: 11px;
  font-weight: 700;
}

.markdown-code-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.assistant-code-send {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  color: #e8eaed;
  background: #3a3c42;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.assistant-code-send:hover {
  background: #4a4d55;
}

.assistant-code-send:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.assistant-code-send:disabled:hover {
  background: #3a3c42;
}

.markdown-code-block pre {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  color: #e8eaed;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.assistant-chat-composer {
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  min-width: 0;
  padding: 13px 14px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.assistant-chat-composer textarea {
  width: 100%;
  min-width: 0;
  min-height: calc(3lh * 1.5);
  resize: none;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
  line-height: 1.45;
}

.assistant-chat-composer textarea::placeholder {
  color: var(--text-faint);
}

.assistant-chat-composer textarea:disabled {
  cursor: not-allowed;
}

.assistant-image-support-notice {
  margin: 0;
  padding: 7px 9px;
  color: var(--text-muted);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.35;
}

.assistant-prompt-queue {
  display: grid;
  gap: 6px;
}

.assistant-prompt-queue-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 24px;
  gap: 7px;
  align-items: center;
  min-height: 30px;
  padding: 5px 6px 5px 8px;
  color: var(--text-muted);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
}

.assistant-prompt-queue-index {
  color: var(--text-faint);
  font-weight: 800;
}

.assistant-prompt-queue-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-prompt-queue-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.assistant-prompt-queue-delete:hover {
  color: var(--red);
  background: rgba(248, 113, 113, 0.12);
}

.assistant-intent-composer {
  display: grid;
  gap: 7px;
  justify-items: start;
  width: 100%;
  min-width: 0;
}

.assistant-intent-chip,
.assistant-message-intent-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  color: var(--intent-color, var(--accent));
  background: var(--intent-bg, var(--accent-soft));
  border: 1px solid var(--intent-color, var(--accent));
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.assistant-intent-chip {
  gap: 6px;
  padding: 5px 6px 5px 8px;
}

.assistant-message-intent-label {
  margin-bottom: 6px;
  padding: 5px 8px;
}

.assistant-intent-chip[data-intent="createWidget"],
.assistant-message-intent-label[data-intent="createWidget"] {
  --intent-color: var(--green);
  --intent-bg: var(--green-soft);
}

.assistant-intent-chip[data-intent="watchdog"],
.assistant-message-intent-label[data-intent="watchdog"] {
  --intent-color: var(--amber);
  --intent-bg: var(--amber-soft);
}

.assistant-intent-chip[data-intent="extensionCreation"],
.assistant-message-intent-label[data-intent="extensionCreation"] {
  --intent-color: var(--green);
  --intent-bg: var(--green-soft);
}

.assistant-intent-chip span,
.assistant-message-intent-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-intent-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  color: inherit;
  background: rgb(255 255 255 / 18%);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.assistant-intent-chip button:hover {
  background: rgb(0 0 0 / 10%);
}

.assistant-intent-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.assistant-intent-example-bubble {
  min-width: 0;
  max-width: 100%;
  padding: 6px 9px;
  color: var(--text-muted);
  text-align: left;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.assistant-intent-example-bubble:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.assistant-composer-footer {
  position: relative;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) 16px minmax(0, 1fr) 29px;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  color: var(--text-muted);
  font-size: 12px;
}

.assistant-composer-footer span,
.assistant-model-select,
.assistant-permission-button span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-model-select {
  height: 29px;
  padding: 0 2px;
  color: var(--text-faint);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  outline: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.assistant-model-select {
  flex: 1 1 min(var(--assistant-model-select-width, 14rem), 18rem);
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.assistant-permission-menu-wrapper {
  position: relative;
  display: inline-flex;
  flex: 1 1 min(var(--assistant-permission-control-width, 9rem), 13rem);
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.assistant-permission-button {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  width: 100%;
  height: 29px;
  min-width: 0;
  padding: 0 8px;
  color: var(--text-faint);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  outline: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.assistant-permission-button[data-mode="allowAll"] {
  color: #9b4d00;
  background: rgba(180, 92, 0, 0.12);
}

.assistant-model-select:hover,
.assistant-permission-button:hover {
  color: var(--text-muted);
}

.assistant-model-select:focus,
.assistant-permission-button:focus {
  color: var(--text-muted);
  border-color: var(--accent);
  box-shadow: none;
}

.assistant-model-select:disabled,
.assistant-permission-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.assistant-permission-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 60;
  display: grid;
  width: var(--assistant-permission-menu-width, max-content);
  min-width: 100%;
  padding: 8px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.assistant-permission-menu-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  padding: 7px 8px;
  color: var(--text-muted);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.assistant-permission-menu-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-permission-menu-item:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.assistant-permission-menu-item[data-mode="allowAll"] {
  color: #9b4d00;
}

.assistant-context-usage-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  min-width: 16px;
  height: 16px;
}

.assistant-context-usage-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.76;
  transition:
    color 140ms ease,
    opacity 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.assistant-context-usage-button:disabled {
  color: var(--text-faint);
  cursor: default;
  opacity: 0.46;
}

.assistant-context-usage-button:not(:disabled):hover,
.assistant-context-usage-button:not(:disabled):focus-visible {
  color: var(--text-muted);
  border-color: transparent;
  outline: 0;
  opacity: 1;
}

.assistant-context-usage-button:not(:disabled):focus-visible {
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.assistant-context-usage-button[data-tone="warn"] {
  color: var(--amber);
}

.assistant-context-usage-button[data-tone="danger"] {
  color: var(--red);
}

.assistant-context-usage-ring {
  width: 12px;
  height: 12px;
  background: conic-gradient(
    currentColor var(--assistant-context-usage, 0%),
    color-mix(in srgb, var(--text-faint) 28%, transparent) 0
  );
  border-radius: 50%;
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
}

.assistant-context-usage-popover {
  position: absolute;
  right: -8px;
  bottom: calc(100% + 6px);
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(260px, calc(100vw - 32px));
  padding: 10px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.assistant-context-usage-popover header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.assistant-context-usage-popover header strong,
.assistant-context-usage-popover header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-context-usage-popover header span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.assistant-context-usage-popover dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.assistant-context-usage-popover dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 8px;
  min-width: 0;
}

.assistant-context-usage-popover dt,
.assistant-context-usage-popover dd,
.assistant-context-usage-popover p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.4;
}

.assistant-context-usage-popover dt {
  color: var(--text-faint);
  font-weight: 700;
}

.assistant-context-usage-popover dd {
  color: var(--text-muted);
  text-align: right;
}

.assistant-context-usage-popover p {
  color: var(--text-faint);
  white-space: normal;
}

.assistant-control-measurer {
  position: absolute;
  width: max-content;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  white-space: nowrap;
}

.assistant-control-measurer span {
  display: block;
  width: max-content;
}

.assistant-permission-measurer {
  font-size: 11px;
  font-weight: 700;
}

.assistant-model-measurer {
  font-size: 11px;
  font-weight: 600;
}

.assistant-plus-button,
.assistant-send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 999px;
  cursor: pointer;
}

.assistant-plus-button {
  color: var(--text-muted);
  background: transparent;
}

.assistant-plus-button:hover {
  background: var(--surface-muted);
}

.assistant-plus-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.assistant-add-menu-wrapper {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.assistant-add-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 60;
  display: grid;
  min-width: 200px;
  padding: 5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.assistant-add-menu-item {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 7px 9px;
  color: var(--text-muted);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.assistant-add-menu-item:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.assistant-add-menu-item[aria-checked="true"] {
  color: var(--green);
  background: var(--green-soft);
}

.assistant-add-menu-chevron {
  margin-left: auto;
}

.assistant-add-menu-submenu {
  position: relative;
}

.assistant-add-menu-submenu::after {
  position: absolute;
  top: 0;
  right: -8px;
  width: 8px;
  height: 100%;
  content: "";
}

.assistant-add-menu-submenu-panel {
  top: auto;
  bottom: -5px;
  left: calc(100% + 6px);
  display: none;
  min-width: 176px;
}

.assistant-add-menu-submenu:hover .assistant-add-menu-submenu-panel,
.assistant-add-menu-submenu:focus-within .assistant-add-menu-submenu-panel {
  display: grid;
}

.assistant-send-button {
  flex: 0 0 auto;
  color: var(--surface);
  background: var(--text-faint);
}

.assistant-send-button:not(:disabled) {
  background: var(--accent);
}

.assistant-send-button:not(:disabled):hover {
  filter: brightness(1.15);
}

.assistant-send-button[data-state="stopping"] {
  background: var(--red);
}

.assistant-send-button[data-state="stopping"]:hover {
  filter: brightness(0.85);
}

.assistant-send-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.assistant-selection-context {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.assistant-selection-context header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.assistant-context span,
.assistant-composer {
  display: grid;
  gap: 4px;
  min-width: 0;
}

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

.assistant-context strong {
  color: var(--text);
}

.assistant-composer span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.assistant-composer textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  padding: 9px 10px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  outline: 0;
  font-size: 13px;
  line-height: 1.45;
}

.assistant-composer textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.suggestion-list {
  display: grid;
  gap: 7px;
}

.suggestion {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.suggestion.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.suggestion span {
  font-size: 13px;
  font-weight: 800;
}

.suggestion small {
  color: var(--text-muted);
  font-size: 11px;
}

.approval-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.approval-card header span {
  color: var(--text-muted);
  font-size: 12px;
}

.approval-card header strong {
  color: var(--amber);
  font-size: 11px;
  text-transform: uppercase;
}

.approval-card pre {
  padding: 10px;
  color: #dce7f5;
  background: var(--terminal);
  border-radius: 6px;
}

.assistant-selection-context pre,
.proposal-context-details pre {
  max-height: 126px;
  padding: 9px;
  color: #dce7f5;
  background: var(--terminal);
  border-radius: 6px;
}

.assistant-screenshot-context {
  display: grid;
  gap: 6px;
}

.assistant-screenshot-context img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  background: var(--terminal);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.assistant-screenshot-context small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.assistant-attachment-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.assistant-file-attachment-list,
.assistant-message-file-attachments {
  display: grid;
  gap: 6px;
}

.assistant-file-attachment,
.assistant-message-file-attachment {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: grid;
  gap: 7px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  min-height: 30px;
  padding: 5px 7px;
}

.assistant-message-file-attachment {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.assistant-file-attachment span,
.assistant-message-file-attachment span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-file-attachment small,
.assistant-message-file-attachment small {
  color: var(--text-muted);
  font-size: 11px;
}

.assistant-file-attachment .assistant-attachment-remove {
  position: static;
}

.assistant-attachment-preview {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.assistant-attachment-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--terminal);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.assistant-attachment-preview figcaption {
  display: grid;
  gap: 1px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.assistant-attachment-preview figcaption span,
.assistant-attachment-preview figcaption small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-attachment-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #ffffff;
  background: rgb(15 23 42 / 0.72);
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 999px;
  cursor: pointer;
}

.assistant-attachment-remove:hover {
  background: rgb(15 23 42 / 0.9);
}

.approval-card p {
  margin: 0;
  line-height: 1.45;
}

.assistant-tool-approval-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.assistant-tool-approval-risk {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  background: rgba(185, 28, 28, 0.08);
  border: 1px solid rgba(185, 28, 28, 0.35);
  border-radius: 6px;
}

.assistant-tool-approval-risk strong {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}

.assistant-tool-approval-risk ul {
  margin: 0;
  padding-left: 18px;
}

.assistant-tool-approval-risk li {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.assistant-tool-approval-card header,
.assistant-tool-approval-card footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.assistant-tool-approval-card header {
  justify-content: flex-start;
}

.assistant-tool-approval-card header svg {
  color: var(--amber);
  flex: 0 0 auto;
}

.assistant-tool-approval-card header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.assistant-tool-approval-card strong {
  color: var(--text);
  font-size: 12px;
}

.assistant-tool-approval-card small,
.assistant-tool-approval-card footer span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.assistant-tool-approval-card p {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.assistant-tool-approval-card details {
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.assistant-tool-approval-card summary {
  cursor: pointer;
  font-weight: 800;
}

.assistant-tool-approval-card pre {
  max-height: 150px;
  margin: 0;
  overflow: auto;
  padding: 9px;
  color: #dce7f5;
  background: var(--terminal);
  border-radius: 6px;
}

.assistant-tool-approval-action {
  flex: 0 1 190px;
  min-width: 150px;
}

.assistant-tool-approval-action select {
  width: 100%;
  min-height: 32px;
  padding: 6px 30px 6px 10px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.assistant-tool-approval-action select:focus {
  outline: 2px solid var(--accent-soft);
  outline-offset: 1px;
  border-color: var(--accent);
}

.assistant-tool-approval-summary {
  align-items: center;
  grid-template-columns: auto auto minmax(0, 1fr);
  padding: 8px 10px;
}

.assistant-tool-approval-summary > span {
  display: inline-flex;
  color: var(--text-muted);
}

.assistant-tool-approval-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-chat-timeline-item {
  display: contents;
}

.proposal-context-details {
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.proposal-context-details summary {
  cursor: pointer;
  font-weight: 800;
}

.risk-label {
  width: fit-content;
  padding: 3px 7px;
  color: var(--amber);
  background: #fff6df;
  border: 1px solid #f0cf85;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
}

.safety-notes {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.approval-card-approved header strong {
  color: var(--green);
}

.approval-card-rejected header strong {
  color: var(--red);
}

.approval-empty {
  min-height: 80px;
  padding: 10px;
  background: var(--surface-muted);
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
}

@keyframes assistant-spinner-spin {
  to {
    transform: rotate(360deg);
  }
}
