/**
 * OpenAPI 控制台 / 文档页 UI
 * 对齐站内蓝系 (#2387f5) 与 setting 表格风格，支持 .nice-dark-mode
 */
:root {
  --oa-accent: #2387f5;
  --oa-accent-deep: #0d6efd;
  --oa-ink: #12263f;
  --oa-muted: #6e7c91;
  --oa-line: #edf2f9;
  --oa-soft: #f4f7fb;
  --oa-ok: #0f9d58;
  --oa-warn: #c47a00;
  --oa-danger: #e5534b;
  --oa-radius: 12px;
  --oa-shadow: 0 8px 28px rgba(18, 38, 63, 0.06);
}

.nice-dark-mode {
  --oa-ink: #e8eef7;
  --oa-muted: #9aa8bc;
  --oa-line: #2a3548;
  --oa-soft: #1a2332;
  --oa-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

/* ---------- 控制台 ---------- */
.oa-console {
  color: var(--oa-ink);
  animation: oaFade .35s ease both;
}

@keyframes oaFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.oa-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--oa-radius);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.1rem;
  background:
    radial-gradient(900px 220px at 0% 0%, rgba(35, 135, 245, 0.16), transparent 55%),
    radial-gradient(700px 200px at 100% 0%, rgba(13, 110, 253, 0.1), transparent 50%),
    linear-gradient(180deg, #fff, var(--oa-soft));
  border: 1px solid var(--oa-line);
  box-shadow: var(--oa-shadow);
}

.nice-dark-mode .oa-hero {
  background:
    radial-gradient(900px 220px at 0% 0%, rgba(35, 135, 245, 0.22), transparent 55%),
    linear-gradient(180deg, #1c2636, #15202e);
}

.oa-hero__title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.oa-hero__desc {
  margin: 0;
  color: var(--oa-muted);
  font-size: 0.9rem;
  max-width: 36rem;
  line-height: 1.55;
}

.oa-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.oa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.oa-btn:active { transform: translateY(1px); }

.oa-btn--primary {
  background: var(--oa-accent);
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(35, 135, 245, 0.28);
}

.oa-btn--primary:hover {
  background: var(--oa-accent-deep);
  color: #fff !important;
}

.oa-btn--ghost {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--oa-line);
  color: var(--oa-ink) !important;
}

.nice-dark-mode .oa-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
}

.oa-btn--ghost:hover {
  border-color: var(--oa-accent);
  color: var(--oa-accent) !important;
}

.oa-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

@media (max-width: 767.98px) {
  .oa-stats { grid-template-columns: 1fr; }
}

.oa-stat {
  border: 1px solid var(--oa-line);
  border-radius: var(--oa-radius);
  background: #fff;
  padding: 0.95rem 1rem;
  box-shadow: var(--oa-shadow);
  transition: border-color .2s ease;
}

.nice-dark-mode .oa-stat { background: #1a2332; }

.oa-stat:hover { border-color: rgba(35, 135, 245, 0.35); }

.oa-stat__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #95aac9;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.oa-stat__value {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.oa-stat__hint {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--oa-muted);
}

.oa-panel {
  border: 1px solid var(--oa-line);
  border-radius: var(--oa-radius);
  background: #fff;
  box-shadow: var(--oa-shadow);
  margin-bottom: 1rem;
  overflow: hidden;
}

.nice-dark-mode .oa-panel { background: #1a2332; }

.oa-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--oa-line);
  background: linear-gradient(180deg, rgba(244, 247, 251, 0.9), transparent);
}

.nice-dark-mode .oa-panel__head {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.oa-panel__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.oa-panel__body { padding: 1.1rem 1.15rem; }

.oa-alert {
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  animation: oaFade .4s ease both;
}

.oa-alert--warn {
  background: #fff8e8;
  border-color: #f0d9a0;
  color: #7a5a10;
}

.oa-alert--danger {
  background: #fff1f0;
  border-color: #f3c1bd;
  color: #9b2c26;
}

.oa-alert--success {
  background: #edf9f1;
  border-color: #b7e4c7;
  color: #146c43;
}

.nice-dark-mode .oa-alert--warn { background: #3a3018; color: #f0d9a0; border-color: #5a4a20; }
.nice-dark-mode .oa-alert--danger { background: #3a1f1d; color: #f3c1bd; border-color: #5a3030; }
.nice-dark-mode .oa-alert--success { background: #173328; color: #b7e4c7; border-color: #2a5040; }

.oa-key-flash {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  word-break: break-all;
  background: rgba(18, 38, 63, 0.04);
  border: 1px dashed rgba(35, 135, 245, 0.35);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  user-select: all;
  margin: 0.65rem 0;
}

.nice-dark-mode .oa-key-flash {
  background: rgba(255, 255, 255, 0.05);
}

.oa-form-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr auto;
  gap: 0.75rem;
  align-items: end;
}

@media (max-width: 767.98px) {
  .oa-form-grid { grid-template-columns: 1fr; }
}

.oa-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--oa-muted);
  margin-bottom: 0.35rem;
}

.oa-input,
.oa-select {
  width: 100%;
  border: 1px solid #d2ddec;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
  background: #fff;
  color: var(--oa-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.nice-dark-mode .oa-input,
.nice-dark-mode .oa-select {
  background: #121a26;
  border-color: #334155;
}

.oa-input:focus,
.oa-select:focus {
  outline: none;
  border-color: var(--oa-accent);
  box-shadow: 0 0 0 3px rgba(35, 135, 245, 0.18);
}

.oa-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  line-height: 1.2;
}

.oa-badge--live { background: #e8f2ff; color: #1a66c9; }
.oa-badge--test { background: #f1f3f7; color: #5b6b7c; }
.oa-badge--ok { background: #e6f6ed; color: var(--oa-ok); }
.oa-badge--off { background: #f1f3f7; color: #8896a8; }
.oa-badge--pro { background: #fff3df; color: var(--oa-warn); }
.oa-badge--free { background: #e8f2ff; color: #1a66c9; }

.nice-dark-mode .oa-badge--live { background: #1a3355; color: #8ec5ff; }
.nice-dark-mode .oa-badge--test { background: #2a3548; color: #b0bccf; }
.nice-dark-mode .oa-badge--ok { background: #1a3a2a; color: #7ddea8; }
.nice-dark-mode .oa-badge--off { background: #2a3548; color: #8a97a8; }
.nice-dark-mode .oa-badge--pro { background: #3a3018; color: #f0c57a; }

.oa-key-list { list-style: none; margin: 0; padding: 0; }

.oa-key-item {
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--oa-line);
  transition: background .15s ease;
}

.oa-key-item:first-child { border-top: 0; }

.oa-key-item:hover { background: rgba(35, 135, 245, 0.03); }

.oa-key-item.is-revoked {
  opacity: 0.62;
  background: rgba(148, 163, 184, 0.06);
}

.oa-key-item__main {
  min-width: 0;
}

.oa-key-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.oa-key-prefix {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-all;
  min-width: 0;
  flex: 1 1 auto;
}

.oa-key-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
  align-items: center;
}

.oa-key-name {
  font-size: 0.78rem;
  color: var(--oa-muted);
}

.oa-key-item__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-top: 0.55rem;
}

.oa-key-scopes {
  font-size: 0.75rem;
  color: var(--oa-muted);
  line-height: 1.45;
  min-width: 0;
  flex: 1 1 12rem;
  overflow-wrap: anywhere;
}

.oa-key-time {
  font-size: 0.72rem;
  color: #95aac9;
  white-space: nowrap;
}

.oa-revoke-form {
  flex: 0 0 auto;
  margin: 0;
}

.oa-revoke-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 2rem;
  padding: 0.28rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(229, 83, 75, 0.28);
  background: #fff7f6;
  color: var(--oa-danger);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.oa-revoke-btn__icon {
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  margin-top: -1px;
}

.nice-dark-mode .oa-revoke-btn {
  background: #3a1f1d;
  border-color: rgba(229, 83, 75, 0.4);
  color: #f3b4ae;
}

.oa-revoke-btn:hover {
  background: #ffe8e6;
  border-color: rgba(229, 83, 75, 0.5);
  color: #cf463e;
}

.oa-revoke-btn:active {
  transform: scale(0.97);
}

.oa-revoke-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(229, 83, 75, 0.22);
}

.oa-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--oa-muted);
}

.oa-empty__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  background: var(--oa-soft);
  display: grid;
  place-items: center;
  color: var(--oa-accent);
  font-size: 1.25rem;
}

.oa-tips {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--oa-muted);
  font-size: 0.85rem;
  line-height: 1.65;
}

.oa-copy-btn {
  border: 1px solid var(--oa-line);
  background: #fff;
  color: var(--oa-ink);
  border-radius: 7px;
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.nice-dark-mode .oa-copy-btn {
  background: #121a26;
  border-color: #334155;
  color: var(--oa-ink);
}

.oa-copy-btn:hover {
  border-color: var(--oa-accent);
  color: var(--oa-accent);
}

.oa-copy-btn.is-copied {
  border-color: var(--oa-ok);
  color: var(--oa-ok);
}

/* ---------- 文档页 ---------- */
.oa-docs {
  color: var(--oa-ink);
  animation: oaFade .35s ease both;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.oa-docs-wrap {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.oa-docs-wrap > * {
  min-width: 0;
  max-width: 100%;
}

.oa-docs-main {
  min-width: 0;
  max-width: 100%;
}

.oa-docs-content {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 991.98px) {
  /* 移动端：Hero 在上 → 分段导航 → 正文，避免 TOC 压住 Hero */
  .oa-docs-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .oa-docs-main {
    display: contents;
  }

  .oa-docs-hero { order: 1; }
  .oa-toc { order: 2; }
  .oa-docs-content { order: 3; }
}

.oa-toc {
  position: sticky;
  top: 5.5rem;
  border: 1px solid var(--oa-line);
  border-radius: var(--oa-radius);
  background: #fff;
  padding: 0.9rem 0.85rem;
  box-shadow: var(--oa-shadow);
  max-width: 100%;
  box-sizing: border-box;
}

.nice-dark-mode .oa-toc { background: #1a2332; }

@media (max-width: 991.98px) {
  .oa-toc {
    position: sticky;
    top: 3.15rem;
    z-index: 40;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: rgba(251, 251, 253, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--oa-line);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    /* 右侧渐隐提示可横滑 */
    mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.5rem), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.5rem), transparent 100%);
  }

  .nice-dark-mode .oa-toc {
    background: rgba(21, 32, 46, 0.92);
    border-bottom-color: #2a3548;
  }

  .oa-toc::-webkit-scrollbar { display: none; }
  .oa-toc__title { display: none; }

  .oa-toc__list {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0 0.25rem;
    list-style: none;
    width: max-content;
    max-width: none;
    min-height: 2.75rem;
  }

  .oa-toc__list li {
    flex: 0 0 auto;
  }

  .oa-toc__list a {
    position: relative;
    display: flex;
    align-items: center;
    height: 2.75rem;
    padding: 0 0.85rem;
    border-radius: 0;
    background: transparent !important;
    color: var(--oa-muted) !important;
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
  }

  .oa-toc__list a::after {
    content: "";
    position: absolute;
    left: 0.55rem;
    right: 0.55rem;
    bottom: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: transparent;
    transition: background .15s ease;
  }

  .oa-toc__list a.is-active {
    color: var(--oa-accent) !important;
    font-weight: 700;
    background: transparent !important;
  }

  .oa-toc__list a.is-active::after {
    background: var(--oa-accent);
  }
}

.oa-toc__title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #95aac9;
  font-weight: 700;
  margin: 0 0 0.55rem 0.35rem;
}

.oa-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.oa-toc__list a {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  color: var(--oa-muted) !important;
  text-decoration: none !important;
  font-size: 0.86rem;
  transition: background .15s ease, color .15s ease;
}

.oa-toc__list a:hover,
.oa-toc__list a.is-active {
  background: rgba(35, 135, 245, 0.1);
  color: var(--oa-accent) !important;
}

.oa-docs-hero {
  border-radius: var(--oa-radius);
  border: 1px solid var(--oa-line);
  padding: 1.5rem 1.4rem;
  margin-bottom: 1rem;
  background:
    radial-gradient(800px 240px at 10% -20%, rgba(35, 135, 245, 0.18), transparent 55%),
    linear-gradient(160deg, #fff 30%, #f3f8ff 100%);
  box-shadow: var(--oa-shadow);
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

.nice-dark-mode .oa-docs-hero {
  background:
    radial-gradient(800px 240px at 10% -20%, rgba(35, 135, 245, 0.25), transparent 55%),
    linear-gradient(160deg, #1c2636, #15202e);
}

.oa-docs-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.oa-docs-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.oa-docs-hero p {
  margin: 0;
  color: var(--oa-muted);
  max-width: 40rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.oa-docs-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.oa-docs-hero__actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.oa-docs-hero__actions .oa-btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.86rem;
}

.oa-docs code,
.oa-endpoint code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.oa-endpoint {
  border: 1px solid var(--oa-line);
  border-radius: var(--oa-radius);
  background: #fff;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--oa-shadow);
  scroll-margin-top: 5.5rem;
  max-width: 100%;
  box-sizing: border-box;
}

.nice-dark-mode .oa-endpoint { background: #1a2332; }

.oa-endpoint__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--oa-line);
  min-width: 0;
}

.oa-endpoint__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.oa-endpoint__body {
  padding: 1rem 1.15rem 1.15rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.oa-endpoint__body p {
  color: var(--oa-muted);
  font-size: 0.92rem;
  margin: 0 0 0.85rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---- API Playground / 接口调试 ---- */
.oa-try-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1rem;
  align-items: start;
}

.oa-try-form,
.oa-try-result,
.oa-try-empty {
  border: 1px solid var(--oa-line);
  border-radius: 12px;
  background: var(--oa-soft);
  padding: 1rem;
  min-width: 0;
}

.nice-dark-mode .oa-try-form,
.nice-dark-mode .oa-try-result,
.nice-dark-mode .oa-try-empty {
  background: rgba(255, 255, 255, 0.03);
}

.oa-try-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #95aac9;
  margin: 0.75rem 0 0.35rem;
}

.oa-try-form > .oa-try-label:first-child { margin-top: 0; }

.oa-try-req {
  color: var(--oa-danger);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 0.25rem;
}

.oa-try-input {
  width: 100%;
  border: 1px solid var(--oa-line);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  background: #fff;
  color: var(--oa-ink);
  box-sizing: border-box;
}

.nice-dark-mode .oa-try-input {
  background: #15202e;
  color: #e8eef7;
}

.oa-try-input:focus {
  outline: none;
  border-color: rgba(35, 135, 245, 0.55);
  box-shadow: 0 0 0 3px rgba(35, 135, 245, 0.15);
}

.oa-try-keyrow {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.oa-try-keyrow .oa-try-input { flex: 1; }

.oa-try-hint {
  margin: 0.45rem 0 0 !important;
  font-size: 0.8rem !important;
  color: var(--oa-muted);
}

.oa-try-params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 0.75rem;
}

.oa-try-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.oa-try-url {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--oa-muted);
  word-break: break-all;
}

.oa-try-url code {
  font-size: 0.8rem;
}

.oa-try-empty {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  color: var(--oa-muted);
}

.oa-try-empty__title {
  font-weight: 700;
  color: var(--oa-ink);
  margin-bottom: 0.35rem;
}

.oa-try-empty p {
  margin: 0 auto !important;
  max-width: 22rem;
}

.oa-try-result {
  background: #0f1724;
  color: #d7e2f2;
  border-color: #1c2940;
  padding: 0;
  overflow: hidden;
}

.nice-dark-mode .oa-try-result {
  background: #0b1220;
}

.oa-try-result__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: center;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
}

.oa-try-meta-url {
  opacity: 0.7;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
}

.oa-try-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-weight: 700;
  font-size: 0.75rem;
}

.oa-try-status--ok { background: rgba(15, 157, 88, 0.2); color: #6ee7a8; }
.oa-try-status--warn { background: rgba(196, 122, 0, 0.22); color: #f6c66a; }
.oa-try-status--err { background: rgba(229, 83, 75, 0.22); color: #f5a39e; }

.oa-try-result__headers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.55rem 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.oa-try-result__headers code {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #9ec5ff;
}

.oa-try-result__body {
  margin: 0;
  padding: 0.9rem 0.95rem 1.1rem;
  max-height: 420px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e8eef7;
}

#oa-try-send.is-loading,
#oa-try-send:disabled {
  opacity: 0.72;
  cursor: wait;
}

@media (max-width: 991.98px) {
  .oa-try-grid { grid-template-columns: 1fr; }
  .oa-try-params { grid-template-columns: 1fr; }
}

.oa-method {
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  background: #e6f6ed;
  color: var(--oa-ok);
  margin-right: 0.4rem;
  vertical-align: middle;
}

.oa-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.oa-code {
  position: relative;
  background: #12263f;
  color: #e8eef7;
  border-radius: 10px;
  padding: 0.85rem 2.6rem 0.85rem 0.95rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0.55rem 0 0.85rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.oa-code > span {
  display: inline-block;
  white-space: pre;
  max-width: none;
}

.nice-dark-mode .oa-code {
  background: #0d1420;
  border: 1px solid #2a3548;
}

.oa-code .oa-copy-btn {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #dbe7f7;
}

.oa-code .oa-copy-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.oa-docs .table-responsive {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0.4rem 0 0.9rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.oa-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 0;
  table-layout: auto;
}

.oa-table th,
.oa-table td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--oa-line);
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.oa-table th {
  color: #95aac9;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  background: var(--oa-soft);
  white-space: nowrap;
}

.oa-table code {
  font-size: 0.8rem;
}

.oa-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
  max-width: 100%;
}

.oa-chip-row .oa-badge {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.oa-aside-nav-active {
  color: var(--oa-accent) !important;
  font-weight: 600;
}

/* ---------- 吊销确认弹窗 ---------- */
.oa-confirm {
  padding: 0.45rem 0.15rem 0.1rem;
  text-align: center;
}

.oa-confirm__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.85rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff1f0;
  color: var(--oa-danger);
  font-size: 1.35rem;
}

.nice-dark-mode .oa-confirm__icon {
  background: #3a1f1d;
}

.oa-confirm__title {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--oa-ink);
}

.oa-confirm__desc {
  margin: 0 auto;
  max-width: 22rem;
  color: var(--oa-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.oa-confirm__prefix {
  display: inline-block;
  margin: 0.85rem 0 0;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  background: var(--oa-soft);
  border: 1px solid var(--oa-line);
  font-size: 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  word-break: break-all;
  color: var(--oa-ink);
}

.oa-confirm__actions {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.oa-confirm__actions .oa-btn {
  min-width: 6.5rem;
  min-height: 2.45rem;
  justify-content: center;
}

.oa-btn--danger {
  background: var(--oa-danger);
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(229, 83, 75, 0.28);
}

.oa-btn--danger:hover {
  background: #cf463e;
  color: #fff !important;
}

.oa-btn--danger:disabled,
.oa-btn--danger.is-loading {
  opacity: 0.72;
  cursor: wait;
  box-shadow: none;
}

.oa-modal-content {
  max-width: 100%;
}

@media (max-width: 575.98px) {
  .oa-confirm__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .oa-confirm__actions .oa-btn {
    width: 100%;
    min-width: 0;
  }
}

.oa-btn--lg {
  padding: 0.7rem 1.25rem;
  font-size: 0.95rem;
}

/* ---------- 引导落地页 ---------- */
.oa-land {
  /* lasted 壳层 .site-main 无额外顶 padding；仅保留全宽抵消，避免负 margin 顶进 navbar */
  margin: 0 calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
  color: var(--oa-ink);
  animation: oaFade .4s ease both;
}

.oa-land-hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}

.oa-land-hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 20, 40, 0.35) 0%, rgba(8, 20, 40, 0.72) 55%, rgba(8, 20, 40, 0.92) 100%),
    url("/api/today?size=fhd") center / cover no-repeat,
    radial-gradient(1200px 500px at 20% 10%, rgba(35, 135, 245, 0.55), transparent 55%),
    linear-gradient(135deg, #0b2748, #1a5fb4 55%, #2387f5);
  transform: scale(1.02);
  animation: oaHeroDrift 18s ease-in-out infinite alternate;
}

@keyframes oaHeroDrift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(-1.2%, -0.8%, 0); }
}

.oa-land-hero__inner {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0 3.2rem;
}

.oa-land-brand {
  margin: 0 0 0.85rem;
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.oa-land-title {
  margin: 0 0 0.9rem;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.35;
  max-width: 18em;
  color: rgba(255, 255, 255, 0.94);
}

.oa-land-lead {
  margin: 0;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(232, 238, 247, 0.86);
}

.oa-land-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.oa-land-hero .oa-btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff !important;
  backdrop-filter: blur(8px);
}

.oa-land-hero .oa-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff !important;
}

.oa-land-section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.25rem 0;
}

.oa-land-section__head {
  margin-bottom: 1.75rem;
  max-width: 36rem;
}

.oa-land-section__head h2 {
  margin: 0 0 0.45rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.oa-land-section__head p {
  margin: 0;
  color: var(--oa-muted);
  line-height: 1.6;
}

.oa-land-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

@media (max-width: 991.98px) {
  .oa-land-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
  .oa-land-features { grid-template-columns: 1fr; }
}

.oa-land-feature {
  padding-top: 0.25rem;
  border-top: 2px solid rgba(35, 135, 245, 0.35);
}

.oa-land-feature__num {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--oa-accent);
  margin-bottom: 0.55rem;
}

.oa-land-feature h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.oa-land-feature p {
  margin: 0;
  color: var(--oa-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* 三步：独立卡片 */
.oa-land-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

.oa-land-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
  padding: 1.25rem 1.2rem 1.35rem;
  border-radius: 14px;
  border: 1px solid var(--oa-line);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 35, 70, 0.05);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.nice-dark-mode .oa-land-step {
  background: #1a2332;
  box-shadow: none;
}

.oa-land-step:hover {
  border-color: rgba(35, 135, 245, 0.4);
  box-shadow: var(--oa-shadow);
  transform: translateY(-2px);
}

.oa-land-step__num {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: var(--oa-accent);
  box-shadow: 0 8px 18px rgba(35, 135, 245, 0.28);
}

.oa-land-step__title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.oa-land-step__desc {
  display: block;
  color: var(--oa-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  word-break: break-word;
}

@media (max-width: 991.98px) {
  .oa-land-steps {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .oa-land-step {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: 0.85rem;
    row-gap: 0.35rem;
    padding: 1.05rem 1rem;
  }

  .oa-land-step__num {
    flex: 0 0 auto;
  }

  .oa-land-step__title {
    flex: 1 1 0;
    align-self: center;
    margin: 0;
  }

  .oa-land-step__desc {
    flex: 1 1 100%;
    padding-left: calc(2.15rem + 0.85rem);
  }
}

.oa-land-api-list {
  display: grid;
  gap: 0.55rem;
}

.oa-land-api {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--oa-line);
  background: #fff;
  text-decoration: none !important;
  color: inherit !important;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.nice-dark-mode .oa-land-api { background: #1a2332; }

.oa-land-api:hover {
  border-color: rgba(35, 135, 245, 0.45);
  box-shadow: var(--oa-shadow);
  transform: translateY(-1px);
}

.oa-land-code-wrap {
  margin-top: 1rem;
}

.oa-land-code {
  margin: 0;
}

.oa-land-footer-cta {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 3rem;
  padding: 2.4rem 1.5rem;
  border-radius: 16px;
  text-align: center;
  background:
    radial-gradient(700px 220px at 50% 0%, rgba(35, 135, 245, 0.18), transparent 60%),
    linear-gradient(180deg, #fff, var(--oa-soft));
  border: 1px solid var(--oa-line);
}

.nice-dark-mode .oa-land-footer-cta {
  background:
    radial-gradient(700px 220px at 50% 0%, rgba(35, 135, 245, 0.22), transparent 60%),
    linear-gradient(180deg, #1c2636, #15202e);
}

.oa-land-footer-cta h2 {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.oa-land-footer-cta p {
  margin: 0;
  color: var(--oa-muted);
}

.oa-land-footer-cta .oa-land-cta {
  justify-content: center;
}

@media (max-width: 991.98px) {
  /* 平板/手机：保留顶距，hero 做成圆角卡片（桌面仍贴紧 header 全宽） */
  .oa-land {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .oa-land-hero {
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(12, 28, 55, 0.16);
  }
}

@media (max-width: 767.98px) {
  .oa-land-hero { min-height: min(70vh, 560px); align-items: flex-end; }
  .oa-land-hero__inner { padding: 3.2rem 0 2.4rem; }
}

/* =========================================================
   移动端适配（控制台 / 文档 / 引导页）
   ========================================================= */
@media (max-width: 991.98px) {
  .oa-docs {
    max-width: 100%;
    overflow-x: hidden;
  }

  .oa-docs-hero {
    margin-bottom: 0;
    scroll-margin-top: 3.5rem;
  }

  .oa-endpoint {
    scroll-margin-top: 6.4rem;
  }

  .oa-docs-footnote {
    margin-top: 0.5rem;
  }
}

@media (max-width: 767.98px) {
  .oa-console,
  .oa-docs,
  .oa-land {
    overflow-x: hidden;
    max-width: 100%;
  }

  .oa-hero {
    padding: 1.1rem 1rem;
    border-radius: 10px;
  }

  .oa-hero__title {
    font-size: 1.2rem;
  }

  .oa-hero__desc {
    font-size: 0.86rem;
  }

  .oa-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .oa-hero__actions .oa-btn {
    width: 100%;
    justify-content: center;
    min-height: 2.55rem;
  }

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

  .oa-stat:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .oa-stat__value {
    font-size: 1.25rem;
  }

  .oa-panel__head,
  .oa-panel__body {
    padding-left: 0.95rem;
    padding-right: 0.95rem;
  }

  .oa-form-grid .oa-btn {
    width: 100%;
    justify-content: center;
    min-height: 2.7rem;
  }

  .oa-key-item {
    padding: 0.95rem 0.95rem;
  }

  .oa-revoke-btn {
    min-height: 2.15rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
  }

  .oa-key-flash {
    font-size: 0.74rem;
  }

  .oa-code {
    font-size: 0.72rem;
    padding: 2.25rem 0.8rem 0.8rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .oa-code .oa-copy-btn {
    top: 0.4rem;
    right: 0.4rem;
    min-height: 1.8rem;
  }

  .oa-path {
    word-break: break-all;
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .oa-docs-hero {
    padding: 1.25rem 1.05rem 1.15rem;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 35, 70, 0.06);
  }

  .oa-docs-hero__meta {
    margin-bottom: 0.55rem;
  }

  .oa-docs-hero h1 {
    font-size: 1.4rem;
    letter-spacing: -0.025em;
  }

  .oa-docs-hero p {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .oa-docs-hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 0.95rem;
  }

  .oa-docs-hero__actions > .oa-btn {
    width: 100%;
    justify-content: center;
    min-height: 2.55rem;
    font-size: 0.9rem;
  }

  .oa-docs-hero__actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .oa-docs-hero__actions-row .oa-btn {
    width: 100%;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }

  .oa-endpoint__head,
  .oa-endpoint__body {
    padding-left: 0.95rem;
    padding-right: 0.95rem;
  }

  .oa-endpoint__head h2 {
    font-size: 0.98rem;
  }

  .oa-chip-row {
    gap: 0.35rem;
  }

  .oa-chip-row .oa-btn {
    flex: 1 1 calc(50% - 0.35rem);
    justify-content: center;
    min-height: 2.2rem;
  }

  .oa-docs .table-responsive {
    margin: 0;
    padding-bottom: 0.15rem;
  }

  .oa-table {
    font-size: 0.78rem;
    min-width: 0;
  }

  .oa-table th,
  .oa-table td {
    padding: 0.45rem 0.5rem;
  }

  .oa-confirm__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .oa-confirm__actions .oa-btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
    min-height: 2.55rem;
  }

  /* 落地页：禁止 100vw 撑出横向滚动；hero 圆角卡片 */
  .oa-land {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .oa-land-hero {
    min-height: 0;
    min-height: 54svh;
    margin: 0;
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(12, 28, 55, 0.18);
  }

  .oa-land-hero__bg {
    animation: none;
    transform: none;
    border-radius: inherit;
    /* 移动端用较小图，减轻流量 */
    background:
      linear-gradient(180deg, rgba(8, 20, 40, 0.42) 0%, rgba(8, 20, 40, 0.78) 52%, rgba(8, 20, 40, 0.94) 100%),
      url("/api/today?size=hd") center / cover no-repeat,
      linear-gradient(135deg, #0b2748, #1a5fb4 55%, #2387f5);
  }

  .oa-land-hero__inner {
    width: calc(100% - 1.75rem);
    padding: 3.5rem 0 1.65rem;
  }

  .oa-land-brand {
    font-size: clamp(1.35rem, 6.5vw, 1.75rem);
    margin-bottom: 0.55rem;
  }

  .oa-land-title {
    font-size: clamp(1.08rem, 4.8vw, 1.35rem);
    max-width: none;
    margin-bottom: 0.65rem;
  }

  .oa-land-lead {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .oa-land-cta {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.15rem;
    gap: 0.5rem;
  }

  .oa-land-cta .oa-btn {
    width: 100%;
    justify-content: center;
    min-height: 2.65rem;
  }

  .oa-land-section {
    width: calc(100% - 1.5rem);
    padding: 2.25rem 0;
  }

  .oa-land-section__head h2 {
    font-size: 1.25rem;
  }

  .oa-land-api {
    gap: 0.4rem 0.55rem;
  }

  .oa-land-api .oa-path {
    flex: 1 1 100%;
    order: 3;
  }

  .oa-land-footer-cta {
    width: calc(100% - 1.5rem);
    margin-bottom: 1.75rem;
    padding: 1.65rem 1rem;
  }

  .oa-btn--lg {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 575.98px) {
  .oa-stats {
    grid-template-columns: 1fr;
  }

  .oa-stat:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .oa-chip-row .oa-btn {
    flex: 1 1 100%;
  }

  .oa-land-hero {
    min-height: 52svh;
  }
}

/* 触控设备：增大可点区域，减弱悬停依赖 */
@media (hover: none) {
  .oa-btn:hover,
  .oa-land-api:hover,
  .oa-stat:hover {
    transform: none;
  }

  .oa-btn:active {
    opacity: 0.92;
  }
}

@supports (padding: max(0px)) {
  @media (max-width: 767.98px) {
    .oa-land-hero__inner,
    .oa-land-section,
    .oa-land-footer-cta {
      padding-inline: max(0.75rem, env(safe-area-inset-left)) max(0.75rem, env(safe-area-inset-right));
    }

    .oa-land-footer-cta {
      margin-bottom: max(1.75rem, env(safe-area-inset-bottom));
    }

    .oa-console,
    .oa-docs {
      padding-inline: max(0px, env(safe-area-inset-left)) max(0px, env(safe-area-inset-right));
    }
  }
}

/* ---------- OpenAPI Admin ---------- */
.oa-admin-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--oa-line);
  backdrop-filter: blur(10px);
}

.nice-dark-mode .oa-admin-top {
  background: rgba(22, 30, 42, 0.92);
}

.oa-admin-top__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.oa-admin-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: var(--oa-ink);
}

.oa-admin-brand a {
  color: var(--oa-muted);
  text-decoration: none !important;
}

.oa-admin-brand a:hover { color: var(--oa-accent); }

.oa-admin-brand__sep { color: #c5d0de; }

.oa-admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.875rem;
}

.oa-admin-nav a {
  color: var(--oa-muted);
  text-decoration: none !important;
  font-weight: 600;
}

.oa-admin-nav a:hover,
.oa-admin-nav a.is-active { color: var(--oa-accent); }

.oa-admin-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.oa-stats--6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 992px) {
  .oa-stats--6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.oa-admin-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 140px;
  padding-top: 0.5rem;
}

.oa-admin-chart__col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  height: 140px;
}

.oa-admin-chart__bar {
  width: 100%;
  max-width: 28px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #4ea3f7, var(--oa-accent));
  min-height: 4px;
  transition: height .2s ease;
}

.oa-admin-chart__label {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  color: var(--oa-muted);
  white-space: nowrap;
}

.oa-admin-search {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.oa-admin-search input {
  border: 1px solid var(--oa-line);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 0.875rem;
  min-width: 12rem;
  background: #fff;
  color: var(--oa-ink);
}

.nice-dark-mode .oa-admin-search input {
  background: #15202e;
}

.oa-panel__body--flush { padding: 0; }

.oa-table-wrap { overflow-x: auto; }

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

.text-xs { font-size: 0.75rem !important; }

.oa-admin-user {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.oa-admin-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--oa-line);
}

.oa-admin-pager__links {
  display: flex;
  gap: 0.4rem;
}

.oa-btn--sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}

.oa-scopes {
  max-width: 12rem;
  font-size: 0.78rem;
  color: var(--oa-muted);
  word-break: break-word;
}

@media (max-width: 767.98px) {
  .oa-admin-search {
    width: 100%;
  }
  .oa-admin-search input {
    flex: 1;
    min-width: 0;
  }
  .oa-admin-chart {
    overflow-x: auto;
  }
  .oa-admin-chart__col {
    min-width: 2rem;
  }
}

/* ===== Admin shell v2 ===== */
.oa-admin-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(35, 135, 245, 0.14), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(99, 102, 241, 0.08), transparent 50%),
    #f5f7fb;
  color: var(--oa-ink);
}

.nice-dark-mode.oa-admin-body,
.oa-admin-body.nice-dark-mode {
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(35, 135, 245, 0.18), transparent 55%),
    #0f141d;
}

.oa-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.oa-shell__aside {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--oa-line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nice-dark-mode .oa-shell__aside {
  background: rgba(18, 24, 34, 0.85);
}

.oa-shell__brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0.5rem;
}

.oa-shell__brand a {
  font-weight: 700;
  color: var(--oa-ink);
  text-decoration: none !important;
  font-size: 1rem;
}

.oa-shell__brand span {
  font-size: 0.75rem;
  color: var(--oa-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.oa-shell__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.oa-shell__nav a {
  display: block;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  color: var(--oa-muted);
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background .15s ease, color .15s ease;
}

.oa-shell__nav a:hover,
.oa-shell__nav a.is-active {
  background: rgba(35, 135, 245, 0.1);
  color: var(--oa-accent);
}

.oa-shell__user {
  padding: 0.75rem 0.8rem;
  border-radius: 10px;
  background: var(--oa-soft);
  font-size: 0.82rem;
  color: var(--oa-muted);
}

.oa-shell__main {
  padding: 1.5rem 1.75rem 3rem;
  max-width: 1180px;
}

.oa-shell__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.oa-shell__top h1 {
  margin: 0.15rem 0 0.25rem;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  font-weight: 750;
}

.oa-shell__top p {
  margin: 0;
  color: var(--oa-muted);
  font-size: 0.9rem;
}

.oa-shell__top-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.oa-back {
  display: inline-block;
  margin-bottom: 0.25rem;
  color: var(--oa-accent);
  text-decoration: none !important;
  font-size: 0.85rem;
  font-weight: 600;
}

.oa-kpi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

@media (min-width: 900px) {
  .oa-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .oa-kpi:not(.oa-kpi--3) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

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

.oa-kpi__card {
  border: 1px solid var(--oa-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--oa-shadow);
  padding: 0.95rem 1rem;
  min-height: 96px;
}

.nice-dark-mode .oa-kpi__card {
  background: rgba(26, 35, 50, 0.92);
}

.oa-kpi__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #95aac9;
  margin-bottom: 0.35rem;
}

.oa-kpi__value {
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.oa-kpi__slash {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--oa-muted);
}

.oa-kpi__hint {
  margin-top: 0.35rem;
  font-size: 0.76rem;
  color: var(--oa-muted);
}

.oa-card {
  border: 1px solid var(--oa-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--oa-shadow);
  margin-bottom: 1.1rem;
  overflow: hidden;
}

.nice-dark-mode .oa-card {
  background: rgba(26, 35, 50, 0.92);
}

.oa-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--oa-line);
}

.oa-card__head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.oa-card__sub {
  margin: 0.25rem 0 0;
  color: var(--oa-muted);
  font-size: 0.82rem;
}

.oa-card__body { padding: 1rem 1.15rem 1.15rem; }
.oa-card__body--flush { padding: 0; }

.oa-search {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.oa-search input {
  border: 1px solid var(--oa-line);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  min-width: 13rem;
  background: #fff;
  color: var(--oa-ink);
  font-size: 0.875rem;
}

.nice-dark-mode .oa-search input { background: #15202e; }

.oa-seg {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 999px;
  background: var(--oa-soft);
  border: 1px solid var(--oa-line);
}

.oa-seg button {
  border: 0;
  background: transparent;
  color: var(--oa-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.oa-seg button.is-active {
  background: #fff;
  color: var(--oa-ink);
  box-shadow: 0 1px 4px rgba(18, 38, 63, 0.08);
}

.nice-dark-mode .oa-seg button.is-active {
  background: #243247;
  color: #fff;
}

.oa-trend { min-height: 220px; }

.oa-trend__bars {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  min-height: 200px;
  padding-top: 0.25rem;
  overflow-x: auto;
}

.oa-trend__col {
  flex: 1 1 0;
  min-width: 2.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 200px;
}

.oa-trend__val {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--oa-ink);
  margin-bottom: 0.3rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.oa-trend__bar-wrap {
  flex: 1;
  width: 100%;
  max-width: 34px;
  display: flex;
  align-items: flex-end;
}

.oa-trend__bar {
  width: 100%;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #5aaeff 0%, #2387f5 70%, #0d6efd 100%);
  min-height: 3px;
  box-shadow: 0 6px 14px rgba(35, 135, 245, 0.22);
}

.oa-trend__label {
  margin-top: 0.4rem;
  font-size: 0.68rem;
  color: var(--oa-muted);
  white-space: nowrap;
}

.oa-table--modern th {
  background: rgba(244, 247, 251, 0.85);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #95aac9;
}

.nice-dark-mode .oa-table--modern th {
  background: rgba(255, 255, 255, 0.03);
}

.oa-row-loading td,
.oa-empty {
  text-align: center !important;
  color: var(--oa-muted);
  padding: 2rem 1rem !important;
}

.oa-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--oa-line);
}

.oa-pager__links { display: flex; gap: 0.4rem; }

.oa-skel .oa-skel-line {
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e8eef7, #f7f9fc, #e8eef7);
  background-size: 200% 100%;
  animation: oaShimmer 1.2s linear infinite;
  margin-bottom: 0.65rem;
}

.oa-skel-line--lg { height: 22px; width: 55%; }

@keyframes oaShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Admin mobile UX ===== */
.oa-mbar {
  display: none;
}

.oa-shell__backdrop {
  display: none;
}

.oa-shell__nav-home {
  display: none;
}

@media (max-width: 960px) {
  .oa-admin-body {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .oa-shell {
    display: block;
  }

  .oa-mbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 80;
    align-items: center;
    gap: 0.55rem;
    min-height: 52px;
    padding:
      max(0.55rem, env(safe-area-inset-top))
      max(0.75rem, env(safe-area-inset-right))
      0.55rem
      max(0.75rem, env(safe-area-inset-left));
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--oa-line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .nice-dark-mode .oa-mbar {
    background: rgba(18, 24, 34, 0.92);
  }

  .oa-mbar__btn {
    appearance: none;
    border: 1px solid var(--oa-line);
    background: #fff;
    color: var(--oa-ink);
    border-radius: 10px;
    min-width: 42px;
    min-height: 42px;
    padding: 0 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .nice-dark-mode .oa-mbar__btn {
    background: #1a2332;
  }

  .oa-mbar__btn--text {
    min-width: auto;
    padding: 0 0.8rem;
  }

  .oa-mbar__icon,
  .oa-mbar__icon::before,
  .oa-mbar__icon::after {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
  }

  .oa-mbar__icon {
    position: relative;
  }

  .oa-mbar__icon::before,
  .oa-mbar__icon::after {
    content: '';
    position: absolute;
    left: 0;
  }

  .oa-mbar__icon::before { top: -5px; }
  .oa-mbar__icon::after { top: 5px; }

  .oa-nav-open .oa-mbar__icon {
    background: transparent;
  }

  .oa-nav-open .oa-mbar__icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .oa-nav-open .oa-mbar__icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .oa-mbar__brand {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
  }

  .oa-mbar__brand strong {
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .oa-mbar__brand span {
    font-size: 0.68rem;
    color: var(--oa-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .oa-shell__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(2px);
  }

  .oa-shell__aside {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: min(82vw, 300px);
    height: 100vh;
    height: 100dvh;
    padding:
      max(1rem, env(safe-area-inset-top))
      1rem
      max(1rem, env(safe-area-inset-bottom))
      max(1rem, env(safe-area-inset-left));
    border-right: 1px solid var(--oa-line);
    border-bottom: 0;
    background: #fff;
    box-shadow: 12px 0 40px rgba(18, 38, 63, 0.16);
    transform: translateX(-105%);
    transition: transform .22s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nice-dark-mode .oa-shell__aside {
    background: #121822;
  }

  .oa-nav-open .oa-shell__aside,
  .oa-shell__aside[data-open="1"] {
    transform: translateX(0);
  }

  .oa-shell__nav {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.3rem;
  }

  .oa-shell__nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
  }

  .oa-shell__nav-home {
    display: flex;
    margin-top: 0.35rem;
    border-top: 1px solid var(--oa-line);
    border-radius: 0 0 10px 10px;
    padding-top: 0.85rem !important;
  }

  .oa-shell__main {
    padding:
      0.95rem
      max(0.85rem, env(safe-area-inset-right))
      max(2rem, env(safe-area-inset-bottom))
      max(0.85rem, env(safe-area-inset-left));
  }

  .oa-shell__top {
    margin-bottom: 0.85rem;
  }

  .oa-shell__top h1 {
    font-size: 1.28rem;
  }

  .oa-shell__top p {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .oa-shell__top-actions {
    display: none;
  }

  .oa-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

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

  .oa-kpi--3 .oa-kpi__card:last-child {
    grid-column: 1 / -1;
  }

  .oa-kpi__card {
    min-height: 84px;
    padding: 0.8rem 0.75rem;
    border-radius: 12px;
  }

  .oa-kpi__label {
    font-size: 0.64rem;
  }

  .oa-kpi__value {
    font-size: 1.12rem;
  }

  .oa-kpi__hint {
    font-size: 0.7rem;
    line-height: 1.35;
  }

  .oa-card {
    border-radius: 14px;
    margin-bottom: 0.9rem;
  }

  .oa-card__head {
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem 0.9rem;
    gap: 0.65rem;
  }

  .oa-card__head h2 {
    font-size: 0.95rem;
  }

  .oa-card__body {
    padding: 0.85rem 0.9rem 1rem;
  }

  .oa-card__body--flush {
    padding: 0;
  }

  .oa-search {
    width: 100%;
    gap: 0.4rem;
  }

  .oa-search input {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    font-size: 16px; /* 避免 iOS 缩放 */
  }

  .oa-search .oa-btn,
  .oa-btn--sm {
    min-height: 42px;
  }

  .oa-seg {
    width: 100%;
  }

  .oa-seg button {
    flex: 1;
    min-height: 36px;
  }

  .oa-trend {
    min-height: 190px;
    margin: 0 -0.15rem;
  }

  .oa-trend__bars {
    min-height: 180px;
    gap: 0.28rem;
    padding-bottom: 0.15rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .oa-trend__col {
    min-width: 2.15rem;
    height: 180px;
    scroll-snap-align: start;
  }

  .oa-trend__val {
    font-size: 0.6rem;
    transform: scale(0.96);
  }

  .oa-trend__label {
    font-size: 0.6rem;
  }

  .oa-trend__bar-wrap {
    max-width: 26px;
  }

  /* 表格 → 卡片 */
  .oa-table--cards thead {
    display: none;
  }

  .oa-table--cards tbody {
    display: block;
    padding: 0.65rem;
  }

  .oa-table--cards tr {
    display: block;
    border: 1px solid var(--oa-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(18, 38, 63, 0.04);
    margin: 0 0 0.65rem;
    padding: 0.2rem 0.15rem;
    overflow: hidden;
  }

  .nice-dark-mode .oa-table--cards tr {
    background: #1a2332;
  }

  .oa-table--cards tr:last-child {
    margin-bottom: 0;
  }

  .oa-table--cards td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    border: 0 !important;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.28) !important;
    padding: 0.65rem 0.75rem !important;
    text-align: right;
    font-size: 0.86rem;
    line-height: 1.4;
  }

  .oa-table--cards td:last-child {
    border-bottom: 0 !important;
  }

  .oa-table--cards td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    max-width: 42%;
    text-align: left;
    color: #95aac9;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding-top: 0.12rem;
  }

  .oa-table--cards td.oa-td-action {
    justify-content: stretch;
  }

  .oa-table--cards td.oa-td-action::before {
    display: none;
  }

  .oa-table--cards .oa-empty,
  .oa-table--cards .oa-row-loading td {
    display: block;
    text-align: center !important;
    border-bottom: 0 !important;
  }

  .oa-table--cards .oa-empty::before,
  .oa-table--cards .oa-row-loading td::before {
    display: none;
  }

  .oa-table-wrap {
    overflow-x: visible;
  }

  .oa-table--cards {
    width: 100%;
    min-width: 0;
  }

  .oa-admin-user {
    align-items: flex-end;
    text-align: right;
  }

  .oa-key-prefix {
    word-break: break-all;
  }

  .oa-alert {
    border-radius: 12px;
  }

  .oa-btn--block-m {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  .oa-pager {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.85rem;
  }

  .oa-pager__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .oa-pager__links .oa-btn {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  .oa-back {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
  }

  .oa-scopes {
    max-width: none;
    text-align: right;
  }

  body.oa-nav-open {
    overflow: hidden;
  }
}

@media (max-width: 420px) {
  .oa-kpi {
    grid-template-columns: 1fr;
  }

  .oa-kpi--3 {
    grid-template-columns: 1fr;
  }

  .oa-kpi--3 .oa-kpi__card:last-child {
    grid-column: auto;
  }

  .oa-kpi__value {
    font-size: 1.2rem;
  }

  .oa-mbar__brand strong {
    font-size: 0.88rem;
  }
}

@supports (padding: max(0px)) {
  @media (max-width: 960px) {
    .oa-shell__main {
      padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
  }
}


