:root {
  --ink: #111827;
  --muted: #647084;
  --paper: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f9fbff;
  --line: #d9e0ea;
  --line-soft: #edf1f7;
  --navy: #172033;
  --blue: #2563eb;
  --cyan: #0891b2;
  --green: #059669;
  --amber: #b7791f;
  --red: #d94b3d;
  --violet: #6d5bd0;
  --shadow: 0 14px 36px rgba(22, 32, 51, 0.08);
  --shadow-soft: 0 8px 22px rgba(22, 32, 51, 0.06);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(245, 247, 251, 0) 330px),
    linear-gradient(90deg, rgba(8, 145, 178, 0.05), rgba(109, 91, 208, 0.04)),
    var(--paper);
}

a {
  color: var(--blue);
  text-decoration: none;
}

code,
pre,
input,
textarea,
select {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(217, 224, 234, 0.8);
  background: rgba(245, 247, 251, 0.88);
  backdrop-filter: blur(16px);
}

.topbar-inner,
.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 70px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 1px;
}

nav {
  display: flex;
  gap: 6px;
  align-items: center;
}

nav a,
.user-chip {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 11px;
  color: #344054;
  font-size: 14px;
}

nav a.active,
nav a:hover {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.user-chip {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border-color: var(--line);
}

.user-chip b {
  color: var(--green);
}

.shell {
  padding: 34px 0 64px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 42px;
  line-height: 1.08;
  margin-bottom: 14px;
}

h2 {
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 8px;
}

h3 {
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 7px;
}

.lead {
  color: #4a5568;
  font-size: 17px;
  line-height: 1.75;
}

.muted {
  color: var(--muted);
  line-height: 1.65;
}

.small {
  font-size: 13px;
  margin-bottom: 0;
}

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 850;
  font-size: 14px;
  white-space: nowrap;
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn.primary {
  color: #ffffff;
  background: var(--blue);
}

.btn.primary:hover {
  background: #1d4ed8;
}

.btn.secondary {
  color: #ffffff;
  background: var(--navy);
}

.btn.ghost {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.btn.compact {
  min-height: 36px;
  padding: 8px 12px;
}

.btn.full {
  width: 100%;
}

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

.hero-band {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.88fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 42px;
}

.hero-copy {
  max-width: 660px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-console,
.surface-panel,
.access-panel,
.panel,
.copy-panel,
.endpoint,
.kpi-card,
.workflow-panel,
.flow-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-console {
  overflow: hidden;
}

.console-top {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #dbeafe;
  background: var(--navy);
}

.console-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
}

.console-top strong {
  margin-left: 8px;
  font-size: 13px;
}

.console-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.console-metrics div {
  padding: 16px;
  background: var(--surface-2);
}

.console-metrics small,
.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.console-metrics b {
  font-size: 14px;
}

.hero-console pre,
pre {
  margin: 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #dbeafe;
  line-height: 1.65;
}

.hero-console pre {
  border: 0;
  border-radius: 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.5fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.flow-step {
  position: relative;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.flow-step svg {
  color: var(--blue);
}

.step-index {
  position: absolute;
  right: 14px;
  top: 14px;
  color: #cbd5e1;
  font-weight: 900;
}

.flow-step p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 18px;
  align-items: stretch;
}

.feature-list,
.compact-panel {
  padding: 24px;
}

.check-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  color: #344054;
}

.check-list svg {
  color: var(--green);
}

.ia-list {
  display: grid;
  gap: 12px;
  margin: 12px 0 0;
}

.ia-list div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.ia-list dt {
  font-weight: 900;
  margin-bottom: 4px;
}

.ia-list dd {
  margin: 0;
  color: var(--muted);
}

.access-shell {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 28px;
  align-items: center;
}

.access-intro {
  max-width: 620px;
}

.access-panel {
  padding: 26px;
}

.mini-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.mini-flow span,
.workflow-steps span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 800;
}

.form-stack,
.form-inline,
.admin-form {
  display: grid;
  gap: 14px;
}

.form-inline {
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: end;
}

.admin-form {
  grid-template-columns: 120px 150px minmax(180px, 1fr) auto;
  align-items: end;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

input,
textarea,
select {
  width: 100%;
  min-height: 40px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fbfcfe;
  font-size: 14px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: var(--blue);
}

.switch-line {
  margin: 18px 0 0;
  color: var(--muted);
}

.dashboard-hero,
.docs-hero {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.dashboard-hero h1 {
  margin-bottom: 6px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-card {
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.kpi-card strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.kpi-card small {
  color: var(--muted);
}

.primary-kpi {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--navy), #244a76);
}

.primary-kpi span,
.primary-kpi small {
  color: #cfe3ff;
}

.workflow-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}

.workflow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.two-col,
.grid-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.panel,
.endpoint,
.copy-panel {
  padding: 20px;
  margin-bottom: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.panel-title svg {
  color: var(--blue);
}

.plugin-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background: linear-gradient(90deg, #ffffff, #eef7ff);
}

.copy-panel {
  display: grid;
  gap: 16px;
}

.success-panel {
  border-color: rgba(5, 150, 105, 0.28);
  background: #f1fbf7;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.copy-row code {
  display: block;
  overflow: auto;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0f172a;
  color: #dbeafe;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

td small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 850;
  background: #eef2f7;
  color: #344054;
}

.pill.ok,
.task-succeeded,
.task-completed {
  background: #e6f7ef;
  color: #05734f;
}

.muted-pill {
  color: var(--muted);
}

.task-failed {
  background: #fdebea;
  color: var(--red);
}

.task-processing,
.task-pending,
.task-created {
  background: #fff7df;
  color: var(--amber);
}

.admin {
  margin-left: 6px;
  background: #eef2ff;
  color: var(--violet);
}

.flash {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
}

.flash-success {
  border-color: rgba(5, 150, 105, 0.32);
  background: #eefbf5;
  color: #05734f;
}

.flash-error {
  border-color: rgba(217, 75, 61, 0.32);
  background: #fff1ef;
  color: #a73f2b;
}

.flash-info {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eef5ff;
  color: #1d4ed8;
}

.method {
  display: inline-flex;
  align-items: center;
  min-width: 52px;
  justify-content: center;
  border-radius: 6px;
  padding: 5px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.method-get {
  background: var(--cyan);
}

.method-post {
  background: var(--green);
}

.method-auth,
.method-plugin {
  background: var(--violet);
}

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

.docs-side {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.docs-side h1 {
  font-size: 27px;
}

.doc-nav {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.doc-nav a {
  border-radius: 7px;
  padding: 8px 9px;
  color: #344054;
  font-size: 14px;
}

.doc-nav a:hover {
  background: var(--surface-2);
}

.docs-main {
  min-width: 0;
}

.docs-hero {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff, #eef5ff);
  box-shadow: var(--shadow-soft);
}

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

.endpoint {
  scroll-margin-top: 92px;
}

.endpoint-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.endpoint-head code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-weight: 850;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.field-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
}

.field-grid b,
.field-grid small {
  display: block;
}

.field-grid small {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

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

@media (max-width: 980px) {
  .hero-band,
  .section-head,
  .split-section,
  .access-shell,
  .docs-layout,
  .workflow-panel {
    grid-template-columns: 1fr;
  }

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

  .docs-side {
    position: static;
  }

  .workflow-steps {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 0;
  }

  nav,
  .user-chip,
  .hero-actions,
  .quick-actions,
  .plugin-panel {
    flex-wrap: wrap;
  }

  .hero-band {
    min-height: auto;
  }

  .flow-grid,
  .kpi-grid,
  .two-col,
  .grid-panels,
  .field-grid,
  .docs-fields,
  .form-inline,
  .admin-form,
  .copy-row,
  .console-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    align-items: start;
    flex-direction: column;
  }

  .plugin-panel {
    align-items: start;
    flex-direction: column;
  }

  h1 {
    font-size: 31px;
  }
}
