:root {
    --bg: #f4f6fb;
    --card: #ffffff;
    --border: #e5e9f2;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --ok: #16a34a;
    --warn: #d97706;
    --err: #dc2626;
    --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 布局 */
.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 60px;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar .logo { font-size: 20px; font-weight: 700; color: var(--text); }
.topbar .logo span { color: var(--primary); }
.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a {
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 500;
}
.topbar nav a:hover { background: #eef2ff; color: var(--primary); text-decoration: none; }
.topbar nav a.active { background: #eef2ff; color: var(--primary); font-weight: 600; }
.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }

/* 卡片 */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}
.card h2 { font-size: 20px; margin-bottom: 16px; font-weight: 700; }
.card h3 { font-size: 17px; margin: 12px 0 8px; }

/* 统计卡片 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.stat .num { font-size: 30px; font-weight: 700; color: var(--primary); }
.stat .label { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* 表单 */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
input[type=text], input[type=password], input[type=email], input[type=number], select, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--primary); }
textarea { min-height: 120px; resize: vertical; font-family: inherit; }
.form-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-inline input, .form-inline select { width: auto; }

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: #eef2ff; }
.btn-danger { background: var(--err); }
.btn-danger:hover { background: #b91c1c; }
.btn-warn { background: var(--warn); }
.btn-ok { background: var(--ok); }

/* 标签 */
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.tag-ok { background: #dcfce7; color: #15803d; }
.tag-off { background: #f3f4f6; color: #6b7280; }
.tag-err { background: #fee2e2; color: #b91c1c; }
.tag-info { background: #dbeafe; color: #1d4ed8; }

/* 提示 */
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.alert-ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* 代码块 */
.code-block {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 10px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}
.key-box {
    font-family: Consolas, monospace;
    background: #eef2ff;
    border: 1px dashed var(--primary);
    color: var(--primary-dark);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 16px;
    word-break: break-all;
}

/* 分页 */
.pager { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pager .pg, .pager .pg-cur {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 14px;
}
.pager .pg-cur { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.pager .pg:hover { border-color: var(--primary); text-decoration: none; }

/* 文档页 */
.doc-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; background: var(--card); }
.doc-item h2 { font-size: 20px; margin-bottom: 4px; }
.doc-item .path { font-family: Consolas, monospace; color: var(--primary); font-weight: 600; }
.doc-item .desc { color: var(--muted); margin: 8px 0 12px; }
.doc-item pre.doc { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; white-space: pre-wrap; font-size: 14px; }

/* 登录页 */
.auth-wrap { max-width: 420px; margin: 60px auto; padding: 0 16px; }
.auth-wrap .card { padding: 32px; }
.auth-title { text-align: center; font-size: 24px; font-weight: 700; margin-bottom: 24px; }
.auth-sub { text-align: center; margin-top: 16px; color: var(--muted); font-size: 14px; }

/* 筛选条 */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filter-bar .form-row { margin-bottom: 0; }
.filter-bar label { font-size: 13px; color: var(--muted); }

.empty-tip { text-align: center; color: var(--muted); padding: 40px 0; }

/* ============ 首页 V2（hp- 前缀，仅首页使用） ============ */
body.hp { background: #fafbfd; }

/* ---- Hero ---- */
.hp-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 50% at 85% 20%, rgba(59,130,246,.14), transparent),
        radial-gradient(ellipse 50% 60% at 10% 90%, rgba(124,58,237,.10), transparent),
        linear-gradient(180deg, #f4f7ff 0%, #fafbfd 100%);
    border-bottom: 1px solid var(--border);
}
.hp-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; pointer-events: none; }
.hp-blob-1 { width: 420px; height: 420px; right: -120px; top: -160px; background: #93c5fd; }
.hp-blob-2 { width: 340px; height: 340px; left: -100px; bottom: -180px; background: #ddd6fe; }
.hp-hero-inner {
    max-width: 1100px; margin: 0 auto; padding: 72px 16px 64px;
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
    position: relative;
}
.hp-badge {
    display: inline-block; padding: 6px 14px; border-radius: 999px;
    background: #eef2ff; border: 1px solid #dbe4ff;
    color: var(--primary-dark); font-size: 13.5px; font-weight: 600;
}
.hp-hero-text h1 {
    font-size: 46px; font-weight: 900; line-height: 1.22;
    letter-spacing: .5px; margin: 18px 0 14px;
}
.hp-grad {
    background: linear-gradient(120deg, #2563eb 20%, #7c3aed 80%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.hp-hero-sub { color: var(--muted); font-size: 17px; max-width: 480px; }
.hp-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hp-btn-lg { padding: 13px 26px; font-size: 16px; border-radius: 10px; }
.hp-hero-foot { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 20px; color: var(--muted); font-size: 13.5px; }

/* 终端演示卡 */
.hp-hero-demo { position: relative; }
.hp-term {
    background: #0f172a; border-radius: 16px;
    box-shadow: 0 24px 60px -18px rgba(30,58,138,.45);
    overflow: hidden; transform: rotate(1.2deg);
    transition: transform .2s ease;
}
.hp-term:hover { transform: rotate(0deg); }
.hp-term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #1e293b; }
.hp-term-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.hp-term-bar i:nth-child(1) { background: #f87171; }
.hp-term-bar i:nth-child(2) { background: #fbbf24; }
.hp-term-bar i:nth-child(3) { background: #34d399; }
.hp-term-title { margin-left: 8px; color: #94a3b8; font-size: 12px; }
.hp-term-code {
    padding: 18px 20px 22px; color: #e2e8f0; margin: 0;
    font-family: Consolas, "Courier New", monospace; font-size: 13.5px; line-height: 1.75;
    white-space: pre-wrap; word-break: break-all; overflow-x: auto;
}
.tk-cmt { color: #64748b; } .tk-prompt { color: #34d399; font-weight: 700; }
.tk-key { color: #7dd3fc; } .tk-str { color: #fde68a; } .tk-num { color: #f9a8d4; }
.hp-float {
    position: absolute; padding: 8px 16px; border-radius: 999px;
    background: #fff; border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(15,23,42,.10);
    font-size: 13.5px; font-weight: 600; color: #374151; white-space: nowrap;
}
.hp-float-1 { top: -14px; right: 8px; }
.hp-float-2 { bottom: -12px; left: -6px; }

/* ---- 数据带 ---- */
.hp-stats-wrap { max-width: 1100px; margin: -30px auto 0; padding: 0 16px; position: relative; z-index: 2; }
.hp-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: #fff; border: 1px solid var(--border); border-radius: 16px;
    box-shadow: 0 12px 32px -12px rgba(15,23,42,.12);
    overflow: hidden;
}
.hp-stat { text-align: center; padding: 22px 10px; border-right: 1px solid var(--border); }
.hp-stat:last-child { border-right: none; }
.hp-stat b { display: block; font-size: 28px; font-weight: 800; color: var(--primary); }
.hp-stat span { font-size: 13px; color: var(--muted); }

/* ---- 接口广场 ---- */
.hp-sec-head { display: flex; align-items: baseline; justify-content: space-between; }
.hp-more { font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.hp-cat { margin-bottom: 8px; }
.hp-cat-num {
    font-size: 12px; color: var(--primary); background: #eef2ff;
    border-radius: 999px; padding: 2px 9px; margin-left: 6px; font-weight: 700;
}
.hp-api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.hp-api-card {
    display: flex; flex-direction: column; gap: 6px;
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    padding: 18px; color: inherit;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.hp-api-card:hover {
    text-decoration: none; transform: translateY(-3px);
    border-color: #bfdbfe; box-shadow: 0 12px 28px -10px rgba(37,99,235,.22);
}
.hp-api-top { display: flex; align-items: center; gap: 8px; }
.hp-api-path { color: var(--muted); font-family: Consolas, monospace; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-api-name { font-size: 16.5px; margin-top: 2px; }
.hp-api-desc { color: var(--muted); font-size: 13.5px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hp-api-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.hp-price { font-size: 12.5px; font-weight: 700; color: #0d9488; background: #ccfbf1; border-radius: 6px; padding: 2px 9px; }
.hp-price-free { color: #15803d; background: #dcfce7; }
.hp-doc-link { font-size: 13px; color: var(--primary); font-weight: 600; }

/* ---- Bento 特性 ---- */
.hp-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hp-bcard {
    background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 22px;
}
.hp-b-lg { grid-column: span 2; }
.hp-bcard h3 { font-size: 17px; margin: 12px 0 6px; }
.hp-bcard p { color: var(--muted); font-size: 14px; }
.hp-b-icon {
    width: 42px; height: 42px; border-radius: 11px; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; letter-spacing: .5px;
}

/* ---- 三步接入 ---- */
.hp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.hp-step { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 22px; position: relative; }
.hp-step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--primary); color: #fff; font-weight: 800; font-size: 15px;
    margin-bottom: 10px;
}
.hp-step b { display: block; font-size: 16.5px; margin-bottom: 4px; }
.hp-step p { color: var(--muted); font-size: 14px; }
.hp-two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; align-items: start; }
.hp-two-col .card { margin-bottom: 0; }
.hp-err-list { display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
.hp-err-list > div { display: flex; align-items: center; gap: 10px; }

@media (max-width: 900px) {
    .hp-hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 44px 16px 52px; }
    .hp-hero-text h1 { font-size: 34px; }
    .hp-hero-sub { font-size: 15.5px; }
    .hp-stats { grid-template-columns: repeat(2, 1fr); }
    .hp-stat:nth-child(2n) { border-right: none; }
    .hp-stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
    .hp-bento { grid-template-columns: 1fr 1fr; }
    .hp-b-lg { grid-column: span 2; }
    .hp-steps { grid-template-columns: 1fr; }
    .hp-two-col { grid-template-columns: 1fr; }
    .hp-float-2 { left: 4px; }
}
@media (max-width: 640px) {
    .hp-hero-text h1 { font-size: 28px; }
    .hp-bento { grid-template-columns: 1fr; }
    .hp-b-lg { grid-column: span 1; }
    .hp-btn-lg { width: 100%; text-align: center; }
    .hp-stats { grid-template-columns: repeat(2, 1fr); }
    .hp-stat b { font-size: 22px; }
    .hp-float { display: none; }
}

.sec-title { font-size: 22px; font-weight: 800; margin: 28px 0 14px; }
.cat-title { font-size: 17px; color: var(--muted); margin: 20px 0 10px; font-weight: 600; }

.docs-intro { margin: 8px 0 4px; }
.docs-intro h1 { font-size: 26px; font-weight: 800; }
.docs-intro p { color: var(--muted); margin-top: 6px; }

/* ============ Admin 固定侧边栏布局 ============ */
.sb {
    position: fixed; left: 0; top: 0; bottom: 0; width: 256px;
    background: var(--card); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; z-index: 50;
}
.sb-brand { padding: 20px 20px 16px; border-bottom: 1px solid var(--border); }
.sb-brand a { font-size: 17px; font-weight: 700; color: var(--text); }
.sb-brand span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.sb-nav { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.sb-item {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px;
    color: #52525b; font-size: 14.5px; font-weight: 500;
    transition: background-color .15s ease, color .15s ease;
}
.sb-item svg { width: 17px; height: 17px; flex: none; transition: transform .15s ease; }
.sb-item:hover { background: #f4f4f5; color: #18181b; text-decoration: none; }
.sb-item:hover svg { transform: translateX(2px); }
.sb-item.active { background: #eff6ff; color: var(--primary); font-weight: 600; }
/* 激活项稳定锚点：左侧强调线 */
.sb-item.active::before {
    content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px;
    width: 3px; border-radius: 2px; background: var(--primary);
}
.sb-foot { border-top: 1px solid var(--border); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.sb-avatar {
    width: 34px; height: 34px; border-radius: 8px; flex: none;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
}
.sb-user b { font-size: 14px; display: block; line-height: 1.25; }
.sb-user small { color: var(--muted); font-size: 12px; }
.sb-logout { margin-left: auto; color: var(--muted); display: inline-flex; padding: 6px; border-radius: 6px; }
.sb-logout:hover { color: var(--err); background: #fef2f2; text-decoration: none; }
.sb-logout svg { width: 16px; height: 16px; }

.sb-main { margin-left: 256px; min-height: 100vh; background: var(--bg); }
.sb-topbar { display: flex; align-items: center; gap: 12px; padding: 18px 24px 4px; }
.sb-title { font-size: 20px; font-weight: 700; }
.sb-container { margin-top: 8px; }
.sb-burger {
    display: none; align-items: center; justify-content: center;
    width: 38px; height: 38px; border: 1px solid var(--border);
    border-radius: 8px; background: var(--card); color: var(--text); cursor: pointer;
}
.sb-burger svg { width: 18px; height: 18px; }
.sb-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(24, 24, 27, .45); z-index: 40;
}
.sb-foot-note { text-align: center; color: var(--muted); font-size: 13px; padding: 16px 0 20px; margin-left: 256px; }

@media (max-width: 1023px) {
    .sb { transform: translateX(-100%); transition: transform .2s ease; }
    body.sb-open .sb { transform: translateX(0); box-shadow: 0 0 24px rgba(0,0,0,.18); }
    body.sb-open .sb-overlay { display: block; }
    .sb-main, .sb-foot-note { margin-left: 0; }
    .sb-burger { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) {
    .sb, .sb-item, .sb-item svg { transition: none; }
}

/* ============ uapis 风格接口文档 ============ */
.doc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.doc-head h2 { font-size: 22px; font-weight: 800; }
.method-tag {
    display: inline-block; padding: 3px 10px; border-radius: 6px;
    background: #dcfce7; color: #15803d; font-size: 13px; font-weight: 700;
    font-family: Consolas, monospace;
}
.doc-desc { color: var(--muted); margin-bottom: 12px; }

.endpoint {
    display: flex; align-items: center; gap: 10px;
    background: #0f172a; border-radius: 10px;
    padding: 10px 14px; margin: 10px 0 18px; flex-wrap: wrap;
}
.endpoint code {
    color: #7dd3fc; font-family: Consolas, monospace; font-size: 14px;
    word-break: break-all; flex: 1; min-width: 200px;
}
.copy-btn {
    background: #334155; color: #e2e8f0; border: none; border-radius: 6px;
    padding: 5px 12px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.copy-btn:hover { background: #475569; }

.doc-body h4.doc-h {
    font-size: 16px; font-weight: 700; margin: 22px 0 8px;
    padding-left: 10px; border-left: 4px solid var(--primary);
}
.doc-body .doc-p { color: #374151; margin-bottom: 6px; }
.doc-body .doc-ul { margin: 4px 0 8px 22px; }
.doc-body .doc-ul li { margin: 3px 0; color: #374151; }
.doc-body .doc-code {
    background: #0f172a; color: #e2e8f0; border-radius: 10px;
    padding: 14px 16px; font-family: Consolas, "Courier New", monospace;
    font-size: 13.5px; line-height: 1.7; overflow-x: auto;
    white-space: pre-wrap; word-break: break-all; margin: 10px 0;
}
.md-code {
    background: #eef2ff; color: var(--primary-dark);
    padding: 1px 6px; border-radius: 5px;
    font-family: Consolas, monospace; font-size: 13px;
}
table.doc-table { font-size: 14.5px; }
table.doc-table th { background: #f8fafc; }
table.doc-table td:first-child code, table.doc-table td .md-code { white-space: nowrap; }
.code-tag {
    display: inline-block; min-width: 44px; text-align: center;
    padding: 2px 8px; border-radius: 6px;
    font-family: Consolas, monospace; font-weight: 700; font-size: 13px;
}
.code-tag.ok { background: #dcfce7; color: #15803d; }
.code-tag.err { background: #fee2e2; color: #b91c1c; }
.code-tag.warn { background: #fef3c7; color: #b45309; }
.cmt { color: #64748b; }

@media (max-width: 640px) {
    .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; }
    .container { margin: 16px auto; }
    .card { padding: 16px; }
    .stat .num { font-size: 24px; }
}

/* ---------- 在线测试（试一试） ---------- */
.try-btn {
    background: #059669; color: #fff; border: none; border-radius: 6px;
    padding: 5px 14px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.try-btn:hover { background: #047857; }
.test-panel { border: 1px solid var(--border); border-radius: 10px; margin: -8px 0 18px; overflow: hidden; }
.tp-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #f8fafc; border-bottom: 1px solid var(--border); padding: 10px 14px;
}
.tp-url { font-family: Consolas, monospace; font-size: 14px; color: #0f172a; word-break: break-all; flex: 1; min-width: 180px; }
.tp-actions { display: flex; gap: 8px; }
.tp-send {
    background: #059669; color: #fff; border: none; border-radius: 6px;
    padding: 6px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.tp-send:hover { background: #047857; }
.tp-send:disabled { opacity: .6; cursor: wait; }
.tp-cancel { background: transparent; border: none; color: #6b7280; font-size: 14px; cursor: pointer; padding: 6px 4px; }
.tp-cancel:hover { color: #374151; }
.tp-auth { padding: 10px 14px; font-size: 14px; color: #475569; border-bottom: 1px solid var(--border); }
.tp-auth a { color: var(--primary); font-weight: 600; }
.tp-params { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.tp-row { display: flex; gap: 8px; align-items: center; }
.tp-row .tp-name {
    width: 150px; flex: none; background: #f1f5f9; border: 1px solid var(--border);
    border-radius: 6px; padding: 7px 10px; font-size: 14px; font-family: Consolas, monospace;
}
.tp-row .tp-value {
    flex: 1; background: #f1f5f9; border: 1px solid var(--border);
    border-radius: 6px; padding: 7px 10px; font-size: 14px;
}
.tp-row input:focus { outline: 2px solid rgba(59,130,246,.35); border-color: var(--primary); background: #fff; }
.tp-del {
    flex: none; width: 30px; height: 30px; border: none; background: transparent;
    color: #94a3b8; font-size: 14px; cursor: pointer; border-radius: 6px;
}
.tp-del:hover { background: #fee2e2; color: #dc2626; }
.tp-add {
    align-self: flex-start; background: transparent; border: 1px dashed #cbd5e1; border-radius: 6px;
    color: #64748b; padding: 6px 14px; font-size: 13px; cursor: pointer;
}
.tp-add:hover { border-color: var(--primary); color: var(--primary); }
.tp-result { padding: 14px; border-top: 1px solid var(--border); }
.tp-result.tp-err { color: #dc2626; font-size: 14px; }
.tp-result.tp-err a { color: var(--primary); font-weight: 600; }
.tp-status {
    display: inline-block; padding: 2px 10px; border-radius: 6px;
    font-size: 13px; font-weight: 700; font-family: Consolas, monospace; margin-right: 8px;
}
.tp-status.tp-ok { background: #dcfce7; color: #15803d; }
.tp-status.tp-bad { background: #fee2e2; color: #dc2626; }
.tp-status.tp-wait { background: #e0e7ff; color: #4338ca; }
.tp-meta { font-size: 13px; color: #64748b; font-family: Consolas, monospace; word-break: break-all; }
.tp-json {
    margin-top: 10px; background: #0f172a; color: #a5f3fc; border-radius: 8px;
    padding: 14px 16px; font-family: Consolas, monospace; font-size: 13px;
    white-space: pre-wrap; word-break: break-all; max-height: 420px; overflow: auto;
}
@media (max-width: 640px) {
    .tp-row { flex-wrap: wrap; }
    .tp-row .tp-name { width: calc(50% - 4px); }
    .tp-row .tp-value { width: 100%; flex: none; order: 3; }
}

/* ---------- 文档页侧边栏（复用 .sb-* 布局） ---------- */
.sb-group {
    font-size: 12px; font-weight: 600; color: #a1a1aa;
    padding: 14px 12px 4px; letter-spacing: .02em;
}
.sb-group:first-child { padding-top: 4px; }
.ds-mt {
    flex: none; min-width: 34px; text-align: center;
    background: #dcfce7; color: #15803d; border-radius: 5px;
    font-size: 11px; font-weight: 700; padding: 2px 5px;
    font-family: Consolas, monospace;
}
.ds-api { font-size: 13.5px; padding: 7px 12px; }
.ds-api span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-toplink { margin-left: auto; font-size: 14px; }
.sb-toplink a { color: var(--primary); font-weight: 600; }
.doc-cat-tag {
    font-size: 12px; color: var(--muted); background: #f4f4f5;
    border-radius: 5px; padding: 2px 8px; font-weight: 500;
}
