:root {
  color: #1c1b19;
  background: #f4f1eb;
  font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 22px 28px 16px;
  border-bottom: 1px solid #e2ddd4;
}
.mark { margin: 0; font-size: 1.05rem; letter-spacing: -0.03em; }
#health { margin: 2px 0 0; color: #6d675f; font-size: 0.82rem; }
main {
  width: min(1120px, calc(100% - 32px));
  margin: 20px auto 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
}
.conversation, aside {
  background: #fffcf8;
  border: 1px solid #e4dfd6;
  border-radius: 16px;
  padding: 18px;
}
form, label { display: grid; gap: 6px; }
form { gap: 12px; }
label { font-size: 0.72rem; color: #6d675f; }
input, textarea {
  width: 100%;
  border: 1px solid #ddd6cb;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  background: #fff;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, textarea:focus { outline: 2px solid #d9c7a2; border-color: #b9a27a; }
.keys { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; }
.send-row { display: flex; align-items: center; gap: 12px; }
button {
  border: 0;
  border-radius: 999px;
  background: #1c1b19;
  color: #fff;
  padding: 9px 16px;
  font: inherit;
  cursor: pointer;
}
button.text { background: transparent; color: #1c1b19; padding: 0; }
button.secondary { background: #efeae2; color: #1c1b19; }
button.danger { background: #8d3b32; }
#form-message { margin: 0; color: #6d675f; font-size: 0.86rem; }
#thread { margin-top: 18px; display: grid; gap: 10px; }
.empty { margin: 8px 0 0; color: #6d675f; }
.bubble { border-radius: 14px; padding: 12px 14px; }
.you { background: #f3eee6; }
.agent { background: #fff; border: 1px solid #ece6dc; }
.bubble p { margin: 0; white-space: pre-wrap; }
.meta { margin-top: 8px; color: #6d675f; font-size: 0.75rem; }
.meta code { font-size: 0.72rem; }
#actions { margin-top: 12px; }
.decision { display: flex; gap: 8px; flex-wrap: wrap; }
.decision input { flex: 1; min-width: 180px; }
.blocker { margin-top: 10px; padding-top: 10px; border-top: 1px solid #ece6dc; }
.blocker textarea { margin: 8px 0; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chip { background: #efeae2; color: #1c1b19; padding: 4px 10px; font-size: 0.75rem; }
.chip.active { background: #1c1b19; color: #fff; }
tr.blocked td.status { color: #8d3b32; font-weight: 600; }
h2 { margin: 0 0 10px; font-size: 0.95rem; font-weight: 600; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid #eee8df; }
th { color: #6d675f; font-weight: 600; font-size: 0.72rem; }
tbody tr { cursor: pointer; }
tbody tr:hover, tbody tr.active { background: #f7f3ec; }
td.requirement { max-width: 180px; }
@media (max-width: 860px) {
  main { grid-template-columns: 1fr; }
  .keys { grid-template-columns: 1fr; }
}
