def validate_rfc(value: str) -> str:
    v = (value or "").strip().upper()
    if len(v) not in (12, 13):
        raise ValueError("RFC inválido: longitud no válida.")
    return v
