* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f4f4f2;
  color: #1a1a1a;
}

/* --- Login --- */
.login-body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-box h1 {
  margin: 0 0 12px;
  font-size: 22px;
  text-align: center;
}

.login-box input {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

.login-box button {
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.error {
  color: #b00020;
  font-size: 13px;
  margin: 0;
}

/* --- Chat --- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid #e2e2e2;
}

.child-name {
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.topbar-actions button {
  background: none;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
}

.topbar-actions a {
  color: #555;
  text-decoration: none;
  font-size: 14px;
}

.chat-window {
  height: calc(100vh - 130px);
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.msg.user {
  align-self: flex-end;
  background: #1a1a1a;
  color: #fff;
}

.msg.assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e2e2e2;
}

.chat-form {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  background: #fff;
  border-top: 1px solid #e2e2e2;
}

.chat-form textarea {
  flex: 1;
  resize: none;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
}

.chat-form button {
  padding: 0 20px;
  border: none;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
}
