/* ========================================
   Table Enhanced CSS - 表格增强样式
   专门用于优化表格显示效果
   ======================================== */

/* ===== 表格容器增强 ===== */
.table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e8e8e8;
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1890ff 0%, #40a9ff 50%, #69c0ff 100%);
    z-index: 1;
}

/* ===== 表格头部增强 ===== */
.table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.table thead th {
    background: transparent;
    color: #262626;
    font-weight: 600;
    font-size: 14px;
    padding: 20px 16px;
    border: none;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #1890ff 0%, #40a9ff 100%);
}

.table thead th:first-child {
    border-top-left-radius: 12px;
}

.table thead th:last-child {
    border-top-right-radius: 12px;
}

/* ===== 表格主体增强 ===== */
.table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.table tbody tr::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.02) 0%, rgba(24, 144, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.table tbody tr:hover::before {
    opacity: 1;
}

.table tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 24px rgba(24, 144, 255, 0.1);
    z-index: 1;
}

.table tbody tr:nth-child(even) {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.table tbody tr:nth-child(odd) {
    background: #fff;
}

.table tbody td {
    padding: 16px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    position: relative;
    z-index: 1;
    color: #595959;
    font-size: 14px;
    line-height: 1.5;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== 状态标签增强 ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-width: 80px;
    justify-content: center;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.status-badge:hover::before {
    left: 100%;
}

.status-success {
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
    color: #fff;
}

.status-warning {
    background: linear-gradient(135deg, #faad14 0%, #ffc53d 100%);
    color: #fff;
}

.status-danger {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: #fff;
}

.status-info {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: #fff;
}

.status-default {
    background: linear-gradient(135deg, #d9d9d9 0%, #f0f0f0 100%);
    color: #595959;
}

/* ===== 操作按钮增强 ===== */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 60px;
    text-align: center;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn-primary {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(24, 144, 255, 0.4);
}

.action-btn-success {
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.action-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(82, 196, 26, 0.4);
}

.action-btn-warning {
    background: linear-gradient(135deg, #faad14 0%, #ffc53d 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(250, 173, 20, 0.3);
}

.action-btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(250, 173, 20, 0.4);
}

.action-btn-danger {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
}

.action-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 77, 79, 0.4);
}

/* ===== 分页增强 ===== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #e8e8e8;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    color: #595959;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    position: relative;
    overflow: hidden;
}

.pagination li a::before,
.pagination li span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(24, 144, 255, 0.1), transparent);
    transition: left 0.5s;
}

.pagination li a:hover::before,
.pagination li span:hover::before {
    left: 100%;
}

.pagination li a:hover {
    border-color: #1890ff;
    color: #1890ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
}

.pagination li.active a,
.pagination li.active span {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    border-color: #1890ff;
    color: #fff;
    box-shadow: 0 4px 16px rgba(24, 144, 255, 0.3);
    transform: translateY(-2px);
}

.pagination li.disabled a,
.pagination li.disabled span {
    color: #d9d9d9;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #e8e8e8;
}

.pagination li.disabled a:hover,
.pagination li.disabled span:hover {
    transform: none;
    box-shadow: none;
    border-color: #e8e8e8;
    color: #d9d9d9;
}

/* ===== 表格响应式增强 ===== */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .table-container {
        margin: 0 10px;
    }
    
    .table thead th {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .table tbody td {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .action-btn {
        min-width: 50px;
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .status-badge {
        min-width: 60px;
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .pagination li a,
    .pagination li span {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .table thead th {
        padding: 8px 4px;
        font-size: 11px;
    }
    
    .table tbody td {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .pagination-wrapper {
        padding: 16px;
    }
    
    .pagination li a,
    .pagination li span {
        min-width: 28px;
        height: 28px;
        padding: 0 6px;
        font-size: 11px;
    }
}

/* ===== 表格加载状态 ===== */
.table-loading {
    position: relative;
    overflow: hidden;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== 表格空状态 ===== */
.table-empty {
    text-align: center;
    padding: 60px 20px;
    color: #8c8c8c;
}

.table-empty-icon {
    font-size: 48px;
    color: #d9d9d9;
    margin-bottom: 16px;
}

.table-empty-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.table-empty-desc {
    font-size: 14px;
    color: #8c8c8c;
}

/* ===== 表格排序增强 ===== */
.sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
}

.sortable::after {
    content: '↕';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #8c8c8c;
    transition: all 0.3s ease;
}

.sortable:hover::after {
    color: #1890ff;
}

.sortable.asc::after {
    content: '↑';
    color: #1890ff;
}

.sortable.desc::after {
    content: '↓';
    color: #1890ff;
}

/* ===== 表格选择增强 ===== */
.table-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
}

.table-checkbox:checked {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    border-color: #1890ff;
}

.table-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.table-checkbox:hover {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}
