/* Sales Table Styles */
.sales-table-section {
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.filters-container {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.875rem;
    min-width: 150px;
}

.filter-group input[type="date"] {
    min-width: 140px;
}

.sales-table-container {
    overflow-x: auto;
}

.sales-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.sales-table th {
    background: #f8f9fa;
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.sales-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.sales-table tbody tr:hover {
    background: #f8f9fa;
}

.sales-table .status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.sales-table .status.approved {
    background: #d4edda;
    color: #155724;
}

.sales-table .status.pending {
    background: #fff3cd;
    color: #856404;
}

.sales-table .status.failed {
    background: #f8d7da;
    color: #721c24;
}

.sales-table .product-type {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.sales-table .product-type.credits {
    background: #e3f2fd;
    color: #1565c0;
}

.sales-table .product-type.subscription {
    background: #f3e5f5;
    color: #7b1fa2;
}

.table-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.table-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select,
    .filter-group input {
        min-width: auto;
        width: 100%;
    }
    
    .sales-table {
        font-size: 0.75rem;
    }
    
    .sales-table th,
    .sales-table td {
        padding: 0.5rem 0.25rem;
    }
}
