:root {
  --bg: #f7f7f3;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --text: #161616;
  --muted: #66665f;
  --line: rgba(22, 22, 22, 0.08);
  --shadow: 0 20px 60px rgba(35, 35, 32, 0.08);
  --accent: #111111;
  --ok: #3ca56b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f4f4ef 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 40px 20px 48px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0 8px;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 0.95;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-badge,
.card,
.pill,
.field input,
.field textarea,
.field select,
.qr-box,
.toast {
  backdrop-filter: blur(14px);
}

.hero-badge,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 24px;
  min-width: 250px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d8d8d1;
}

.status-dot.ok {
  background: var(--ok);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  border-radius: 28px;
  padding: 24px;
}

.card-chat {
  grid-row: span 2;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.card h2 {
  margin: 0;
  font-size: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  font-size: 12px;
  font-weight: 700;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  font-size: 14px;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.inline-fields {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
}

button {
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 18px 34px rgba(17, 17, 17, 0.15);
}

.secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.chat-window {
  min-height: 420px;
  max-height: 560px;
  overflow-y: auto;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 247, 243, 0.86));
  margin-bottom: 16px;
}

.chat-bubble {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-bubble.user {
  background: #121212;
  color: white;
  margin-left: 48px;
}

.chat-bubble.agent {
  background: white;
  border: 1px solid var(--line);
  margin-right: 48px;
}

.whatsapp-panel {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: stretch;
}

.wa-meta p {
  margin: 0 0 12px;
}

.qr-box {
  display: grid;
  place-items: center;
  min-height: 260px;
  border-radius: 24px;
  border: 1px dashed rgba(22, 22, 22, 0.14);
  background: rgba(255, 255, 255, 0.88);
  overflow: hidden;
  padding: 16px;
}

.qr-box img {
  width: 100%;
  height: auto;
  display: none;
}

#qr-empty {
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(17, 17, 17, 0.94);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

  .card-chat {
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 24px 14px 36px;
  }

  .hero {
    flex-direction: column;
  }

  .inline-fields,
  .whatsapp-panel {
    grid-template-columns: 1fr;
  }

  .chat-bubble.user,
  .chat-bubble.agent {
    margin-left: 0;
    margin-right: 0;
  }
}

