/* Shared Data Table Styles */

.data-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    overflow: hidden;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.section-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    padding: 0.5rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.table-controls {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: #10b981;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
}

.export-btn:hover {
    background: #059669;
}

/* Pagination */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.pagination-info {
    color: #64748b;
    font-size: 0.8rem;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-btn {
    padding: 0.35rem 0.75rem;
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
}

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

.page-btn:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.page-info {
    color: #6b7280;
    font-size: 0.8rem;
}

/* Base Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 0.6rem 1.25rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.8rem;
    color: #6b7280;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.data-table td {
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    font-size: 0.875rem;
}

.data-table td.date {
    color: #374151;
}

.data-table td.numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.data-table td.positive {
    color: #10b981;
}

.data-table td.negative {
    color: #ef4444;
}

.data-table td small {
    color: inherit;
    opacity: 0.8;
    font-size: 0.8rem;
}

.data-table tbody tr:hover {
    background: #f3f4f6;
}

.data-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.data-table tbody tr:nth-child(even):hover {
    background: #f3f4f6;
}

/* Right-aligned numeric columns */
.data-table th.numeric {
    text-align: right;
}

/* Highlight rows */
.data-table tbody tr.highlight-row {
    background: #fef9e7 !important;
    font-weight: 600;
    border-top: 2px solid #d97706;
    border-bottom: 2px solid #d97706;
}

.data-table tbody tr.highlight-row td {
    background: #fef9e7 !important;
    color: #92400e;
}

/* Mobile */
.mobile-hidden-message {
    display: none;
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .mobile-hidden-message {
        display: block;
    }

    .data-section .data-table-container {
        display: none;
    }

    .table-pagination {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .pagination-controls {
        justify-content: center;
    }
}
