:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #243443;
  background: #f3f6f8;
  font-size: 14px;
  --accent: #087f77;
  --line: #dde5ea;
}
.catalog-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.catalog-toolbar .field { flex: 1 1 160px; min-width: 0; margin: 0; }
.catalog-toolbar .catalog-search { flex: 2 1 260px; }
.catalog-toolbar select, .catalog-toolbar input { width: 100%; min-width: 0; }
.catalog-path { overflow-wrap: anywhere; font-size: 12px; color: #566b78; margin: 4px 0; }
.catalog-summary { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 16px; }
.catalog-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 16px; }
#catalog-detail:empty { display: none; }
#catalog-root td { vertical-align: top; }
#catalog-root details { margin-top: 16px; }
#catalog-root summary { cursor: pointer; font-weight: 600; }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--accent);
  text-decoration: none;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  padding: 9px 14px;
  color: #304552;
}
button:hover {
  background: #edf5f4;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
#catalog-root button:disabled { cursor: default; }
#catalog-root button[aria-busy="true"] { cursor: wait; }
.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.primary:hover {
  background: #05635d;
}
.danger {
  color: #a83c38;
}
.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
aside {
  background: #172e3a;
  color: #d8e5ec;
  padding: 28px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.nav-group { margin-top: 8px; padding: 0; border: 0; }
.nav-group summary { cursor: pointer; padding: 10px 8px; font-weight: 600; }
.nav-group > div { padding-left: 10px; }
[hidden] { display: none !important; }
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 14px 24px;
  font-size: 21px;
  font-weight: 700;
  color: white;
  letter-spacing: 1px;
  line-height: 1.1;
}
.brand-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
}
.brand small {
  font-size: 12px;
  display: block;
  font-weight: 400;
  margin-top: 6px;
  color: #afc6d0;
  letter-spacing: 0;
}
nav a {
  display: block;
  padding: 13px 16px;
  color: #b7cdd6;
  border-radius: 8px;
  margin: 3px 0;
}
nav a.active {
  color: white;
  background: #2b4b57;
}
.identity {
  border-top: 1px solid #34515e;
  margin-top: 28px;
  padding: 20px 14px;
  font-size: 12px;
  line-height: 1.8;
}
.identity button {
  margin-top: 12px;
  padding: 6px 12px;
  background: transparent;
  color: #e7f1f4;
  border-color: #54717d;
}
main {
  padding: 32px 40px;
  min-width: 0;
  max-width: 1600px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
h1 {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}
h2 {
  font-size: 17px;
  margin: 0 0 18px;
}
h3 {
  font-size: 15px;
  margin: 0 0 12px;
}
p {
  line-height: 1.7;
}
.muted {
  color: #617684;
}
.small {
  font-size: 12px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px #22334405;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stat {
  font-size: 30px;
  font-weight: 650;
  padding-top: 14px;
}
.notice {
  background: #edf5f4;
  border-left: 3px solid var(--accent);
  padding: 15px 18px;
  margin: 16px 0;
  color: #365a60;
  line-height: 1.8;
  border-radius: 3px;
}
.warning {
  background: #fff7e8;
  border-color: #d59427;
  color: #815c25;
}
.pill {
  display: inline-block;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  background: #edf5f4;
  color: #23675b;
}
.pill.bad {
  background: #fff0ee;
  color: #a4473d;
}
.table-wrap {
  overflow: auto;
}
.agent-tool-table,
.agent-doc-table {
  table-layout: fixed;
  white-space: normal;
}
.agent-tool-table th,
.agent-tool-table td,
.agent-doc-table th,
.agent-doc-table td {
  overflow-wrap: anywhere;
}
.agent-tool-table th:nth-child(1) { width: 29%; }
.agent-tool-table th:nth-child(2) { width: 43%; }
.agent-tool-table th:nth-child(3) { width: 16%; }
.agent-tool-table th:nth-child(4) { width: 12%; }
.agent-doc-table th:nth-child(1) { width: 22%; }
.agent-doc-table th:nth-child(2) { width: 18%; }
.agent-doc-table th:nth-child(3) { width: 12%; }
.agent-doc-table th:nth-child(4) { width: 48%; }
.agent-output-table th:nth-child(1) { width: 25%; }
.agent-output-table th:nth-child(2) { width: 20%; }
.agent-output-table th:nth-child(3) { width: 55%; }
@media (max-width: 600px) {
  .agent-tool-table th:nth-child(1) { width: 32%; }
  .agent-tool-table th:nth-child(2) { width: 36%; }
  .agent-tool-table th:nth-child(3) { width: 16%; }
  .agent-tool-table th:nth-child(4) { width: 16%; }
  .agent-tool-table button { padding: 7px 4px; }
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  white-space: nowrap;
}
th {
  text-align: left;
  background: #f8fafb;
  font-weight: 500;
  color: #6b7e8b;
}
td,
th {
  padding: 14px 12px;
  border-bottom: 1px solid #e9eef1;
}
td .small {
  white-space: normal;
  max-width: 300px;
}
table button {
  padding: 5px 9px;
  font-size: 12px;
}
.channel-actions {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 6px;
  align-items: center;
}
.channel-trial-usage {
  min-width: 150px;
  white-space: normal;
  margin-bottom: 8px;
}
.channel-trial-usage:last-child {
  margin-bottom: 0;
}
.empty {
  padding: 38px;
  text-align: center;
  color: #6b7e8b;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}
.toolbar input {
  min-width: 240px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.details {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 15px;
  line-height: 1.6;
}
.details dt {
  color: #748792;
}
.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.agent-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
}
.agent-tabs a {
  display: inline-block;
  padding: 10px 14px;
  margin: 0;
  color: #466573;
  background: #fff;
  border: 1px solid #dce6e9;
}
.agent-tabs a.active {
  color: #087f77;
  background: #e5f4f0;
  border-color: #9ccdc4;
}
.agent-detail {
  margin: 16px 0;
}
.agent-detail pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.7;
  background: #f3f7f8;
  border-radius: 8px;
  padding: 14px;
}
details {
  padding: 12px 0;
  border-bottom: 1px solid #dce6e9;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
.login {
  max-width: 460px;
  margin: 10vh auto;
  padding: 36px;
}
.login .brand {
  color: #244653;
  padding-left: 0;
}
.login .brand small {
  color: #688894;
}
.login h1 {
  font-size: 23px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.field span {
  font-size: 13px;
  font-weight: 500;
}
.field input,
.field select,
.field textarea,
input,
select,
textarea {
  border: 1px solid #ccd8df;
  border-radius: 6px;
  background: white;
  color: #253d4b;
  padding: 10px;
  max-width: 100%;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
.field input[type="checkbox"] {
  align-self: flex-start;
  width: 18px;
  height: 18px;
}
.field small {
  color: #728490;
  line-height: 1.5;
}
.login .primary {
  width: 100%;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
dialog {
  border: 1px solid #ccd8df;
  border-radius: 12px;
  width: min(650px, 94vw);
  max-height: 90vh;
  padding: 28px;
  box-shadow: 0 12px 80px #102b3c40;
}
dialog::backdrop {
  background: #15293670;
}
dialog .actions {
  justify-content: flex-end;
  margin-top: 22px;
}
.error {
  color: #aa413b;
  line-height: 1.7;
  margin: 12px 0;
}
.code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  max-height: 180px;
  overflow: auto;
  overflow-wrap: anywhere;
  background: #f6f8fa;
  padding: 12px;
  border-radius: 5px;
}
#toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #213f4d;
  color: white;
  padding: 14px 22px;
  border-radius: 8px;
  display: none;
  max-width: 400px;
  z-index: 10;
}
.loading {
  padding: 80px;
  text-align: center;
  color: #637c8b;
}
.back {
  display: inline-block;
  margin-bottom: 20px;
}
footer {
  font-size: 12px;
  color: #78909c;
  margin-top: 20px;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.link-box {
  overflow-wrap: anywhere;
  border: 1px dashed #9cc1bc;
  padding: 14px;
  border-radius: 7px;
  margin: 16px 0;
}
button .spacer {
  padding-left: 5px;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 175px 1fr;
  }
  aside {
    padding: 22px 8px;
  }
  main {
    padding: 24px 20px;
  }
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .details {
    grid-template-columns: 110px 1fr;
  }
}
@media (max-width: 600px) {
  .layout {
    display: block;
  }
  aside {
    position: static;
    height: auto;
    padding: 16px;
  }
  aside .brand {
    padding: 0 0 12px;
  }
  nav {
    display: block;
  }
  .nav-group > div { display: flex; flex-wrap: wrap; padding-left: 8px; }
  nav a {
    white-space: nowrap;
    padding: 9px 12px;
  }
  .identity {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    margin-top: 8px;
    border: 0;
  }
  .identity button {
    margin: 0;
  }
  main {
    padding: 20px 14px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .login {
    margin: 24px 14px;
  }
  header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .card {
    padding: 18px;
  }
  table {
    font-size: 12px;
  }
  .toolbar input {
    min-width: 0;
    width: 100%;
  }
}
/* Real purchase pages share the platform forms and controls. */
.commerce-public {max-width: 880px; margin: 32px auto; padding: 20px;}
.commerce-public .brand {margin-bottom: 28px; color: #243443;}
.commerce-public .brand small {color: #617684;}
.commerce-public .card {margin-top: 20px;}
@media (min-width: 601px) {
  aside {display: flex; flex-direction: column;}
  aside .brand, aside .identity {flex-shrink: 0;}
  aside nav {min-height: 0; overflow-y: auto; flex: 1;}
  aside .identity {margin-top: 16px; color: #e7f1f4;}
}
