:root {
  color-scheme: light;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #252a2e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f1f1f6;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

button,
textarea {
  font: inherit;
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.navbar {
  background: #ffffff;
  border-bottom: 1px solid #e0e1e9;
  padding: 8px 16px;
}

.navbar-container {
  align-items: center;
  display: flex;
  height: 48px;
  justify-content: space-between;
}

.navbar-logo {
  align-items: center;
  color: #0063a3;
  display: flex;
  gap: 8px;
  text-decoration: none;
}

.logo-icon {
  display: flex;
  height: 32px;
  width: 32px;
}

.logo-icon svg {
  display: block;
  height: 32px;
  width: 32px;
}

.logo-name {
  font-size: 18px;
  font-weight: 700;
}

.navbar-right {
  position: relative;
}

.user-avatar {
  align-items: center;
  background: #0063a3;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.dropdown-menu {
  background: #ffffff;
  border: 1px solid #e0e1e9;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(37 42 46 / 12%);
  min-width: 160px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: 48px;
}

.dropdown-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #252a2e;
  cursor: pointer;
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  width: 100%;
}

.dropdown-item:hover { background: #f1f1f6; }

.access-state-page {
  align-items: center;
  display: flex;
  flex: 1;
  justify-content: center;
  padding: 32px 24px;
}

.access-state-card {
  background: #ffffff;
  border: 1px solid #cbcdd6;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(37 42 46 / 12%);
  max-width: 560px;
  padding: 40px;
  text-align: center;
  width: 100%;
}

.access-state-icon {
  align-items: center;
  background: #d9effa;
  border-radius: 50%;
  color: #0063a3;
  display: inline-flex;
  height: 56px;
  justify-content: center;
  margin-bottom: 20px;
  width: 56px;
}

.access-state-icon svg { height: 28px; width: 28px; }

.access-state-card--loading .access-state-icon {
  background: #0063a3;
  box-shadow: 0 0 0 8px rgb(0 99 163 / 10%);
  color: #ffffff;
}

.access-state-card--warning .access-state-icon { background: #fff4ce; color: #806000; }
.access-state-card--denied .access-state-icon { background: #fee8e7; color: #b42318; }

.access-state-eyebrow {
  color: #585c65;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.access-state-title {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 12px;
}

.access-state-description { color: #585c65; font-size: 16px; line-height: 1.5; }
.access-state-description p { margin: 0; }

.access-state-actions { margin-top: 28px; }

.access-state-button {
  background: #0063a3;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font-weight: 600;
  padding: 10px 18px;
  text-decoration: none;
}

.chat-page {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin: 0 auto;
  max-width: 880px;
  padding: 24px 16px 16px;
  width: 100%;
}

.chat-transcript {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
}

.chat-empty {
  margin: auto;
  max-width: 460px;
  text-align: center;
}

.chat-empty h1 { font-size: 32px; margin: 0 0 8px; }
.chat-empty p { color: #585c65; margin: 0; }

.chat-message {
  border-radius: 12px;
  max-width: min(100%, 640px);
  padding: 12px 14px;
}

.chat-message p { margin: 0; white-space: pre-wrap; }
.chat-message--user { align-self: flex-end; background: #0063a3; color: #ffffff; }
.chat-message--assistant { align-self: flex-start; background: #ffffff; border: 1px solid #e0e1e9; }

.chat-composer {
  background: #ffffff;
  border: 1px solid #cbcdd6;
  border-radius: 12px;
  display: flex;
  gap: 8px;
  padding: 8px;
}

.chat-composer textarea {
  border: 0;
  flex: 1;
  min-height: 48px;
  padding: 10px;
  resize: vertical;
}

.chat-composer textarea:focus { outline: none; }

.chat-composer button {
  align-self: flex-end;
  background: #0063a3;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
  padding: 10px 16px;
}

.chat-composer button:disabled,
.chat-composer textarea:disabled { opacity: 0.6; }

.chat-notice {
  color: #806000;
  margin: 8px 4px 0;
}

@media (max-width: 640px) {
  .access-state-page { padding: 20px 16px; }
  .access-state-card { padding: 32px 24px; }
  .access-state-title,
  .chat-empty h1 { font-size: 24px; }
  .chat-page { padding: 16px 12px 12px; }
  .chat-composer { align-items: stretch; flex-direction: column; }
  .chat-composer button { align-self: stretch; }
}
