/* ============================================================
   白泽 API 测试台 · 设计系统-白泽 v1.2.2（活力翠绿色系）
   ============================================================ */
:root {
    /* 品牌色 · 活力翠绿 */
    --brand-primary: #7AE040;
    --brand-gradient-from: #AAFF72;
    --brand-gradient-to: #58C42B;
    --brand-text: #0F2E04;
    --brand-accent: #CAFFB0;
    --brand-dim: rgba(122, 224, 64, 0.14);

    /* 深色中性 · 3 层 */
    --bg-base: #0A0A0A;
    --bg-primary: #121214;
    --bg-card: #1C1C1E;
    --bg-card-elevated: #2C2C2E;

    /* 文字 */
    --text-primary: #FFFFFF;
    --text-secondary: #EBEBF5;
    --text-tertiary: #8E8E93;
    --text-quaternary: #6E6E73;
    --text-on-brand: #0F2E04;

    /* 语义色 */
    --state-success: #31B693;
    --state-warning: #FBBF24;
    --state-error: #FF453A;
    --state-info: #8E8E93;

    /* 阴影 / 发光 */
    --elevation-sm: 0 2px 8px rgba(0, 0, 0, 0.30);
    --elevation-md: 0 4px 16px rgba(0, 0, 0, 0.40);
    --elevation-lg: 0 8px 24px rgba(0, 0, 0, 0.50);
    --glow-brand: 0 0 32px rgba(122, 224, 64, 0.28), 0 0 64px rgba(122, 224, 64, 0.12);
    --glow-brand-sm: 0 4px 14px rgba(122, 224, 64, 0.35);

    /* 圆角 */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 24px;
    --radius-full: 999px;

    /* 字体 */
    --ff: "PingFang SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Microsoft YaHei", sans-serif;
    --ff-mono: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --ff-en: "Inter", -apple-system, sans-serif;

    /* 层级 */
    --topbar-h: 64px;
}

/* ============ 复位 ============ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
html, body {
    font-family: var(--ff);
    background: var(--bg-base);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}
body { display: flex; flex-direction: column; min-height: 100vh; }
button { font-family: inherit; border: none; cursor: pointer; }
input, select, textarea { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
code {
    font-family: var(--ff-mono);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    font-size: 12px;
    color: var(--brand-accent);
}
::selection { background: rgba(122, 224, 64, 0.28); color: #fff; }

/* ============ 排版 ============ */
.text-display { font-size: 28px; font-weight: 700; line-height: 1.22; letter-spacing: -0.5px; }
.text-h1 { font-size: 20px; font-weight: 600; line-height: 1.3; }
.text-h2 { font-size: 16px; font-weight: 500; line-height: 1.38; }
.text-body { font-size: 14px; font-weight: 400; line-height: 1.43; }
.text-caption { font-size: 12px; font-weight: 400; line-height: 1.33; color: var(--text-tertiary); }

/* ============ 顶栏 ============ */
.topbar {
    height: var(--topbar-h);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    background: rgba(10, 10, 10, 0.82);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 20;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.brand .logo {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--brand-gradient-from), var(--brand-gradient-to));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-text);
    font-weight: 800;
    font-size: 17px;
    box-shadow: var(--glow-brand-sm);
    letter-spacing: -0.5px;
}
.brand h1 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}
.brand .subtitle {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}
.brand .ver {
    font-family: var(--ff-mono);
    font-size: 11px;
    color: var(--brand-primary);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--brand-dim);
    border: 0.5px solid rgba(122, 224, 64, 0.35);
    margin-left: 6px;
}
.topbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: transform .12s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
    white-space: nowrap;
}
.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}
.btn:active { transform: translateY(1px); }
.btn.primary {
    background: linear-gradient(135deg, var(--brand-gradient-from), var(--brand-gradient-to));
    color: var(--brand-text);
    border-color: transparent;
    font-weight: 700;
    box-shadow: var(--glow-brand-sm);
}
.btn.primary:hover { filter: brightness(1.05); box-shadow: var(--glow-brand); }
.btn.ghost {
    background: transparent;
    border: 0.5px solid rgba(255, 255, 255, 0.14);
}
.btn.ghost:hover { border-color: rgba(122, 224, 64, 0.5); color: var(--brand-primary); }
.btn.small { padding: 4px 12px; font-size: 12px; }
.btn.xl { height: 48px; padding: 0 28px; font-size: 15px; }

/* ============ 设置面板 ============ */
.settings {
    padding: 0 28px 0;
    background: var(--bg-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.settings details {
    border-radius: 0;
    padding: 14px 0;
}
.settings summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: var(--text-tertiary);
    padding: 4px 0;
    font-weight: 500;
    font-size: 13px;
    list-style: none;
}
.settings summary::-webkit-details-marker { display: none; }
.settings summary::before {
    content: "";
    width: 0; height: 0;
    border-left: 4px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    margin-right: 4px;
    transition: transform .2s ease;
}
.settings details[open] summary::before { transform: rotate(90deg); }
.settings summary:hover { color: var(--text-primary); }
.settings .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 20px;
    padding: 14px 2px 6px;
}
.settings label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.settings label.full { grid-column: 1 / -1; }
.settings input,
.settings select,
.settings textarea {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.settings textarea { font-family: var(--ff-mono); font-size: 12px; resize: vertical; }
.settings input:focus,
.settings select:focus,
.settings textarea:focus {
    outline: none;
    border-color: rgba(122, 224, 64, 0.5);
    box-shadow: 0 0 0 3px rgba(122, 224, 64, 0.12);
}
.settings small {
    color: var(--text-quaternary);
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}
.settings small code {
    font-size: 10px;
    padding: 1px 6px;
}

/* ============ 主布局 ============ */
.layout {
    flex: 1;
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 0;
    gap: 0;
}

/* ============ 侧边栏 ============ */
.sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--bg-primary);
    overflow-y: auto;
    max-height: calc(100vh - var(--topbar-h));
    position: sticky;
    top: var(--topbar-h);
    align-self: start;
    padding-bottom: 20px;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

.sidebar .search {
    padding: 14px 16px;
    position: sticky; top: 0;
    background: var(--bg-primary);
    z-index: 2;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.sidebar .search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border-radius: var(--radius-pill);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
    transition: border-color .15s ease;
}
.sidebar .search input:focus {
    outline: none;
    border-color: rgba(122, 224, 64, 0.45);
}

.tree { padding: 8px 8px; }
.tree .tag-group { margin: 8px 0; }
.tree .tag-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    user-select: none;
    border-radius: var(--radius-sm);
    transition: color .15s ease;
}
.tree .tag-title:hover { color: var(--text-primary); }
.tree .tag-title .caret {
    display: inline-block;
    width: 10px;
    color: var(--text-quaternary);
    font-size: 10px;
    transition: transform .2s ease;
}
.tree .tag-title .count {
    margin-left: auto;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-quaternary);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: none;
    letter-spacing: 0;
}

.tree .endpoint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin: 2px 0;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: background .12s ease, transform .12s ease;
    position: relative;
}
.tree .endpoint:hover {
    background: rgba(255, 255, 255, 0.04);
}
.tree .endpoint.active {
    background: var(--brand-dim);
    box-shadow: inset 3px 0 0 var(--brand-primary);
}
.tree .endpoint.active .p { color: var(--text-primary); }
.tree .endpoint .m {
    font-family: var(--ff-mono);
    font-size: 9.5px;
    width: 44px;
    text-align: center;
    padding: 3px 0;
    border-radius: var(--radius-xs);
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}
.tree .endpoint .m.GET     { background: rgba(49, 182, 147, 0.18); color: var(--state-success); }
.tree .endpoint .m.POST    { background: rgba(122, 224, 64, 0.18); color: var(--brand-primary); }
.tree .endpoint .m.PUT     { background: rgba(251, 191, 36, 0.18); color: var(--state-warning); }
.tree .endpoint .m.PATCH   { background: rgba(180, 136, 255, 0.18); color: #C9A0FF; }
.tree .endpoint .m.DELETE  { background: rgba(255, 69, 58, 0.18); color: var(--state-error); }
.tree .endpoint .ep-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}
.tree .endpoint .p {
    font-family: var(--ff-mono);
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tree .endpoint .ep-summary {
    font-size: 11px;
    color: var(--text-quaternary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============ 工作区 ============ */
.workbench {
    padding: 28px 36px 48px;
    overflow-y: auto;
    max-height: calc(100vh - var(--topbar-h));
    background: var(--bg-base);
}
.workbench::-webkit-scrollbar { width: 8px; }
.workbench::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 4px; }
.workbench::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

.empty {
    text-align: center;
    color: var(--text-tertiary);
    padding: 160px 0;
    font-size: 14px;
}
.empty .hero {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.4;
}
.empty .hint-text {
    color: var(--text-quaternary);
    font-size: 12px;
    margin-top: 8px;
}
.panel.hidden, .tab-panel.hidden, .hidden { display: none !important; }

/* ============ 请求头区 ============ */
.request-head {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-elevated) 100%);
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    flex-wrap: wrap;
    box-shadow: var(--elevation-sm);
}
.request-head .method {
    font-family: var(--ff-mono);
    font-weight: 800;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--brand-gradient-from), var(--brand-gradient-to));
    color: var(--brand-text);
    font-size: 12px;
    letter-spacing: 0.05em;
    box-shadow: var(--glow-brand-sm);
}
.request-head .path {
    font-family: var(--ff-mono);
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}
.request-head .summary {
    color: var(--text-tertiary);
    font-size: 13px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ Tabs ============ */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 16px;
    padding: 0 4px;
}
.tab {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    padding: 10px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s ease, border-color .15s ease;
    letter-spacing: 0.02em;
}
.tab.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}
.tab:hover:not(.active) { color: var(--text-primary); }

.tab-panel {
    padding: 8px 4px;
    min-height: 60px;
}

/* ============ 参数区 ============ */
.kv-block { margin: 12px 0 22px; }
.kv-block h3 {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.kv-block h3::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}
.kv-form {
    display: grid;
    grid-template-columns: 180px 1fr 240px;
    gap: 10px 16px;
    align-items: center;
}
.kv-form .k {
    font-family: var(--ff-mono);
    font-size: 13px;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
}
.kv-form .k .req {
    color: var(--state-error);
    margin-left: 4px;
    font-size: 12px;
}
.kv-form input {
    background: var(--bg-card);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--ff-mono);
    font-size: 13px;
    width: 100%;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.kv-form input:focus {
    outline: none;
    border-color: rgba(122, 224, 64, 0.5);
    box-shadow: 0 0 0 3px rgba(122, 224, 64, 0.12);
}
.kv-form .hint {
    color: var(--text-quaternary);
    font-size: 11px;
    font-family: var(--ff);
}
.kv-empty {
    color: var(--text-quaternary);
    font-size: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    font-style: italic;
}

/* ============ Body / 代码块 ============ */
.body-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 500;
}
.body-head > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.body-head > span::before {
    content: "";
    width: 6px; height: 6px;
    background: var(--brand-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--brand-primary);
}
.body-head > div { display: flex; gap: 6px; }

.code {
    background: var(--bg-card);
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    padding: 14px 16px;
    font-family: var(--ff-mono);
    font-size: 13px;
    width: 100%;
    min-height: 180px;
    resize: vertical;
    line-height: 1.6;
    white-space: pre;
    overflow: auto;
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.code { outline: none; }
textarea.code:focus {
    border-color: rgba(122, 224, 64, 0.4);
    box-shadow: 0 0 0 3px rgba(122, 224, 64, 0.1);
}
.code::-webkit-scrollbar { width: 8px; height: 8px; }
.code::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
.code::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

.hint {
    display: block;
    color: var(--text-quaternary);
    font-size: 11px;
    margin-top: 6px;
}
.preset-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(122, 224, 64, 0.25), rgba(88, 196, 43, 0.15));
    color: var(--brand-primary);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: var(--radius-full);
    border: 0.5px solid rgba(122, 224, 64, 0.35);
    letter-spacing: 0.05em;
    vertical-align: middle;
    margin-right: 4px;
}

/* ============ 发送按钮 & 状态 ============ */
.actions {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
}
.actions .btn.primary.xl {
    padding: 0 32px;
    height: 44px;
    font-size: 14px;
}
.status {
    color: var(--text-tertiary);
    font-size: 13px;
    font-family: var(--ff-mono);
}
.status.ok { color: var(--state-success); }
.status.err { color: var(--state-error); }

/* ============ Response ============ */
.response {
    margin-top: 22px;
    padding-top: 4px;
}
.resp-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.resp-head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.resp-head h3::before {
    content: "";
    width: 6px; height: 6px;
    background: var(--text-tertiary);
    border-radius: 50%;
}
.resp-head.ok h3::before { background: var(--state-success); box-shadow: 0 0 8px var(--state-success); }
.resp-head.err h3::before { background: var(--state-error); box-shadow: 0 0 8px var(--state-error); }
.resp-head .resp-actions {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}
.resp-head .meta {
    color: var(--text-tertiary);
    font-size: 12px;
    font-family: var(--ff-mono);
    display: inline-flex;
    gap: 10px;
    align-items: center;
}
.resp-head .meta .pill {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    font-weight: 600;
    font-size: 11px;
}
.resp-head .meta .pill.ok {
    background: rgba(49, 182, 147, 0.2);
    color: var(--state-success);
}
.resp-head .meta .pill.err {
    background: rgba(255, 69, 58, 0.2);
    color: var(--state-error);
}
.code.resp {
    min-height: 200px;
    max-height: 520px;
    background: var(--bg-primary);
    border-color: rgba(255, 255, 255, 0.04);
}
.json-comment {
    color: var(--text-tertiary);
    opacity: 0.5;
    font-style: italic;
}

details { margin-top: 12px; }
details > summary {
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 12px;
    padding: 6px 4px;
    transition: color .15s ease;
}
details > summary:hover { color: var(--text-primary); }
details[open] > summary { color: var(--text-secondary); margin-bottom: 8px; }

/* ============ 字段说明 Schema Docs ============ */
.schema-doc-block {
    margin: 0 0 28px;
}
.schema-doc-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.schema-doc-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}
.schema-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.schema-dot.req { background: var(--brand-primary); box-shadow: 0 0 8px var(--brand-primary); }
.schema-dot.resp { background: var(--state-success); box-shadow: 0 0 8px var(--state-success); }
.schema-dot.mock { background: #C9A0FF; box-shadow: 0 0 8px rgba(180, 136, 255, 0.5); }
.schema-dot.ai   { background: #FFB86C; box-shadow: 0 0 8px rgba(255, 184, 108, 0.5); }

.schema-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.schema-table thead th {
    background: var(--bg-card-elevated);
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    padding: 10px 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}
.schema-table tbody tr {
    transition: background .12s ease;
}
.schema-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}
.schema-table tbody tr.nested {
    background: rgba(255, 255, 255, 0.015);
}
.schema-table tbody tr.nested:hover {
    background: rgba(255, 255, 255, 0.045);
}
.schema-table td {
    padding: 9px 14px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
}
.schema-field-name {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
}
.schema-field-name code {
    font-family: var(--ff-mono);
    font-size: 12.5px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
}
.schema-indent {
    display: inline-block;
    flex-shrink: 0;
}
.schema-branch {
    color: var(--text-quaternary);
    font-family: var(--ff-mono);
    font-size: 11px;
    flex-shrink: 0;
}
.schema-type {
    font-family: var(--ff-mono);
    font-size: 11.5px;
    color: #C9A0FF;
    background: rgba(180, 136, 255, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    white-space: nowrap;
}
.schema-req {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.schema-req.yes {
    color: var(--state-error);
    background: rgba(255, 69, 58, 0.12);
}
.schema-req.no {
    color: var(--text-quaternary);
    background: rgba(255, 255, 255, 0.04);
}
.schema-desc {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.5;
}
.schema-enum {
    font-family: var(--ff-mono);
    font-size: 11px;
    color: var(--state-warning);
    background: rgba(251, 191, 36, 0.08);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    display: inline-block;
    width: fit-content;
}
.schema-default {
    font-family: var(--ff-mono);
    font-size: 11px;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    display: inline-block;
    width: fit-content;
}
.schema-no-desc {
    color: var(--text-quaternary);
    font-style: italic;
}
.schema-hint-banner {
    font-size: 12px;
    color: var(--text-tertiary);
    background: rgba(122, 224, 64, 0.06);
    border: 0.5px solid rgba(122, 224, 64, 0.18);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    margin-bottom: 12px;
}

/* ============ Mock 数据面板 ============ */
.mock-section { margin-bottom: 28px; }
.mock-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.mock-head .schema-doc-title { margin-bottom: 0; }
#mockJsonPreview {
    max-height: 520px;
    background: var(--bg-primary);
    border-color: rgba(255, 255, 255, 0.04);
}

/* ============ AI 导出 ============ */
.ai-export-section { margin-bottom: 24px; }
.ai-export-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.ai-export-head .schema-doc-title { margin-bottom: 0; }
.ai-export-preview {
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 20px 24px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-primary);
    overflow-x: auto;
    max-height: 70vh;
    overflow-y: auto;
}
.ai-export-preview h2 { font-size: 15px; margin: 0 0 4px; color: var(--accent); }
.ai-export-preview blockquote {
    margin: 0 0 16px; padding: 4px 0 4px 12px;
    border-left: 3px solid rgba(255,255,255,0.12); color: var(--text-secondary);
}
.ai-export-preview table {
    width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 12.5px;
}
.ai-export-preview th, .ai-export-preview td {
    text-align: left; padding: 6px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ai-export-preview th { color: var(--text-secondary); font-weight: 600; white-space: nowrap; }
.ai-export-preview pre {
    background: rgba(0,0,0,0.3); border-radius: 6px; padding: 14px 16px;
    font-size: 12px; overflow-x: auto; line-height: 1.6;
}
.ai-export-preview code { font-family: 'SF Mono', 'Fira Code', monospace; }
.ai-export-preview p { margin: 4px 0; }

/* ============ Toast（可选） ============ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.panel { animation: fadeIn .25s ease; }

/* ============ 登录浮层 ============ */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
}
.login-overlay.hidden { display: none !important; }
.login-card {
    width: 420px;
    max-width: 92vw;
    padding: 48px 40px;
    background: var(--bg-card);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    box-shadow: var(--elevation-lg), var(--glow-brand);
}
.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
}
.login-brand .logo {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--brand-gradient-from), var(--brand-gradient-to));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-text);
    font-weight: 800;
    font-size: 20px;
    box-shadow: var(--glow-brand-sm);
}
.login-brand h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}
.login-brand .subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 3px;
}
.login-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}
.login-form label span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.login-form input {
    background: var(--bg-card-elevated);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text-primary);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.login-form input:focus {
    outline: none;
    border-color: rgba(122, 224, 64, 0.5);
    box-shadow: 0 0 0 3px rgba(122, 224, 64, 0.12);
}
.login-error {
    color: var(--state-error);
    font-size: 13px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(255, 69, 58, 0.1);
    border-radius: var(--radius-sm);
    border: 0.5px solid rgba(255, 69, 58, 0.2);
}
.login-submit-btn {
    width: 100%;
    margin-top: 4px;
}
.topbar .admin-badge {
    font-size: 12px;
    color: var(--brand-primary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--brand-dim);
    border: 0.5px solid rgba(122, 224, 64, 0.3);
    font-weight: 500;
}

/* ============ 响应式 ============ */
@media (max-width: 960px) {
    .layout { grid-template-columns: 260px 1fr; }
    .workbench { padding: 20px; }
    .kv-form { grid-template-columns: 140px 1fr; }
    .kv-form .hint { display: none; }
}
@media (max-width: 720px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; max-height: 280px; }
    .topbar { padding: 0 16px; }
    .settings { padding: 0 16px; }
    .workbench { padding: 16px; }
}
