/* 主内容列允许收缩，页签只在可用区域内滚动，不撑大页面。 */
.fi-layout:has(.bft-history) > .fi-main-ctn { min-width:0; max-width:100%; }
.fi-layout:has(.bft-history) .fi-topbar,.bft-history { width:100%; max-width:100%; min-width:0; }
.fi-layout:has(.bft-history) .fi-topbar > nav,.fi-layout:has(.bft-history) .fi-main { padding-inline:24px; }
/* 侧栏与页签分属两列，菜单紧接品牌栏，无需额外为页签预留高度。 */
.fi-layout:has(.bft-history) .fi-main-sidebar .fi-sidebar-nav { padding:20px 20px; }
.fi-main-sidebar .fi-sidebar-nav-groups > .fi-sidebar-group[hidden] { display:none !important; }
.bft-category-nav { display:flex; flex:1 1 0%; min-width:0; max-width:100%; gap:4px; overflow-x:auto; align-items:center; height:100%; scrollbar-width:none; }
.bft-category-nav::-webkit-scrollbar,.bft-history-list::-webkit-scrollbar { display:none; }
.bft-category-button { flex-shrink:0; padding:10px 14px; border-radius:8px; font-size:14px; font-weight:600; color:#475569; white-space:nowrap; }
.bft-category-button:hover { background:#f8fafc; }
.bft-category-button.is-active { background:#fff7ed; color:#c77700; }
/* 页签采用浅灰底和短下划线，保持 40px 高度，与正文使用相同的起始边距。 */
.bft-history { position:sticky; top:4rem; z-index:19; display:flex; flex-shrink:0; align-items:center; gap:8px; height:40px; box-sizing:border-box; padding:0 24px; background:#f1f3f6; border-bottom:1px solid #e5e7eb; }
.bft-history-list { display:flex; flex:1 1 0%; min-width:0; max-width:100%; height:100%; gap:4px; align-items:stretch; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; }
.bft-history-tab { position:relative; display:flex; flex-shrink:0; align-items:center; margin-top:4px; border-radius:6px 6px 0 0; color:#64748b; font-size:13px; }
.bft-history-tab:hover { background:#e8ecf1; }
.bft-history-tab a { display:block; min-width:0; max-width:180px; padding:8px 14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bft-history-tab button { display:flex; align-items:center; justify-content:center; width:22px; height:22px; margin-right:8px; border-radius:4px; font-size:16px; color:#94a3b8; }
.bft-history-tab button:hover { background:#fee2e2; color:#b91c1c; }
.bft-history-tab.is-active { color:#b45309; background:#fff; font-weight:600; }
.bft-history-tab.is-active::after { content:''; position:absolute; bottom:0; left:14px; right:14px; height:2px; border-radius:2px; background:#d97706; }
/* 更多操作独立于滚动区域，避免下拉面板被页签容器裁切。 */
.bft-history-actions { position:relative; flex-shrink:0; }
.bft-history-more { display:flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:5px; font-size:22px; color:#64748b; }
.bft-history-more:hover,.bft-history-more[aria-expanded=true] { background:#e2e8f0; color:#334155; }
.bft-history-dropdown { position:absolute; top:calc(100% + 6px); right:0; min-width:132px; padding:4px; background:#fff; border:1px solid #e5e7eb; border-radius:8px; box-shadow:0 8px 24px #0f172a1a; }
.bft-history-dropdown button { width:100%; padding:8px 12px; border-radius:4px; text-align:start; white-space:nowrap; font-size:13px; color:#475569; }
.bft-history-dropdown button:hover { background:#f1f5f9; }
.bft-category-button:focus-visible,.bft-history a:focus-visible,.bft-history button:focus-visible,.bft-history-list:focus-visible { outline:2px solid #d97706; outline-offset:-2px; }
.dark .bft-history { background:#111827; border-color:#374151; }
.dark .bft-category-button,.dark .bft-history-tab,.dark .bft-history-dropdown button { color:#d1d5db; }
.dark .bft-category-button:hover,.dark .bft-history-tab:hover,.dark .bft-history-dropdown button:hover,.dark .bft-history-more:hover { background:#374151; }
.dark .bft-category-button.is-active { color:#fbbf24; background:#422e16; }
.dark .bft-history-tab.is-active,.dark .bft-history-dropdown { background:#1f2937; color:#fbbf24; border-color:#374151; }
@media(max-width:640px) { .bft-category-button { padding:8px 10px; } .bft-history { padding-inline:16px; } .fi-layout:has(.bft-history) .fi-topbar > nav,.fi-layout:has(.bft-history) .fi-main { padding-inline:16px; } }
