.ai-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 20px;
  padding: 60px 0 100px;
}
.ai-sidebar,
.ai-console {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.ai-sidebar {
  padding: 24px;
  height: max-content;
}
.ai-sidebar h2 {
  font-size: 20px;
}
.ai-sidebar p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.quick {
  width: 100%;
  margin: 5px 0;
  padding: 11px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080c10;
  color: #c8d1da;
  cursor: pointer;
}
.quick:hover {
  border-color: var(--cyan);
}
.ai-console {
  overflow: hidden;
}
.ai-console-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  font:
    11px "Courier New",
    monospace;
  color: var(--cyan);
}
.ai-messages {
  height: 520px;
  padding: 24px;
  overflow-y: auto;
}
.message {
  max-width: 82%;
  margin: 0 0 16px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 14px;
}
.message.bot {
  background: #0d151c;
}
.message.user {
  margin-left: auto;
  background: #152019;
  border-color: #395341;
}
.message.error {
  border-color: #8c3b43;
  background: #211014;
  color: #ffd2d6;
}
.sources {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.sources a {
  display: block;
  margin-top: 6px;
  color: var(--cyan);
  font-size: 11px;
}
.ai-form {
  padding: 18px;
  border-top: 1px solid var(--line);
}
.ai-form textarea {
  width: 100%;
  min-height: 95px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #05070a;
  color: #fff;
  resize: vertical;
}
.ai-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 12px;
}
.ai-form small {
  max-width: 65%;
  color: #71808e;
  font-size: 10px;
  line-height: 1.5;
}
.ai-note {
  margin-top: 16px;
  color: #7f8c98;
  font-size: 11px;
  line-height: 1.6;
}
@media (max-width: 850px) {
  .ai-layout {
    grid-template-columns: 1fr;
  }
  .ai-messages {
    height: 460px;
  }
  .ai-form-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .ai-form small {
    max-width: none;
  }
}
