/*
文件说明：本地 API 文档站样式。
注意：仅定义前端展示样式，不包含任何凭据或个人数据。
*/
:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-soft: #172033;
  --card: #ffffff;
  --text: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --brand: #2563eb;
  --brand-soft: #dbeafe;
  --green: #059669;
  --red: #dc2626;
  --orange: #ea580c;
  --blue: #2563eb;
  --shadow: 0 16px 48px rgb(15 23 42 / 12%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: #f5f7fb; }
.app-shell { display: grid; grid-template-columns: 360px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-x: hidden; overflow-y: auto; padding: 22px; background: linear-gradient(180deg, #0f172a, #172033); color: #e5e7eb; }
.brand { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-weight: 800; color: white; background: linear-gradient(135deg, #60a5fa, #2563eb); }
.brand h1 { margin: 0; font-size: 20px; }
.brand p { margin: 3px 0 0; color: #9ca3af; font-size: 13px; }
.search-box { display: grid; gap: 8px; margin-bottom: 14px; color: #cbd5e1; font-size: 13px; }
.search-box input { width: 100%; padding: 12px 13px; border: 1px solid rgb(255 255 255 / 12%); border-radius: 12px; outline: none; color: #f8fafc; background: rgb(255 255 255 / 7%); }
.search-box input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgb(147 197 253 / 18%); }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.tab { padding: 10px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 12px; color: #cbd5e1; background: rgb(255 255 255 / 6%); cursor: pointer; }
.tab.active { color: #0f172a; background: #bfdbfe; border-color: #bfdbfe; font-weight: 700; }
.nav-group { margin: 18px 0 8px; color: #93c5fd; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.nav-item { display: block; width: 100%; margin: 6px 0; padding: 10px 12px; overflow-wrap: anywhere; border: 1px solid transparent; border-radius: 12px; color: #d1d5db; background: transparent; text-align: left; cursor: pointer; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgb(255 255 255 / 9%); border-color: rgb(255 255 255 / 10%); }
.nav-item small { display: block; margin-top: 4px; color: #9ca3af; line-height: 1.35; }
.method { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; margin-right: 8px; padding: 3px 8px; border-radius: 999px; color: white; font-size: 12px; font-weight: 800; }
.method.get { background: var(--blue); }
.method.post { background: var(--green); }
.method.put { background: var(--orange); }
.method.delete { background: var(--red); }
.content { min-width: 0; padding: 30px; }
.hero { margin-bottom: 22px; padding: 28px; border-radius: 8px; color: white; background: #28548f; box-shadow: var(--shadow); }
.hero h2 { margin: 0 0 8px; font-size: 30px; }
.hero p { max-width: 920px; margin: 0; color: #dbeafe; line-height: 1.7; }
.hero .muted { color: #dbeafe; opacity: .82; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.stat { padding: 10px 14px; border: 1px solid rgb(255 255 255 / 14%); border-radius: 8px; background: rgb(255 255 255 / 8%); }
.stat strong { display: block; font-size: 20px; }
.detail-card { padding: 26px; border-radius: 8px; background: var(--card); box-shadow: var(--shadow); }
.kicker { color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.title-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0 12px; }
.title-row h2 { margin: 0; font-size: 28px; }
.path-code, code { padding: 2px 6px; border-radius: 7px; background: #f1f5f9; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.note { margin: 14px 0; padding: 14px 16px; border-left: 4px solid var(--brand); border-radius: 12px; background: var(--brand-soft); line-height: 1.7; }
.official { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: #344054; background: #fafafa; white-space: pre-wrap; line-height: 1.7; }
.section { margin-top: 28px; }
.section h3 { margin: 0 0 12px; font-size: 20px; }
.grid { display: grid; gap: 14px; }
.response-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.response { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdff; }
.response strong { display: inline-flex; margin-bottom: 8px; color: var(--brand); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; z-index: 1; background: #f8fafc; color: #475467; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
.field-name { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; color: #111827; }
.type-pill { display: inline-flex; margin: 2px 0; padding: 3px 8px; border-radius: 999px; color: #1e3a8a; background: #dbeafe; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.req, .opt { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; font-size: 12px; font-weight: 800; line-height: 1.4; }
.req { color: #991b1b; background: #fee2e2; }
.opt { color: #475467; background: #f2f4f7; }
.enum-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.enum-item { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px; border-radius: 999px; background: #ecfdf3; color: #027a48; font-size: 12px; }
.enum-code { padding: 2px 7px; border-radius: 999px; background: #d1fae5; color: #047857; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; user-select: all; }
.enum-label { padding-right: 6px; color: #047857; }
.muted { color: var(--muted); }
.empty { padding: 22px; border: 1px dashed #cbd5e1; border-radius: 16px; color: var(--muted); text-align: center; }
.schema-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 16px; }
.schema-link { color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .nav-list { max-height: 320px; overflow-x: hidden; overflow-y: auto; padding-right: 4px; }
  .content { padding: 18px; }
}
