:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #24323d;
  background: #f3f5f7;
  font-synthesis: none;
  font-size: 14px;
  --ink: #17303b;
  --muted: #657580;
  --line: #dce4e8;
  --teal: #086d70;
  --teal-dark: #075457;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  background: var(--teal);
  border: 1px solid var(--teal);
  color: white;
  border-radius: 7px;
  padding: 9px 14px;
  font-weight: 600;
}
button:hover:not(:disabled) {
  background: var(--teal-dark);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button.secondary {
  background: white;
  color: var(--ink);
  border-color: #cbd6dc;
}
button.secondary:hover:not(:disabled) {
  background: #f1f5f6;
}
button.text-button {
  background: transparent;
  color: var(--teal);
  padding: 3px 0;
  border: 0;
  font-size: 12px;
}
button.text-button:hover {
  color: #063f42;
  background: transparent;
}
a {
  color: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid #38b4bd;
  outline-offset: 3px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin: 12px 0 6px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd6dc;
  border-radius: 6px;
  background: #fff;
  color: #24323d;
  padding: 9px 10px;
}
textarea {
  resize: vertical;
  line-height: 1.65;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--teal);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.7px;
  margin: 4px 0 0;
}
h2 {
  font-size: 16px;
  letter-spacing: -0.15px;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0;
}
small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
code {
  font-size: 11px;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, monospace;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.65;
  background: #f3f6f7;
  padding: 12px;
  border-radius: 5px;
  max-height: 320px;
  overflow: auto;
}
details {
  font-size: 12px;
  margin-top: 10px;
}
summary {
  cursor: pointer;
  color: #45636d;
  font-size: 11px;
  padding: 3px 0;
}
.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #162d38;
  color: #e1edf0;
  display: flex;
  flex-direction: column;
  padding: 27px 17px;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  text-decoration: none;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #1c7779;
  color: #e7ffff;
  border-radius: 11px;
  font-size: 29px;
  line-height: 1;
}
.brand small {
  display: block;
  color: #9cb6bf;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2px;
  margin-top: 3px;
}
.project-picker {
  margin: 27px 0 28px;
}
.sidebar label {
  color: #b5c9d0;
  font-size: 11px;
}
.sidebar select,
.sidebar input {
  background: #203d48;
  color: #ecf7fa;
  border-color: #37515a;
}
.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 8px 10px;
}
.side-heading h2 {
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9eb8c2;
  font-size: 10px;
}
.icon-button {
  border: 0;
  background: transparent;
  padding: 0;
  width: 26px;
  height: 26px;
  font-size: 22px;
  font-weight: 400;
  color: #bfd5da;
}
.sidebar nav {
  overflow-y: auto;
  flex: 1;
}
.thread-link {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  font-weight: 500;
  border-radius: 6px;
  margin: 3px 0;
  padding: 11px 10px;
  color: #c7d9df;
}
.thread-link > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.thread-link.active {
  background: #284852;
  color: white;
  box-shadow: inset 3px 0 #48a7a6;
}
.thread-link:hover:not(:disabled) {
  background: #213f4a;
}
.thread-link small {
  display: block;
  color: #8baab5;
  font-size: 10px;
  font-weight: 400;
  margin-top: 4px;
}
.thread-form {
  padding: 0 8px 14px;
}
.thread-form button {
  margin-top: 10px;
  width: 100%;
  font-size: 11px;
}
.sidebar-footer {
  border-top: 1px solid #35505b;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 17px 5px 0;
  font-size: 12px;
  margin-top: 20px;
}
.sidebar-footer small {
  display: block;
  color: #8baab5;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #355966;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-weight: 600;
}
.side-empty {
  padding: 10px;
  font-size: 12px;
}
main {
  padding: 28px 32px 40px;
  min-width: 0;
  max-width: 1700px;
  width: 100%;
  margin: auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #768990;
  font-weight: 750;
}
.topbar button {
  font-size: 12px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-heading p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 0;
}
.revision {
  font-size: 10px;
  color: #768990;
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.task-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 17px;
  box-shadow: 0 2px 5px #18343e04;
}
.task-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.task-heading h3 {
  line-height: 1.5;
}
.owner {
  font-size: 10px;
  color: var(--muted);
  margin: 7px 0 16px;
  overflow-wrap: anywhere;
}
.badges {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}
.badge {
  font-size: 9px;
  border-left: 2px solid #b5c6cd;
  padding-left: 6px;
  line-height: 1.4;
  min-width: 0;
}
.badge span {
  display: block;
  color: #7a8a92;
  margin-bottom: 3px;
}
.badge strong {
  font-size: 10px;
  color: #48616c;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.badge.good {
  border-color: #268d7c;
}
.badge.good strong {
  color: #217964;
}
.badge.warning {
  border-color: #be8e3a;
}
.badge.warning strong {
  color: #97702c;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
  align-items: start;
}
.conversation {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.conversation > .panel-heading {
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}
.conversation h2 {
  margin-top: 4px;
}
.count {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.messages {
  min-height: 250px;
  max-height: 540px;
  overflow: auto;
  padding: 8px 22px;
}
.message {
  padding: 18px 0;
  border-bottom: 1px solid #edf1f3;
}
.message:last-child {
  border-bottom: 0;
}
.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 9px;
  color: #81919a;
  margin-bottom: 9px;
}
.message-meta strong {
  font-size: 11px;
  color: #48656f;
}
.message-meta time {
  margin-left: auto;
}
.message p {
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  color: #344c57;
}
.message.human .message-meta strong {
  color: #156d70;
}
.message details {
  margin-top: 5px;
  opacity: 0.85;
}
.composer {
  border-top: 1px solid var(--line);
  padding: 14px 20px 18px;
  background: #fbfcfc;
}
.composer > label {
  margin-top: 0;
  font-size: 11px;
  color: #5c737d;
}
.composer textarea {
  font-size: 12px;
  background: white;
  border-color: #dce4e8;
}
.composer-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.composer-footer small {
  font-size: 10px;
}
.composer-footer button {
  font-size: 11px;
  white-space: nowrap;
}
.inspector {
  display: grid;
  gap: 17px;
}
.panel {
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.panel > .muted {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.7;
}
.panel form small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
}
.full {
  width: 100%;
  margin-top: 14px;
  font-size: 11px;
}
.source-link {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf1f3;
  border-radius: 0;
  padding: 12px 0;
  font-size: 12px;
  color: #3a5964;
  font-weight: 500;
}
.source-link:hover:not(:disabled) {
  background: #f5f9f9;
}
.source-link small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
}
.source-detail {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 14px;
}
.source-detail h3 {
  line-height: 1.5;
  overflow-wrap: anywhere;
}
dl {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 7px;
  font-size: 11px;
  line-height: 1.6;
}
dt {
  color: #82939a;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #405d68;
}
.context-result {
  background: #f3f9f7;
  margin-top: 14px;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #dcece6;
  font-size: 12px;
}
.context-result.warning {
  background: #fff9ed;
  border-color: #efdfbf;
}
.context-result p {
  font-size: 11px;
  line-height: 1.65;
  margin: 6px 0;
}
.decisions {
  margin-top: 24px;
  padding: 20px;
}
.decision {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid #e7edf0;
  margin-top: 15px;
  padding-top: 15px;
}
.decision > div:first-child {
  min-width: 0;
}
.decision p {
  font-size: 12px;
  line-height: 1.75;
  margin: 6px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.decision-state {
  font-size: 10px;
  color: #718792;
}
.decision-actions {
  display: flex;
  gap: 7px;
  flex: none;
}
.decision-actions button {
  font-size: 11px;
  padding: 7px 10px;
}
.muted {
  color: var(--muted);
}
.loading,
.empty-inline {
  padding: 18px;
  font-size: 12px;
  color: var(--muted);
  background: white;
  border: 1px dashed var(--line);
  border-radius: 8px;
  margin-bottom: 20px;
}
.empty {
  padding: 50px;
  background: white;
  border-radius: 10px;
  text-align: center;
}
.empty p {
  color: var(--muted);
  margin-top: 12px;
}
.chat-empty {
  padding: 45px 15px;
  text-align: center;
  color: #6e8891;
}
.chat-empty > span {
  font-size: 32px;
  color: #9dbabe;
  display: block;
  margin-bottom: 12px;
}
.chat-empty h3 {
  font-size: 13px;
  color: #617b84;
}
.chat-empty p {
  font-size: 11px;
  margin-top: 8px;
}
.alert {
  padding: 13px 16px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.alert.error {
  color: #8c3d38;
  background: #fff1ed;
  border: 1px solid #eed2ca;
}
.alert.success {
  color: #276a56;
  background: #edf8f1;
  border: 1px solid #cfe5d8;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #10283188;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
  backdrop-filter: blur(3px);
}
.modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 15px 60px #00182044;
  max-width: 550px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
}
.modal h2 {
  font-size: 19px;
  margin-bottom: 16px;
}
.modal p {
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.modal .muted {
  font-size: 11px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  line-height: 1.7;
  margin: 17px 0;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.modal blockquote {
  background: #f2f6f6;
  border-left: 3px solid #80adb0;
  margin: 14px 0;
  padding: 12px;
}
.modal blockquote p {
  font-size: 12px;
}
.modal label {
  margin-top: 18px;
}
@media (min-width: 1600px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  main {
    padding: 24px 22px;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 275px;
  }
  .badges {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .decision {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 950px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .inspector {
    grid-template-columns: 1fr 1fr;
  }
  .task-grid {
    grid-template-columns: 1fr;
  }
  .badges {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .topbar h1 {
    font-size: 22px;
  }
}
@media (max-width: 650px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }
  .brand {
    font-size: 19px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
  }
  .project-picker {
    margin: 8px 0 12px;
  }
  .side-heading {
    margin: 3px 0;
  }
  .sidebar nav {
    display: flex;
    gap: 7px;
    max-height: 130px;
  }
  .thread-link {
    min-width: 145px;
    width: auto;
    flex-shrink: 0;
  }
  .sidebar-footer {
    display: none;
  }
  .thread-form {
    max-width: 400px;
  }
  .sidebar .brand small {
    display: inline;
    margin-left: 10px;
  }
  .topbar {
    align-items: flex-start;
    margin-bottom: 20px;
  }
  .topbar h1 {
    font-size: 22px;
  }
  .topbar button {
    font-size: 10px;
    padding: 8px;
  }
  main {
    padding: 20px 15px;
  }
  .section-heading {
    align-items: flex-start;
  }
  .revision {
    font-size: 9px;
  }
  .inspector {
    grid-template-columns: 1fr;
  }
  .badges {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .task-card {
    padding: 15px;
  }
  .messages {
    padding: 4px 16px;
  }
  .conversation > .panel-heading {
    padding: 16px;
  }
  .composer {
    padding: 14px;
  }
  .composer-footer {
    align-items: flex-end;
  }
  .composer-footer small {
    max-width: 170px;
  }
  .modal {
    padding: 20px;
  }
  .modal-backdrop {
    padding: 12px;
  }
  .decision-actions {
    flex-wrap: wrap;
  }
  .message-meta time {
    margin-left: 0;
    width: 100%;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background-color 0.15s,
      color 0.15s;
  }
  .modal {
    animation: appear 0.15s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
.history-button {
  display: block;
  margin: 12px auto;
  font-size: 11px;
}
.message p.message-task {
  font-size: 10px;
  color: #31777b;
  margin-bottom: 6px;
}
.composer select {
  font-size: 12px;
}

/* Customer connection settings */
.settings-page { display:block; padding:32px; background:#f4f6f8; color:#20333d; }
.settings-page main { max-width:960px; margin:auto; }
.settings-page section { margin:24px 0; padding:24px; background:white; border:1px solid #dbe3e8; border-radius:16px; }
.settings-page label { display:block; margin:16px 0; font-weight:600; }
.settings-page input,.settings-page select { display:block; width:100%; padding:12px; margin-top:8px; border:1px solid #bdcdd4; border-radius:8px; background:white; color:#20333d; }
.settings-page button { margin:8px 12px 8px 0; padding:10px 16px; }
.settings-page article { padding:12px 0; border-bottom:1px solid #dbe3e8; }
.settings-page #notice { min-height:24px; font-weight:600; }
.settings-page [aria-busy="true"] form { pointer-events:none; opacity:.6; }
