```python
def parse_amount(text: str) -> int:
    """Converts a decimal amount string to integer cents."""
    if not isinstance(text, str):
        raise ValueError("Input must be a string.")
    parts = text.split('.')
    if len(parts) > 2:
        raise ValueError("Invalid format for amount.")
    
    integer_part = parts[0].lstrip('0')
    fraction_part = parts[1] if len(parts) == 2 else '00'
    
    if not integer_part and fraction_part != '00':
        raise ValueError("Fraction part must be '00' when integer part is empty.")
    
    if any(not c.isdigit() for c in integer_part + fraction_part):
        raise ValueError("Amount contains non-digit characters.")
    
    return int(integer_part) * 100 + int(fraction_part)


def format_amount(cents: int) -> str:
    """Converts non-negative integer cents back to the decimal amount string."""
    if not isinstance(cents, int) or cents < 0:
        raise ValueError("Cents must be a non-negative integer.")
    
    integer_part = cents // 100
    fraction_part = cents % 100
    
    return f"{integer_part}.{fraction_part:02d}"


def allocate_cents(total_cents: int, weights: list) -> list:
    """Allocates total_cents across a list of integer weights proportionally."""
    if not isinstance(weights, list) or not all(isinstance(w, int) and w >= 0 for w in weights):
        raise ValueError("Weights must be a non-empty list of non-negative integers.")
    if sum(weights) == 0:
        raise ValueError("Sum of weights must be greater than zero.")
    if total_cents < 0:
        raise ValueError("Total cents must be a non-negative integer.")
    
    if not weights:
        raise ValueError("Weights list cannot be empty.")
    
    shares = [total_cents * weight // sum(weights) for weight in weights]
    remainder = total_cents - sum(shares)
    
    for i in range(remainder):
        shares[i % len(shares)] += 1
    
    return shares
```