:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
  max-width: 900px;
  margin: 80px auto;
  padding: 24px;
}
#bot-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  background: #0f3b77;
  color: white;
  font-weight: 700;
  box-shadow: 0 12px 25px rgba(0,0,0,0.22);
  cursor: pointer;
}
#bot-window {
  position: fixed;
  right: 24px;
  bottom: 84px;
  width: min(390px, calc(100vw - 32px));
  height: 590px;
  background: white;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #d9e2f3;
}
.hidden { display: none !important; }
#bot-window header {
  background: #0f3b77;
  color: white;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#bot-window header small {
  display: block;
  opacity: 0.9;
  margin-top: 2px;
}
#bot-close {
  border: none;
  background: transparent;
  color: white;
  font-size: 28px;
  cursor: pointer;
}
#bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f8fbff;
}
.message {
  margin: 10px 0;
  padding: 11px 13px;
  border-radius: 14px;
  line-height: 1.42;
  white-space: pre-wrap;
}
.user { background: #dbeafe; margin-left: 42px; }
.bot { background: #ffffff; border: 1px solid #e5e7eb; margin-right: 28px; }
.source {
  font-size: 12px;
  color: #4b5563;
  margin-top: 8px;
}
#quick-actions {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 10px;
  border-top: 1px solid #e5e7eb;
}
#quick-actions button {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #0f3b77;
  border-radius: 999px;
  padding: 7px 10px;
  cursor: pointer;
  white-space: nowrap;
}
#bot-form {
  display: flex;
  border-top: 1px solid #e5e7eb;
  padding: 10px;
  gap: 8px;
}
#bot-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px;
}
#bot-form button {
  border: none;
  border-radius: 12px;
  background: #0f3b77;
  color: white;
  padding: 0 14px;
  cursor: pointer;
}
@media (max-width: 480px) {
  #bot-window { right: 12px; bottom: 76px; height: 75vh; }
  #bot-toggle { right: 12px; bottom: 14px; }
}
