:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0e2142;
  background: #f3f6fa;
  font-size: 15px;
  --green: #0a84ff;
  --line: #e2e8f1;
}
.setup-check {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.setup-check p {
  margin: 8px 0 0;
}
.check-state {
  float: right;
  font-size: 12px;
  color: #8a6b2f;
}
.setup-check.complete .check-state {
  color: var(--green);
}
.request-history {
  padding-left: 20px;
  color: #5d6c84;
  font-size: 12px;
  line-height: 1.8;
}
#device-steps li {
  padding: 6px 0;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
}
button:hover {
  filter: brightness(0.95);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.secondary {
  background: #eaf3ff;
  color: #0a6fdb;
}
.quiet {
  background: transparent;
  color: #516282;
  padding: 10px;
}
.muted {
  color: #5d6c84;
  line-height: 1.6;
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #7a89a3;
  margin: 0 0 8px;
}
h1 {
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.7px;
  margin: 0;
}
h2 {
  font-size: 18px;
  margin: 0 0 12px;
}
h3 {
  font-size: 15px;
  margin-top: 25px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 18px 0;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border: 1px solid #cbd6e6;
  border-radius: 10px;
  background: #fff;
  color: #0e2142;
}
input:focus,
textarea:focus {
  outline: 2px solid #8fc2ff;
  outline-offset: 2px;
}
textarea {
  resize: vertical;
}
a {
  color: #0a6fdb;
}
.brand {
  font-weight: 800;
  font-size: 23px;
  display: flex;
  gap: 10px;
  align-items: center;
  letter-spacing: -0.4px;
}
.brand .brand-bubble {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.brand span {
  font-size: 19px;
  font-weight: 800;
}
.auth {
  max-width: 440px;
  margin: 9vh auto;
  padding: 25px;
}
.auth .brand {
  margin-bottom: 50px;
}
.auth h1 {
  font-size: 42px;
  line-height: 1.15;
}
.auth form {
  margin-top: 30px;
}
.auth button {
  width: 100%;
}
#app {
  display: grid;
  grid-template-columns: 225px 1fr;
  min-height: 100vh;
}
#app[hidden],
section[hidden],
div[hidden],
form[hidden],
label[hidden] {
  display: none;
}
aside {
  background: #0e2142;
  color: #dbe6f6;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 55px;
}
nav {
  display: grid;
  gap: 8px;
}
nav button {
  background: transparent;
  color: #b4c5e2;
  text-align: left;
  font-size: 13px;
  padding: 13px;
}
nav button.selected {
  background: #1c3461;
  color: #fff;
}
.aside-bottom {
  margin-top: auto;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.aside-bottom button {
  color: #c2d2ec;
}
main {
  padding: 35px 38px;
  min-width: 0;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.safety {
  background: #eaf3ff;
  color: #2e68b0;
  border: 1px solid #d5e6fb;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
}
.dot {
  height: 7px;
  width: 7px;
  background: #0a84ff;
  border-radius: 100%;
}
.inbox {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-height: 65vh;
  background: #fff;
}
.conversation-list {
  border-right: 1px solid var(--line);
  padding: 14px;
  max-height: 75vh;
  overflow: auto;
}
.conversation-list input {
  margin: 0 0 15px;
}
.chat {
  background: transparent;
  color: #0e2142;
  display: block;
  text-align: left;
  width: 100%;
  padding: 14px 10px;
  border-radius: 6px;
  border-bottom: 1px solid #eef2f8;
  font-weight: 400;
}
.chat strong {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.chat small {
  display: block;
  color: #8a97ab;
  font-size: 11px;
  margin-top: 5px;
}
.chat.active {
  background: #eaf3ff;
}
.thread {
  padding: 23px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.thread h2 {
  overflow-wrap: anywhere;
}
#thread-header p {
  font-size: 12px;
  overflow-wrap: anywhere;
}
#messages {
  flex: 1;
  min-height: 240px;
  max-height: 52vh;
  overflow: auto;
  padding: 12px 4px;
}
.bubble {
  max-width: 85%;
  padding: 12px 15px;
  border-radius: 12px;
  background: #e9e9eb;
  margin: 10px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  line-height: 1.5;
}
.bubble.outbound {
  margin-left: auto;
  background: #0a84ff;
  color: #fff;
}
.bubble small {
  font-size: 10px;
  color: #7b8794;
  display: block;
  margin-top: 7px;
}
.bubble .sender {
  font-size: 10px;
  font-weight: 700;
  display: block;
  margin-bottom: 5px;
}
.bubble a {
  display: block;
  font-size: 12px;
  margin-top: 8px;
}
.attachment-preview {
  display: block;
  width: 100%;
  max-width: 360px;
  max-height: 320px;
  border-radius: 8px;
  margin-top: 8px;
  object-fit: contain;
  background: #e3e8f0;
}
.attachment-preview[hidden] {
  display: none;
}
.compose-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.file-label {
  margin: 0;
  color: #44618f;
  cursor: pointer;
  font-size: 12px;
}
.file-label input {
  max-width: 200px;
  font-size: 11px;
  padding: 5px;
}
.compose-actions button {
  margin-left: auto;
}
.panel {
  max-width: 850px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 20px 0;
}
.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.scope-grid label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 400;
  font-size: 12px;
  margin: 7px 0;
}
.scope-grid input {
  width: auto;
  margin: 0;
}
.record {
  padding: 15px 0;
  border-bottom: 1px solid #ebeff6;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.record strong {
  display: block;
}
.record button {
  font-size: 11px;
  padding: 7px 11px;
  margin-top: 8px;
}
.record code {
  font-size: 11px;
}
.status-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f8;
  font-size: 13px;
}
.status-row span:last-child {
  text-align: right;
  overflow-wrap: anywhere;
}
#notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 450px;
  padding: 18px 23px;
  background: #0e2142;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 35px #0002;
  z-index: 5;
}
#key-result {
  background: #eaf3ff;
  padding: 18px;
  margin-top: 25px;
  border-radius: 8px;
}
#audit {
  max-height: 300px;
  overflow: auto;
  margin-top: 20px;
}
@media (max-width: 1050px) {
  #app {
    grid-template-columns: 180px 1fr;
  }
  aside {
    padding: 25px 12px;
  }
  main {
    padding: 25px 20px;
  }
  .inbox {
    grid-template-columns: 240px 1fr;
  }
}
@media (max-width: 760px) {
  #app {
    display: block;
  }
  aside {
    padding: 17px;
    gap: 18px;
  }
  aside .brand {
    font-size: 19px;
  }
  nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  nav button {
    white-space: nowrap;
    font-size: 12px;
    padding: 10px;
  }
  .aside-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  main {
    padding: 22px 12px;
  }
  h1 {
    font-size: 29px;
  }
  .inbox {
    display: block;
  }
  .conversation-list {
    max-height: 230px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .thread {
    padding: 18px;
  }
  #messages {
    max-height: 55vh;
  }
  .bubble {
    max-width: 94%;
  }
  .panel {
    padding: 20px;
  }
  .scope-grid {
    grid-template-columns: 1fr;
  }
  #notice {
    left: 15px;
    right: 15px;
    bottom: 15px;
  }
  .safety {
    font-size: 11px;
  }
  header button {
    font-size: 11px;
    padding: 10px;
  }
  .auth {
    margin: 5vh auto;
  }
  .auth h1 {
    font-size: 38px;
  }
}
