.manage-body {
  background: #fafbf8;
  font-size: 14px;
}
.manage-header {
  height: 83px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 42px;
  background: #fff;
}
.manage-header > a:last-child {
  margin-left: auto;
  font-size: 12px;
  text-decoration: none;
  color: var(--muted);
}
.workspace-label {
  font-size: 11px;
  color: #8a948b;
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.workspace {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: calc(100vh - 83px);
}
.workspace-nav {
  padding: 32px 18px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  background: #f5f7f1;
}
.workspace-nav button {
  background: transparent;
  border: 0;
  text-align: left;
  padding: 12px 16px;
  color: #6a786b;
  font-size: 13px;
}
.workspace-nav button.selected {
  background: #e4ebdf;
  color: #244833;
}
.workspace main {
  padding: 43px 48px;
  max-width: 1260px;
  width: 100%;
  outline: none;
}
.workspace h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -1.2px;
  margin: 10px 0;
}
.workspace h2 {
  font-size: 21px;
  letter-spacing: -0.6px;
  margin-bottom: 10px;
}
.workspace h3 {
  font-size: 15px;
  margin-bottom: 5px;
}
.workspace p {
  font-size: 13px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.tag {
  font-size: 10px;
  padding: 5px 10px;
  border: 1px solid #dce4d8;
  background: #f3f6ef;
  border-radius: 20px;
  white-space: nowrap;
  color: #667a62;
}
.tag.live {
  color: #235d3b;
  background: #e6f1e4;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 25px 0;
}
.metric,
.panel {
  background: #fff;
  border: 1px solid #e0e6db;
  border-radius: 8px;
  padding: 25px;
}
.metric strong {
  display: block;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -1.2px;
  margin-top: 6px;
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.panel + .panel {
  margin-top: 22px;
}
.panels .panel + .panel {
  margin: 0;
}
.panel .eyebrow {
  margin-bottom: 14px;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #eef1e9;
}
.checklist .done {
  color: #276342;
}
.checklist .pending {
  color: #a37837;
}
.empty {
  padding: 34px 12px;
  text-align: center;
}
.empty p {
  max-width: 320px;
  margin: 8px auto;
  color: #899182;
}
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #ccd7c5;
  background: #fff;
  color: #38533c;
  padding: 8px 14px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 12px;
}
.small-button:hover {
  background: #edf3e7;
}
.small-button.danger {
  border-color: #e0c8be;
  color: #9e4532;
}
.inline-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.stack {
  display: grid;
  gap: 15px;
}
.workspace input,
.workspace select,
.workspace textarea,
.login-panel input {
  display: block;
  width: 100%;
  border: 1px solid #cdd7c8;
  background: #fff;
  min-height: 45px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 14px;
}
.workspace textarea {
  min-height: 75px;
  resize: vertical;
}
.workspace label {
  font-size: 11px;
  color: #54664f;
}
.workspace label small {
  font-weight: 400;
  color: #87917e;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.checkbox-label {
  display: flex !important;
  gap: 10px;
  align-items: center;
  font-size: 12px !important;
  font-weight: 400;
  margin: 8px 0;
}
.checkbox-label input {
  width: 17px;
  min-height: auto;
  height: 17px;
  flex-shrink: 0;
  accent-color: #31553c;
}
.form-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.note {
  padding: 13px 15px;
  background: #f0f4eb;
  border-left: 2px solid #83977a;
  font-size: 12px;
  color: #5e7055;
  margin: 16px 0;
}
.note.warn {
  background: #fbf5e9;
  border-color: #b18e57;
  color: #896c42;
}
.error-note {
  color: #a0312a !important;
  margin-top: 12px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  margin-top: 15px;
}
th {
  font-weight: 500;
  color: #7b8774;
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 13px 10px;
  border-bottom: 1px solid #edf0e9;
  vertical-align: top;
}
td .small-button {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 11px;
}
.inbox-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 17px 20px;
  margin-bottom: 9px;
}
.inbox-item strong {
  font-weight: 500;
  font-size: 14px;
}
.inbox-item small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.chat-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 24px;
}
.chat-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.chat-heading {
  padding: 17px 21px;
  border-bottom: 1px solid var(--line);
}
.chat-heading h3 {
  font-size: 14px;
}
.chat-heading p {
  font-size: 11px;
}
.chat-messages {
  height: 430px;
  overflow: auto;
  padding: 22px;
  background: #f3f5ef;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.bubble {
  max-width: 90%;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 13px;
  white-space: pre-wrap;
  line-height: 1.7;
  background: #fff;
  border: 1px solid #e1e7db;
  align-self: flex-start;
  color: #354e39;
}
.bubble.user {
  background: #e1ebda;
  border-color: #d6e2ce;
  align-self: flex-end;
}
.bubble.system {
  align-self: center;
  text-align: center;
  font-size: 11px;
  background: none;
  border: 0;
  color: #85917e;
}
.chat-form {
  padding: 14px;
  display: flex;
  gap: 9px;
  align-items: flex-end;
  border-top: 1px solid var(--line);
}
.chat-form textarea {
  min-height: 45px;
  max-height: 140px;
}
.chat-form button {
  flex-shrink: 0;
  min-height: 45px;
}
.facts {
  font-size: 12px;
  margin-top: 18px;
}
.facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0e9;
  padding: 9px 0;
}
.facts dt {
  color: #819077;
}
.facts dd {
  margin: 0;
  text-align: right;
  max-width: 65%;
  overflow-wrap: anywhere;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #223f2e;
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 0 4px 20px #0001;
  max-width: calc(100% - 32px);
  z-index: 20;
}
.toast.error {
  background: #8b392f;
}
.login-panel {
  width: min(420px, calc(100% - 40px));
  margin: 80px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
}
.login-panel h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin: 14px 0;
}
.login-panel p {
  font-size: 13px;
}
.login-panel form {
  margin-top: 25px;
}
.login-panel button {
  margin-top: 18px;
}
.source-list {
  display: grid;
  gap: 9px;
  margin-top: 17px;
}
.source-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #edf0e9;
}
.source-row small {
  display: block;
  color: #8c9684;
  margin-top: 3px;
}
.source-row a {
  text-decoration: none;
}
.connection-intro {
  max-width: 670px;
  margin-bottom: 23px;
}
.muted {
  color: #83907a;
}
.launch-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-top: 22px;
}
.launch-row .primary {
  width: auto;
  min-width: 170px;
}
.workspace .primary {
  font-size: 13px;
  min-height: 45px;
}
.technical {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  word-break: break-all;
}
.danger-zone {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 180px 1fr;
  }
  .workspace main {
    padding: 32px 26px;
  }
  .panels,
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .metrics {
    gap: 12px;
  }
  .metric {
    padding: 18px;
  }
  .chat-layout > .panel {
    margin: 0;
  }
  .workspace-nav {
    padding: 28px 10px;
  }
}
@media (max-width: 650px) {
  .manage-header {
    padding: 0 20px;
    height: 72px;
    gap: 14px;
  }
  .manage-header .wordmark {
    font-size: 20px;
  }
  .workspace-label {
    display: none;
  }
  .workspace {
    display: block;
  }
  .workspace-nav {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    padding: 9px 12px;
    gap: 2px;
  }
  .workspace-nav button {
    font-size: 11px;
    white-space: nowrap;
    padding: 9px 11px;
  }
  .workspace main {
    padding: 27px 18px;
  }
  .workspace h1 {
    font-size: 29px;
  }
  .page-heading {
    gap: 12px;
    align-items: flex-start;
  }
  .page-heading .tag {
    margin-top: 6px;
  }
  .metrics {
    gap: 8px;
  }
  .metric {
    padding: 13px 11px;
  }
  .metric strong {
    font-size: 29px;
  }
  .metric span {
    font-size: 10px;
    line-height: 1.4;
    display: block;
  }
  .panel {
    padding: 19px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .chat-messages {
    height: 400px;
    padding: 16px;
  }
  .chat-form {
    padding: 11px;
  }
  .bubble {
    max-width: 96%;
    font-size: 13px;
  }
  .launch-row {
    display: block;
  }
  .launch-row .primary {
    width: 100%;
    margin-top: 18px;
  }
  .table-wrap {
    margin-inline: -5px;
  }
  th,
  td {
    padding: 10px 7px;
  }
  .connection-intro {
    font-size: 12px;
  }
  .toast {
    bottom: 14px;
  }
}

.space-top {
  margin-top: 22px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.chat-choices {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  white-space: normal;
}
.chat-choice {
  min-height: 44px;
  width: 100%;
  border: 1px solid #cbd9c6;
  background: #f8fbf5;
  border-radius: 5px;
  color: #28523a;
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
}
.chat-choice:hover:enabled {
  background: #e8f1e3;
}
.chat-choice:disabled {
  opacity: 0.5;
  cursor: default;
}
.chat-choice small {
  display: block;
  color: #74806c;
  font-size: 10px;
  margin-top: 3px;
}
