/* API 服务中心 */
.api-page { background: #f5f6fa; }

.api-main {
  max-width: 1360px;
  margin: 0 auto;
  padding: 36px 32px 72px;
}

.api-hero {
  text-align: center;
  margin-bottom: 36px;
}

.api-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.api-hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
}

.api-hero > p {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto 24px;
}

.api-hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.api-btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.api-btn.primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  border: none;
}

.api-btn.outline {
  background: #fff;
  color: #2563eb;
  border: 1.5px solid #93c5fd;
}

.api-btn:hover { opacity: 0.9; transform: translateY(-1px); }

.api-track-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.api-track-tab {
  padding: 11px 20px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s;
}

.api-track-tab:hover { border-color: #93c5fd; color: #2563eb; }

.api-track-tab.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.15);
}

.api-overview-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8eaef;
  padding: 28px 28px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.api-overview-head h2 {
  font-size: 22px;
  color: #111827;
  margin: 8px 0 10px;
}

.api-overview-head > p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 16px;
}

.api-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  background: #dbeafe;
  color: #1d4ed8;
}

.api-base-url {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
}

.api-base-url span { color: #64748b; font-weight: 500; }
.api-base-url code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: #0f172a;
  word-break: break-all;
}

.api-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid #f0f0f0;
}

@media (max-width: 640px) {
  .api-feature-grid { grid-template-columns: 1fr; }
}

.api-feature-item {
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
}

.api-feature-item strong {
  display: block;
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 4px;
}

.api-feature-item span {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.api-panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8eaef;
  padding: 24px 26px;
  margin-bottom: 20px;
}

.api-panel h2 {
  font-size: 18px;
  color: #111827;
  margin-bottom: 18px;
}

.api-code-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.api-code-tab {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
}

.api-code-tab.active {
  background: #1e293b;
  color: #fff;
  border-color: #1e293b;
}

.api-code-block {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 12px;
  line-height: 1.65;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 12px;
}

.api-copy-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
}

.api-copy-btn:hover { background: #f9fafb; }

.api-endpoint-row {
  display: grid;
  grid-template-columns: 72px 1fr 1.2fr;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}

.api-endpoint-row:last-child { border-bottom: none; }

@media (max-width: 768px) {
  .api-endpoint-row { grid-template-columns: 1fr; gap: 6px; }
}

.api-method {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
}

.api-method.get { background: #dcfce7; color: #166534; }
.api-method.post { background: #dbeafe; color: #1e40af; }

.api-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #334155;
  word-break: break-all;
}

.api-endpoint-desc { color: #6b7280; }

.api-auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.api-auth-item {
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.api-auth-name {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.api-auth-name em {
  font-style: normal;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fef3c7;
  color: #b45309;
  margin-left: 6px;
}

.api-auth-item code {
  font-size: 12px;
  color: #475569;
  word-break: break-all;
}

.api-cta {
  margin-top: 8px;
}

.api-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #eff6ff 0%, #e8f8fd 100%);
  border-radius: 16px;
  border: 1px solid #bfdbfe;
}

.api-cta-inner h3 {
  font-size: 18px;
  color: #1e3a8a;
  margin-bottom: 6px;
}

.api-cta-inner p {
  font-size: 13px;
  color: #475569;
}

.admin-api-page .main-content { max-width: 1100px; }

.admin-api-toolbar { margin-bottom: 12px; }

.admin-api-tabs { margin-bottom: 20px; }

.admin-api-summary {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.admin-api-doc { margin-bottom: 20px; }

.admin-api-doc .api-overview-card { margin-bottom: 0; }

.admin-api-verify-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-api-track-label {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
}

.api-categories {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .api-categories { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
  .api-categories { grid-template-columns: repeat(2, 1fr); }
}

.api-cat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 18px 16px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.api-cat-card:hover:not(.closed) {
  border-color: #93c5fd;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

.api-cat-card.active {
  border-color: #2563eb;
  background: #eff6ff;
}

.api-cat-card.closed {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f9fafb;
}

.api-cat-icon { font-size: 20px; }
.api-cat-name { font-size: 13px; font-weight: 600; color: #1e293b; }
.api-cat-unit { font-size: 11px; color: #94a3b8; }
.api-cat-cost { font-size: 11px; color: #2563eb; font-weight: 600; }

.api-category-detail {
  padding: 16px 18px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.api-cat-detail-inner h3 {
  font-size: 15px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-cat-path {
  display: block;
  font-size: 12px;
  word-break: break-all;
  margin-bottom: 8px;
  color: #334155;
}

.api-cat-hint { font-size: 12px; color: #64748b; line-height: 1.65; }

.api-panel-sub {
  font-size: 13px;
  color: #94a3b8;
  margin: -10px 0 16px;
}

.api-token-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.api-token-table th,
.api-token-table td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.api-token-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
}

.api-token-table th:first-child,
.api-token-table td:first-child { text-align: left; }

.api-token-table td.hl {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.api-token-table .cell-unit {
  font-size: 11px;
  color: #94a3b8;
}

.gov-subsidy-landscape {
  background: linear-gradient(135deg, #f9f0ff 0%, #fff7e6 100%);
  border: 1px solid #d3adf7;
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 20px;
}

.gov-subsidy-landscape h3 {
  font-size: 16px;
  color: #531dab;
  margin-bottom: 12px;
}

.gov-subsidy-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #531dab;
  font-weight: 500;
  padding: 12px;
  background: rgba(255,255,255,0.7);
  border-radius: 8px;
  margin-bottom: 14px;
}

.gov-subsidy-flow .arrow { color: #b37feb; }

.api-page .nav-link.active {
  background: #eff6ff;
  color: #2563eb;
}
