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

:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --primary: #0f3bff;
  --primary-strong: #0c2fcc;
  --accent: #0fd1a0;
  --text: #0f172a;
  --muted: #5b6477;
  --line: #e5e9f2;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(15, 59, 255, 0.06), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(15, 209, 160, 0.08), transparent 25%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.brand-text strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-pill {
  background: rgba(15, 59, 255, 0.1);
  color: var(--primary);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
}

.ghost-link {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
  transition: all 0.2s ease;
}

.ghost-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cta-link {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(15, 59, 255, 0.25);
  border: none;
}

.shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.phase {
  width: 100%;
}

.hidden {
  display: none;
}

.copy h1 {
  margin: 8px 0 8px;
  font-size: 32px;
  letter-spacing: -0.02em;
}

.copy .lede {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  margin: 0 0 6px;
}

.helper {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.business-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.business-card h3 {
  margin: 8px 0;
  letter-spacing: -0.02em;
}

.business-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.business-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(15, 59, 255, 0.08);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 209, 160, 0.12);
  color: #0b9f7d;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.columns {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  align-items: start;
}

.card {
  background: var(--panel);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
}

.chat-panel {
  min-height: 580px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  background: rgba(91, 100, 119, 0.12);
  color: var(--text);
}

.status.live {
  background: rgba(15, 209, 160, 0.14);
  color: #0a8a68;
}

.status.ready {
  background: rgba(15, 59, 255, 0.12);
  color: var(--primary);
}

.chat-timeline {
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.system-note {
  font-size: 13px;
  color: var(--muted);
}

.message {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.45;
  font-size: 14px;
  display: inline-flex;
  gap: 10px;
  align-items: flex-start;
}

.message .avatar {
  width: 36px;
  height: 36px;
}

.message.flow {
  background: #0f172a;
  color: #fff;
  border-top-left-radius: 6px;
}

.message.user {
  background: #e8edff;
  color: #0f172a;
  margin-left: auto;
  border-top-right-radius: 6px;
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
}

.typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: bounce 1s infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

.quick-replies {
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.microcopy {
  color: var(--muted);
  font-size: 12px;
}

.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-reply {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-reply:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 12px 24px rgba(15, 59, 255, 0.12);
}

.quick-reply:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.score-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-head h3 {
  margin: 4px 0 0;
}

.score-meter {
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.score-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.score-main img {
  width: 44px;
  height: 44px;
}

.label {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.score-number {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.score-bar {
  width: 100%;
  height: 10px;
  border-radius: 8px;
  background: #e9edff;
  overflow: hidden;
}

.score-bar div {
  height: 100%;
  width: 42%;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #12b886);
  transition: width 0.4s ease;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric {
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.metric strong {
  font-size: 18px;
}

.status-metric .status {
  margin-top: 4px;
}

.phase-automation .automation-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.checklist li {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
  position: relative;
  padding-left: 42px;
  color: var(--muted);
  font-weight: 600;
  transition: all 0.25s ease;
}

.checklist li::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #c7d2fe;
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
}

.checklist li.done {
  background: rgba(15, 209, 160, 0.12);
  color: #0a8a68;
  border-color: rgba(15, 209, 160, 0.4);
}

.checklist li.done::before {
  background: #0fd1a0;
  border-color: #0fd1a0;
  box-shadow: 0 0 0 6px rgba(15, 209, 160, 0.18);
}

.automation-note {
  color: var(--muted);
  font-size: 14px;
}

.cta-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.cta-card h2 {
  margin: 4px 0;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.cta-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

@media (max-width: 1024px) {
  .page {
    padding: 20px 16px 48px;
  }

  .columns {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .business-grid {
    grid-template-columns: 1fr;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .ghost-link,
  .cta-link {
    text-align: center;
  }
}
