:root {
  --bg: #f6f8fb;
  --primary: brown;
  --muted: #6b7280;
  --bot: #eef2ff;
  --user: #111827;
}
* {
  box-sizing: border-box;
}
body {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial;
  background: var(--bg);
  margin: 0;
  padding: 24px;
}
.chat-wrapper {
  max-width: 920px;
  margin: 0 auto;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand .logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), brown);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
}
.chat-box {
  height: 74vh;
  background: linear-gradient(180deg, #fff, #fbfdff);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(11, 7, 25, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(11, 7, 25, 0.04);
}
.messages {
  flex: 1;
  padding: 22px;
  overflow: auto;
}
.bubble {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 78%;
  line-height: 1.3;
}
.row-msg {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  align-items: flex-end;
}
.row-msg.bot {
  justify-content: flex-start;
}
.row-msg.user {
  justify-content: flex-end;
}
.row-msg.bot .bubble {
  background: var(--bot);
  color: var(--user);
  border-radius: 16px 16px 16px 4px;
}
.row-msg.user .bubble {
  background: var(--user);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  border: 1px solid rgba(11, 7, 25, 0.04);
}
.meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.composer {
  padding: 14px;
  border-top: 1px solid rgba(11, 7, 25, 0.04);
  background: transparent;
}
.composer form {
  display: flex;
  gap: 10px;
}
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.btn-suggestion {
  white-space: nowrap;
}
.typing {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  background: #fff;
  border-radius: 12px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  animation: blink 1s infinite;
}
.dot:nth-child(1) {
  animation-delay: 0s;
}
.dot:nth-child(2) {
  animation-delay: 0.15s;
}
.dot:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes blink {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  60% {
    opacity: 0.2;
  }
  100% {
    opacity: 0;
  }
}
.complex-card {
  border-left: 4px solid #ef4444;
  background: #fff5f5;
  padding: 12px;
  border-radius: 8px;
  margin-top: 10px;
}
@media (max-width: 768px) {
  .chat-box {
    height: 78vh;
  }
  .brand h5 {
    font-size: 16px;
  }
}
