@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;700;800&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --bg: #eef4ff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #455a70;
  --line: #ccdaec;
  --brand: #0f4cc9;
  --brand-soft: #e1ecff;
  --good: #059669;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(59, 130, 246, 0.2), transparent 30%),
    radial-gradient(circle at 92% 12%, rgba(16, 185, 129, 0.16), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

.demo-banner {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #bcd0ec;
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.demo-cta-group {
  display: flex;
  gap: 10px;
}

.demo-cta-group a {
  text-decoration: none;
  border: 1px solid #9fb8dd;
  background: #ffffff;
  color: #143c67;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
}

.demo-cta-group a.primary {
  border-color: #0f4cc9;
  background: linear-gradient(135deg, #1d4ed8, #0f4cc9);
  color: #ffffff;
}

.demo-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  padding: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

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

.hero h1 {
  margin: 0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 6px 0 0;
  color: var(--muted);
}

.tenant-meta {
  font-size: 12px;
  color: #365174;
  font-weight: 600;
}

.demo-mode-badge {
  border: 1px solid #b6caf0;
  background: linear-gradient(180deg, #ffffff, #f0f6ff);
  color: #123f86;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}

.tour-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #cfe0f3;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f6faff);
  margin-bottom: 16px;
}

.tour-copy strong {
  display: block;
  margin-bottom: 4px;
  color: #163b66;
}

.tour-copy p {
  margin: 0;
  color: #4b6079;
  font-size: 13px;
}

.tour-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tour-actions button {
  border: 1px solid #c2d3e8;
  background: #ffffff;
  border-radius: 9px;
  padding: 7px 11px;
  font-weight: 600;
  cursor: pointer;
}

.tour-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tour-step-count {
  font-size: 12px;
  color: #37516e;
  font-weight: 700;
  margin-left: 4px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 10px 20px rgba(30, 64, 175, 0.06);
}

.kpi p {
  margin: 0;
  color: #41576d;
  font-size: 13px;
  font-weight: 600;
}

.kpi strong {
  display: block;
  margin-top: 6px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 28px;
}

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

.card {
  position: relative;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid #cfdef0;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.card h2 {
  margin: 0 0 10px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.card h3 {
  margin: 14px 0 8px;
  font-size: 15px;
}

.demo-note {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 10px;
}

.mini-charts {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 8px;
  align-items: center;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e5edf8;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

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

.funnel div {
  border: 1px solid #dbe5f1;
  border-radius: 12px;
  padding: 8px;
  background: #f8fbff;
}

.funnel span {
  display: block;
  font-size: 11px;
  color: #5a6f86;
}

.funnel strong {
  font-size: 20px;
}

.intent-list,
.suggestion-list,
.knowledge-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.intent-list li,
.knowledge-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #d8e3f0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f9fbff;
}

.suggestion-list li {
  border-left: 4px solid #1d4ed8;
  background: #eff6ff;
  border-radius: 8px;
  padding: 8px 10px;
  color: #1f3f68;
}

.agent-form {
  display: grid;
  gap: 8px;
}

.agent-form label {
  font-size: 12px;
  color: #51657c;
  display: grid;
  gap: 6px;
}

.agent-form input,
.agent-form textarea {
  width: 100%;
  border: 1px solid #cedbeb;
  border-radius: 8px;
  padding: 8px;
  font: inherit;
  font-size: 13px;
  background: #f8fbff;
}

.integration-card {
  border: 1px solid #cfe0f3;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f2f7ff);
  padding: 10px;
}

.integration-card .status {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

.demo-chat {
  position: sticky;
  top: 74px;
  height: calc(100vh - 90px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f6faff);
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e1e8f2;
  padding: 12px;
}

.chat-header h2 {
  margin: 0;
  font-size: 18px;
}

.pill {
  font-size: 11px;
  background: #eef2ff;
  color: #3730a3;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 700;
}

.chat-messages {
  padding: 12px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
}

.msg {
  max-width: 92%;
  padding: 10px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.35;
}

.msg.user {
  justify-self: end;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border: 1px solid #a5c7f8;
}

.msg.assistant {
  justify-self: start;
  background: linear-gradient(180deg, #f8fafc, #eef3f9);
  border: 1px solid #dbe4ef;
}

.chat-form {
  border-top: 1px solid #e1e8f2;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.chat-form input {
  border: 1px solid #cbd8e8;
  border-radius: 9px;
  padding: 10px;
}

.chat-form button {
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #1d4ed8, #0f4cc9);
  color: #fff;
  padding: 0 14px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(29, 78, 216, 0.3);
}

.tooltip {
  position: absolute;
  top: -10px;
  right: 10px;
  background: #111827;
  color: #fff;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  display: none;
}

.tour-target.active {
  outline: 2px dashed #93c5fd;
  outline-offset: 2px;
}

.tour-target.active .tooltip {
  display: inline-block;
}

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

  .demo-chat {
    position: static;
    height: 460px;
  }
}

@media (max-width: 760px) {
  .tour-stepper {
    flex-direction: column;
    align-items: flex-start;
  }

  .kpi-grid,
  .block-grid,
  .funnel {
    grid-template-columns: 1fr;
  }

  .demo-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}
