:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --accent: #1f6feb;
  --green: #22c55e;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  padding: 18px 22px;
  background: transparent;
}

.stepper {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.step .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #cbd5e1;
}

.step.active {
  color: var(--text);
  font-weight: 600;
}
.step.active .dot {
  background: #0f172a;
}

.content {
  display: grid;
  place-items: start center;
  padding: 18px 18px 30px;
}

.chat-shell {
  width: min(980px, 100%);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body {
  padding: 26px 26px 10px;
}

.bot-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #0b1220;
  background: #eef2ff;
  border: 1px solid var(--line);
}

.bubble {
  border-left: 3px solid #22c55e;
  padding-left: 18px;
}

.bubble p {
  margin: 0 0 10px;
  line-height: 1.35;
}

.bubble .lead {
  font-weight: 600;
}

.bubble ul {
  margin: 0 0 10px 18px;
  padding: 0;
}
.bubble li { margin: 4px 0; }

.muted {
  color: var(--muted);
}

.quick-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.btn:hover { filter: brightness(0.98); }

.btn.primary {
  background: var(--green);
  border-color: rgba(34, 197, 94, 0.5);
  color: white;
}

.btn.ghost {
  background: #fff;
  color: var(--muted);
}

.transcript {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.msg {
  display: grid;
  gap: 6px;
}

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

.msg .pill {
  display: inline-block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  line-height: 1.35;
  max-width: 72ch;
}

.msg.user {
  justify-items: end;
}
.msg.user .pill {
  background: #eaf2ff;
  border-color: #dbeafe;
}

.composer {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.composer input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
}

.composer input:focus {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.composer.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.composer.disabled input {
  background: #f1f5f9;
  cursor: not-allowed;
}

.composer.disabled .send {
  background: #94a3b8;
  cursor: not-allowed;
}


.send {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #0f172a;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.send:hover { filter: brightness(1.05); }

.hidden { display: none; }

.form {
  margin-top: 14px;
  max-width: 420px;
}

.field {
  display: grid;
  gap: 6px;
  margin: 10px 0 14px;
  font-weight: 600;
  font-size: 13px;
}

.field span { color: var(--text); }

.field input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  font-weight: 500;
}

.field input:focus {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.form-actions {
  margin-top: 10px;
}

.tiny {
  margin-top: 12px;
  font-size: 12px;
}

/* Chat transcript SK messages */
.transcript .bot-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.transcript .bubble {
  border-left: 3px solid #22c55e;
  padding-left: 18px;
}

.transcript .bubble p {
  margin: 0;
  line-height: 1.4;
}