:root {
  --black: #070707;
  --charcoal: #121212;
  --gray-900: #1c1c1c;
  --gray-700: #303030;
  --gray-600: #3d3d3d;
  --gray-500: #777777;
  --gray-100: #eeeeee;
  --yellow: #f6c90e;
  --yellow-soft: #ffe17a;
  --yellow-dim: rgba(246, 201, 14, 0.11);
  --danger-line: rgba(246, 201, 14, 0.28);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.56);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--gray-100);
  background:
    linear-gradient(135deg, rgba(246, 201, 14, 0.08), transparent 35%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px,
      transparent 14px
    ),
    var(--black);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.demo-shell {
  display: grid;
  min-height: 100vh;
  padding: 32px;
  place-items: center;
}

.brand-panel {
  width: min(760px, 100%);
  border-left: 4px solid var(--yellow);
  padding: 38px;
  background:
    linear-gradient(120deg, rgba(246, 201, 14, 0.08), transparent 48%),
    rgba(18, 18, 18, 0.88);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.brand-panel p:last-child {
  max-width: 560px;
  margin: 18px 0 0;
  color: #c8c8c8;
  font-size: 1rem;
  line-height: 1.6;
}

.chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: grid;
  grid-template-columns: 30px 1fr 14px;
  gap: 11px;
  align-items: center;
  width: 258px;
  min-height: 62px;
  border: 1px solid #b9ff00;
  border-radius: 8px;
  padding: 10px 14px;
  color: #ffffff;
  background: rgba(2, 3, 2, 0.96);
  box-shadow:
    0 0 0 1px rgba(185, 255, 0, 0.08) inset,
    0 16px 44px rgba(0, 0, 0, 0.58),
    0 0 22px rgba(185, 255, 0, 0.1);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(185, 255, 0, 0.16) inset,
    0 20px 52px rgba(0, 0, 0, 0.68),
    0 0 28px rgba(185, 255, 0, 0.16);
}

.launcher-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border: 2px solid #b9ff00;
  border-bottom: 0;
  border-radius: 18px 18px 6px 6px;
}

.launcher-icon::before {
  position: absolute;
  left: -6px;
  bottom: -4px;
  width: 5px;
  height: 13px;
  border: 2px solid #b9ff00;
  border-radius: 8px;
  content: "";
}

.launcher-icon::after {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 5px;
  height: 13px;
  border: 2px solid #b9ff00;
  border-radius: 8px;
  content: "";
}

.launcher-copy {
  display: grid;
  gap: 3px;
  justify-items: start;
  min-width: 0;
}

.launcher-copy strong {
  color: #f8f8f4;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.launcher-copy small {
  color: #d7d7ce;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.launcher-copy small span {
  color: #4cff13;
  margin-right: 7px;
}

.launcher-chevron {
  width: 11px;
  height: 11px;
  border-top: 2px solid #b9ff00;
  border-left: 2px solid #b9ff00;
  transform: rotate(45deg);
}

.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 30;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto auto;
  width: min(460px, calc(100vw - 32px));
  height: min(690px, calc(100vh - 108px));
  overflow: hidden;
  border: 1px solid #aee900;
  border-radius: 9px;
  background:
    radial-gradient(circle at 20% 0%, rgba(185, 255, 0, 0.05), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 28%),
    #030403;
  box-shadow:
    0 20px 64px rgba(0, 0, 0, 0.72),
    0 0 26px rgba(185, 255, 0, 0.11),
    0 0 0 1px rgba(185, 255, 0, 0.08) inset;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px) scale(0.96);
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}

.chat-widget.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 16px 24px 8px;
  background: transparent;
}

.chat-header h2 {
  margin: 0;
  color: #b9ff00;
  font-size: 0.98rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.chat-close {
  display: grid;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 0;
  place-items: center;
  color: #b9ff00;
  background: transparent;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.chat-close:hover {
  color: #f5ffdd;
  background: transparent;
}

.chat-status {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 18px;
  padding: 0 12px 11px;
  border-bottom: 1px solid rgba(185, 255, 0, 0.55);
  color: #f0f0ec;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.chat-status span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4cff13;
  box-shadow: 0 0 12px rgba(76, 255, 19, 0.52);
}

.chat-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 16px 16px 14px;
  background: transparent;
  scroll-behavior: smooth;
  scrollbar-color: #b9ff00 #141414;
}

.message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 86%;
  animation: messageIn 220ms ease both;
}

.message-avatar {
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  margin-top: 5px;
  border: 1px solid rgba(185, 255, 0, 0.52);
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 44%, #b9ff00 45% 55%, transparent 56%),
    #050605;
  box-shadow: 0 0 14px rgba(185, 255, 0, 0.12);
}


.message-avatar.agent-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #050605;
  color: #b9ff00;
  font-weight: 900;
  font-size: 0.82rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.message-bubble {
  width: 100%;
  border-radius: 7px;
  padding: 12px 14px 10px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.message-bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.message.bot {
  align-self: flex-start;
}

.message.bot 
.message-avatar.agent-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #050605;
  color: #b9ff00;
  font-weight: 900;
  font-size: 0.82rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.message-bubble {
  border: 1px solid rgba(185, 255, 0, 0.18);
  color: #f5f5f5;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 45%),
    #151515;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
}

.message.user {
  align-self: flex-end;
  justify-content: flex-end;
}

.message.user 
.message-avatar.agent-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #050605;
  color: #b9ff00;
  font-weight: 900;
  font-size: 0.82rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.message-bubble {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-right: 3px solid #b9ff00;
  color: #f5f5f5;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 48%),
    #171717;
  font-weight: 600;
}

.message-time {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.62rem;
  font-weight: 700;
}

.message.user .message-time {
  color: rgba(255, 255, 255, 0.46);
}

.typing-message {
  max-width: 142px;
}

.typing-bubble {
  display: flex;
  gap: 5px;
  align-items: center;
  min-height: 38px;
}

.typing-bubble span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9ff00;
  animation: typingDot 1s infinite ease-in-out;
}

.typing-bubble span:nth-child(2) {
  animation-delay: 140ms;
}

.typing-bubble span:nth-child(3) {
  animation-delay: 280ms;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 6px 16px 9px;
  background: transparent;
}

.quick-actions button {
  min-height: 36px;
  border: 1px solid rgba(185, 255, 0, 0.82);
  border-radius: 4px;
  padding: 0 8px;
  color: #f6f7ef;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018) 42%, rgba(185, 255, 0, 0.035)),
    linear-gradient(135deg, rgba(185, 255, 0, 0.06), transparent 52%),
    #070807;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -10px 18px rgba(0, 0, 0, 0.28),
    0 8px 18px rgba(0, 0, 0, 0.18);
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  white-space: nowrap;
  transition:
    transform 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.quick-actions button:hover {
  color: #101500;
  background:
    linear-gradient(180deg, #d7ff42, #b9ff00);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 0 16px rgba(185, 255, 0, 0.28),
    0 10px 20px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.quick-actions button:nth-child(7) {
  grid-column: 1 / -1;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
  padding: 5px 16px 8px;
  background: transparent;
}

.chat-form input {
  min-width: 0;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  padding: 0 14px;
  color: var(--gray-100);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    #111;
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.chat-form input:focus {
  border-color: #b9ff00;
  background: #0b0d0a;
  box-shadow: 0 0 0 2px rgba(185, 255, 0, 0.14);
}

.chat-form button {
  position: relative;
  border: 1px solid #b9ff00;
  border-radius: 5px;
  padding: 0;
  color: #b9ff00;
  background: #050605;
  font-weight: 900;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.chat-form button::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 300;
  content: ">";
}

.chat-form button:hover {
  color: #101500;
  background: #b9ff00;
  transform: translateY(-1px);
}

.chat-powered {
  margin: 0;
  padding: 0 16px 10px;
  color: #c8c8c0;
  font-size: 0.6rem;
  font-weight: 700;
  text-align: center;
}

.chat-powered strong {
  color: #b9ff00;
  letter-spacing: 0.08em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@keyframes pulse {
  from {
    opacity: 0.8;
    transform: scale(0.92);
  }

  to {
    opacity: 0;
    transform: scale(1.26);
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typingDot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@media (max-width: 600px) {
  .demo-shell {
    padding: 20px;
    place-items: start;
  }

  .brand-panel {
    margin-top: 28px;
    padding: 24px;
  }

  .chat-launcher {
    right: 16px;
    bottom: 16px;
    width: min(242px, calc(100vw - 32px));
    min-height: 62px;
    padding: 10px 14px;
  }

  .chat-widget {
    right: 12px;
    bottom: 88px;
    width: min(460px, calc(100vw - 24px));
    height: min(690px, calc(100vh - 104px));
  }

  .message {
    max-width: 94%;
  }

  .chat-header {
    padding-left: 20px;
    padding-right: 20px;
  }

  .chat-body,
  .quick-actions,
  .chat-form,
  .chat-powered {
    padding-left: 16px;
    padding-right: 16px;
  }

  .chat-form {
    grid-template-columns: 1fr 48px;
  }

  .chat-form button {
    min-height: 40px;
  }

  .quick-actions {
    gap: 6px;
  }

  .quick-actions button {
    min-height: 36px;
    font-size: 0.62rem;
    padding: 0 6px;
  }
}


.cold-pill{
  background: rgba(59,130,246,.15);
  color:#60a5fa;
  border:1px solid rgba(59,130,246,.35);
}

.warm-pill{
  background: rgba(250,204,21,.15);
  color:#facc15;
  border:1px solid rgba(250,204,21,.35);
}

.hot-pill{
  background: rgba(239,68,68,.15);
  color:#f87171;
  border:1px solid rgba(239,68,68,.35);
}

.crm-stats-row{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:16px}
.crm-mini-card,.crm-panel{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:20px}
.crm-mini-card strong{display:block;font-size:42px;margin-top:8px}
.crm-panels{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.crm-line{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid rgba(255,255,255,.06)}

.progress-item{margin:14px 0}
.progress-head{display:flex;justify-content:space-between;margin-bottom:6px}
.progress-bar{height:8px;background:rgba(255,255,255,.08);border-radius:999px}
.progress-fill{height:100%;background:#72e08a;border-radius:999px}
.crm-mini-card{min-height:120px}

.crm-hero-card{display:flex;justify-content:space-between;align-items:center;padding:24px;border-radius:18px;background:rgba(255,255,255,.03)}
.crm-number{font-size:56px;font-weight:700}
.crm-icon{font-size:58px;opacity:.95}
.hot-card{border:1px solid rgba(239,68,68,.4)}
.warm-card{border:1px solid rgba(250,204,21,.4)}
.cold-card{border:1px solid rgba(59,130,246,.4)}
.lead-table-head,.lead-table-row{display:grid;grid-template-columns:1fr 1fr 80px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.06)}

.chat-onboarding {
  display: grid;
  place-items: center;
  padding: 18px 22px 24px;
  min-height: 0;
}

.chat-onboarding[hidden],
.chat-body[hidden],
.quick-actions[hidden],
.chat-form[hidden] {
  display: none !important;
}

.onboarding-card {
  width: 100%;
  border: 1px solid rgba(185, 255, 0, 0.28);
  border-radius: 14px;
  padding: 22px;
  background:
    radial-gradient(circle at 18% 0%, rgba(185, 255, 0, 0.11), transparent 34%),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

.onboarding-step {
  margin: 0 0 12px;
  color: #b9ff00;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.onboarding-card h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1.1;
}

.onboarding-card p:not(.onboarding-step) {
  margin: 0 0 18px;
  color: #d8d8d0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.onboarding-form {
  display: grid;
  gap: 10px;
}

.onboarding-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(185, 255, 0, 0.32);
  border-radius: 10px;
  padding: 0 14px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.38);
  outline: none;
}

.onboarding-form input:focus {
  border-color: #b9ff00;
  box-shadow: 0 0 0 3px rgba(185, 255, 0, 0.13);
}

.onboarding-form button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  color: #101010;
  background: #b9ff00;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .chat-onboarding {
    padding-left: 16px;
    padding-right: 16px;
  }

  .onboarding-card {
    padding: 18px;
  }
}
