:root {
  --bg: #ffffff;
  --text: #141414;
  --muted: #5f656e;
  --line: #e6eaf0;
  --accent: #0b6bcb;
  --card: #ffffff;
  --shadow: 0 15px 40px rgba(16, 34, 63, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  background: radial-gradient(circle at 20% -10%, #f8fbff, #ffffff 60%);
  color: var(--text);
}

.bg-shape {
  position: fixed;
  inset: -20% auto auto -20%;
  width: 65vw;
  height: 65vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 107, 203, 0.08), rgba(11, 107, 203, 0));
  pointer-events: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 34px;
}

.topbar h1 {
  margin: 0;
  font-size: 2rem;
}

.topbar p {
  margin-top: 6px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  animation: rise 0.4s ease both;
}

@keyframes rise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

input,
textarea,
button {
  font-family: inherit;
}

textarea,
input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  width: 100%;
  background: #fff;
  color: var(--text);
}

textarea {
  min-height: 210px;
  resize: vertical;
}

.row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.row.three input {
  flex: 1;
}

button {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  background: linear-gradient(95deg, #0b6bcb, #2178cc);
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  filter: brightness(1.04);
}

.chat-card {
  margin-top: 16px;
}

.chat-window {
  min-height: 280px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: #fcfdff;
}

.msg {
  padding: 9px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.user {
  background: #ecf5ff;
  margin-left: 40px;
}

.assistant {
  background: #f2f4f7;
  margin-right: 40px;
}

.status {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fcfdff;
  color: var(--muted);
}

.qr-wrap {
  margin-top: 12px;
  min-height: 190px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  background: #fff;
}

#qrImage {
  max-width: 180px;
  width: 100%;
  display: none;
}

.feedback {
  min-height: 18px;
  margin: 10px 2px;
  color: var(--muted);
}

small {
  color: var(--muted);
}

@media (max-width: 920px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
