```python
def _why_refused(cap, left: int, amount: int) -> str:
    if cap is None:
        return "unknown"
    if amount > cap[1]:
        return "single"
    return "cap" if amount > left else ""


def apply_charges(caps: dict, charges: list) -> dict:
    left = {name: cap[0] for name, cap in caps.items()}
    refused = []
    for _, bucket, amount in charges:
        if amount <= 0 or not isinstance(amount, int) or amount < 0:
            raise ValueError("Invalid amount")
        if bucket not in caps:
            refused.append(("unknown", "unknown"))
            continue
        cap = caps[bucket]
        if _why_refused(cap, left[bucket], amount) != "":
            refused.append((amount, _why_refused(cap, left[bucket], amount)))
            continue
        left[bucket] -= amount
    return {"left": left, "refused": refused}
```