#ai-chat-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #4f46e5;
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,.15);
  z-index: 999999;
}
#ai-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 340px;
  max-width: 92vw;
  height: 460px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999;
  border: 1px solid #e5e7eb;
}
#ai-chat-header {
  background: #4f46e5;
  color: #fff;
  padding: 12px 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#ai-chat-close {
  cursor: pointer;
  opacity: .9;
}
#ai-chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #fafafa;
}
.ai-msg {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 10px;
  max-width: 85%;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-msg.user {
  background: #e5e7eb;
  margin-left: auto;
}
.ai-msg.assistant {
  background: #eef2ff;
  margin-right: auto;
}
#ai-chat-inputbar {
  display: flex;
  padding: 10px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}
#ai-chat-text {
  flex: 1;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
}
#ai-chat-send {
  margin-left: 8px;
  background: #4f46e5;
  color: #fff;
  border: none;
  padding: 0 14px;
  border-radius: 8px;
  cursor: pointer;
}
