/* Tab Bar — MDI tabs, wrapping rows */
.tab-bar {
    position: fixed; top: 56px; left: 240px; right: 0; min-height: 36px;
    background: #F8FAFC; border-bottom: 1px solid #E2E8F0;
    display: flex; align-items: flex-start; z-index: 89;
    transition: left 0.2s;
}
.sidebar.collapsed ~ .main-area .tab-bar { left: 62px; }

.tab-list { display: flex; flex-wrap: wrap; flex: 1; padding: 0; }

.tab-item {
    display: flex; align-items: center; gap: 6px; height: 36px;
    padding: 0 14px; font-size: 13px; color: #64748B; cursor: pointer;
    border-bottom: 2px solid transparent; max-width: 260px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color 0.15s, background 0.15s;
    user-select: none;
}
.tab-item:hover { color: #0D2240; background: rgba(0,0,0,0.02); }
.tab-item.active {
    background: #0D2240; color: #fff; border-bottom-color: #00897B;
    font-weight: 600;
}
.tab-item .tab-close {
    width: 16px; height: 16px; border-radius: 4px; border: none;
    background: transparent; color: inherit; cursor: pointer;
    font-size: 12px; display: flex; align-items: center; justify-content: center;
    margin-left: 4px; opacity: 0; transition: opacity 0.15s;
}
.tab-item:hover .tab-close { opacity: 0.6; }
.tab-item .tab-close:hover { opacity: 1; background: rgba(220,38,38,0.15); color: #DC2626; }

.tab-close-all {
    width: 28px; height: 36px; border: none; background: transparent;
    color: #94A3B8; cursor: pointer; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}
.tab-close-all:hover { color: #DC2626; }
