/* ELVA Chat — premium minimal. White, one accent, no fluff. */
:root {
  --bg: #ffffff;
  --ink: #111418;
  --muted: #6b7280;
  --line: #e8eaed;
  --accent: #0e7c86;         /* deep teal */
  --accent-soft: #e6f4f5;
  --user-bubble: #0e7c86;
  --radius: 14px;
  --maxw: 760px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex; flex-direction: column; min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
.brand { font-weight: 700; letter-spacing: -0.02em; font-size: 20px; }
.brand .dot { color: var(--accent); }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.top-actions { display: flex; align-items: center; gap: 8px; }
.logout-form { margin: 0; }
.ghost-btn {
  background: none; border: 1px solid var(--line); color: var(--muted);
  padding: 7px 12px; border-radius: 10px; font-size: 13px; cursor: pointer;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Messages */
.messages {
  flex: 1; overflow-y: auto; padding: 24px 16px 8px;
  width: 100%; max-width: var(--maxw); margin: 0 auto;
}
.msg { display: flex; margin: 14px 0; }
.msg .bubble {
  padding: 12px 15px; border-radius: var(--radius); line-height: 1.5;
  max-width: 82%; white-space: normal; word-wrap: break-word;
}
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: var(--user-bubble); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant .bubble { background: #f4f5f7; color: var(--ink); border-bottom-left-radius: 4px; }
.msg .bubble a { color: var(--accent); }
.msg.user .bubble a { color: #fff; text-decoration: underline; }
.bubble p { margin: 0 0 8px; } .bubble p:last-child { margin-bottom: 0; }
.bubble ul { margin: 6px 0; padding-left: 20px; }

/* Greeting */
.greeting { color: var(--ink); }
.greeting .lead { font-size: 15px; color: var(--muted); }

/* Typing indicator */
.typing .bubble { display: inline-flex; gap: 4px; align-items: center; }
.typing .dot-anim { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .4; animation: blink 1.2s infinite; }
.typing .dot-anim:nth-child(2) { animation-delay: .2s; }
.typing .dot-anim:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .25; } 40% { opacity: .9; } }

/* Chips */
.chips { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px;
  display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--accent-soft); color: var(--accent); border: 1px solid transparent;
  padding: 8px 13px; border-radius: 999px; font-size: 13.5px; cursor: pointer;
}
.chip:hover { border-color: var(--accent); }

/* Composer */
.composer {
  width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 12px 16px 22px;
  display: flex; gap: 10px; align-items: flex-end;
}
.composer textarea {
  flex: 1; resize: none; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; font: inherit; line-height: 1.4; max-height: 160px; outline: none;
}
.composer textarea:focus { border-color: var(--accent); }
.composer button {
  background: var(--accent); color: #fff; border: 0; border-radius: 12px;
  padding: 12px 18px; font-weight: 600; cursor: pointer;
}
.composer button:disabled { opacity: .5; cursor: default; }

/* Lead capture / login-code form (shown inline in the transcript) */
.lead-form {
  margin: 10px 0 4px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--accent-soft); max-width: 420px;
}
.lead-form p { margin: 0 0 12px; font-size: 14px; }
.lead-form input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 10px; font: inherit; outline: none;
}
.lead-form input:focus { border-color: var(--accent); }
.lead-form details { margin: 4px 0 8px; }
.lead-form summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.lead-form button {
  background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  padding: 10px 16px; font-weight: 600; cursor: pointer;
}
.lead-status { margin-top: 8px; font-size: 13px; color: var(--muted); }
