.demo-page { padding-top: 50px; }
.muted { color: var(--muted); font-size: 0.92rem; }

.biz-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 28px; }
.biz-tab {
  font: inherit; font-weight: 600; font-size: 0.92rem; cursor: pointer;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.biz-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-color: transparent; }

.demo-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
.owner { display: grid; gap: 20px; }
.owner .card:hover { transform: none; }

/* CHAT */
.chat {
  display: flex; flex-direction: column; height: 600px; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #075e54; color: #fff; }
.chat-avatar { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.3rem; }
.chat-name { font-weight: 700; }
.chat-status { font-size: 0.8rem; opacity: 0.9; display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; display: inline-block; }

.chat-body {
  flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px;
  background: color-mix(in srgb, #e5ddd5 60%, var(--bg));
}
:root[data-theme="dark"] .chat-body { background: #0d1626; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 0.93rem; line-height: 1.5; white-space: pre-line; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.msg.bot { align-self: flex-start; background: var(--surface); color: var(--text); border-top-left-radius: 4px; }
.msg.user { align-self: flex-end; background: #d9fdd3; color: #0f172a; border-top-right-radius: 4px; }
:root[data-theme="dark"] .msg.user { background: #005c4b; color: #e2e8f0; }
.typing { display: inline-flex; gap: 4px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }

.chips-row { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px 0; background: var(--surface); }
.chips-row button {
  flex: none; font: inherit; font-size: 0.82rem; font-weight: 500; cursor: pointer; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--primary); background: transparent; color: var(--primary);
}
.chat-input { display: flex; gap: 8px; padding: 12px 14px; background: var(--surface); }
.chat-input input {
  flex: 1; font: inherit; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); outline: none;
}
.chat-input input:focus { border-color: var(--primary); }
.send-btn { width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer; background: #00a884; color: #fff; font-size: 1.1rem; }

/* LEADS */
.lead-list { display: grid; gap: 10px; margin-top: 14px; }
.lead-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 0.88rem; border: 1px dashed var(--border); border-radius: 12px; }
.lead {
  padding: 12px 14px; border-radius: 12px; background: var(--bg-alt); border-left: 4px solid var(--wa);
  font-size: 0.88rem; animation: pop 0.35s ease;
}
.lead b { color: var(--text); }
.lead small { color: var(--muted); display: block; margin-top: 2px; }
@keyframes pop { from { transform: scale(0.95); opacity: 0; } }
.demo-note { font-size: 0.8rem; color: var(--muted); text-align: center; }

.demo-page [hidden] { display: none !important; }

/* "Your business" setup */
.custom-setup { max-width: 760px; margin: 0 auto 24px; display: grid; gap: 8px; }
.custom-setup:hover { transform: none; }
.custom-setup label { font-weight: 600; font-size: 0.9rem; margin-top: 6px; }
.custom-setup input, .custom-setup textarea {
  font: inherit; font-size: 16px; width: 100%; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); outline: none; resize: vertical;
}
.custom-setup input:focus, .custom-setup textarea:focus { border-color: var(--primary); }
.setup-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.setup-row .muted { margin-right: auto; }
.setup-err { color: #dc2626; font-size: 0.88rem; min-height: 1em; margin: 0; }
.msg.note { align-self: center; background: transparent; box-shadow: none; color: var(--muted); font-size: 0.8rem; text-align: center; padding: 4px 8px; }
.chat-input input { font-size: 16px; }

@media (max-width: 900px) {
  .demo-grid { grid-template-columns: 1fr; }
  .chat { height: 540px; }
}
