*{
    box-sizing: border-box;
}
.table-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    position: relative;
    scroll-behavior: smooth;
}

/* 隐藏滚动条但保持功能 */
.table-responsive::-webkit-scrollbar {
    display: none;
}

.table-responsive {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.table {
    margin-bottom: 0;
}

.table th,
.table td {
    /* white-space: nowrap; */
    text-align: center;
    vertical-align: middle;
    min-width: 100px;
    position: relative;
}

/* 优化固定列样式 */
.table th[style*="position: sticky"],
.table td[style*="position: sticky"] {
    background-color: #ccc;
    box-shadow: 2px 0 5px -2px rgba(0, 0, 0, 0.2);
    clip-path: inset(0px -15px 0px 0px);
}

/* 处理固定列的边框 */
.table th[style*="position: sticky"]::after,
.table td[style*="position: sticky"]::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #dee2e6;
}

/* 确保表头在滚动时始终可见 */
.table thead th {
    background-color: #fff;
    position: relative;
}

/* 添加箭头按钮样式 */
.scroll-left,
.scroll-right {
    display: block !important;
    width: 30px;
    height: 30px;
    padding: 0;
    line-height: 30px;
    text-align: center;
    transition: opacity 0.3s;
    border-radius: 4px;
    border: none;
    outline: none !important; /* 移除焦点轮廓 */
    box-shadow: none !important;
}

.scroll-left.disabled,
.scroll-right.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .table-wrapper {
        margin: 0 -15px;
        padding: 0 15px;
    }

    .table th,
    .table td {
        min-width: 80px;
    }

    /* 移动端优化固定列 */
    .table th[style*="position: sticky"],
    .table td[style*="position: sticky"] {
        left: 0;
        background-color: #ccc;
    }

    .scroll-left,
    .scroll-right {
        width: 32px;
        height: 32px;
        line-height: 32px;
    }

    .maxWidth{
        max-width: 280px; 
    min-width: 180px;
    width: 180px;
    height: 100%;
    display: inline-block;
    word-break: break-all;
    word-wrap: break-word;  
    white-space: normal; 
    overflow: hidden;
    }
}
