.chat-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.chat-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.chat-panel {
  width: 320px;
  height: 420px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0,0,0,.22);
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-hidden { display: none; }

.chat-header {
  padding: 12px 14px;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-title {
  display: flex;
  flex-direction: column;
}

.chat-sub {
  display: block;
  font-size: 12px;
  opacity: .85;
  margin-top: 2px;
}

.chat-reset {
  border: 1px solid rgba(255,255,255,.25);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  padding: 12px;
  overflow: auto;
  background: #f6f7fb;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.chat-user {
  margin-left: auto;
  background: #0ea5e9;
  color: #fff;
  border-bottom-right-radius: 6px;
}

.chat-bot {
  margin-right: auto;
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 6px;
}

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

.chat-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  outline: none;
}

.chat-send {
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  background: #111827;
  color: #fff;
}

.chat-status {
  padding: 0 12px 8px 12px;
  font-size: 12px;
  color: #6b7280;
}
