:root { --sidebar-w: 300px; }

.login form { width: min(480px, 100%); }
.login .lead { margin: 0; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.side-list.agents { overflow: auto; max-height: calc(100vh - 250px); padding-right: 2px; }
.side-check { margin: 10px 8px 4px; color: var(--muted); font-size: 13px; }
.agent-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px; align-items: center; }
.agent-row .pick {
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: var(--radius-control);
  padding: 7px 8px;
  display: grid;
  gap: 2px;
  min-width: 0;
  color: inherit;
}
.agent-row.active .pick, .agent-row .pick:hover, .agent-row .pick[aria-current="true"] { background: var(--hover); }
.agent-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-meta { color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; min-width: 0; }
.agent-row .ext {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  padding: 6px;
  white-space: nowrap;
}
.agent-row .ext:hover { color: var(--ink); }

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 1px 7px;
  background: var(--hover);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
}
.pill.run { background: #272d41; color: #c9cdf8; }
.pill.done { background: #1e3328; color: #b7ebc9; }
.pill.bad { background: var(--mis); color: var(--mis-ink); }

.compose { display: grid; gap: 12px; max-width: 720px; }
.compose textarea { min-height: 140px; }
label.check { display: flex; grid-template-columns: none; align-items: center; gap: 8px; color: var(--ink); }
label.check input { width: auto; margin: 0; }
.file { cursor: pointer; }
.file input { display: none; }
.hint { margin: 0; color: var(--muted); font-size: 12px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb { position: relative; width: 72px; height: 72px; }
.thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #111; }
.thumb button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: white;
  line-height: 22px;
}

.run-panel, .queue-panel { margin-top: 22px; display: grid; gap: 10px; max-width: 720px; }
.reply {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  min-height: 88px;
  margin: 0;
}
.queue-item {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.queue-item p { margin: 0; }
.busy-actions { margin-top: 8px; }

@media (max-width: 800px) {
  .side-list.agents { max-height: 280px; }
  input, textarea, select { font-size: 16px; }
  button.primary { min-height: 44px; padding: 10px 14px; }
  .compose textarea { min-height: 160px; }
  .canvas { padding: 16px 16px 48px; }
}
