* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(to right, #2c3e50, #4a6491);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.2rem;
    color: #4dabf7;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.logo p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
}

.stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stat-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 120px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #4dabf7;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.filters {
    padding: 25px 30px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.filter-group input, .filter-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.filter-group input:focus, .filter-group select:focus {
    outline: none;
    border-color: #4dabf7;
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.2);
}

.filter-advanced {
    background-color: #edf2f7;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.filter-advanced.show {
    display: block;
}

.toggle-advanced {
    background: none;
    border: none;
    color: #4dabf7;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.toggle-advanced i {
    transition: transform 0.3s;
}

.toggle-advanced.open i {
    transform: rotate(180deg);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: #4dabf7;
    color: white;
}

.btn-primary:hover {
    background-color: #3b9ae1;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background-color: #a0cfff;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background-color: #cbd5e0;
}

.data-container {
    padding: 0 30px 30px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

thead {
    background-color: #2c3e50;
    color: white;
}

th {
    padding: 16px 15px;
    text-align: left;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

th:last-child {
    border-right: none;
}

tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: #f8fafc;
}

td {
    padding: 14px 15px;
    color: #4a5568;
}

.recharge {
    color: #10b981;
    font-weight: 600;
}

.withdraw {
    color: #ef4444;
    font-weight: 600;
}

.empty-row {
    text-align: center;
    padding: 40px;
    color: #718096;
    font-style: italic;
}

.loading-row {
    text-align: center;
    padding: 40px;
    color: #4dabf7;
}

.loading-row i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    gap: 15px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: #edf2f7;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.page-btn.active {
    background-color: #4dabf7;
    color: white;
}

.page-btn:hover:not(.disabled) {
    background-color: #cbd5e0;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    margin: 0 10px;
    color: #718096;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    color: #718096;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .stats {
        width: 100%;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .action-buttons {
        justify-content: flex-start;
    }
    
    .data-container {
        padding: 0 15px 20px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.error-message {
    background-color: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}
/* 表格单元格样式增强 */
td[rowspan],
td[colspan] {
    position: relative;
}

/* 合并单元格的边框处理 */
td[rowspan="1"][colspan="1"] {
    border: 1px solid #e2e8f0;
}

/* 悬停效果 */
tbody tr:hover td:not([rowspan]):not([colspan]) {
    background-color: #f8fafc;
}

/* 确保空单元格有最小高度 */
td:empty {
    min-height: 40px;
}

.filter-group:empty {
    display: none;
}

/* 确保筛选行在有空白组时也能正常显示 */
.filter-row .filter-group {
    min-height: 60px;
}
/* 表格单元格合并样式 */
td[rowspan] {
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}

/* 确保合并单元格的边框正确显示 */
tbody tr:last-child td[rowspan] {
    border-bottom: none;
}

/* 隐藏的单元格样式 */
td[style*="display: none"] {
    border: none;
    padding: 0;
    height: 0;
}

/* 表格行悬停效果 - 确保合并单元格也受悬停影响 */
tbody tr:hover td {
    background-color: #f8fafc;
}

/* 确保数值列右对齐 */
td:nth-child(7),
td:nth-child(8),
td:nth-child(9),
td:nth-child(10),
td:nth-child(11),
td:nth-child(12) {
    text-align: right;
    font-family: 'Courier New', monospace;
}

/* 动账类型列保持左对齐 */
td:nth-child(6) {
    text-align: left;
}