/* 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; }

/* Login */
.login-page { align-items: center; justify-content: center; }
.login-card {
  width: 100%; max-width: 360px; margin: auto; padding: 36px 30px;
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 40px rgba(0,0,0,.04);
}
.login-card .brand { font-size: 26px; margin-bottom: 4px; }
.login-sub { color: var(--muted); margin: 0 0 22px; }
.login-card label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 5px; }
.login-card input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; font: inherit; outline: none;
}
.login-card input:focus { border-color: var(--accent); }
.login-card button {
  width: 100%; margin-top: 22px; background: var(--accent); color: #fff;
  border: 0; border-radius: 10px; padding: 12px; font-weight: 600; cursor: pointer;
}
.login-error { background: #fdecea; color: #b3261e; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; }
.login-foot { color: var(--muted); font-size: 12.5px; text-align: center; margin-top: 20px; }
