:root {
  --ink: #171722;
  --ink-soft: #3f3e4b;
  --muted: #74727e;
  --muted-light: #a3a0aa;
  --line: #e6ebf2;
  --line-strong: #d8e1ec;
  --surface: #ffffff;
  --canvas: #f8faff;
  --canvas-soft: #f3f7ff;
  --purple: #2468e5;
  --purple-dark: #174eb1;
  --purple-soft: #eef5ff;
  --blue: #2468e5;
  --blue-soft: #edf5ff;
  --green: #168653;
  --green-soft: #eaf8f0;
  --orange: #bb691a;
  --orange-soft: #fff4e8;
  --red: #c7404e;
  --red-soft: #fff0f2;
  --sidebar-width: 244px;
  --topbar-height: 70px;
  color: var(--ink);
  background: var(--canvas);
  font-family:
    "HarmonyOS Sans SC", MiSans, "Noto Sans SC", "Source Han Sans SC",
    "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

/* API 文档目录页 */
body[data-page="api-docs"] .main-content {
  background: transparent;
}

.api-docs-catalog {
  max-width: none;
  padding: 0;
}

.api-docs-catalog-layout {
  min-height: calc(100vh - var(--topbar-height) - 48px);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.api-docs-nav {
  position: sticky;
  top: calc(var(--topbar-height) + 24px);
  max-height: calc(100vh - var(--topbar-height) - 48px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(30, 58, 96, 0.05);
  scrollbar-width: thin;
  scrollbar-color: #9aa5b4 transparent;
}

.api-docs-nav-heading {
  padding: 2px 2px 10px;
  color: #697386;
  font-size: 12px;
  font-weight: 800;
}

.api-docs-nav-heading-spaced {
  padding-top: 18px;
}

.api-docs-nav-item {
  width: 100%;
  min-height: 62px;
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  padding: 11px 12px;
  color: #596275;
  text-align: left;
  border: 1px solid #dfe5ef;
  border-radius: 7px;
  background: #ffffff;
  cursor: pointer;
}

.api-docs-nav-item strong {
  color: #243247;
  font-size: 13px;
}

.api-docs-nav-item span {
  color: #7c8698;
  font-size: 11px;
}

.api-docs-nav-item:hover,
.api-docs-nav-item.is-active {
  color: #126be8;
  border-color: #a9c9fb;
  background: #f4f8ff;
}

.api-docs-nav-item.is-active {
  border-left: 3px solid #1877e8;
  padding-left: 10px;
}

.api-docs-nav-item.is-active strong {
  color: #126be8;
}

.api-docs-groups {
  display: grid;
  gap: 9px;
}

.api-docs-group {
  overflow: hidden;
  border: 1px solid #dfe5ef;
  border-radius: 7px;
  background: #ffffff;
}

.api-docs-group-toggle {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
  color: #172235;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.api-docs-group-toggle span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-docs-group-toggle em {
  color: #6c7688;
  font-size: 11px;
  font-style: normal;
}

.api-docs-group-toggle svg {
  width: 15px;
  height: 15px;
  color: #7f8999;
  transition: transform 160ms ease;
}

.api-docs-group.is-open .api-docs-group-toggle svg {
  transform: rotate(180deg);
}

.api-docs-group-items {
  display: none;
  padding: 0 8px 8px;
}

.api-docs-group.is-open .api-docs-group-items {
  display: grid;
}

.api-docs-group-items button {
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  overflow: hidden;
  color: #657084;
  text-align: left;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
}

.api-docs-group-items button > span {
  color: #119c64;
  font-size: 9px;
  font-weight: 800;
}

.api-docs-group-items button > strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-docs-group-items button:hover {
  color: #126be8;
  background: #f1f6ff;
}

.api-docs-group-items button.is-active {
  color: #075fcf;
  background: #eaf3ff;
  box-shadow: inset 3px 0 #1877e8;
  font-weight: 700;
}

.api-docs-catalog-content {
  min-width: 0;
  scroll-margin-top: calc(var(--topbar-height) + 20px);
}

.api-docs-single-page {
  display: grid;
  gap: 16px;
}

.api-docs-endpoint-card,
.api-docs-section {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 6px 20px rgba(30, 58, 96, 0.035);
}

.api-docs-endpoint-title {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.api-docs-endpoint-title h2,
.api-docs-section > h2 {
  margin: 0;
  color: #121a28;
  font-size: 19px;
  line-height: 1.45;
}

.api-docs-endpoint-title p {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 7px 0 0;
}

.api-docs-endpoint-title p code {
  color: #5d687c;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.api-docs-full-url {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #e1e7f0;
  border-radius: 6px;
  background: #f8faff;
}

.api-docs-full-url-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.api-docs-full-url-row code {
  min-width: 0;
  flex: 1 1 auto;
}

.api-docs-full-url-row .secondary-button {
  flex: 0 0 auto;
}

.api-docs-full-url span {
  color: #758095;
  font-size: 11px;
  font-weight: 700;
}

.api-docs-full-url code {
  color: #163d72;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.api-docs-endpoint-description {
  margin: 16px 0 0;
  color: #566176;
  font-size: 13px;
  line-height: 1.75;
}

.api-docs-endpoint-description code {
  color: #145fbc;
  overflow-wrap: anywhere;
}

.api-docs-billing-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e7ebf2;
}

.api-docs-billing-note span {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: #a34c0c;
  font-size: 10px;
  font-weight: 800;
  border-radius: 4px;
  background: #fff1e7;
}

.api-docs-billing-note strong {
  color: #525d70;
  font-size: 12px;
  line-height: 1.7;
}

.api-docs-section-title {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.api-docs-section-title h3 {
  margin: 0;
  color: #151e2d;
  font-size: 15px;
}

.api-docs-section-title > span {
  color: #778196;
  font-size: 11px;
}

.api-docs-fields {
  border: 1px solid #e2e7ef;
  border-radius: 6px;
  overflow: hidden;
}

.api-docs-field {
  padding: 12px;
  border-bottom: 1px solid #e7ebf1;
}

.api-docs-field:last-child {
  border-bottom: 0;
}

.api-docs-field > div {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.api-docs-field strong {
  color: #172235;
  font-size: 12px;
}

.api-docs-field code {
  color: #1768c8;
  font-size: 10px;
}

.api-docs-field em {
  padding: 2px 5px;
  color: #737e91;
  font-size: 9px;
  font-style: normal;
  border-radius: 3px;
  background: #f1f3f7;
}

.api-docs-field em.is-required {
  color: #bd3f45;
  background: #fff0f1;
}

.api-docs-field p {
  margin: 6px 0 0;
  color: #647085;
  font-size: 12px;
  line-height: 1.65;
}

.api-docs-empty-fields {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 15px;
  color: #637086;
  font-size: 12px;
  background: #fbfcfe;
}

.api-docs-empty-fields svg {
  width: 16px;
  height: 16px;
  color: #16a16a;
}

.api-docs-schema-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.api-docs-schema-grid .api-docs-code-block pre {
  max-height: 420px;
}

.api-docs-panel {
  position: relative;
  min-width: 0;
  padding: 18px;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 6px 20px rgba(30, 58, 96, 0.035);
}

.api-docs-panel[hidden] {
  display: none;
}

.api-docs-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 10px;
  padding: 0 8px;
  color: #126be8;
  border-radius: 5px;
  background: #edf5ff;
  font-size: 11px;
  font-weight: 800;
}

.api-docs-label-orange {
  color: #b94d17;
  background: #fff2e9;
}

.api-docs-domain-panel {
  padding-right: 64px;
}

.api-docs-domain {
  display: block;
  margin-bottom: 8px;
  color: #172235;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.api-docs-domain-panel p,
.api-docs-panel .api-docs-lead,
.api-docs-panel .api-docs-note,
.api-docs-service-note p,
.api-docs-integration-panel > p {
  margin: 0;
  color: #5f6879;
  font-size: 12px;
  line-height: 1.75;
}

.api-docs-domain-panel p code,
.api-docs-panel .api-docs-note code,
.api-docs-service-note code,
.api-docs-integration-panel > p code,
.api-docs-callout code {
  color: #126be8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.api-docs-copy-domain {
  position: absolute;
  top: 18px;
  right: 18px;
}

.api-docs-auth-card {
  min-height: 64px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #e1e7f0;
  border-radius: 7px;
  background: #fbfcfe;
}

.api-docs-auth-card > span {
  color: #687285;
  font-size: 11px;
  font-weight: 700;
}

.api-docs-auth-card code {
  min-width: 0;
  overflow: hidden;
  color: #26354a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-docs-auth-key-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.api-docs-key-select-wrap {
  min-width: 0;
  position: relative;
  display: block;
}

.api-docs-key-select-wrap select {
  width: 100%;
  min-height: 40px;
  appearance: none;
  padding: 0 38px 0 12px;
  border: 1px solid #dce5f1;
  border-radius: 6px;
  color: #26354a;
  background: #fff;
  font: inherit;
  font-size: 12px;
  outline: 0;
  cursor: pointer;
}

.api-docs-key-select-wrap select:focus {
  border-color: #9abfff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .1);
}

.api-docs-key-select-wrap > svg {
  width: 16px;
  height: 16px;
  position: absolute;
  top: 50%;
  right: 12px;
  pointer-events: none;
  color: #8392a5;
  transform: translateY(-50%);
}

.api-docs-auth-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #e1e7f0;
  border-radius: 7px;
  background: #fbfcfe;
}

.api-docs-auth-header span {
  flex: 0 0 auto;
  color: #687285;
  font-size: 11px;
  font-weight: 700;
}

.api-docs-auth-header code {
  min-width: 0;
  overflow: hidden;
  color: #26354a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-docs-hidden-code {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.api-docs-service-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.api-docs-service-note .api-docs-label {
  margin: 0;
}

.api-docs-panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.api-docs-panel-title h2,
.api-docs-integration-panel h2 {
  margin: 0;
  color: #152137;
  font-size: 17px;
}

.api-docs-panel-title p {
  margin: 4px 0 0;
  color: #7a8495;
  font-size: 11px;
}

.api-docs-count {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: #4f6481;
  border-radius: 5px;
  background: #f1f4f8;
  font-size: 11px;
  font-weight: 700;
}

.api-docs-interface-list {
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 7px;
}

.api-docs-interface-row {
  border-bottom: 1px solid #e4e9f0;
  background: #ffffff;
}

.api-docs-interface-row:last-child {
  border-bottom: 0;
}

.api-docs-interface-trigger {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 9px 13px;
  text-align: left;
  border: 0;
  background: #ffffff;
  cursor: pointer;
}

.api-docs-interface-trigger:hover,
.api-docs-interface-row.is-open .api-docs-interface-trigger {
  background: #f7faff;
}

.api-docs-method {
  display: inline-flex;
  justify-content: center;
  padding: 4px 6px;
  color: #08734f;
  border-radius: 4px;
  background: #e7f8f1;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 900;
}

.api-docs-interface-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.api-docs-interface-main strong {
  overflow: hidden;
  color: #172235;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-docs-interface-main code {
  overflow: hidden;
  color: #52647e;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-docs-interface-trigger > svg {
  width: 16px;
  height: 16px;
  color: #8792a2;
  transition: transform 160ms ease;
}

.api-docs-interface-row.is-open .api-docs-interface-trigger > svg {
  color: #126be8;
  transform: rotate(90deg);
}

.api-docs-interface-detail {
  display: none;
  padding: 16px;
  border-top: 1px solid #e1e8f2;
  background: #f8fbff;
}

.api-docs-interface-row.is-open .api-docs-interface-detail {
  display: block;
}

.api-docs-error-list {
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 7px;
}

.api-docs-error-list > div {
  min-height: 48px;
  display: grid;
  grid-template-columns: 48px minmax(240px, 0.8fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px 13px;
  border-bottom: 1px solid #e4e9f0;
}

.api-docs-error-list > div:last-child {
  border-bottom: 0;
}

.api-docs-error-list code {
  color: #c04452;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 800;
}

.api-docs-error-list strong {
  color: #29384e;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.api-docs-error-list span {
  color: #687386;
  font-size: 11px;
}

.api-docs-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.api-docs-detail-grid > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 11px;
  border: 1px solid #e0e7f1;
  border-radius: 6px;
  background: #ffffff;
}

.api-docs-detail-grid strong {
  color: #687488;
  font-size: 11px;
}

.api-docs-detail-grid code,
.api-docs-detail-grid span {
  color: #26364d;
  font-size: 11px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.api-docs-detail-grid code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.api-docs-detail-description {
  margin: 12px 0;
  color: #5e6a7d;
  font-size: 12px;
  line-height: 1.7;
}

.api-docs-code-block {
  overflow: hidden;
  border: 1px solid #243d5f;
  border-radius: 7px;
  background: #0f223b;
}

.api-docs-code-block > div {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  color: #dcecff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 700;
}

.api-docs-code-block .secondary-button {
  min-height: 29px;
  padding: 0 9px;
  color: #dcecff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.api-docs-code-block pre {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 15px;
  color: #e8f2ff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.65;
  white-space: pre;
}

.api-docs-integration-panel {
  min-height: 380px;
}

.api-docs-integration-panel h2 {
  margin-bottom: 8px;
}

.api-docs-integration-panel .api-docs-code-block {
  margin-top: 16px;
}

.api-docs-callout {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  margin-top: 16px;
  padding: 12px;
  color: #3f638e;
  border: 1px solid #d5e5fb;
  border-radius: 7px;
  background: #f3f8ff;
}

.api-docs-callout svg {
  width: 16px;
  height: 16px;
}

.api-docs-callout p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .api-docs-catalog-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .api-docs-schema-grid {
    grid-template-columns: 1fr;
  }

  .api-docs-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .api-docs-catalog {
    padding: 0;
  }

  .api-docs-catalog-layout {
    grid-template-columns: 1fr;
  }

  .api-docs-nav {
    position: static;
    max-height: none;
  }

  .api-docs-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .api-docs-groups {
    grid-template-columns: 1fr;
  }

  .api-docs-panel,
  .api-docs-endpoint-card,
  .api-docs-section {
    padding: 14px;
  }

  .api-docs-endpoint-title {
    display: grid;
  }

  .api-docs-endpoint-title .secondary-button {
    justify-self: start;
  }

  .api-docs-auth-card {
    grid-template-columns: 1fr;
  }

  .api-docs-auth-card code {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .api-docs-auth-key-card .secondary-button {
    justify-self: start;
  }

  .api-docs-auth-header {
    display: grid;
    gap: 6px;
  }

  .api-docs-auth-header code {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .api-docs-service-note {
    grid-template-columns: 1fr;
  }

  .api-docs-error-list > div {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .api-docs-error-list span {
    grid-column: 1 / -1;
  }

  .api-docs-interface-trigger {
    grid-template-columns: 44px minmax(0, 1fr) 16px;
    gap: 8px;
    padding-inline: 10px;
  }

  .api-docs-interface-main strong,
  .api-docs-interface-main code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #fbfafd;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
select {
  font: inherit;
}

button,
input,
select {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(98, 81, 199, 0.22);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 9px 13px;
  color: #ffffff;
  background: var(--purple);
  border-radius: 6px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.admin-layout {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(36, 104, 229, 0.045), transparent 30%),
    radial-gradient(circle at 8% 92%, rgba(174, 73, 96, 0.035), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #fbfafd 100%);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.sidebar-brand {
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  overflow: hidden;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #ffffff;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  padding: 24px 14px;
}

.sidebar-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink-soft);
  font-weight: 650;
  transition:
    color 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease;
}

.sidebar-nav a:hover {
  color: var(--purple-dark);
  background: var(--canvas-soft);
}

.sidebar-nav a.active {
  color: var(--purple-dark);
  border-color: #cfe0ff;
  background: var(--purple-soft);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.nav-icon svg {
  width: 15px;
  height: 15px;
}

.sidebar-nav a.active .nav-icon {
  border-color: #c7dbff;
  color: var(--purple);
}

.sidebar-nav a[data-zhini-service-link] {
  margin-top: 6px;
  border-top-color: var(--line);
}

.sidebar-nav a[data-zhini-service-link][aria-busy="true"] {
  cursor: wait;
  opacity: 0.7;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: auto 14px 16px;
  padding: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.sidebar-footer-icon {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  color: var(--green);
  border-radius: 7px;
  background: var(--green-soft);
}

.sidebar-footer-icon svg {
  width: 17px;
  height: 17px;
}

.sidebar-footer div {
  min-width: 0;
  display: grid;
}

.sidebar-footer strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.sidebar-footer span:last-child {
  font-size: 11px;
}

.workspace {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.topbar-title,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-title {
  min-width: 0;
  gap: 12px;
}

.topbar-title h1 {
  margin: 0;
  overflow: hidden;
  font-size: 23px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  flex: 0 0 auto;
  gap: 10px;
}

.icon-button,
.secondary-button,
.primary-button,
.table-action {
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  transition:
    color 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease,
    transform 0.16s ease;
}

.icon-button:hover,
.secondary-button:hover,
.table-action:hover {
  color: var(--purple-dark);
  border-color: #bcd5ff;
  background: var(--purple-soft);
}

.icon-button:active,
.secondary-button:active,
.primary-button:active,
.table-action:active {
  transform: translateY(1px);
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.connection-state {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--canvas-soft);
  font-size: 12px;
  font-weight: 650;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-light);
}

.connection-state[data-connection-state="loading"] .connection-dot {
  background: var(--orange);
  animation: pulse 1.1s ease-in-out infinite;
}

.connection-state[data-connection-state="connected"] {
  color: var(--green);
  border-color: #c5ead5;
  background: var(--green-soft);
}

.connection-state[data-connection-state="connected"] .connection-dot {
  background: var(--green);
}

.connection-state[data-connection-state="error"] {
  color: var(--red);
  border-color: #f1cbd0;
  background: var(--red-soft);
}

.connection-state[data-connection-state="error"] .connection-dot {
  background: var(--red);
}

.account-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  background: var(--purple);
  font-size: 12px;
  font-weight: 750;
}

.main-content {
  width: min(100%, 1640px);
  margin: 0 auto;
  padding: 26px 24px 48px;
}

.auth-panel {
  max-width: 760px;
  margin: min(13vh, 112px) auto 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 45px rgba(36, 31, 58, 0.07);
}

.auth-panel-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--line);
}

.auth-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  color: var(--purple);
  border-radius: 8px;
  background: var(--purple-soft);
}

.auth-icon svg {
  width: 20px;
  height: 20px;
}

.auth-panel h2,
.section-heading h2,
.panel-header h2 {
  margin: 0;
  color: var(--ink);
}

.auth-panel h2 {
  font-size: 19px;
}

.auth-panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding-top: 22px;
}

.auth-api-base-field {
  margin-top: 20px;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas-soft);
}

.auth-mode-button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-mode-button:hover,
.auth-mode-button.is-active {
  color: var(--purple);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(36, 31, 58, 0.1);
}

.auth-form .primary-button {
  grid-column: 1 / -1;
}

.auth-code-button {
  width: 100%;
}

.field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--canvas-soft);
  outline: 0;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

.field input:focus {
  border-color: var(--purple);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(98, 81, 199, 0.12);
}

.field input::placeholder {
  color: var(--muted-light);
}

.primary-button,
.secondary-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  font-weight: 700;
}

.primary-button {
  height: 42px;
  padding: 0 20px;
  color: #ffffff;
  border-color: var(--purple);
  background: var(--purple);
}

.primary-button:hover {
  border-color: var(--purple-dark);
  background: var(--purple-dark);
}

.primary-button svg,
.secondary-button svg {
  width: 16px;
  height: 16px;
}

.form-error {
  margin: 16px 0 0;
  padding: 10px 12px;
  color: var(--red);
  border: 1px solid #f1cbd0;
  border-radius: 6px;
  background: var(--red-soft);
  font-size: 13px;
}

.dashboard-content {
  display: grid;
  gap: 24px;
}

.overview-section {
  scroll-margin-top: calc(var(--topbar-height) + 18px);
}

.section-heading,
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.section-heading {
  margin-bottom: 14px;
}

.section-kicker {
  margin: 0 0 2px;
  color: var(--purple);
  font-size: 10px;
  font-weight: 800;
}

.section-heading h2,
.panel-header h2 {
  font-size: 18px;
}

.last-updated {
  color: var(--muted);
  font-size: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-item {
  min-width: 0;
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.metric-item:last-child {
  border-right: 0;
}

.metric-icon {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 8px;
}

.metric-icon svg {
  width: 18px;
  height: 18px;
}

.metric-icon-purple {
  color: var(--purple);
  background: var(--purple-soft);
}

.metric-icon-blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.metric-icon-green {
  color: var(--green);
  background: var(--green-soft);
}

.metric-icon-orange {
  color: var(--orange);
  background: var(--orange-soft);
}

.metric-item div {
  min-width: 0;
  display: grid;
}

.metric-item div span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-item strong {
  margin-top: 2px;
  overflow: hidden;
  font-size: 23px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-banner,
.account-panel,
.quota-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.profile-banner {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
  padding: 16px 18px;
}

.profile-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  flex: 0 0 46px;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  background: var(--purple);
  font-size: 18px;
  font-weight: 750;
}

.profile-intro {
  min-width: 0;
  flex: 1;
}

.profile-intro h3 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-intro p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-status,
.account-source,
.quota-deadline {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: var(--green);
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.profile-status-error {
  color: var(--red);
  background: var(--red-soft);
}

.account-panel,
.quota-panel {
  overflow: hidden;
}

.account-panel .panel-header,
.quota-panel .panel-header {
  min-height: 70px;
}

.account-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.detail-item {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 17px 18px;
  border-right: 1px solid var(--line);
}

.detail-item:last-child {
  border-right: 0;
}

.detail-item span {
  color: var(--muted);
  font-size: 12px;
}

.detail-item strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quota-overview {
  padding: 17px 18px 20px;
  border-top: 1px solid var(--line);
}

.quota-overview-numbers {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
}

.quota-overview-numbers strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1.2;
}

.quota-overview-numbers b {
  color: var(--ink-soft);
}

.quota-track-large {
  height: 8px;
  margin-top: 12px;
}

.quota-overview p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.key-panel {
  scroll-margin-top: calc(var(--topbar-height) + 18px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 32px rgba(40, 36, 58, 0.045);
}

.key-panel-header {
  align-items: flex-start;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.key-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(30, 25, 47, 0.24);
}

.key-dialog::backdrop {
  background: rgba(28, 24, 39, 0.42);
}

.key-dialog-form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.key-dialog-heading,
.key-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.key-dialog-heading h2 {
  margin: 0;
  font-size: 18px;
}

.key-dialog-actions {
  justify-content: flex-end;
}

.usage-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--canvas);
}

.usage-detail > div {
  display: grid;
  gap: 5px;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
}

.usage-detail > div:last-child {
  border-right: 0;
}

.usage-detail span {
  color: var(--muted);
  font-size: 12px;
}

.usage-detail strong {
  color: var(--ink);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.danger-action {
  color: var(--red);
}

.danger-action:hover {
  color: var(--red);
  border-color: #efc4ca;
  background: var(--red-soft);
}

.key-name {
  color: var(--ink-soft);
  font-weight: 700;
}

.panel-header {
  min-height: 82px;
  padding: 17px 18px;
}

.panel-header > div:first-child {
  min-width: 0;
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.panel-header p strong {
  color: var(--ink-soft);
}

.table-scroll {
  overflow-x: auto;
}

.key-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  table-layout: fixed;
}

.key-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.key-table th,
.key-table td {
  padding: 16px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.key-table th {
  height: 50px;
  color: var(--muted);
  background: #faf9fc;
  font-size: 12px;
  font-weight: 700;
}

.key-table td {
  height: 72px;
  color: var(--ink-soft);
}

.key-table th:nth-child(1) {
  width: 19%;
}

.key-table th:nth-child(2) {
  width: 11%;
}

.key-table th:nth-child(3) {
  width: 13%;
}

.key-table th:nth-child(4) {
  width: 16%;
}

.key-table th:nth-child(5) {
  width: 7%;
}

.key-table th:nth-child(6) {
  width: 7%;
}

.key-table th:nth-child(7) {
  width: 27%;
}

.key-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-value,
.enterprise-id {
  overflow: hidden;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-value {
  min-width: 0;
  padding: 7px 9px;
  color: #454250;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8f7fa;
  font-size: 12px;
}

.enterprise-id {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.table-action {
  min-width: 34px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 650;
}

.table-action.icon-only {
  width: 32px;
  min-width: 32px;
  padding: 0;
}

.table-action svg {
  width: 14px;
  height: 14px;
}

.quota-cell {
  display: grid;
  gap: 7px;
}

.quota-numbers {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.quota-numbers strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.quota-track {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceaf0;
}

.quota-track span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--purple);
}

.call-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.status-badge {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: currentColor;
}

.status-available {
  color: var(--green);
  background: var(--green-soft);
}

.status-empty {
  color: var(--red);
  background: var(--red-soft);
}

.actions-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.table-state td {
  height: 220px;
  padding: 30px;
  text-align: center;
}

.state-content {
  max-width: 430px;
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0 auto;
  color: var(--muted);
}

.state-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
  color: var(--muted);
  border-radius: 8px;
  background: var(--canvas);
}

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

.state-content strong {
  color: var(--ink-soft);
  font-size: 14px;
}

.state-content p {
  margin: 0;
  font-size: 12px;
}

.skeleton-line {
  height: 13px;
  border-radius: 4px;
  background: #ecebf0;
  animation: skeleton 1.25s ease-in-out infinite;
}

.skeleton-line.wide {
  width: 78%;
}

.skeleton-line.medium {
  width: 58%;
}

.skeleton-line.short {
  width: 38%;
}

.pagination {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 18px;
  border-top: 1px solid var(--line);
}

.page-size-control,
.page-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.page-size-control select {
  height: 34px;
  padding: 0 27px 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
}

.page-controls span {
  min-width: 80px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: min(380px, calc(100vw - 32px));
  padding: 11px 15px;
  color: #ffffff;
  border-radius: 7px;
  background: #292733;
  box-shadow: 0 12px 32px rgba(25, 22, 37, 0.2);
  font-size: 13px;
}

.toast.toast-error {
  background: #a82e3a;
}

.is-spinning {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes skeleton {
  50% {
    opacity: 0.48;
  }
}

@media (max-width: 1120px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-item:nth-child(2) {
    border-right: 0;
  }

  .metric-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .account-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-item:nth-child(2) {
    border-right: 0;
  }

  .detail-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 64px;
    padding: 0 15px;
  }

  .topbar-title h1 {
    font-size: 19px;
  }

  .connection-state {
    width: 34px;
    min-height: 34px;
    justify-content: center;
    padding: 0;
  }

  .connection-state [data-connection-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .account-avatar {
    display: none;
  }

  .main-content {
    padding: 18px 12px 36px;
  }

  .auth-panel {
    margin-top: 34px;
    padding: 19px;
  }

  .auth-form {
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: 100%;
  }

  .section-heading {
    align-items: flex-end;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric-item {
    min-height: 88px;
    gap: 9px;
    padding: 14px 12px;
  }

  .metric-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .metric-item strong {
    font-size: 18px;
  }

  .profile-banner {
    padding: 14px;
  }

  .profile-status {
    align-self: flex-start;
  }

  .account-detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-item,
  .detail-item:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-item:last-child {
    border-bottom: 0;
  }

  .panel-header {
    min-height: 72px;
    padding: 14px;
  }

  .key-panel-header {
    align-items: flex-start;
  }

  .panel-actions {
    flex: 0 0 auto;
    flex-direction: column;
  }

  .panel-actions .secondary-button {
    min-height: 34px;
    padding: 0 10px;
  }

  .table-scroll {
    overflow: visible;
  }

  .key-table,
  .key-table tbody,
  .key-table tr,
  .key-table td {
    width: 100%;
    display: block;
  }

  .key-table {
    min-width: 0;
  }

  .key-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .key-table tr {
    padding: 14px;
    border-top: 1px solid var(--line);
  }

  .key-table td {
    min-height: 42px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border: 0;
    text-align: right;
  }

  .key-table td::before {
    flex: 0 0 74px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
  }

  .key-table td:first-child {
    padding-top: 0;
  }

  .key-table td:last-child {
    padding-bottom: 0;
  }

  .key-cell,
  .quota-cell,
  .actions-cell {
    min-width: 0;
    flex: 1;
    justify-content: flex-end;
  }

  .key-value {
    max-width: calc(100vw - 174px);
  }

  .quota-cell {
    max-width: 220px;
  }

  .enterprise-id {
    max-width: calc(100vw - 132px);
  }

  .table-state {
    padding: 0 !important;
  }

  .table-state td {
    min-height: 210px;
    display: grid;
    padding: 24px 14px;
    text-align: center;
  }

  .table-state td::before {
    display: none;
  }

  .skeleton-row td {
    min-height: 34px;
  }

  .pagination {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .page-size-control,
  .page-controls {
    justify-content: space-between;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* SocialDataX-inspired component system */
:root {
  --ink: #171620;
  --ink-soft: #403d48;
  --muted: #716d78;
  --muted-light: #9f9aa8;
  --line: #e6ebf2;
  --line-strong: #d8e1ec;
  --surface: #ffffff;
  --canvas: #f8faff;
  --canvas-soft: #f3f7ff;
  --purple: #2468e5;
  --purple-dark: #174eb1;
  --purple-soft: #eef5ff;
  --sidebar-width: 264px;
  --topbar-height: 74px;
}

body {
  color: var(--ink);
  background: #fbfafd;
  font-size: 14px;
  line-height: 1.5715;
}

:focus-visible {
  outline: 3px solid rgba(36, 104, 229, 0.18);
  outline-offset: 2px;
}

.admin-layout {
  background:
    radial-gradient(circle at 88% 8%, rgba(36, 104, 229, 0.045), transparent 30%),
    radial-gradient(circle at 8% 92%, rgba(174, 73, 96, 0.035), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #fbfafd 100%);
}

.sidebar {
  width: var(--sidebar-width);
  padding: 0 16px 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
}

.sidebar-brand {
  min-height: var(--topbar-height);
  gap: 10px;
  padding: 0 8px;
  border-bottom-color: var(--line);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border: 0;
  border-radius: 9px;
  box-shadow: 0 5px 14px rgba(36, 104, 229, 0.18);
}

.brand-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.sidebar-nav {
  gap: 6px;
  padding: 22px 0;
}

.sidebar-nav a {
  min-height: 44px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight: 700;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.sidebar-nav a:hover {
  color: var(--purple);
  border-color: rgba(36, 104, 229, 0.1);
  background: rgba(238, 245, 255, 0.72);
  transform: translateX(2px);
}

.sidebar-nav a.active {
  color: var(--purple);
  border-color: rgba(36, 104, 229, 0.18);
  background: var(--purple-soft);
}

.nav-icon {
  width: 24px;
  height: 24px;
  border-color: var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  background: #ffffff;
}

.sidebar-nav a.active .nav-icon {
  color: var(--purple);
  border-color: rgba(36, 104, 229, 0.2);
}

.sidebar-footer {
  margin: auto 0 0;
  padding: 14px 10px 0;
  border-top-color: var(--line);
}

.sidebar-footer-icon {
  color: var(--purple);
  background: var(--purple-soft);
}

.workspace {
  margin-left: var(--sidebar-width);
}

.topbar {
  min-height: var(--topbar-height);
  gap: 18px;
  padding: 0 24px;
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.topbar-title h1 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.topbar-actions {
  gap: 10px;
}

.icon-button,
.secondary-button,
.primary-button,
.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-color: var(--line);
  box-shadow: none;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.icon-button,
.secondary-button {
  color: var(--ink-soft);
  background: #ffffff;
}

.icon-button {
  border-radius: 999px;
}

.secondary-button,
.primary-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.primary-button {
  color: #ffffff;
  border: 0;
  background: var(--purple);
}

.primary-button:hover {
  color: #ffffff;
  background: var(--purple-dark);
  box-shadow: 0 7px 18px rgba(36, 104, 229, 0.2);
  transform: translateY(-1px);
}

.secondary-button:hover,
.icon-button:hover,
.table-action:hover {
  color: var(--purple);
  border-color: rgba(36, 104, 229, 0.26);
  background: var(--purple-soft);
}

.topbar-disconnect svg,
.secondary-button svg,
.primary-button svg {
  width: 15px;
  height: 15px;
}

.connection-state {
  min-height: 36px;
  padding: 0 13px;
  color: var(--muted);
  border-color: var(--line);
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.connection-state[data-connection-state="connected"] {
  color: #168653;
  border-color: #ccebd9;
  background: #f0fbf5;
}

.account-avatar {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  color: var(--purple);
  border: 1px solid rgba(36, 104, 229, 0.16);
  background: linear-gradient(145deg, #ffffff, #eaf2ff);
  box-shadow: 0 3px 12px rgba(36, 104, 229, 0.1);
  font-weight: 900;
}

.main-content {
  width: 100%;
  max-width: none;
  padding: 24px;
}

.dashboard-content {
  gap: 16px;
}

.auth-panel,
.overview-section,
.profile-banner,
.metric-grid,
.account-panel,
.quota-panel,
.key-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.auth-panel {
  max-width: 720px;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(28, 22, 48, 0.08);
}

.auth-panel-heading {
  padding-bottom: 18px;
  border-bottom-color: var(--line);
}

.auth-icon {
  color: var(--purple);
  border-radius: 9px;
  background: var(--purple-soft);
}

.field {
  gap: 7px;
}

.field > span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.page-size-control select {
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.field input:hover,
.field select:hover,
.page-size-control select:hover {
  border-color: rgba(36, 104, 229, 0.32);
}

.field input:focus,
.field select:focus,
.page-size-control select:focus {
  border-color: var(--purple);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(36, 104, 229, 0.1);
}

.overview-section {
  overflow: hidden;
  padding: 0 22px 22px;
}

.overview-section .section-heading {
  min-height: 78px;
  margin: 0;
}

.section-heading,
.panel-header {
  gap: 18px;
}

.section-heading h2,
.panel-header h2 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.section-actions,
.panel-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.last-updated,
.key-count {
  color: var(--muted);
  font-size: 12px;
}

.key-count {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--purple-soft);
}

.key-count strong {
  color: var(--purple);
}

.overview-manage-link {
  text-decoration: none;
}

.profile-banner {
  min-height: 80px;
  margin: 0 0 14px;
  border-color: var(--line);
  background: linear-gradient(135deg, rgba(238, 245, 255, 0.72), #ffffff 60%);
  box-shadow: none;
}

.profile-avatar {
  color: #ffffff;
  background: var(--purple);
  box-shadow: 0 6px 16px rgba(36, 104, 229, 0.2);
}

.profile-intro h3 {
  color: var(--ink);
  font-weight: 900;
}

.profile-status,
.account-source,
.quota-deadline {
  border-radius: 999px;
  font-weight: 700;
}

.metric-grid {
  border-color: var(--line);
  box-shadow: none;
}

.metric-item {
  min-height: 96px;
  border-right-color: var(--line);
  transition: background-color 0.18s ease;
}

.metric-item:hover {
  background: rgba(238, 245, 255, 0.5);
}

.metric-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 9px;
}

.metric-item strong {
  color: var(--ink);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.account-panel,
.quota-panel {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.account-panel .panel-header,
.quota-panel .panel-header {
  min-height: 74px;
  padding: 16px 20px;
}

.account-detail-grid,
.quota-overview {
  border-top-color: var(--line);
}

.detail-item {
  border-right-color: var(--line);
  transition: background-color 0.18s ease;
}

.detail-item:hover {
  background: rgba(238, 245, 255, 0.5);
}

.detail-item strong {
  color: var(--ink-soft);
}

.quota-overview-numbers strong {
  font-size: 32px;
  font-weight: 900;
}

.quota-track {
  background: #edf1f7;
}

.quota-track span {
  background: var(--purple);
}

.key-panel {
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.key-panel-header {
  min-height: 84px;
  align-items: center;
  padding: 0 18px;
}

.panel-actions {
  align-items: center;
  gap: 8px;
}

.table-scroll {
  border-top: 0;
}

.key-table {
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
}

.key-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.key-table th {
  height: 53px;
  padding: 16px;
  color: var(--muted);
  border-top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 245, 255, 0.58);
  font-size: 13px;
  font-weight: 900;
  text-transform: none;
}

.key-table td {
  height: 66px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  transition: background-color 0.16s ease;
}

.key-table tbody tr:last-child td {
  border-bottom: 0;
}

.key-table tbody tr:hover td {
  background: rgba(251, 250, 253, 0.88);
}

.key-table th:nth-child(1) {
  width: 12%;
}

.key-table th:nth-child(2) {
  width: 21%;
}

.key-table th:nth-child(3) {
  width: 10%;
}

.key-table th:nth-child(4) {
  width: 14%;
}

.key-table th:nth-child(5) {
  width: 7%;
}

.key-table th:nth-child(6) {
  width: 7%;
}

.key-table th:nth-child(7) {
  width: 29%;
}

.key-name {
  color: var(--ink);
  font-weight: 900;
}

.key-cell {
  width: fit-content;
  max-width: 100%;
  gap: 2px;
  padding-left: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.key-value {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-cell .table-action {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
}

.key-cell .table-action:hover {
  color: var(--purple);
  background: var(--purple-soft);
}

.enterprise-id,
.call-count {
  color: var(--ink-soft);
  font-size: 12px;
}

.quota-numbers {
  font-size: 11px;
}

.quota-track {
  height: 5px;
}

.status-badge {
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
}

.status-available {
  color: #168653;
  border-color: #ccebd9;
  background: #f0fbf5;
}

.status-empty {
  color: #c7404e;
  border-color: #f2d0d5;
  background: #fff3f4;
}

.actions-cell {
  min-width: max-content;
  flex-wrap: nowrap;
  gap: 6px;
  white-space: nowrap;
}

.table-action {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.table-action svg {
  width: 13px;
  height: 13px;
}

.danger-action {
  color: #b33a48;
}

.danger-action:hover {
  color: #a72f3d;
  border-color: #efc9cf;
  background: #fff3f4;
}

.pagination {
  min-height: 62px;
  padding: 12px 16px;
  border-top-color: var(--line);
  background: #ffffff;
}

.page-size-control,
.page-controls {
  color: var(--muted);
  font-size: 12px;
}

.table-state td {
  height: 250px;
}

.state-icon {
  color: var(--purple);
  background: var(--purple-soft);
}

.skeleton-line {
  background: linear-gradient(90deg, #edf2f8 25%, #f8fafc 50%, #edf2f8 75%);
  background-size: 200% 100%;
}

.key-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid rgba(222, 216, 232, 0.92);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 22px 56px rgba(28, 22, 48, 0.18);
  animation: dialog-in 0.18s ease-out;
}

.key-dialog::backdrop {
  background: rgba(35, 32, 42, 0.38);
  backdrop-filter: blur(3px);
  animation: backdrop-in 0.18s ease-out;
}

.key-dialog-form {
  gap: 16px;
  padding: 23px;
}

.key-dialog-heading {
  display: block;
}

.key-dialog-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
}

.key-dialog .field input {
  width: 100%;
  height: 38px;
}

.key-dialog-actions {
  gap: 10px;
  margin-top: 2px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.key-dialog-actions .secondary-button,
.key-dialog-actions .primary-button {
  width: auto;
  min-width: 76px;
}

.usage-detail {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--canvas-soft);
}

.usage-detail > div {
  border-right-color: var(--line);
}

.usage-detail strong {
  font-weight: 900;
}

.form-error {
  padding: 9px 11px;
  border: 1px solid #f0cbd1;
  border-radius: 6px;
  background: #fff3f4;
}

.toast {
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 11px 17px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 22, 32, 0.94);
  box-shadow: 0 12px 32px rgba(28, 22, 48, 0.22);
  backdrop-filter: blur(12px);
  animation: toast-in 0.2s ease-out;
}

.toast-error {
  background: rgba(179, 58, 72, 0.96);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 1120px) {
  .key-table th:nth-child(2) {
    width: 21%;
  }

  .key-table th:nth-child(7) {
    width: 29%;
  }
}

@media (max-width: 860px) {
  .workspace {
    margin-left: 0;
  }

  .sidebar {
    box-shadow: 18px 0 48px rgba(28, 22, 48, 0.14);
  }

  .main-content {
    padding: 18px;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 64px;
    padding: 0 14px;
  }

  .topbar-title h1 {
    font-size: 20px;
  }

  .topbar-disconnect {
    width: 36px;
    min-width: 36px;
    padding: 0;
  }

  .topbar-disconnect span {
    display: none;
  }

  .main-content {
    padding: 14px 12px 32px;
  }

  .overview-section {
    padding: 0 14px 14px;
  }

  .overview-section .section-heading {
    min-height: 72px;
  }

  .section-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
  }

  .overview-manage-link {
    min-height: 32px;
  }

  .key-panel-header {
    min-height: 132px;
    align-items: stretch;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 16px 14px;
  }

  .panel-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .panel-actions .primary-button {
    width: 100%;
  }

  .key-table td {
    min-height: 52px;
    padding: 12px 14px;
    border-bottom-color: var(--line);
  }

  .key-table {
    min-width: 0;
  }

  .key-table tr {
    margin: 12px;
    padding: 0;
    overflow: hidden;
    border-color: var(--line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(28, 22, 48, 0.04);
  }

  .key-table td[data-label="操作"] {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .key-table td[data-label="操作"]::before {
    flex-basis: auto;
  }

  .actions-cell {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .actions-cell::-webkit-scrollbar {
    display: none;
  }

  .key-table .table-state td {
    min-height: 210px;
    display: grid;
    padding: 24px 14px;
  }

  .key-table .table-state td::before {
    display: none;
  }

  .table-action {
    min-height: 31px;
  }

  .key-dialog-form {
    padding: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .key-dialog,
  .key-dialog::backdrop,
  .toast,
  .account-avatar.is-loading,
  .metric-profile-avatar.is-loading {
    animation: none;
  }
}

/* MCP configuration guide */
.mcp-guide {
  gap: 18px;
}

.topbar-actions .primary-button {
  width: auto;
}

.mcp-hero,
.mcp-section,
.mcp-help {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(18, 42, 78, 0.035);
}

.mcp-hero {
  min-height: 150px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 10%, rgba(22, 119, 255, 0.13), transparent 32%),
    linear-gradient(135deg, #ffffff 35%, #f3f8ff 100%);
}

.mcp-hero-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: var(--purple);
  box-shadow: 0 10px 24px rgba(36, 104, 229, 0.2);
}

.mcp-hero-icon svg {
  width: 26px;
  height: 26px;
}

.mcp-eyebrow,
.mcp-step-label {
  color: var(--purple);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.mcp-hero h2 {
  margin: 4px 0 5px;
  color: var(--ink);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.mcp-hero p {
  max-width: 850px;
  margin: 0;
  color: var(--muted);
}

.mcp-readonly,
.mcp-tool-count {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  color: #168653;
  border: 1px solid #ccebd9;
  border-radius: 999px;
  background: #f0fbf5;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.mcp-readonly svg {
  width: 14px;
  height: 14px;
}

.mcp-section {
  padding: 22px;
}

.mcp-section-heading {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.mcp-section-heading h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.mcp-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mcp-steps li {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 4px 22px 4px 0;
}

.mcp-steps li:not(:last-child)::after {
  position: absolute;
  top: 20px;
  right: 10px;
  width: 22px;
  height: 1px;
  content: "";
  background: #dce8fa;
}

.mcp-steps li > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--purple);
  border: 1px solid #cfe0ff;
  border-radius: 50%;
  background: var(--purple-soft);
  font-size: 13px;
  font-weight: 900;
}

.mcp-steps strong,
.mcp-capabilities strong {
  color: var(--ink);
  font-weight: 900;
}

.mcp-steps p,
.mcp-capabilities p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.mcp-config-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(480px, 1.2fr);
  gap: 18px;
}

.mcp-endpoint-card,
.mcp-code-card {
  min-width: 0;
}

.mcp-value-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.mcp-value-row + .mcp-value-row {
  margin-top: 10px;
}

.mcp-value-row > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.mcp-value-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.mcp-value-row code {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mcp-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  margin-top: 12px;
  padding: 11px 12px;
  color: #3e628f;
  border: 1px solid #d7e7ff;
  border-radius: 8px;
  background: #f3f8ff;
}

.mcp-note svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.mcp-note p {
  margin: 0;
  font-size: 12px;
}

.mcp-code {
  min-height: 224px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: #dcecff;
  border: 1px solid #233c5e;
  border-radius: 9px;
  background: #10243e;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.75;
  tab-size: 2;
}

.mcp-code code {
  font: inherit;
}

.mcp-tool-count {
  color: var(--purple);
  border-color: #cfe0ff;
  background: var(--purple-soft);
}

.mcp-capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.mcp-capabilities article {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 11px;
  padding: 17px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.18s ease;
}

.mcp-capabilities article:nth-child(3n) {
  border-right: 0;
}

.mcp-capabilities article:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.mcp-capabilities article:hover {
  background: #f7faff;
}

.mcp-capabilities article > svg {
  width: 36px;
  height: 36px;
  padding: 9px;
  color: var(--purple);
  border-radius: 9px;
  background: var(--purple-soft);
}

.mcp-help {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
}

.mcp-help > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mcp-help > div > svg {
  width: 34px;
  height: 34px;
  padding: 8px;
  color: var(--purple);
  border-radius: 50%;
  background: var(--purple-soft);
}

.mcp-help span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mcp-help strong {
  color: var(--ink);
}

.mcp-help small {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1120px) {
  .mcp-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 22px;
  }

  .mcp-steps li:nth-child(2)::after {
    display: none;
  }

  .mcp-config-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .mcp-hero {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 20px;
  }

  .mcp-readonly {
    grid-column: 2;
    width: fit-content;
  }

  .mcp-steps,
  .mcp-capabilities {
    grid-template-columns: 1fr;
  }

  .mcp-steps {
    gap: 17px;
  }

  .mcp-steps li {
    padding-right: 0;
  }

  .mcp-steps li::after {
    display: none;
  }

  .mcp-capabilities article,
  .mcp-capabilities article:nth-child(3n),
  .mcp-capabilities article:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mcp-capabilities article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 520px) {
  .mcp-hero {
    grid-template-columns: 1fr;
  }

  .mcp-hero-icon {
    width: 46px;
    height: 46px;
  }

  .mcp-hero h2 {
    font-size: 20px;
  }

  .mcp-readonly {
    grid-column: 1;
  }

  .mcp-section {
    padding: 17px;
  }

  .mcp-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .mcp-value-row {
    align-items: stretch;
    flex-direction: column;
  }

  .mcp-value-row .secondary-button,
  .mcp-section-heading .secondary-button {
    width: fit-content;
  }

  .mcp-help {
    align-items: stretch;
    flex-direction: column;
  }

  .mcp-help .secondary-button {
    width: 100%;
  }
}

/* 独立登录页 */
body[data-page="login"] {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: #f5f8ff;
}

/* MCP HTTP API documentation */
.api-docs {
  gap: 18px;
}

.docs-hero,
.docs-section,
.docs-toc {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(18, 42, 78, 0.035);
}

.docs-hero {
  min-height: 176px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 0%, rgba(22, 119, 255, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff 35%, #f3f8ff 100%);
}

.docs-hero > div:first-child {
  min-width: 0;
}

.docs-hero h2 {
  margin: 5px 0 7px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.docs-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
}

.docs-endpoint {
  min-width: min(100%, 380px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 9px 9px 12px;
  border: 1px solid #cfe0ff;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(36, 104, 229, 0.08);
}

.docs-endpoint > span {
  padding: 3px 7px;
  color: #ffffff;
  border-radius: 5px;
  background: var(--purple);
  font-size: 10px;
  font-weight: 900;
}

.docs-endpoint code {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-endpoint .icon-button {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.docs-toc {
  position: sticky;
  top: calc(var(--topbar-height) + 18px);
  display: grid;
  gap: 3px;
  padding: 14px;
}

.docs-toc strong {
  padding: 6px 10px 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.docs-toc a {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--muted);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.docs-toc a:hover {
  color: var(--purple);
  background: var(--purple-soft);
}

.docs-content {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.docs-section {
  scroll-margin-top: calc(var(--topbar-height) + 18px);
  min-width: 0;
  padding: 24px;
}

.docs-section-title {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.docs-section-title > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--purple);
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: var(--purple-soft);
  font-size: 11px;
  font-weight: 900;
}

.docs-section-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
}

.docs-section-title p,
.docs-paragraph {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.docs-paragraph {
  margin-top: 14px;
  line-height: 1.8;
}

.docs-paragraph code,
.docs-callout code {
  padding: 2px 5px;
  color: var(--purple-dark);
  border-radius: 4px;
  background: var(--purple-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.docs-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.docs-facts article {
  display: grid;
  gap: 4px;
  padding: 15px;
  border-right: 1px solid var(--line);
}

.docs-facts article:last-child {
  border-right: 0;
}

.docs-facts span {
  color: var(--muted);
  font-size: 11px;
}

.docs-facts strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.docs-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  margin-top: 14px;
  padding: 11px 13px;
  color: #3e628f;
  border: 1px solid #d7e7ff;
  border-radius: 8px;
  background: #f3f8ff;
}

.docs-callout svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.docs-callout p {
  margin: 0;
  font-size: 12px;
}

.docs-callout-warning {
  color: #865314;
  border-color: #f0dfbd;
  background: #fff9ed;
}

.docs-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.docs-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.docs-table th,
.docs-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.docs-table th {
  color: var(--muted);
  background: #f7faff;
  font-size: 12px;
  font-weight: 900;
}

.docs-table td {
  color: var(--ink-soft);
  font-size: 12px;
}

.docs-table tbody tr:last-child td {
  border-bottom: 0;
}

.docs-table code {
  color: var(--purple-dark);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.docs-required,
.docs-optional {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.docs-required {
  color: #b33a48;
  background: #fff3f4;
}

.docs-optional {
  color: var(--muted);
  background: #f3f5f8;
}

.docs-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.docs-code-grid + .docs-code-block,
.docs-table-wrap + .docs-code-block {
  margin-top: 14px;
}

.docs-code-block {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #233c5e;
  border-radius: 9px;
  background: #10243e;
}

.docs-code-block > div {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px 7px 15px;
  color: #bcd2ee;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11px;
  font-weight: 800;
}

.docs-code-block .secondary-button {
  min-height: 30px;
  padding: 0 10px;
  color: #dcecff;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
}

.docs-code-block .secondary-button:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.docs-code-block pre {
  min-height: 130px;
  margin: 0;
  padding: 17px;
  overflow: auto;
  color: #dcecff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.7;
  tab-size: 2;
}

.docs-code-block code {
  font: inherit;
}

.docs-tools-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.docs-tools-list details {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.docs-tools-list details:last-child {
  border-bottom: 0;
}

.docs-tools-list summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 15px;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.16s ease;
}

.docs-tools-list summary::-webkit-details-marker {
  display: none;
}

.docs-tools-list summary:hover,
.docs-tools-list details[open] summary {
  background: #f7faff;
}

.docs-tools-list summary span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.docs-tools-list summary code {
  color: var(--purple-dark);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
}

.docs-tools-list summary small {
  color: var(--muted);
  font-size: 11px;
}

.docs-tools-list summary > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.docs-tools-list details[open] summary > svg {
  color: var(--purple);
  transform: rotate(180deg);
}

.docs-tools-list details > div {
  padding: 0 15px 15px;
  color: var(--ink-soft);
  background: #f7faff;
}

.docs-tools-list details > div p {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #e1eaf6;
  border-radius: 7px;
  background: #ffffff;
  font-size: 12px;
  line-height: 1.75;
}

.docs-tools-list details > div code {
  padding: 2px 5px;
  color: var(--purple-dark);
  border-radius: 4px;
  background: var(--purple-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.docs-tools-list details > .docs-tool-detail {
  display: grid;
  gap: 14px;
  padding: 0 15px 17px;
}

.docs-tools-list .docs-tool-detail > .docs-tool-description {
  margin: 0;
  padding: 12px 13px;
  color: var(--ink-soft);
  border: 0;
  border-left: 3px solid #b9d4ff;
  border-radius: 0 7px 7px 0;
  background: #ffffff;
  font-size: 12px;
  line-height: 1.8;
}

.docs-tool-tip,
.docs-tool-empty,
.docs-tool-return {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dce8f8;
  border-radius: 7px;
  background: #ffffff;
  font-size: 12px;
}

.docs-tool-tip {
  color: #765015;
  border-color: #efe0bd;
  background: #fffaef;
}

.docs-tool-empty {
  align-items: center;
  color: var(--muted);
}

.docs-tool-return {
  color: #3e628f;
  border-color: #d7e7ff;
  background: #f5f9ff;
}

.docs-tool-tip strong,
.docs-tool-empty strong,
.docs-tool-return strong {
  flex: 0 0 auto;
  color: inherit;
  font-weight: 900;
}

.docs-tool-tip span,
.docs-tool-empty span,
.docs-tool-return span {
  min-width: 0;
}

.docs-tool-table {
  min-width: 760px;
}

.docs-tool-table th,
.docs-tool-table td {
  padding: 11px 12px;
}

.docs-tool-table th:first-child,
.docs-tool-table td:first-child {
  width: 18%;
}

.docs-tool-table th:nth-child(2),
.docs-tool-table td:nth-child(2) {
  width: 16%;
}

.docs-tool-table th:nth-child(3),
.docs-tool-table td:nth-child(3),
.docs-tool-table th:nth-child(4),
.docs-tool-table td:nth-child(4) {
  width: 12%;
  white-space: nowrap;
}

.docs-tool-code {
  margin-top: 0;
}

.docs-tool-code pre {
  min-height: 0;
  max-height: 360px;
}

.docs-tools-list .docs-tool-code code {
  padding: 0;
  color: inherit;
  border-radius: 0;
  background: transparent;
  font: inherit;
}

@media (max-width: 1120px) {
  .docs-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .docs-endpoint {
    width: 100%;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-toc {
    position: static;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
  }

  .docs-toc strong {
    display: none;
  }

  .docs-toc a {
    flex: 0 0 auto;
  }
}

@media (max-width: 760px) {
  body[data-page="api-docs"] .topbar-actions .secondary-button {
    display: none;
  }

  .docs-hero,
  .docs-section {
    padding: 19px;
  }

  .docs-hero h2 {
    font-size: 21px;
  }

  .docs-facts,
  .docs-code-grid {
    grid-template-columns: 1fr;
  }

  .docs-facts article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .docs-facts article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 520px) {
  body[data-page="api-docs"] .topbar-actions .primary-button {
    width: 36px;
    min-width: 36px;
    padding: 0;
  }

  body[data-page="api-docs"] .topbar-actions .primary-button span {
    display: none;
  }

  .docs-endpoint {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .docs-section-title {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .docs-section-title > span {
    width: 28px;
    height: 28px;
  }

  .docs-code-block > div {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 12px;
  }

  .docs-code-block .secondary-button {
    width: fit-content;
  }

  .docs-tool-tip,
  .docs-tool-empty,
  .docs-tool-return {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}



/* 登录注册协议提示弹框与页内切换。 */
body[data-page="login"] .auth-switch-copy {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: #8b96a6;
  font-size: 12px;
  text-align: center;
}
body[data-page="login"] .auth-switch-copy .text-button {
  margin-left: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2468e5;
  cursor: pointer;
  font: inherit;
}
body[data-page="login"] .auth-switch-copy .text-button:hover {
  text-decoration: underline;
}
body[data-page="login"] .register-agreement button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2468e5;
  cursor: pointer;
  font: inherit;
}
body[data-page="login"] .reference-protocol-dialog[hidden] {
  display: none;
}
body[data-page="login"] .reference-protocol-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
body[data-page="login"] .reference-protocol-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 29, 55, .48);
}
body[data-page="login"] .reference-protocol-card {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 26px 28px 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(15, 29, 55, .25);
}
body[data-page="login"] .reference-protocol-close {
  position: absolute;
  top: 8px;
  right: 15px;
  color: #aaa;
  font-size: 24px;
}
body[data-page="login"] .reference-protocol-card h2 {
  margin: 0 0 14px;
  color: #303a4b;
  font-size: 18px;
  font-weight: 600;
}
body[data-page="login"] .reference-protocol-body {
  color: #68758a;
  font-size: 14px;
  line-height: 1.75;
}
body[data-page="login"] .reference-protocol-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
body[data-page="login"] .reference-protocol-actions button {
  height: 36px;
  padding: 0 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}
body[data-page="login"] .reference-protocol-cancel {
  border: 1px solid var(--line);
  background: #fff;
  color: #667085;
}
body[data-page="login"] .reference-protocol-agree {
  border: 1px solid #2468e5;
  background: #2468e5;
  color: #fff;
}
body[data-page="login"] .reference-protocol-dialog.is-document .reference-protocol-card {
  width: min(640px, calc(100% - 32px));
  height: min(760px, calc(100vh - 128px));
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 4px;
}
body[data-page="login"] .reference-protocol-dialog.is-document .reference-protocol-card h2 {
  flex: 0 0 auto;
  margin: 20px 24px 14px;
  color: #2468e5;
  text-align: center;
  font-size: 19px;
}
body[data-page="login"] .reference-protocol-dialog.is-document .reference-protocol-body {
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding: 0 20px;
}
body[data-page="login"] .reference-policy-document {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}
body[data-page="login"] .reference-policy-frame {
  width: 100%;
  min-height: 0;
  flex: 1;
  border: 0;
  background: #fff;
}
body[data-page="login"] .reference-protocol-dialog.is-document .reference-protocol-actions {
  flex: 0 0 auto;
  margin: 14px 20px 20px;
}
body[data-page="login"] .reference-protocol-dialog.is-document .reference-protocol-cancel {
  width: 100%;
  height: 40px;
  border-color: #2468e5;
  border-radius: 4px;
  background: #2468e5;
  color: #fff;
}
@media (max-width: 640px) {
  body[data-page="login"] .reference-protocol-dialog.is-document .reference-protocol-card {
    height: calc(100vh - 40px);
  }
  body[data-page="login"] .reference-protocol-dialog.is-document .reference-protocol-body {
    padding: 0 14px;
  }
}


/* 登录页原有双栏布局，认证交互只在右侧卡片内切换。 */
body[data-page="login"] .login-page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr);
}
body[data-page="login"] .login-showcase {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 42px clamp(34px, 6vw, 92px) 34px;
  color: #fff;
  background: radial-gradient(circle at 78% 17%, rgba(132,190,255,.34), transparent 28%), radial-gradient(circle at 12% 86%, rgba(66,119,239,.32), transparent 32%), linear-gradient(145deg,#0e4fbb 0%,#176fe1 52%,#2c8af1 100%);
}
body[data-page="login"] .login-showcase::before,
body[data-page="login"] .login-showcase::after { position:absolute; display:block; border:1px solid rgba(255,255,255,.16); border-radius:50%; content:""; pointer-events:none; }
body[data-page="login"] .login-showcase::before { width:430px; height:430px; right:-180px; bottom:-170px; }
body[data-page="login"] .login-showcase::after { width:260px; height:260px; right:38px; bottom:-90px; }
body[data-page="login"] .login-brand { position:relative; z-index:1; display:inline-flex; width:fit-content; align-items:center; gap:11px; color:#fff; text-decoration:none; }
body[data-page="login"] .login-brand-mark { width:40px; height:40px; display:grid; flex:0 0 40px; place-items:center; overflow:hidden; border:1px solid rgba(255,255,255,.35); border-radius:11px; background:#fff; box-shadow:0 10px 24px rgba(8,43,108,.22); }
body[data-page="login"] .login-brand-mark img { width:100%; height:100%; object-fit:cover; }
body[data-page="login"] .login-brand strong, body[data-page="login"] .login-brand small { display:block; }
body[data-page="login"] .login-brand strong { font-size:16px; font-weight:850; }
body[data-page="login"] .login-brand small { margin-top:1px; color:rgba(255,255,255,.72); font-size:9px; letter-spacing:.16em; }
body[data-page="login"] .login-showcase-content { position:relative; z-index:1; width:min(100%,540px); margin:auto 0; padding:72px 0 90px; }
body[data-page="login"] .login-eyebrow { display:inline-flex; align-items:center; gap:7px; color:rgba(255,255,255,.82); font-size:12px; font-weight:750; letter-spacing:.08em; }
body[data-page="login"] .login-eyebrow svg { width:16px; height:16px; }
body[data-page="login"] .login-showcase h1 { margin:20px 0 16px; color:#fff; font-size:clamp(34px,4vw,52px); font-weight:900; letter-spacing:-.045em; line-height:1.16; }
body[data-page="login"] .login-showcase h1 em { color:#d9ecff; font-style:normal; }
body[data-page="login"] .login-showcase-content > p { max-width:430px; margin:0; color:rgba(255,255,255,.78); font-size:15px; line-height:1.85; }
body[data-page="login"] .login-feature-list { display:grid; gap:18px; margin-top:42px; }
body[data-page="login"] .login-feature-list > div { display:flex; align-items:center; gap:13px; }
body[data-page="login"] .login-feature-list > div > span { width:34px; height:34px; display:grid; flex:0 0 34px; place-items:center; border:1px solid rgba(255,255,255,.25); border-radius:10px; background:rgba(255,255,255,.12); }
body[data-page="login"] .login-feature-list svg { width:17px; height:17px; }
body[data-page="login"] .login-feature-list strong, body[data-page="login"] .login-feature-list small { display:block; }
body[data-page="login"] .login-feature-list strong { font-size:13px; font-weight:800; }
body[data-page="login"] .login-feature-list small { margin-top:2px; color:rgba(255,255,255,.65); font-size:11px; }
body[data-page="login"] .login-showcase-footer { position:relative; z-index:1; margin:0; color:rgba(255,255,255,.56); font-size:11px; }
body[data-page="login"] .login-form-area { display:grid; place-items:center; padding:48px clamp(28px,6vw,104px); background:#f8faff; }
body[data-page="login"] .login-auth-panel { width:min(100%,520px); max-width:520px; margin:0; padding:32px; border:1px solid #e1e8f2; border-radius:16px; background:rgba(255,255,255,.98); box-shadow:0 24px 70px rgba(28,63,110,.12); }
body[data-page="login"] .login-auth-panel .auth-panel-heading { padding-bottom:22px; }
body[data-page="login"] .login-auth-panel .auth-form { grid-template-columns:minmax(0,1fr) 150px; gap:15px; padding-top:22px; }
body[data-page="login"] .login-auth-panel .auth-form .field-wide,
body[data-page="login"] .login-auth-panel .auth-form .primary-button { grid-column:1/-1; }
body[data-page="login"] .login-auth-panel .auth-form .primary-button { width:100%; min-height:44px; border-radius:8px; }
body[data-page="login"] .login-auth-panel .auth-code-button { min-height:42px; border-radius:7px; }
body[data-page="login"] .login-password-field { position:relative; }
body[data-page="login"] .login-password-field .field-link { position:absolute; top:0; right:0; color:#2468e5; font-size:11px; font-weight:700; cursor:pointer; }
body[data-page="login"] .remember-password, body[data-page="login"] .register-agreement { display:inline-flex; align-items:center; gap:7px; color:#697586; font-size:12px; cursor:pointer; }
body[data-page="login"] .remember-password input, body[data-page="login"] .register-agreement input { width:15px; height:15px; margin:0; accent-color:#2468e5; }
body[data-page="login"] .register-agreement { grid-column:1/-1; margin-top:-2px; }
body[data-page="login"] .register-password-field[hidden] { display:none; }
body[data-page="login"] .login-mobile-brand { display:none; }
@media (max-width:900px) {
 body[data-page="login"] .login-page-shell { grid-template-columns:1fr; }
 body[data-page="login"] .login-showcase { min-height:300px; padding:28px 32px; }
 body[data-page="login"] .login-showcase-content { margin:56px 0 0; padding:0 0 28px; }
 body[data-page="login"] .login-showcase-content > p, body[data-page="login"] .login-feature-list, body[data-page="login"] .login-showcase-footer { display:none; }
 body[data-page="login"] .login-form-area { min-height:calc(100vh - 300px); padding:36px 24px 48px; }
}
@media (max-width:520px) {
 body[data-page="login"] .login-showcase { min-height:190px; padding:22px 20px; }
 body[data-page="login"] .login-showcase-content { margin-top:30px; }
 body[data-page="login"] .login-showcase h1 { font-size:28px; }
 body[data-page="login"] .login-form-area { min-height:calc(100vh - 190px); display:block; padding:26px 16px 34px; }
 body[data-page="login"] .login-mobile-brand { display:flex; align-items:center; gap:9px; margin:0 auto 20px; color:var(--ink); font-size:14px; font-weight:850; }
 body[data-page="login"] .login-mobile-brand .login-brand-mark { width:30px; height:30px; flex-basis:30px; border-color:#dce7f6; box-shadow:none; }
 body[data-page="login"] .login-auth-panel { padding:22px 18px; border-radius:13px; }
 body[data-page="login"] .login-auth-panel .auth-form { grid-template-columns:minmax(0,1fr) 126px; gap:11px; }
}

/* 官网样式不显示顶部 Tab，仅通过表单底部链接在登录与注册之间切换。 */
body[data-page="login"] .auth-mode-switch { display: none; }

/* 登录/注册面板沿用知你客服官网的蓝底白卡结构。 */
body[data-page="login"] .login-form-area {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px clamp(20px, 5vw, 72px);
  background: #fff;
}
body[data-page="login"] .login-auth-panel {
  width: min(100%, 448px);
  max-width: 448px;
  padding: 20px 28px 24px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}
body[data-page="login"] .login-auth-panel .auth-panel-heading {
  display: block;
  padding: 14px 0 10px;
  border: 0;
  text-align: center;
}
body[data-page="login"] .login-auth-panel .auth-icon { display: none; }
body[data-page="login"] .login-auth-panel .auth-panel-heading h2 {
  margin: 0;
  color: #2468e5;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0;
}
body[data-page="login"] .login-auth-panel .auth-panel-heading p {
  margin: 4px 0 0;
  color: #999;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0;
}
body[data-page="login"] .login-auth-panel .auth-panel-heading p[hidden] { display: none; }
body[data-page="login"] .login-auth-panel .auth-form {
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 0;
  padding-top: 4px;
}
body[data-page="login"] .login-auth-panel .auth-form .field {
  position: relative;
  margin-top: 16px;
}
body[data-page="login"] .login-auth-panel .auth-form .field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
body[data-page="login"] .login-auth-panel .auth-form .field-wide,
body[data-page="login"] .login-auth-panel .auth-form .primary-button,
body[data-page="login"] .login-auth-panel .auth-form .remember-password,
body[data-page="login"] .login-auth-panel .auth-form .register-agreement,
body[data-page="login"] .login-auth-panel .auth-form .auth-switch-copy { grid-column: 1 / -1; }
body[data-page="login"] .login-auth-panel .auth-field-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}
body[data-page="login"] .login-auth-panel .auth-form input:not([type="checkbox"]) {
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0 12px 0 46px;
  border: 1px solid #ddd;
  border-radius: 0;
  background: #fff;
  color: #333;
  font-size: 14px;
  box-shadow: none;
}
body[data-page="login"] .login-auth-panel .auth-form input:not([type="checkbox"]):focus {
  border-color: #2468e5;
  box-shadow: none;
}
body[data-page="login"] .login-auth-panel .auth-code-button {
  grid-column: 2;
  min-height: 42px;
  height: 42px;
  margin-top: 16px;
  border: 1px solid #ddd;
  border-left: 0;
  border-radius: 0;
  background: #fff;
  color: #2468e5;
  font-size: 14px;
}
body[data-page="login"] .login-auth-panel .auth-form .primary-button {
  min-height: 42px;
  height: 42px;
  margin-top: 16px;
  border-radius: 4px;
  background: #2468e5;
  font-size: 16px;
}
body[data-page="login"] .login-auth-panel .remember-password,
body[data-page="login"] .login-auth-panel .register-agreement {
  margin-top: 14px;
  color: #999;
  font-size: 12px;
}
body[data-page="login"] .login-auth-panel .auth-switch-copy {
  margin-top: 26px;
  color: #999;
  font-size: 14px;
  text-align: center;
}
body[data-page="login"] .login-auth-panel .text-button { color: #2468e5; font-size: inherit; }
body[data-page="login"] .login-auth-panel .login-password-field .field-link {
  right: 0;
  bottom: 0;
  width: 88px;
  height: 42px;
  color: #666;
  font-size: 12px;
}
body[data-page="login"] .login-auth-panel .login-password-field input { padding-right: 96px; }
body[data-page="login"] .login-auth-panel .register-agreement button { color: #2468e5; }
body[data-page="login"] .login-showcase h1 {
  font-size: clamp(34px, 3.2vw, 46px);
  letter-spacing: 0;
}
body[data-page="login"] .login-brand small { display: none; }
body[data-page="login"] .login-feature-list small { display: none; }
@media (max-width: 900px) {
  body[data-page="login"] .login-form-area { min-height: calc(100vh - 300px); }
}
@media (max-width: 520px) {
  body[data-page="login"] .login-page-shell {
    align-content: start;
    background: #fff;
  }
  body[data-page="login"] .login-showcase {
    min-height: 0;
    padding: 20px 20px 22px;
  }
  body[data-page="login"] .login-eyebrow { display: none; }
  body[data-page="login"] .login-showcase-content {
    margin: 24px 0 0;
    padding: 0;
  }
  body[data-page="login"] .login-showcase h1 {
    margin: 0;
    text-align: center;
  }
  body[data-page="login"] .login-form-area {
    min-height: 0;
    display: block;
    padding: 0 16px 34px;
  }
  body[data-page="login"] .login-mobile-brand { display: none; }
  body[data-page="login"] .login-auth-panel {
    width: 100%;
    margin: 0 auto;
    padding: 20px 18px 22px;
  }
  body[data-page="login"] .login-auth-panel .auth-form { grid-template-columns: minmax(0, 1fr) 126px; }
}
/* 忘记密码链接与官网一致：嵌入密码输入框右侧，不使用按钮边框样式。 */
body[data-page="login"] .login-password-field .field-link {
  top: auto;
  bottom: 0;
  right: 0;
  z-index: 1;
  width: 88px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #697586;
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
body[data-page="login"] .login-password-field .field-link:hover {
  color: #2468e5;
}
body[data-page="login"] .login-password-field input {
  padding-right: 96px;
}

/* Skills 安装配置页 */
.skills-page {
  display: grid;
  gap: 18px;
}
.skills-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
  gap: 18px;
  align-items: start;
}
.skills-main-column,
.skills-side-column { display: contents; }
.skills-layout [aria-labelledby="skills-install-title"],
.skills-layout [aria-labelledby="skills-list-title"] { grid-column: 1; }
.skills-layout [aria-labelledby="skills-command-title"],
.skills-layout [aria-labelledby="skills-mcp-title"],
.skills-layout [aria-labelledby="skills-ai-title"] { grid-column: 2; }
.skills-hero,
.skills-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(27, 55, 94, 0.04);
}
.skills-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  background: linear-gradient(135deg, #ffffff 36%, #f3f8ff 100%);
}
.skills-eyebrow,
.skills-step-label {
  color: var(--purple);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
}
.skills-hero h2 {
  margin: 5px 0 7px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}
.skills-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.skills-remote-badge,
.skills-count,
.skills-client-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  color: var(--purple);
  background: var(--purple-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.skills-remote-badge svg { width: 14px; height: 14px; }
.skills-section { padding: 22px; }
.skills-stepper {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -2px 0 22px;
  padding-bottom: 15px;
  border-bottom: 1px solid #edf1f6;
}
.skills-stepper > div { display: inline-flex; align-items: center; gap: 7px; color: #9aa7b7; font-size: 11px; font-weight: 800; white-space: nowrap; }
.skills-stepper > div.is-active { color: var(--purple); }
.skills-stepper b { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #dce4ef; border-radius: 50%; color: #8795a8; background: #f8fafc; font-size: 11px; }
.skills-stepper > div.is-active b { border-color: #9bbcff; color: #fff; background: var(--purple); }
.skills-stepper > i { width: 14px; height: 14px; color: #c4cedb; }
.skills-stepper svg { width: 14px; height: 14px; }
.skills-section-heading {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.skills-section-heading h2 { margin: 3px 0 0; color: var(--ink); font-size: 18px; font-weight: 900; }
.skills-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.skills-field { min-width: 0; display: grid; gap: 7px; }
.skills-field > span { color: var(--muted); font-size: 12px; font-weight: 750; }
.skills-field input,
.skills-field select {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  outline: 0;
  background: #fbfcfe;
  font: inherit;
}
.skills-field input:focus,
.skills-field select:focus { border-color: #9abfff; box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1); }
.skills-mode-row,
.skills-key-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 17px; }
.skills-mode-row > span { color: var(--muted); font-size: 12px; font-weight: 750; }
.skills-segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f6f8fb; }
.skills-segmented button { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.skills-segmented button.is-active { color: var(--purple); background: #fff; box-shadow: 0 2px 7px rgba(27, 55, 94, 0.1); }
.skills-segmented svg { width: 15px; height: 15px; }
.skills-key-row .skills-field { flex: 0 1 420px; }
.skills-key-actions { min-width: 0; display: flex; align-items: flex-end; justify-content: flex-end; gap: 12px; }
.skills-key-hint { max-width: 450px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.skills-key-actions button:disabled { opacity: 0.45; cursor: not-allowed; }
.skills-command-actions { display: flex; align-items: center; gap: 10px; }
.skills-command-actions .skills-segmented { padding: 2px; }
.skills-command-actions .skills-segmented button { min-height: 31px; padding: 0 10px; }
.skills-command-meta code { color: #3c5e86; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11px; }
.skills-command-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.skills-code,
.skills-prompt { margin: 0; overflow: auto; padding: 17px; border: 1px solid #233c5e; border-radius: 9px; color: #dcecff; background: #10243e; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.skills-note { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; color: #3e628f; font-size: 12px; line-height: 1.6; }
.skills-note svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }
.skills-note code { color: #27558f; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.skills-list { display: grid; gap: 10px; }
.skill-card { min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 13px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: border-color 0.18s ease, background-color 0.18s ease; }
.skill-card.is-selected { border-color: #a9c7ff; background: #f8fbff; }
.skill-card-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--purple); border-radius: 9px; background: var(--purple-soft); }
.skill-card-icon svg { width: 20px; height: 20px; }
.skill-card-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; }
.skill-card-title h3 { margin: 0; color: var(--ink); font-size: 15px; font-weight: 900; }
.skill-card-title span { color: #8190a5; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11px; }
.skill-card-body p { margin: 5px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.skill-card-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.skill-card-tools > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.skill-card-tools code { padding: 3px 6px; border: 1px solid #e0e8f3; border-radius: 4px; color: #3c5e86; background: #f7f9fc; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 10px; }
.skill-select-button { align-self: center; min-width: 82px; }
.skills-ai-section[hidden] { display: none; }
@media (max-width: 760px) {
  .skills-layout { grid-template-columns: 1fr; }
  .skills-layout [aria-labelledby="skills-install-title"],
  .skills-layout [aria-labelledby="skills-list-title"],
  .skills-layout [aria-labelledby="skills-command-title"],
  .skills-layout [aria-labelledby="skills-mcp-title"],
  .skills-layout [aria-labelledby="skills-ai-title"] { grid-column: 1; }
  .skills-hero { display: grid; padding: 22px; }
  .skills-form-grid { grid-template-columns: 1fr; }
  .skills-mode-row, .skills-key-row { align-items: flex-start; flex-direction: column; }
  .skills-key-row .skills-field { width: 100%; flex-basis: auto; }
  .skills-key-actions { width: 100%; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
  .skills-command-heading, .skills-command-actions { align-items: flex-start; }
  .skills-command-actions { flex-wrap: wrap; justify-content: flex-end; }
  .skill-card { grid-template-columns: 34px minmax(0, 1fr); }
  .skill-card-icon { width: 34px; height: 34px; }
  .skill-select-button { grid-column: 2; justify-self: start; }
}

/* Skills page reference layout */
.skills-page { display: grid; gap: 30px; }
.skills-config-section,
.skills-list-section { display: grid; gap: 14px; }
.skills-page-heading { display: flex; align-items: center; justify-content: space-between; min-height: 30px; }
.skills-page-heading h2 { margin: 0; color: var(--ink); font-size: 19px; font-weight: 900; letter-spacing: 0; }
.skills-list-heading span { color: #8a97a8; font-size: 12px; }
.skills-config-card { overflow: hidden; border: 1px solid #e1e8f2; border-radius: 9px; background: #fff; box-shadow: 0 7px 22px rgba(27,55,94,.04); }
.skills-config-step { padding: 22px 24px; border-bottom: 1px solid #edf1f6; }
.skills-config-step:last-child { border-bottom: 0; }
.skills-config-step-title { display: flex; align-items: center; gap: 9px; margin-bottom: 15px; color: var(--ink); }
.skills-config-step-title b { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--purple); font-size: 11px; }
.skills-config-step-title strong { font-size: 14px; font-weight: 850; }
.skills-config-step-title a { margin-left: auto; color: var(--purple); font-size: 12px; font-weight: 750; text-decoration: none; }
.skills-client-options { display: flex; flex-wrap: wrap; gap: 8px; }
.skills-client-options button { min-height: 38px; padding: 0 16px; border: 1px solid #dce4ef; border-radius: 6px; color: #536274; background: #fff; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.skills-client-options button:hover { border-color: #9bbcff; color: var(--purple); }
.skills-client-options button.is-active { border-color: #7daaff; color: var(--purple); background: #f2f7ff; box-shadow: inset 0 0 0 1px #b8d1ff; }
.skills-install-choice { display: inline-flex; gap: 3px; margin-top: 14px; padding: 3px; border: 1px solid #dce4ef; border-radius: 7px; background: #f6f8fb; }
.skills-install-choice button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 5px; color: #6d7a8c; background: transparent; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.skills-install-choice button.is-active { color: var(--purple); background: #fff; box-shadow: 0 2px 6px rgba(27,55,94,.08); }
.skills-install-hint { margin: 8px 0 0; color: #718096; font-size: 12px; line-height: 1.6; }
.skills-key-picker { display: flex; align-items: center; gap: 10px; }
.skills-key-picker select { width: min(100%, 370px); min-height: 40px; padding: 0 12px; border: 1px solid #dce4ef; border-radius: 6px; color: var(--ink); background: #fbfcfe; font: inherit; font-size: 12px; outline: 0; }
.skills-key-picker select:focus { border-color: #9abfff; box-shadow: 0 0 0 3px rgba(22,119,255,.1); }
.skills-key-picker .secondary-button { min-height: 40px; }
.skills-key-hint { color: #8996a7; font-size: 12px; }
.skills-output-step { background: #fcfdff; }
.skills-output-modes { display: flex; gap: 0; width: fit-content; margin-bottom: 12px; border: 1px solid #dce4ef; border-radius: 6px; background: #f6f8fb; overflow: hidden; }
.skills-output-modes button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 0; color: #6d7a8c; background: transparent; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.skills-output-modes button + button { border-left: 1px solid #dce4ef; }
.skills-output-modes button.is-active { color: var(--purple); background: #fff; box-shadow: 0 2px 6px rgba(27,55,94,.08); }
.skills-output-modes svg { width: 14px; height: 14px; }
.skills-output-hint { margin: 0 0 10px; color: #718096; font-size: 12px; line-height: 1.6; }
.skills-output-preview { min-height: 150px; margin: 0; overflow: auto; padding: 16px; border: 1px solid #dfe7f1; border-radius: 6px; color: #30435d; background: #f7f9fc; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.skills-copy-output { margin-top: 12px; min-height: 38px; }
.skills-card-list { display: grid; gap: 8px; }
.skills-row { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 17px 18px; border: 1px solid #e2e8f0; border-radius: 7px; background: #fff; transition: border-color .18s ease, background-color .18s ease; }
.skills-row:hover { border-color: #b8cdf0; }
.skills-row.is-selected { border-color: #9dbfff; background: #f8fbff; }
.skills-row-number { color: #a2adbb; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 13px; font-weight: 800; }
.skills-row-main { min-width: 0; }
.skills-row-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.skills-row-title strong { color: var(--ink); font-size: 14px; font-weight: 900; }
.skills-row-title code { color: #8693a3; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11px; }
.skills-row-main p { margin: 5px 0 10px; color: #758397; font-size: 12px; line-height: 1.6; }
.skills-row-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skills-row-tags span { padding: 3px 7px; border: 1px solid #dce6f3; border-radius: 4px; color: #55709a; background: #f7faff; font-size: 10px; font-weight: 750; }
.skills-row-command { display: block; max-width: 100%; margin-top: 10px; overflow: auto; padding: 8px 10px; border: 1px solid #e1e8f2; border-radius: 5px; color: #405978; background: #f7f9fc; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11px; line-height: 1.55; white-space: nowrap; }
.skills-row-action { min-width: 116px; min-height: 35px; white-space: nowrap; }
@media (max-width: 760px) {
  .skills-config-step { padding: 18px 16px; }
  .skills-client-options button { flex: 1 1 calc(50% - 8px); }
  .skills-install-choice { width: 100%; box-sizing: border-box; }
  .skills-install-choice button { flex: 1 1 0; }
  .skills-key-picker { align-items: stretch; flex-direction: column; }
  .skills-key-picker select { width: 100%; }
  .skills-key-hint { line-height: 1.5; }
  .skills-row { grid-template-columns: 30px minmax(0, 1fr); gap: 11px; align-items: start; padding: 14px; }
  .skills-row-action { grid-column: 2; justify-self: start; }
}

/* Account menu and overview metric refinements */
.account-menu { position: relative; }
.account-menu-trigger {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}
.account-menu-trigger:hover,
.account-menu.is-open .account-menu-trigger { border-color: #adc8f3; background: #f8fbff; }
.account-avatar { width: 34px; height: 34px; flex: 0 0 34px; position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: #2468e5; font-size: 15px; font-weight: 850; }
.account-avatar,
.account-avatar img { border-radius: 50% !important; }
.account-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; clip-path: circle(50% at 50% 50%); }
.account-avatar img[hidden], .account-avatar [data-account-avatar-fallback][hidden] { display: none; }
.account-menu-name { max-width: 128px; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-chevron { width: 15px; height: 15px; color: #7b8ba1; transition: transform .18s ease; }
.account-menu.is-open .account-menu-chevron { transform: rotate(180deg); }
.account-menu-panel { width: 228px; position: absolute; z-index: 60; top: calc(100% + 8px); right: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(35, 58, 88, .14); }
.account-menu-details { display: grid; gap: 6px; padding: 5px 8px 11px; border-bottom: 1px solid #edf1f6; color: var(--muted); font-size: 12px; line-height: 1.45; }
.account-menu-details > strong { color: var(--ink); font-size: 14px; font-weight: 850; }
.account-menu-details span { overflow-wrap: anywhere; }
.account-menu-details span strong { color: #44566e; font-weight: 750; }
.account-menu-logout { width: 100%; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; margin-top: 9px; border: 0; border-radius: 6px; color: #536274; background: #f7f9fc; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.account-menu-logout:hover { color: #d14343; background: #fff4f4; }
.account-menu-logout svg { width: 15px; height: 15px; }
.mobile-nav { position: relative; display: none; }
.mobile-nav-toggle {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  background: #fff;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.mobile-nav-toggle:hover,
.mobile-nav.is-open .mobile-nav-toggle { border-color: #adc8f3; color: var(--purple); background: #f8fbff; }
.mobile-nav-toggle svg { width: 18px; height: 18px; }
.mobile-nav-panel {
  width: min(260px, calc(100vw - 24px));
  position: absolute;
  z-index: 70;
  top: calc(100% + 8px);
  right: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(35, 58, 88, .14);
}
.mobile-nav-panel .sidebar-nav {
  display: grid;
  gap: 4px;
  padding: 0;
}
.mobile-nav-panel .sidebar-nav a {
  min-height: 40px;
  display: flex;
  grid-template-columns: none;
  padding: 0 10px;
  white-space: nowrap;
}
.mobile-nav-panel .sidebar-nav a[data-zhini-service-link] { margin-top: 4px; }
.overview-actions-only { min-height: 22px; justify-content: flex-end; margin-bottom: 14px; }
.metric-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.api-key-summary { margin-bottom: 18px; }
.api-key-summary .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.api-key-summary .metric-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.metric-item-with-action { align-items: center; }
.metric-upgrade-copy { min-width: 0; }
.metric-value-row { display: flex !important; align-items: baseline; flex-wrap: wrap; column-gap: 10px; row-gap: 2px; }
.metric-upgrade-button {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--purple);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
  cursor: pointer;
}
.metric-upgrade-button:hover { color: var(--purple-dark); text-decoration: underline; text-underline-offset: 3px; }
.quota-upgrade-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 22px 56px rgba(28, 22, 48, .18);
}
.quota-upgrade-dialog::backdrop { background: rgba(35, 32, 42, .38); backdrop-filter: blur(3px); }
.quota-upgrade-dialog-content { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 22px; }
.quota-upgrade-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; color: var(--purple); background: var(--purple-soft); }
.quota-upgrade-icon svg { width: 20px; height: 20px; }
.quota-upgrade-dialog h2 { margin: 1px 0 6px; color: var(--ink); font-size: 17px; line-height: 1.3; }
.quota-upgrade-dialog p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.quota-upgrade-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 3px; padding-top: 16px; border-top: 1px solid var(--line); }
.quota-upgrade-actions .primary-button { gap: 6px; }
.quota-upgrade-actions .primary-button svg { width: 16px; height: 16px; }
.metric-profile-item { min-width: 0; gap: 10px; background: #f8fbff; }
.metric-profile-avatar { width: 40px; height: 40px; position: relative; flex: 0 0 40px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: #2468e5; font-size: 16px; font-weight: 850; }
.metric-profile-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }
.metric-profile-avatar img[hidden], .metric-profile-avatar [data-metric-profile-fallback][hidden] { display: none; }
.metric-profile-info { min-width: 0; display: grid; gap: 4px; }
.metric-profile-info strong { overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.metric-profile-info span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-avatar,
.account-avatar img,
.metric-profile-avatar,
.metric-profile-avatar img { border-radius: 50% !important; }
.account-avatar img { clip-path: none; }
.account-avatar.is-loading,
.metric-profile-avatar.is-loading {
  color: transparent;
  border-color: #dce8f8;
  background: linear-gradient(110deg, #eef3fa 25%, #f8fbff 45%, #eef3fa 65%);
  background-size: 220% 100%;
  animation: avatar-loading 1.15s ease-in-out infinite;
}
.account-avatar.is-loading img,
.account-avatar.is-loading [data-account-avatar-fallback],
.metric-profile-avatar.is-loading img,
.metric-profile-avatar.is-loading [data-metric-profile-fallback] {
  visibility: hidden;
}
@keyframes avatar-loading {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
.connection-state { display: none !important; }
.page-size-control[hidden], .pagination[hidden] { display: none !important; }
.sr-only { width: 1px; height: 1px; position: absolute; overflow: hidden; margin: -1px; padding: 0; border: 0; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* MCP client connection flow */
.mcp-section-heading { align-items: flex-start; }
.mcp-section-heading > div { min-width: 0; }
.mcp-section-lead { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.api-rate-limit-note { color: var(--purple-dark); font-weight: 700; }
.mcp-setup-section { padding-bottom: 0; }
.mcp-setup-card { overflow: hidden; border: 1px solid #e1e8f2; border-radius: 9px; background: #fff; }
.mcp-guide > .mcp-setup-section,
.mcp-guide > .mcp-use-section,
.mcp-guide > .mcp-faq-section,
.skills-page > .skills-use-section,
.skills-page > .skills-faq-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.mcp-guide > .mcp-setup-section { padding-bottom: 0; }
.mcp-config-step { padding: 22px 24px; border-bottom: 1px solid #edf1f6; }
.mcp-config-step:last-child { border-bottom: 0; }
.mcp-config-step-title { min-height: 25px; display: flex; align-items: center; gap: 9px; margin-bottom: 15px; }
.mcp-config-step-title b { width: 23px; height: 23px; display: grid; flex: 0 0 23px; place-items: center; border-radius: 50%; color: #fff; background: var(--purple); font-size: 11px; }
.mcp-config-step-title strong { color: var(--ink); font-size: 14px; font-weight: 850; }
.mcp-config-step-title a { margin-left: auto; color: var(--purple); font-size: 12px; font-weight: 750; text-decoration: none; }
.mcp-client-options { display: flex; flex-wrap: wrap; gap: 9px; }
.mcp-client-option { min-width: 132px; min-height: 45px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid #dce5f1; border-radius: 7px; color: #64748b; background: #fff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; transition: border-color .18s ease, color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.mcp-client-option:hover { border-color: #a9c4f4; color: var(--purple); background: #f8fbff; }
.mcp-client-option.is-active { border-color: #8fb4f6; color: var(--purple); background: var(--purple-soft); box-shadow: 0 0 0 2px rgba(36, 104, 229, .08); }
.mcp-client-option svg { width: 17px; height: 17px; }
.mcp-step-help { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.mcp-service-row { min-height: 65px; display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid #dfe8f4; border-radius: 7px; background: #f8fbff; }
.mcp-service-mark { width: 36px; height: 36px; display: grid; flex: 0 0 36px; place-items: center; border-radius: 8px; color: var(--purple); background: var(--purple-soft); }
.mcp-service-mark svg { width: 19px; height: 19px; }
.mcp-service-info { min-width: 0; display: grid; gap: 3px; }
.mcp-service-info strong { color: var(--ink); font-size: 14px; font-weight: 850; }
.mcp-service-info span { color: var(--muted); font-size: 11px; }
.mcp-service-badge { min-height: 27px; display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 0 9px; color: #178552; border: 1px solid #ccebd9; border-radius: 999px; background: #f0fbf5; font-size: 11px; font-weight: 800; white-space: nowrap; }
.mcp-service-badge svg { width: 13px; height: 13px; }
.mcp-key-select-row { display: flex; align-items: center; gap: 10px; }
.mcp-key-select-wrap { min-width: 0; position: relative; display: block; flex: 1 1 auto; }
.mcp-key-select-wrap select { width: 100%; min-height: 43px; appearance: none; padding: 0 38px 0 13px; border: 1px solid #dce5f1; border-radius: 7px; color: var(--ink); background: #fff; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.mcp-key-select-wrap select:focus { outline: 2px solid rgba(36, 104, 229, .22); outline-offset: 1px; border-color: #8fb4f6; }
.mcp-key-select-wrap > svg { width: 16px; height: 16px; position: absolute; top: 50%; right: 13px; pointer-events: none; color: #8392a5; transform: translateY(-50%); }
.api-key-select-row { display: flex; align-items: center; gap: 10px; }
.api-key-select-wrap { min-width: 0; position: relative; display: block; flex: 1 1 auto; }
.api-key-select-wrap select { width: 100%; min-height: 43px; appearance: none; padding: 0 38px 0 13px; border: 1px solid #dce5f1; border-radius: 7px; color: var(--ink); background: #fff; font: inherit; font-size: 13px; font-weight: 750; outline: 0; cursor: pointer; }
.api-key-select-wrap select:focus { outline: 2px solid rgba(36, 104, 229, .22); outline-offset: 1px; border-color: #8fb4f6; }
.api-key-select-wrap > svg { width: 16px; height: 16px; position: absolute; top: 50%; right: 13px; pointer-events: none; color: #8392a5; transform: translateY(-50%); }
.api-key-select-row > .secondary-button { min-height: 43px; flex: 0 0 auto; }
.mcp-output-tabs { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid #dce5f1; border-radius: 7px; background: #f5f8fc; }
.mcp-output-tab { min-height: 34px; padding: 0 15px; border: 0; border-radius: 5px; color: #738196; background: transparent; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.mcp-output-tab:hover { color: var(--purple); }
.mcp-output-tab.is-active { color: var(--purple); background: #fff; box-shadow: 0 1px 3px rgba(38, 61, 92, .12); }
.mcp-output-hint { margin: 10px 0 12px; color: var(--muted); font-size: 12px; }
.mcp-output-instructions { margin: 0 0 14px; color: var(--ink-soft); font-size: 13px; line-height: 1.8; white-space: pre-line; }
.mcp-output-wrap .mcp-code { min-height: 220px; }
.mcp-output-actions { display: flex; justify-content: flex-start; margin-top: 12px; }
.mcp-copy-output { min-height: 38px; }
@media (max-width: 760px) {
  .mcp-config-step { padding: 18px 16px; }
  .mcp-client-option { flex: 1 1 calc(50% - 9px); min-width: 0; }
  .mcp-service-row { align-items: flex-start; flex-wrap: wrap; }
  .mcp-service-badge { width: fit-content; margin-left: 48px; }
  .mcp-key-select-row { align-items: stretch; flex-direction: column; }
  .mcp-key-select-row .secondary-button { width: fit-content; }
  .api-key-select-row { align-items: stretch; flex-direction: column; }
  .api-key-select-row .secondary-button { width: fit-content; }
  .mcp-output-actions { justify-content: flex-start; }
  .mcp-output-actions .mcp-copy-output { width: auto; }
}
@media (max-width: 440px) {
  .mcp-client-option { flex-basis: 100%; }
  .mcp-output-tabs { width: 100%; }
  .mcp-output-tab { flex: 1 1 50%; }
}
@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-menu-name { max-width: 84px; }
  .account-menu-panel { width: min(228px, calc(100vw - 32px)); }
}
@media (max-width: 420px) {
  .metric-grid { grid-template-columns: 1fr; }
  .account-menu-name { display: none; }
  .account-menu-trigger { padding-right: 7px; }
}

/* Per-key usage columns */
.key-table { min-width: 1180px; }
.key-usage-value {
  color: var(--ink-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.key-table th:nth-child(1) { width: 15%; }
.key-table th:nth-child(2) { width: 30%; }
.key-table th:nth-child(3) { width: 12%; }
.key-table th:nth-child(4) { width: 10%; }
.key-table th:nth-child(5) { width: 10%; }
.key-table th:nth-child(6) { width: 10%; }
.key-table th:nth-child(7) { width: 13%; }

/* MCP usage examples and FAQ */
.mcp-use-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mcp-use-grid article { padding: 16px; border: 1px solid #e1e8f2; border-radius: 8px; background: #fff; }
.mcp-use-grid article:last-child { grid-column: auto; }
.mcp-use-grid span { color: var(--purple); font-size: 11px; font-weight: 800; }
.mcp-use-grid strong { display: block; margin-top: 5px; color: var(--ink); font-size: 14px; }
.mcp-use-grid p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.mcp-faq-list { display: grid; gap: 10px; }
.mcp-faq-list article { padding: 15px 16px; border: 1px solid #e1e8f2; border-radius: 8px; background: #fff; }
.mcp-faq-list strong { color: var(--ink); font-size: 13px; }
.mcp-faq-list p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
@media (max-width: 760px) {
  .mcp-use-grid { grid-template-columns: 1fr; }
  .mcp-use-grid article:last-child { grid-column: auto; }
}

/* Unframed capability list */
.mcp-capabilities {
  gap: 10px;
  overflow: visible;
  border: 0;
  border-radius: 0;
}

.mcp-capabilities article,
.mcp-capabilities article:nth-child(3n),
.mcp-capabilities article:nth-last-child(-n + 3) {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 760px) {
  .mcp-capabilities {
    gap: 10px;
  }

  .mcp-capabilities article,
  .mcp-capabilities article:nth-child(3n),
  .mcp-capabilities article:nth-last-child(-n + 3) {
    border: 1px solid var(--line);
    border-radius: 8px;
  }
}

/* Quota upgrade dialog: keep the prompt compact and aligned with the admin palette. */
.quota-upgrade-dialog {
  width: min(448px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 72px rgba(23, 43, 74, 0.24);
  overflow: hidden;
  animation: dialog-in 0.18s ease-out;
}

.quota-upgrade-dialog::backdrop {
  background: rgba(25, 39, 64, 0.46);
  backdrop-filter: blur(5px);
  animation: backdrop-in 0.18s ease-out;
}

.quota-upgrade-dialog-content {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  padding: 26px 28px 24px;
}

.quota-upgrade-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe9ff;
  border-radius: 13px;
  color: #2468e5;
  background: #eef5ff;
}

.quota-upgrade-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.2;
}

.quota-upgrade-dialog h2 {
  margin: 1px 0 6px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.quota-upgrade-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.quota-upgrade-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 0;
  border-top: 0;
}

.quota-upgrade-actions .secondary-button,
.quota-upgrade-actions .primary-button {
  min-width: 82px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
}

.quota-upgrade-actions .secondary-button {
  color: #52627a;
  border-color: #dbe4ef;
  background: #ffffff;
}

.quota-upgrade-actions .secondary-button:hover {
  color: #2468e5;
  border-color: #bcd5ff;
  background: #f7faff;
}

.quota-upgrade-actions .primary-button {
  gap: 7px;
  background: #2468e5;
  box-shadow: 0 7px 16px rgba(36, 104, 229, 0.2);
}

.quota-upgrade-actions .primary-button:hover {
  background: #1859d1;
  box-shadow: 0 9px 20px rgba(36, 104, 229, 0.26);
}

.quota-upgrade-actions .primary-button svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 680px) {
  .quota-upgrade-dialog-content {
    column-gap: 12px;
    padding: 22px 20px 20px;
  }

  .quota-upgrade-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .quota-upgrade-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 9px;
  }

  .quota-upgrade-actions .secondary-button,
  .quota-upgrade-actions .primary-button {
    width: 100%;
    min-width: 0;
  }
}

/* Keep feedback clear of the customer-service launcher. */
.toast {
  top: calc(var(--topbar-height) + 16px);
  right: auto;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 680px) {
  .toast {
    top: 80px;
    right: auto;
    bottom: auto;
    left: 50%;
    max-width: calc(100vw - 32px);
    transform: translateX(-50%);
  }
}

/* Mobile admin shell: keep navigation in a compact top-right menu. */
@media (max-width: 860px) {
  .admin-layout {
    min-width: 0;
  }

  .sidebar {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .workspace {
    margin-left: 0;
    min-width: 0;
  }

  .mobile-nav {
    display: block;
  }

  .account-menu-trigger {
    width: 38px;
    min-width: 38px;
    justify-content: center;
    padding: 2px;
    border-radius: 50%;
  }

  .account-menu-name,
  .account-menu-chevron {
    display: none;
  }

  .mobile-nav-panel .sidebar-nav {
    display: grid;
    gap: 4px;
    overflow: visible;
    padding: 0;
  }

  .mobile-nav-panel .sidebar-nav a {
    min-height: 42px;
    flex: initial;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    padding: 0 10px;
  }

  .dashboard-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-content > * {
    min-width: 0;
  }

  .api-docs-catalog-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .api-docs-nav {
    position: static;
    max-height: none;
  }

  .api-key-summary .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .main-content {
    min-width: 0;
  }

  .topbar {
    gap: 12px;
  }

  .topbar-title {
    min-width: 0;
  }

  .topbar-actions {
    min-width: 0;
  }

  .panel-header,
  .section-heading,
  .mcp-section-heading,
  .skills-page-heading {
    flex-wrap: wrap;
  }

  .key-table {
    min-width: 0;
  }

  .table-scroll {
    overflow: visible;
  }

  .api-docs-hero {
    min-height: 0;
  }

  .api-docs-nav {
    padding: 12px;
  }

  .api-docs-section,
  .api-docs-endpoint-card {
    padding: 16px;
  }

  .mcp-hero,
  .mcp-section,
  .skills-hero,
  .skills-section,
  .key-panel,
  .overview-section {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .sidebar-brand {
    min-height: 52px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .brand-name {
    font-size: 14px;
  }

  .topbar-title h1 {
    font-size: 19px;
  }

  .main-content {
    padding-right: 10px;
    padding-left: 10px;
  }

  .account-menu-trigger {
    padding: 2px;
  }

  .api-key-summary .metric-grid {
    grid-template-columns: 1fr;
  }
}
