:root {
  --accent: #5b63ff;
  --bg: #fbfbfd;
  --user: #5b63ff;
  --assistant: #f1f2f7;
  --ink: #1d1f27;
  --muted: #9a9ca8;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  font-weight: 600; font-size: 15px;
  border-bottom: 1px solid #ececf1;
  background: #fff;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; }
.chat {
  flex: 1; overflow-y: auto;
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 12px;
  max-width: 720px; width: 100%; margin: 0 auto;
}
.msg {
  padding: 11px 14px; border-radius: 16px;
  max-width: 82%; white-space: pre-wrap; word-wrap: break-word;
}
.msg.user { align-self: flex-end; background: var(--user); color: #fff; border-bottom-right-radius: 5px; }
.msg.assistant { align-self: flex-start; background: var(--assistant); color: var(--ink); border-bottom-left-radius: 5px; }
.msg.typing::after { content: "…"; color: var(--muted); }
.composer {
  display: flex; gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #ececf1; background: #fff;
  max-width: 720px; width: 100%; margin: 0 auto;
}
#input {
  flex: 1; border: 1px solid #e1e2ea; border-radius: 22px;
  padding: 11px 16px; font-size: 16px; outline: none; background: #f7f7fb;
}
#input:focus { border-color: var(--accent); background: #fff; }
#send {
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 20px; cursor: pointer; flex: none;
}
#send:active { transform: scale(0.94); }

/* Giriş ekranı (Task 7 — tek-kullanıcı kimlik) */
.login {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 24px;
}
.login[hidden] { display: none; }
.login-card {
  display: flex; flex-direction: column; gap: 12px;
  width: 100%; max-width: 320px;
  background: #fff; border: 1px solid #ececf1; border-radius: 18px;
  padding: 28px 22px; box-shadow: 0 10px 34px rgba(30, 32, 48, 0.07);
}
.login-title { font-size: 22px; font-weight: 700; }
.login-sub { color: var(--muted); font-size: 14px; margin-top: -6px; }
.login-card input {
  border: 1px solid #e1e2ea; border-radius: 12px;
  padding: 12px 14px; font-size: 16px; outline: none; background: #f7f7fb;
}
.login-card input:focus { border-color: var(--accent); background: #fff; }
.login-card button {
  border: none; border-radius: 12px; padding: 12px;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
}
.login-card button:active { transform: scale(0.98); }
.login-error { color: #e5484d; font-size: 13px; text-align: center; }
