/* DataTable 响应式样式优化 */

/* 响应式行布局 */
.datatable-responsive-row .col-md-6 {
    flex: 0 0 auto;
    width: 50%;
}

@media (max-width: 576px) {
    .datatable-responsive-row .col-md-6 {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* 分页样式 */
.dataTables_paginate .pagination {
    margin: 0;
    justify-content: center;
}

.pagination-rounded .page-link {
    border-radius: 50px;
    margin: 0 2px;
    padding: 8px 12px;
}

/* 表格控件样式 */
.dataTables_length {
    margin-bottom: 1rem;
}

.dataTables_length .form-select {
    width: auto;
    display: inline-block;
    margin: 0 0.5rem;
}

.dataTables_filter {
    margin-bottom: 1rem;
    text-align: right;
}

.dataTables_filter input {
    border-radius: 20px;
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    width: 200px;
}

.dataTables_info {
    padding-top: 8px;
    font-size: 0.875rem;
    color: #6c757d;
}

/* 表格样式优化 */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    vertical-align: middle;
    padding: 12px 8px;
}

.table tbody td {
    vertical-align: middle;
    padding: 12px 8px;
    border-top: 1px solid #dee2e6;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 加载状态 */
.dataTables_processing {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    color: #999;
}

/* 空状态 */
.dataTables_empty {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .dataTables_filter {
        text-align: left;
        margin-bottom: 0.5rem;
    }
    
    .dataTables_filter input {
        width: 100%;
        max-width: none;
    }
    
    .dataTables_length {
        margin-bottom: 0.5rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 8px 4px;
        font-size: 0.875rem;
    }
}

/* 删除复杂的手动DOM操作，使用纯CSS实现 */
.dataTables_wrapper .row {
    margin: 0 -7.5px;
}

.dataTables_wrapper .row > div {
    padding: 0 7.5px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 0.75rem;
}