.ai-chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 57px);
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 16px;
  box-sizing: border-box;
}

.ai-chat-header {
  margin-bottom: 20px;
}

.ai-chat-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 4px;
}

.ai-chat-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.ai-chat-message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
  word-wrap: break-word;
}

.ai-chat-message--assistant {
  background: #f3f0f9;
  color: #1a1a1a;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.ai-chat-message--user {
  background: #6941c6;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ai-chat-debug {
  font-size: 11px;
  color: #6b7280;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 0;
  align-self: stretch;
  white-space: pre-wrap;
}

.ai-chat-form {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.ai-chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  background: #fff;
}

.ai-chat-input:focus {
  border-color: #6941c6;
  box-shadow: 0 0 0 2px rgba(105, 65, 198, 0.15);
}

.ai-chat-input:disabled {
  background: #f9fafb;
  color: #9ca3af;
}

.ai-chat-submit {
  padding: 10px 20px;
  background: #6941c6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.ai-chat-submit:hover:not(:disabled) {
  background: #5b34b0;
}

.ai-chat-submit:disabled {
  background: #c4b5fd;
  cursor: not-allowed;
}
